Archive for May, 2010

New Psh Instructions

Saturday, May 29th, 2010

Among other minor things, I’ve recently added a few new instructions to Psh, including those for the new Input stack. Here’s a list of the additions:

integer.abs
integer.neg
float.abs
float.neg
float.sin
float.cos
float.tan
boolean.and
boolean.or
boolean.xor
boolean.not
input.inall
input.inallrev
input.index
input.stackdepth
input.makeinputs#

Clojush subst subst

Wednesday, May 26th, 2010

The 20100526 update to clojush incorporates this change:

20100526: - Reimplemented subst to use clojure.walk/postwalk-replace. Also
            fixed comment, which described args backwards. (The behavior
            was correct, emulating Common Lisp subst.)

Clojush random integer fix

Sunday, May 2nd, 2010

The 20100502 update to clojush adds a fix for calls to the random integer generator with bignum arguments, which would previously cause an error. They’re still not handled in the best possible way (which would be to return integers in the full specified range, even when the argument is a bignum), but at least they don’t cause errors. More specifically, in the update but arguments greater than 2^31-1 are treated as if they were 2^31-1 (2147483647).