»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:02 MayDaniel left 00:04 ChoHag left 00:08 jaldhar_ left 00:10 dayangkun joined 00:12 ChoHag joined, havenn left 00:13 havenn joined, kurahaupo left 00:15 havenn_ joined, havenn left, jaldhar_ joined 00:17 havenn joined 00:20 havenn_ left, fgomez joined 00:26 havenn left 00:30 Khisanth joined, Chillance left 00:35 plobsing joined 00:42 sudokode left 00:48 stocks joined 00:55 anuby joined 01:03 bowtie left 01:09 hypolin joined 01:42 leont left 02:08 meilin joined 02:13 dayangkun left
meilin ? 02:19
02:20 meilin left 02:23 skids joined 03:00 larks left 03:02 larks joined 03:12 orafu left, orafu joined 03:16 topo` left 03:25 dayangkun joined 03:26 tokuhiro_ left, tokuhiro_ joined 03:31 tokuhiro_ left 03:38 larks left, larks joined 03:39 meilin joined 03:40 meilin left 03:45 havenn joined 03:47 havenn left 03:48 havenn joined 03:52 havenn left 04:02 [particle]1 joined 04:04 [particle] left 04:08 gootle joined 04:29 stocks left 04:36 havenn joined 04:47 chinese_man joined 04:48 chinese_man left 05:05 kaleem joined 05:24 CharellKing joined
CharellKing which browser are you using? 05:24
sorear chrome and elinks 05:26
05:33 telex left 05:39 telex joined 05:41 sudokode joined 05:44 meilin joined 05:45 kaleem_ joined 05:46 kaleem left 05:47 birdwindupbird joined 05:55 grondilu left 06:02 benabik joined, wk left 06:09 meilin left 06:10 CharellKing left 06:18 minmax joined, wtw left
minmax moritz: ping 06:20
moritz minmax: pong 06:24
jnthn: iirc FROGGS volunteered for the next rakudo release
minmax moritz: is there a way to run perl6 expressions in a REPL via a webservice?
06:25 minmax is now known as azawawi
azawawi :) 06:25
or better use the local perl6 REPL 06:26
06:26 meilin joined
azawawi basically i want to put a perl6 REPL inside farabi6 :) 06:26
moritz azawawi: try.rakudo.org contains some code that does that 06:27
azawawi im actually looking at it... github.com/moritz/try.rakudo.org/b...-rakudo.pl
sjohnson hi 06:28
azawawi breakfast &
moritz: thanks :)
cotto general question from Parrotland: I see an old branch from chromatic that implements timely destruction and seem to remember that being something that Rakudo cares about. 06:39
Does Rakudo care about this, and if so what's a good way to test that it does what Rakudo needs?
sorear how timely is it, and how fast is it? 06:40
running a full mark/sweep cycle every time a variable is set is not something Rakudo wants 06:41
cotto github.com/parrot/parrot/compare/m...rly_pmc_gc
It's smarter than that, though it assumes that any GCables in need of early destruction will be in the most recent generation.
sorear also it assumes that GCables in need of early destruction will never be referenced from the remembered set 06:43
moritz cotto: rakudo wants that, because otherwise we don't have a way to close files whose handles go out of scope
06:44 wtw joined
moritz my $f = open 'file', :w; $f.say: "some content"; # oops, empty file created, because $f is never closed 06:44
sorear I do not like scope-related file closing; niecza will (may or may not currently) flush files on GC or at program exit, whichever comes first 06:46
I really hope what you just did didn't constitute a binding decision on all p6 implementations 06:47
06:50 wtw left
cotto looks like it requires the previously-useless needs_destroy pir op, which nqp and Rakudo unsurprisingly don't make use of 06:50
moritz sorear: I didn't decide anything. I just want the .close to happen not too late after the scope exit, doesn't need to be immediately 06:54
cotto moritz, isn't that a separate issue? The destructor should get called at some point. 06:56
rt?
moritz cotto: yes, and the sooner the better
06:57 wtw joined
moritz though maybe the main motivation behind that branch was something else; pmichaud probably remembers 06:57
cotto I'll try to catch him. 06:58
sorear moritz: how late is 'too late'? 06:59
07:01 azawawi left 07:02 SamuraiJack joined
moritz sorear: the later the worse 07:32
sorear: if it surprises the user, it's too late 07:33
sorear _anything_ we do will suprise users. 07:36
will surprise somebody, I mean
moritz so the goal is to surprise few people 07:38
07:40 jaldhar_ left
moritz just because we can't achieve perfection doesn't mean we shouldn't try 07:41
07:41 mucker joined
sorear there's a local optimum and beyond that you'll cause people to say "I can't beleive how stupid that implementation is" 07:43
in the general case, detecting a dead file handle requires a major collection 07:44
if the heap is pretty big and a major collection needs 300ms, then to detect and close a file handle within 3 seconds would require spending 10% of CPU time on detecting file handles to close 07:45
assuming a CPU-intensive task
07:58 kurahaupo joined
cotto throws a surprise party, but only for moritz 08:01
08:02 telex left 08:04 telex joined 08:05 brrt joined 08:07 GlitchMr joined 08:13 wk joined
brrt msg [Coke] the fix in parrot was merged, you should be able to build nqp now 08:14
08:15 flightrecorder joined 08:21 domidumont joined, FROGGS joined, am0c joined 08:25 domidumont left 08:27 marloshouse_ left, domidumont joined 08:29 pmichaud_ joined 08:31 CharellKing joined, pmichaud left, havenn left
CharellKing I use opera,chrome,firefox 08:31
Elink maybe be too stupid 08:32
08:33 marloshouse joined, mucker left 08:34 meilin left
moritz \o/ cotto++ 08:35
brrt \o moritz 08:37
moritz o/ brrt
brrt: fwiw in #perl6 you can use phenny to send messages with 'phenny, tell [Coke] ...' 08:38
msg won't work here
brrt ok
i believe he already saw it
judging by the github thread
08:40 fhelmberger joined 08:42 marloshouse left, marloshouse joined 08:44 marloshouse left, marloshouse joined 08:46 marloshouse left 08:47 marloshouse joined 08:53 kurahaupo left 08:54 domidumont left 08:55 domidumont joined 08:58 azawawi joined
azawawi hi 08:58
azawawi reads perl 6 book 09:04
09:07 dayangkun left
jnthn The reliable way to handle stuff that should happen at scope exit in Perl 6 is to have it triggered by LEAVE 09:09
09:16 cognominal joined
CharellKing hi everyone 09:26
azawawi CharellKing: hi 09:27
09:28 grondilu joined
grondilu created rosettacode.org/wiki/SHA-256 09:28
tadzik wow 09:29
arnsholt o/
tadzik \o 09:30
brrt impressive grondilu 09:31
tadzik grondilu: so, is that a module already? :)
jnthn r: my $x = 42; say Q{lol $x!}; say Q:s{lol $x!}; 09:32
p6eval rakudo c45b02: OUTPUT«lol $x!␤lol 42!␤»
grondilu it's more or less what I had written in github.com/grondilu/libdigest-perl6 but it's a bit too messy to submit ot the ecosystem.
brrt likes the pressence of LoL, Cat, and Rat in p6 09:33
although Cat() isn't implemented? 09:34
r: say LoL.new(Rat()).perl 09:35
p6eval rakudo c45b02: OUTPUT«LoL.new(0/1)␤»
jnthn Wow, it even declares an infix to use it in a metaop :)
grondilu++
brrt r: say Cat().perl
p6eval rakudo c45b02: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Cat' called (line 1)␤»
jnthn No Cat yet.
09:37 imarcusthis left 09:39 hoelzro|away is now known as hoelzro 09:44 domidumont left 09:49 woosley left 09:57 domidumont joined 09:59 Woodi left 10:06 imarcusthis joined 10:07 hypolin left 10:11 anuby left
CharellKing It's time to go off work 10:12
ByeBye
10:13 CharellKing left 10:16 SamuraiJack left, SamuraiJack joined, leont joined 10:32 MayDaniel joined 10:34 azawawi left 10:43 MayDaniel left 10:45 dayangkun joined 10:50 rindolf joined 10:58 flightrecorder left 10:59 flightrecorder joined, grondilu left 11:00 fhelmberger left 11:12 hoelzro is now known as hoelzro|away 11:15 brrt left, spider-mario joined 11:19 sorenso joined 11:31 leont left
masak r: macro twice($code) { quasi { {{{$code}}}; {{{$code}}} } }; my $x; BEGIN { $x = 0 }; twice $x++; BEGIN { say $x }; say $x 11:32
p6eval rakudo c45b02: OUTPUT«0␤0␤»
masak hm.
11:33 MayDaniel joined 11:38 cognominal left
arnsholt masak: Is 1830 or so a good time for us to meet in Malmö tonight? 11:41
masak dude, that's like 178 years ago. 11:43
(yes, that time worksforme) 11:44
jnthn wtf too
er, wfm!
jnthn will also arrive by train 11:45
So malmo centralstation is probably a good place to meet
masak aye. 11:46
any plans for tonight?
jnthn Will the plans involve eating something? :) 11:47
masak hopes so 11:52
by longstanding tradition, I usually have a warm meal at that approximate time in the evening. 11:53
jnthn OK, provided arnsholt is up for food too, then I think we can settle on the plan at least involving, "eat something, somewhere". 11:54
That can probably be late-bound... It's not like Malmo has a restaurant shortage :P 11:55
arnsholt Noms will be good
Like masak I have a tradition to uphold ^_^ 11:56
jnthn \o/
masak jnthn: wait... are you suggesting we leave the fate of our finding food for the evening to *chance*? o.O
jnthn masak: Yes, but if past success is a predictor of the future, that's less scary than it sounds :P 11:57
arnsholt It worked out well enough at the hackathon in Copenhagen at least =) 11:58
masak strains to see the complete lack of A Plan as something positive :) 12:00
12:16 brrt joined 12:17 bowtie joined 12:19 sorenso left 12:20 tokuhiro_ joined 12:21 hoelzro|away is now known as hoelzro
masak moritz: (timely destruction) I think I agree with sorear. the only "too late" for closing filehandles is "never". if someone wants the closing of the file to happen at a certain point, that's a good case for doing $f.close 12:21
12:22 sorenso joined
masak or what jnthn said, use LEAVE. 12:23
the notion of having things GC "basically at block exit" (a la refcounting) is counterindicated by the move to many-core computing. this was the theme of an early p6l thread about RAII. 12:25
erm, 182 years ago. 12:26
jnthn No, p6l hasn't been going on that long, even if it feels like it :P
brrt refcounting will cost you at runtime 12:27
masak don't worry, we're not doing refcounting. 12:28
brrt :-)
jnthn Reachability-based GC also costs you at runtime :)
brrt because even in the positive case, you still have to gc to clear cycles, which means you're doing double work
yes
what about cheney-on-the-mta?
i've found that intriguing since forever 12:29
arnsholt I guess if you really need closing on block exit, we could make a using macro
jnthn
.oO( Cheney is visting New York? )
12:30
brrt which cheney, i recall there being many
jnthn I was thinking of Dick :) 12:32
masak arnsholt: 'a using macro'?
jnthn brrt: I thougth the Cheney appraoch was a copying GC scheme... 12:33
brrt it is
basically, iirc
you allocate everything on stack
arnsholt masak: Something like using in Python
brrt you never return from a function (so the stack isn't cleared)
jnthn hah, that's cute...
arnsholt Which does cleanup on block exit
jnthn you use the c stack as...wow, that's disgusting :D 12:34
brrt and when you overflow the stack, you copy everything
doesn't have to be the c stack, can be a stack of your own design as well
jnthn Yeah
brrt i like copying gc, dunno why
its just elegant
jnthn Semispace copying is nice because dead things are basically free
brrt i recall seeing an article on hacker news, which suggested that the copying fase basically consisted of pushing a pointer 12:35
now i implemented one once and it had to copy the whole object
so
who is right?
jnthn Certainly the typical approach is copying the whole object 12:37
That's what the GC handbook describes, anyways. 12:38
brrt good, then i'm not crazy
jnthn I guess you could just keep an "alive list" that points to the actual bodies and just copy the alive things out of that, but it's a level of indirection for everything and probably suffers fragmentation issues...
brrt that is a bit wasteful when you have a large live set compared to the dead set
copying was designed to stop fragmentation 12:39
jnthn Semispace is mostly wasteful 'cus you need twice as much heap as you get to use
brrt (i almost said inhibit, biological mind playing up)
jnthn otoh, you don't have to do it for all the generations :)
brrt thats is basically the other side of it; a copying generational collector would be pretty nice 12:41
[Coke] drinks coffee 12:47
arnsholt brrt: Isn't that sort of how many Lisps do GC? 12:48
brrt it comes from the scheme community, yes 12:49
12:49 am0c left
[Coke] brrt: saw it was fixed. haven't had time to test out partcl-nqp on the latest and greatest yet. 12:53
brrt wonders why it didn't break on non-mac systems 12:54
maybe mac is more aggressive with zeroing
12:59 sqirrel joined 13:00 xinming left 13:04 Psyche^ joined 13:08 Patterner left, Psyche^ is now known as Patterner 13:24 kaleem_ left 13:25 kaleem joined 13:29 [particle]1 is now known as [particle] 13:32 PacoAir joined 13:34 tokuhiro_ left 13:35 tokuhiro_ joined
[Coke] we need a better name for #115540 than "possible rakudo bug". suggestions? 13:38
13:39 tokuhiro_ left 13:40 tokuhiro_ joined
masak [Coke]: "IO::Socket::INET.new times out on multiple .open() calls for the same port" 13:43
(also, it seems a non-bug to me)
jnthn "How is socket formed"
I'm not surprised by the behavior either, fwiw. 13:44
13:44 tokuhiro_ left, plobsing left, tokuhiro_ joined 13:48 kaleem left 13:49 tokuhiro_ left 13:51 kaleem joined 13:57 skids left 14:07 stopbit joined 14:08 flightrecorder left 14:09 hoelzro is now known as hoelzro|away, FROGGS left 14:11 flightrecorder joined, stopbit left 14:12 stopbit joined 14:14 benabik left 14:21 sqirrel left 14:22 gootle left, sorenso left, FROGGS joined 14:28 kaare_ joined 14:39 dayangkun left 14:41 birdwindupbird left 14:46 SamuraiJack left 14:52 Woodi joined 14:53 cognominal joined
dalek kudo/nom: e7ab9ac | masak++ | src/Perl6/Actions.pm:
[Perl6::Actions] refactor

De-duplicated some code. This will help us during the next commit, because we'll be adding more code in that path.
14:56
kudo/nom: 9bb7de6 | masak++ | src/Perl6/Actions.pm:
[Perl6::Actions] wrap macro-arg ASTs in thunks

This causes the macro arguments to correctly carry their lexical environment with them, and so everything inside of them is now correctly, hygienically resolved.
brrt dalek in overdrive 14:57
dalek ast: bfeeefb | masak++ | S06-macros/unquoting.t:
[S06-macros/unquoting.t] unfudge for Rakudo
masak folks, your attention please. 14:58
as of this day, macros in Rakudo are usable.
jnthn \o/
arnsholt =D
jnthn masak++
masak I will demo it for you as soon as p6eval does a recompile.
arnsholt masak++ indeed
jnthn Wow, November release will really rock
masak essentially, 'twice $x++' works now.
the deeper reason being that macro-argument ASTs now correctly carry around their lexical context. 14:59
blog post(s) upcoming.
[Coke] masak++
masak r: macro twice($code) { quasi { {{{$code}}}; {{{$code}}} } }; my $counter = 0; twice $counter++; say $counter 15:00
p6eval rakudo c45b02: OUTPUT«0␤»
masak just one last time wrongly for sentimental reasons :P
Woodi allo everyone :) 15:01
masak I'd like to explicitly thank jnthn, who through all this is a great mentor-ish discussion partner, and who through D2 especially said more than once "hm, wonder if we're not making things overly complex here...". I finally listened to him, and the above solution is indeed very simple.
Woodi! \o/ 15:02
Woodi gz masak++! :)
masak dz :)
PerlJam masak++ (I can't say that enough :) 15:03
masak this concludes the D2 part of the macros grant.
Woodi what's D3 ?
masak (though I'm going to look at a code path unification now)
Woodi: D3 is "implicit hygiene, explicit lack of hygiene".
and D2 essentially already gave us the former for free, so I'll focus on the latter. 15:04
here's the original grant application: news.perlfoundation.org/2011/09/hag...mplem.html
Woodi masak: I have no idea what you talking about but tutorial for macros would be nice :) 15:05
looking
15:05 benabik joined
Woodi D5 is nice :) 15:06
masak haven't need to do much aligning.
though TimToady++'s promise/threat about ¤ is still looming, I guess... :) 15:07
felher masak++ # /me is eagerly awaiting the blog post :)
masak I'm going to make two blog posts.
one regular progress report, the first one in quite a while.
and one TPF halfway report.
15:08 benabik left
masak r: say "updated yet"? 15:08
p6eval rakudo c45b02: OUTPUT«===SORRY!===␤Confused␤at /tmp/gS4lAGHTr8:1␤»
masak nope.
jnthn std: say "updated yet"?
p6eval std edd7715: OUTPUT«===SORRY!===␤Confused at /tmp/k1zq0cc5p4 line 1:␤------> say "updated yet"⏏?␤ expecting any of:␤ POST␤ infix␤ infix or meta-infix␤ infixed function␤ postcircumfix␤ postfix␤ postfix_prefix_meta_operator␤ postop␤
..statement modifi…
masak jnthn: yes, I was confused :)
felher *two* blogposts <3 :)
jnthn Just seeing if STD did any better ;) 15:09
masak probably not a common typo :)
jnthn Aye. The keys aren't right next to each other.
masak fwiw, bohr() still fails in unquotes.t
jnthn How bohring.
Isn't that due to cloning mess-ups?
masak r: macro bohr() { my $q1 = quasi { 6 }; my $q2 = quasi { 6 * 10 }; my $q3 = quasi { 100 + 200 + 300 }; quasi { {{{$q1}}} + {{{$q2}}} + {{{$q3}}} } }; say bohr() 15:10
p6eval rakudo c45b02: OUTPUT«Cannot call 'infix:<+>'; none of these signatures match:␤:($x = { ... })␤:(int $a, int $b)␤:(num $a, num $b)␤:(Int:D \a, Int:D \b)␤:(Num:D \a, Num:D \b)␤:(Rational \a, Rational \b)␤:(Rational \a, Int \b)␤:(Int \a, Rational \b)␤:(Complex:D \a, Complex:D \b)␤:(Instan…
masak the other week we found and fixed some mess-ups having to do with cloning of AST nodes in evaluate_unquotes in the QAST classes in NQP.
but it didn't fix the above, which was connected to some very weird relationship between $q1 and $q2 and the expressions inside of them.
r: macro bohr() { my $q1 = quasi { 6 }; my $q2 = quasi { 6 * 10 }; quasi { {{{$q1}}} + {{{$q2}}} } }; say bohr() 15:11
p6eval rakudo c45b02: OUTPUT«Cannot call 'infix:<+>'; none of these signatures match:␤:($x = { ... })␤:(int $a, int $b)␤:(num $a, num $b)␤:(Int:D \a, Int:D \b)␤:(Num:D \a, Num:D \b)␤:(Rational \a, Rational \b)␤:(Rational \a, Int \b)␤:(Int \a, Rational \b)␤:(Complex:D \a, Complex:D \b)␤:(Instan…
15:13 spider-mario left
jnthn r: macro bohr() { my $q1 = quasi { 6 }; my $q2 = quasi { 6 * 10 }; quasi { {{{say 'x'; $q1}}} + {{{say 'y'; $q2}}} } }; say bohr() 15:15
p6eval rakudo 9bb7de: OUTPUT«x␤y␤Cannot call 'infix:<+>'; none of these signatures match:␤:($x = { ... })␤:(int $a, int $b)␤:(num $a, num $b)␤:(Int:D \a, Int:D \b)␤:(Num:D \a, Num:D \b)␤:(Rational \a, Rational \b)␤:(Rational \a, Int \b)␤:(Int \a, Rational \b)␤:(Complex:D \a, Complex:D \b)␤:(In…
jnthn r: macro bohr() { my $q1 = quasi { say 'badger'; 6 }; my $q2 = quasi { say 'mushroom'; 6 * 10 }; quasi { {{{say 'x'; $q1}}} + {{{say 'y'; $q2}}} } }; say bohr() 15:16
p6eval rakudo 9bb7de: OUTPUT«x␤y␤badger␤mushroom␤Cannot call 'infix:<+>'; none of these signatures match:␤:($x = { ... })␤:(int $a, int $b)␤:(num $a, num $b)␤:(Int:D \a, Int:D \b)␤:(Num:D \a, Num:D \b)␤:(Rational \a, Rational \b)␤:(Rational \a, Int \b)␤:(Int \a, Rational \b)␤:(Complex:D \a, Co…
jnthn hm, odd indeed
15:17 havenn joined
masak r: macro twice($code) { quasi { {{{$code}}}; {{{$code}}} } }; my $counter = 0; twice $counter++; say $counter 15:20
p6eval rakudo 9bb7de: OUTPUT«2␤»
masak \o/
jnthn: yeah, well. it's RT'd.
jnthn hah, I running that under the debugger will be fun :)
"I said next statement...y u no progress?" 15:21
masak r: macro pathological { AST.new }; pathological
p6eval rakudo 9bb7de: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block : Unknown QAST node type Any␤»
masak looks into fixing this bug, too.
15:23 skids joined
[Coke] r: say quasi { say "OH HAI" }; 15:35
p6eval rakudo 9bb7de: OUTPUT«AST.new()␤»
[Coke] r: my $a = quasi { say "OH HAI" }; $a();
p6eval rakudo 9bb7de: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'AST'␤ in at src/gen/BOOTSTRAP.pm:852␤ in any at src/gen/BOOTSTRAP.pm:836␤ in block at /tmp/OQSAtjJjUh:1␤␤»
[Coke] r: my $a = quasi { say "OH HAI" }; $a.(); 15:36
p6eval rakudo 9bb7de: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'AST'␤ in at src/gen/BOOTSTRAP.pm:852␤ in any at src/gen/BOOTSTRAP.pm:836␤ in block at /tmp/Z0bCsv1mJM:1␤␤»
[Coke] r: my $a = quasi { say "OH HAI" }; $a.^methods.say;
p6eval rakudo 9bb7de: OUTPUT«BUILD incarnate evaluate_unquotes is_quasi_ast␤»
[Coke] r: my $a = quasi { say "OH HAI" }; $a.incarnate
p6eval rakudo 9bb7de: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤ in method incarnate at src/gen/CORE.setting:10262␤ in block at /tmp/_pQdLM5U5Z:1␤␤»
masak [Coke]: no, you can't call AST objects. they're tree structures. 15:37
[Coke] r: my $a = quasi { say "OH HAI" }; {{{$a}}};
p6eval rakudo 9bb7de: ( no output )
masak .incarnate is essentially a compiler-internal method, but it's exposed to userland.
[Coke] r: my $a = quasi { say "OH HAI" }; {{{$a}}}();
p6eval rakudo 9bb7de: ( no output )
masak [Coke]: {{{$a}}} doesn't "work" outside of quasi blocks.
it just parses as three nested blocks.
(that's a feature, not a bug) 15:38
jnthn Aye, STD has it that way
In fact, we can even factor it the way STD does now, I imagine.
I think that means we get arbitrary delims :)
[Coke] Can you do anything with $a in that snippet?
masak [Coke]: if you constructed $a in a macro, yes. 15:39
jnthn r: my $a = quasi { say "OH HAI" }; macro foo() { $a }; foo;
[Coke] or: is there a point to quasi outside of macros
p6eval rakudo 9bb7de: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
masak then you could return it from the macro and have it incorporated in your program.
[Coke] ?
jnthn hah :)
r: BEGIN my $a = quasi { say "OH HAI" }; macro foo() { $a }; foo;
p6eval rakudo 9bb7de: OUTPUT«OH HAI␤»
masak [Coke]: quasi outside of macros work fine, but unless you have a way to go back in time, there's not much you can do with them. 15:40
they're meant to integrate into the program during compilation.
jnthn You can use an eval to go forward in time :P
[Coke] (back in time) like BEGIN. :)
masak right.
[Coke] masak: my point being if there's not much point to them outside macros, why not disallow them there.
jnthn r: my $a = quasi { say "OH HAI" }; macro foo() { $a }; eval 'foo;'
p6eval rakudo 9bb7de: OUTPUT«OH HAI␤»
masak [Coke]: why not disallow 'when' outside of 'given'?
15:40 thou joined
[Coke] WFM. :) 15:41
masak [Coke]: why not disallow methods outside of classes?
[Coke] Yes. These are all good ideas.
jnthn [Coke]: Somebody will find a creative use. I'm struggling for a concrete one, but that's probably because I've not written many macros yet :)
masak [Coke]: why not disallow 'take' outside of 'gather'?
15:41 thou left
jnthn All the above examples worked as I expected \o/ 15:41
masak (my point being that all those cases *have* found creative uses)
jnthn Taht's nice :)
masak yes :)
jnthn I'll have to work harder to find bugs for masak :D 15:42
[Coke] r: macro a() { 1 } 15:43
p6eval rakudo 9bb7de: ( no output )
[Coke] r: macro a() { 1 }; a
p6eval rakudo 9bb7de: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
[Coke] r: macro a() { 1 }; a(); 15:44
p6eval rakudo 9bb7de: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
[Coke] I know the macro should be returning a quasi - is that what the error is trying to tell me?
masak hm, no, it should complain that the macro doesn't return an AST. 15:45
seem to have regressed on that.
will look into it.
[Coke] masak++ 15:46
arnsholt masak: You can use take outside gather? (The dynamic scope of gather, that is) 15:47
masak arnsholt: not outside the dynamic scope, no. 15:48
arnsholt: my point is that take is *allowed* outside of the dynamic scope of gather, not that you can use it there. 15:49
arnsholt Yeah, definitely
masak (because, since it's a dynamic scope, static checking of its appropriateness is not possible)
arnsholt Yup 15:50
15:50 cognominal left
arnsholt And disallowing something just because noone can see the point has never really been an argument 'round here =) 15:51
15:52 kaleem left
jnthn r: take 'me' 15:53
p6eval rakudo 9bb7de: OUTPUT«take without gather␤ in block at src/gen/CORE.setting:429␤ in block at src/gen/CORE.setting:478␤ in block at /tmp/NRputOwqD5:1␤␤»
jnthn Good. Sane error. :)
masak I'm pretty confident someone will find a use for quasis even outside of macros.
jnthn masak: I'm imagining situations where its convenient to collect quasis outside a macro and use them in multiple macros, for example. 15:54
arnsholt That's a very good use of it 15:55
15:55 sizz joined
masak right. tricks having to do with context may play in here as well. 15:56
(i.e. the quasi needs to be build in one module and then passed to another)
built*
arnsholt Oooh, nice!
Neat way to punch an appropriate-sized hole in encapsulation 15:57
15:57 cognominal joined, benabik joined
masak the hole isn't any bigger than with passing closures. 15:57
it's just done at another stage of the compile/run cycle.
arnsholt True
16:01 birdwindupbird joined 16:02 brrt left 16:06 xinming joined 16:07 benabik left 16:11 flightrecorder left 16:12 FROGGS left
[Coke] masak: repl doesn't complain about macro redefinition, happily keeps showing result of original macro. 16:24
masak REPLs generally aren't known to complain about routine redefinitions. 16:27
that's usually considered a feature.
though why it insists on showing the first one defined, I don't know.
16:28 rindolf left 16:29 rindolf joined
arnsholt heads for the train station 16:30
eiro hello guys 16:31
masak eiro! \o/
eiro wip: i start to write about writing modules. is there any official doc about the official way to use panda ? 16:32
16:32 thou joined
eiro masak, \o from france 16:32
damned! kivutar didn't join 16:33
masak say hi to france from me.
or "bonjour", or whatever... :)
eiro haha :) "hello" becomes as frequent as bonjour actually :) 16:34
"salut" is also commonly used
masak just nod curtly and say "alors". 16:35
eiro yep 16:37
so! it seems there is no doc for panda: i start to read the code
jnthn There is a "who to make your module panda compliant" thingy linked from modules.perl6.org
masak if there's a doc for panda, it's probably in the panda repo.
jnthn er, how :)
tadzik eiro: ooh, I have an image Just Waiting For This 16:38
eiro oh! it's not in the source but in a wiki: wiki.perl6.org/Create%20and%20Distr...%20Modules 16:39
tadzik Panda docs! imgur.com/WAyGR
eiro haha :)
instagram.com/p/LBWST9HsHd/ 16:40
tadzik :D 16:41
eiro oh! there is no submit form! maybe we wan write it with Bailador? 16:45
Ping someone on IRC (#perl6 at freenode) to either show you how to add your module to the ecosystem, or else ask them if they could please add it for you.
tadzik hm 16:49
we could do that with Bailador, yes
but the wiki is not Bailador-driven
eiro i don't think of wiki instructions but a new set of commands in panda to manage the modules 16:50
panda new
panda publish
panda announce
how about that ? 16:51
tadzik hmm
sounds good to me :) 16:52
jnthn back later & 16:55
17:06 domidumont1 joined, sudokode left 17:07 birdwindupbird left 17:08 domidumont left 17:14 sudokode joined 17:23 havenn left 17:24 havenn joined 17:28 havenn left 17:44 sudokode left 17:47 sirrobert joined
sirrobert hi p6 17:47
sorear o/
masak: heh, that bottle has an inherently funny label :D 17:49
sirrobert This does what I expect: 17:58
r: my %foo = a => 1; say %foo; %foo ,= b => 2; say %foo;
p6eval rakudo 9bb7de: OUTPUT«("a" => 1).hash␤("a" => 1, "b" => 2).hash␤»
sirrobert Why doesn't this do what I expect?
r: my %bar= a => {c=>3}; say %bar<a>; %bar<a> ,= d=>4; say %bar<a>;
p6eval rakudo 9bb7de: OUTPUT«(timeout)("c" => 3).hash␤» 17:59
sirrobert or, rather, it hangs (which isn't what I expect =)
18:03 leont joined, adu joined 18:05 sudokode joined 18:12 benabik joined 18:15 wk left 18:22 SamuraiJack joined 18:33 zby_home joined 18:34 spider-mario joined 18:55 havenn joined 18:57 nyuszika7h left 19:00 cognominal left, nyuszika7h joined 19:05 cognominal joined 19:10 Chillance joined 19:11 spider-mario left 19:16 spider-mario joined 19:22 wk joined 19:45 s3333 joined 19:54 s3333 left 20:01 fgomez left
moritz \o/ macros 20:03
masak++
flussence masakros!
[Coke] r: macro marco($a, $b) { eval "macro $a { quasi {{{ $b }}} }" }; marco polo { say "marco!" }; polo 20:06
p6eval rakudo 9bb7de: OUTPUT«===SORRY!===␤Not enough positional parameters passed; got 1 but expected 2␤at /tmp/jKTg8CSkRO:1␤»
[Coke] *snap*
20:07 adu left 20:09 sirrobert left, GlitchMr left 20:15 am0c joined 20:18 havenn left, havenn joined 20:19 wk left 20:23 havenn left 20:25 domidumont1 left 20:27 havenn joined 20:28 sirrobert joined
sirrobert back 20:28
rindolf sorear: hi. 20:34
20:36 wk joined 20:48 benabik left 20:59 sudokode left, SamuraiJack left 21:02 skids left
sirrobert is there a good way to deal with precompiling circular dependencies yet? 21:07
21:09 bbkr left 21:10 havenn left, azawawi joined 21:11 havenn joined, benabik joined
azawawi is github.com/rakudo/rakudo/blob/nom/...mpiler.nqp usable within a Perl 6 script or not? 21:14
star: Perl6::Compiler.interactive 21:15
p6eval star 2012.10: OUTPUT«Could not find symbol '&Compiler'␤ in method <anon> at src/gen/CORE.setting:9956␤ in at src/gen/Metamodel.pm:2401␤ in any find_method_fallback at src/gen/Metamodel.pm:2389␤ in any find_method at src/gen/Metamodel.pm:925␤ in at src/gen/BOOTSTRAP.pm:827␤ in an…
21:15 havenn left
azawawi star: ::('Perl6::Compiler') 21:15
p6eval star 2012.10: ( no output )
azawawi Perl6::Compiler.interactive no longer usable in rakudo irclog.perlgeek.de/perl6/2010-06-25#i_2480559 ? 21:18
azawawi sleep &
21:18 azawawi left 21:25 fgomez joined 21:28 bruges_ left 21:30 bruges joined 21:34 am0c left 21:36 zby_home left 21:37 bapa left 21:38 bapa joined 21:39 benabik left 21:47 havenn joined 21:56 jaldhar_ joined, havenn_ joined 21:58 Gothmog__ joined, twinshadow_ joined, jrockway_ joined, havenn left, Patterner left, Gothmog_ left, twinshadow left, jrockway left, twinshadow_ is now known as twinshadow, Gothmog__ is now known as Gothmog_ 21:59 Psyche^ joined, Psyche^ is now known as Patterner 22:08 stopbit left
sorear rindolf: ? 22:15
rindolf sorear: what?
sorear: oh, I meant someone else. 22:16
sorear: I meant sirrobert 22:17
22:17 bapa left 22:23 havenn_ left, havenn joined, bapa joined
TimToady hi, you guys are on the screen at Westmont 22:24
diakopter howdy Westmont
flussence o/
colomon \o 22:25
sorear o/
22:26 rindolf left 22:28 havenn left
flussence
.oO( "please don't tap on the fish tank" )
22:33
22:35 kaare_ left 22:38 skids joined 22:42 cognominal left 22:49 cognominal joined
masak greetings, Westmont. 23:04
23:10 stocks joined 23:22 thou left 23:33 fgomez left 23:34 havenn joined
jnthn Is Westmont in the west, and has it a mountain? 23:34
23:39 havenn left
sorear I suspect the reference is to en.wikipedia.org/wiki/Westmont_College 23:39
jnthn Ah :)
23:40 fgomez joined
masak etymology is "WEST Moreland and VerMONT". cute. 23:42
good night, #perl6 23:51
sorear o/ masak 23:52
...I just started a P5 test file with use Test::More; plan 50; 23:56
flussence *only* 50? :)
doy (people still use explicit test plans?) 23:57
sorear doy: explicit plans are prefered in the spectest suite because we like to know the total number of tests, even when some files run on zero implementations 23:58