Jump to content

Taulmarill

Active Members
  • Posts

    30
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Gender
    Male
  • Location
    Germany

Recent Profile Visitors

2,667 profile views

Taulmarill's Achievements

Newbie

Newbie (1/14)

  1. Learn You a Haskell for Great Good Real World OCaml and of course Types and Programming Languages
  2. Have you tried looking at the schema other forums use? It can be most inspiring to look at the designs other people came up with and how well those perform in the real world. Also i don't think there is one best design. It will always be a compromise, because as soon as you tune your schema to do one thing very well, other functions might slow down. I'd start by defining what functionality i want, then come up with a fairly reasonable design for just that. As soon as everything is running, i'd start profiling to identify slow code and other bottlenecks.
  3. Guess i have to benchmark to prove my point ... consider the following script: use Benchmark qw/timethese/; # generate 1 MB of pseudorandom string my $string = join "", map{ ("A".."Z", " ")[rand 27] } 1..2**20; timethese( 100, { 'split' => 'test_split()', 'regex' => 'test_regex()', } ); sub test_regex { my @words = $string =~ /([^ ]+)/g; return \@words; } sub test_split { my @words = split ' ', $string; return \@words; } i get the following benchmarks on a perl 5.10 (other builds give me similar results): Benchmark: timing 100 iterations of regex, split... regex: 8 wallclock secs ( 7.12 usr + 0.01 sys = 7.13 CPU) @ 14.03/s (n=100) split: 5 wallclock secs ( 4.47 usr + 0.02 sys = 4.49 CPU) @ 22.27/s (n=100) agreed Before i start off using C++, i usually try Perl. If it's not fast enough i begin to profile, optimize and, if all else fails, use Inline::C. This approach gets my work done faster than doing everything in C(++). Of course there are things you just can't do in Perl (device drivers or kernel modules e.g.) and there are also situations, when it just isn't the best Tool. So, what you're saying is, that Newlines are never more than 1 Byte, except when they are longer ;) But seriously, i was talking about the sequence of bytes a OS or editor thinks about as a signal for a new line, not the specific ASCII character, that would always be one Byte ..... except on machines using less than seven bit for a byte .... but those machines don't use ASCII anyway. chomp() just told me, it doesn't like you either. ;) Is your disliking founded in some real disadvantages you are able to put into words or do you just don't like how chomp() looks at you?
  4. Another advantage using specialized functions is, that the readability of the code gets better, since it's easier to see at first glance, what it is supposed to do. The difference in performance is quite significant, although if your program runs < 1 sec. you probably won't care or notice the difference. I had a case, where the daily network traffic had to be categorized into the known subnets. This was done using regexes mostly until the reporting script ran longer than 24h. At that point a coworker and i wrote a module using pack, unpack and bit shifting to match ips to subnets. That reduced the runtime to less than one hour.
  5. How is the status of Analog.5? I'm working on some perl related tutorials and it seems to be a good medium for that.
  6. IMHO regex should only be used for stuff that substr(), index(), tr///, etc can't do. This is because regex is the most powerful tool in the box and will therefore (almost always) use up the most cpu cycles. Also, if you suspect newlines, you should use chomp() to trim them, because it only removes newlines, not chars you might want to preserve. Also a newline is not the same on all systems. On some machines, newline is even longer than one Byte.
  7. I use Perl for getting things done and the occasional bit of C for performance.
  8. That would also be my biggest concern. Even if they figure out everything else you would get latency because your keyboard/mouse input has to travel to their servers and the image has to get back again. I don't see that kind of technology performing smoothly unless they place their servers directly at your ISP. I believe OnLive is any good not sooner than i see it in the real world outside of E³, GDC, etc.
  9. The perl executable itself (the interpreter) is available precompiled from http://strawberryperl.com/. Avoid other precompiled Versions since most of them become a pain as soon as you want to compile your own CPAN modules. Perl scripts - programs you write in the Perl language - can not be compiled like C or C++ programs, Perl is not meant for that. But you can package the script, dependent modules and the perl.exe into a single .exe file which will mostly behave like a stand alone executable. You can do that using the PAR::Packer module. Doing this however does not give you any performance improvement and startup times can be quite long.
  10. There is a third alternative tough. Just don't care about the game. Think about it this way. Even if you pirate the game, you create buzz, because there are people looking for games which have many peers. Also your friend will be encouraged to buy a game like Spore if he has someone to play it with via LAN or internet. I think MS-Office or Windows would never have got their ridiculous market share if it wouldn't have been so easy to pirate them back in the days of Win9x. A concept that also gave the first PlayStation an edge over it's module based competitors. There are tons of great games out there that don't have any sort of copy protection or are - even better - free.
  11. There is not that much for the Wii fit yet. There is one skiing game, but it doesn't look that interesting to me. Just wait a few months, by Christmas there should be plenty Wii fit capable games out there. As for normal Wii games. The Nintendo main franchise games are a good get: Zelda Twilight Princess and Metroid Prime 3 are both nice and Super Mario Galaxy is really great. If you want a game the whole family can enjoy, you should look for Boom Blox. It's usually overlooked but really well made and offers tons of content plus an editor so you can create your own levels. Also Super Smash Bros. Brawl is supposed to be gaming nirvana. But since it's not yet released in the EU, i can't comment on that.
  12. Is the book you are talking about this one?
  13. Consoles: NES, SNES, GameCube, Wii My current gaming "PC" is a MacPro (mid 2007) with a ATI X1900. I think i will upgrade to the 8800 GT eventually, but right now, the X1900 does what i want. There is also my data storage PC: it's a AMD 3200+ with 1GB RAM. Right now there is only one RAID 5 with 4 x 500GB WD RE2 HDs in there. But I'm planning to put a second RAID 5 with 4 x 1TB WD RE2 HDs besides that. I also run a MacMini as a 24/7 Server and an old G4 PowerBook.
  14. This is not about recovering the private key from the public key or decrypting intercepted data traffic. Did you even read the thread or just the subject? I'm fuzzy on the details here, but ssh-agent and ssh-add tell me, when i mistyped my pass phrase, so there seems to be a way to verify if the attempt to decrypt was successful.
  15. I'm sure there are far more efficient methods. This program was mainly born out of curiosity. I wanted to see if i could come up with a method to calculate pi on my own. I'll try and learn some more advanced mathematics this summer, mainly because i want to get a deeper understanding on cryptography and stenography. But maybe I'll revisit this problem in the future. Btw. if you know where to find more efficient methods which can be fully understood with high school level math skills, please point me to them.
×
×
  • Create New...