|
12:03
lucasb joined
14:10
Ven`` joined
|
|||
| Ven`` | masak: you understand the question clearly. The interesting distinction is not actually invoke or define, it's: is foo a macro or a function? | 14:12 | |
| in one case, this kind of code makes sense, in the other case, it doesn't | |||
| masak | hmmm | 14:14 | |
| I'll need to run this through the analytical parts of my brain, but this sure seems related to the "`return` is lexical" vs "`return` is late-bound" discussion that we've had | |||
| Ven`` | yes, for sure :) | 14:15 | |
| did you push any version of the pseudo-code we wrote for the walker? | 14:16 | ||
| well, and we need to finish that discussion someday... | |||
| masak | aye, it's in a branch | ||
| github.com/masak/007/tree/masak/succinct | 14:21 | ||
| Ven`` | ? | 14:28 | |
| I don't see the pseudo-007 code | |||
| masak | oh! I believe I closed that one, but I can recreate it if you want | 14:29 | |
| it was only a few lines | |||
| Ven`` | (defsuccint f (a b) | 14:44 | |
| (let ((tmp a)) | |||
| (setq a b) | |||
| (setq b tmp))) | |||
| does that seem Good Enoughā¢ļø to try and make work? | 14:45 | ||
| masak | yes, that captures it, methinks | 14:49 | |
| note that we still don't have locations in 007/Alma, and we can't get @succinct to be entirely correct before we do | 14:50 | ||
| and I still don't consider the whole theory of how @succinct interacts with data flow to be Fully Worked Out | |||
| Ven`` | (installation of the name `f` here is gonna be without any regards to hygiene because I don't think it matters) | ||
| masak | right | 14:52 | |
| Ven`` | wow, it's really interesting. as I suspected, phase separation is an issue | 15:00 | |
| well, makes this non-obvious | 15:02 | ||
| ...and once again, the ',' pattern surfaces... | 15:06 | ||
| well, ', is pretty much what 007 does for you | 15:07 | ||
| ',x is "bring x to this phase level, but re-quote it because I need it quoted" | |||
| masak | I did not fully understand that latter part | 15:08 | |
| (and I suspect it's related to what I didn't understand when we talked about it last week) | 15:13 | ||
| Ven`` | OK, example: | ||
| > (let ((a (list 1 2 3))) `(loop for i in ,a sum i)) | |||
| (LOOP FOR I IN (1 2 3) SUM I) | |||
| the " ,a " did bring "a" from the "outer context" to " `'s context" | 15:14 | ||
| but now since it's not quoted anymore, the code here doesn't work: (1 2 3) is an invalid funcall | |||
| compare with: | 15:15 | ||
| > (let ((a (list 1 2 3))) `(loop for i in ',a sum i)) | |||
| (LOOP FOR I IN '(1 2 3) SUM I) | |||
| now that's legal | |||
| masak | nodnod | ||
| Ven`` | but here it's *really important* that we use ' | 15:17 | |
| > (let ((a (list 1 2 3))) `(loop for i in `,a sum i)) | |||
| (LOOP FOR I IN `,A SUM I) | |||
| we do not have quoting in 007 | |||
| `quote { {{{ a }}} };` would just generate Q::Unquote(...); | 15:18 | ||
| it makes sense to have unquotes inside of a quote | |||
| here, that's pretty much what I figured out since we last talked. | |||
| masak | I need to come back and re-read all this when I have more brainpower | 15:19 | |
| "we do not have quoting in 007" -- I need to understand this better. I take it you don't see a quote then as just a quasiquote with zero unquotes? | 15:20 | ||
| Ven`` | ok -- no real quoting. We can't have a non-interpreted quote. | 15:21 | |
| which would be the only place where an unquoted would make sense. Like here in lisp | 15:22 | ||
| masak | we have things like `new Q.Identifier { name: "foo" }` :) | 15:24 | |
| Ven`` | yeah hygiene means it's more complex in 007 | 15:33 | |
|
15:43
Ven`` left
|
|||