6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today
Set by moderator on 28 July 2015.
03:44 vendethiel joined 04:43 vendethiel- joined 09:30 Ven joined
Ven masak: I remember we talked about streams being monads vs comonads 09:30
revisiting the topic now, I think finite streams are monads, infinite streams comonads. taht's what seems to make sense 09:31
masak aye
similar to how algebras start from 0-ary terms and construct bigger things, whereas coalgebras start from bigger things and destruct downwards 09:32
the whole "codata" thing seems connected to the lazy and potentially infinite
Ven yeah. 09:33
recursion <=> guarded corecursion
masak aye 09:34
Ven since you're here, can you tell me what you think about irclog.perlgeek.de/6macros/2017-03...i_14216221 ? :D 09:35
masak looks
don't know what I think about it 09:37
but there's something similar in S06
under github.com/perl6/specs/blob/master...asiquoting 09:38
the things related to COMPILING::
Ven that's backwards to what I want, from what it seems.
I want the `is injecting` as help to the parser 09:39
(it's been a year or so I last re-read the design documents, too bad they're not up-to-date anymore)
masak they're the closest thing we've got
Ven right. 09:52
of course, `is injecting` would be a bit too "static" for everything people try to do. I still believe it could get us "some way ahead". 09:54
masak *nod*
Ven (is injecting tells the parser "in this one call, these identifiers exist")
our love-hate relationship with eval/melt is actually a bit problematic here. 09:55
masak how so?
Ven in CL, if I call `(defstruct s a b) (def-with-macro a)`, the macro gets 'a as an argument 09:56
that's easily convertible to a quote, and then crafting the identifier "WITH-{name}-SLOTS" is easy.
here, we'd need `is injecting` to have access to its argument (theoretically possible?) and be able to typecheck macro arguments 09:57
actually, I'm wrong, it's a chicken-and-egg problem. 09:58
is injecting can't have access to the arguments, that's an antithesis
and anyway, I only wanted "is injecting" to make stuff available inside the call to the macro. so it's still useless to "make a macro that generates a function or a variable, available after the macro was invoked" 09:59
back to the drawing board. 10:00
I guess "is injecting" is still useful to transform a block passed to a macro (CPS still, anaphoric macros). It ends up, in my mind, being very close to Racket's syntax parameters... 10:03
(sorry for the spam, I'm a bit dumping what I have in mind currently)
masak it's OK 10:08
sorry for not being very swift with replying -- a bit focused on $work ;)
Ven hehe, I should as well..:)