Sleep 2.1 update 2

7 views
Skip to first unread message

Raphael Mudge

unread,
Aug 5, 2008, 11:40:08 AM8/5/08
to sleep-de...@googlegroups.com
Hello all,
I've released another update to Sleep 2.1. This comes hot on the
heels of my experience prototyping http://kindling.dashnine.org/

Here is what's new:

- import from now modifies the system classpath (thanks to Ralph
Becker's hack); you can do an import * from: whatever.jar to bring
any jar file into the classpath and the other jars will be able to
use it. No more mucking with the command line (if desired)

- map, reduce, etc.. and foreach now support Java iterators. A java
iterator passed to these will be wrapped in a proxy iterator that
performs the Java to Sleep scalar conversion for each item. i.e.:

$list = [new LinkedList];
# add stuff to $list

foreach $item ([$list iterator])
{
# ...
}

- include(...) now sets the $__INCLUDE__ variable to the path it
received prior to executing the included code. This is very useful
if you're writing modules meant for include(...) later. Here is the
pattern to use in your module (named module):

global('$module_path');
$module_path = $__INCLUDE__;

$resource = getFileProper($module_path, "some resource");
# do something with a resource

- Fixed a bug that was breaking taint mode when reading in serialized
hash objects
- Foreach now skips over $null keys when iterating over hashes
- Hacked <=> to morph Sleep double's into a BigDecimal object (what
about <, >, etc.. :) no idea... just wanted to make <=> work)
- Foreach now reports undeclared key/value variables when strict mode
is enabled
- &local, &global, and &this complain about malformed input

- Sleep no longer manages restoration of old functions when unloading
a script. By this, i mean Sleep used to track which scripts owned
which subroutines and as scripts were unloaded Sleep would restore
the old state. It is possible for a bridge writer to build-in this
behavior themselves. Sleep used to do this which could lead to an
unintentional memory leak for an app that shares an environment
amongst multiple script instances that come and go very quickly (as
is the case in Moconti). This is something to be aware of, it
shouldn't affect how you use Sleep.

As usual, you can grab the release at http://sleep.dashnine.org/

-- Raphael

eching

unread,
Aug 7, 2008, 12:46:09 AM8/7/08
to Sleep Developers
Cool, I'll be downloading this.

I use sleep on AS/400 and OS/390 and other odd-ball systems (well odd
to me), primarily as a bridge for WebSphere MQ (via java MQI). What
is cool about sleep is how small it is. I've run into issues just
getting jruby to run on some of these platforms, but sleep is a
breeze! Thanks for all your work!

On Aug 5, 10:40 am, Raphael Mudge <rsmu...@gmail.com> wrote:
> Hello all,
> I've released another update to Sleep 2.1.  This comes hot on the  
> heels of my experience prototypinghttp://kindling.dashnine.org/
Reply all
Reply to author
Forward
0 new messages