(mac $ body
" Allows access to the underlying Scheme. "
(list 'seval (cons 'quasiquote body)))
In other words, it generates a literal list containing 'quasiquote; when this is evaluated, it looks like (seval (quasiquote body0 body1 ... bodyN)). This technique is perfectly valid Arc2.
macros are pretty good for language-type thingies since they let you parse the raw input. this could be done as an interface layer on top of the actual mechanisms so you could write things like:
perhaps we can make an 'official' branch on anarki, one that would be guided by pg. so that if he says "add forward closures" or "implement a basic math library" the anarkists can go ahead and do that. because a lot of these features aren't exactly simple or quick to implement, so it may be better to just let pg be the overseer on a lot of them
No, there is not an 'official' one on anarky - that's the point. The only official one is Arc2.tar, and I wouldn't expect the next release anytime soon.
That's a good idea, and I think that will eventually be how it will work. But I think it's too early for that : obviously, he wants to completely design & implement the core functions (alone) before working (and let other work) on libraries.
funny, i was thinking about something like this today. manually downloading/installing libraries is annoying for the programmer, and when they want to release their program they have to either package the libraries or tell people they have to download additional things
instead, it would be nice if the libraries were automatically downloaded the first time they are encountered, so that the programmer could just distribute their file(s)
linux does packaging thingies now... though i haven't used linux in a few years so i dunno how it works. we can allow the programmer to not only specify a library, but also a hash to make sure it's the precise desired file
i'd say just take it easy. no need to hurry or anything
here's something from my experiences: a few times i have released things, and not responded to questions/comments about them for some time. not because i didn't care, but actually because i cared too much. to the people, those things were interesting curiousities, but to me they were things that my reputation was attached to. and so i felt that my statements, responses, and actions had to be well-calculated. and i had to consider the things themselves, which even by their lonesome were no walks in the park. it was somewhat daunting, which led to procrastination
this is a function that takes a mininum of 2 arguments. when called, the extra arguments are combined into a list and bound to c
for full variadic functions, you can just leave off the parens:
(def sqnl args
(map [* _ _] args))
a really nifty thing is that the arguments are automatically destructured (dunno if that's the term.) for example, say you are using lists of two elements to represent points on a coordinate plane:
(= p1 (list 30 50)
p2 (list 20 80))
and say you want to make a function that multiplies the points by a scalar. you can do it like this:
(def scale (point s)
(list (* s (car point))
(* s (cadr point))))
so you're explicitly accessing the first (car) and second (cadr) parts of the list. but you can have the work done for you like so: