Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-05-19

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:19 raiph joined #perl6
00:59 ifim` joined #perl6
01:10 shinobicl__ joined #perl6
01:25 timotimo huh. deep-cloning a list of lists must be easier than my @output-lines = map { [map *.clone, @$_].item }, @board-tmpl;
01:30 timotimo but i made a solution for the galton board
01:30 timotimo galton box*
01:30 timotimo animated even :)
01:36 colomon has cloning every been properly specified?
01:37 sorear pretty sure at one point >>.[0] would deep clone :)
01:37 colomon :)
01:56 FROGGS_ joined #perl6
02:13 timotimo why would i end up with a copy after >>.[0]? >>.[0] doesn't seem nodal to me.
02:19 timotimo i'd say >>.[] would perhaps deepclone. perhaps!
02:19 cognominal joined #perl6
02:20 ccc joined #perl6
02:24 sorear timotimo: "at one point" as in before nodality was introduced
02:24 sorear if you have a list of numbers, try >>+>> 0
02:24 sorear etc
02:25 sorear hyper operators have the behavior of cloning as deeply as they need to to implement the operaitohn
02:26 timotimo ah, ok
02:27 timotimo hm. it's a list of lists of strings. i wouldn't be able to ~>> it, right?
02:27 timotimo that would just stringify the inner lists, no?
02:27 ifim`` joined #perl6
02:29 sorear try it and see
02:29 timotimo yaaaay error:imcc:Sub 'cuid_3_1368930565.5141' not found
02:33 timotimo r: constant $foo = BEGIN { 1 + 2 + 3 + 4 + 5 };
02:33 camelia rakudo 9c5650:  ( no output )
02:33 timotimo r: constant @foo = BEGIN { 1, 2, 3, 4, 5 };
02:33 camelia rakudo 9c5650:  ( no output )
02:33 timotimo i wonder what exactly caused that error.
02:38 * TimToady has been putting far too much work into http://rosettacode.org/wiki/Names_to_numbers#Perl_6
02:41 * lue suddenly considers Linuga::EN::Numbers::Cardinal
02:42 lue TimToady: is that how you'd include actions with slangs as they are (the { make $<token>.ast } in the grammar trick you're using in Names_to_numbers)
02:43 timotimo TimToady: can you come up with something prettier to copy an array of arrays of (single-character) strings than my @output-lines = map { [map *.clone, @$_].item }, @board-tmpl;
02:48 TimToady use Bufs for the Array of Char?
02:49 TimToady lue: make was originally intended for use within the grammar, and got hijacked for action methods too :)
02:50 lue TimToady: If you didn't see from a month or so ago, that solves my problem with actions+slangs :) [leaving just "why is augment special-cased" and "what use are the $~ variables"]
02:51 TimToady afk for a bit &
02:54 lue (here's that link to the gist, again, but now updated with this new information: https://gist.github.com/lue/5241230)
02:57 timotimo huh.
02:57 timotimo r: my @stuff = "bleh", "foo", "frob"; say @stuff >>.ords; # whu?
02:57 camelia rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix > instead�at /tmp/DxJlxaHPQ8:1�------> [32mf = "bleh", "foo", "frob"; say @stuff >>[33m�[31m.ords; # whu?[0m�»
02:58 rking1 joined #perl6
02:58 adu joined #perl6
02:59 timotimo of, Bufs are immutable. that's not what i intended :(
02:59 adu hi all
02:59 lue r: my @stuff = "bleh", "foo", "frob"; say @stuff>>.ords;
02:59 camelia rakudo 9c5650: OUTPUT«98 108 101 104 102 111 111 102 114 111 98␤»
02:59 lue r: my @stuff = "bleh", "foo", "frob"; say @stuff ».ords;
02:59 camelia rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/XNaR2zPLNm:1â�¤------> [32mff = "bleh", "foo", "frob"; say @stuff »[33mâ��[31m.ords;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤Â»
02:59 timotimo oh, i mustn't space there?
02:59 timotimo that explains it
03:00 timotimo the specs say Bufs are mutable. huh.
03:00 timotimo r: my $a = Buf.new("foo bar".ords); $a[4] = 20;
03:00 camelia rakudo 9c5650: OUTPUT«Cannot modify an immutable value␤  in block  at /tmp/doNfngt_lH:1␤␤»
03:03 timotimo n: my $a = Buf.new("foo bar".ords); $a[4] = 20;
03:03 camelia niecza v24-51-g009f999: OUTPUT«Unhandled exception: Cannot call new; none of these signatures match:␤    Mu, *%_␤  at /tmp/mjWs2vcTbZ line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4331 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4332 (module-CORE @…
03:03 timotimo n: my $a = ("foo bar".ords).encode; $a[4] = 20;
03:03 camelia niecza v24-51-g009f999: OUTPUT«Unhandled exception: Unable to resolve method encode in type List␤  at /tmp/RAF7U4BBL1 line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4331 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4332 (module-CORE @ 582) ␤  at /hom…
03:03 timotimo n: my $a = "foo bar".encode; $a[4] = 20;
03:03 camelia niecza v24-51-g009f999: OUTPUT«Unhandled exception: No value for parameter '$enc' in 'Str.encode'␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Str.encode @ 1) ␤  at /tmp/YZnsCeBRQF line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4331 (ANON @ 3) ␤  at /home/p6e…
03:03 timotimo n: my $a = "foo bar".encode("utf8"); $a[4] = 20;
03:03 camelia niecza v24-51-g009f999: OUTPUT«Unhandled exception: System.ArgumentException: Encoding name 'utf8' not supported␤Parameter name: name␤  at System.Text.Encoding.GetEncoding (System.String name) [0x00000] in <filename unknown>:0 ␤  at Builtins.encode (System.String inp, System.String enc)…
03:03 timotimo n: my $a = "foo bar".encode("utf-8"); $a[4] = 20;
03:03 camelia niecza v24-51-g009f999: OUTPUT«Unhandled exception: Writing to readonly scalar␤  at /tmp/jpnXwbzzIg line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4331 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4332 (module-CORE @ 582) ␤  at /home/p6eval/niecza/li…
03:04 timotimo so it's immutable in both rakudo and niecza, but not in the specs. huh.
03:04 preflex_ joined #perl6
03:04 timotimo p: my $a = "foo'.encode("ascii"); $a[1] = "f".ord;
03:04 camelia pugs: OUTPUT«*** ␤    Unexpected "ascii"␤    expecting term postfix or operator␤    at /tmp/g2u16AwWoO line 1, column 23␤»
03:05 timotimo p: my $a = "foo'.encode; $a[1] = "f".ord;
03:05 camelia pugs: OUTPUT«*** ␤    Unexpected "f"␤    expecting term postfix or operator␤    at /tmp/LdzA9XpDwJ line 1, column 32␤»
03:05 timotimo ...
03:07 timotimo hello adu :)
03:08 adu :)
03:10 timotimo lue: do you know how to mutate a Buf? :|
03:11 lue According to the spec... :) [being serious, I do not know how to get around improper implementation]
03:11 timotimo it's sad. when i changed to Buf and removed the line that would mutate the Buf, it got 10x faster
03:18 timotimo i bet i'm missing something blatantly obvious :|
03:18 woosley1 joined #perl6
03:20 sorear wait, seriously?  buf is mutable?  that's weird
03:21 timotimo A mutable container for an array of integer values in contiguous memory.
03:22 ehouse left #perl6
03:23 timotimo sorear: if Buf isn't supposed to be mutable, what should i use instead?
03:23 lue r: my $a = Buf.new(0xCF, 0xCF); my $b = Buf.new(($_ == 1 ?? 0x2A !! $a.list[$_] for ^+$a)); say $b.perl; # should be: $a[1] = 0x2A
03:23 camelia rakudo 9c5650: OUTPUT«Buf.new(207, 42)␤»
03:24 sorear timotimo: native-typed array
03:25 timotimo mhm.
03:25 timotimo then i get ugly cloning again :|
03:27 gdey joined #perl6
03:27 timotimo hm, but i have unicode that i want to put in there
03:29 timotimo ah, i remember now
03:31 timotimo under native types i don't find something good for characters, so would i need to use integers?
03:34 lue r: my int8 $a = 256; say $a; # native types aren't yet well-implemented it seems
03:34 camelia rakudo 9c5650: OUTPUT«256␤»
03:35 timotimo now it's not much faster, but much more confusing
03:35 timotimo r: my @everything; my int @one = 1, 2, 3, 4, 5; @everything.push: @one;
03:35 camelia rakudo 9c5650: OUTPUT«No such method 'STORE' for invocant of type 'Int'␤  in block  at /tmp/Sk6PwMeEWK:1␤␤»
03:36 timotimo that's a/the problem i have right now.
03:36 timotimo r: my int @one = 1, 2, 3, 4, 5;
03:36 camelia rakudo 9c5650: OUTPUT«No such method 'STORE' for invocant of type 'Int'␤  in block  at /tmp/qrmVEBiQm_:1␤␤»
03:36 timotimo oh!
03:36 timotimo it's not exactly what i thought.
03:37 andrew12 joined #perl6
03:42 lue r: my int $one = 1, 2, 3, 4, 5;
03:42 camelia rakudo 9c5650:  ( no output )
03:42 lue r: my int @one := 1, 2, 3, 4, 5;
03:42 camelia rakudo 9c5650: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Parcel'␤  in block  at /tmp/61fVqZqGsl:1␤␤»
03:42 lue r: my int @one := Array.new(1, 2, 3, 4, 5);
03:42 camelia rakudo 9c5650: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Array'␤  in block  at /tmp/5AUfrx0iFl:1␤␤»
03:42 dalek perl6-roast-data: 311753c | coke++ | / (4 files):
03:42 dalek perl6-roast-data: today (automated commit)
03:42 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/311753ca8e
03:43 [Coke] niecza has been dirty for 305 days. pugs has been clean for 1 day. rakudo has been dirty for 14 days.
03:49 dalek rakudo-star-daily: 3741705 | coke++ | log/ (5 files):
03:49 dalek rakudo-star-daily: today (automated commit)
03:49 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/3741705813
03:51 [Coke] anyone remember ingy's URL for rosettacode?
03:52 [Coke] No updates to rakudo-star module failures. :|
03:53 timotimo hm, i can't create an array with only undefined entries?
03:54 lue r: my @a = Int,Nil,Mu; say $_.defined for @a; say @a.perl;
03:54 camelia rakudo 9c5650: OUTPUT«False␤False␤Array.new(Int, Mu)␤»
03:55 timotimo oh, that's pretty obvious
03:55 timotimo i tried something similar recently, but ended up with Int.new() which gave me a 0 instead
03:55 lue there you go. Undefined entries :) (note that Nil disappers. Can't remember if that's to spec)
03:55 timotimo i think it's time to go to bed.
03:55 lue good ♞ then, timotimo o/
03:56 [Coke] .ask PerlJam about grammar-profiler-simple... the csv.t test has the plan commented out and no actual tests, which is why it's failing.
03:56 yoleaux [Coke]: I'll pass your message to PerlJam.
03:59 timotimo huh. those partial blocks between "lower one eigth block" and "full block" seem to be kind of borked...
04:01 timotimo they don't seem to line up horizontally at all :o
04:01 preflex_ joined #perl6
04:04 * [Coke] initiates a rebuild of a rakudo... and now that it's running, has no idea why he did that.
04:04 * [Coke] has too many rakudos going on.
04:05 [Coke] r: say 1..rand(10).map{* * *}
04:05 camelia rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick�at /tmp/17WEMO1sR7:1�------> [32msay 1..rand[33m�[31m(10).map{* * *}[0m�»
04:05 [Coke] r: say 1..10.rand.map{* * *}
04:05 camelia rakudo 9c5650: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method map at src/gen/CORE.setting:1381␤  in block  at /tmp/EbSK6SGXMO:1␤␤»
04:07 timotimo r: say (1...10).rand.map: { * * * }
04:07 camelia rakudo 9c5650: OUTPUT«␤»
04:13 lue r: say 1..10.rand.map: {* * *}
04:13 camelia rakudo 9c5650: OUTPUT«1..1␤»
04:13 timotimo r: say 1..10.rand.map: {* * *}
04:14 camelia rakudo 9c5650: OUTPUT«1..1␤»
04:14 timotimo er
04:14 timotimo r: say (1..10.list).rand.map: {* * *}
04:14 camelia rakudo 9c5650: OUTPUT«␤»
04:14 timotimo i don't even know what we're trying to do
04:16 timotimo r: for ^3 { sleep 0.1; say now - ENTER now; }
04:16 camelia rakudo 9c5650: OUTPUT«use of uninitialized value of type Nil in numeric context  in block  at /tmp/D21AkL3ClS:1␤␤Instant:1368937007.302503␤use of uninitialized value of type Nil in numeric context  in block  at /tmp/D21AkL3ClS:1␤␤Instant:1368937007.482537␤use of uninitialized value of t…
04:16 timotimo why? :(
04:19 TimToady someone didn't notice the * at S04:1358, I guess
04:20 timotimo r: for ^3 { sleep 0.1; my $entertime; ENTER { $entertime = now };  say now - $entertime; }
04:20 camelia rakudo 9c5650: OUTPUT«0.1143043␤0.1217128␤0.109504899␤»
04:20 timotimo indeed. thanks!
04:22 timotimo r: sleep -10; # tee hee
04:22 camelia rakudo 9c5650: OUTPUT«Cannot go back in time␤  in sub sleep at src/gen/CORE.setting:657␤  in block  at /tmp/JCDlMlrOhn:1␤␤»
04:23 lue :)
04:25 [Coke] r: sleep sleep sleep
04:25 camelia rakudo 9c5650: OUTPUT«(timeout)»
04:25 Psyche^ joined #perl6
04:26 lue .oO(The error message isn't nearly as fun for sleep i;)
04:30 timotimo oh, wow. this is pretty darn cool:
04:31 timotimo my $global-state = 10; for ^10 { manipulate; say "before: ", ENTER { ~$global-state }, " after: $global-state" }
04:31 * sorear steers lue towards Wick rotations
04:43 * lue makes a mental note to look into relativity and quantum mechanics in more detail, to understand better some of the usages of Wick rotations
04:43 dmol joined #perl6
04:52 adu joined #perl6
04:59 dagurval joined #perl6
05:04 kaare__ joined #perl6
05:23 TimToady nr: constant @M = <ones thousand million billion>; constant %M = @M Z=> (1,1000,1000000,1000000000); say %M<million>
05:24 camelia niecza v24-51-g009f999: OUTPUT«1000000␤»
05:24 camelia ..rakudo 9c5650: OUTPUT«postcircumfix:<{ }> not defined for type List␤  in method gist at src/gen/CORE.setting:10022␤  in method gist at src/gen/CORE.setting:893␤  in sub say at src/gen/CORE.setting:10920␤  in block  at /tmp/a1l1OVgUUn:1␤␤»
05:24 TimToady rakudobug, methinks
05:27 [Coke] perl6-lwp-simple depends on MIME::Base64 - is there an easy way with the ufo-based makefile to install that prereq?
05:32 TimToady nr: https://gist.github.com/TimToady/5606798
05:32 camelia niecza v24-51-g009f999: OUTPUT«43␤»
05:32 camelia ..rakudo 9c5650: OUTPUT«No such method 'ast' for invocant of type 'Any'␤  in regex TOP at /tmp/0X_1m6kixK:2␤  in method parse at src/gen/CORE.setting:10354␤  in block  at /tmp/0X_1m6kixK:8␤␤»
05:32 TimToady there's another rakudobug
05:38 TimToady probably from not distinguishing $/ from $¢ as STD-based parsers do
05:40 raiph top down operator precedence parser claimed to work nicely with rec descent parsers: http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/
05:41 * TimToady tried something like that early without much success; turns out the bottom-up opp works well too, and is easier to understand, at least to me
05:43 raiph "associates semantics with tokens instead of grammar rules"
05:45 TimToady well, we do some of that too :)
05:45 woosley1 left #perl6
05:45 erkan joined #perl6
05:45 erkan joined #perl6
05:47 raiph presumably there's an opp in nqp, right?
05:48 raiph (trying to find the opp code relevant to rakudo)
05:49 sorear it's deeeeep in the bowels of NQP
05:49 sorear HLL::Grammar method "EXPR" or so
05:49 sorear it was one of the last things to be rewritten out of PIR, I remember that much
05:51 timotimo my head prefers planning and pretend-giving a perl 6 talk for the GPN in ~2 weeks, so I figure i could just start preparing instead of getting the quite overdue sleep >_<
05:56 raiph sorear: thanks
05:57 sorear GPN?
05:57 dagurval If I make changes to rakudo core modules, do I need to re-run make every time to test the changes?
05:58 sorear dagurval: yes
05:58 sorear dagurval: it's preferred to test your work in a copy of the core module, and then copy back when you're done
05:58 sorear (there are subtleties in this procedure, of course)
05:59 dagurval ok, I see
06:00 dagurval how do I make my copy take precedence over core?
06:06 timotimo sorear: GulaschProgrammierNacht
06:06 timotimo http://gulas.ch/
06:07 SamuraiJack joined #perl6
06:13 sorear bah.  only so many days in the year, but still
06:14 dagurval attempt at loading my copy of the module.. https://gist.github.com/dagurval/3e5e75d6db2e9f6d3b13
06:17 timotimo how is "zavolaj" pronounced correctly, btw?
06:20 sorear timotimo: it's a slovak word
06:21 timotimo doesn't help me much :(
06:22 sorear https://en.wikipedia.org/wiki/Slovak_alphabet
06:23 timotimo ah, that's a good hint
06:23 sorear as long as you don't try to pronounce the j /dʒ/ you're probably doing it OK
06:24 timotimo oh, i've been doing it wrong the whole time!
06:24 timotimo so it should sound more like "zavolai"
06:24 timotimo well, "savolai" if we're turning it into grotesque english spelling
06:25 sorear in an English phonological approximation, yeah.  (probably za- is closer though)
06:25 sorear being german should give you an advantage here, you automatically get the js correct :p
06:26 sorear -speaking
06:31 birdwindupbird joined #perl6
06:37 timotimo did pcre have something like subtracting character classes from each other?
06:37 timotimo i can't find anything in man pcrepattern
06:45 n0den1te joined #perl6
06:52 sorear don't think so
06:53 timotimo great.
06:53 timotimo i'll flaunt that :)
06:53 timotimo i'll try to convey my awe and enthusiasm about perl6 and not go too much into the nitty-gritty if i can
06:55 timotimo hm. i'll only have an hour.
06:55 timotimo i'll probably have to compress a lot of stuff :(
06:56 dagurval joined #perl6
07:05 moritz timotimo: instead of compressing too much stuff, it's usually better to leave it out
07:05 moritz ie focus on a few nice things, and skip the rest
07:05 moritz that's a better experience for the audience than learning about many things but too fast
07:06 timotimo indeed
07:06 timotimo but how do i decide what to cut? :(
07:06 TimToady Martha Steward, the person who does everything better than you, but today is only talking about your drapes. :)
07:06 TimToady *Stewart
07:07 timotimo moritz: do you have a few cycles to spare to use some multi-user-simultaneous-markdown-editing-gizmo with me and occasionally have a look?
07:07 moritz timotimo: yes
07:08 timotimo do you also happen to know a good piece of software that can do that? if not, i'd fall back to google documents.
07:09 moritz timotimo: I don't know any, but I can google it :-)
07:10 moritz http://escrito.herokuapp.com/
07:11 moritz (haven't tested it though)
07:11 timotimo http://escrito.herokuapp.com/0adb6d87f#markdown - let's give it a try
07:11 timotimo i'll quickly paste in what i've got
07:12 timotimo it doesn't seem to have any kind of indicator where other users are looking/typing, or does it?
07:13 timotimo http://socrates.io/#PppE1Dp - how about this?
07:15 moritz that one seems to kill my browser :-)
07:15 timotimo i think i'll use google docs instead. i know it's got some good features.
07:15 moritz or just use github
07:16 diakopter openetherpad
07:16 timotimo i'd prefer realtime.
07:16 timotimo https://docs.google.com/document/d/1G3dK3bEMH9pTy-V51AGHgnglf01d5R5O45s-Q9p1VZI/edit?usp=sharing - does this work?
07:17 diakopter I can comment only
07:17 timotimo one second, i'll quickly paste my stuff
07:18 diakopter wait, what is this
07:18 diakopter looks like leadership..... *runs away flailing arms*   ;)
07:20 diakopter click the chat thing to become un-anonymous
07:20 timotimo it's kind of cute that they have animals there for anonymous users
07:22 woosley1 joined #perl6
07:22 woosley1 left #perl6
07:23 timotimo wow, google docs is user-scriptable in JS
07:32 timotimo moritz: did you discover the chat?
07:35 timotimo okay, this doesn't really work terribly well. excuse me as i switch technologies once again.
07:35 timotimo http://openetherpad.org/perl6gpntalk
07:35 moritz timotimo: no, I didn't discover the chat
07:46 ggoebel joined #perl6
07:54 Su-Shee good morning everyone.
07:54 timotimo hello su-shee
07:55 timotimo can you intuit chunks of perl6 that would make a good 1-hour presentation to people who probably have never seriously looked into perl6 yet?
07:55 timotimo because i'm at a total loss. i don't know where to cut
07:56 moritz timotimo: I'm biased, but I like to introduce / walk through JSON::Tiny
07:57 Su-Shee timotimo: experienced programmers otherwise or perl 5 programmers?
07:57 timotimo hackers in general. i suspect a pretty low percentage of perl 5 knowers
07:58 timotimo (also, i know diddly-squat (that's a funny word!) about perl 5)
07:58 Su-Shee timotimo: then show off whatever you would show off as a "this language has the following interesting features" in any other language.
07:58 Su-Shee timotimo: and don't bother to do "look, it has hashes and arrays too"
07:59 timotimo of course, but given 1 hour, i will have to cut way more than just "it has hashes and arrays"
08:00 Su-Shee timotimo: personally, if I'd sit in the audience, I'd fancy things like "ok, and OO is done like this, and MOP we have here and if you look at the functional programming elements, we do this and as it is a perl, it has advanced text processing here and here"
08:00 Su-Shee timotimo: emphasis on "way more".
08:01 Su-Shee timotimo: show "style" and "features", preferably in sync ;)
08:01 timotimo introduce each new feature with a completely different subset of the syntactic possibilities? :D
08:02 Su-Shee timotimo: comparisons are cool, too. "so, if you'd have in Lisp this, you'd do that in Perl 6" for example.
08:02 Su-Shee timotimo: sure, why not?
08:02 Su-Shee timotimo: we're programmers. we can read many languages.
08:02 timotimo i'd fear i'd lose the audience that way; but since this isn't a "learn to write perl 6 in an hour!" talk, i should probably completely give up on that thought
08:02 Su-Shee timotimo: I only need real help with very unfamiliar things - ocaml for example.
08:03 Su-Shee timotimo: you don't, it's easier to bore people than to go over their heads.
08:03 Su-Shee assuming you have a competent audience.
08:03 timotimo hard to tell, actually. they'll be a very mixed bunch.
08:04 timotimo the GPN is kind of attracting artists, coders, hackers and makers
08:04 Su-Shee timotimo: a good thing to show is usally "conciseness" of a language. like "normally you would have to do this 10 lines, but here it's only 2, because.."
08:04 timotimo "and if you don't need readability, try these 10 characters for fun" :)
08:04 Su-Shee timotimo: artists and makers?! what are they supposed to do with perl 6?
08:04 Su-Shee timotimo: that is the VERY LAST THING to show EVAR
08:05 Su-Shee timotimo: "show me unreadable code!" <- nobody, ever.
08:05 timotimo hahaha, i was not quite serious
08:05 Su-Shee timotimo: skip the golf shit, seriously. nobody cares for stuff like this.
08:05 Su-Shee timotimo: then don't give me a heart attack :)
08:06 timotimo okay, noted
08:06 Su-Shee I'm old, I need clean code ;)
08:06 timotimo re: makers/artists and perl6: the event is no-entrance-fee, two-simultaneous-lectures. thus they have the freedom to attend whatever they like and skip what they don't
08:06 timotimo and even attend workshops at that time
08:06 Su-Shee timotimo: then don't take them into account.
08:07 timotimo also, there'll be a big chill-out area again
08:07 dalek roast: 6ed5d17 | dagurval++ | S32-io/dir.t:
08:07 dalek roast: test that we get IO::Paths with directory in them
08:07 dalek roast: review: https://github.com/perl6/roast/commit/6ed5d17727
08:07 dalek roast: a0422f3 | dagurval++ | / (73 files):
08:07 dalek roast: Merge branch 'master' of github.com:perl6/roast
08:07 dalek roast: review: https://github.com/perl6/roast/commit/a0422f3858
08:07 timotimo yeah, they won't be putting perl 6 code on their arduinos any time soon.
08:07 Su-Shee timotimo: if ever.
08:07 timotimo although tools for their ecosystem might be written successfully in perl6.
08:07 Su-Shee timotimo: no.
08:07 timotimo but i won't go there.
08:07 Su-Shee timotimo: good.
08:08 Su-Shee timotimo: have you ever watched the douglas crockford lecture series about javascript?
08:08 timotimo no, i have not
08:08 timotimo can you summarize what's notable about it, or should i find and watch them?
08:09 Su-Shee timotimo: the javascript part isn't the important part, actually. the lectures are very well done, technically pretty dense and yet good to follow.
08:10 Su-Shee timotimo: they're a must-have-seen, imho.
08:10 timotimo is it important to start with the first one?
08:10 Su-Shee timotimo: he starts with history of languages, and then peels off the bad layers of javascript and shows off the functional features.
08:10 Su-Shee yes.
08:11 timotimo oh my, 1:40h of history
08:12 Su-Shee timotimo: welcome to knowledge ;)
08:13 Su-Shee it's not wasted, really.
08:13 timotimo what? what did i do to deserve all this knowledge?! :(
08:13 Su-Shee you said something while I was awake ;)
08:14 Su-Shee timotimo: no, really, watch it. it gives you a lot to think about.
08:14 Su-Shee timotimo: also, mind his clothes. :) (you'll understand later :)
08:15 timotimo oooh foreshadowing
08:15 timotimo Su-Shee: is "vim with big font and executing snippets out of the file" a bad idea?
08:16 Su-Shee timotimo: his talk inspired me to invest more time into learning "the classics" because when he started rambling about "developers don't even know their own history" I realized that he's right and that I should treat computing like I treated political science: do the classics ;)
08:17 Su-Shee timotimo: no, if you don't embarass yourself with bad font rendering and no antialiasing, it's fine
08:17 timotimo er
08:17 Su-Shee timotimo: just turn down syntax highlighting.
08:17 timotimo gvim will give me pretty fonts at big resolutions, i'd think. although not as pretty as they would be on a mac
08:17 Su-Shee timotimo: that's what I meant :)
08:18 timotimo er, not resolutions, point sizes i meant
08:18 Su-Shee you actually mean both, usally.
08:19 timotimo i will not be able to influence the resolution of the projector. i'll just go with the highest it can do.
08:19 timotimo gvim does antialiasing at higher point sizes fwiw
08:21 Su-Shee antialiasing starts at the point size you configured via fonts.conf (usally your distribution does and it's 8 I think)
08:21 timotimo i'd go with maybe 14pt i anticipate
08:21 domidumont joined #perl6
08:21 Su-Shee timotimo: you probably have to try it
08:22 Su-Shee you can change it anyways on the fly, font size is in one of the menus somewhere in gvim
08:22 timotimo i always do :set guifont=*
08:23 timotimo i hide the menus and scrollbars and status bars on my gvim by default
08:24 Su-Shee I have my own status bar, but disable menus and scrollbars. I also have more tabs.
08:25 timotimo by status bar i meant the little gui widget thing at the bottom, not the "vim status bar" that you also have in terminal vim, jftr
08:25 Su-Shee older gvim with menus and icons but good font rendering: http://frollein-schmidt.de/screenshots/droidmono-utf8.png
08:26 Su-Shee there's a gui widget at the bottom, too?!
08:27 timotimo oh, i guess there isn't
08:28 timotimo can you recommend a font at bigger sizes? i was going to try monaco and envy code at least
08:29 Su-Shee droid mono is my favorite.
08:29 Su-Shee it's the one in the above screen shot
08:29 Su-Shee here's code in it: http://frollein-schmidt.de/screenshots/droidmono.png
08:30 Su-Shee (ignore the lego-colored theme ;)
08:31 timotimo hm, it seems to produce kind of bold letters on my machine
08:33 Su-Shee https://gist.github.com/Su-Shee/5607078 my ~/.fonts.conf
08:35 timotimo diff to mine is hintmedium instead of hintfull and "none" instead of "rgb"
08:35 timotimo what does that rgba thing mean?
08:36 Su-Shee the arrangement of the rgbalpha on your display
08:36 timotimo you mean the LCD subpixels?
08:36 Su-Shee yes
08:36 timotimo what's a good way to figure that out?
08:36 timotimo make a picture with a red, green and blue pixel and zoom in on it with a physical lense?
08:37 Su-Shee if I remember it correctly, mine is the common setting, others are pretty rare
08:37 timotimo good to know
08:37 timotimo but what about projectors? will they have that kind of subpixeling at all?
08:38 timotimo i'd think at least DLP (is that what it's called?) will project the "subpixels" to the very same spot, unless miscalibrated/damaged
08:38 Su-Shee here, this is a good article: https://wiki.archlinux.org/index.php/Font_Configuration
08:40 timotimo okay, i must sum up what you told me, else i'll forget:
08:41 timotimo for the love of the flying spaghetti monster: no golfing
08:41 timotimo it's easier to accidentally bore the audience than to fly way over their heads
08:41 timotimo the settings i made will give me decent font rendering at bigger sizes on the projector
08:42 timotimo instead of "know your audience", "focus on the part of the audience that can benefit from perl 6"
08:42 GlitchMr .u 
08:42 yoleaux No characters found
08:43 Su-Shee timotimo: well it's not an "instead" of "know your audience"
08:43 Su-Shee timotimo: simply do a talk which would interest _you_ :)
08:44 timotimo as in "if you could go back to timotimo anno 2010, what would you tell 'em to spark interest in perl6"?
08:44 Su-Shee not just that.
08:45 Su-Shee timotimo: what is it what intrests you in a talk? do you want illustrative examples? it is about code style? ideas? principles?
08:45 Su-Shee timotimo: I like "principles" and "opinions" for example, I'm interested in thinking differently.
08:46 Su-Shee timotimo: I absolutely hate beginner's talks. I can read that faster from a tutorial on my own.
08:47 Su-Shee timotimo: so I like talk like rich hickey's "simple versus easy" (the clojure guy) or a talk by alan kay (which in itself is cool) about DSLs
08:47 timotimo hm, can you elaborate what you mean by "opinions"?
08:47 dagurval joined #perl6
08:47 Su-Shee timotimo: I love a good rant about the usal conflicts in programming "typed is better! no it's not!" or "you need UML and strong architecture! no, you don't, do bottom-up" :)
08:47 FROGGS_ 3
08:48 domidumont joined #perl6
08:49 timotimo mhm
08:49 Su-Shee timotimo: I'm not a "cool feature" audience, I totally don't care. Not interested.
08:49 Su-Shee timotimo: I like honest talks/books/papers about failures, too.
08:49 Su-Shee timotimo: a lot to think about, a lot to learn from
08:50 timotimo i don't think i can aspire to give a talk that could excite you i fear :D
08:50 Su-Shee timotimo: ever heard of lucid emacs?
08:50 Su-Shee timotimo: I'm difficult :) I already have my opinions and principles. also, it just were examples. maybe you just LOVE cool feature show-offs.
08:52 timotimo i'm excited by lots of the things perl 6 has, but i want to go more deeply than just to say "we do functional! and we also do object-oriented! and we do imperative! and maybe some day someone will make a module for logical programming! and stack based programming! and ..."
08:52 Su-Shee timotimo: also, I put a lot of work into actually finding my opinions and values and principles.
08:52 masak good antenoon, #perl6
08:52 Su-Shee timotimo: well if you actually CAN show that in code in one hour, you already have done a great talk.
08:53 Su-Shee timotimo: like "here, five basic OO principles, in code like this: ... " "here, most common functional elements, looks like this..."
08:53 * masak has done it with Perl 6, several times
08:53 Su-Shee timotimo: "love conservatice procedural? just go like this"
08:54 Su-Shee masak: if YOU couldn't show different perl 6 styles by now.. ;)
08:54 timotimo masak: can i ask you for a bit of advice as well? i've asked for a 1 hour time slot and i don't quite know what portion of perl6 to cut out
08:55 timotimo well, rather: there are only 1h-slots and i've applied for one of them and most probably will get it
08:56 masak timotimo: what makes you enthusiastic about Perl 6? I want to hear what makes your heart beat faster :) then the rest will sort itself out.
08:57 Su-Shee timotimo: SEE? ;)
08:57 masak in speaking courses, the first exercise is sometimes just "get up and rant about something for 5 minutes". as long as you're passionate, people will listen.
08:57 timotimo i wasn't doubting you, but i was hoping there would be an easier way :D
08:57 masak no shortcuts, sorry :)
08:57 timotimo of course. there never are
08:58 timotimo so, i love about perl 6 is that it gives me loads of expressiveness and loads of power to do any kind of thing i want to do
08:58 timotimo and there's so many cool concepts in there and the most amazing thing is that it all seems to fit together so ridiculously nicely
08:58 masak timotimo: maybe show an example of a program can be written in lots of different ways?
08:59 masak and point out cool feature usages as you go.
08:59 masak it's nice if it doesn't get too abstract -- if the feature is actually introduced in a program, in a context.
08:59 timotimo yes, i can appreciate that concept. same with learning languages
08:59 timotimo immersion is the very best way, rote memoization of rules and vocabulary is probably the worst
08:59 masak two of my YAPC::NA talks will lean on RC quite a bit for that reason.
09:00 Su-Shee timotimo: also, you're totally overthinking it by now.. watch talks of other people. extract what you like. copy.
09:01 timotimo you're probably right. i'm also kind of overtired. i couldn't sleep tonight >_<
09:01 Su-Shee don't try to be funny if you're not generally a funny guy.
09:03 timotimo i can do funny. i probably will, to get rid of any nervousness i may build up
09:04 masak oh wow, TimToady++ # http://rosettacode.org/wiki/Names_to_numbers#Perl_6
09:06 FROGGS_ TimToady: I believe this bug https://gist.github.com/TimToady/5606798 is already reported as https://rt.perl.org/rt3/Ticket/Display.html?id=111518
09:07 lizmat good *, #perl6!
09:07 Su-Shee masak: I like novemseptuagintillion best. I use it daily. :)
09:07 masak "87 years ago, our 4 fathers..." # lol
09:08 lizmat o_O { wow, that was a lot to catch up on, since mindlessly watching the ESC }
09:08 * timotimo suddenly succeeded at parsing ESC as "eurovision song contest"
09:09 FROGGS r: constant @M = <ones thousand million billion>; constant %M = @M Z=> (1,1000,1000000,1000000000); say %M<million>
09:09 camelia rakudo 9c5650: OUTPUT«postcircumfix:<{ }> not defined for type List␤  in method gist at src/gen/CORE.setting:10022␤  in method gist at src/gen/CORE.setting:893␤  in sub say at src/gen/CORE.setting:10920␤  in block  at /tmp/09MfiyYyrS:1␤␤»
09:09 * masak .oO( ESC as a way to Esc )
09:09 FROGGS r: constant @M = <ones thousand million billion>; my %M = @M Z=> (1,1000,1000000,1000000000); say %M<million>
09:09 camelia rakudo 9c5650: OUTPUT«1000000␤»
09:13 lizmat .tell moritz: I'm not sure how those changes got mixed in: I did do the git reset --hard origin/nom after creating the new branch
09:13 yoleaux lizmat: What kind of a name is "moritz:"?!
09:13 lizmat .tell moritz I'm not sure how those changes got mixed in: I did do the git reset --hard origin/nom after creating the new branch
09:13 yoleaux lizmat: I'll pass your message to moritz.
09:14 lizmat I guess the only way is to store all of my pull requests as gists, drop the forked repo (thereby invalidating all pull requests I made), fork a new repo, apply patches one by one again in a fresh branch, and create new pull requests?
09:16 spider-mario joined #perl6
09:16 timotimo masak, Su-Shee: one point i'd love to make is that everything in perl 6 tends to have good "principles" behind everything that stretch across wide pieces of the language. but to see those common things pop up, you have to spend lots of time with the language :(
09:17 Su-Shee timotimo: an example?
09:19 timotimo one thing i noticed very early on was the colon-pair-syntax (is it called that?)
09:19 timotimo at first i saw it as putting named arguments into function/method calls
09:20 timotimo then i noticed, that i can use it in hashes, too. and then i saw, that i can actually use them everywhere i wanted
09:20 timotimo that was a nice experience
09:20 Su-Shee timotimo: you mean foo : bar?
09:21 timotimo i mean :foo(123), :foo<yoink>, :foo vs :!foo and :$foo
09:22 lizmat and the real kicker: :2nd
09:22 lizmat aka :nd(2)
09:22 FROGGS nr: say (my %m = ()).WHAT; say (constant %c = ()).WHAT
09:22 camelia rakudo 9c5650: OUTPUT«(Hash)␤(Parcel)␤»
09:22 camelia ..niecza v24-51-g009f999: OUTPUT«Potential difficulties:â�¤  %m is declared but not used at /tmp/nCgqA3u_Ar line 1:â�¤------> [32msay (my [33mâ��[31m%m = ()).WHAT; say (constant %c = ()).WH[0mâ�¤  %c is declared but not used at /tmp/nCgqA3u_Ar line 1:â�¤------> [32msay (my %m = ()).WHAT; say (…
09:23 timotimo lizmat: that, actually, is pretty darn crazy :)))
09:24 Su-Shee bah, all way too cluttered for my taste.. :)
09:24 lizmat it's one of my clarifications the spec: as it was just demoed as :16sweet, and that didn't make any sense to me…  :2nd, :3rd, :1st do
09:24 lizmat :2nd and the like are very nice with matches and substitutions
09:24 FROGGS r: say (my %m = ()).WHAT; say (our %o = ()).WHAT; say (constant %c = ()).WHAT
09:24 camelia rakudo 9c5650: OUTPUT«(Hash)␤(Hash)␤(Parcel)␤»
09:24 timotimo indeed.
09:24 lizmat makes it very readable to me
09:25 FROGGS I guess a constant hash should still be a hash?
09:25 timotimo yeah, :123foo is ... strange
09:25 lizmat :42answer
09:25 lizmat or rather: :42question  :-)
09:26 timotimo Su-Shee: i'm slowly watching the crockford lecture; he just started talking about the "mother of all demos". i'm pretty sure i saw that video
09:26 timotimo i think i shall actually watch that again
09:27 timotimo oh yikes, it's 1:40h
09:31 lizmat FROGGS: I would think so, there is some system here though:
09:31 lizmat r: say (constant %a=()).WHAT; say (constant %a=(a=>1)).WHAT; say (constant %a=(a=>1,b=>3)).WHAT
09:31 camelia rakudo 9c5650: OUTPUT«(Parcel)␤(Pair)␤(Parcel)␤»
09:31 lizmat the first is an empty Parcel.
09:32 lizmat I guess the second is turned into a Pair because it happens to be a 2-element Parcel?
09:33 FROGGS hmmm
09:35 rindolf joined #perl6
09:40 jnthn constant in Rakudo doesn't try to do any kind of coercion of the RHS at present.
09:42 timotimo gosh, what a magical time it was back then
09:46 araujo joined #perl6
09:46 araujo joined #perl6
10:03 tgt joined #perl6
10:12 lizmat off to enjoy the nice weather
10:19 moritz \o
10:19 yoleaux 09:13Z <lizmat> moritz: I'm not sure how those changes got mixed in: I did do the git reset --hard origin/nom after creating the new branch
10:23 aghbas joined #perl6
10:27 lustlife joined #perl6
10:28 Su-Shee left #perl6
10:42 FROGGS joined #perl6
10:42 bloonix joined #perl6
12:12 isBEKaml joined #perl6
12:12 dalek v5: 1aa1ade | (Tobias Leich)++ | / (3 files):
12:12 dalek v5: more dissect_longname -> p5dissect_longname
12:12 dalek v5: review: https://github.com/rakudo-p5/v5/commit/1aa1ade151
12:39 FROGGS jnthn: I wonder how to change the perl6 types to fit perl5's needs... I'd like to, say, a Mu.pm which changes its Str method, but I dont know how to do that
12:40 FROGGS jnthn: I tried making a P5Mu class, and export that as symbol Mu via an EXPORT sub but it didnt work out, I guess I will replay that and show you the problem I run into
13:13 isBEKaml ... and all is silent (OHHAI)
13:13 arc_of_descent joined #perl6
13:13 FROGGS :o)
13:14 colomon \o
13:14 isBEKaml Hello colomon and FROGGS
13:16 arc_of_descent left #perl6
13:16 silug____ joined #perl6
13:19 FROGGS o/
13:21 dayangkun joined #perl6
13:30 FROGGS jnthn: I get "This type cannot unbox to a native string", where can I steal boxing operations from? BOOTSTRAP.pm?
13:40 FROGGS jnthn: nvm, I think I got it :o)
13:44 tgt joined #perl6
13:47 Chillance joined #perl6
13:48 ajr joined #perl6
14:29 FROGGS[mobile] joined #perl6
14:29 FROGGS[mobile] weather++
14:38 mtk joined #perl6
14:56 SamuraiJack joined #perl6
15:01 shinobicl__ joined #perl6
15:06 shinobicl__ joined #perl6
15:26 arlinius joined #perl6
15:35 skids joined #perl6
15:48 ajr joined #perl6
15:54 PacoAir joined #perl6
15:55 * masak drops a pin
15:55 * colomon catches it
15:55 masak nice reflexes.
15:55 * diakopter hears it fall in the forest
15:56 chrisdev joined #perl6
15:57 masak so, yesterday instead of going to bed after midnight, I stayed up for two hours scouring Wikipedia for entries like "group", "monoid", "field", etc. drawing them all on a sheet of paper, linking them together with arrows.
15:57 chrisdev Just installed rakudo on my Mac for first time - running ./perl6 from installed directory works fine, but running it from anywhere else results in perl6
15:58 chrisdev PARROT VM: Could not load bytecode
15:58 chrisdev Could not load oplib `perl6_ops'
15:58 moritz masak: show pictures
15:58 moritz chrisdev: are you sure you ran 'make install'?
15:58 masak moritz: best thing I can do is upload a photo. I really plan to SVG it in the fullness of time.
15:58 masak moritz: so as long as you accept that this is not the final version... :)
15:58 moritz masak: upload a photo sounds great
15:58 * masak gets on it
15:59 chrisdev moritz just like that, without args
15:59 lizmat having used feeds for the first time, I wondered if there is some way of doing
15:59 moritz chrisdev: because it's the error you usually get when you try to run a not-installed rakudo from somewhere else than its source tree
16:00 lizmat @array ==> filter("a") ==> filter("b") ==> @result
16:00 masak lizmat: should be, yes.
16:00 moritz r: say <a b ab> ==> grep /a/, * ==> grep /b/, * ==> say()
16:00 lizmat filter being a sub
16:00 camelia rakudo 9c5650: OUTPUT«a b ab␤␤»
16:00 masak lizmat: &filter
16:01 masak I think.
16:01 PacoAir joined #perl6
16:01 lizmat so how do I receive the incoming in filter then?
16:01 moritz r: <a b ab> ==> grep /a/, * ==> grep /b/, * ==> say(*)
16:01 camelia rakudo 9c5650: OUTPUT«*ab␤»
16:01 chrisdev moritz: um, ok, just RTFMing the install directions - with Perl5, the binary knows where to find its stuff regardless of where its installed
16:01 moritz chrisdev: well, not with rakudo, which is why I asked about 'make install'
16:02 moritz ah, with "without args" you meant "just 'make'", right?
16:02 lizmat moritz: thanks, but instead of the grep, a sub of my own definition with additional parameters specified on how to filter
16:02 ruoso joined #perl6
16:02 chrisdev moritz: yeah, thats the instructions in the INSTALL.txt
16:02 chrisdev moritz: README I should say
16:03 moritz lizmat: well, I do try to supply additional arguments, and grep is not different from functions you wrote yourself
16:03 moritz $ make install # IMPORTANT, installs to install/bin/perl6
16:03 moritz that's what the README says
16:04 masak moritz: http://masak.org/carl/tmp/mathematical-structures.jpg
16:05 moritz masak: wow
16:05 masak moritz: the "root" is the "Set" bubble near the top left.
16:05 masak moritz: I plan to SVGize this, clean it up a bit, and *find examples* of a concrete structure of each type. (which is an example of that type but not of a narrower one.)
16:05 chrisdev mortitz: I'm a moron, I actually did NOT run make install, I've been building so much stuff today I just *assumed* I did - please berate me.
16:06 moritz chrisdev: no reason to berate anybody, happens to all of us occasionally
16:06 moritz masak: I guess you know about dot/neato for automatically laying out such stuff?
16:07 chrisdev moritz: ;)
16:07 lizmat moritz: I must be dense, but how does "my" grep know what to grep on ?
16:07 masak moritz: yes, I do. I was never very good at making them succumb to my wishes, though.
16:07 colomon chrisdev: happens to all of us even after years of working on Rakudo...
16:07 moritz lizmat: yes, that's the question
16:07 moritz r: <a b> ==> say()
16:07 camelia rakudo 9c5650: OUTPUT«a b␤»
16:07 moritz lizmat: seems the feed data is just appended to the argument list
16:08 moritz r: <a b ab> ==> grep(/a/) ==> grep(/b/) ==> say()
16:08 camelia rakudo 9c5650: OUTPUT«ab␤»
16:08 moritz r: sub filter (*@a) { @a[0..*-2] }; <a b c d e> ==> filter() => say()
16:08 camelia rakudo 9c5650: OUTPUT«␤Too many positional parameters passed; got 3 but expected 2␤  in sub infix:<=>> at src/gen/CORE.setting:6702␤  in block  at /tmp/RJdMSUFOQG:1␤␤»
16:08 lizmat r: sub f { say @_ }; <a b> ==> f(3)
16:09 camelia rakudo 9c5650: OUTPUT«3 a b␤»
16:09 lizmat that should work for me…  :-)
16:09 masak moritz: to help navigate that: after I finished drawing it, I realized it has four parts: group-like things (upper left), ring-like things (most of the right half and lower left), modules (lower right), and lattices/orders (top middle).
16:09 ruoso is "jvm-support" the rakudo branch to test the jvm stuff?
16:09 masak should probably color-code those each with their own background in the final diagram.
16:10 moritz ruoso: yes; (needs the newest rak-jvm-support branch from nqp)
16:11 ruoso does it require Oracle's JVM? or does it work with any open source one?
16:12 moritz last I tried, it worked with openjdk-7
16:12 * ruoso giving it a go. Thanks
16:15 PacoAir joined #perl6
16:21 ruoso hm... running make in parallel causes it to fail, apparently. Is that a known issue?
16:21 ruoso (in Rakudo itself, I mean)
16:22 ruoso I think there's some missing dependency declaration
16:22 PacoAir joined #perl6
16:22 moritz not known to me, at least
16:32 ruoso hmmm... can't reproduce...
16:35 lizmat r: sub a ($a=Mu) { }; a
16:35 camelia rakudo 9c5650: OUTPUT«Nominal type check failed for parameter '$a'; expected Any but got Mu instead␤  in sub a at /tmp/IvMlnzFJOY:1␤  in block  at /tmp/IvMlnzFJOY:1␤␤»
16:36 lizmat expected Any?  but but, I specified Mu as the default
16:37 ingy [Coke]: https://github.com/acmeism/RosettaCodeData ?
16:38 ruoso is there a way to get more diagnosis on where things have failed when running the jvm rakudo?
16:39 * lizmat submits rakudobug
16:39 ingy hi lizmat
16:40 lizmat hi ingy, long time no see on #perl6!
16:40 ingy not *that* long :)
16:41 ingy I need to port pegex and testml to p6
16:41 lizmat you must have been lurking then...
16:41 lizmat cool!
16:41 ingy could use some help
16:42 * lizmat is but a novice, but I can try
16:42 ingy I've noticed you hacking on p6 a lot lately
16:43 lizmat doesn't feel like a lot yet to me…    :-)
16:43 ingy :)
16:44 ingy I just started playing with peg/leg. It's looks really solid for what it is. I want to apply the diff of good ideas to pegex
16:45 SamuraiJack_ joined #perl6
16:45 ingy can rakudo bind to C libs yet?
16:46 lizmat I understand yes (NativeCall and Zavolaj come to mind)
16:46 lizmat someone please correct me if I'm wrong, haven't done anything with it myself yet
16:47 tadzik it can, yes
16:47 FROGGS NativeCall is the module, Zavolaj its repository name
16:48 sqirrel joined #perl6
16:48 moritz it's good enough to bind to mysql, postgresql and sqlite
16:49 ingy groovy
16:50 ingy someone should bind libpcre :)
16:51 lizmat and what would be the benefit of that ?  I mean, in a Perl 6 context with grammars and all that shit  :-)
16:52 ruoso hmm... I wonder how hard it would be to annotate the jvm bytecode with debugging information
16:53 dbr joined #perl6
16:53 lizmat I think donaldh++ and jnthn++ are already working on that
16:54 ingy lizmat: I need pcre to (easily) port pegex to p6
16:54 timotimo hm. how much do you have to fight perl6 in order to come up with a prototype based OOP system?
16:55 ingy and I need pegex as the basis for many acmeist packages
16:55 lee_ isn't there a :p5 regex modifier? not sure how accurately that simulates p5 regexes
16:56 ingy lee_: yes, but I don't believe it is implemented :)
16:56 ingy at least that's what I last heard
16:57 FROGGS r: say "abc" ~~ m:P5/^abc$/
16:57 camelia rakudo 9c5650: OUTPUT«「abc」␤␤»
16:57 FROGGS r: say "abc" ~~ m:P5/^ abc $/ # perl6-mode would ignore whitespace
16:57 camelia rakudo 9c5650: OUTPUT«False␤»
16:57 FROGGS see?
16:57 ingy great
16:58 FROGGS you have to test what pieces are supported and which are not
16:58 ingy nobody tells me these things!
16:58 FROGGS depending on the crazyness of your regexes :o)
16:58 FROGGS brb
16:58 ingy the regexes are all generated and quite sane
16:59 zipf joined #perl6
16:59 lizmat ingy: you didn't ask that, you assumed you needed pcre  :-)
17:00 ingy r: say "abc" ~~ m:P5/^ab([cd])/
17:00 camelia rakudo 9c5650: OUTPUT«「abc」␤ 0 => 「c」␤␤»
17:00 ingy lizmat: not really. I was informed that m:P5 was not working anywhere
17:01 ingy some time ago though
17:01 masak indeed.
17:01 ingy it didn't seem like a high priority here (with grammars and all that shit  :-)
17:03 ingy I'll giv'r a try, and report back any needs
17:04 FROGGS ingy: btw, it would actually help if you would try P5-regexes and report bugs, I'd love to fix them
17:05 ingy FROGGS: thanks!
17:07 ingy is there P5 (or native binding) support outside rakudo?
17:13 jnthn ruoso: The debugging info, if you mean line numbers, should already be going in there...just need to incorporate it into the stack trace output.
17:13 jnthn donaldh++ did that part
17:14 lizmat ingy: I don't really understand that question
17:16 ruoso jnthn: I was trying to get any type of information on how things were failing, but I'm not being able to derive anything...
17:16 ruoso I even tried to use jdb, but I can't quite get any debug information
17:20 ruoso for instance, if I try something I know is not supported, I get https://gist.github.com/ruoso/5608329
17:20 ruoso but I can't quite figure out how to go from there to see where and how it is failing
17:27 timotimo wow, going for the complicated stuff so quickly, ruoso? :)
17:27 jnthn ruoso: Ah, that's 'cus the Rakudo backtrace thingy is not yet functional
17:27 jnthn ruoso: Do --ll-exception
17:27 jnthn That often gives something usefuller
17:28 ruoso ah... that was better...
17:28 jnthn :)
17:29 ruoso but... https://gist.github.com/ruoso/5608345
17:29 ruoso still not really... :)
17:30 timotimo so, in the actions, some phasers look like make $*W.add_phaser($/, 'INIT', ($<blorst>.ast)<code_object>, ($<blorst>.ast)<past_block>);  and some look like make $*W.add_phaser($/, 'ENTER', ($<blorst>.ast)<code_object>);
17:30 timotimo am i correct in assuming that adding the ($<blorst>.ast)<past_block> to ENTER would make it work in expressions?
17:30 jnthn timotimo: No
17:30 jnthn There'll be a bit more to it than that.
17:30 timotimo mhm
17:31 jnthn You may need to do that, but still...
17:31 timotimo ah, i see there's a big bunch of ifs in add_phaser
17:31 jnthn The question is where to stick the answer.
17:31 jnthn You can probably just declare a QAST::Var local to store it in and evaluate to something to look at up
17:32 jnthn We can't store it globally as that'd break as soon as you did closures or recursion :)
17:32 jnthn So the INIT approach wouldn't work, for example
17:32 timotimo hu-hum
17:34 jnthn I doubt it's more than 3-4 line addition to make it work... :)
17:34 jnthn It's just writing the correct 3-4 lines :P
17:34 * lizmat finally figured out how to make pull requests clean: https://github.com/rakudo/rakudo/pull/145
17:34 MrMeek joined #perl6
17:34 timotimo hehe, yes.
17:38 japhb Installing Oracle JDK 7 did not seem to fix the JVM segfault during build of nqp-jvm.  :-(
17:38 lukas_ joined #perl6
17:38 jnthn japhb: Or help at HEAD?
17:40 timotimo jnthn: i'm not sure how to tell the phaser what variable to set and i don't quite know if i can define the lexical vraiable at the point where the phaser is placed, because the phaser would be executed before that part is 'hit'
17:41 japhb jnthn, HEAD of rak-jvm-support?
17:41 jnthn japhb: yeah
17:41 japhb I can try that if you like?
17:41 japhb er, .
17:41 jnthn japhb: Well, you had a different problem with that last time, but not a segfault?
17:41 tgt joined #perl6
17:41 jnthn timotimo: You declare the variable; make a fresh name by calling .unique('enter_res_') or so
17:42 jnthn timotimo: I think there's already code to run the phaser at the block start; bind the local (not a lexical) to whatever it produces. And then instead of evaluating to Nil, evaluate to a lookup of the variable that was bound earlier.
17:43 timotimo i'll look into Code.add_phaser then
17:44 jnthn That's probably not quite the place this goes...pretty sure the code you need to edit is in World.nqp
17:44 jnthn Time for dinner; bbiab
17:45 timotimo OK
17:45 timotimo good appetite :)
17:46 timotimo ah, it's probably in add_phasers_handling_code
17:58 ingy lizmat: I meant niecza et al
18:02 census joined #perl6
18:05 donaldh joined #perl6
18:07 FROGGS n: say "abc" ~~ m:P5/^ abc $/ # has niecza perl5 regexes?
18:07 camelia niecza v24-51-g009f999: OUTPUT«Unhandled exception: Autoloading NYI␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤  at /home/p6eval/niecza/src/STD.pm6 line 4672 (Regex.tweak @ 8) ␤  at /home/p6eval/niecza/src/STD.pm6 line 500 (ANON @ 5) ␤  at /home/p6eval/niecza/sr…
18:08 rindolf joined #perl6
18:08 FROGGS ingy: so it looks like there is no PR-regexes and no NativeCall in niecza
18:08 FROGGS dont know about other c-lib calls
18:09 ingy what is the current @et_al?
18:11 ingy another way to port pegex is to compile pegex grammars to p6rules
18:12 masak rn: my @et_al; say +@et_al # might be this at this point, actually
18:12 camelia rakudo 9c5650, niecza v24-51-g009f999: OUTPUT«0␤»
18:13 masak well, depends how you count, for sure.
18:13 masak rakudo and niecza are the only two listed under "Compilers" at perl6.org. and in http://perl6.org/compilers/features
18:19 * ingy looks forward to a UniScript bot ☺
18:19 ingy .uni is a wip cdent syntax
18:19 ingy that will compile to p6 one day
18:20 ingy so I can single source p5/p6(/py/rb/js/…) packages one day
18:20 ingy uniscript gets it's name because the current version makes absurd use of unicode chars
18:22 adu joined #perl6
18:23 ingy https://github.com/ingydotnet/testml-cd/blob/master/lib/TestML.uni :P
18:23 ingy in general, a LiveScript variant would be my preferred cdent syntax
18:24 ingy it's teh sexy and teh au
18:24 lue rn: say val("1+2i");
18:24 camelia niecza v24-51-g009f999: OUTPUT«1+2i␤»
18:24 camelia ..rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    val used at line 1. Did you mean '&eval'?â�¤â�¤Â»
18:25 lizmat val is NYI in rakudo
18:25 masak ingy: is "LiveScript" your spelling of "JavaScript"?
18:25 ingy lizmat is obviously not a p6 n00b :P
18:26 ingy masak: heh, no it's #livescript a coffeescript variant heavily used by clkao and audreyt
18:27 lue ingy: I'm not finding uniscript. Could you give a link to its page?
18:28 rindolf joined #perl6
18:29 geekosaur there is a strange historical not-quite-loop there
18:30 ingy lue: it's *very* wip… https://github.com/ingydotnet/uniscript/ it's just a name at this point to a coffee-esque syntax that will become probably my first cdent syntax
18:30 lue geekosaur: are you thinking of APL? :)
18:30 masak ingy: ah.
18:30 ingy geekosaur: http://livescript.net/#name
18:31 masak ingy: when I searched for "LiveScript" on Wikipedia, it redirected me to "JavaScript" :)
18:31 * geekosaur was in fact referring to what that first paragraph says
18:31 geekosaur (without having read it, since some of us still remember when livescript was renamed javacript)
18:31 ingy only 18 people in #livescript
18:32 ingy but au has already done aumazing things with it
18:33 timotimo wow, i'm getting a *lot* of flak for trying to defend the decision to allow - in identifier
18:33 timotimo s
18:33 ingy timotimo: livescript does it
18:33 ingy :)
18:33 * lizmat has reworked all of her patches from the past weeks to clean pull requests (just 7 of them ;-)
18:34 ingy foo-bar is sugar for fooBar
18:34 timotimo oh, wow
18:34 ingy I kinda like it.
18:34 masak lizmat++
18:35 lue .oO("How can we tell the difference between variable $foo-bar and variable $foo minus sigilless bar‽‽")
18:36 japhb jnthn, had no luck with Oracle Java even on rak-jvm-support.  Under the assumption my clone may just be borken, I'm cloning fresh to try again.  :-/
18:36 ingy I was just playing around with adding it to pegex-identifiers
18:36 lizmat lue: whitespace
18:36 timotimo lue: identifiers are greedy
18:36 ingy :)
18:36 lue I was imagining some of the opposition to - is all :)
18:36 ingy bad for golf!
18:37 japhb I was going to say, I'm pretty sure lue knew the answer to his question.  ;-)
18:37 donaldh japhb: in what timeframe. nqp/rak-jvm-support latest seems broken for me.
18:37 donaldh japhb: it was working before jnthn's last commits.
18:38 SamuraiJack__ joined #perl6
18:38 ingy FizzBuzz in LS is:
18:38 ingy [1 to 100]map ->[k+\zz for k,v of{Fi:3,Bu:5,Ba:7}|it%v<1]*''||it
18:38 lizmat Perl6 isn't about golfing: Perl6 is the 3D printer of programming languages
18:38 japhb donaldh, I was building head as of a couple hours ago
18:38 * lue thought the use of interrobangs (plural!) would hint at his non-seriousness
18:38 ingy note the ungodly ws
18:38 donaldh japhb: Unhandled exception: Wrong number of arguments passed; expected 0..0, but got 10    ?
18:39 japhb donaldh, different counts of expected and got, but yeah, same problem.
18:39 japhb What's your platform?
18:39 timotimo std: my $foo- = 5;
18:39 donaldh MacOS
18:39 camelia std 9906f18: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix = instead at /tmp/8MMTtv_TZb line 1:�------> [32mmy $foo- [33m�[31m= 5;[0m�Parse failed�FAILED 00:00 43m�»
18:39 japhb donaldh, using what 'java -version'?
18:40 donaldh japhb: java version "1.7.0_21"
18:40 ingy lizmat: what about 3D golfing?
18:40 japhb donaldh, OpenJDK or Oracle?
18:40 diakopter lizmat: Perl 6 is a 3D printer printer
18:41 donaldh japhb: Oracle. Oh. Intermittent.
18:41 donaldh I used to get intermittent crashes.
18:41 ingy diakopter: golf that for me
18:41 lizmat diakopter: ;-)
18:41 japhb ingy, we win simply by being *able* to golf in 3D.  Every linear dimension can shrink while still containing the same measure of space.  ;-)
18:41 ingy japhb: %-)
18:42 timotimo lue: obviously it's stupid to allow - inside names, because that's an arithmetic operator
18:42 donaldh japhb: methinks byte code generation and use of invokedynamic is sufficiently off-piste to expose JVM bugs.
18:43 diakopter timotimo: what about '
18:43 timotimo i better not tell them about that, or they'll be entirely convinced that perl 6 is the dumbest language ever invented
18:44 japhb donaldh: So far, I'm getting the same problem with either Oracle or OpenJDK
18:44 diakopter it was invented? I thought it fell from heaven
18:44 lue What about ' in Perl 5 ? :) [It means something there]
18:44 donaldh japhb: should be the same code
18:44 timotimo lue: what does it mean?
18:44 masak japhb: I just had a horrible vision of golfing combined with the Banach-Tarski paradox
18:44 lue IIRC, ' == :: in Perl 5
18:45 geekosaur ada? haskell?
18:45 japhb diakopter, Perhaps the way to reach heaven is to follow the fourth dimension while maintaining one's three-dimensional spacial reference frame rooted on TimToady's brain.
18:46 japhb donaldh, "should" I agree, but I needed to rule out shenanigans
18:47 lue .oO(Perl 6 is the 3D printer that decided to accomplish its designed task by manipulating subatomic particles into the correct configurations. This method of 3D printing takes *decades* to make feature-complete)
18:47 donaldh japhb: aye, agreed.
18:47 donaldh japhb: what platform are you on?
18:47 japhb masak: chuckle
18:47 donaldh flight &
18:47 japhb donaldh, linux-i686 (Linux Mint, AKA "Ubuntu + different desktop")
18:47 lizmat r: class A { method a (Mu $b?, :$a=Mu) {} }; my $a=A.new; $a.a(1)
18:47 camelia rakudo 9c5650: OUTPUT«Nominal type check failed for parameter '$a'; expected Any but got Mu instead␤  in method a at /tmp/yydp3SM9XJ:1␤  in block  at /tmp/yydp3SM9XJ:1␤␤»
18:48 lizmat moritz: is that also right?  feels wrong to me, even with the type constraint specified
18:48 lizmat ah, duh
18:48 lizmat moritz: sorry, see it now
18:49 timotimo lue: ' is not a problem, because it's not used for arithmetic, so ...
18:50 pmurias joined #perl6
18:50 chrisdev joined #perl6
18:50 lue .oO("My Hold'em module's breaking! What did you do?" "I just closed off all the open single quotes you had lying around...")
18:51 timotimo :D
18:52 timotimo i wonder why things like $foo---bar wouldn't be allowed
18:53 * lue gets the feeling ' was left in Perl 6 to keep Perl 5 modules from needing too many changes in the upgrade process
18:56 pmurias lue: ?
18:57 pmurias lue: you mean 'string literal'?
18:57 lue "Perl 5 compatibility" is the only reason I can think to keep ' in variable names in Perl 6
18:58 ingy I thought ' was deprecated in p5
18:58 gtodd ' in variable names is allowed in perl 5?
18:59 ingy ' means :: in package names
18:59 pmurias and it's not used in modern perl 5 code
18:59 ingy not even by ingy
18:59 pmurias perl6: my $foo'bar = 123;say $foo'bar;
18:59 camelia rakudo 9c5650, niecza v24-51-g009f999: OUTPUT«123␤»
19:00 ingy ? and ! work nicely in ruby
19:00 pmurias gtodd: it's treated as a part of the variable name, and not as a :: like in Perl 5
19:00 ingy imo
19:03 * ingy is converting https://github.com/jgm/peg-markdown/blob/master/markdown_parser.leg peg/leg grammar to Pegex.
19:03 ingy anyone interested in converting it to p6rules?
19:04 ingy looks like it could be used as the basis for several markup converters
19:06 gtodd http://www.pegex.org/ <-- is you?
19:06 timotimo it would seem so
19:06 gtodd does it help me use p6-rules in p5?  or ....
19:07 * ingy cringes… *click*
19:07 ingy yes, that's my pegex thing
19:07 ingy it helps you use Pegex in Perl5
19:07 ingy and in Ruby
19:07 ingy exactly the same
19:08 ingy (exact same idion for idiom port, passing same TestML tests)
19:08 gtodd so it's an alternative to  Perl6::Rules ...
19:08 ingy porting to Node/LiveScript currently
19:09 ingy gtodd: it was originally meant to be (a lot of) p6rules for everyone (that has a regex engine)
19:09 gtodd cool so learning Pegex one can master perl6 rules and then use the same approach in many languages
19:09 gtodd that makes it sound really really useful :-)
19:10 gaussblurinc joined #perl6
19:10 gaussblurinc hi!
19:10 gtodd I just started learning about rules and trying to figure out how I might use them with Perl6::Rules in perl5
19:11 ingy the idea is to be able to easily create new DSL-s (like jsony) and publish them everywhere (that pegex is ported)
19:11 gaussblurinc are there any special channels connected to gsoc 2013 parrot?
19:11 ingy gtodd: you can /join #pegex :)
19:17 tadzik gaussblurinc: #parrot probably
19:17 tadzik gaussblurinc: on irc.perl.org
19:21 rindolf joined #perl6
19:22 gaussblurinc tadzik: thank you
19:27 tadzik you're welcome
19:27 dagurval is there some way of seeing exported subs of a module?
19:27 dagurval r: use Test; say Test::^methods
19:27 camelia rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    methods used at line 1â�¤â�¤Â»
19:28 lizmat tadzik: doing a fresh panda clone in my rakudo fork, and get this: $ mp6 bootstrap.pl (nl) Could not find Shell::Command
19:28 tadzik lizmat: oh, I think I know
19:28 lizmat ring a bell?
19:28 tadzik yeah
19:28 tadzik git submodule update?
19:28 tadzik there's a similar bug report too, I think it's related to submodules
19:29 lizmat ??  in panda?  doesn't do anything
19:29 tadzik git submodule init, and then submodule update?
19:30 Chillance joined #perl6
19:30 lizmat yup, that's it
19:30 lizmat hhmmm… feels to me labster should update his blog post then: http://blog.brentlaabs.com/2013/05/how-to-start-hacking-on-rakudo-perl-6.html
19:35 tadzik no
19:35 tadzik I should update panda so it's not necessary
19:35 tadzik those steps can be ran by bootstrap
19:36 tadzik by merging the pull request I broke UX
19:36 lizmat seems like a good idea
19:37 lizmat BTW, does JSON::Tiny do Typed hashes ?
19:37 tadzik I don't think so, no
19:38 tadzik oh, that reminds me of a JSON project I wanted to do :)
19:38 lizmat grrrr… I need support for typed hashes for what I want to do  :-)
19:39 jnthn lizmat: I'm not sure JSON itself can represent a hash with non-string keys?
19:39 lizmat hmmmmm… then maybe I should have a look at Sereal   ;-)
19:41 lizmat typed hashes aren't much good if we can't serialize/deserialize them
19:41 lizmat or is there another way to serialize typed hashes in rakudo that I don't know of?
19:44 arnsholt We don't really have anything like Storable, I think
19:45 arnsholt Unfortuntaely. I've been meaning to look into whether it's possible to hijack jnthn's bounded serialization code to do it, but tuit underflow has happened so far
19:45 lizmat that serialization code is for creating CORE.setting, right?
19:46 jnthn Yeah, and everything else.
19:46 jnthn The reason you *don't* want to use it for making a Storable module is that you statically link the stuff you serialize against, say, a particular CORE.setting.
19:47 lizmat aha, ok, I see
19:47 jnthn So, upgrade your Rakudo and you can't deserialize.
19:47 jnthn If those conditions are fine for you (e.g. it's just a cache) then it's usable.
19:47 lizmat then maybe I just need to write a better .perl for the module I'm writing, and just "do" the file
19:47 berekuk joined #perl6
19:48 lizmat pretty sure I want it readable by different versions of rakudo, at least the ones sharing @INC directories
19:48 jnthn OK, then it's the Wrong Tool For The Job.
19:48 lizmat .perl it is then  :)  for now at least
19:48 jnthn While you work on module stuff, though, please do remember that pre-comp stuff *is* at the level of "cache"
19:48 jnthn So if you want multiple Rakudos side by side, they're each gonna need their own place to have pre-comp'd things.
19:49 lizmat this is just about being able to quickly find whatever pre-comped or source stuff can be found
19:50 jnthn Sure, but we probably want to know to ignore any pre-comp'd stuff built with a different version of Rakudo.
19:51 arnsholt jnthn: Good to know. I won't sink too much time into that project then =)
19:51 lizmat so you're saying that apart from longname/from/auth/version, we also want to remember which version of rakudo is needed (and also the VM I guess)
19:52 lizmat is that something that can be introspected from a pre-comp'd file?
19:53 jnthn There's no way to do that at present, and it's a bit tricky 'cus the precomp output looks different per VM
19:53 jnthn (a PBC on Parrot, a .class on the JVM, etc.)
19:53 jnthn (uh, typically PIR on Parrot, actually)
19:53 lizmat there is no magic header or so?
19:54 lizmat or would the extension already give it away?
19:54 jnthn Well, the extension gives away VM I guess
19:55 jnthn I see it more as knowing whether or not you need to load the module from source or if you can use a pre-compiled version 'cus there's one to hand that is good enough.
19:55 lizmat wouldn't different VM's use different @INC directories, though?
19:55 jnthn Dunno. :)
19:55 jnthn Depends how we implement it. that's up to us really.
19:55 lizmat understood
19:56 lizmat there would be something to say for sharing source in @INC between different VM's
19:58 lizmat I mean, in principle, a .pm or .pm6 should be runnable by either rakudo-parrot, rakudo-jvm or niecza, right?
19:58 FROGGS jnthn: is there a way to override a symbol like Any just within a block?
19:58 FROGGS jnthn: like: { use v6; my $a; "$a"; { use v5; "$a"; { use v6; "$a" } } } # warning in the v6 blocks about Any in Str context, but not in the v5 block
19:59 FROGGS I already have my own Any in a v5 block if the variable gets declared there
19:59 lizmat if warnings were enabled in the v5 block, you would get warnings there as well
19:59 FROGGS so my question is like: can I have another symbol lookup within a given v5 block?
20:00 FROGGS lizmat: yes, true, is just an example
20:00 lizmat so do you want to stop the warnings in P6, or add the warnings in P5 ?
20:01 FROGGS it is not about the warnings, it is about the behaviour at all, like: -"42foo"
20:01 lizmat ah, ok, then I'll shut up  :-)
20:01 FROGGS this dies in v6 land, but not in v5
20:02 FROGGS so, I want to have a Perl5::Any in v5 which is used instead of Any
20:02 FROGGS but if a v6 block is inside my v5 block, it should use Any again
20:03 FROGGS like doing an indirect symbol lookup for the Type :/
20:03 lizmat gotcha
20:04 lizmat tadzik: I'm in a loop  :-(   https://gist.github.com/lizmat/5608798
20:04 lizmat afaics it's complaining about something not being in the path, when it is
20:06 FROGGS hmmm, the type-lookup should behave more like a dynamic variable
20:06 FROGGS damn, is that possible at all?
20:06 timotimo jnthn: am i correctly assuming that in order to make the ENTER/FIRST code work i'll have to wrap the Block that comes in throught the phaser to add a binding operation to it? otherwise i'm not sure how to do it properly :|
20:08 FROGGS timotimo: are you talking about this? method statement_prefix:sym<ENTER>($/) { make $*W.add_phaser($/, 'ENTER', ($<blorst>.ast)<code_object>); }
20:08 timotimo yes, something around that piece
20:09 timotimo i was mostly staring at the actual add_phaser method in world, though
20:09 FROGGS what are you going to do?
20:09 FROGGS didnt catch your problem
20:09 timotimo i know approximately how to emit code that retrieves the stored value, but i do not know how to add the piece of code to the phaser that will store the value in the first place
20:09 timotimo ENTER and FIRST are currently not allowed in expressions, only as statements
20:09 timotimo well, they are allowed, but they will always return Nil
20:10 FROGGS ahh
20:10 FROGGS you changed the grammar already?
20:11 timotimo no
20:11 timotimo i don't really see why i'd need that?
20:12 FROGGS ahh, you probably dont have to
20:12 timotimo i'll play a bit of starcraft with a friend before going back to that. if you happen to have an epiphany, i wouldn't mind if you implemented it first ;)
20:13 FROGGS will give it a try now :o)
20:13 FROGGS r: say FIRST 1
20:13 camelia rakudo 9c5650: OUTPUT«Nil␤»
20:14 FROGGS r: say BEGIN 1
20:14 camelia rakudo 9c5650: OUTPUT«1␤»
20:14 timotimo there's a few hints from jnthn in the backscroll that you probably should have a quick look at
20:15 FROGGS thx
20:16 FROGGS ahh, yes
20:16 FROGGS sounds good
20:17 FROGGS r: say START 1
20:17 camelia rakudo 9c5650: OUTPUT«1␤»
20:18 pmurias FROGGS: re Any being looked up differently in your example { use v6; my $a; "$a"; { use v5; "$a"; { use v6; "$a" } } }, where is Any looked up in the v5 block?
20:18 pmurias p6eval: my $a;say "$a";
20:19 FROGGS pmurias: $a declared in  v6 is Any
20:19 FROGGS and Any.Str should behave differently (at least when warnings are turned off in v5)
20:20 pmurias perl6: my $a;say "$a"
20:20 camelia rakudo 9c5650: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/95uAALhfp9:1␤␤␤»
20:20 camelia ..niecza v24-51-g009f999: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 1355 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/RIEq5Pd5Pe line 1 (mainline @ …
20:21 pmurias FROGGS: what I suppose we need to make that work is support for "use lax" in rakudo
20:24 lizmat well, maybe…  but perhaps this can be fixed ad-hoc by providing a different Any.Str ?  or is that exactly the issue?
20:25 FROGGS pmurias: if this would be the only issue I'd say yes, let's change this bit of rakudo
20:26 FROGGS but think of: { use v5; -"42foo"; { use v6; -"42foo" } } # the v5 one will live while the v6 one will die
20:26 FROGGS and there are so many differences
20:27 FROGGS ... between v6 and v
20:27 FROGGS 5
20:27 FROGGS I cant turn rakudo in a perl5-only interpreter :o)
20:27 pmurias we need to have a Perl5 setting
20:29 FROGGS jnthn: told me if v5 had its own setting, then you cant use variables from outer scopes
20:29 FROGGS and this makes v5 a bit useless IMO
20:29 pmurias yes
20:29 pmurias unless we do the lookup in a hackish way
20:29 SamuraiJack joined #perl6
20:29 lizmat is there a way to quickly determine if a value is a scalar (Int,Numeric,Rational,Str,etc) or not?
20:31 FROGGS Str.Numeric does check what it contains and gives you the proper container
20:31 FROGGS r: say "1".WHAT; say "1e2".WHAT
20:31 camelia rakudo 9c5650: OUTPUT«(Str)␤(Str)␤»
20:31 FROGGS r: say "1".Numeric.WHAT; say "1e2".Numeric.WHAT
20:31 camelia rakudo 9c5650: OUTPUT«(Int)␤(Num)␤»
20:31 lizmat FROGGS++
20:33 masak r: say "1".Numeric ~~ Int; say "1e2".Numeric ~~ Num
20:33 camelia rakudo 9c5650: OUTPUT«True␤True␤»
20:33 pmurias FROGGS: that is while we would be looking up thing in Perl5 mode when we lookup something from the Perl 6 setting we would instead look it up from the Perl 5 one
20:33 masak r: say "1".Numeric ~~ Num; say "1e2".Numeric ~~ Int
20:33 camelia rakudo 9c5650: OUTPUT«False␤False␤»
20:33 pmurias FROGGS: I think that requires extending QAST
20:33 FROGGS :/
20:34 tadzik lizmat: hmm
20:35 FROGGS hmmm, if I could dispatch "$a" to another method (P5Str) instead of .Str, then I just would need to mixin other methods
20:35 tadzik lizmat: I'll merge panda2 first, so I don't solve the same problem twice :)
20:35 lizmat tadzik: maybe something to look at at the PLPW ?
20:35 lizmat I'm not in a hurry
20:36 tadzik lizmat: that too :)
20:36 tadzik some at PLPW, some at YAPC probably
20:38 dalek panda: 2857063 | tadzik++ | / (32 files):
20:38 dalek panda: WIP
20:38 dalek panda: review: https://github.com/tadzik/panda/commit/2857063ac8
20:38 dalek panda: 092e18d | tadzik++ | / (14 files):
20:38 dalek panda: After blood, sweat and tears: panda2
20:38 tadzik hah
20:39 dalek joined #perl6
20:39 lizmat want me to pull and retry?
20:40 lizmat tadzik: want me to pull and retry?
20:41 tadzik lizmat: no :( I seem to have broken panda
20:41 tadzik submodules
20:42 * lizmat will wait with pulling, then
20:42 chrisdev joined #perl6
20:44 dalek panda: 3a6ee39 | tadzik++ | / (4 files):
20:44 dalek panda: Hopefully unbreak submodules
20:44 dalek panda: review: https://github.com/tadzik/panda/commit/3a6ee39dbb
20:44 tadzik that should do it
20:44 tadzik ingy: you can try now
20:44 tadzik er, lizmat ^
20:44 lizmat will do
20:45 lizmat then just run the bootstrap.pl again?
20:46 tadzik yes
20:46 tadzik nothing else should be needed
20:46 lizmat a working rakudo, perhaps   :-)  waiting for a make to finish
20:47 ingy people always get /me and lizmat mixed up
20:51 lizmat tadzik: I've updated the gist https://gist.github.com/lizmat/5608798
20:51 lizmat maybe I should start from scratch?
20:51 FROGGS r: for ^2 { say NEXT 1 }
20:51 camelia rakudo 9c5650: OUTPUT«Nil␤Nil␤»
20:52 * lizmat is trying to fix List.gist so that "my @a=Any; say @a" doesn't warn
20:54 Timbus joined #perl6
21:00 tadzik lizmat: whoa, what's that
21:00 lizmat no idea
21:00 lizmat perhaps this has to do with all of my patches already been applied   :-)
21:00 tadzik very odd
21:01 lizmat can I do a make distclean?
21:01 tadzik lizmat: does that help if you clean %*CUSTOM_LIB<site> an dthen bootstrap?
21:01 * masak writes his first 'gather given open($file)' ever
21:01 tadzik in panda? Not quite
21:01 tadzik you can git-clean -fdx if you have no uncommited changes
21:02 masak "get_attr_str() not implemented in class 'Coroutine'" :(
21:02 masak bummer.
21:02 lizmat tadzik: Removing .work/ (nl) fatal: Not a git repository: .work/1368996583_2/ext/File__Tools/../../.git/modules/ext/File__Tools
21:03 lizmat masak: I've encountered that one a few times already
21:03 FROGGS me too
21:03 lizmat masak: this is actually an error in the error reporting, it's a rethrow of the real pb
21:04 tadzik ¿que? submodules, how do they work :|
21:04 tadzik lizmat: rm -rf .work, try again?
21:04 masak lizmat: I see. any known workaround (to get the actual error?)
21:04 masak ("don't die in a gather", I guess)
21:05 FROGGS --ll-exception?
21:05 lizmat look at the stack trace, there are a few empty lines in there before the rethrow
21:05 masak yeah, that helps :)
21:06 dalek perl6-roast-data: 9a5bbe2 | coke++ | / (4 files):
21:06 dalek perl6-roast-data: today (automated commit)
21:06 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/9a5bbe2e16
21:07 lizmat tadzik: bombed again, cleaning out site, trying again
21:07 tadzik :|
21:08 tadzik all-fresh bootstrap worked here
21:08 dalek rakudo-star-daily: 413ddf9 | coke++ | log/ (5 files):
21:08 dalek rakudo-star-daily: today (automated commit)
21:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/413ddf9210
21:08 tadzik oh!
21:09 tadzik or not
21:10 lizmat still bombs, but with a nicer message: please make sure site/bin is in your path (when it is)
21:10 tadzik :|
21:10 tadzik I added 'git submodule init; git submodule update' to bootstrap.pl
21:10 tadzik but it doesn't seem to do anything. when I run it manually, then it runs
21:11 * lizmat is not sure how she can help
21:13 tadzik ooooh
21:14 tadzik 1) it's shell, not run. Run doesn't seem to do anything
21:14 tadzik 2) it needs to be BEGIN time
21:15 dalek panda: 4607cd1 | tadzik++ | bootstrap.pl:
21:15 dalek panda: Fix bootstrap.pl, again
21:15 dalek panda: review: https://github.com/tadzik/panda/commit/4607cd1a37
21:15 tadzik lizmat: hopefully it works now
21:16 lizmat pulled and running again
21:17 * tadzik crosses fingers
21:17 tgt joined #perl6
21:18 lizmat alas….the first step took a lot longer, presumably because it was talking to github
21:18 tadzik yeah
21:18 tadzik it means it worked :)
21:19 lizmat updated gist https://gist.github.com/lizmat/5608798
21:20 tadzik /o\
21:21 tadzik lizmat: is there a chance that it's due to your rakudo moduleloader patches?
21:21 lizmat I'll take them out if you're worried about that and test again
21:21 tadzik that's the only clue I have. Thanks
21:22 dalek panda: 970fe54 | tadzik++ | bootstrap.pl:
21:22 dalek panda: Remove leftover code. No functional changes
21:22 dalek panda: review: https://github.com/tadzik/panda/commit/970fe5409c
21:23 lizmat alas, those changes I actually managed to keep out of my nom
21:23 lizmat (the pull requests were dirty, but it was still in a branch only)
21:23 lizmat so in that respect, my rakudo is clean
21:24 tadzik :(
21:24 tadzik I have no idea what's happening
21:24 lizmat ok, then forget about it now
21:25 tadzik well, I probably broke panda for everyone :)
21:25 tadzik I can hopefully look at it tomorrows
21:25 lizmat maybe other people will not find the pb, then we can look at it at the PLPW
21:26 masak rn: sub foo { return "OH HAI" }; class B { has Str $.foo; method greet { say $.foo } }; B.new(:foo(foo)).greet
21:26 camelia rakudo 9c5650, niecza v24-51-g009f999: OUTPUT«OH HAI␤»
21:27 masak for a while I got to thinking that there's a shorter way to write that than ':foo(foo)', but I think not, on reflection.
21:27 lizmat instead of :$foo, :&foo ?
21:28 lizmat short for :foo(foo) ?
21:28 gaussblurinc joined #perl6
21:29 tadzik rn: sub foo { return "OH HAI" }; class B { has Str $.foo; method greet { say $.foo } }; B.new(:&foo).greet
21:29 camelia rakudo 9c5650: OUTPUT«Type check failed in assignment to '$!foo'; expected 'Str' but got 'Sub'␤  in block  at src/gen/CORE.setting:770␤  in method BUILDALL at src/gen/CORE.setting:753␤  in method bless at src/gen/CORE.setting:743␤  in method new at src/gen/CORE.setting:728␤  in method n…
21:29 camelia ..niecza v24-51-g009f999: OUTPUT«sub foo(Any \$_) { ... }␤»
21:30 masak lizmat: nope, that passes the Sub instead of calling it.
21:30 masak lizmat: it's the result of the sub I want to pass. and that's why I no longer think there's a sugar for it.
21:30 lizmat it *almost* does what you want:
21:30 lizmat r: sub foo { say "hi" }; say (:&foo).perl
21:30 camelia rakudo 9c5650: OUTPUT«"foo" => sub foo() { ... }␤»
21:32 lizmat r: sub foo { say "hi" }; say (:->foo).perl  # :-> perhaps?
21:32 camelia rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Bogus statementâ�¤at /tmp/a9jjVORCdO:1â�¤------> [32msub foo { say "hi" }; say ([33mâ��[31m:->foo).perl  # :-> perhaps?[0mâ�¤    expecting any of:â�¤        argument listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        parenthe…
21:34 jnthn r: use MONKEY_TYPING; augment class Pair { method postcircumfix:<( )>(|) { self.key => self.value().() } }; sub foo { say "hi" }; say (:&foo()).perl
21:34 camelia rakudo 9c5650: OUTPUT«hi␤"foo" => Bool::True␤»
21:34 jnthn :P
21:34 [Coke] rakudo failures: S32-hash/delete-adverb.t (Wstat: 0 Tests: 88 Failed: 3) Failed tests:  16, 34, 48
21:35 lizmat [Coke]: probably me again, lemme check
21:37 lizmat :p:delete , the delete is triggered, but the :p not
21:39 gaussblurinc joined #perl6
21:42 lizmat (building a new rakudo)
21:48 dalek roast: 552c0ba | (Elizabeth Mattijsen)++ | S32-hash/delete-adverb.t:
21:48 dalek roast: Fudging some more :delete:p tests
21:48 dalek roast:
21:48 dalek roast: They broke differently than expected.
21:48 dalek roast: review: https://github.com/perl6/roast/commit/552c0ba9c5
21:56 kurahaupo joined #perl6
21:58 ifim`` left #perl6
22:00 lizmat jnthn: wrt to (:&foo()), you'd maybe also want to pass parameters there?
22:01 jnthn lizmat: You could fiddle my hack to do that too :)
22:01 lizmat and also: was that serious enough for me to want to create a pull request for that ?
22:04 jnthn lizmat: No, I don't really thing that should go into the language :)
22:04 jnthn For one because it doesn't actually Do The Right Thing with regards to its behavior in a parameter list.
22:04 lizmat fwiw, the syntax feels logical to me
22:05 jnthn If it's gonna go into the language proper it needs to go in deeper than that.
22:05 lizmat the way it would be solved, would be less…  hmmm….
22:05 jnthn I'd guess getting grammar/action support.
22:05 jnthn It may not be hard to do.
22:05 lizmat ok
22:05 jnthn Just comes down to language design really :)
22:06 jnthn So, it's a TimToady++ call if we want it :)
22:06 lizmat but if it would be part of the language design, would this approach be the way to do it?
22:07 jnthn "this approach" as in the syntax, or as in my hack to make it pretend to work? :)
22:08 lizmat the hack
22:08 jnthn No, I don't think it should be done like that.
22:08 lizmat ok, just checking...
22:08 jnthn foo(:&bar) # this actually passes a named arg
22:08 FROGGS augmenting is just for testing basically
22:08 jnthn My hack would not do so.
22:08 lizmat and trying to understand things
22:09 jnthn It's not just that. If it's going to actually work as a named arg it needs language support.
22:09 masak rn: my $x, $y = 1, 2;
22:09 camelia niecza v24-51-g009f999: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $y is not predeclared (declarators are tighter than comma, so maybe your 'my' signature needs parens?) at /tmp/leVG36VKkG line 1:â�¤------> [32mmy $x, [33mâ��[31m$y = 1, 2;[0mâ�¤â�¤Potential difficulties:â�¤  $x is declar…
22:09 camelia ..rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$y' is not declaredâ�¤at /tmp/lR5HOXq02u:1â�¤------> [32mmy $x, $y[33mâ��[31m = 1, 2;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
22:09 * masak would love to see a more awesome error in rakudo here, just like in Niecza
22:10 lizmat rn: our $x, $y = 1, 2;
22:10 camelia rakudo 9c5650: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$y' is not declaredâ�¤at /tmp/eY8A208dRO:1â�¤------> [32mour $x, $y[33mâ��[31m = 1, 2;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
22:10 camelia ..niecza v24-51-g009f999: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $y is not predeclared (declarators are tighter than comma, so maybe your 'our' signature needs parens?) at /tmp/JnE8P0_9tL line 1:�------> [32mour $x, [33m�[31m$y = 1, 2;[0m��Unhandled exception: Check failed�� …
22:11 lizmat it actually gets the my/our right  :-)
22:13 FROGGS timotimo: NYW (not yet working): https://gist.github.com/FROGGS/0b7ba3f5aa3620a1d932
22:13 FROGGS timotimo: but the ast shows that an $INIT_1 is declared
22:23 timotimo FROGGS: jnthn noted that it shouldn't be lexical, so that things don't explode when recursing etc, is that a concern?
22:24 jnthn It can be a local, not a lexical.
22:24 jnthn Then it won't pollute things.
22:24 jnthn s/can/should/
22:24 masak "local" is a special case of "lexical".
22:25 masak where you don't have to jump up scopes to find stuff.
22:25 jnthn Well, where it's not visible to nestd scopes.
22:25 jnthn And will never live beyond the current invocation record. Or at least, need not.
22:27 masak *nod*
22:27 masak so, it's a special case which an optimizer (or a clever enough compiler) can find. :)
22:28 jnthn Yes, we likely need to start being quite aggressive about that particular optimization.
22:28 timotimo like if a block has nothing in it?
22:28 timotimo no other scopes, i mean
22:31 jnthn Yeah. Well, closure-like scopes.
22:32 FROGGS but there must be another thinko if it isnt working as a lexical...
22:43 lizmat r: my %h= ("a",1).hash(Any)
22:43 camelia rakudo 9c5650: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method hash at src/gen/CORE.setting:1347␤  in block  at /tmp/Vvpadii8DW:1␤␤»
22:43 lizmat would that make sense to create typed hashes on the fly ?
22:58 masak lizmat: I think I'd rather see a named parameter... .hash(:of(Any))
22:58 masak lizmat: and it should maybe work for .Hash and Hash.new as well.
22:58 lizmat no, that's not what I meant… not the restriction on values, but the restriction on keys, aka a typed hash
22:59 masak oh, right.
22:59 lizmat but your point is taken..  :-)
22:59 masak we don't have a corresponding word to 'of' to talk about keys, do we?
22:59 lizmat what's the difference between .hash and .Hash
22:59 jnthn Or a coercer... .Hash[Int, Any]
23:00 jnthn sleep...'night
23:00 lizmat no, that part seems underspecced, and underdeveloped  :-)
23:00 FROGGS night
23:00 masak lizmat: I don't know -- I sometimes find all those methods confusing.
23:00 lizmat goodnight jnthn!
23:00 masak lizmat: I know with .list and .List there are subtle differences in itemization.
23:00 lizmat ok, will check that
23:01 masak lizmat: there used to be a method .true which boolified things, so it was the lower-case method corresponding to .Bool -- but nowadays it's called .so and has an opposite .not
23:02 masak 'night, #perl6
23:02 lizmat night masak!
23:03 lizmat there is no way to roundtrip typed hashes:
23:03 lizmat r: my %h{Any}; say %h.WHAT; my %i= eval %h.perl; say %i.WHAT   # not the same
23:03 camelia rakudo 9c5650: OUTPUT«(Hash+{TypedHash})␤(Hash)␤»
23:03 tgt joined #perl6
23:16 dalek rakudo/nom: 849f4f6 | (Brent Laabs)++ | src/core/IO.pm:
23:16 dalek rakudo/nom: fix thinko in dir(), bug found by dagurval++
23:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/849f4f6864
23:16 dalek rakudo/nom: 0c14997 | (Brent Laabs)++ | src/core/IO.pm:
23:16 dalek rakudo/nom: Merge pull request #153 from labster/nom
23:16 dalek rakudo/nom:
23:16 dalek rakudo/nom: fix thinko in dir(), bug found by dagurval++
23:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c14997a08
23:30 Shozan joined #perl6
23:41 Shozan joined #perl6
23:51 dalek roast: 4cb3a59 | (Brent Laabs)++ | S32-io/dir.t:
23:51 dalek roast: unfudge rakudo dir.t, add more dir() tests
23:51 dalek roast: review: https://github.com/perl6/roast/commit/4cb3a5987e
23:55 arlinius joined #perl6

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

Perl 6 | Reference Documentation | Rakudo