http://github.com/akkartik/arc Could y'all run your client code on it and tell me what stuff from your repos or anarki you find yourself missing? I want to leverage everything people have submitted to this forum and to anarki over 5 years, but only tricks and helpers you actually use. == What it has right now 0. rntz's extensible coerce. 1. aw's $. 2. Generics. I've tried to use generics everywhere in arc.arc that I can[1]. An interesting consequence of this: defgeneric now dispatches on its _final_ arg. This allows me to simplify some, keep, rem, any.[2] 3. Lists no longer end with nil. You can still say nil but it basically means (). I've been using this for months without issues - you just see () at the repl instead of nil. The major incompatibility this introduces is that () is no longer a symbol, which in turn gets rid of the bug around downcase (http://arclanguage.org/item?id=10793) and fixes upcase differently than pg did. I wasn't sure what type to make (), and left it at (). In both lisp and scheme the type of nil is a specialcase. Since () isn't a cons, (coerce () 'cons) now actually returns a non-cons. I'm more uncertain about this, so let me know if it feels like a gotcha. While I was building defgeneric I ran into an infinite loop repeatedly trying to coerce () to cons. [1] Basically I went through looking for "(if (alist" as a marker for ugly function implementations that try to specialcase string processing. [2] I'd like to make map generic but it's a weird case. It takes a variable list of args, but not all of them are sequences. Looking at the code it seems there's only one case where we actually use this 'feature' - in the definition of rotate. I'm mulling turning map1 into map. Thoughts? Reactions? Howls of outrage? |