I just had a look at the source code for the previous post, and boy is it… less than pretty. I should relearn all that css/html/js and savagely optimise this blog.
*adds another entry to Someday/Maybe/Never list*
Friday, 12 June 2009
Thursday, 11 June 2009
(Mandatory) Hello World!
I'm alive!
(*1*) val a = "ZOMG I'M ALIVE!";
(*2*) a;
(*1*) fun helloWorld() = "ZOMG I'M ALIVE!";
(*2*) helloWorld();
How To Install Standard ML On OS X
If you are an OS X user, the most convenient way to install Standard ML is to install MacPorts. Once you have MacPorts up and running, you have the choice of installing Moscow ML, Poly/ML or Standard ML of New Jersey.
I really don't know which one is "better", not because "they all have their own strengths and weaknesses", but because I am a clueless newbie.
But as a clueless newbie here is one of the first differences between these three implementations that I ran into.
Using Pi.
Yes, you could
- type it in by hand
- have your ML system calculate it for you
- or use the default value that comes with your ML.
Here's how you'd access Pi on Moscow ML:
Oh:~ noes$ mosmlNext up, Poly/ML!
Moscow ML version 2.01 (January 2004)
Enter `quit();' to quit.
- Math.pi;
! Toplevel input:
! Math.pi;
! ^^^^^^^
! Cannot access unit Math before it has been loaded.
- load "Math";
> val it = () : unit
- Math.pi;
> val it = 3.14159265359 : real
Om:~ nomnom$ poly… and Poly soundly trounces Moscow*! What a high bar for SML/NJ! Let's see what she can do:
Poly/ML 5.2 Release
> Math.pi;
val it = 3.141592654 : Real.Math.real
Pinku:~ bentobox$ smlMy conservative opinion is that in the long run
Standard ML of New Jersey v110.68 [built: Mon Feb 23 23:22:21 2009]
- Math.pi;
[autoloading]
[library $SMLNJ-BASIS/basis.cm is stable]
[autoloading done]
val it = 3.14159265359 : real
*in terms of convenience
Subscribe to:
Posts (Atom)