Better HN
topnewbestaskshowjobs
Log inSign up

ejbs2

82 karma · joined Apr 28, 2016 (10y ago) · 9 submissions

Submissions

comment 10y ago · link · parent

The treap, aka what people should learn instead of red black trees (because they're a lot simpler with similar performance).

comment 10y ago · link · parent

How are fingerprint's supposed to be generated? Just another hash?

comment 10y ago · link · parent

Hey man, writing bindings for Vacietis so you can call clx as XLib right now :)

4.

New Common Lisp website(lisp-lang.org ↗)

137 points · by ejbs2 · 10y ago · 53 comments

comment 10y ago · link · parent

That's not really equivalent to what Rebol does or what my stuff does. What do you do when you want to unbind msg? Or when you want to carry around your bindings with you and change them through function calls?

6.

A short response to the Rebol vs Lisp macros article(gist.github.com ↗)

4 points · by ejbs2 · 10y ago · 3 comments

comment 10y ago · link · parent

Meh, not necessarily. Lazy by default gives you a lot of good stuff. We shouldn't assume that macros can't be done better anyway.

comment 10y ago · link · parent

So this was a very interesting post. I would like to note that we can actually do something like definitional scoping in CL too :), but we need to write it ourselves!

We would do this using CLOS and its MOP, more precisely by using the FUNCALLABLE metaclass and having a class with an environment slot, source slot and effective function slot which both would be altered by some convention (USE, COMPOSE and FUNCTION it seems?).

Then you'd SET-FUNCALLABLE-INSTANCE-FUNCTION to a lambda that invalidates the efficient function when source or environment has changed and composes a new function with (compile `(let((,@environment(( ,@source)).

Voila, you now have a type of function that carries with it an environment and its source code.

Now I don't know if this fully satisfies what REDBOL is doing to be honest, because the post talks about "deep walking" and that sounds like code walking, which is a scary place to go to in CL.

EDIT: Yeah, it seems like USE would do a full code walk(?) Code walking really sucks, because you need to recognise the special forms of CL and deal with them appropriately. This doesn't apply if the list of vars used is always passed to USE (just let LET take over binding the lexical environment)

comment 10y ago · link · parent

More like: If possible, then don't define a macro. You should use macros as much as possible.