Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sweet. I tried doing a similar experiment targeting C++ years ago but never finished it.

Nicely done! How far along is it? Writing Perl-ish code that targets the JVM seems inspired to me.

Object oriented? Can write threaded code and all that? (there's been a number of times where Perl's shortcomings in those areas have prevented me from building better code).



It's not OO but you can roll your own. See: http://sleep.dashnine.org/manual/functions.html#3

It does threading using a fork(&function) abstraction. You can pass an initial set of variables to share but otherwise it's shared nothing. The fork returns an I/O handle which you can use to communicate values back and forth (even serialized objects). You can also wait(fork(&function)) to get a return value when the thread finishes.

The Manual, covers the whole language: http://sleep.dashnine.org/manual/

An article talking about some of the fun things to do with continuations: http://today.java.net/pub/a/today/2008/07/24/fun-with-contin...

Blog with Sleep examples: http://www.jroller.com/sleepsnip/feed/entries/rss

There is also a web app server for it. http://www.hick.org/~raffi/moconti.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: