2 ms·
I realize I should also point out what the regexp is doing, since it's pretty simple and it's the meat of the recipe. It starts off by looking for the open par
by idm 17y ago
I realize I should also point out what the regexp is doing, since it's pretty simple and it's the meat of the recipe.
It starts off by looking for the open paren that is the beginning of any LISP expression.
Next, it looks for an assignment statement. LISPs use prefix notation, so the function comes before the arguments. Contrast with infix syntax, which would put the assignment operator between its arguments (i.e. = a 2 versus a = 2).
Last, it looks for a string of characters that are followed by -threshold, which is the naming convention used by pg for variables that store threshold data.
- mahmud 17y agoNever has a Lisp used = for assignment. It's always a variant of "set". Here is a page with various call-graphs for new.arc along with visualization tools: http://arclanguage.org/item?id=8876 http://arclanguage.org/item?id=8876 [Edit: Whoever downvoting me, could you please contribute a pointer to a Lisp that uses '=' as assignment other than Arc?]
- idm 17y agoYeah, but arc nevertheless is a Lisp, and for whatever reason, news.arc is certainly using '=' to perform assignment.