Arc Forumnew | comments | leaders | submitlogin
Hackinator update
2 points by aw 5650 days ago | 4 comments
I removed some libraries dependencies, so I think the hackinator (http://awwx.ws/hackinator) should now "just work" on Mac OSX without anything else needing to be installed. If someone who has a Mac could try it out and let me know, that would be great.

I'm also trying out loading Scheme modules. If you have a hack with a ".ss" extension, it will be loaded as a module with (require (file ...)). As an example, here's a copy of akkartik's port of the Scheme JSON parser:

  $ hack ycombinator.com/arc/arc3.1.tar \
      awwx.ws/ac0.hack \
      awwx.ws/akkartik/json0.hack
  /tmp/yfdts7XZW_
  ycombinator.com/arc/arc3.1.tar
  awwx.ws/ac0.hack
  ac0.patch
  ac0.arc
  awwx.ws/akkartik/json0.hack
  packrat0.ss
  json0.ss
  json0.arc
  mzscheme -m -f as.scm
  Use (quit) to quit, (tl) to return here after an interrupt.
  arc> (fromstring "[1,2,3]" (json-read (stdin)))
  (1 2 3)
but what's awkward about this is that I say that if you publish a new version of a patch or library you should use a new URL (like "foo-3.1.0.arc"); but MzScheme requires that a module have the same name as the name of the file that it's implemented in. This means that to publish a new version of a scheme module, you'd need to go in and change the module name. So I'm not sure if this is the right approach.


1 point by akkartik 5650 days ago | link

Worked out of the box on Snow Leopard, with one wrinkle.

When I tried it out it would load all the hacks and emit the command, but not run it.

The default mzscheme location in OSX has spaces: /Applications/PLT\ Scheme\ v4.2.2/bin/mzscheme but exec on that runs nothing and gives no error. Turns out spaces need to be escaped inside $mzscheme.

I reset that config variable and it worked. (mzscheme as already in my path).

-----

1 point by aw 5650 days ago | link

OK, I put in a fix for that. Does it work now in OSX if you explicitly set the mzscheme location to a path that contains spaces?

-----

1 point by akkartik 5650 days ago | link

Works, thanks!

-----

1 point by akkartik 5650 days ago | link

Nice! Maybe look inside each file for a module declaration and save as appropriate filename in the cache?

-----