Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-02-06

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:05 fasad joined #perl6
00:10 aloha joined #perl6
00:13 PZt joined #perl6
00:36 [Coke] "I don't know what it's for"... junk DNA. Awesome.
00:40 Trashlord joined #perl6
00:46 colomon ;)
00:46 colomon you don't mess with TimToady's code.
00:46 colomon unless you need to to make it work.  ;)
00:52 eviltwin_b (of course we're finding junk DNA mostly isn't)
00:54 Chillance joined #perl6
00:58 colomon errr... for the record, the code does *not* work without the allegedly junk BUILD method
00:58 colomon TimToady++
00:59 chee does it work if you take out all the commands?
01:01 benabik I think the problem was the parameter should have been :%!elems, not just %!elems
01:07 drbean joined #perl6
01:16 kmwallio joined #perl6
01:21 drbean joined #perl6
01:25 * colomon is adding oodles of KeyBag tests and watching the Super Bowl
01:31 Woodi joined #perl6
01:35 drbean joined #perl6
01:48 colomon So what should the Numeric value of a Bag / KeyBag be?
01:51 drbean joined #perl6
02:02 drbean joined #perl6
02:10 sorear colomon: I vote for "same as .elems", whatever that is.
02:10 colomon niecza: my $a; $a += 10; say $a
02:10 p6eval niecza v14-18-gc83b9cd: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1207 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 240 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/_JFeKRbOA6 line 0 (mainli…
02:10 colomon niecza: my $a; $a++; say $a
02:10 p6eval niecza v14-18-gc83b9cd: OUTPUT«1␤»
02:12 colomon sorear: that's what it is now, but if you think of the Bag as a bag of colored marbles, that's giving you the number of colors rather than the number of marbles.  though I guess that is how a Hash works....
02:17 drbean joined #perl6
02:23 * fasad is looking forward to a talk by RMS in his institute today :)
02:24 fasad how is RMS as a speaker? anyone here heard any talks by RMS?
02:25 sorear I don't know anything about him as a speaker, but I've heard he's a horrible human being
02:25 sorear especially regarded as such in geek-feminism circles
02:26 fasad oh !
02:26 fasad but still he's the father of OSS...
02:27 * fasad will be back with details of the talk later
02:27 * fasad afk
02:29 kst joined #perl6
03:14 preflex joined #perl6
03:19 alvis joined #perl6
03:24 cognominal fasad, these days he tries to evangelize OSS but he tends to lose focus, insisting about calling Linux Gnu/Linux and desparaging Open Source as being evil. To the outsider it sound like a trotskyst badmouthing othet trotskysts over obscure catechism points.
03:25 cognominal *disparaging.
03:28 cognominal Critcizing him is easy. As a geek, I am not the last to forget to adapt my talks to the specific audience.
03:29 dalek niecza: 256172a | (Solomon Foster)++ | lib/CORE.setting:
03:29 dalek niecza: Expand Set, KeySet, Bag, and KeyBag .new to specially handle (Key)Sets and maybe (Key)Bags.  Not 100% clear if this is to spec or not (I think the only mention was in the spectests).
03:29 dalek niecza: review: https://github.com/sorear/niecza/commit/256172a1da
03:31 dalek roast: cf643f6 | (Solomon Foster)++ | S02-types/keybag.t:
03:31 dalek roast: Add 21 new tests.  Still needs more.
03:31 dalek roast: review: https://github.com/perl6/roast/commit/cf643f65fb
03:37 cognominal joined #perl6
03:52 orafu joined #perl6
03:59 DarthGandalf joined #perl6
04:05 ajox joined #perl6
04:23 Su-Shee_ joined #perl6
04:26 xinming joined #perl6
05:04 ajox joined #perl6
05:10 birdwindupbird joined #perl6
05:33 ajox joined #perl6
05:41 moritz \o
05:43 TimToady o/
05:48 sorear /o
05:53 moritz what would @someLoL.tree(2, 2) do? same as .tree(4) ?
05:54 dalek rakudo/nom: 33fb020 | moritz++ | src/core/ (2 files):
05:54 dalek rakudo/nom: implement more .tree forms
05:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/33fb020a12
05:55 dalek roast: f684933 | moritz++ | S02-lists/tree.t:
05:55 dalek roast: more List.tree tests
05:55 dalek roast: review: https://github.com/perl6/roast/commit/f68493366c
05:56 moritz also it would be nice to get a sanity review for this commit
05:56 TimToady I suppose; I'd entirely forgotten about the numeric args
05:57 * TimToady still wonders if it should be called .strata instead...
05:57 moritz I guess it only makes sense in combination with the closure form
05:57 moritz .tree(2, *.map(&something), 2)
05:58 TimToady well, 2 is just sugar for *.Seq xx 2 (or whatever we do for Seq these days)
05:58 moritz maybe *.item
05:58 TimToady hmm, *.Seq xx 2 probably doesn' tdo the right thing...
05:59 TimToady { .item } xx 2 is more like, I guess
06:06 rsimoes joined #perl6
06:10 Trashlord joined #perl6
06:11 zjmarlow joined #perl6
06:30 xuser joined #perl6
06:32 xuser left #perl6
06:49 moritz nom: say lines()>>.words.tree.map: *.elems
06:49 p6eval nom 33fb02: OUTPUT«1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1␤»
06:50 moritz nom: say lines()>>.words.tree.perl
06:50 p6eval nom 33fb02: OUTPUT«("Land", "der", "Berge,", "Land", "am", "Strome,", "Land", "der", "Äcker,", "Land", "der", "Dome,", "Land", "der", "Hämmer,", "zukunftsreich!", "Heimat", "bist", "du", "großer", "Söhne,", "Volk,", "begnadet", "für", "das", "Schöne,", "vielgerühmtes", "Österreich,", "v…
06:50 moritz nom: say lines()>>.words.perl
06:50 p6eval nom 33fb02: OUTPUT«(("Land", "der", "Berge,", "Land", "am", "Strome,").list, ("Land", "der", "Äcker,", "Land", "der", "Dome,").list, ("Land", "der", "Hämmer,", "zukunftsreich!").list, ("Heimat", "bist", "du", "großer", "Söhne,").list, ("Volk,", "begnadet", "für", "das", "Schöne,").list,…
06:51 moritz hm
07:01 wtw joined #perl6
07:01 moritz nom: say (("Land", "der", "Berge,", "Land", "am", "Strome,"), ("Land", "der", "Äcker,", "Land", "der", "Dome,")).tree.map: *.elems
07:01 p6eval nom 33fb02: OUTPUT«6 6␤»
07:01 moritz so .tree works for nested parcels, but not nested lists.
07:02 bonsaikitten ah, good old patriotism :)
07:02 moritz nom: say lines().elems
07:02 p6eval nom 33fb02: OUTPUT«23␤»
07:02 moritz nom: say lines()>>.words.elems
07:02 p6eval nom 33fb02: OUTPUT«81␤»
07:03 Psyche^ joined #perl6
07:05 moritz nom: say lines()>>.words.WHAT
07:05 p6eval nom 33fb02: OUTPUT«Parcel()␤»
07:05 Trashlord joined #perl6
07:05 moritz nom: say lines()>>.words.list.perl
07:05 p6eval nom 33fb02: OUTPUT«("Land", "der", "Berge,", "Land", "am", "Strome,", "Land", "der", "Äcker,", "Land", "der", "Dome,", "Land", "der", "Hämmer,", "zukunftsreich!", "Heimat", "bist", "du", "großer", "Söhne,", "Volk,", "begnadet", "für", "das", "Schöne,", "vielgerühmtes", "Österreich,", "v…
07:05 sorear awww.
07:05 moritz oh, that step flattens already :/
07:05 sorear https://en.wikipedia.org/w/index.php?t​itle=Land_der_Berge,_Land_am_Strome&am​p;diff=471851989&amp;oldid=471187627
07:07 bonsaikitten gotta love the gender-neutral attempts by the "all sex is rape" 'tards
07:07 moritz well, not even I would have considered that notable for an encyclopediatric entry
07:07 sorear erm, no, those are unrelated
07:11 masak morning, #perl6.
07:11 moritz nom: say lines()>>.words.lol.map: *.elems
07:11 p6eval nom 33fb02: OUTPUT«6 6 4 5 5 2 2 0 4 5 4 4 4 2 2 0 5 6 3 4 4 2 2␤»
07:11 moritz \o masak
07:11 moritz nom: say lines()>>.words.lol.elems
07:11 p6eval nom 33fb02: OUTPUT«23␤»
07:11 sorear morning, masak
07:12 moritz nom: say lines()>>.words.elems
07:12 p6eval nom 33fb02: OUTPUT«81␤»
07:12 * sorear finds eirself in a defensive mood
07:20 sorear bonsaikitten: You should know that attaching "'tards" to a sweeping overgeneralization like that is very unwelcome behavior here.
07:21 bonsaikitten sorear: I've filtered down my expression to about the minimal level I can use without not saying anything
07:21 bonsaikitten sorear: I just really really hate people that want to control what I say or think :)
07:22 sorear it looks to me the other way around.
07:22 sorear other people are using gender-neutral pronouns, and you're complaining about it.
07:22 sorear please don't try to control what *I* think.
07:22 bonsaikitten no, they are trying to bend language
07:22 bonsaikitten he-man becomes it-man!
07:23 * TimToady bends language all day long
07:23 bonsaikitten I had too endure too much language corruption from female supremacists, it's easier to keep language as it is, even if "man" may be ambiguous
07:24 * masak reads http://geekfeminism.wikia.​com/wiki/Richard_Stallman and is astonished and sad
07:24 sorear "female supremacists"?  are you serious?
07:25 bonsaikitten yes
07:25 bonsaikitten they don't want equality
07:25 bonsaikitten whenever we offer them equality they attack us at male pigs
07:25 bonsaikitten so sad.
07:25 TimToady so don't be a pig
07:25 bonsaikitten TimToady: sorry, I have a penis by birth
07:26 bonsaikitten TimToady: nothing I can do about that heinous crime against feminists
07:26 TimToady take it elsewhere please
07:26 TimToady this is not a hate channel
07:26 masak I don't think a good stance towards feminism is ridicule.
07:26 masak bonsaikitten--
07:26 bonsaikitten masak: I'm an egalitarian ... treat everyone equal, not create artificial divides
07:27 TimToady then stop acting like your manhood is threatened when it isn't
07:27 masak bonsaikitten: you're using language yourself that doesn't befit an egalitarian.
07:27 masak bonsaikitten: sorear called you on it.
07:28 bonsaikitten masak: I'm unwilling to compromise on facts
07:29 TimToady fine; don't compromise on them elsewhere please
07:30 * moritz finds he doesn't understand List/LoL/Parcel at all
07:30 masak moritz: do you have excellent questions for us to ponder?
07:32 moritz masak: no, my current questions are more on the "wtf?" level
07:32 moritz as far as I can understand, a List can contain (flattening) lists
07:33 moritz and .[] and .elems etc. behave as if they were flattened out
07:33 moritz Parcels can have flattening sublists too
07:34 moritz and if you .lol a Parcel, it stops the sublists from flattening
07:34 masak "wtf?" is a question :)
07:34 moritz so far so good
07:34 masak aye.
07:34 moritz masak: but not an excellent question
07:34 moritz now
07:34 masak no, granted.
07:34 moritz Parcel.list flattens out the sublists
07:34 moritz and that surprises me
07:34 TimToady me too
07:35 TimToady that's why we have .flat
07:35 moritz because the List interface already keeps up the pretense of flatness
07:36 TimToady .list is supposed to be transparent to subparcels
07:38 moritz it is, but not to sublists
07:38 moritz nom: say ((1, 2), (3, 4)).list.perl
07:38 p6eval nom 33fb02: OUTPUT«((1, 2), (3, 4)).list␤»
07:38 * masak feels nestedly confused
07:38 moritz that still has the subparcels
07:38 moritz nom: say ((1, 2).list, (3, 4).list).perl
07:38 p6eval nom 33fb02: OUTPUT«((1, 2).list, (3, 4).list)␤»
07:38 moritz that still has the sublists
07:38 moritz but
07:38 moritz nom: say ((1, 2).list, (3, 4).list).list.perl
07:39 p6eval nom 33fb02: OUTPUT«(1, 2, 3, 4).list␤»
07:39 moritz poof! gone!
07:39 moritz nom: say ((1, 2).list, (3, 4).list).[0]
07:39 p6eval nom 33fb02: OUTPUT«1␤»
07:39 moritz nom: say ((1, 2), (3, 4)).[0]
07:39 p6eval nom 33fb02: OUTPUT«1␤»
07:39 moritz nom: say ((1, 2), (3, 4)).list.[0]
07:39 p6eval nom 33fb02: OUTPUT«1 2␤»
07:40 * moritz -> another short sleep cycle, I hope
08:20 yves joined #perl6
08:28 tarch joined #perl6
08:30 Woodi joined #perl6
08:32 Su-Shee good morning everyone.
08:35 masak morning, Su-Shee.
08:35 Su-Shee dear russia, please take back your winter, thank you, yt europe. *shiver*
08:37 masak how cold? here we have a pleasant -1 ℃, and flurries.
08:37 Su-Shee -16
08:38 Su-Shee and I just walked into the office.. ;)
08:38 masak holy crap.
08:38 Su-Shee it's one of those treacherously sunny and bright winter days, just pretending to be pleasant.. ;)
08:38 masak my guess is you're somewhere inland... :)
08:39 mj41 joined #perl6
08:40 Su-Shee masak: berlin is on the tip of a weather tongue which brings us insane heat in summer (if you'd look onto a european map, we're the tip of balkan heat) and in winter we often get eastern winds and those bring the russian winter.. ;)
08:40 Su-Shee and there's only flat land between russia and berlin. nothing to break wind. nicely flat for 1000km
08:44 masak ouch.
08:45 masak you should put up, I dunno, like a wall to protect you from Eastern Europe...
08:45 Su-Shee man now I finally know why the weather went so weird.. ;)
08:45 masak ;)
08:46 * Su-Shee goes rebuilding the berlin wall. it stood right in front of my building. should protect me nicely.
08:47 Su-Shee masak: why are you so warm in january in _sweden_?!
08:48 masak it got really cold around Friday/Saturday. but now it's back up to slightly below freezing again.
08:49 masak overall, we've had a really mild first half of the winter.
08:49 Su-Shee haha january the 12th was 0.1 WARMER than july 12th this season..
08:53 masak The time is out of joint; O cursed spite,
08:53 masak That ever I was born to set it right!
08:58 birdwindupbird joined #perl6
08:59 moritz huh, why does class Parcel has its own at_pos *and* postcircumfix:<[ ]> ?
09:01 rsimoes left #perl6
09:02 masak sounds like a thinko.
09:12 masak oh hey. refreshing the weather widget made the temperature jump down to -9 ℃.
09:12 masak that's more like it.
09:12 tadzik good morning
09:13 Su-Shee masak: and if you rub your monitor it gets warmer? ;)
09:13 masak morning, dear tadzik! \o/
09:13 masak Su-Shee: maybe if I rub the weather station that feeds my phone the data :P
09:14 Su-Shee masak: just wrap your wlan router into a warm blanky!
09:15 frettled masak: lovely winter weather :)
09:16 frettled Has anyone heard from/seen mberends lately?  I don't see anything from or regarding him in my backlog.
09:16 moritz frettled: he's having much stress these days
09:16 moritz frettled: both business and family
09:16 moritz frettled: but he hopes to be back to Perl 6 hacking in a few weeks
09:16 frettled moritz: aha, thanks for the heads-up
09:20 ajox joined #perl6
09:20 daxim joined #perl6
09:45 [particle] joined #perl6
09:46 * jnthn enjoy his -9C 30 minute walk to teaching this morning :)
09:47 jnthn *enjoyed
09:47 jnthn moritz: I think there is a reason that Parcel has both of those...
09:48 jnthn moritz: I recall some bug a while back
09:48 * jnthn wishes he would remember the details
09:49 moritz I've removed it and spectested
09:49 jnthn Apparently, Siberia itself has been getting down to -35C of late. :)
09:49 jnthn moritz: OK...did it change anything?
09:49 moritz t/spec/S02-types/lists.rakudo                           (Wstat: 0 Tests: 29 Failed: 2) Failed tests:  26-27 TODO passed:   1, 3-4
09:49 jnthn moritz: Could always be in the testneeded
09:49 jnthn oh... :)
09:49 moritz and t/spec/S02-types/whatever.rakudo dies with
09:50 jnthn ah
09:50 moritz Method 'gimme' not found for invocant of class 'Parcel'
09:50 jnthn Was the bug (1,2,3)[*] maybe...
09:50 moritz or [] maybe
09:51 moritz # RT #61844
09:51 moritz is (0, 1)[*-1..*], 1,
09:55 moritz that's the test that dies
09:56 masak nom: say (0, 1)[*-1..*]
09:57 p6eval nom 33fb02: OUTPUT«1␤»
10:02 jnthn YAPC::EU CFP is open \o/
10:03 masak woot
10:03 * masak wonders what to send in
10:03 jnthn Talk proposals?
10:04 jnthn Or cake. Organizers would like that too, I guess. :)
10:04 masak A cake with a talk proposal on it.
10:04 jnthn Written in icing!
10:04 * moritz wants blueberries on the cake
10:05 moritz Ronja supports this notion too
10:05 tadzik jnthn: Siberia? We've had -30 here in Poland few days ago
10:05 * masak makes a note to buy blueberries on the way home
10:05 jnthn tadzik: That's...impressive
10:05 tadzik it's a bit cold :)
10:06 * jnthn has a big furry hat for these circumstances :)
10:07 not_gerd joined #perl6
10:07 * jnthn gets back to teaching stuffs
10:08 not_gerd jnthn: I took a look at 6model and tried to figure out how it could fit into Parrot
10:08 not_gerd jnthn: could you take a look at https://gist.github.com/1751167 and tell me if it looks somewhat sane?
10:11 * mathw likes this idea of submitting talk proposals in the form of cake
10:15 not_gerd phenny, tell jnthn http://irclog.perlgeek.de/​perl6/2012-02-06#i_5109668
10:15 phenny not_gerd: I'll pass that on when jnthn is around.
10:16 not_gerd left #perl6
10:31 colomon nom: my %h = a => 5, b => 10; for %h -> $a { say $a.WHAT; say $a; };
10:31 p6eval nom 33fb02: OUTPUT«Pair()␤"a" => 5␤Pair()␤"b" => 10␤»
10:33 moritz niecza: my %h = a => 5, b => 10; for %h -> $a { say $a.WHAT; say $a }
10:33 p6eval niecza v14-19-g256172a: OUTPUT«Pair()␤"a" => 5␤Pair()␤"b" => 10␤»
10:40 fasad joined #perl6
10:53 * fasad just came back from rms' talk
10:54 jlaire fasad: did you call him the father of OSS?
10:55 fasad jlaire: i did not, but...
10:55 arnsholt I'm sure he'd be really pleased with that =D
10:55 tadzik oh, I'm sure he want
10:55 jlaire hehe
10:55 tadzik erm, won't
10:56 tadzik you know, "It's Free Software! Not Open Source!"
10:56 fasad he himself said that him being called father of oss is possible only someone did artificial insemination and stole his sperms !
10:56 jlaire sounds like rms
10:56 fasad he also did his ""St. Ignutius" routine
10:57 daxim awesome. did he wear a poncho?
10:57 fasad with the "EMACS virgins joke"
10:57 fasad yeh he did wear his poncho and his halo !
10:57 fasad *yes
10:58 daxim http://thestallmandialogues.com/
10:58 fasad though he did spen considerablt time on criticizing "Mr Torvalds" & "his Linux"
10:59 fasad *spend
10:59 fasad *considerable
10:59 fasad argh
10:59 daxim I would be pretty pissed, too, if someone rained on my parade like that
10:59 moritz of course. The open source^W^Wfree software community would be much better off without linux</sarcasm>
11:00 Timbus hurds for all
11:00 tadzik oh-oh! It's GNU/Linux, remember!
11:00 fasad first thing, before anyone welcomes him, he says, "Please don't upload my photos on Facebook"
11:01 Timbus :I
11:01 mathw I can understand why he doesn't like Facebook, but that's a bit unreasonable. Then again, that's how I feel about quite a bit of what he says.
11:02 mathw He his not a man who makes much concession to practicality
11:02 fasad though overall, his 'free software philosophy' does raise some good points
11:02 arnsholt Much? I'd say any
11:02 fasad mathw: yeah, he is an idealist
11:02 moritz GNU without Linux iist just a LTA TLA
11:03 fasad he told the students, make sacrifices, never work for Microsoft or any company which makes propiterary software
11:04 fasad moritz: he did accept that GNU's kernel is far behind Linux
11:09 * fasad is reading http://geekfeminism.wikia.​com/wiki/Perl_is_my_bitch
11:12 * mathw failed at that... currently writing proprietary (albeit internal) software for Windows using Microsoft's dev tools
11:14 fasad which script converts the specs from pod to html for display on perlcabal ?
11:16 flussence https://github.com/perl6/Pod-To-HTML
11:17 fasad ah, thanks
11:18 moritz ohm, that's only for S26 I think
11:18 moritz for the others it's util/Text-Smartlinks/ in the perl6/mu repo
11:28 pdurbin joined #perl6
11:33 drbean joined #perl6
11:34 xinming joined #perl6
12:08 am0c joined #perl6
12:18 pernatiy joined #perl6
12:22 snearch joined #perl6
12:32 tokuhir__ joined #perl6
12:33 colomon niecza: sub f(*@a) { say @a.perl }; f({a => 10, b => 5}); f({a => 10, b => 5}.hash)
12:33 p6eval niecza v14-19-g256172a: OUTPUT«({"a" => 10, "b" => 5}, ).list␤("a" => 10, "b" => 5).list␤»
12:34 colomon nom: sub f(*@a) { say @a.perl }; f({a => 10, b => 5}); f({a => 10, b => 5}.hash)
12:34 p6eval nom 33fb02: OUTPUT«Array.new({"a" => 10, "b" => 5})␤Array.new("a" => 10, "b" => 5)␤»
12:35 colomon ??????
12:37 flussence perl6: say ({"a" => 10, "b" => 5}, ).list.perl eq Array.new({"a" => 10, "b" => 5}).perl; say ("a" => 10, "b" => 5).list.perl eq Array.new("a" => 10, "b" => 5).perl; # ?
12:37 p6eval rakudo 33fb02: OUTPUT«False␤False␤»
12:37 p6eval ..pugs b927740: OUTPUT«*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/wlGtyv1MQQ line 1, column 5-81␤»
12:37 p6eval ..niecza v14-19-g256172a: OUTPUT«Unhandled exception: Excess arguments to List.new, used 1 of 2 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (List.new @ 1) ␤  at /tmp/u4bxSzziXD line 1 (mainline @ 14) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3705 (ANON @ 3) ␤  at /h…
12:38 flussence ouch, .perl isn't even valid perl...
12:38 moritz colomon: it seems that .hash returns something that flattens in list context in rakudo
12:38 moritz in analogy to .list
12:39 colomon same in niecza
12:39 flussence niecza: say eval({a=>1}.list.perl).perl;
12:39 p6eval niecza v14-19-g256172a: OUTPUT«("a" => 1, ).list␤»
12:41 jnthn I think the .perl output in Rakudo is relatively careful to output things with the appropraite flatteningness
12:41 phenny jnthn: 10:15Z <not_gerd> tell jnthn http://irclog.perlgeek.de/​perl6/2012-02-06#i_5109668
12:44 bluescreen10 joined #perl6
12:49 jnthn phenny: tell not_gerd The GC bit is a little off, I suspect...STables can be statically marked/freed. And GC for objects should hang off the representation. Probably needs to think a bit about what existing Parrot v-tables actually mean. Some but not all are subsumed by REPRs.
12:49 phenny jnthn: I'll pass that on when not_gerd is around.
12:50 colomon nom: my %h = a => 5, b => 10; say %h.list.perl; say %h.pairs.perl
12:50 p6eval nom 33fb02: OUTPUT«("a" => 5, "b" => 10).list␤("a" => 5, "b" => 10).list␤»
12:51 jnthn phenny: tell not_gerd even when a REPR *does* seem to have a matching thing, it's not automatically the right answer. Consider get_integer vtable method in Parrot. It's used for HLL coercion interop, as well as unboxing. 6model cares about unboxing, but HLL interop isn't its (core) problem.
12:51 phenny jnthn: I'll pass that on when not_gerd is around.
12:52 jnthn phenny: tell not_gerd Also type checking and method lookup don't need to be virtual. They only are in current 6model 'cus I didn't get around to making them not be so. I mean, sure a call to type_check or find_method in the HOW is virtual - it's just a method call. But the looking in the v-table or method cache or type cache need not be virtual.
12:52 phenny jnthn: I'll pass that on when not_gerd is around.
12:54 masak arnsholt: here, I maded an example: https://gist.github.com/1751911
12:55 jnthn Indeed, they can't be if we want half decent dispatch performance...
13:00 arnsholt masak: I think I agree with the general idea
13:00 arnsholt I'd probably go for a syntax that is distinct from comments though
13:06 masak arnsholt: yeah. I'm not settled on that yet. my idea was to use something that falls back gracefully in Markdown -- and any HTML, including HTML comments, will just go through the Markdown parser verbatim.
13:06 masak for a while I considered using \[ \] like LaTeX's math mode, but that seemed arbitrary.
13:07 masak I think I want some kind of delimiters, because I don't want to be restricted to a single paragraph.
13:08 arnsholt The idea I've been fiddling with is quite explicitly inspired by TeX (that is, macro-expansion), but with lispy syntax using [] rather than ()
13:09 arnsholt Yeah, for big figures you'll definitely want some way to split it into several paragraphs
13:09 masak Niobium is definitely inspired by my adventures with dlx-simple (which I'll need to blog about at some point).
13:09 arnsholt But making it gracefully parseable as markdown at the same time is harder
13:09 masak in fact, Niobium would be an excellent backend for dlx-simple!
13:10 * jnthn wonders how to pronoucne that :)
13:10 masak jnthn: "najoubium" :)
13:10 jnthn Thanks :)
13:12 masak arnsholt: aye -- that was the advantage of <!-- -->, but I'm still on the lookout for something simpler.
13:12 masak something that doesn't hurt the eyes and that's simple to type.
13:16 alvis joined #perl6
13:20 masak arnsholt: how about either <{ ... }> or <<< ... >>> ?
13:20 moritz .oO( <Nb>...</Nb> )
13:20 masak ooh
13:21 masak <nb l="tree">...</nb>
13:21 masak perhaps.
13:24 jnthn <btw>...</btw>
13:25 moritz <orl>how does this structure look like?</orl><yrl>...</yrl>
13:27 masak I'm not too sold on the idea of introducing nonstandard tags like that... but it does blend in nicely.
13:28 moritz <marquee style="nb">...</marquee> # how about using standard tags? :-)
13:29 masak moritz, your karma will catch up with you one day.
13:29 jnthn Should use <blink ...> - because you only see it in some contexts :)
13:29 masak thank you, you're all being so helpful.
13:30 masak ;)
13:30 jnthn <пожалуйста />
13:31 flussence <figure class="nb">! http://www.whatwg.org/specs/web-apps/current-work/​multipage/grouping-content.html#the-figure-element
13:32 masak flussence: hm. :)
13:33 masak I could add some CSS for figure.nb that said "something went wrong, you shouldn't be seeing this".
13:34 moritz now design it in a way that the source text can be used as a reasonable alt-text... :-)
13:37 not_gerd joined #perl6
13:37 not_gerd hello, #perl6
13:37 phenny not_gerd: 12:49Z <jnthn> tell not_gerd The GC bit is a little off, I suspect...STables can be statically marked/freed. And GC for objects should hang off the representation. Probably needs to think a bit about what existing Parrot v-tables actually mean. Some but not all are subsumed by REPRs.
13:37 phenny not_gerd: 12:51Z <jnthn> tell not_gerd even when a REPR *does* seem to have a matching thing, it's not automatically the right answer. Consider get_integer vtable method in Parrot. It's used for HLL coercion interop, as well as unboxing. 6model cares about unboxing, but HLL interop isn't its (core) problem.
13:37 phenny not_gerd: 12:52Z <jnthn> tell not_gerd Also type checking and method lookup don't need to be virtual. They only are in current 6model 'cus I didn't get around to making them not be so. I mean, sure a call to type_check or find_method in the HOW is virtual - it's just a method call. But the looking in the v-table or method cache or type cache need not be virtual.
13:38 masak moritz: that should almost fall out automatically, I think.
13:40 arnsholt masak: Of the three, I think I'd go for <{ }>
13:40 masak arnsholt: nod.
13:41 arnsholt There's the non-standard tags bit (also, I'm not sold on SGML markup in general), and I think }> is less likely to crop up as something you might want to say in code than >>>
13:41 not_gerd jnthn: thanks for your comments
13:41 not_gerd jnthn: 2 questions:
13:41 not_gerd 1. do we actually need a repr-id - would the pointer do just as well?
13:42 jnthn REPRs are non-virtual.
13:42 not_gerd 2. why are things like SixModel_REPROps_Attribute not inlined into the REPROps table?
13:42 jnthn Well, let me make that clearer.
13:43 jnthn If you know statically what REPR a type has, they ain't. If you don't know then of course it's a runtime lookup.
13:43 jnthn 2 - I find the grouping useful, but it doesn't have to be that way.
13:44 jnthn That is, there's no functional reason particularly. You could flatten it.
13:44 xinming joined #perl6
13:44 not_gerd but you start the first lookup with a repr's name, correct? after that, you could just cache the pointer to the repr instead of its id...
13:44 jnthn oh, that's what 6model does throughout
13:44 jnthn The REPR pointer in STable is a poitner to the struct.
13:44 jnthn *pointer
13:45 not_gerd sure - so where's the id actually used?
13:45 jnthn The numerical ID is more of a fossil now.
13:45 jnthn Even the serialization goes by name.
13:46 jnthn So, we can probably do away with that.
13:47 jnthn Turns out that numerical IDs are a really bad idea when you start dynamically loading new REPRs. :)
13:48 jnthn Note that REPR function tables need not be GCable.
13:50 mj41 joined #perl6
13:51 * jnthn gets back to teaching
13:52 not_gerd jnthn: have fun
14:05 colomon ouch, infinite loop
14:06 moritz those take a long time to finish :-)
14:06 colomon I'm trying to get a decent-ish version of pick/roll for KeyBag
14:07 colomon apparently I did something wrong...
14:07 masak feels like a decent-ish version of pick/roll for KeyBag could use a binary search...
14:08 moritz is KeyBag.roll weighted by value?
14:08 * moritz can't remember which on KeyBag is
14:09 colomon yes
14:10 moritz ah, we had a link to a very cool page that had an O(n) setup / O(1) per-step algorithm
14:10 colomon "Like an ordinary list roll, but returns keys of the bag weighted by values, as if the keys were replicated the number of times indicated by the corresponding value and then list roll used."
14:10 moritz http://www.keithschwarz.com/darts-dice-coins/
14:11 colomon yes, for a first stab I'm implementing the straightforward O(n) setup / O(n) per-step version
14:11 masak fair enuf.
14:12 moritz I've been planning to do implement the "real thing" ever since I've read that page, but then masak++ and p6cc got in my way :-)
14:12 moritz s/do//
14:12 bluescreen10 joined #perl6
14:12 masak it would be cool indeed to get the O(1) per-step algorithm into core.
14:14 PacoAir joined #perl6
14:15 colomon yes
14:15 * colomon will be happy to get the O(N) algorithm working right at this point...
14:17 moritz I also think b had an O(log N) variant
14:18 moritz I dimly recall posing that challenge as "this week's contribution to Perl 6"
14:19 masak oh right, the weekly challenges.
14:20 moritz it would be nice if we could start them again.
14:22 moritz mabe I'll apply for a grant for such things after I've finished the Exceptions
14:22 masak ooh
14:36 * masak decommutes
14:39 colomon sure, all you need for O(log N) is to use a binary search...
14:42 [Coke] http://news.perlfoundation.org/20​12/02/2012q1-grant-proposals.html - Community feedback welcome on the current crop of proposals. Reminder: perl6 grant requests /can/ be submitted through the normal GC process.
14:42 mj41 joined #perl6
14:43 GlitchMr joined #perl6
14:45 mtk joined #perl6
14:49 benabik You can submit perl6 grants through the garbage collector?  What API function is that?
14:52 [Coke] GC is also Grants Committee; As opposed to, for example, the Hague grant process.
14:56 xinming joined #perl6
15:04 benabik [Coke]: Well, that makes more sense.
15:17 tarch joined #perl6
15:21 PacoAir joined #perl6
15:22 not_gerd joined #perl6
15:23 not_gerd phenny, tell jnthn I did some changes to https://gist.github.com/1751167 - will be back online in the evening...
15:23 phenny not_gerd: I'll pass that on when jnthn is around.
15:23 not_gerd left #perl6
15:29 Lorn joined #perl6
15:31 tarch joined #perl6
15:51 tarch joined #perl6
16:00 [Coke] .u NEUTRAL
16:00 phenny U+A64F CYRILLIC SMALL LETTER NEUTRAL YER (ꙏ)
16:01 [Coke] .u NEUTRAL FACE
16:01 phenny [Coke]: Sorry, no results for 'NEUTRAL FACE'.
16:01 [Coke] aww.
16:01 flussence .u CAT FACE
16:01 phenny flussence: Sorry, no results for 'CAT FACE'.
16:01 flussence :(
16:01 benabik .u Cat
16:01 phenny U+A2B6 YI SYLLABLE CAT (ꊶ)
16:02 jnthn Looks nothing like a cat...
16:02 phenny jnthn: 15:23Z <not_gerd> tell jnthn I did some changes to https://gist.github.com/1751167 - will be back online in the evening...
16:03 jnthn phenny: tell not_gerd will try and look at it this evening
16:03 phenny jnthn: I'll pass that on when not_gerd is around.
16:03 * jnthn decommutes
16:04 tarch joined #perl6
16:05 benabik .u 1F638
16:05 phenny benabik: Sorry, no results for '1F638'.
16:06 benabik Heh.  The emoticon block has some odd things in it.
16:24 tarch joined #perl6
16:31 pnu joined #perl6
16:32 [particle] joined #perl6
16:34 tarch joined #perl6
16:34 Trashlord joined #perl6
16:35 pmichaud good morning, #perl6
16:35 benabik o/ pmichaud
16:35 PerlJam joined #perl6
16:39 simcop2387 joined #perl6
16:41 tarch joined #perl6
16:41 [Coke] pmichaud: hio
16:51 felher o/
16:56 masak pmichaud! \o/
17:04 masak benabik: [backlog] *lol* @ submitting grants through the garbage collector!
17:05 masak that's even weirder than sending a talk proposal written as icing on a cake. :P
17:06 pmichaud that's a sweet idea!
17:09 benabik masak: Did someone misread "send it on irc"?  ;-)
17:16 sboyette left #perl6
17:16 Trashlord joined #perl6
17:16 masak benabik: no, it was jnthn and me in a silliness feedback loop: http://irclog.perlgeek.de/​perl6/2012-02-06#i_5109649
17:20 benabik masak: That sounds like the best kind of loop.
17:22 Chillance joined #perl6
17:27 masak well, it's a positive feedback loop, at least.
17:28 [Coke] rakudo: say [+] 1 .. 100000;
17:28 p6eval rakudo 33fb02: OUTPUT«(timeout)»
17:29 MayDaniel joined #perl6
17:29 [Coke] can we cheat internally and treat it like n(n+1)/2 ?
17:31 sorear good * #perl6
17:32 [Coke] http://rakudo.org/about/ seems to be asking me to create the page.
17:32 TimToady [Coke]: certainly, any optimization that doesn't change the semantics is allowed and welcome
17:33 TimToady well, up to the point of giving the appearance of cheating, but that's on the pragmatics level, as is the fast that it runs faster
17:34 TimToady an optimization that recognizes a particular benchmark and replaces it with a constant might be a bit too far :)
17:34 TimToady s/the fast/the fact/
17:34 pmichaud [Coke]: I'm guessing the "About" page was never updated or is left-over from the wordpress install
17:36 TimToady colomon: likewise, [*] 1..$n is likely to suboptimal in repeated use without some amount of memoization
17:36 TimToady [Coke]: er, \t failure
17:37 cognominal joined #perl6
17:40 TimToady there's probably some generic optimization in here over any reduction operator that caches a few partial results on constant ranges and can quicky locate the largest prefix of the list that has already been calculated, and just start from there for the new tail (assuming a left-associative op; right-assoc would have to count from the other end)
17:41 kaare_ joined #perl6
17:44 TimToady so even if you didn't have the n(n+1)/2 optimization, it might've already calculated and cached [+] 1..99856 at some point, so can start from there
17:45 TimToady (assuming an optimizer that chooses to remember checkpoints at square numbers)
17:45 TimToady ((to save memo memory))
17:46 benabik Likely it would be nice to have the ability to add specific optimizations.  sub prefix:<[+]>( Range $r ) { n(n+1)/2 }
17:48 TimToady soit'nly
17:50 TimToady well, with the front subtracted off too, since it might not start at 1
17:50 am0c joined #perl6
17:52 [Coke] niecza: say [+] 1 .. 100000;
17:52 p6eval niecza v14-19-g256172a: OUTPUT«5000050000␤»
17:52 benabik Well, considering that that code wouldn't compile, I figured niceties like dealing with the start point of the range could be "left as an exercise for the reader".
17:55 masak perl6: sub prefix:<[+]>(Range $r) { "OH HAI" }; say [+] 1 .. 100
17:56 p6eval rakudo 33fb02: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'prefix:<[+]>' will never work with argument types (int) (line 1)␤    Expected: :(Range $r)␤»
17:56 p6eval ..pugs b927740: OUTPUT«OH HAI␤»
17:56 p6eval ..niecza v14-19-g256172a: OUTPUT«Potential difficulties:â�¤  $r is declared but not used at /tmp/1uC53b_18y line 1:â�¤------> [32msub prefix:<[+]>(Range [33mâ��[31m$r) { "OH HAI" }; say [+] 1 .. 100[0mâ�¤â�¤Unhandled exception: Nominal type check failed in binding '$r' in 'prefix:<[+]>'; got In…
17:56 dalek specs: 97bee31 | larry++ | S03-operators.pod:
17:56 dalek specs: correct fossil use of proto to mean default
17:56 dalek specs:
17:56 dalek specs: You can define your own [+], but not using proto.
17:56 dalek specs: review: https://github.com/perl6/specs/commit/97bee31e5d
17:56 masak perl6: sub prefix:<[+]>(Range $r) { "OH HAI" }; say [+](1 .. 100)
17:56 p6eval niecza v14-19-g256172a: OUTPUT«Potential difficulties:â�¤  $r is declared but not used at /tmp/qq6ze55KnA line 1:â�¤------> [32msub prefix:<[+]>(Range [33mâ��[31m$r) { "OH HAI" }; say [+](1 .. 100)[0mâ�¤â�¤OH HAIâ�¤Â»
17:56 p6eval ..pugs b927740, rakudo 33fb02: OUTPUT«OH HAI␤»
17:56 TimToady you should be using multi
17:57 masak perl6: multi prefix:<[+]>(Range $r) { $r.elems }; say [+](1 .. 100)
17:57 p6eval pugs b927740, rakudo 33fb02, niecza v14-19-g256172a: OUTPUT«100␤»
17:57 benabik Hm.  The syntax actually is prefix:<[+]> ? I was just guessing.
17:57 doy well, the actual formula is $r.elems * ($r.min + $r.max) / 2
17:58 doy for what it's worth
17:58 masak perl6: multi prefix:<[+]>(Range $_) { (.max - .min) * .elems / 2 }; say [+](1 .. 100)
17:58 p6eval pugs b927740, rakudo 33fb02, niecza v14-19-g256172a: OUTPUT«4950␤»
17:58 benabik doy++
17:58 masak doy: minus, but yes.
17:58 masak oh wait. no.
17:58 masak you're right.
17:59 masak perl6: multi prefix:<[+]>(Range $_) { (.max + .min) * .elems / 2 }; say [+](1 .. 100)
17:59 p6eval pugs b927740, rakudo 33fb02, niecza v14-19-g256172a: OUTPUT«5050␤»
17:59 masak that's the answer.
17:59 masak impressive that all three implementations agree on that one.
17:59 TimToady it's 5050 whether you got it right
17:59 masak aye.
17:59 [Coke] ugh.
18:00 [Coke] \o/
18:00 masak that's why I'm not smart enough to write code without tests :P
18:00 TimToady perl6: multi prefix:<[+]>(Range $_) { (.max + .min) * .elems / 2 }; say [+](1.1 .. 100.1)
18:00 p6eval pugs b927740, rakudo 33fb02, niecza v14-19-g256172a: OUTPUT«5060␤»
18:00 benabik I do like the sub ($_) { .stuff } syntax.  Makes code both clear and short.
18:01 masak of course, the real implementation of the above should either... check against what TimToady did, or contain a smarter formula.
18:01 masak benabik: it's things like that that make me feel that Perl 6 is actually a worthy successor of Perl 5.
18:02 masak benabik: it takes the core principles of Perl 5, and extends them.
18:02 TimToady otoh, the fact that the type is not yet Range[Int] is a bit of a downer
18:02 masak we don't have a solid strategy for container types.
18:02 masak Array is a class, Hash is a role... :/
18:03 benabik Shouldn't Hash be a role and Associative the role?
18:03 benabik s/role/class/  # bah
18:03 masak hm, Hash is a class in nom. my bad.
18:03 TimToady perl6: multi prefix:<[+]>(Range $_ (Int :$min, Int :$max) ) { ($max + $min) * .elems / 2 }; say [+](1 .. 100)
18:03 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "("␤    expecting "?", "!", trait, "=", default value, "-->" or ")"␤    at /tmp/GadInC6dYz line 1, column 29␤»
18:03 p6eval ..niecza v14-19-g256172a: OUTPUT«Unhandled exception: Unable to resolve method Capture in class Range␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/oCo6ElDxhJ line 0 (prefix:<[+]> @ 1) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at <unknown> line 0 (&prefix:<[+]> @ 0) ␤  at /tmp/oCo6…
18:03 p6eval ..rakudo 33fb02: OUTPUT«No applicable candidates found to dispatch to for 'prefix:<[+]>'. Available candidates are:␤:(Range $_ :(Int :min(:$min), Int :max(:$max)))␤␤  in block <anon> at /tmp/kSmHkFw9Hn:1␤  in <anon> at /tmp/kSmHkFw9Hn:1␤»
18:03 masak but that means, I think, that you can't do Array[Str] or Hash[Int].
18:04 benabik Classes can't have type parameters?
18:04 TimToady those can be punned roles
18:04 TimToady Array just defaults to Array[Any]
18:04 masak benabik: classes can't have type parameters.
18:04 masak TimToady: I agree that they can. I'm just saying that currently, in Rakudo, it's not just Range that isn't a role.
18:05 wooden joined #perl6
18:05 wooden joined #perl6
18:05 * sjn has some trouble compiling the new rakudo...
18:05 masak moritz: I bought blueberries! \o/
18:05 * TimToady thinks my unpacker signature shoulda worked
18:05 benabik masak: That makes me think there are going to be many "roles" that are actually just classes the need a type param.
18:05 masak TimToady: I think so too.
18:05 sjn comiling src/gen/CORE.setting.pir gets killed after a while
18:05 sjn compiling*
18:06 masak benabik: yeah, but you should probably make it a role when in doubt anyway ;)
18:06 benabik sjn: Do you have memory limits somewhere?  That's the thing that will eat all your memory.
18:06 TimToady perl6: multi prefix:<[+]>(Range $_ [Int :$min, Int :$max] ) { ($max + $min) * .elems / 2 }; say [+](1 .. 100)
18:06 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "["␤    expecting "?", "!", trait, "=", default value, "-->" or ")"␤    at /tmp/uOCoWzndDZ line 1, column 29␤»
18:06 p6eval ..niecza v14-19-g256172a: OUTPUT«Unhandled exception: Unable to resolve method Capture in class Range␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/_RE_v0pxo3 line 0 (prefix:<[+]> @ 1) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at <unknown> line 0 (&prefix:<[+]> @ 0) ␤  at /tmp/_RE_…
18:06 p6eval ..rakudo 33fb02: OUTPUT«No applicable candidates found to dispatch to for 'prefix:<[+]>'. Available candidates are:␤:(Range $_ :(Int :min(:$min), Int :max(:$max)))␤␤  in block <anon> at /tmp/gI3sSg_4ya:1␤  in <anon> at /tmp/gI3sSg_4ya:1␤»
18:06 benabik masak: Role doesn't feel like the right name for that.
18:06 benabik Ah, well.
18:07 masak benabik: the only disadvantage I've found with making everything roles, is that sometimes you *do* want to override/shadow methods, rather than having them collide.
18:07 sjn benabik: ulimit says max locked memory is 64kb, other than that I see no limits
18:08 sjn how much memory should I expect that one to take?
18:08 flussence about a gig
18:08 benabik I don't think parrot locks memory...
18:08 sjn right
18:08 TimToady b: multi prefix:<[+]>(Range $_ (:$min, :$max) ) { ($max + $min) * .elems / 2 }; say [+](1 .. 100)
18:08 p6eval b 1b7dd1: OUTPUT«Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤0␤»
18:08 am0c joined #perl6
18:08 jnthn evenin'
18:08 * sjn doesn't have that much memory available on that machine :-(
18:09 benabik sjn: Do you have swap space?
18:09 TimToady I thought someone had named parameters mapping to methods at one point in subsigs, but maybe it's just spec
18:09 benabik sjn: It might be the OOM killer.
18:09 tokuhirom joined #perl6
18:09 sjn hmmm
18:09 sjn Apparently, the VM I'm using isn't configured with swap
18:09 flussence you can do the pir step on another machine, it's a bit fiddly but works
18:09 sjn there we have it
18:09 sjn benabik: thanks :)
18:09 TimToady maybe you should swap the VM :P
18:10 sjn TimToady: luxuries that I don't have :)
18:10 flussence .oO( this VM lacks VM )
18:10 sjn hehe
18:11 benabik joined #perl6
18:13 * jnthn really hopes he can land the serializer work (which just cut down on CORE.setting compilation memory) before the next release.
18:14 sjn :D
18:15 * sjn adds 1gb swap, and crosses fingers
18:18 jnthn TimToady: Oddness, I thought the subsig unpacking worked in nom already.
18:19 TimToady with named params?
18:19 jnthn nom: class A { has $.x; }; sub foo((:$x)) { say $x }; foo(A.new(x => 42))
18:19 p6eval nom 33fb02: OUTPUT«42␤»
18:19 jnthn nom: say Range.^attributes>>.name
18:19 p6eval nom 33fb02: OUTPUT«$!min $!max $!excludes_min $!excludes_max␤»
18:19 jnthn nom: say Range.^attributes>>.has_accessor
18:19 p6eval nom 33fb02: OUTPUT«True True True True␤»
18:20 TimToady ooh, excludes has to be taken into account too...
18:20 jnthn nom: sub foo((:$min, :$max)) { .say for $min, $max }; foo(1..10)
18:20 p6eval nom 33fb02: OUTPUT«2 unexpected named parameters passed (excludes_min, excludes_max) in sub-signature␤  in sub foo at /tmp/_K5s_zdJ7r:1␤  in block <anon> at /tmp/_K5s_zdJ7r:1␤  in <anon> at /tmp/_K5s_zdJ7r:1␤»
18:20 jnthn nom: sub foo((:$min, :$max, *%)) { .say for $min, $max }; foo(1..10)
18:20 p6eval nom 33fb02: OUTPUT«1␤10␤»
18:20 jnthn Hm. That works.
18:21 jnthn nom: say Range ~~ Positional
18:21 p6eval nom 33fb02: OUTPUT«True␤»
18:21 jnthn TimToady: Oh!
18:21 jnthn The multi failed to match because of the excludes params. :)
18:22 TimToady well, the real function needs 'em anyway
18:22 jnthn nom: multi prefix:<[+]>(Range $_ (:$min, :$max, *%) ) { ($max + $min) * .elems / 2 }; say [+](1 .. 100)
18:22 p6eval nom 33fb02: OUTPUT«5050␤»
18:22 jnthn \o/
18:24 benabik joined #perl6
18:24 TimToady b: multi prefix:<[+]>(Range $_ (:$min, :$max, :$excludes_min, :$excludes_max) ) { ($max - ?$excludes_max + $min + ?$excludes_min) * .elems / 2 }; say [+](0 ^..^ 101)
18:24 p6eval b 1b7dd1: OUTPUT«Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤0␤»
18:24 TimToady nom: multi prefix:<[+]>(Range $_ (:$min, :$max, :$excludes_min, :$excludes_max) ) { ($max - ?$excludes_max + $min + ?$excludes_min) * .elems / 2 }; say [+](0 ^..^ 101)
18:24 p6eval nom 33fb02: OUTPUT«5050␤»
18:24 TimToady \o/
18:25 TimToady nom: multi prefix:<[+]>(Range $_ (Int :$min, Int :$max, :$excludes_min, :$excludes_max) ) { ($max - ?$excludes_max + $min + ?$excludes_min) * .elems / 2 }; say [+](0 ^..^ 101)
18:25 p6eval nom 33fb02: OUTPUT«5050␤»
18:25 TimToady nom: multi prefix:<[+]>(Range $_ (Int :$min, Int :$max, :$excludes_min, :$excludes_max) ) { ($max - ?$excludes_max + $min + ?$excludes_min) * .elems / 2 }; say [+](0.1 ^..^ 101.1)
18:25 p6eval nom 33fb02: OUTPUT«No applicable candidates found to dispatch to for 'prefix:<[+]>'. Available candidates are:␤:(Range $_ :(Int :min(:$min), Int :max(:$max), Any :excludes_min(:$excludes_min), Any :excludes_max(:$excludes_max)))␤␤  in block <anon> at /tmp/Rd5J6Z7pvb:1␤  in <anon> at /tm…
18:25 TimToady uh
18:26 doy w20
18:26 TimToady jnthn: ^^ apparently doesn't autogen the default [+]
18:27 jnthn TimToady: uhm. Well, I guess not. It looks in the symbol table and sees there already is one there...
18:28 jnthn TimToady: Er, deeper than that...
18:28 jnthn TimToady: They desugar to higher order functions
18:28 jnthn TimToady: Not sure what the best way to handle that is.
18:29 jnthn I guess it's not so hard to add the auto-generated one as a candidate.
18:29 jnthn But...how to know it wasn't already generated... :)
18:29 pmichaud that's what we used to do, yes.
18:29 TimToady the spec suggests &prefix:<[+]> := reduce... but that doesn't necessarily make a multi
18:29 jnthn No, we ain't making a multi there
18:30 pmichaud how to know it wasn't already generated == we handle it in a scoping context, iirc
18:30 TimToady so does the multi declaration trigger a local proto gen?
18:30 pmichaud ...what TimToady++ said :)
18:30 jnthn TimToady: Yes.
18:30 jnthn TimToady: Er, your one does
18:30 jnthn Oh...
18:30 jnthn That means that we can spot it's a proto, not an only
18:31 jnthn But then we get into bother when we auto-gen it before we see your multi.
18:31 TimToady why, if it's more genericly sigged?
18:31 jnthn TimToady: No, if we generate it as an only it causes issues
18:32 TimToady well, er, then don't...
18:32 jnthn TimToady: We'd need to generate it as a multi if there's none in scope, or if there is one then know whether we've added the default candidate to it yet or not.
18:32 TimToady why isn't there just a default proto for everyone?
18:33 jnthn ...becuase protos aren't default fallbacks any more? :)
18:33 TimToady not claiming that
18:33 jnthn OK, then I'm not quite sure what you're suggesting.
18:33 TimToady I just mean an outer proto {*} and then a default multi
18:34 TimToady default by virtue of generic sig, or maybe 'is default' as latest spec change shows
18:36 jnthn *nod*
18:36 TimToady just saying if there's always a proto [+] then there's never a need to autogen a local proto
18:36 jnthn Will have to have a dig...when I get tuits. :)
18:36 jnthn TimToady: Yes, true.
18:36 TimToady we'll figger it all out one of these millenia...
18:43 TimToady jnthn: it would also be awesome if somehow the dispatcher failure error could've pointed out the need for :$excludes_*
18:44 TimToady like a list of, for each each candidate, why it didn't match (possibly pooled by sigs that have the same reason)
18:44 jnthn TimToady: Yeah, I was pondering how best to do that.
18:44 TimToady These sigs don't match because you're an idiot:   :)
18:45 TimToady These sigs don't match because the programmer was an idiot:
18:45 benabik How do you ignore some args in a subsig?  Range (:$min, :$max, *%) ?
18:45 TimToady These sigs don't match because I don't feel like it today:
18:45 TimToady yes
18:45 TimToady what jnthn initially did above
18:45 TimToady but in this case, we didn't want to ignore them, since they matter
18:45 jnthn The info is all there, it's just that we don't tend to bother generating the failure messages in a multi-dispatch as we expect them to usuall work out :)
18:45 not_gerd joined #perl6
18:46 not_gerd hello again, #perl6
18:46 phenny not_gerd: 16:03Z <jnthn> tell not_gerd will try and look at it this evening
18:46 jnthn *usually
18:46 cognominal_ joined #perl6
18:46 TimToady These sigs match because I couldn't be bothered:
18:46 jnthn I guess we could collect them in that case anyway. Or just re-run things to get the errors.
18:46 TimToady *don't match
18:47 not_gerd jnthn: I just mocked a message-passing system for C-level object as a replacement for the vtable system
18:47 snearch joined #perl6
18:47 TimToady .oO(ooh, a Mach kernel!)
18:48 TimToady a mock Mack kernel, in fact
18:48 not_gerd jnthn: it needs some additional fields in the stable, but integrates better into 6model than the vtable system Ihad previously in mind...
18:48 TimToady a mock Mack Mach kernel, in fact
18:48 TimToady a mock Mac Mach kernel, rather
18:49 * TimToady had better wander off before he does more damage to the ecological niche
18:49 jnthn :P
18:49 masak :P
18:49 jnthn not_gerd: OK, will ponder it a bit over dinner
18:50 * TimToady is always happy when he can depart with :P's rather than o's  :)
18:52 * jnthn ventures out into the snow to find some dinner
18:56 zby_home joined #perl6
19:03 _ilbot joined #perl6
19:03 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
19:03 `10 joined #perl6
19:03 dju joined #perl6
19:07 x3nU joined #perl6
19:08 birdwindupbird joined #perl6
19:08 pernatiy joined #perl6
19:11 desertm4x joined #perl6
19:15 felipe joined #perl6
19:17 jlaire joined #perl6
19:35 rindolf joined #perl6
19:36 rindolf Hi all.
19:36 phenny rindolf: 30 Jan 13:29Z <moritz> tell rindolf fwiw on my machine (debian stable), rakudo compiles fine on a recent parrot
19:36 rindolf moritz: OK, thanks.
19:41 sjn joined #perl6
19:41 BinGOs joined #perl6
19:41 nebuchadnezzar joined #perl6
19:41 tadzik 'evening
19:43 masak o/
19:46 Vlavv` joined #perl6
19:49 kmwallio joined #perl6
19:56 colomon niecza: my @a := do for 1..4 -> $i { take $i: }; say @a.perl
19:56 p6eval niecza v14-19-g256172a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Invocant handling is NYI at /tmp/iopa9mxVif line 1:â�¤------> [32mmy @a := do for 1..4 -> $i { take $i: [33mâ��[31m}; say @a.perl[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 134…
19:57 arlinius joined #perl6
19:57 colomon niecza: sub f() { for 1..4 -> $i { take $i: }; }; say f().perl
19:57 p6eval niecza v14-19-g256172a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Invocant handling is NYI at /tmp/3bS12sUZ8c line 1:â�¤------> [32msub f() { for 1..4 -> $i { take $i: [33mâ��[31m}; }; say f().perl[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1…
19:57 colomon niecza: sub f() { gather for 1..4 -> $i { take $i: }; }; say f().perl
19:57 p6eval niecza v14-19-g256172a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Invocant handling is NYI at /tmp/wvx15tRjAQ line 1:â�¤------> [32m f() { gather for 1..4 -> $i { take $i: [33mâ��[31m}; }; say f().perl[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting li…
19:57 colomon niecza: sub f() { gather for 1..4 -> $i { take $i; }; }; say f().perl
19:57 p6eval niecza v14-19-g256172a: OUTPUT«(1, 2, 3, 4).list␤»
20:01 colomon niecza: sub f() { my $a = 0; gather for 1..4 { take $a++; }; }; say f().perl
20:01 p6eval niecza v14-19-g256172a: OUTPUT«(0, 1, 2, 3).list␤»
20:02 colomon niecza: sub f() { my $a = 0; gather for 1..4 { take $a++ => rand; }; }; say f().perl
20:02 p6eval niecza v14-19-g256172a: OUTPUT«(0 => 0.0096952845387604479e0, 1 => 0.90070009459774014e0, 2 => 0.21001796620433125e0, 3 => 0.44272877622522822e0).list␤»
20:02 colomon huh
20:07 zgr joined #perl6
20:07 zgr left #perl6
20:11 * colomon is having a hard time golfing the issue he is having
20:12 colomon but wait...
20:13 colomon niecza: sub f() { my $a = 0; my @b; for 'a'..'d' -> $c { @b.push($a++ => $c); }; }; say f().perl
20:13 p6eval niecza v14-19-g256172a: OUTPUT«Nil␤»
20:13 colomon niecza: sub f() { my $a = 0; my @b; for 'a'..'d' -> $c { @b.push($a++ => $c); }; say @b.perl}; f(0;
20:13 p6eval niecza v14-19-g256172a: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse argument list at /tmp/vGO5typ2Eb line 1:�------> [32m@b.push($a++ => $c); }; say @b.perl}; f([33m�[31m0;[0m�Couldn't find final ')'; gave up at /tmp/vGO5typ2Eb line 1 (EOF):�------> [32m.push($a++ => $c)…
20:13 colomon niecza: sub f() { my $a = 0; my @b; for 'a'..'d' -> $c { @b.push($a++ => $c); }; say @b.perl}; f();
20:13 p6eval niecza v14-19-g256172a: OUTPUT«[0 => "a", 1 => "b", 2 => "c", 3 => "d"].list␤»
20:13 colomon :(
20:14 colomon niecza: sub f() { my $a = 0; my @b; for 'a'..'d' -> $c { @b.push($a => $c); $a++ }; say @b.perl}; f();
20:14 p6eval niecza v14-19-g256172a: OUTPUT«[4 => "a", 4 => "b", 4 => "c", 4 => "d"].list␤»
20:14 colomon bingo
20:14 colomon sorear: ^^
20:16 am0c joined #perl6
20:16 nebuchadnezzar joined #perl6
20:16 masak yes, that... probably should decontainerize $a.
20:17 masak nom: sub f() { my $a = 0; my @b; for 'a'..'d' -> $c { @b.push($a => $c); $a++ }; say @b.perl}; f
20:17 p6eval nom 33fb02: OUTPUT«Array.new(0 => "a", 1 => "b", 2 => "c", 3 => "d")␤»
20:17 masak right.
20:19 leontopod joined #perl6
20:20 ksi joined #perl6
20:24 [Coke] seen particle?
20:24 aloha particle was last seen in #parrot 4 days 1 hours ago joining the channel.
20:24 masak seen sense yet?
20:24 aloha sense yet was last seen in  15376 days 20 hours ago .
20:24 masak dang :)
20:24 masak (come back, sense yet!)
20:25 masak seen aloha?
20:25 aloha aloha was last seen in #perl6 20 hours 15 mins ago joining the channel.
20:25 masak aloha: I've seen her more recently than you have, apparently.
20:30 birdwindupbird joined #perl6
20:31 bluescreen10 joined #perl6
20:36 eiro joined #perl6
20:51 benabik I thought aloha was updated to deal with the never seen thing.
20:51 benabik seen foobarbaz
20:51 aloha foobarbaz was last seen in  15376 days 20 hours ago .
20:51 masak maybe she missed the update... :P
20:51 benabik Is this aloha different from #parrot's aloha?
20:52 leontopod Is Perl 6 Version 1 out yet?
20:52 tadzik I think it knows stuff cross-channel
20:52 tadzik leontopod: Perl 6 is not versioned, as far as I'm concerned
20:52 moritz at least not yet
20:52 tadzik compilers are, and they have versions like 14 or 40-something
20:52 moritz is C++ version 1 out yet?
20:52 moritz or C version 1?
20:53 benabik Yeah, seen will return results for both channels.  But seen <badIRCnick> returns different things.
20:53 tadzik aye
20:53 leontopod there is K&R C and ANSI C
20:53 flussence .oO( I thought C was up to version 99.. )
20:53 leontopod is there going to be ANSI Perl 6?
20:53 TimToady perl6: say "I am the first version"
20:53 p6eval pugs b927740, rakudo 33fb02, niecza v14-19-g256172a: OUTPUT«I am the first version␤»
20:53 moritz leontopod: and which one is Version 1?
20:53 leontopod K&R I would say
20:53 leontopod that book defined the language
20:53 leontopod just like C language defines Perl 5
20:54 benabik flussence: They've updated.  C11 is the new hotness.  (99 < 11?)
20:54 moritz anyway, I don't think Perl 6 will be ANSI any time soon
20:54 TimToady that's because it's un-American
20:55 moritz I'm also having a difficult time imagining ISO Perl 6 :-)
20:55 leontopod there will have to be an ANSI or ISO standard sooner or later
20:55 PerlJam leontopod: because ... ?
20:55 moritz really?
20:56 moritz perl 5 does well without
20:56 benabik leontopod: Is there an ANSI/ISO PHP, Python, or Ruby?
20:56 TimToady well, let's go for "later" then :)
20:56 moritz so do ruby, python, lua (I think) and lots of others
20:56 moritz I don't even know if javascript has an ISO standard
20:56 leontopod ecmascript
20:56 tadzik leontopod: do you mean, somewhat, "is it production ready, production-approved?"
20:57 PerlJam leontopod: ecma isn't iso  :)
20:57 leontopod tadzik, yah, we got to get real word people using Perl 6 to work on real world problems
20:57 TimToady um, already happening
20:57 leontopod controlling nuclear reactors, avionics, medical instrumentation, stuff like that
20:57 moritz leontopod: then welcome to the real world. Have fun solving problems in Perl 6.
20:57 TimToady but the knee of the curve is probably a couple years out still, for sure
20:58 moritz the easist one to convince doing stuff is yourself
20:58 TimToady we're not interesting in Perl 6 being adopted too rapidly
20:58 PerlJam TimToady: but I've been thinking that for about 7 years now  ;)
20:58 benabik leontopod: If "production ready" means any field where line-by-line code review is involved, then you're pretty much dealing with Cobol or C.
20:58 TimToady well, it's always true, depending on how you label the graphs :P
20:58 flussence or MUMPS
20:58 masak leontopod: when people come here and ask "is Perl 6 released/ready/production-spiffy yet?", I always hear "should I start using Perl 6 now, or should I wait some more?"
20:59 TimToady and for some time, the answer has been "Well, it depends."
20:59 TimToady it's not quite ready to write an OS in...
20:59 masak it depends on who you are, yes.
20:59 eviltwin_b wouldn't MUMPS be more character by character?
20:59 leontopod can Perl 6 be written in Perl 6 yet?
20:59 leontopod THAT would be a neat milestone
20:59 tadzik it already is
20:59 PerlJam masak: I hear "is there a good business case I can make to my coworkers for using Perl 6?"
20:59 TimToady not only can, but is
20:59 leontopod cool!
20:59 masak leontopod: we're already doing that.
20:59 leontopod Perl 6++
21:00 masak leontopod: check out the src/core directory in Rakudo.
21:00 TimToady well, at least most of the compiler bits
21:00 masak and some src/mumblemumble in Niecza.
21:00 TimToady you still have to have a core in something else, a VM
21:00 tadzik unless you count Yapsi :)
21:00 masak yeah, but Yapsi is magical.
21:00 TimToady Yapsi is beyond version 1, so it's not in the running
21:00 masak it runs on hope and pixie dust.
21:01 moritz so if we run out of both, we know who is to blame :-)
21:02 masak we passed Peak Pixie Dust in 2006. not my fault. :)
21:02 masak oddly, we haven't passed Peak Hope yet, although much of the rest of the programming world has...
21:02 TimToady leontopod: the really bad thing about writing a compiler in the same language is that, if the language is slow, everything is doubly slow.  otoh, every optimization speeds up both the compile time and run time, so it's a long-term win
21:03 masak and we're getting ready to do some awesome optimizations.
21:03 masak today we were discussing optimizing away sums of ranges into just a constant-time expression.
21:03 masak and... it already works in all implementations!
21:03 moritz it does?
21:04 tadzik huh, I did miss something, didn't I?
21:04 masak well, not the optimization.
21:04 masak but the code for overriding prefix:<[+]>
21:04 masak I was surprised at that.
21:04 moritz last I tried, adding a prefix:<[+]>(Range) multi would make the default go away
21:04 masak oh :(
21:04 masak didn't try that bit.
21:04 TimToady and that's what we discovered today, but jnthn++ is aware of it
21:05 TimToady http://irclog.perlgeek.de/​perl6/2012-02-06#i_5111128 and following
21:05 jnthn Aye, need to make it not oppress generating the default
21:05 jnthn er
21:05 jnthn suppress
21:06 jnthn ...and that's why I won't fix this tonight. :)
21:06 benabik Help, help, the default's being oppressed!
21:06 TimToady quick, ask the govmint for a bailout!
21:07 moritz we should start a Geek Defaultism Movement
21:09 TimToady Beware of geeks bearing glyphs!
21:09 benabik They may be 'PILE OF POO' (U+1F4F9) ?
21:10 TimToady that's more in the category of 'baring glyphs' I thinks
21:13 TimToady not to be confused with 'bering glyphs', which would be 白令海
21:14 * moritz wants a PILE OF FOO glyph to describe software
21:14 TimToady FILE OF FOO, surely
21:23 * TimToady wanders off to dream of files of foo ad snorum...
21:37 * colomon wishes he were allowed to snore at the moment...
21:38 * [Coke] agrees with colomon, but it's almost quitting time, here.
21:38 mj41 joined #perl6
21:39 * colomon 's wife is out of commission with a bad cold, so colomon has three-year-old watching duty until bedtime -- despite a severe lack of sleep on colomon's part.
21:40 PerlJam colomon: NyQuil could help with both mom and child  ;>
21:41 colomon PerlJam: I don't think drugging the little guy is on the list of things I'm permitted to do.
21:42 moritz bringing the small one to bed often brings me very close to sleep too
21:42 colomon on the bright side, just starting watching an hour long episode of Thomas he hasn't seen before.  And there are plenty of leftovers for dinner.
21:43 colomon moritz: brings me to the other side of sleep quite often... quiet and dark is a bad combination
21:43 moritz or a good :-)
21:56 rgrau joined #perl6
21:56 overrosy joined #perl6
21:56 masak 'night, #perl6
22:01 leontopod night masak
22:20 leontopod can Perl 6 be rigged to run on a JVM?
22:20 benabik "Rigged"?
22:21 benabik To my knowledge there's no current compiler targeting the JVM.
22:21 benabik One could be written, I'd bet.
22:22 jnthn mberends++ did some bits on getting 6model and NQP ported to the JVM a while back. It'll be more interesting once Rakudo is done eliminating its last couple of PIR dependencies.
22:23 jnthn Ugh, finished $dayjob tasks and now it's bedtime...
22:23 * jnthn -> sleep
22:33 not_gerd left #perl6
22:34 cognominal_ nom: my &a = token { a }; 'a' ~~ m/<a>/
22:34 p6eval nom 33fb02: OUTPUT«Method 'a' not found for invocant of class 'Cursor'␤  in regex <anon> at /tmp/eMN8mu0uOa:1␤  in method ll-match at src/gen/CORE.setting:3498␤  in method match at src/gen/CORE.setting:3546␤  in block <anon> at /tmp/eMN8mu0uOa:1␤  in <anon> at /tmp/eMN8mu0uOa:1␤»…
22:34 cognominal_ nom: my $a = token { a }; 'a' ~~ m/<$a>/
22:34 p6eval nom 33fb02:  ( no output )
22:35 cognominal_ I would have expected the first to work. Am I wrong?
22:39 PerlJam I think you are right according to the spec
22:47 tarch joined #perl6
22:48 cognominal_ nom:  token a { a }; 'a' ~~ m/<a>/
22:48 p6eval nom 33fb02: OUTPUT«Useless declaration of a has-scoped method in mainline␤Method 'a' not found for invocant of class 'Cursor'␤  in regex <anon> at /tmp/CaH1G_r2_u:1␤  in method ll-match at src/gen/CORE.setting:3498␤  in method match at src/gen/CORE.setting:3546␤  in block <anon> at /tmp…
22:49 not_gerd joined #perl6
22:50 not_gerd phenny, tell jnthn turns out what I'm proposing is actually the addition of a second meta-object which only known how to deal with a fixed set of parrot-specific messages
22:50 phenny not_gerd: I'll pass that on when jnthn is around.
22:50 not_gerd phenny, tell jnthn feel free to leave a comment at the gist instead of leaving a note with phenny
22:50 phenny not_gerd: I'll pass that on when jnthn is around.
22:50 * not_gerd leaves again...
22:50 not_gerd left #perl6
23:29 whiteknight joined #perl6
23:33 skids joined #perl6
23:36 bluescreen10 joined #perl6
23:56 tokuhirom joined #perl6

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

Perl 6 | Reference Documentation | Rakudo