Arc Forumnew | comments | leaders | submit | hilbertastro's commentslogin

I like to use the Mersenne Twister for my pseudorandom numbers. The source code (in C) is illuminating. Or you can check out www.netlib.org for other implementations (in e.g., Fortran 77). Should be straightforward to translate them.

-----

1 point by bOR_ 5923 days ago | link

It's in ruby too. Something that works nice if you're writing models using the gillespie algorithm (as I happen to be ;).

-----

1 point by hilbertastro 5923 days ago | link | parent | on: a defense of arc

Actually, Java isn't terribly slow. Plus the JVM is a handy platform on which to build higher-level languages (e.g., Scala and Clojure). Not that I'm a fan of course ;-)

-----

4 points by etal 5923 days ago | link

Exactly. These days Java can be used for high-performance computing, but in the '90s -- coincidentally, the peak of its hype -- it was enough of a CPU and memory hog to make C++ programmers spit. I saw a paper from around 2000 discussing it, and it unfavorably compared the JVM to Python's relatively lightweight runtime. These days Java actually gets pretty close to C++ in speed, but we still think of it as "not terribly slow."

-----

1 point by hilbertastro 5923 days ago | link | parent | on: EQ, EQL, EQUAL, ...?

I usually don't directly compare strings for (character-wise) equality; I search for substrings or regexes, parse out data of another type, or compare modulo case. Strings are just sequences to me; I don't have a reason to process them differently than any other kind of sequence, unless I'm working in C and have to use strings as a hacked-up replacement for symbols. That being said, other languages have chosen to make strings a "value type" (e.g., C++'s std::string).

Thanks for clarifying! From what I've read on CL over the past 3-4 years, EQ/EQL/EQUAL seems to be one of the outstanding issues. (People also complain about the lack of extensible sequences (though some implementations may offer this) and a few things about CLOS. Well, they complain about _everything_ but usually don't offer to fix anything ;-) .)

-----