The best kittens, technology, and video games blog in the world.

Friday, June 29, 2012

Amethyst migrated to github

Feline Royalty by Photography By Shaeree from flickr (CC-NC-ND)

Amethyst was my totally awesome idea for coding Perl with Ruby syntax.

I just moved it to github, fixed a bunch of bugs, added some examples and better command line interface.

It doesn't do anything much more complicated than this:

hello = ["Hello", "world!"]

puts(hello.join(", "))

ary = [2,10,30]
ary2 = ary.map{|x| x*3}

ary.each_with_index{|element, i|
  print("* ", i, " => ", element, "\n")
}

but it's meant to be fun, not useful.

There's some interesting magic inside and if you want to learn to write parsers with Parser::RecDescent it's not the worst place to start.

If someone wants to turn it into a real language (CoffeScript kind of real), go ahead, code any patches you want, and send me pull requests on github.

As I promised, I intend to migrate the rest of my old software to github and clean it up a bit in process.

No comments: