Showing posts with label Snow Leopard. Show all posts
Showing posts with label Snow Leopard. Show all posts

Thursday, January 14, 2010

Running JLang on Snow Leopard

For this new year I started playing with J, a language that I discovered last year –but that I've never found time to play with–, while installing it, I had the problem that I didn't run on Snow Leopard.

After asking on twitter on how to solve this problem, @kaleidic pointed me to this guide, which tells you to modify the Java preferences to run in 32 bit mode. What I didn't liked from that approach is that it seems to modify the general preferences of Java. After some searches I found that there's an option for the java executable -d32, that makes it run in 32 bits.

To apply this option simply go to the place where you installed J and there edit bin/jwd.

In that file you will find a line like this:

java -Xss8000000 -Xdock:name=J -Xdock:icon=bin/icons/jred.icns -jar bin/j.jar "$@"

which you have to modify to:

java -d32 -Xss8000000 -Xdock:name=J -Xdock:icon=bin/icons/jred.icns -jar bin/j.jar "$@"

And that's it, then simply double click on the J icon and it should work as expected.

NOTE: The line breaks that you see in the execution code are inserted by blogger, as you'll see on the jwd file, there are no line breaks there.

Tuesday, September 1, 2009

Running Haskell GHC on Snow Leopard

***UPDATE 2009/03/23***

There's a new version of the Haskell platform that works with Snow Leopard. If you install that then you shouldn't need to use the tip explained here. Please comment if it works for you

http://hackage.haskell.org/platform/mac.html

***UPDATE 2009/03/23***

After so much time spent trying to get a working GHC in my Mac with Snow Leopard I could arrive to the solution. Here it is, pretty simple:

1 - Download Haskell Platform for Mac: http://hackage.haskell.org/platform/
2 - Install GHC and the Haskell Platform that are inside the .dmg.
3 - Patch your ghc compiler to produce 32 bits code adding the following options:
-optc-m32 -opta-m32 -optl-m32
The ghc script that you have to patch is located here: /usr/bin/ghc
Open it with your favorite text editor and add those options. This at least will let you install new packages and compile your code with no problems until the Haskell team release a new version of GHC for mac.
Most of the tricks for this I got them from here: http://www.nabble.com/Snow-Leopard-Breaks-GHC-td25198347.html