Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-01-02

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 lue Could it be that rakudo's just not reading in the stuff correctly? NQP at least goes off without a hitch.
00:05 timotimo hm, or maybe it's my in-line if?
00:05 timotimo ww
00:12 jnthn sleep; 'night o/
00:13 FROGGS_ gnight jnthn
00:14 timotimo good night, jnthn :)
00:21 lue The parrot::cflags that the configuration steps reads in has the ffi include. This is weird.
00:36 jnap joined #perl6
00:37 [Coke] someone ping me when moar-support merges back to nom.
00:40 lue FROGGS_: I got it! Somehow, Moar's CFLAGS settings are overriding Parrot's, even though the Moar stuff comes after the Parrot stuff (in the Makefile, that is)
00:41 lue Don't know how to fix that though :(
00:43 dalek perl6-roast-data: 483a968 | coke++ | / (3 files):
00:43 dalek perl6-roast-data: today (automated commit)
00:43 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/483a968cbb
00:43 pdurbin joined #perl6
00:46 logie joined #perl6
00:48 jnap joined #perl6
00:49 colomon joined #perl6
00:51 [Coke] there we go.
00:51 BenGoldberg Pre-Anouncement: The next backend VM for Rakudo will be released on 4/1/14, and will target SNUSP.
00:51 timotimo i think i'll update my diff gist and go to sleep
00:52 timotimo maybe someone figures out why it fails the way it does
00:52 timotimo https://gist.github.com/timo/af7bc1b6725d1734a6eb
01:05 xenoterracide joined #perl6
01:07 erkan joined #perl6
01:08 logie joined #perl6
01:11 thou joined #perl6
01:13 lue Disambiguating them to P_CFLAGS and M_CFLAGS seems to have helped. I may go and generate a PR later to do that for all such variables then.
01:18 MikeFair_ joined #perl6
01:43 dayangkun joined #perl6
01:47 logie joined #perl6
02:18 lue anyone know why S28 puts "S26" in parens but not any other S** ?
02:20 lue rn: say $*VM.WHAT;
02:20 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«(Hash)␤»
02:20 camelia ..niecza v24-109-g48a8de3: OUTPUT«(timeout)[auto-compiling setting]␤»
02:21 lue Also, could you enlighten as to why we put a hash in a $ variable? :)
02:23 clsn__ I don't know if this is a bug... can't demonstrate on camelia, it only happens in the repl.  Do "my $*a" and then "say $*a" on two separate lines.  You get a different answer from "my $*a; say $*a" on one line.
02:25 lue clsn__: looks like a REPL error to me.
02:25 clsn__ OK.
02:25 lue (specifically, doesn't keep dynamic variable between REPL lines for some reason)
03:17 jnap joined #perl6
03:36 jnap joined #perl6
03:47 raiph p56: say 1
03:47 camelia p5-to-p6 : OUTPUT«say(1)␤»
03:52 lue p56: print "thing\n"
03:52 camelia p5-to-p6 : OUTPUT«print('thing' ~ chr(10))␤»
03:57 hoverboard joined #perl6
03:59 atroxaper joined #perl6
04:14 abnorman joined #perl6
04:16 logie joined #perl6
04:19 dayangkun joined #perl6
04:20 mcglk joined #perl6
04:26 logie joined #perl6
04:37 jnap joined #perl6
04:43 preflex joined #perl6
04:52 thou joined #perl6
04:57 kaare_ joined #perl6
05:57 dayangkun joined #perl6
06:31 kaleem joined #perl6
06:44 darutoko joined #perl6
07:19 PacoAir joined #perl6
07:23 SamuraiJack__ joined #perl6
07:25 kurahaupo joined #perl6
07:39 jnap joined #perl6
07:41 kaare_ joined #perl6
07:58 usernotexists joined #perl6
08:22 zakharyas joined #perl6
08:27 baest joined #perl6
08:27 hoverboard joined #perl6
08:28 brrt joined #perl6
08:28 brrt happy new year #perl6
08:32 darutoko joined #perl6
08:34 Piers joined #perl6
08:40 jnap joined #perl6
08:42 FROGGS_ happy new year brrt
08:42 FROGGS_ TimToady: what do you think about that? https://gist.github.com/FROGGS/fbb​4455f544a35cf265d#file-in-short-md
08:57 denis_boyun joined #perl6
09:00 eternaleye joined #perl6
09:01 eternaleye joined #perl6
09:02 eternaleye joined #perl6
09:13 denis_boyun joined #perl6
09:27 xinming_ joined #perl6
09:30 espadrine joined #perl6
09:37 masak brrt: Year.new( :happy )
09:37 denis_boyun joined #perl6
09:37 brrt :-)
09:41 jnap joined #perl6
09:46 hoelzro morning #perl6!
09:46 timotimo morning!
09:46 hoelzro с новым годом!
09:46 hoelzro and happy new year!
09:49 masak с новым годом, hoelzro!
09:57 denis_boyun joined #perl6
10:02 masak r: for 1..10 { say "hop!"; NEXT { say $_ } }
10:03 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«hop!␤1␤hop!␤2␤hop!␤3␤hop!␤4␤hop!␤​5␤hop!␤6␤hop!␤7␤hop!␤8␤hop!␤9␤hop!␤10␤»
10:03 masak very well.
10:03 masak r: for 1..10 { say "hop!"; ENTER { say $_ } }
10:03 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«1␤hop!␤2␤hop!␤3␤hop!␤4␤hop!␤5␤hop​!␤6␤hop!␤7␤hop!␤8␤hop!␤9␤hop!␤10␤hop!␤»
10:12 denis_boyun joined #perl6
10:23 darutoko- joined #perl6
10:41 jnap joined #perl6
10:47 mtk0 joined #perl6
10:48 sftp joined #perl6
10:59 sftp joined #perl6
11:11 [Sno] joined #perl6
11:35 FROGGS masak / lue: what do you think about that? https://gist.github.com/FROGGS/fbb​4455f544a35cf265d#file-in-short-md
11:35 kurahaupo joined #perl6
11:38 * masak looks
11:39 masak FROGGS: hm -- I got to the 'action' keyword, and my forehead got furrows.
11:39 masak FROGGS: feels like too little bang for the buck. the 'method' keyword (in a separate class) already does that.
11:40 masak in order not to just say "no" to a proposal, here's a counterproposal, not necessarily perfect, which doesn't introduce the 'action' keyword:
11:40 masak keep 'slang COBOL', that's nice. but have a way to associate an action class to this slang. maybe through an adverb somewhere.
11:40 masak oh! oh!
11:41 masak you have $~COBOL.module-loader in the example.
11:41 masak do the same thing with $~COBOL.actions
11:41 masak FROGGS: minor nit: $~COBOL.module-loader( COBOL::ModuleLoader );
11:41 masak FROGGS: that's the Perl 5 way of doing setter accessors.
11:41 FROGGS $~COBOL.actions and .grammar would already be there
11:42 masak the Perl 6 way is $~COBOL.module-loader = COBOL::ModuleLoader;
11:42 FROGGS because you don't want to have a 6k lines file when you could have two 3k lines files
11:42 FROGGS true
11:42 jnap joined #perl6
11:42 masak FROGGS: if that's so, then all the more reason to declare .grammar and .actions in separate blocks.
11:43 FROGGS I just think that it would be nice to have one thing for a CSV or YAML parser
11:43 masak FROGGS: come to think of it, you probably shouldn't flatten together 'slang' and 'grammar' either.
11:43 sftp joined #perl6
11:43 masak FROGGS: I'd much rather see a slang *having* a grammar and actions, and an optional module loader.
11:43 FROGGS that is the idea
11:44 masak right. nice.
11:44 masak then please don't declare tokens and actions directly in the slang ;)
11:44 masak you think it's cute today :)
11:44 masak but it's mixing levels.
11:44 FROGGS so, no first class "slang" keyword :/
11:44 FROGGS yeah
11:44 masak I'm not against the 'slang' keyword.
11:44 FROGGS what should it do then?
11:44 masak I'm against it directly doing the work of grammars and action classes.
11:45 masak it should just pull the parts together, like the tip of a pyramid.
11:45 FROGGS but how?
11:45 masak maybe 'slang COBOL { has $.grammar = ...; has $.actions = ...; has $.module-loader = ...; }'
11:45 masak so basically a class with a funny metaclass.
11:45 FROGGS hmmm
11:45 masak very Perl 6 :)
11:46 FROGGS I could just make a role (Slangy) that stubs attributes... wait, we don't have that feature :o)
11:46 FROGGS or do we?
11:47 FROGGS p: my role Slangy { has $.grammar = ...; }
11:47 camelia rakudo-parrot a77214: ( no output )
11:47 FROGGS p: my role Slangy { has $.grammar = ...; }; class COBOL does Slangy { }
11:47 camelia rakudo-parrot a77214: ( no output )
11:47 FROGGS p: my role Slangy { has $.grammar = ...; }; class COBOL does Slangy { }; my $cobol = COBOL.new
11:47 camelia rakudo-parrot a77214: OUTPUT«Stub code executed␤current instr.: 'throw' pc 410302 (src/gen/p-CORE.setting.pir:171896) (gen/parrot/CORE.setting:10737)␤called from Sub 'sink' pc 446395 (src/gen/p-CORE.setting.pir:185119) (gen/parrot/CORE.setting:12127)␤called from Sub 'MAIN' pc …»
11:47 FROGGS cool
11:47 FROGGS p: my role Slangy { has $.grammar = ...; }; class COBOL does Slangy { }; my $cobol = COBOL.new( :grammar )
11:47 camelia rakudo-parrot a77214: ( no output )
11:47 FROGGS very nice
11:50 FROGGS okay, so the slang keyword just applies the Slangy role, and registers the slang's name as $~name and the grammar+actions in %*LANG
11:50 masak FROGGS: though it could be argued that the above should blow up at composition-time.
11:50 masak as in, at the final '}' after the 'does Slangy'.
11:50 FROGGS true, but it is good enough for me
11:51 masak p: role R { method foo { ... } }; class C does R {}; BEGIN { say "alive" }
11:51 camelia rakudo-parrot a77214: OUTPUT«===SORRY!===␤Method 'foo' must be implemented by C because it is required by a role␤»
11:51 * hoelzro .oO( does Slanky? )
11:51 masak FROGGS: yes, I'm just thinking from the perspective of rakudobugs ;)
11:51 * masak submits one
11:51 FROGGS masak++ :o)
12:01 FROGGS masak: I updated it, thank you very much!
12:01 FROGGS then there is just the question if the entry point for all slangs should be token statementlist or something else
12:05 brrt joined #perl6
12:09 berekuk joined #perl6
12:12 masak hm. not TOP?
12:14 daniel-s_ joined #perl6
12:17 FROGGS lemme think about it...
12:17 FROGGS but I think there is no reason to not use TOP
12:29 kivutar joined #perl6
12:32 cognominal joined #perl6
12:43 jnap joined #perl6
12:51 * moritz was a bit surprised that http://www.perl.com/pub/2014/01/the-​year-in-perl-2013-retrospective.html didn't mention the p6 advent calendar, until he noticed that the author was chromatic. Go figure.
12:51 usernotexists|2 joined #perl6
12:56 rindolf joined #perl6
12:56 masak moritz: fortunately, there are many p5ers who are very inclusive of Perl 6.
12:57 moritz masak: aye
12:58 moritz (and I could very well imagine that the p6advent blog had more visitors than any of the p5 advent calendars)
13:02 psch joined #perl6
13:05 psch hi #perl6 (because i forgot it every time before)
13:06 psch moritz: i've looked more at #76368 and your blog posts wrt exceptions, and i fail to see how the bug fits in there
13:06 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=76368
13:07 psch from what i understand, the exceptional state happens in the optimizer, which dies right through to the backend, e.g. die_s_c in the jvm
13:09 psch i'd assume the backend doesn't have to know exceptions like "wrong argument type for signature"
13:12 psch my questions then are "how wrong am i in my understanding" and "is there already a plan how this should work"
13:24 colomon joined #perl6
13:24 masak hi psch
13:28 psch hi masak
13:29 psch .oO( so im not lagging out )
13:31 timotimo wow, timsort is a really complex beast; i don't think i want to implement that today
13:37 ajr joined #perl6
13:39 masak anyone from .dk who has time for a brief privmsg?
13:40 diakopter nononononono
13:40 * masak hides from whatever reaction diakopter is expressing :)
13:41 diakopter :D  <- a smile/smiley
13:41 masak :)
13:41 pdurbin left #perl6
13:44 jnap joined #perl6
13:45 moritz psch: well, even the optimizer should throw typed errors
13:46 arnsholt masak: Almost said I was probably close enough, until I saw it was you who was asking =)
13:51 masak :)
13:51 * masak .oO( close enough... linguistically )
13:53 atroxaper joined #perl6
13:55 psch moritz: okay, so for this case that would mean building the correct exception in report_inevitable_dispatch_failure in the optimizer and adapt the loops over %worrying and %deadly to handle exceptions as well?
13:55 psch i.e. i was wrong with thinking it goes back into the backend
13:56 daxim joined #perl6
14:06 jnap joined #perl6
14:15 berekuk joined #perl6
14:17 kaleem joined #perl6
14:29 moritz psch: yes, building the correct exception in report_inevitable_dispatch_failure sounds right
14:31 spider-mario joined #perl6
14:32 brrt \o moritz
14:33 brrt not that is of any interest whatever, but i have a teacher also called m.lenz
14:33 spider-mario joined #perl6
14:34 kbaker joined #perl6
14:36 SamuraiJack__ joined #perl6
14:37 ajr joined #perl6
14:43 ajr_ joined #perl6
14:43 moritz at least in .de, my name strikes a good balance: it's common enough that people know the name (in principle), so they know how to spell it, but it's not a group identifier either
14:45 skids joined #perl6
14:47 masak what's the URL to that site that tracks/compares the size of CPAN-alikes in various languages?
14:54 berekuk joined #perl6
14:55 logie joined #perl6
14:56 ajr_ joined #perl6
15:01 berekuk joined #perl6
15:11 benabik joined #perl6
15:14 xenoterracide joined #perl6
15:15 raiph joined #perl6
15:15 Ulti did you guys realise putting 'use v6;' in this funtime box works? http://perltuts.com/try  vti++
15:16 Ulti since June too
15:17 timotimo whoa, it totally does
15:18 timotimo but it runs on parrot 4.3 :)
15:18 timotimo rakudo 2012.04.1
15:19 masak wow, that's cool. vti++
15:20 * masak read "This code is editable" as "This code is edible"
15:21 timotimo mhhhhh
15:22 Ulti vti has a repo for the POD of each tutorial too so I guess there is no reason Perl6 tutorials couldn't be added... is that the rakudo that comes with Debian/Ubuntu?
15:22 timotimo that's cool :)
15:22 timotimo i wanted to do something similar to that
15:23 timotimo but i've been waiting for rakudo-js for more or less obvious reasons
15:23 [Coke] I can't get any code to work on perltuts.com/try - Evaluator system error
15:23 Ulti there was something similar to that I spent a couple of days trying to get try.perl6.org to work locally ;__;
15:24 jnthn Hmm...I didn't get "use v6;" to work either...
15:25 masak I got a "Timeout".
15:25 wooden joined #perl6
15:25 wooden joined #perl6
15:25 Ulti I think we just broke perltuts.com!
15:25 Ulti at least mine is
15:25 psch '1;' gives me an evaluator system error
15:25 psch so, yes, probably broken
15:25 [Coke] jnthn: I figured I'd give moarvm a few days to shake things out before I even thought about fudging/opening tickets. please let me know if there's anything I can do to help highlight issues other than make sure I post the daily run as soon as it's available.
15:26 [Coke] (which, java folks, would be sooner if the eval server didn't crap out on the daily runs.)
15:26 timotimo .o( maybe even compile MoarVM with emscripten instead of waiting for rakudo-js )
15:34 thou joined #perl6
15:34 jnthn I don't think "has $.a = ...;" not blowing up at compile time is a rakudo bug. It's not like you can actually do anything about it at compile time. There's no way to specify the default for another attribute after you compose it in.
15:37 jnthn [Coke]: Daily runs are helpful right now. We can also try doing the "categorize the most common failure modes" thing at some point, but that needs error reporting to be fixed first...
15:38 cognominal joined #perl6
15:38 diakopter rj: class A { has $.b = BEGIN $.b }
15:38 camelia rakudo-jvm a77214: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KQu2EDWefBâ�¤Virtual call $.b may not be used on partially constructed objectsâ�¤at /tmp/KQu2EDWefB:1â�¤------> [32mclass A { has $.b = BEGIN $.b[33mâ��[31m }[0mâ�¤    expecting any of:â�¤       …»
15:38 jnthn Nice try :P
15:38 diakopter rj: class A { has $.b = BEGIN A }
15:38 camelia rakudo-jvm a77214: ( no output )
15:38 timotimo oh my :)
15:39 sorear joined #perl6
15:40 diakopter rj: class A { has $.b = BEGIN A.new }
15:40 camelia rakudo-jvm a77214: OUTPUT«===SORRY!===␤No such method 'new' for invocant of type 'A'␤»
15:40 diakopter rj: class A { has $.b = BEGIN say A.^methods }
15:40 camelia rakudo-jvm a77214: OUTPUT«===SORRY!===␤No such method 'dispatch:<.^>' for invocant of type 'A'␤»
15:41 jnthn diakopter: Default parent doesn't get applied until composition time...
15:41 diakopter rj: class A { has $.b = BEGIN COMPOSE say A.^methods }
15:41 camelia rakudo-jvm a77214: ( no output )
15:42 diakopter o_O
15:42 jnthn what the heck is COMPOSE?
15:42 diakopter something that silently noops? :)
15:43 timotimo :D
15:43 diakopter get it? silently noops? :)
15:45 jnthn :P
15:45 diakopter jnthn: I was just hoping there was some phaser for compose-time, since you mentioned it as a thing :)
15:46 timotimo i don't get it :(
15:46 jnthn Apparently, there is... :)
15:46 diakopter timotimo: I was just giggling about the redundancy of saying something that is no-op is also silent :D
15:46 timotimo oh
15:46 timotimo heh :)
15:48 diakopter we've got all kinds of -times
15:48 timotimo may you live in exciting -times
15:48 diakopter now what I really want is a TYPING { }
15:49 timotimo hahaha
15:49 diakopter or DESIGN { }
15:49 timotimo for each stage of the waterfall model
15:49 diakopter SCRUM { }
15:50 diakopter SCRUM { sleep while 1 }
15:50 jnthn WEBSCALE { use Bailador; ... }
15:51 diakopter SCRUM { sleep 999**999**999 } # don't actually get around to sleeping
15:51 timotimo m)
15:56 dalek rakudo-star-daily: c52aa23 | coke++ | log/ (5 files):
15:56 dalek rakudo-star-daily: today (automated commit)
15:56 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/c52aa23100
15:57 census joined #perl6
15:57 diakopter I guess 9e99**9e99 is shorter
15:58 [Coke] ^^ several modules need to track the eval -> EVAL change.
15:58 timotimo where do all those nil thingies in xmt-writer come from?
15:58 timotimo and in svg?
15:59 [Coke] I think they've been there for a while.
15:59 [Coke] you can do a bisect to see when they showed up, which will give you two rakudo commits to figure out what changed.
15:59 [Coke] (assuming the module is static)
16:00 hoelzro has @.cells = map({ !generate-cell }, 1..81) doesn't work, does it?
16:00 timotimo yeah, that's not curried properly
16:00 jnthn hoelzro: Did you want self!generate-cell ?
16:01 hoelzro yes.
16:01 hoelzro thanks jnthn !
16:01 timotimo is self!generate-cell a reference to the sub rather than a call without arguments?
16:01 jnthn No, it's a call to a private method
16:01 timotimo ah, it doesn't want the $_
16:01 timotimo in that case, yeah
16:02 timotimo is &self!generate-cell a reference to the method?
16:02 jnthn No, just like &self.foo isn't.
16:02 timotimo OK, you still need .^can and friends for that
16:03 timotimo or make a whatever-curried block
16:11 fribeiro joined #perl6
16:12 fribeiro joined #perl6
16:12 hoelzro there's a way to take a list of kv pairs and make it into a hash, merging duplicates into an array value, right?
16:13 hoelzro ex. magic-method([:foo(1), :bar(2), :foo(3)]) # { :foo([1, 3]), :bar(2) }
16:13 timotimo yeah, it's .push
16:13 timotimo ().hash.push( [ ... ] )
16:13 timotimo (i think)
16:13 hoelzro does that return the resulting hash, then?
16:14 timotimo let's try
16:14 timotimo r: say ().hash.push( [ :foo(1), :bar(2), :foo(3) ] )
16:14 camelia rakudo-jvm a77214: OUTPUT«Trailing item in Hash.push␤().hash␤»
16:14 camelia ..rakudo-parrot a77214: OUTPUT«Trailing item in Hash.push  in block  at /tmp/ZYc1li3ZYA:1␤␤().hash␤»
16:14 timotimo whoops
16:14 timotimo r: say ().hash.push( :foo(1), :bar(2), :foo(3) )
16:14 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«().hash␤»
16:15 hoelzro hmm
16:15 hoelzro maybe I'm looking for classify
16:15 timotimo r: say ().hash.push( "foo", 1, "bar", 2, "foo", 3 )
16:15 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«("foo" => [1, 3], "bar" => 2).hash␤»
16:15 timotimo no, you're not.
16:15 timotimo well ... classify also works
16:15 hoelzro I'm not?
16:15 hoelzro well
16:15 hoelzro I have a list of Cell objects
16:15 hoelzro and I want to organize them based on their blocks
16:16 timotimo i think classify will give you "foo" => ["foo" => 1, "foo" => 3] ...
16:16 brrt left #perl6
16:16 hoelzro so I *was* going to do %remaining.push(map({ $_.block-no => $_ }, @.cells))
16:16 * timotimo suggests .push:
16:17 moritz p: say (1..8).classify(* % 2).perl
16:17 camelia rakudo-parrot a77214: OUTPUT«("1" => [1, 3, 5, 7], "0" => [2, 4, 6, 8]).hash␤»
16:19 mohij joined #perl6
16:19 * masak <3 .classify
16:20 timotimo p: say (1..8).classify( * <3 ).perl
16:20 camelia rakudo-parrot a77214: OUTPUT«("True" => [1, 2], "False" => [3, 4, 5, 6, 7, 8]).hash␤»
16:23 btyler_ joined #perl6
16:32 masak ;)
16:39 btyler_ joined #perl6
16:46 ajr joined #perl6
16:47 [Coke] daily moar run starting...
16:48 ajr_ joined #perl6
16:48 [Coke] it's complaining about a missing file. I assume we need another merge from nom back to moar-support?
16:48 [Coke] (missing roast file)
16:49 [Coke] ... that was yesterday, Coke. nevermind.
16:49 [Coke] today already looking much cleaner.
16:51 [Coke] do we want to track timings on these daily runs? or is perlbench better for that?
16:52 japhb I would like to see timing info, because it seems not terribly hard to add, but gives a data point from a different space than perl6-bench covers -- many short-running processes, summed up.
16:52 FROGGS hmmm, does it make sense to know how fast we abort tests?
16:53 japhb Mind you, it's going to be mostly noise for r-m at first, but for each semi-mature platform, it should become useful info.
16:55 japhb FROGGS: I think it's valuable to just get the infrastructure in place and debugged for recording and tracking it, in preparation for when it's giving more stable data.
16:56 FROGGS it would be interesting indeed for test files that pass exactly like parrot/jvm, because then you would see how good moarvm is in the various regions...
16:56 japhb Right.
16:56 FROGGS like the mass regex tests
16:57 ajr_ joined #perl6
16:57 FROGGS and if we see that parrot is way faster in some categories, we can compare details (and borrow ideas)
16:57 japhb I'm expecting to find some good spots and the occasional bad spot that we should look at -- sorta like r-j's performance issues with certain string operations.
16:58 FROGGS exactly
17:01 jnthn curry, beer &
17:01 FROGGS ohh, nice
17:01 japhb Mmmm, curry.
17:04 btyler_ joined #perl6
17:04 berekuk joined #perl6
17:06 [Coke] beats me, I'm at diet soda, cupofsoup
17:06 timotimo now that we have a bunch of "provides" sections in some of our modules, rakudo could try to ask panda for packages providing a given module if you try to use something that's not installed
17:07 FROGGS timotimo: my idea was to put implement that as a module loader with a very low priority
17:08 FROGGS for that we need to (heavily) test the eleven branches
17:08 timotimo sounds excellent :)
17:08 grondilu joined #perl6
17:08 timotimo point me at the place where it would have to be implemented and what the API is? :P
17:09 FROGGS timotimo: and btw, since we have :auth, we could install directly from github if auth matches /^github:\w+$/
17:10 FROGGS https://github.com/rakudo/rakudo/blob/eleven​/src/core/CompUnitRepo/Local/Installation.pm
17:10 FROGGS you would add a CompUnitRepo::Remote::Installer or so
17:10 timotimo that sounds nice :)
17:10 FROGGS and you would just need to implement the candidates method
17:11 FROGGS by "directly installing from github" I mean that we still use panda, but it does not need to be listed in the ecosystem
17:11 timotimo does auth<github> allow you to provide a tag with gpg signature or a full sha1?
17:12 timotimo (or would i be in charge of implementing that?)
17:12 FROGGS timotimo: we can pass additional adverbs to use statements
17:13 timotimo cool
17:14 FROGGS you already get them passed to the candidates method I think
17:14 FROGGS so, just name them :o)
17:14 cooper joined #perl6
17:14 timotimo tadzik: bailador should really do NFA construction for routes, don't you think? :3
17:14 FROGGS would be cool if the stuff from github get its version information from the tags if no other version literal is available
17:16 timotimo from the META.info?
17:17 FROGGS yes
17:17 timotimo hm. will our backends garbage-collect regexes and grammars?
17:17 timotimo like, if i eval a hundred different grammars?
17:17 timotimo and only use each grammar once or twice?
17:17 FROGGS no idea
17:18 * timotimo tries
17:18 timotimo without wanting to give away too much, that question is interesting for my next project :P
17:18 timotimo my next big project, i should say. with a real possibility it'll never see the light of day :\
17:18 japhb preflex: tell jnthn I forgot to answer your question about my blockers.  Right now, for p6-pb, I'm blocked on union(num,int) (I believe I have the remaining non-deprecated parts of binary Protocol Buffers implemented now).  For concurrent Net-IRC, I'm semi-blocked on async sockets.  There's some work I could do, but it's making design hard to have that unknown.
17:18 preflex Consider it noted.
17:20 FROGGS timotimo: these are the best projects :o)
17:20 timotimo heh
17:21 FROGGS I have one of these in my pocket and I am going to work on it again this year.... need to resurrect SDL or make the bindings to SDL2 for that
17:21 japhb (greek yogurt parfait)++
17:25 abnorman joined #perl6
17:27 timotimo at least parrot doesn't seem to free the memory back up
17:27 FROGGS yeah, it does it as late as possible
17:28 timotimo meh.
17:28 timotimo it seems like the same thing happens on the jvm, though
17:29 FROGGS must be jnthn++'s fault then :o)
17:29 timotimo haha
17:29 FROGGS he is the designer, he is to blame :P
17:31 tadzik timotimo: hhehee. Sure :) Did you see the Grammar Dispatcher experiment?
17:31 timotimo no
17:31 tadzik let me find it
17:32 timotimo did you string-compose a grammar?
17:32 timotimo hm, actually, it should be possible to do it programmatically. even if it's not implemented yet
17:32 tadzik http://ttjjss.wordpress.com/2010/11/21/perl​-6-grammars-%E2%80%93-not-only-for-parsing/
17:33 timotimo oh god that code is unreadable :o
17:33 timotimo (due to the font)
17:34 timotimo (and color)
17:34 SamuraiJack__ joined #perl6
17:34 tadzik hm, is it? :)
17:34 timotimo it's too bright and the letters seem kind of butchered
17:35 timotimo (at least on my machine)
17:35 tadzik http://ttjjss.wordpress.com/2010/11/27/gra​mmar-dispatching-%e2%80%93-a-step-further/ followup, but not so interesting
17:36 tadzik seems quite readable, on the n900 :)
17:36 timotimo there's a dead link to your http-server-simple fork in that last post
17:36 tadzik aw
17:38 berekuk joined #perl6
17:38 FROGGS jnthn: if you want to play with slangs, here is a short example (including a problem): https://gist.github.com/FR​OGGS/fbb4455f544a35cf265d
17:43 timotimo i wonder what's keeping the grammars alive
17:43 espadrine1 joined #perl6
17:44 timotimo hm, maybe the code loaded into the jvm?
17:45 moritz the namespace entry in GLOBAL:: ?
17:46 espadrine joined #perl6
17:46 timotimo i created the grammar with eval
17:46 timotimo i'm convinced eval shouldn't write to GLOBAL::
17:47 timotimo i can build 1017 small grammars before java errors out with PermGen space running out
17:47 moritz I'm convinced it should
17:47 timotimo oh?
17:47 timotimo to the outer GLOBAL::, too?
17:47 moritz r: BEGIN eval 'grammar A { token TOP { \d+ } } '; say A.parse('42')
17:47 camelia rakudo-parrot a77214: OUTPUT«「42」␤␤Saw 1 call to deprecated code during execution.␤=====================================​===========================================␤Sub eval (from GLOBAL) called at:␤  /tmp/Bb7VfjBxda, line 1␤Please use 'EVAL' instead.␤--------------…»
17:47 camelia ..rakudo-jvm a77214: OUTPUT«「42」␤␤Saw 1 call to deprecated code during execution.␤=====================================​===========================================␤Any statement_prefix:sym<BEGIN> (from unknown) called at:␤  gen/jvm/stage2/QRegex.nqp, line 724␤Please use…»
17:47 timotimo r: EVAL q{ grammar Test { rule TOP { abcdefg } } }; say GLOBAL::.keys()
17:47 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«Test␤»
17:47 timotimo :o
17:48 timotimo r: EVAL q{ anon grammar { rule TOP { abcdefg } } }; say GLOBAL::.keys()
17:48 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«␤»
17:48 timotimo that's what my code does, fwiw
17:48 moritz if you don't want it to escape, use "my grammar ... "
17:48 moritz hm.
17:49 timotimo even with my grammar it grows until it runs out
17:50 timotimo jnthn: a clue where i'd hvae to look to fix this?
17:52 timotimo i even made sure the for loop wouldn't collect the grammars
17:54 japhb_ joined #perl6
17:57 timotimo it's kind of sucky that parrot doesn't free memory earlier; running it on a shared host for example is not nice if you hog all the ram
17:57 * moritz has high hopes for moar
17:57 Tene joined #perl6
17:57 * timotimo does, too
17:58 timotimo it's not here, though :(
18:00 colomon joined #perl6
18:03 mtk0 joined #perl6
18:12 panchiniak joined #perl6
18:16 dagurval_ joined #perl6
18:19 berekuk joined #perl6
18:27 FROGGS masak: I got even rid of the previously needed EXPORT sub, so it is pretty sweet now: https://gist.github.com/FR​OGGS/fbb4455f544a35cf265d
18:27 FROGGS now I could fiddle with the slang keyword, though that feels a bit premature
18:29 TimToady how does one derive a slang from the current %*MAIN language?
18:29 FROGGS difficult
18:30 FROGGS since it is an nqp grammar
18:30 TimToady that's what augment vs supersede was trying to get at
18:31 FROGGS can't we just do: slang Perl7 is Perl6 { ... } or some such?
18:33 moritz "we" "simply" have to fix inheriting from NQP classes
18:39 arnsholt For some value of "we" equal to "jnthn", presumably =)
18:39 kurahaupo_mobile joined #perl6
18:39 TimToady well, at some point, when Perl 6 is fast, we need to finish the final bootstrap stage of hiding nqp completely, but we're not there yet
18:40 moritz arnsholt: I have started a branch that does the simple parts already :-)
18:41 diakopter TimToady: also, hiding the VM backends completely. ;)
18:41 japhb Abstractions leak.  Also, long game is long.
18:41 [Coke] coming later today:
18:41 [Coke] 6295:"total",     18027, 10456,   327,   843, 28951, 28494
18:41 TimToady I don't really believe in "write once, run anywhere"
18:41 diakopter japhb: I do not leak, you leak.
18:42 moritz wiki leaks
18:42 TimToady I think VMs should stay visible in a declarative way
18:42 * japhb wonders what exactly he abstracts away
18:42 diakopter (quote from a Disney movie)
18:42 TimToady use Win32;
18:42 [Coke] r: say 18027-17219
18:42 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«808␤»
18:42 diakopter much karma to who can name the movie
18:43 * japhb mightily resists googling it.
18:43 japhb [Coke]: Yay!
18:43 * [Coke] guesses BatB
18:43 japhb What's the proper divisor?  28951?
18:43 diakopter hint: the character's name was Max
18:44 moritz oh, Max & Moritz
18:44 TimToady not be confused with Maximillian
18:44 TimToady from the worst Disney movie evar
18:44 diakopter well yes, that was its nickname by the human.
18:44 japhb (The Black Hole)++
18:44 [Coke] wow, that's old school. I think I have it on dvd.
18:45 [Coke] still plenty of 'eval's in roast.
18:47 diakopter anyway, the answer was Flight of the Navigator
18:48 diakopter rj: eval 1
18:48 camelia rakudo-jvm a77214: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'eval' will never work with argument types (int) (line 1)␤    Expected any of:␤    :(Str $code, :lang(:$lang) = { ... }, PseudoStash :context(:$context))␤»
18:48 diakopter you're a pseudostash
18:50 berekuk joined #perl6
18:51 diakopter "none of these signatures match"
18:51 diakopter should be "none of these signatures matches"
18:51 moritz erm, nope
18:51 moritz zero implies plural
18:52 moritz erm, wait
18:52 diakopter no, "none" is short for "not one"
18:52 TimToady diakopter: you're confusing one with any
18:52 TimToady *none
18:52 kurahaupo_mobile depends on dialect, unfortunately
18:52 timotimo TimToady: are you sure our beloved perl6 will be fast enough for nqp to disappear? o_O
18:53 TimToady timotimo: I'd like to know what prevents it from being just as fast to run (given sufficient analysis at compile time)
18:54 timotimo that'd be a lot of analysis :P
18:54 moritz for one, it'll (nearly) always have another layer of containerization
18:54 japhb timotimo: I'd love to know that too.  At least for the native types case.
18:55 japhb Er, that was to TimToady's comment
18:56 diakopter ok, the internets tell me 'none' can mean 'not any' in addition to 'not one'. bleh.
18:57 FROGGS[mobile] TimToady: my proposal does not make augmenting $~MAIN impossible or obsolete btw
18:58 moritz second, we have yet to find a lazy list model that fits all of Perl 6's constraints and isn't dog slow
18:58 mtk0 joined #perl6
18:58 timotimo yes :\
18:59 abnorman joined #perl6
18:59 timotimo if we only have one take in each "iteration" of a gather, we can do a sick transformation into a simple MapIter ...
19:03 [Coke] http://feather.perl6.nl/~coke/moar.out updated with today's run (because it'll take forever for the rest of the runs to finish)
19:03 [Coke] note that several tests now say "killed", which I didn't notice earlier. (I think killing them originally segfaulted)
19:04 diakopter heh, 137 segfaults
19:04 [Coke] heh, was just counting that. :)
19:04 [Coke] several of those were posted as one liners to #moarvm yesterday
19:05 ivanshmakov joined #perl6
19:06 japhb raydiak: ObPRayReleaseCheck
19:06 [Coke] most failures in S05.
19:06 [Coke] diakopter: 174 instances of CORE.setting.moarvm:print_exception
19:08 FROGGS[mobile] --ll-exception would show the real error
19:08 diakopter so 137/771 files segfaulted
19:08 FROGGS[mobile] I really like the result
19:10 diakopter the birthing pangs, they are coma-inducing
19:10 [Coke] r: say 137/771
19:10 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«0.177691␤»
19:12 [Coke] diakopter: double free  in there, too.
19:12 btyler joined #perl6
19:13 diakopter overly liberal
19:27 dalek joined #perl6
19:28 masak joined #perl6
19:28 synopsebot joined #perl6
19:28 PerlJam joined #perl6
19:29 dalek joined #perl6
19:29 Juerd joined #perl6
19:30 hugme joined #perl6
19:32 Util joined #perl6
19:32 [Coke] joined #perl6
19:34 pmichaud joined #perl6
19:50 lue hello world! o/
19:53 raiph \o lue
19:55 lue FROGGS: I'm not sure I like thinking of my grammar and actions as mere attributes to a class, but that's something I can deal with :)
19:56 raiph "The Lost Art of C Structure Packing" https://news.ycombinator.com/item?id=6995568
19:56 FROGGS lue: I share that feeling, so please come up with something better :o)
19:56 FROGGS (that is still sane)
19:57 lue About that "Perl 6 grammar in NQP" issue: I imagine at some point we'd have to rewrite the grammar as Perl 6 (or remind ourselves the NQP is a subset of P6 and could quite easily be dealt with as P6 because of it)
19:57 FROGGS problem is that you have different classes... it is a NQPCursor against a Cursor class for example
19:58 raiph I'm curious about the degree to which nqp, reprs, and zavolaj allow the sort of C Structure Packing art discussed in the above article and its HN post.
20:01 FROGGS raiph: I think we want something like shown in the very last comment here https://gist.github.com/FROGGS/6464777
20:01 arnsholt raiph: Zavolaj allows it, in the sense that it lays out structs as C would
20:01 arnsholt It's pretty much orthogonal
20:02 kurahaupo joined #perl6
20:03 arnsholt It might be interesting to get P6opaque to lay out its memory to minimise wastage though
20:03 lue FROGGS: well, I personally think "slang" (the general idea of it, anyway) is closer to "module" and "package" than it is "class".
20:04 lue Hang on, wouldn't a slang need a Foo::World too? Or am I just being silly there? :)
20:05 FROGGS lue: depends
20:06 FROGGS but yeah, I think it would not be very unlikely to have a World too :o)
20:07 lue Yeah, I'm lead to think that any setup that forces a particular number of classes/other things would eventually hurt someone. Hrm....
20:08 lue (which means no sort of slang Foo grammars G actions A module-loaders ML; )
20:17 fribeiro joined #perl6
20:20 lue I keep on thinking there should be a "speak" keyword for slangs, à la "make" keyword, but I have no clue what that would actually *do* :D
20:21 TimToady you don't 'use English'?
20:22 huf there's English in perl6 too?
20:22 TimToady no, but there's English in English :)
20:22 huf oh good.
20:22 lue TimToady: no, I meant some sort of  slang Foo { #`(stuff that makes up that slang) ; speak this-command-brings-it-all-together }
20:23 mcglk joined #perl6
20:24 lue I keep on thinking that kind of "speak" command would be helpful, I just have no clue what it would do, exactly, or why it'd be necessary :)
20:25 TimToady in that case bikeshedding the word seems a bit...premature...
20:25 mcglk joined #perl6
20:27 lue My best description for the idea is "kind of like 'make', except it assembles a slang instead of an AST"
20:28 mcglk joined #perl6
20:28 mcglk Apparently, I can only type in 60 characters or so at a time.
20:28 mcglk Weird.
20:29 FROGGS mcglk: just increase your key repeat rate :o)
20:31 hoelzro how do you get Perl 6 to interpolate members of a range?
20:31 hoelzro ex. I have 0,9..81
20:31 hoelzro I want multiples of 9
20:32 TimToady add another .
20:32 hoelzro obviously map({ $_ * 9 }, 0 .. 8) would work
20:32 diakopter .
20:32 hoelzro ah, thanks TimToady, diakopter
20:32 TimToady p: say 0,9...81
20:32 diakopter pugs: say 0,9...81
20:33 TimToady hmm
20:33 diakopter camelia: alive?
20:33 camelia rakudo-parrot a77214: OUTPUT«0 9 18 27 36 45 54 63 72 81␤»
20:33 camelia pugs: OUTPUT«*** ␤    Unexpected "81"␤    expecting operator, ":", "," or term postfix␤    at /tmp/ZPlzbVtHhx line 1, column 11␤»
20:33 hoverboard joined #perl6
20:35 diakopter p: say 0,9...
20:35 [Coke] anyone talks to au, we could use some pugs maintenance, btw.
20:35 camelia rakudo-parrot a77214: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/g4wTf2LDHuâ�¤Confusedâ�¤at /tmp/g4wTf2LDHu:1â�¤------> [32msay 0,9...[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        dotty method or postfixâ�¤Â»
20:35 diakopter au has another pit or few
20:39 hoelzro is there a way to specify the RNG used by Array.pick?
20:40 * [Coke] guesses srand, if the backends implement that.
20:40 hoelzro I'm guessing I could tweek it with srand
20:41 hoelzro but I was hoping there'd be a :rng option to pick/roll
20:42 TimToady what is the proper scope of a rng?
20:42 hoelzro now that I'm not sure about =)
20:43 lue r: srand(42); say "alive!"
20:43 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«alive!␤»
20:43 lue r: my sub srand($int) { say $int }; srand(42); say "alive!"
20:43 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«42␤alive!␤»
20:45 TimToady if one says "lexical", then one immediately has the problem that Array.pick is not compiled in your lexical scope :)
20:46 hoelzro I would assume I would create some Random-doing object $rng, and I could say @seq.pick(:$rng)
20:46 hoelzro and $rng.next (or whatever) would be called
20:46 * [Coke] has promised to give a 30m perl 6 presentation at the next (re-inaugural) albany.pm meeting!
20:46 lue TimToady: almost as if you need something that can be made in a lexical fashion, but functions quite exotically. Hmmmmmmm
20:46 [Coke] now to find some presentation I can borrow! :)
20:47 TimToady lue: well, you're talking about lift semantics, which are sufficiently problematic that we removed "lift" from the language
20:47 TimToady instead we'll figure out some macroish variant that can integrate the current lexical scope's definitions for various things
20:47 TimToady but it's hard to justify turning .pick into a macro
20:48 lue TimToady: I'd prefer to see a "replace RNG" solution more general than specific functions :)
20:48 hoelzro why can't rng just be passed in as an object?
20:48 TimToady much easier to justify thinking of .EVAL as a macro, since it depends on the current language, as influences the current language's semantics
20:48 TimToady s/as/and/
20:49 lue use RNG &myfunc; or something.
20:49 hoelzro hmm
20:49 TimToady lue: but what is the scope of that?
20:49 hoelzro is there a way to maintain a Set of objects? I tried using hash keys, but they get stringified
20:50 hoelzro I guess I could do %h{$obj} = $obj
20:50 lue hoelzro: have you tried Set ? :P
20:50 * skids notes case of concurrent use (and hence alteration) of RNG
20:50 hoelzro lue: no, I didn't see it on doc.perl6.org =/
20:51 TimToady p: say set([<a b c>], [<d e f>]).perl
20:51 camelia rakudo-parrot a77214: OUTPUT«set(["a", "b", "c"],["d", "e", "f"])␤»
20:51 lue TimToady: Somehow that RNG scope question makes me think of slang scoping.
20:51 TimToady p: say set([<a b c>], [<d e f>]).list[0].WHAT
20:51 camelia rakudo-parrot a77214: OUTPUT«(Array)␤»
20:52 TimToady looks like an object to mee
20:53 TimToady lue: yes, was thinking a similar thing, but languages must be used in lexical scopes; you aren't allowed to change someone else's language out from under them
20:53 lue Oh! FROGGS: 'slang' can't be just syntactic sugar for 'class ... does Slangy', because 'augment slang' and 'supersede slang' should still be usable.
20:53 TimToady the *use* of slangs must be lexical
20:53 lue TimToady: oh, that would mean that 'augment/supersede slang' is strictly disallowed.
20:53 TimToady that would be a lexical declaration
20:54 TimToady was intended as lexical
20:54 * lue does not support the current redefinition of augment/supersede just for slangs
20:54 FROGGS what about `augment $~MAIN.grammar`?
20:55 FROGGS or just `augment Perl6::Grammar`
20:55 FROGGS (once we can do that)
20:55 lue slang Foo <inherits> MAIN { ... }; $~MAIN = $~Foo;  would be better than how it's currently spec'd, which is  augment slang MAIN { ... }
20:56 FROGGS errm, I am talking rubbish
20:56 FROGGS it actually would be `augment grammar Perl6::Grammar`
20:57 lue FROGGS: I feel like we'd need a keyword that combines temp and augment. "derivative"?
20:57 TimToady it seems meaningless to untie it from the current language braid
20:57 perigrin that'll be easy to misread as "argument grammer Perl6::Grammer" which just means "you're reading backlog in #perl6 again"
20:59 lue TimToady: I'd much rather see new keywords usable by lots of things than a change in the meanings of 'augment' and 'supersede' for just slangs.
20:59 TimToady I'm fine with not using 'augment'
20:59 FROGGS well... if we want to say that we want to change the current language (lexically?), and the slang keyword is meant to "install" a language, then `augment slang Perl6::Grammar` makes sense again
21:00 lue (because I bet some class users would like a temp+augment keyword too.)
21:00 FROGGS would be still weird that slang would only mean a grammar here and a collection in my proposal
21:00 TimToady but we need two things: 1) a way to mixin to a current braid containing anonymous languages, and 2) a way to import that new language into the braid
21:00 TimToady COBOL only needs the second
21:01 TimToady but 'augment' semantics need both
21:02 berekuk joined #perl6
21:03 lue I always thought that adding new braids would entail a $NEWBRAID.parse($<text>) in some action method of an existing braid.
21:05 * lue maybe meant s:g/braid(s?)/item$0 in the braid/
21:10 Rotwang joined #perl6
21:11 kivutar joined #perl6
21:19 skids r: role R { has $!f = 41 }; role G does R { method g { $!f.say }}; class C does G { }; C.new.g;
21:19 camelia rakudo-jvm a77214: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/gWmwvS1Y7Mâ�¤Attribute $!f not declared in role Gâ�¤at /tmp/gWmwvS1Y7M:1â�¤------> [32m}; role G does R { method g { $!f.say }}[33mâ��[31m; class C does G { }; C.new.g;[0mâ�¤    expecting any of:…»
21:19 camelia ..rakudo-parrot a77214: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/iYtTkwzuiaâ�¤Attribute $!f not declared in role Gâ�¤at /tmp/iYtTkwzuia:1â�¤------> [32m}; role G does R { method g { $!f.say }}[33mâ��[31m; class C does G { }; C.new.g;[0mâ�¤    expecting any …»
21:21 masak FROGGS: sorry, haven't backlogged, and you seem to be having fun talking about slangs.
21:21 masak FROGGS: so maybe this has come up already.
21:22 FROGGS :o)
21:22 masak FROGGS: but it seems to me one of the importantest things about traits is that variables in the outer language are (as per the discretion of the slang author) accessible in the inner language.
21:22 masak i.e. the slang needs to be able to somehow "inherit" the pads of the outer language.
21:23 masak this follows easily if you consider qq strings a slang, for example.
21:23 FROGGS that is why v5 uses the same World#
21:23 masak ah, World. yes.
21:23 masak that's probably what I'm thinking of.
21:23 masak so slang should be grammar+actions+world.
21:23 masak and the world can Simply Be The Same as the outer's.
21:24 FROGGS it is only a porblem when the inner language has other sigils
21:24 masak then that's the inner's problem :P
21:24 FROGGS true :o)
21:25 FROGGS like you can access much from v5's blocks but not everything..., well, maybe indirectly everything
21:25 masak it's hard but not impossible to find out whether you're a Real Perl 5, or just a Perl 5 in a vat.
21:26 masak a Perl 5 brain in a Perl 6 vat, that is.
21:29 lue .oO(Geez, slangs making big changes to Perl 6 seem like they'd be a lot of work to write, what with where the discussion have been going. ☺)
21:30 rjbs Every time someone mentions slangs, I think of slrn.
21:32 dagurval r: say (gather { my %a = ^2; my %b = 'a', 'b'; take %a; take %b; take { a => 'b' } }).perl
21:32 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«("0" => 1, "a" => "b", {"a" => "b"}).list␤»
21:33 dagurval how can I get take %a and %b as hash, take flattens them ._.
21:33 dagurval n/m, I can wrap them in { } ofcourse
21:33 FROGGS r: say (gather { my %a = ^2; my %b = 'a', 'b'; take $%a; take $%b; take { a => 'b' } }).perl
21:33 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«({"0" => 1}, {"a" => "b"}, {"a" => "b"}).list␤»
21:33 dagurval even better :)
21:33 dagurval thanks
21:34 FROGGS yw
21:34 raydiak r: role R { trusts G; has $!f = 41 }; role G does R { method g { self!R::f().say }}; class C does G { }; C.new.g;
21:34 camelia rakudo-jvm a77214: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NBLnBgxQSm�Cannot call private method 'f' on package R because it does not trust G�at /tmp/NBLnBgxQSm:1�------> [32m; role G does R { method g { self!R::f()[33m�[31m.say }}; class C does G…»
21:34 camelia ..rakudo-parrot a77214: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/shxjehk1Yp�Cannot call private method 'f' on package R because it does not trust G�at /tmp/shxjehk1Yp:1�------> [32m; role G does R { method g { self!R::f()[33m�[31m.say }}; class C doe…»
21:35 masak rjbs: why? I have no experience with that news client, so I fail to see the connection. :)
21:35 dagurval are there any #perl6 happenings at FOSDEM, beside lectures at the devroom?
21:35 hoelzro yes
21:35 hoelzro oops, sorry
21:35 rjbs masak: slrn is the S-Lang newsreader, using S-Lang for internal scripting
21:50 dagurval rp: my @a := gather { take 1, take 2 }; say @a;
21:50 camelia rakudo-parrot a77214: OUTPUT«2 1 2␤»
21:50 dagurval how did that final 2 get into the output?
21:51 segomos_ you get a list like 2, (1, 2)
21:53 BenGoldberg joined #perl6
21:55 masak rjbs: oh!
21:56 itz_ joined #perl6
22:02 segomos_ dagurval: i'd imagine you get take(1,take(2)) which results in 2, (1, 2)
22:03 segomos_ since take seems to return the value taken
22:03 FROGGS rp: my @a := gather { take(1), take(2) }; say @a;
22:03 camelia rakudo-parrot a77214: OUTPUT«1 2␤»
22:04 FROGGS segomos_++
22:04 segomos_ r: say gather { say take 2 };
22:04 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«2␤2␤»
22:04 segomos_ r: my @a := gather { take 1; take 2; }; say @a;
22:04 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«1 2␤»
22:04 masak TimToady: http://link.springer.com/chapt​er/10.1007%2F3-540-15975-4_33 sounds very much like STD's approach to Cursors.
22:05 segomos_ p6 has all kinds of cool shit
22:05 dagurval segomos_: because the inner take is called first. Nice, didn't think of that.
22:05 segomos_ stuff..has all kinds of cool stuff
22:06 FROGGS *g*
22:07 masak dagurval: that simply follows from the fact that routine invocation is strict, so the arguments have to be evaluated before the call to the outer &take.
22:08 masak but yes, it's a bit funky to wrap one's head around, as execution basically "pauses" between evaluating the inner &take and the outer &take :)
22:09 dagurval masak: it's simple when you get it :)
22:11 dagurval masak: are you going to FOSDEM this year?
22:14 dagurval rp: my @a := gather for ^3 { next; take $_; }; say @a
22:14 camelia rakudo-parrot a77214: OUTPUT«␤»
22:14 skids r: role A { method pub { self!priv }; method !priv () { "OHAI".say } }; class C does A { }; C.new.pub;
22:14 camelia rakudo-jvm a77214: OUTPUT«Nominal type check failed for parameter 'null'␤␤»
22:14 camelia ..rakudo-parrot a77214: OUTPUT«Nominal type check failed for parameter ''; expected $?CLASS but got C instead␤  in method priv at /tmp/eL6iqOxDYJ:1␤  in method pub at /tmp/eL6iqOxDYJ:1␤  in block  at /tmp/eL6iqOxDYJ:1␤␤»
22:14 dagurval next not allowed in gather for?
22:14 skids r: role A { method pub { self!priv }; method !priv ($self:) { "OHAI".say } }; class C does A { }; C.new.pub;
22:14 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«OHAI␤»
22:18 jnap joined #perl6
22:18 masak dagurval: unfortunately not :/
22:19 masak (re FOSDEM)
22:19 masak dagurval: 'next' is allowed, but you nexted through the whole loop :P
22:19 masak unconditional 'next' is pretty weird.
22:19 masak skids: that... looks like a bug to me. at first blush.
22:20 masak skids: looks like 'self' isn't parameterized correctly in private methods in roles.
22:20 dagurval yes I did ._.
22:20 masak r: class A { method pub { self!priv }; method priv { say "OH HAI" } }; A.new.pub
22:20 camelia rakudo-jvm a77214: OUTPUT«No such private method '!priv' for invocant of type 'A'␤␤»
22:20 camelia ..rakudo-parrot a77214: OUTPUT«No such private method '!priv' for invocant of type 'A'␤  in method pub at /tmp/KEMyxqdt4o:1␤  in block  at /tmp/KEMyxqdt4o:1␤␤»
22:20 masak r: class A { method pub { self!priv }; method !priv { say "OH HAI" } }; A.new.pub
22:20 camelia rakudo-parrot a77214, rakudo-jvm a77214: OUTPUT«OH HAI␤»
22:21 lue masak: wait, how is that a bug? Seems reasonable to me.
22:21 masak skids: do you know if that's already submitted?
22:21 masak lue: note, it works in my last eval.
22:21 masak lue: but it doesn't work in skid's first.
22:21 masak lue: the only difference is that in skid's case, pub and !priv are in a role.
22:22 skids masak: I do not.  I was removing old workarounds from a year + ago and found it.
22:22 * masak submits rakudobug
22:22 masak skids++
22:22 masak skids: I've found some of my best rakudobugs by making refactors which "should just work" :P
22:23 lue masak: oh, I thought you were discussing skids' last eval. nevermind then :)  [somehow I also missed the $self: in that eval]
22:24 masak the second has a $self:
22:24 masak the first doesn't.
22:24 dbrock joined #perl6
22:24 masak the fact that those two differ in their result is also suspect.
22:24 skids At least the $self is a better workaround now than using a public method was.
22:25 masak aye.
22:25 masak (better workarounds)++
22:28 masak https://rt.perl.org/Ticket/Display.html?id=120919
22:32 skids .oO(I don't have nearly the great debugging instincts as most here, but something about Perl6 brings them out.  Jamming that $self in there just seemed like the right move.)
22:33 skids kudos to the vastly improved error messages to at least get me in the right ballpark.
22:34 masak :)
22:36 dbrock joined #perl6
22:37 skids anyway, time to brave the cold and snow.
22:37 masak speaking only for myself, debugging instincts are acquired. every debugging session is a kind of repeated bisection.
22:37 masak learning to *do* the bisection is fairly simple. learning *where* to do the bisection is where experience comes in.
22:39 * masak .oO( either your buggy component is indivisible, or you're not done yet )
22:41 japhb .oO( Hitting it with a hammer: $1.  Knowing *where* to hit it: $9,999. )
22:42 kurahaupo ˙°O( Knowing *when* to hit it: another $9,999 )
22:46 raydiak japhb: after you asked, I decided to try to kick it out the door today, so probably in the next 5 or 10 hours
22:55 perigrin w 22
22:55 perigrin :/
23:02 masak perigrin: come back! we're so much nicer than w 22! :P
23:03 perigrin I dunno ... 22 is #catalyst
23:03 perigrin they're pretty nice.
23:07 masak oh, indeed.
23:11 japhb raydiak: \o/
23:12 jnap joined #perl6
23:12 telex joined #perl6
23:12 wingfold joined #perl6
23:13 masak 'night, #perl6
23:13 japhb 'night, masak
23:23 telex joined #perl6
23:29 telex joined #perl6
23:32 jnap joined #perl6
23:32 ajr joined #perl6
23:33 hoverboard joined #perl6
23:42 cooper joined #perl6
23:59 cooper joined #perl6
23:59 cooper joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo