pixie-lang/pixie — pull request #29 by heyLu (2014-11-02 13:35:37+00:00)
Title: More stdlib improvements

This is quite a lot of stuff, mainly because I didn't have internet access while writing this...

* `abs`
* `quot` and `rem`
* comparisons involving Ratios

BTW, did you add all four comparisons to be able to do "native" comparisons for `Integers and Floats or was there some other reason?

For Ratios I've just implemented `-lt` and based the others off of that.
* quite a few predicates: see [these][1] [commits][2] for that
* implemented `IIndexed` and `ICounted` on Ranges
* Keywords as functions

Additionally, there are two maybe "controversial" changes in here:

* `-str` on collections doesn't print commas any more (except between map entries)

I'm not sure why you implemented it that way, but I like the "lispy" way (without commas) more. (Come to think of it, maybe you wanted `-repr` to print it without commas?)
* `instance?` is now `satisfies?` and the new `instance?` allows checking the class of objects

You used `proto.satisfies` to implement `instance?`, so I think it's ok, but maybe you didn't want both of these?
* Types can now have an optional parent type, to allow things like `(instance? Number x)`

Sorry that this is so much in one pull-request. If you want I can split it up further.

[1]: https://github.com/heyLu/pixie/commit/62773438ace48eb0791f198d4631adb2cd358600
[2]: https://github.com/heyLu/pixie/commit/6d35cbab58695bbb4f2fe3efef698f7d28fbf652