Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2015-07-01

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:29 vendethiel joined #6macros
01:14 vendethiel joined #6macros
02:07 vendethiel joined #6macros
05:18 vendethiel joined #6macros
05:24 vendethiel joined #6macros
06:14 vendethiel joined #6macros
06:37 vendethiel joined #6macros
06:56 Ven joined #6macros
07:16 vendethiel joined #6macros
07:17 Ven joined #6macros
07:22 * Ven backlogs
08:04 masak today's question for pondering/discussion: how should Q::Class look?
08:08 masak a lot of info "hangs off of" this type of Qtree node.
08:08 masak just yesterday I was made aware of `hides`, for example.
08:08 Ven yeah, I saw that in the backlog.
08:09 Ven that's why I kinda want to leave the main use cases to the MOP
08:09 Ven for stuff like "monitor"...should that be a Q::Class?
08:10 masak "leave the main use cases to the MOP" is a valid answer, I think
08:10 masak but it also feels like retreating a little
08:10 masak does a pure Perl 6 code parser need to have a MOP? should it?
08:10 masak good quesiton about `monitor`. I don't know offhand.
08:13 Ven I mean, a macro should offer some capabilities for sure.
08:14 Ven it should probably have a "is" fields? and some attributes? and a methods one?
08:14 Ven what does this look like, AST-wise?
08:14 Ven class A { method b { method c { 3 } }; } ?
08:15 Ven if we still stay on the same "it's all syntactic" track, it should simply have a method nested in another one
08:15 Ven but this would surprise people
08:15 masak you would ask the class what methods it has.
08:15 masak it would find them regardless of nesting depth.
08:15 masak (but it wouldn't find, say, the methods in nested classes)
08:16 masak that kind of thing is what I'm after. basically providing good ways to find things the way a human thinks about the code.
08:21 Ven well, then it's more than "just syntactic"
08:21 Ven and you're messing with the MOP
08:21 * Ven would like TimToady / jnthn's input
08:21 Ven (s)
08:21 masak not sure about "messing with"
08:22 masak more like overlapping concerns
08:22 masak whether that's problematic or not, I don't know
08:22 Ven yes, sorry.
08:22 Ven WELL. the question. the big question
08:22 Ven can we make both Work Together™?
08:22 masak aye
08:23 Ven that'd be a killer feature
08:23 masak aye
08:23 Ven but that might be too much to ask for
08:23 masak dunno
08:23 Ven I thought you might be interested by something
08:23 Ven it's some crystal
08:23 Ven lemme find it again...
08:23 masak you raise a good point -- can we make them work together?
08:23 masak I hadn't really thought of Qtrees "messing with the MOP". but I guess they do.
08:24 masak I don't necessarily see that the converse is true.
08:24 Ven https://gist.github.com/bcardiff/a663b1ea1e8fd6a308cc
08:24 Ven dumping crystal AST nodes by monkey-patching a macro inside of Crystal::ASTNode
08:27 Ven no, indeed, the MOP doesn't need to "see" the tree
08:28 masak sorry, I'm a bit tied up in a meeting, actually
08:28 masak I'll look at the gist later :)
08:28 masak so if Qtree has an implicit connection with the MOP, what's supposed to happen if the Qtree induces a change on the MOP after the MOP already changed independently through some other means?
08:29 masak feels like it becomes a question about "who owns the data", as it often does
08:38 Ven alrigt
08:38 Ven ht*
08:43 Ven I still stand by the fact I'd like some input from TimToady and jnthn, though...
08:49 masak yes, sure. me too.
08:50 masak in some sense, we have to face this problem, I think.
08:50 masak because the Qtree is meant to be a read/write representation of the program.
08:50 Ven yeaaah.
08:50 Ven "but"
08:51 Ven there's an insane amount of clash
08:51 masak nodnod
08:51 masak something we need to address, for sure
08:52 masak I still feel like even though there's a lot of overlap, Qtree and MOP still fill very different purposes
08:53 masak maybe some sensible restrictions have to be drawn up. like "you can't change this Q::Class object, because the '}' of the class has already been seen and the MOP metaobject has already been released into the world"
09:23 Ven yeah...
09:23 Ven also...
09:23 Ven it's fighting that "macros are syntactic" barrier
09:23 Ven maybe we should just tell people to run their MOP code in BEGIN blocks, and that they don't actually need macros for that
09:23 Ven ....which very well might make sense
09:23 Ven we should ask for someone's use case
09:38 masak I know some use cases.
09:39 masak "autogenerate some methods with these names and these bodies" is a common one.
09:39 masak that would likely happen inside of the class block, though
09:40 Ven yeah, but, you can mostly do that with the MOP
09:40 Ven .oO( BEGIN EVAL ) :P
09:40 masak not with clean syntax, is the point.
09:40 Ven right, right, yes
09:40 masak people want to be able to `mymethod foo;` and that's it
09:43 masak walk &
10:53 Ven joined #6macros
10:56 Ven_ joined #6macros
11:19 Ven joined #6macros
11:21 * Ven is back
11:25 * masak too
11:30 * masak checks if he has a post about "Qtree/MOP overlap" queued up on his list
11:34 masak ...I do now. :)
11:42 masak hey, maybe total hygiene is the wrong default for Perl 6 macros?
11:43 masak people keep doing `quasi { sub foo() { ... } }`, and then expecting the sub &foo to have been declared in the mainline.
11:43 masak actually, that seems a very common use case for macros.
11:44 masak so maybe hygiene should be *off* by default (eliminating some heavy realiance on COMPILING::)
11:44 masak but people should be encouraged to think about when they can introduce blocks to avoid collisions
11:44 masak ...maybe? I dunno
14:55 ilbot3 joined #6macros
14:55 Topic for #6macros is now 6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today
15:07 vendethiel joined #6macros
16:10 Ven joined #6macros
16:32 Ven joined #6macros
17:05 vendethiel joined #6macros
20:41 vendethiel- joined #6macros

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary