Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2015-10-15

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

All times shown according to UTC.

Time Nick Message
01:48 ilbot3 joined #6macros
04:16 vendethiel joined #6macros
06:47 Ven joined #6macros
06:54 Ven_ joined #6macros
07:11 Ven joined #6macros
07:14 FROGGS joined #6macros
07:21 Ven_ joined #6macros
08:50 Ven joined #6macros
11:12 Ven joined #6macros
11:56 Ven joined #6macros
12:25 Ven masak: wanted to ask – what do you think about dynamically scoped variables in perl 6?
12:25 Ven I Think we talked about this a bit at SPW
12:30 masak I kind of like them. I don't use them a lot.
12:31 masak I find them a bit hard to use. not technically, but the code gets harder to understand from them.
12:32 masak I think what finally won me over to contextual variables was TimToady's (offhand) comment that when you're a parser, the things that are lexically scoped at runtime tend to be dynamically scoped at parse time
12:32 masak that's just like... whoa
12:33 Ven oh, that's interesting
12:33 Ven I have a problem with them
12:33 Ven the name is unscoped.
12:40 masak yes.
12:40 masak I've thought of that sometimes.
12:40 masak they don't buy into any namespace mechanism at all.
12:40 Ven I think scheme/racket/clojure's solution
12:41 Ven where the name is statically scoped (to packages), but the value itself is dynscoped
12:41 Ven is much, much, much better, and actually scalable
12:41 masak that makes sense, yes.
12:42 Ven (binding ((foo-bar/debug true)) (foo-bar/do-stuff))
12:42 Ven I don't really like Perl 6's module system...
12:43 Ven I don't like flattening, I don't like modules, and I don't like a[0] =:= a unless Positional
12:43 Ven that's pretty much the "less awesome" features in *my* list
12:45 Ven mmh.
12:46 Ven I don't think I can push the namespaced-dynamics issue though
12:46 Ven it seems to be too late
13:02 masak yeah
13:02 masak though I guess you could provide a safer variant as a module :)
13:04 Ven that'd be very hard, though
13:15 masak Ven: I'm curious what you think about the design of https://github.com/masak/007/issues/30
13:15 masak (as a way to get back to the topic, ish, of the channel) :)
13:15 * Ven reads up
13:16 Ven I like it
13:16 Ven as I said, I'm not sure if {{{Q::Infix: foo}} or the other way around would be the est
13:16 Ven best*
13:17 Ven I also thought about using `@`, reminescent of as-patterns
13:19 masak could you show that as an entire chunk of syntax?
13:20 masak re which way around: I find them to be equally good, so I chose {{{foo: Q::Infix}}} for strange consistency with type annotations
13:21 masak (which these are not, but might as well look like)
14:12 Ven joined #6macros
14:13 Ven foo MyStruct(a, b, c)@x = ...
14:14 masak what does the `foo` do in that example?
14:23 Ven it's the name of the function
14:24 Ven "add (a, b) = a + b"
14:24 Ven ml style function definition
14:24 Ven as-pattern allows destructuring while keeping the original value
14:24 masak ah, ok
14:25 masak well, the unquote is not really a definition site. it's a usage site.
14:25 Ven that I agree with
14:26 Ven I meant more like, "TypeName()@BoundVariable" look
14:31 masak does Haskell (or others) use `@` on the call side? I've only seen it in definitions, I think...
14:48 Ven no
15:16 FROGGS joined #6macros
15:25 masak then I don't think it's all that applicable, and I still like the type annotation-like syntax more :)
15:26 masak stray idea: maybe macro invocations inside quasis shouldn't expand until splice time
15:27 masak in fact, an argument could be made that they *can't* trigger before that (since the macro arguments may contain unquotes)
15:27 masak huh. dunno why that hasn't been obvious to me before.
15:27 masak anyway, that makes macros a whole lot more powerful, I think. means you can recurse them, as long as you do it inside quasis.
15:56 masak I'm about to get on a long-haul flight, so I won't be so communicative for the next 36 h or so.
16:18 Ven joined #6macros
16:21 Ven I just think the colon is overused, again

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