Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-12-11

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:01 Psyche^ joined #perl6
00:15 RabidGravy boom!
00:19 jeffa joined #perl6
00:21 Herby__ joined #perl6
00:22 Herby__ Good evening, everyone!
00:22 jeffa can we change the mascot, to something professional?
00:22 flussence jeffa: I'm sure you've already read the requirements for doing so. Patches welcome :)
00:22 CQ ...like a freebsd mascot holding a tricorder?
00:23 Herby__ how does one go about pulling results from a Grammar.parse?
00:23 jeffa my patch is to simply remove it
00:23 TimToady rejected
00:23 TimToady anthropology is important :)
00:23 jeffa as expected
00:23 CQ erm, sorry, wrong channel, I thought the question was in ##pfsense : )
00:23 jeffa professionalism is more
00:23 jeffa looks like a 5 year old made it
00:24 TimToady that's a feature
00:24 TimToady installed for very professional reasons
00:25 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test 2}; }; say Test.parse("test1test2");
00:25 camelia rakudo-moar f45700: OUTPUT«Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at /tmp/I99u48WPAP:1␤    ------> 3<c> }; token b { test1 }; t…»
00:25 Herby__ lol figured I hosed that up
00:26 Juerd jeffa: Can you explain why something that looks like a 5 year old made it, cannot be professional?
00:27 jeffa not if you have your head in the sand right now
00:27 flussence .oO( all the "professionals" who complain about the design tend to act like 5 year olds )
00:27 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test 2 }; }; say Test.parse("test1test2");
00:27 camelia rakudo-moar f45700: OUTPUT«Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at /tmp/cHnAmRJMhK:1␤    ------> 3<c> }; token b { test1 }; t…»
00:27 Herby__ where am I messing up?
00:27 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; say Test.parse("test1test2");
00:27 camelia rakudo-moar f45700: OUTPUT«「test1test2」␤ a => 「test1test2」␤  b => 「test1」␤  c => 「test2」␤»
00:27 Juerd jeffa: It's not about that. It's just that I think you have a weird defintion.
00:27 Herby__ there we go
00:27 Juerd definition even
00:28 ZoffixGaming joined #perl6
00:28 Herby__ Zoffix! o/
00:28 ZoffixGaming jeffa, what's wrong with Camelia? You make it sound like it's a bad thing that it looks like a 5-year old made it.
00:28 ZoffixGaming Herby__: \o
00:29 Juerd jeffa: Will the drawing stop you from using the language?
00:29 jeffa yes
00:29 flussence mission accomplished!
00:29 ZoffixGaming :D
00:30 ZoffixGaming jeffa: well, there are some good reasons for using such a logo.
00:30 jeffa such as ...
00:30 Juerd jeffa: So to you, Camelia's appearance is, by itself, more important than all the goodies that the language provides combined?
00:30 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; my $match = Test.parse("test1test2"); say ~$match<c>;
00:30 camelia rakudo-moar f45700: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/NvQi4jYD8q:1␤␤»
00:30 jeffa a picture paints a thousand words
00:30 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; my $match = Test.parse("test1test2"); say ~$match<a>;
00:30 camelia rakudo-moar f45700: OUTPUT«test1test2␤»
00:30 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; my $match = Test.parse("test1test2"); say ~$match<b>;
00:30 camelia rakudo-moar f45700: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/RAwvhjhkcH:1␤␤»
00:30 ZoffixGaming jeffa: it does.
00:31 Herby__ how do I extract values from a Grammar result?
00:31 ZoffixGaming Herby__: your grammar isn't matching
00:31 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; say Test.parse("test1test2");
00:31 camelia rakudo-moar f45700: OUTPUT«「test1test2」␤ a => 「test1test2」␤  b => 「test1」␤  c => 「test2」␤»
00:31 ZoffixGaming oh wait, yeaht it does
00:31 ZoffixGaming Right taht way
00:31 flussence $match<a><b>
00:32 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; my $match = Test.parse("test1test2"); say ~$match<a><b>;
00:32 camelia rakudo-moar f45700: OUTPUT«test1␤»
00:32 ZoffixGaming Herby__: there's also http://docs.perl6.org/langu​age/grammars#Action_Objects
00:32 Juerd jeffa: How does this picture paint a story that convinces you not to use Perl 6, even if you apparently think that changing *just* that picture could change your mind?!
00:32 Herby__ ...
00:32 Herby__ I swear it wasn't working before :)
00:32 ZoffixGaming :)
00:32 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; my $match = Test.parse("test1test2"); say ~$match<c><b>;
00:32 camelia rakudo-moar f45700: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/EyKYNmj9BP:1␤␤»
00:32 jeffa it looks like a 5 year old drew it
00:32 Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; my $match = Test.parse("test1test2"); say ~$match<a><c>;
00:32 camelia rakudo-moar f45700: OUTPUT«test2␤»
00:32 jeffa now, i know this sounds pompous --- but i am a professional
00:32 jeffa not a 5 year old
00:32 Herby__ Thanks fluss!
00:32 flussence Herby__: np :)
00:32 jeffa and my manager hired a pro, not a 5 year old --- what are THEY going to think?
00:33 Juerd jeffa: Yes, you already said that. But you seem to think that it looking like a 5 year old drew it is a bad thing. Can you at least explain why, before you repeat this again? :)
00:33 jeffa just did
00:33 Juerd jeffa: They never hired you to draw pictures of programming languages, I think
00:33 jeffa see?
00:33 flussence jeffa: you're failing to convince us you're in any way professional with that infantile attitude.
00:33 ZoffixGaming jeffa: well, made a 5-year old did draw it. Again, why do you think it's a bad thing?
00:33 jeffa see?
00:33 stmuk https://blog.golang.org/gopher
00:33 ZoffixGaming jeffa: why is it bad to include 5-year olds in programming?
00:33 stmuk that's similar :)
00:33 jeffa because they have no experience
00:34 flussence the logo is a useful shibboleth that separates the real professionals from the armchair professionals. At that purpose, it works very well. It will not be changed.
00:34 jeffa you are too focused on trying to attract young programmers
00:34 ZoffixGaming jeffa: do you spot anything wrong with this picture? It was taken during most recent Reactive Conf, a JavaScript conference: https://pbs.twimg.com/media/CS4bdkRU8AAUcIu.jpg
00:34 stmuk jeffa: is the go gopher more or less professional? :)
00:34 jeffa it looks more
00:34 jeffa it's not the animal, it's the implementation
00:34 Juerd jeffa: I'm afraid I don't see it yet. You appear to saying that by using something that has a logo that looks like a 5 year old drew it, your employer will think that YOU are 5 years old. Am I correct?
00:34 ZoffixGaming jeffa: so... notice anything in that photo yet?
00:34 jeffa it looks shabby, unprofessional and more like the prototype
00:35 ZoffixGaming jeffa: one of the reasons of Camelia is to counter that....
00:35 jeffa i was talking about Camelia
00:35 ZoffixGaming Looks pretty professional to me
00:35 Juerd jeffa: If you walk next to a kid, does this make you look childish?
00:36 ZoffixGaming jeffa: what would your version of the Perl 6 logo look like?
00:36 jeffa only if you have that kid write your code
00:36 Juerd jeffa: If you sit right next to a child's drawing, does this make you look childish?
00:36 jeffa a better looking butterfly
00:36 jeffa with colors that match
00:36 Juerd jeffa: Oh, come on, you know that Camelia doesn't write code for you :)
00:36 ZoffixGaming jeffa: better meaning what?
00:36 flussence jeffa: which language do you hold up as an example of "professional"? Why aren't you there right now?
00:36 ZoffixGaming heh
00:37 jeffa look, the fact that you guys think it is acceptable is just proof that you are not paying attention to market share
00:37 jeffa go ahead
00:37 jeffa goodbye
00:37 flussence we aren't selling anything.
00:37 stmuk noone selects a language based on the logo
00:37 jeffa this is why i am learning Ruby and Python intead of Perl6
00:37 ZoffixGaming jeffa: well, we aren't corporate drones thinking of the "bottom line" lol
00:37 flussence knew it :)
00:37 TimToady good, those are great langauges
00:37 Juerd flussence: That's not fair. Let jeffa express their concern.
00:37 ZoffixGaming pfft
00:37 skids poor ruby and python crowd.  lucky for us though.
00:38 ZoffixGaming :P
00:38 flussence Juerd: I'm actually genuinely curious as to why they're taking time out of their valuable career to come here and yell at strangers over a logo they don't have to look at.
00:38 Juerd flussence: Because they like Perl 6 and are afraid their employers won't let them use it.
00:39 flussence it's like... getting angry over the colour of your ethernet cables.
00:39 Herby__ if it ain't blue, it ain't true
00:39 Juerd Actually, I once almost lost a client over my use of pink UTP cables :)
00:39 TimToady well, I do find a correlation between late night in Europe, consumpion of alcohol, and general snarkiness, but I don't know that that is the case here...
00:39 ZoffixGaming Wait! Wtf? Samsung uses a plain oval for their logo? How unprofessional!
00:39 * ZoffixGaming throws their phone intro trash
00:39 pierre-vigier joined #perl6
00:40 Juerd ZoffixGaming: Plain and bland are professional, didn't anyone tell you this?
00:40 AlexDaniel joined #perl6
00:40 ZoffixGaming I think a bitten apple is a much more well-planned and thought-through logo. Obviously I now know which phone to buy next time.
00:40 Juerd Most importantly, professional logos shan't be cute!!1
00:40 stmuk the FreeBSD people actually changed their default boot logo to be less "satanic" following complaints apparently :)
00:40 Juerd Except in Japan :)
00:40 flussence wait, I thought ignoring QA and shipping rushed products to market was professional... now I'm confused
00:41 Juerd I did think Camelia looked better in mono, tbh. Less of an eyesore :D
00:41 Juerd http://juerd.nl/tmp/Camelia_mono.svg
00:41 stmuk personally I think the wings should flap
00:42 idiosyncrat_ joined #perl6
00:42 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4"); say $match;
00:42 camelia rakudo-moar f45700: OUTPUT«(Any)␤»
00:42 ZoffixGaming I dunno, I really like her in colour... as long as I don't try to pick a colour scheme to go along with her... she's unique in that respect :)
00:42 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = say Test.parse("test1test2");
00:42 camelia rakudo-moar f45700: OUTPUT«Nil␤»
00:43 ZoffixGaming weird
00:43 ZoffixGaming Ah
00:43 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4"); say ~$match<a>
00:43 camelia rakudo-moar f45700: OUTPUT«Use of uninitialized value $v of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/eCOm2X2XUA:1␤␤»
00:43 Herby__ blah
00:43 Herby__ I'm tired
00:43 ZoffixGaming Herby__: \s needs at least one space at the end
00:43 geekosaur it occurs to me that if we don't particularly care what randoms think of our language decisions, perhaps we don't care what randoms think of our logo either
00:43 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say ~$match<a>
00:43 camelia rakudo-moar f45700: OUTPUT«test1test2 test3test4␤»
00:43 Herby__ :)
00:43 TimToady this was not a "random", but a recurrent visitor :)
00:44 idiosyncrat_ Is there a description of the Perl 6 parser in theoretical terms somewhere ... that is, what kind of lookahead it does, ...
00:44 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say ~$match<a><b>
00:44 camelia rakudo-moar f45700: OUTPUT«Type Array does not support associative indexing.␤  in block <unit> at /tmp/kQ5QphQWsC:1␤␤Actually thrown at:␤  in block <unit> at /tmp/kQ5QphQWsC:1␤␤»
00:44 Herby__ thats the error I'm thinking off
00:44 Herby__ of
00:44 TimToady who generally only comes in to say something provocative
00:44 BenGoldberg joined #perl6
00:44 idiosyncrat_ whether it uses LL tables (I think not)
00:44 Herby__ how would I get to test3 and test4?
00:44 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say ~$match<a><c>
00:44 camelia rakudo-moar f45700: OUTPUT«Type Array does not support associative indexing.␤  in block <unit> at /tmp/DNR_rUVj3k:1␤␤Actually thrown at:␤  in block <unit> at /tmp/DNR_rUVj3k:1␤␤»
00:44 ZoffixGaming m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say $match
00:44 camelia rakudo-moar f45700: OUTPUT«「test1test2 test3test4 」␤ a => 「test1test2」␤  b => 「test1」␤  c => 「test2」␤ a => 「test3test4」␤  b => 「test3」␤  c => 「test4」␤»
00:45 flussence idiosyncrat_: it's one of those things far above LL IIRC
00:45 Herby__ so if you wanted to say "test4", how would you get to it?
00:45 Herby__ or assign "test4" to a variable
00:45 ZoffixGaming m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say $match<a><c>
00:45 camelia rakudo-moar f45700: OUTPUT«Type Array does not support associative indexing.␤  in block <unit> at /tmp/oLe6FHvouR:1␤␤Actually thrown at:␤  in block <unit> at /tmp/oLe6FHvouR:1␤␤»
00:45 * ZoffixGaming too wasted for this
00:45 idiosyncrat_ flussence: are you telling me that it is not top-down?
00:46 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say ~$match[0]<a><c>
00:46 camelia rakudo-moar f45700: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/ZlrPt33WTy:1␤␤»
00:46 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say ~$match<a>[0]<c>
00:46 camelia rakudo-moar f45700: OUTPUT«test2␤»
00:46 Herby__ hmmm
00:46 Herby__ might be on to something
00:46 Herby__ m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say ~$match<a>[1]<c>
00:46 camelia rakudo-moar f45700: OUTPUT«test4␤»
00:46 Herby__ there we go
00:46 Herby__ ok, i think I understand now
00:46 ZoffixGaming m: grammar Test { token TOP { [<a> \s]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say $match<a>[1]<c>
00:46 camelia rakudo-moar f45700: OUTPUT«「test4」␤»
00:46 flussence idiosyncrat_: it's at least as complicated as the perl5 parser, by virtue of having to support perl5 code inline
00:46 ZoffixGaming oh
00:46 Herby__ great minds think alike!
00:46 * ZoffixGaming is too late to the party
00:47 flussence idiosyncrat_: I don't know the term off the top of my head, but it doesn't fit into any of the "regular language" categories for sure
00:48 idiosyncrat_ flussence: Is there a doc on it?
00:49 Herby__ m: grammar Test { token TOP { [<a> \s?]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4 "); say ~$match<a>[1]<c>
00:49 camelia rakudo-moar f45700: OUTPUT«test4␤»
00:49 flussence idiosyncrat_: doubt it
00:49 Herby__ m: grammar Test { token TOP { [<a> \s?]* }; token a { <b> <c> }; token b { test \d }; token c { test \d }; }; my $match = Test.parse("test1test2 test3test4"); say ~$match<a>[1]<c>
00:49 camelia rakudo-moar f45700: OUTPUT«test4␤»
00:58 adhoc joined #perl6
01:03 idiosyncrat_ OK found it
01:03 idiosyncrat_ S05: "In essence, Perl 6 natively implements Parsing Expression Grammars (PEGs) as an extension of regular expression notation. PEGs require that you provide a "pecking order" for ambiguous parses."
01:04 idiosyncrat_ I read S05 many times, all of them a while ago, but I don't remember the reference to PEG's.  Either it's new or my memory is not what it should be.
01:06 adhoc joined #perl6
01:07 CurtisOvidPoe joined #perl6
01:07 geekosaur I recall that going in several years ago
01:07 PerlJam idiosyncrat_: that's been in there since May 2010
01:08 idiosyncrat_ That's bad news wrt my memory.
01:09 idiosyncrat_ So S05 actually contains a reasonably precise characterization of the Perl 6 parse engine -- there's a literature on PEG.
01:09 idiosyncrat_ And it looks like Perl 6 does some innovative things with tie breaking.
01:11 Zoffix joined #perl6
01:13 adhoc joined #perl6
01:13 PerlJam q
01:13 yeahnoob joined #perl6
01:15 Zoffix r
01:17 roguelazer joined #perl6
01:24 kid51 joined #perl6
01:49 pierre-vigier joined #perl6
01:49 adhoc joined #perl6
01:56 adhoc joined #perl6
01:59 uruwi joined #perl6
02:03 adhoc joined #perl6
02:03 idiosyncrat_ left #perl6
02:09 adhoc joined #perl6
02:16 adhoc joined #perl6
02:27 xinming joined #perl6
02:31 yeahnoob joined #perl6
02:35 adhoc joined #perl6
02:43 kaare_ joined #perl6
02:49 herby_ joined #perl6
02:53 herby_ \o
03:16 sammers joined #perl6
03:24 pierre-vigier joined #perl6
03:44 sammers hi all, what is the best way to handle noecho for prompt / passwords?
03:46 adhoc joined #perl6
03:52 adhoc joined #perl6
03:55 ugexe as far as i know there isnt one yet
03:58 noganex joined #perl6
03:58 adhoc joined #perl6
04:06 adhoc joined #perl6
04:06 flussence qx[stty -echo]; ... ; qx[stty echo] is currently the worst best way. Better than no way, at least
04:12 pierre-vigier joined #perl6
04:13 adhoc joined #perl6
04:19 skids There is a Terminal::termios module but getting the unix FD out of MoarVM is not easy, you're best of winging it with stty for now I think.  For windows there's some C to call.  Maybe best to use the Linenoise module for now, if there's a way to do it with that (and if it is currently installing right).
04:19 adhoc joined #perl6
04:20 skids Though IIRC linenoise isn't equipped to deal with tty != stdin.
04:26 adhoc joined #perl6
04:31 Ben_Goldberg joined #perl6
04:32 adhoc joined #perl6
04:34 CQ2 joined #perl6
04:39 adhoc joined #perl6
04:44 quester joined #perl6
04:45 adhoc joined #perl6
05:02 adhoc joined #perl6
05:11 adhoc joined #perl6
05:13 ChristopherBotto left #perl6
05:17 adhoc joined #perl6
05:20 perlfan joined #perl6
05:20 sammers @flussence thanks, that will work for now...
05:21 perlfan hello new to IRC
05:23 perlfan joined #perl6
05:24 adhoc joined #perl6
05:25 skids o/
05:31 adhoc joined #perl6
05:37 adhoc joined #perl6
05:40 AlexDaniel camelia in mono looks dead
05:44 adhoc joined #perl6
05:44 * AlexDaniel is so happy with the current logo.
05:45 * AlexDaniel does not understand why would somebody want to hurt Camelia by saying that she does not look professional
05:51 adhoc joined #perl6
05:57 adhoc joined #perl6
05:58 vendethiel joined #perl6
06:01 ChristopherBotto joined #perl6
06:03 adhoc joined #perl6
06:11 adhoc joined #perl6
06:21 adhoc joined #perl6
06:31 nine Oh, we've hada a Camelia rant again... always when I sleep. But apparently Camelia did her job well :)
06:32 pierre-vigier joined #perl6
06:32 littlebutterfly joined #perl6
07:01 bjz joined #perl6
07:14 darutoko joined #perl6
07:16 bjz joined #perl6
07:39 hahainternet i think Camelia could do with a graphic designer's eye to smooth things out a bit, but i like the principle and practice
07:39 hahainternet screw the haters :D
07:40 Sqirrel joined #perl6
07:54 rurban joined #perl6
08:00 CIAvash joined #perl6
08:03 abraxxa joined #perl6
08:10 flaviusb joined #perl6
08:16 km3 joined #perl6
08:25 Woodi hallo today :)
08:26 lizmat Woodi o/
08:26 lizmat good *, #perl6!
08:27 rindolf joined #perl6
08:29 Actualeyes left #perl6
08:31 Woodi do penguin is professional enought ? :) http://www.photography-match.com/views​/images/gallery/Linux_Wallpaper_18.jpg   http://4.bp.blogspot.com/-QF6q-hf66KQ/TYn​csIOgeYI/AAAAAAAAARM/djvDEuvPSfw/s640/Pup​py_Linux_Desktop_11_6_09_by_jwils876.png
08:32 Woodi realy, it (moustly) does not matter
08:35 llfourn there is a bug if you try and load something with 'no precompilation' that itself doesn't have it you get: Missing or wrong version of dependency '<unit-outer>'
08:35 llfourn worth reporting?
08:35 adhoc joined #perl6
08:36 moritz llfourn: yes
08:36 llfourn kk
08:40 El_Che hi liz
08:40 El_Che hi everyone else :)
08:40 Ven joined #perl6
08:45 adhoc joined #perl6
08:46 Woodi o/
08:50 CQ anny suggestions for how to find a mini pc on ebay with 2 nics? everything I look at seems to have 1 nic or be quite expensive...
08:50 CQ sorry, wrong channel
08:51 adhoc joined #perl6
08:54 masak good morning, #perl6
09:01 jnthn morning, #perl6
09:02 DrForr Mornin'.
09:03 hahainternet CQ: if it's low volume, usb to ethernet is your friend, that's how the built in ethernet is on rpis anyway
09:03 hahainternet also morning masak et al
09:13 RabidGravy joined #perl6
09:16 quester left #perl6
09:19 grondilu I have a module in ./lib and it seems that perl6 doesn't re-compile it after I edited the file.
09:20 bartolin_ I looked at the aborting tests we currently have in S17-supply/syntax.t . at least on debian 7 it looks like the same problem I reported as RT #126823: all tests pass when the test file is run the first time (with a newly made lib/Test.pm), but with the next run I get an 'Aborted'.
09:21 bartolin_ so IMHO our spectests are not reliable atm :-(
09:23 jnthn Last I checked, somebody tried to fix syntax.t by throwing in a sleep, which is just sweeping a problem under the carpet.
09:23 jnthn Didn't have time to look at what's actually going on there
09:23 bartolin_ while looking at the aborts I also found some weird behaviour which seems to involve 'use v6', routine supply, method tap and SPESH: https://gist.github.com/usev6/6280b4010aabeada760f
09:24 jnthn .oO( SPESH makes PERL run faster! :P )
09:25 jnthn I somewhat suspect the changes are just moving around when GC happens, to make it happen at a more fortunate time or so
09:25 n0xff joined #perl6
09:25 bartolin_ that sounds plausible, yeah
09:26 jnthn And there's certainly something werid going on that ends up wiht us trying to GC a locked mutex
09:26 bartolin_ ... the same test programm did not crash on my FreeBSD system
09:26 jnthn So it could well be that
09:26 jnthn It doesn't crash on Windows either
09:26 jnthn I can quite imagine a BSD being engineered to cope with freeing the locked mutex.
09:27 bartolin_ I see. but regarding RT #126823 I suspect some problem with precompilation.
09:27 jnthn But the fact we're doing so is really weird
09:27 grondilu I don't want to sound alarmist, but it's pretty serious an issue if rakudo ignores whatever change you make to a module
09:27 bartolin_ jnthn: S17-supply/syntax.t currently dies on FreeBSD :-/
09:27 jnthn Ah, then maybe it's just another "getting lucky"
09:28 jnthn By this point, more people trying to diagnose S17 things at a surface level will not help
09:28 lizmat jnthn: on OS X, it flaps
09:28 jnthn It needs folks who can actually deal with the guts
09:28 * lizmat commutes :-)
09:29 lizmat jnthn: maybe diakopter can help ?
09:29 jnthn Maybe :)
09:29 bartolin_ (folks who can actually deal with the guts)++
09:31 * jnthn may get to look into it today
09:31 bartolin_ . o O ( RT #126823 is not related to S17, but looks hard to tackle as well )
09:31 jnthn I don't have much to do besides Perl 6 for the coming week or so :)
09:32 bartolin_ \o/
09:33 robertle joined #perl6
09:33 lizmat jnthn: I wonder if the El_Che script isn't the easiest to debug, and maybe the same underlying cause
09:34 jnthn lizmat: It's *possible*, but it didn't immediately show the same symptoms
09:34 jnthn (A hang rather than an abort)
09:34 lizmat jnthn: it aborted for me
09:34 jnthn But if it's somehow a lock scoping confusion...then yeah, maybe.
09:35 lizmat consistently, in the 70th or 77th iteration
09:35 jnthn Oh...the stack traces I got showed a hang
09:35 jnthn Ah, then maybe it is the same
09:35 jnthn I'd thought it was hanging for you also
09:35 jnthn So yeah, it could be a good one.
09:36 * lizmat double checks
09:38 nine grondilu: I assume you are on a current rakudo?
09:38 grondilu I am
09:38 grondilu well, almost
09:38 * grondilu just pulled
09:39 nine grondilu: what system are you on?
09:39 grondilu debian jessie, 32bits
09:40 nine And I assume you don't have any weird mount options that would prevent mtime of files getting updated?
09:41 nine grondilu: I can confirm the bug locally
09:41 grondilu ok
09:42 lizmat jnthn: Run 70Abort trap: 6
09:42 Woodi so, when master/HEAD/something can be as good as things that are "leaked" before release ? :)
09:42 grondilu it's quite annoying.  I can't do any local development of my modules :(
09:43 grondilu (unless I manually remove the .precomp dirs or something)
09:43 nine grondilu: is probably a regression of my precomp locking refactoring yesterday. That's what I get for not writing tests...
09:43 grondilu I'm suspecting the recent updates of DateTime
09:43 lizmat jnthn: Run 63Abort trap: 6    # with MVM_SPESH_DISABLE=1
09:43 Woodi ..then it can be shashdotted as "perl6 pre-releas code leaked!" ;)
09:44 nine grondilu: I actually have a pretty good idea where the bug is
09:45 grondilu ok good
09:48 jnthn lizmat: OK, thanks for checking
09:49 * jnthn going to relax a little more from travel, before he digs into hacking on stuff :)
09:49 jnthn bbiab
09:51 robertle a question regarding async IO and threads: are all async IO event callbacks handled by the same thread, or is there a thread pool behind it? in other words: if I want to do some expensive computation in reaction to an IO event, do I want to schedule the computation using a promise or so, or just do it in the callback?
09:52 lizmat robertle: not sure, but if you want to make sure it is done in a separate thread, use a start block
09:53 jnthn For async I/O, one thread in the VM runs an event loop (and that's all it does), then it pushes work into a queue.
09:53 jnthn By default, that is the work queue of a thread pool scheduler
09:54 jnthn So doing the work in the callback won't clog up processing of other I/O.
09:54 robertle lizmat: yes, that's what I meant by promise. bad wording there. I was wondering whether that is necessary...
09:54 robertle jnthn: thanks, that's what I was hoping. and thats also quite awesome
09:54 lizmat from what jnthn just said, I would say no
09:55 * jnthn really goes for that rest :)
09:55 jnthn &
09:58 _nadim joined #perl6
10:00 _nadim Good morning
10:00 adhoc joined #perl6
10:02 _nadim a question about the error message "couldn't find final ')', if the inforrmation about where the opening parenthesis is available, wouldn't it be better to give it too?
10:06 dalek rakudo/nom: 3e2ef33 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
10:06 dalek rakudo/nom: Fix regression on outdating precomp files
10:06 dalek rakudo/nom:
10:06 dalek rakudo/nom: Trying not to overwrite already existing precomp files made updating
10:06 dalek rakudo/nom: outdated precomp files regress again. Instead of further complicating
10:06 dalek rakudo/nom: the check or sprinkling :force flags everywhere, we now just delete
10:06 dalek rakudo/nom: outdated precomp files on sight.
10:06 dalek rakudo/nom:
10:06 dalek rakudo/nom: Thanks to grondilu++ for reporting!
10:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3e2ef33743
10:07 nine grondilu: ^^^
10:07 RabidGravy _nadim, it does sort of - e.g. "Unable to parse expression in argument list", but it only knows why it is looking for a ')' rather than where that started.
10:10 bpmedley joined #perl6
10:11 espadrine joined #perl6
10:12 grondilu m: say my @ = first { .[0] \%\% .[1] }, (^8).pick(2) xx *;
10:12 camelia rakudo-moar 3e2ef3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W_XT4OMQck␤Confused␤at /tmp/W_XT4OMQck:1␤------> 3say my @ = first { .[0]7⏏5 \%\% .[1] }, (^8).pick(2) xx *;␤    expecting any of:␤        infix␤        infix stopper␤        statement end…»
10:12 grondilu m: say my @ = first { .[0] %% .[1] }, (^8).pick(2) xx *;
10:12 camelia rakudo-moar 3e2ef3: OUTPUT«[...]␤»
10:13 grondilu ^not sure what's going on here
10:14 grondilu m: say my @ = first { .[0] % 1 }, (^8).pick(2) xx *;
10:14 grondilu m: say my @ = first { .[0] % 3 }, (^8).pick(2) xx *;
10:14 camelia rakudo-moar 3e2ef3: OUTPUT«(timeout)»
10:14 camelia rakudo-moar 3e2ef3: OUTPUT«[...]␤»
10:14 grondilu m: say .perl given my @ = first { .[0] % 3 }, (^8).pick(2) xx *;
10:14 camelia rakudo-moar 3e2ef3: OUTPUT«Cannot .elems a lazy list␤  in block <unit> at /tmp/zBmpx8XjvZ:1␤␤Actually thrown at:␤  in block <unit> at /tmp/zBmpx8XjvZ:1␤␤»
10:15 grondilu how can "first" return a lazy list?  Shouldn't it be eager?
10:15 grondilu m: say my $ = first { .[0] % 3 }, (^8).pick(2) xx *;
10:15 camelia rakudo-moar 3e2ef3: OUTPUT«(...)␤»
10:16 stmuk I did see a "heap corruption" message on 64 bit linux yesterday doing a clean rakudobrew build followeed by installing Task::Star
10:16 stmuk but I can't reproduce :/
10:16 lizmat grondilu: because the original list is lazy ?
10:17 bartolin_ currently S03-metaops/reduce.t dies with "Cannot find method 'orig'". that would be fixed with an version bump for nqp (so we get nqp commit d6370eb8be). (spectest unchanged except for S03-metaops/reduce.t)
10:17 _nadim RabidGravy: thank you for the answer. I am OK with it, 30 years looking for matching thingies gives me an edge but I thought it may be usefull for beginners and few languages are good enough at helping with that.
10:18 lizmat grondilu: checking the code, I don't think first returns a List ever ?
10:20 grondilu lizmat: yeah, my bad.  There is no reason for first to be eager.
10:21 brrt joined #perl6
10:22 brrt good * #perl6
10:22 lizmat brrt o/
10:22 brrt \o lizmat
10:23 * lizmat is still working on slides
10:23 brrt oh, for LPW?
10:23 brrt will it be recorded?
10:24 stmuk the main sessions are almost certainly recorded
10:24 lizmat and I guess mine could be considered a main session
10:25 lizmat being the closing keynote and all
10:25 DrForr Mine is just a warmup :)
10:26 brrt oh, cool
10:27 * stmuk plugs http://act.yapc.eu/lpw2015/talk/6470 <=-- click on add to schedule
10:28 zakharyas joined #perl6
10:28 stmuk after all who wants to be shouted at incoherently by mst for another year :)
10:28 llfourn is there any faster way to hack on rakudo than to 'make install' each time you change a nqp file?
10:29 nine llfourn: I wish there were :/
10:30 llfourn nine: thanks. At least all the time I've been waiting for things to recompile has not been unnecessary :)
10:33 lizmat llfourn: I've been led to understand you *can* change MoarVM and NQP itself underneath, but not the Perl 6 specific nqp or source
10:33 lizmat llfourn: it becomes a monolithic web of precomped files, that are basically statically linked
10:34 nine You can modify MoarVM
10:38 llfourn lizmat: mm yes that makes sense. I would actually like to understand more about rakudo compilation. Even though I've heard it semi-explained several times I don't understand how the NQP grammar/actions can be written in NQP...
10:39 llfourn I am talking about p6 at sydney.pm next week
10:39 lizmat https://github.com/edumentab/r​akudo-and-nqp-internals-course
10:39 lizmat llfourn: ^^^
10:39 arnsholt llfourn: NQP is a bootstrapping compiler
10:39 yoleaux 10 Dec 2015 20:19Z <ZoffixW> arnsholt: you have some PRs waiting, some since March: https://github.com/arnshol​t/Algorithm-Viterbi/pulls
10:40 llfourn lizmat: I have briefly gone through that. But there is much I still have to look it. It's invaluable :)
10:40 arnsholt Basically, back in the mists of time, there was an NQP compiler written only in Parrot code
10:40 llfourn arnsholt: I guess I need to understand what that means at a concrete level
10:41 arnsholt Then that compiler was extended so that an NQP compiler could be implemented in NQP
10:41 llfourn arnsholt: ahhhh
10:41 llfourn now I do understand. That was kinda missing from everything I read.
10:41 llfourn (understand a bit)
10:42 llfourn there was a presentation on jnthn.net "Implementing Perl 6, in Perl 6, on Parrot"
10:42 llfourn but it 404s atm :P
10:42 arnsholt That's what the src/vm/*/stage0 stuff in the nqp repo is for: an NQP for compiling NQP before you have an NQP compiler of your own
10:43 llfourn it is still implemented in parrot?
10:43 llfourn or the compiler that's used was originally generated from parrot I guess is the question
10:44 arnsholt There's stage0 code for all three NQP backends: Parrot, Moar and JVM
10:44 arnsholt pmichaud's original code is around somewhere, I think. Probably in the Parrot repo
10:44 llfourn I am looking at: https://github.com/perl6/nqp/t​ree/master/src/vm/moar/stage0
10:45 arnsholt Yeah, that's just bytecode
10:45 llfourn so nqp.moarvm was...generated by parrotvm?
10:45 arnsholt The first nqp.moarvm was generated by an NQP running on a different backend. But once that first bootstrap is done, new bootstrap compilers are compiled using NQP on Moar
10:46 llfourn fascinating :D
10:46 arnsholt Anyways, you don't really need to care too much about the bootstrapping stuff
10:47 arnsholt jnthn++ has done all the hard work, so that the rest of us can just hack on NQP in NQP =)
10:47 llfourn I guess the thing I care about is not being able to conceptualise what has happened to bring nqp into existence
10:48 llfourn thanks for your help :)
10:55 lizmat commute to London&
10:58 iH2O joined #perl6
11:01 _nadim given class C {has $.x; has $!private}; do_something(C.new(x => 1, private =>2)) ;  I understand that the default new does not set $!private but #1 that is completely silent and thus new comers will hate is completely #2, and that's for me, what happends to the value that is passed to new? I can imagine that it is a complex object, how is it discarded?
11:05 nine _nadim: #1 this has been discussed lots of times and I'm sure it's well documented. There are good reasons and the pitfall this creates is unfortunate. #2 the garbage collector will collect it just like any other object
11:05 llfourn _nadim: 1. yes this is not changing though, because there is not better alternative afiak. 2. Yes it's simply gone. Not assigned to anything afterwards.
11:06 vytas jnthn, sorry to hear that you are not coming to LPW, I hope you and your wife will have good time anyway!
11:08 iH2O left #perl6
11:09 andreoss joined #perl6
11:11 _nadim Thank you for the answers, yes it is documented since I knew that it would happen (so I did read it somewhere) I was curious about wht repercusions this would have on people learning the language. They'll get used I guess.
11:18 andreoss > Could not find Shell::Command:ver<True>:auth<True>:api<True> in:
11:19 llfourn _nadim: it's sort of the lesser of two evils. You would have to put *%, everywhere in your methods. And if you forgot it could make inheriting from your class tricky.
11:19 RabidGravy andreoss, did you do a "rakudobrew build moar" recently?
11:20 andreoss RabidGravy: i did, and panda is not working since
11:20 koo8 joined #perl6
11:20 andreoss also it gives this warning while bootstraping
11:23 * RabidGravy guesses a "rakudobrew self-upgrade" was required
11:24 andreoss Use of uninitialized value %ENV of type Any in string context
11:24 andreoss Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub MAIN at bootstrap.pl:64
11:24 andreoss
11:25 andreoss RabidGravy: it did not help
11:28 Ven joined #perl6
11:29 jnthn vytas: Thanks, I'm quite sure we will have a nice time, just sadly not with my family.
11:32 nine jnthn: if you need a break from gutsy things some time, I'd be interested in your thoughts on the direction I'm taking the repository_registry branch
11:33 RabidGravy andreoss, that warning has been RT'd I believe, it looks like something in the part that runs external commands in rakudo
11:33 ab6tract joined #perl6
11:35 gensym joined #perl6
11:36 jnthn Down to 15 xmas RTs :)
11:36 jnthn nine: Is my best bet to just review that branch?
11:36 jnthn nine: And do you have a 1-sentence summary of the direction? :)
11:37 jnthn nine: I've so far gathered that you're unifying langauge loaders and CURs
11:37 stmuk andreoss: I've been seeing that warning .. also a "can't unbox type" error
11:38 nine jnthn: I think the commit messages should give a pretty good picture
11:39 nine jnthn: the next step for me is to remove CompUnit::RepositoryRegistry.load_module and move the remaining bits to $*W.load_module and require in Perl6::Actions. It's only the circular module loading protection that's left.
11:40 nine jnthn: the change I'm most unsure about is moving loading of foreign modules into CompUnit::Repository implementations. It seems the thing to do but mandates that every Repository implementation will have to check the dependency's :from
11:40 ab6tract nine: i just did a recent 'rakudobrew nuke' and rebuild, but i am seeing many warnings like this "Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.
11:40 jnthn nine: :from becomes part of the dependency spec?
11:41 nine ab6tract: I was always hoping that someone becomes annoyed enough to just go and fix them. Should be trivial patches :)
11:41 nine jnthn: yes
11:41 Ven jnthn++ nine++ :)
11:41 stmuk nine: I did try that but failed :/
11:42 nine jnthn: advantage being that e.g. mixed language applications could ship with mixed language repositories (maybe loading them from .zip files or whatever)
11:42 ab6tract as well as a compile time error from my (previously fine) library: "Missing or wrong version of dependency '!UNIT_MARKER'"
11:43 ab6tract i also nuked ~/.perl6, so it should not be precomp
11:43 jnthn nine: That (form as part of dep spec) seems sensible at first thought. Agree on the drawback; not sure it's hugely significant.
11:44 Skarsnik joined #perl6
11:44 lucasb joined #perl6
11:44 jnthn m: say (-> --> Int { fail })().WHAT
11:44 camelia rakudo-moar 3e2ef3: ( no output )
11:44 jnthn m: say (-> --> Int { return })().WHAT
11:44 camelia rakudo-moar 3e2ef3: OUTPUT«Attempt to return outside of any Routine␤  in block <unit> at /tmp/Oyx_A6eiTK:1␤␤»
11:45 ab6tract m: my $f = 'fun'; my $b ::= $f; say $b
11:45 camelia rakudo-moar 3e2ef3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IrD3Bzq5nE␤"::=" not yet implemented. Sorry. ␤at /tmp/IrD3Bzq5nE:1␤------> 3my $f = 'fun'; my $b ::= $f7⏏5; say $b␤»
11:46 ab6tract when did we lose read-only bind???
11:46 ab6tract guys i feel like i am going crazy the past few weeks with rakudo changes :(
11:46 _nadim joined #perl6
11:47 jnthn ab6tract: We never really had it, it was just an alias for :=, so we reserved it for fixing in the future.
11:47 ab6tract jnthn: ah.. is that a 6.christmas ticket?
11:47 jnthn ab6tract: This is the last chance to clean up remaining semantic issues, so *of course* we're taking it.
11:47 ab6tract gotcha
11:47 jnthn ab6tract: We've specifically decided to defer it to after Christmas
11:48 jnthn (::= that is)
11:48 ab6tract okay, thanks for the clarification
11:48 jnthn The language churn will settle down soon. :)
11:49 ab6tract jnthn: i hope so
11:49 jnthn And, looking at what's on the remaining xmas list, those things are unlikely to produce any significant ecosystem churn
11:49 hahainternet jnthn: where should i read to understand why [["hi"]] returns an Array of Str but [["hi"],] does as expected
11:49 hahainternet i tried to spot it in the docs but didn't find anything concrete
11:50 moritz hahainternet: http://doc.perl6.org/type/List#​Items%2C_Flattening_and_Sigils
11:50 ab6tract nine: this "Missing or wrong version of dependency '!UNIT_MARKER'" is pretty troublesome. have you seen this in other post-CURLI bugs?
11:51 hahainternet moritz: maybe i'm stupid but i couldn't see anything explicit there
11:51 hahainternet i'll re-read
11:51 jnthn hahainternet: That's known as the single arg rule. http://design.perl6.org/S07.h​tml#The_single_argument_rule
11:51 jnthn Bottom section has it
11:51 hahainternet jnthn: perfect thank you :)
11:51 jnthn It's the WAT of a consistent rule to make many other things DWIM
11:52 nine ab6tract: does it involve multiple perl6 processes running at the same time somewhere?
11:52 hahainternet jnthn: yeah, it's a little unfortunate but *shrug*
11:53 ab6tract nine: "processes" ? not that i know of, unless you count threads or qq:x
11:54 ab6tract nine: appears to be related to a 'no precompilation;' statement i had included in a loaded module
11:55 ab6tract which is necessary for proper functionality, as that loaded module will determine the size of the current terminal window
11:56 brrt joined #perl6
11:56 leont joined #perl6
11:57 jnthn .ask TimToady Is fail sufficiently like return that, if outside of a return, it should die that you can't fail outside of a routine?
11:57 yoleaux jnthn: I'll pass your message to TimToady.
11:58 andreoss $ perl6 -e 'use Shell::Command;'
11:58 andreoss ===SORRY!===
11:58 andreoss Could not find Shell::Command:ver<True>:auth<True>:api<True> in:
11:58 andreoss
11:59 andreoss can i do something about that?
11:59 nine ab6tract: I meant I just yesterday evening fixed odd precompilation errors appearing when running Inline::Perl5's test suite in parallel mode. Inline::Perl5 uses no precompilation; too
12:00 nine andreoss: I'd nuke the rakudo installation and try again with the most up to date versions of rakudo and panda
12:03 aigan joined #perl6
12:07 rindolf joined #perl6
12:08 llfourn m: sub (){ my $_; } # bug or?
12:08 camelia rakudo-moar 3e2ef3: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $_␤    at /tmp/cl7fbt1ECd:1␤    ------> 3sub (){ my $_7⏏5; } # bug or?␤»
12:10 jnthn Don't think it's a bug; you get a $_ declared automatically.
12:11 jnthn So you're redeclaring something that already is there.
12:11 llfourn m: my $_ = '';
12:11 camelia rakudo-moar 3e2ef3: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $_␤    at /tmp/WQhTh2M9BR:1␤    ------> 3my $_7⏏5 = '';␤»
12:11 llfourn ah right. My bad.
12:11 jnthn Every block gets one
12:12 jnthn So you never need to declare it
12:12 llfourn makes sense. I was thinking in dynamic land I guess.
12:12 andreoss m: sub { my $^x = 1 }  ();
12:12 camelia rakudo-moar 3e2ef3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cnOj_CgO7g␤Strange text after block (missing semicolon or comma?)␤at /tmp/cnOj_CgO7g:1␤------> 3sub { my $^x = 1 }7⏏5  ();␤    expecting any of:␤        infix␤        infix stopper␤        s…»
12:12 andreoss m: my &z = sub { my $^x = 1 } ; z();
12:12 camelia rakudo-moar 3e2ef3: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in sub  at /tmp/QD87HXfgMO:1␤  in block <unit> at /tmp/QD87HXfgMO:1␤␤»
12:14 andreoss m: my &z = { my $^x = 1 } ; say z(4);
12:14 camelia rakudo-moar 3e2ef3: OUTPUT«1␤»
12:14 jnthn Not sure it's too wise to let you "my" those... :)
12:14 jnthn It seems it ends up doing the right thing though :)
12:16 andreoss m: my &z = { $^x = 1 } ; say z(4);
12:16 camelia rakudo-moar 3e2ef3: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/t_erwLniKm:1␤␤»
12:17 jnthn I'd say that's right too; rw-ness is rare enough to make folks write a signature.
12:18 moritz .oO( we could introduce a trigil for that, $^=x is a writable, auto-declared parameter)
12:18 andreoss m: my &z = { $^x = 1 } ; say z(my $x = 4);
12:18 camelia rakudo-moar 3e2ef3: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/uPA1JdJBCz:1␤␤»
12:18 jnthn o.O
12:19 jnthn moritz: No. :P
12:19 moritz jnthn: :-)
12:19 jnthn { $^x = 1 } is the same as -> $x { $x = 1 }
12:20 andreoss why $_ is rw but $^x is not? for historical reasons?
12:21 moritz yes
12:21 andreoss so it makes $^x is more favorable default variable now
12:21 jnthn Well, I'd say it's a decent balance too
12:22 jnthn $_ is mostly about convenience
12:22 jnthn And a bunch of convenient patterns want it mutable
12:22 yqt joined #perl6
12:22 jnthn The commonest parts of a language are the ones where inconsistency is most allowable.
12:25 jnthn m: say once { say 'run'; 42 } for 1, 2; # working on this one at the moment
12:25 camelia rakudo-moar 3e2ef3: OUTPUT«(Mu)␤(Mu)␤»
12:26 Juerd m: say $ //= do { say "run"; 42 } for 1, 2;
12:26 camelia rakudo-moar 3e2ef3: OUTPUT«run␤42␤42␤»
12:27 _nadim How can I know if something is a BOOTSTRATATTR?  since get_value doesn't work on them
12:27 Juerd jnthn: Like that?
12:27 jnthn Juerd: Yes, that's the output I'd expect
12:28 timotimo m: (^100).hyper.map(*.say)
12:28 camelia rakudo-moar 3e2ef3: ( no output )
12:28 Juerd I'm looking forward to a readable version of $ //=do :)
12:28 timotimo jnthn: did you notice this? ^
12:28 jnthn Though a little fragile
12:28 jnthn timotimo: yes, people have only told me about it 50 times by now :)
12:28 jnthn It's on le todo list :)
12:29 jnthn Were you working on some tests for it, btw?
12:29 * jnthn wrote none :/
12:30 Skarsnik hello
12:31 _nadim and where do I get a list of all the BOOTSTRAPATTR, so I can at least catch them by the type they have.
12:31 _nadim Skarsnik: morning
12:32 jnthn _nadim: src/Perl6/Metamodel/BOOTSTRAP.nqp
12:32 _nadim jnthn: anychance they withh get a get_value any time?
12:33 pierre-vigier joined #perl6
12:33 kid51 joined #perl6
12:34 jnthn _nadim: Maybe; we'll probably try to eliminate more of them in time
12:35 jnthn They're kinda ugly, but bootstrapping stuff usually is.
12:36 timotimo jnthn: all right! i have a few tests i can push
12:36 timotimo i just have to Todo-fudge them %)
12:37 jnthn Yes :)
12:37 jnthn Did you do some for hyper vs. race?
12:37 timotimo aye
12:37 jnthn cool
12:37 timotimo but they are just copy-pasted and put .sort on the results before comparing
12:37 jnthn That's OK
12:37 timotimo and they don't test batch and the other parameter
12:37 jnthn *nod*
12:37 jnthn It's a start :)
12:39 siriu5b hi ... got a question. It seems i already have the answer btw ... *unpack* not available yet ?
12:39 dalek roast: 60af242 | timotimo++ | .gitignore:
12:39 dalek roast: ignore .precomp folders
12:39 dalek roast: review: https://github.com/perl6/roast/commit/60af242b5a
12:39 dalek roast: 7871621 | timotimo++ | S07-hyperrace/ (2 files):
12:39 dalek roast: test .hyper and .race a little bit
12:39 dalek roast: review: https://github.com/perl6/roast/commit/787162131d
12:39 timotimo i'll rebuild a rakudo, run spec tests to see if the fudging is correct, then i'll push the update to spectest.data
12:40 siriu5b ( unpack used at line 62. Did you mean 'pack'? )
12:40 timotimo unpack is a method on Blob and Buf, AFAIK
12:40 timotimo perhaps it's just not available as a sub
12:40 andreoss nine: nuking moar-nom resolved the issue with Shell::Command, but now i'm getting the same error with other modules
12:41 dj_goku joined #perl6
12:41 timotimo m: Buf.new(20, 21, 22).unpack("a*").say
12:41 dj_goku joined #perl6
12:41 camelia rakudo-moar 3e2ef3: OUTPUT«␤»
12:41 timotimo oh, those are not where letters are
12:41 timotimo m: say "a".ord
12:41 camelia rakudo-moar 3e2ef3: OUTPUT«97␤»
12:41 timotimo wow, i missed by quite a bit
12:41 timotimo m: Buf.new(97, 98, 99, 100).unpack("a*").say
12:41 camelia rakudo-moar 3e2ef3: OUTPUT«abcd␤»
12:41 timotimo BBIAB
12:42 siriu5b got it !
12:42 siriu5b thanks =)
12:43 jnthn timotimo: Cool, thanks. Having tests already will save me a bit of time :)
12:44 jnthn Whew, my fix for the once bug took a bit to come up with, but worked first time... :)
12:44 _nadim is there an exivalent of 'does' but for a type?
12:45 jnthn You can't modify a type object by definition :)
12:46 jnthn You can SomeType but ARole
12:46 jnthn Which gives you back the type that an instance of SomeType would end up with if you did $the-instance does ARole
12:46 nine andreoss: but you could install panda?
12:47 uruwi joined #perl6
12:47 _nadim jnthn:  I am aware of the dangers of changing type ;) it's for the problem above, going through all the BOOTSTRAPATTR to just get t heir value one I can do it by ading to the class look tempting right now; it's just for testing and understanding
12:49 jnthn _nadim: What are you working on, ooc?
12:49 _nadim jnthn: a dumper
12:49 jnthn Ah
12:49 jnthn Dunno if you want to simply blacklist various built-in tyeps
12:50 _nadim jnthn: that's why I got into all those details that I would prefer to ignore to learn a bit more of the basics ... well that's not true I like the details
12:50 _nadim jnthn: not black listing them, they still need to be dumped, not the BOOTSTARAPATT elements but the value it has
12:51 _nadim I'd be happy if I could just say is this a bootstrapattr then do this ...
12:52 _nadim ie if I can query the bootstrapattr-edness of a variable
12:53 kaare_ joined #perl6
12:54 jnthn I'd probably just wrap a try around the .get_value and just note the value is unavailable if it fails
12:56 _nadim or maybe a can('get_value') could work too
12:56 jnthn Or that
12:56 jnthn Or .?get_value
12:58 _nadim aha? what is .?get_value, looks like somehting I like already,
12:58 jnthn .?foo = call foo if it exists, otherwise Nil
12:58 jnthn m: say 'foo'.?flip
12:58 camelia rakudo-moar 3e2ef3: OUTPUT«oof␤»
12:58 jnthn m: say 'foo'.?filip
12:58 camelia rakudo-moar 3e2ef3: OUTPUT«Nil␤»
12:58 _nadim hmmmmmm tasty
12:59 Skarsnik hm, is there a variable to know the p6/rakudo running version?
13:00 nine $*PERL.version
13:00 nine or $*PERL.compiler.version
13:00 Skarsnik Oh thx :)
13:01 _nadim jnthn: Method 'dispatch:<.?>' not found for BOOTSTRAPATTR :)
13:02 jnthn d'oh :)
13:03 jnthn Yeah, we really don't like folks poking around there. :P
13:03 jnthn Probably will have to go with the try approach
13:04 _nadim jnthn: Method 'can' not found ....
13:04 jnthn Told you.
13:05 _nadim I try catch it for now but I must admit that I'd like the dumper to have a role to look inside the BOOTSTRAP thingies
13:05 jnthn They're not part of the language
13:05 jnthn They're just an implementation artefact that will vanish at some point when we figure out how.
13:05 domidumont joined #perl6
13:07 _nadim I get that, the problem, I believe is that object.attributes returns them, not Str, Int, ... Let me chech that theory
13:08 cognominal joined #perl6
13:10 prammer joined #perl6
13:11 _nadim jnthn: wrong theory, what I have is a Match object, it's attributes are of type BOOTSTRAPATTR, other objects dont.
13:11 _nadim jnthn: I'll try to find out which one it is
13:11 timotimo you know
13:12 timotimo when we see an undefined sub
13:12 timotimo we could actually check if classes from the setting offer that as a method
13:13 dalek rakudo/nom: 2342af8 | timotimo++ | t/spectest.data:
13:13 dalek rakudo/nom: run hyper/race tests
13:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2342af89ca
13:13 daxim pong
13:13 timotimo yo daxim :)
13:14 daxim lizmat wanted me
13:14 domidumont Hi, I've a problem to create a rakudo package for Debian. I've built moar and nqp in separate packages. rakudo-star is configured with "perl Configure.pl --prefix=/usr --backends=moar --force".
13:14 domidumont Problem: the compilation of modules fails because 'gen/moar/stage2/QRegex.nqp' is missing (See http://paste.debian.net/343291/)
13:14 jnthn daxim: Think she's probably on the road at the momnet
13:14 daxim so am I!  hola from barcelona!
13:15 timotimo domidumont: that means your nqp and rakudo weren't matching
13:15 dalek rakudo/nom: de52f97 | jnthn++ | src/Perl6/Actions.nqp:
13:15 dalek rakudo/nom: Fix once inside of statement of statement-mod for.
13:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/de52f9762e
13:15 timotimo oh, hum.
13:15 timotimo actually that comes from gen/moar/m-main.nqp, which surprises me a little bit
13:15 dalek roast: 520b273 | jnthn++ | S04-statements/once.t:
13:15 dalek roast: Tests for RT #114914.
13:15 dalek roast: review: https://github.com/perl6/roast/commit/520b2734b3
13:16 domidumont The missing file is generated when nqp is compiled, but this file is not delivered in nqp package
13:17 jnthn lunch &
13:17 _nadim timotimo: Match.attributes hands me a BOOTSTRAPATTR, I think it shouldn't, specially if it is part or the language and I, as a lamda developer, should not know about it at all.
13:18 jnthn _nadim: Yes, in an ideal world. The world is not ideal.
13:19 _nadim timotimo: I have a multi that handle the Match, so it is not a problem but in tha case I shouldn't have attributes either
13:19 jnthn The easiest fix may just be to have .^attributes lie and not return BOOTSTRAPATTR ever :)
13:19 moritz being confronted with low-level stuff is an inevitable consequence of introspection
13:19 moritz _nadim: why are you introspecting at all?
13:19 _nadim jnthn: Yes we think alike
13:19 _nadim moritz: writting a dumper
13:20 jnthn If you're writing a dumper then it's probably more useful to its users not to go peeking inside built-ins
13:20 daxim vienna.pm is hosting an install party, who else has planned a public event?   http://meetup.com/Vienna-Pe​rl-Mongers/events/227358103   https://news.ycombinator.com/item?id=10565555
13:20 _nadim True but the results inside a Match are of interest
13:21 znpy joined #perl6
13:21 jnthn _nadim: For sure, but you can easily get at all the information in a Match through the public interface.
13:21 _nadim as I said, Match has a handler so I am hidding the BOOTSTARPATTR
13:22 _nadim I just need to accept,  Match, don't look in the attributes, enven if they are handed to you by a public interface
13:22 * jnthn really goes for lunch :)
13:22 _nadim Bon appetit
13:22 moritz _nadim: the MOP isn't really public interface
13:22 timotimo bon appetit :)
13:22 oscar___ joined #perl6
13:24 _nadim moritz: fine, the dumper should use MOP in a smart way. the problem remains that it also has to know abut all the types that may be returning BOOTSTRAPATTRs or the end user get  an error
13:25 moritz _nadim: or you could check if the return values from .^attributes are proper Attributes
13:25 _nadim I'd like nothing more but find out if something is a BOOTSTRAPATTR before I fiddle with it.
13:26 moritz m: say Match.^attributes().^elems
13:26 camelia rakudo-moar 3e2ef3: OUTPUT«Cannot call elems(Perl6::Metamodel::ClassHOW: List); none of these signatures match:␤    (Any:U $: *%_)␤    (Any:D $: *%_)␤  in block <unit> at /tmp/KksbgsyPPQ:1␤␤»
13:26 moritz m: say Match.^attributes().elems
13:26 camelia rakudo-moar 3e2ef3: OUTPUT«7␤»
13:27 moritz m: say Match.^attributes().grep({$_ ~~ Attribute}).elems
13:27 camelia rakudo-moar 3e2ef3: OUTPUT«X::Multi::NoMatch exception produced no message␤  in block <unit> at /tmp/aJ66NMLOid:1␤␤»
13:27 moritz m: say Match.^attributes().grep({​$_.^isa(Attribute)}).elems
13:27 camelia rakudo-moar 3e2ef3: OUTPUT«5␤»
13:27 moritz _nadim: it seems .^isa(Attribute) is a working check for that
13:27 moritz (for the opposite, that is)
13:28 _nadim hmm, nice an attributes list that doesn contain attributes ;)  I'll check immediately
13:30 Skarsnik *not sure what to think of the time at the bottom http://www.nyo.fr:1080/fimstuff/stats_230097.html * It seem slow for a I7 x)
13:31 masak Perl 6 day today! \o/
13:32 andreoss nine: yes, panda is working now
13:33 Ven joined #perl6
13:38 loren joined #perl6
13:39 loren Evening, perl6 ..
13:39 DrForr Afternoon.
13:39 loren m: say (1, * + 3 ... 7); say (1, * + 3 ... 6);
13:39 camelia rakudo-moar de52f9: OUTPUT«(1 4 7)␤(1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 2…»
13:39 _nadim moritz: this feel much more fool proof, thank you for the ^isa tip
13:40 loren when i give '6' is not a value in range, the list become so long
13:41 loren {list}{range}
13:41 loren Is it a bug ? or something else
13:43 lucs How does a method of a grammar's actions signify "no match here actually"?
13:43 loren ^_^ Em ??
13:44 lucs (if that makes any sense)
13:46 lucs For example, a token matches <num> as \d+, but if it turns out that the number is 42, consider it as not matching.
13:47 loren m: say 42 ~~ /\d+/;
13:47 camelia rakudo-moar de52f9: OUTPUT«「42」␤»
13:47 lucs loren: I know that much :)
13:48 lucs I'm not being clear I guess. Let me try to rephrase...
13:49 loren lucs, em
13:49 loren lucs, print some debug msg may be help ..
13:50 arnsholt lucs: You can't do that in an action
13:50 arnsholt But you can use code assertions in the regex part with <?{ ... }>
13:50 moritz well, you can always throw an exception
13:51 lucs arnsholt: Aha, I'll try with that, thanks.
13:51 moritz which aborts the parse
13:51 moritz which is what rakudo uses all over the place
13:51 arnsholt Oh, true, true
13:51 loren m: say (1, * + 3 ... 6 );
13:51 camelia rakudo-moar de52f9: OUTPUT«(1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217…»
13:51 loren moritz, why the range become so long ..
13:52 lucs Hmm... Aborting the whole parse? Maybe overkill, but I'll see.
13:53 arnsholt loren: It needs to hit the limit exactly
13:53 arnsholt m: say (1, * + 3 ... 7 );
13:53 camelia rakudo-moar de52f9: OUTPUT«(1 4 7)␤»
13:54 loren Em, arnsholt
13:54 timotimo jnthn: i meant to get a little head start on the bug by sprinkling debug prints, but now i have to hit the road for a few hours
13:54 loren It is difficult to understand  ...
13:54 moritz m: say (1, *+3 ...^ *> 6)
13:54 camelia rakudo-moar de52f9: OUTPUT«(1 4)␤»
13:54 timotimo seeya everyone!
13:54 moritz m: say (1, *+3 ... *> 6)
13:54 camelia rakudo-moar de52f9: OUTPUT«(1 4 7)␤»
13:55 moritz loren: ... only stops when a generated element matched the thing on the right-hand side
13:56 loren I just think a kind of operator's behavior should be consistent, that sames strange for me .
13:57 colomon loren: it *is* consistent.
13:57 colomon loren: what it consistently does is smart match the RHS against the most recent element in the sequence.
13:58 loren ..And i know how to do , thks moritz, arnsholt
13:58 colomon loren: and it stops when the smartmatch is true
13:58 masak m: say (1, 3, 5 ... 12)
13:58 camelia rakudo-moar de52f9: OUTPUT«(1 3 5 7 9 11)␤»
13:58 masak colomon: except in that case.
13:58 colomon masak: !
13:58 colomon who put that back?
13:58 masak TimToady
13:59 * colomon glares
13:59 masak I can probably get you the spec commit.
13:59 colomon m: say (5, 3, 1 … 12)
13:59 camelia rakudo-moar de52f9: OUTPUT«()␤»
13:59 loren Strange for normal user, i think it should be a *real* range
13:59 colomon argh
14:00 colomon m: say (5, 3, 1 … -1)
14:00 camelia rakudo-moar de52f9: OUTPUT«(5 3 1 -1)␤»
14:00 colomon m: say (5, 3, 1 … 12)[0]
14:00 camelia rakudo-moar de52f9: OUTPUT«Nil␤»
14:01 masak loren: um, but the range operator is infix:<..>, not infix:<...>
14:03 masak colomon: ah. f752ddb5. April this year.
14:03 loren em, oh.
14:03 masak +When there is a deduced function from the last three values, and when
14:03 masak +there is a limit that "misses" but is suitably literal and of a similar
14:03 masak +type (that is, a numeric value for a numeric sequence, or a string value
14:03 masak +for a string sequence), then the deduced function will attempt to detect
14:03 masak +when the limit would be bypassed, and stop the sequence right there
14:03 masak +instead of running off to infinity
14:04 Upasaka joined #perl6
14:04 colomon masak++
14:06 masak and this seems to be the motivation in the backlog: http://irclog.perlgeek.de/p​erl6/2015-04-09#i_10413093
14:09 lucs I need some help with my "don't actually match": https://gist.github.com/lucs/cd3e912f20d6953f480b
14:10 loren masak ++
14:11 lucs I'm not sure where to save the state exactly.
14:11 DrForr lucs: It'll still match 'bbX' - Is your description correct?
14:11 lucs DrForr: Yes, it's currently broken.
14:11 DrForr (reading line 7)
14:12 lucs I'm not sure how to make it work cleanly.
14:12 DrForr ('a'|'b'|'ab'|'ba')? 'X' # if you just enumerate explicitly.
14:12 ab6tract nine: well, i just don't know how to debug something like this. the code works without 'no precompilation;', so it doesn't seem to be something that is/should be fixable on my end
14:13 ab6tract unless we expect that 'no precompilation;' has special requirements, at which point those requirements should be explicit :S
14:14 lucs DrForr: Well, sure, but this is a simplification of my real case, where I might have more than just 2 that all need to be different (and not necessarily letters either).
14:16 DrForr I don't think that's the right way to phrase your grammar then...
14:16 lucs What I'm after is something like: 'bbX' "okay, I match a 'b'; oops, I match another 'b', no good"
14:17 lucs DrForr: Oh, could be. (suggestions welcome!)
14:17 loren lucs, I try it , it success match 'aaX', not match 'cX'
14:18 lucs loren: Yes, that Goo grammar doesn't work, I'm trying to fix it.
14:18 loren with your grammar 'cX' actually not matched
14:19 lucs loren: Right, that part works :)
14:19 brrt joined #perl6
14:21 loren why don't define like this => token ab { 'a' | 'b' | 'c' }
14:21 lucs loren: I think you misunderstand what I'm trying to do.
14:21 DrForr loren - Look at line 7 of his gist.
14:21 uruwi joined #perl6
14:22 loren DrForr, oh sorry ..
14:22 DrForr You can probably do this with <![ab]>, not sure if that'd still be exponential.
14:22 DrForr loren: No problem, just pointing out what you might've missed.
14:23 nine ab6tract: is the code available somewhere?
14:23 zakharyas1 joined #perl6
14:23 loren It's a little different for me ..
14:24 loren It's a little difficult for me ....
14:24 skids joined #perl6
14:24 Ai joined #perl6
14:25 Guest99950 left #perl6
14:26 lucs In full generality: Given @elems, see if $str is composed of any number, in any order, of elements of @elems, with at most one of each.
14:28 moritz $str eq any @elems.permutations.map(*.join)
14:28 moritz not very performant though :-)
14:28 loren oh, lucs , I think understand that..
14:28 DrForr Or just sort the elements and count multiples.
14:28 DrForr No need to sort if you're counting, come to think of it.
14:28 moritz not so trivial
14:28 moritz $str = 'ababab', @elems = ('ab', 'abab')
14:29 moritz if @elems isn't free of prefixes, this can be a really nasty problem, I think
14:31 orbus greetings folks - don't want to interrupt, but I have a question
14:32 orbus I'm trying to understand the differing behavious of the the subroutine start, vs. Promise.start
14:32 brrt hi orbus
14:32 orbus hi
14:32 brrt good question
14:33 orbus yeah, subroutine start doesn't seem to be very well documented
14:33 moritz m: say await start 42
14:33 camelia rakudo-moar de52f9: OUTPUT«42␤»
14:33 loren lucs, may be can u use a hash
14:33 orbus but they do seem to behave differently
14:33 loren lucs, may be u can use a hash
14:33 moritz orbus: it's not a subroutine, it's a special syntactic form
14:33 orbus okay
14:33 ab6tract nine: https://github.com/ab5tract/Terminal-Print
14:33 lucs moritz: Right, that's too much generality I guess (and more than I need).
14:33 brrt can you elaborate on how they differ for you?
14:34 lucs loren: But where do I keep it?
14:34 orbus yeah, I threw together an example
14:34 orbus hang on
14:34 ab6tract the 'no precompilation;' statement is current coimmented out in Terminal::Print::Commands
14:34 moritz orbus: which optionally takes an expression, not a block
14:34 ab6tract *currently
14:34 orbus say I do this
14:34 orbus my $p = start {sleep 2; 'b'};
14:34 orbus say 'a';
14:34 orbus say $p.result;
14:34 loren m: my @x< a a X>; say keys(%(@x X=> True));
14:34 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/R6mUXQTBns␤Shaped variable declarations not yet implemented. Sorry. ␤at /tmp/R6mUXQTBns:1␤------> 3my @x< a a X>7⏏5; say keys(%(@x X=> True));␤»
14:34 orbus result is a
14:34 orbus b
14:34 loren m: my @x = < a a X>; say keys(%(@x X=> True));
14:34 camelia rakudo-moar de52f9: OUTPUT«(X a)␤»
14:35 orbus and if I do
14:35 orbus my $p = Promise.start({sleep 2; 'b'});
14:35 orbus say 'a';
14:35 orbus say $p.result;
14:35 orbus result is the same
14:35 orbus but
14:35 nine ab6tract: cloned the repo. What do I have to do to reproduce?
14:35 orbus if I do this
14:35 orbus my $p = start sub{sleep 2; return 'b'};
14:35 orbus say 'a';
14:35 orbus say $p.result;
14:36 orbus a
14:36 orbus sub () { #`(Sub|81191480) ... }
14:36 orbus I get that back
14:36 jnthn That's 'cus it's the same as start { sub{sleep 2; return 'b'} }
14:36 orbus whereas with Promise.start it accepts a function reference just fine and returns b like I expected
14:36 ab6tract uncomment the 'no precompilation;' on line 5 of lib/Terminal/Print/Commands.pm6 and try running one of the examples
14:36 ab6tract perl6 examples/matrix-ish.p6 is a fun one :)
14:37 orbus jnthn: hmmm
14:37 jnthn start is parsed like gather and various other things, that is what comes after it is either already a block, or is thunked into one.
14:37 ab6tract nine: thanks for poking!
14:37 jnthn It's not a subroutine.
14:37 brrt m: my &foo = sub { say "a"; return $b; }; my $p = start &foo; say $p.result;
14:37 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8Pc38abCrd␤Variable '$b' is not declared␤at /tmp/8Pc38abCrd:1␤------> 3my &foo = sub { say "a"; return 7⏏5$b; }; my $p = start &foo; say $p.result␤»
14:37 orbus okay
14:37 jnthn So yes, that's an intentional difference.
14:37 ab6tract jnthn: ah! is that what thunking means? :D
14:37 loren lucs, sort is a good idea, but 'cX' still not matched i think..
14:37 brrt m: my &foo = sub { say "a"; return 'b'; }; my $p = start &foo; say $p.result;
14:37 camelia rakudo-moar de52f9: OUTPUT«sub () { #`(Sub|88656720) ... }␤»
14:37 brrt m: my &foo = sub { say "a"; return $b; }; my $p = start foo; say $p.result;
14:37 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j1aPNwg01Y␤Variable '$b' is not declared␤at /tmp/j1aPNwg01Y:1␤------> 3my &foo = sub { say "a"; return 7⏏5$b; }; my $p = start foo; say $p.result;␤»
14:37 jnthn ab6tract: Well, in general in Perl 6, it means "you didn't write curlies around something but we'll pretend you did"
14:38 brrt m: my &foo = sub { say "a"; return 'b'; }; my $p = start foo; say $p.result;
14:38 camelia rakudo-moar de52f9: OUTPUT«a␤b␤»
14:38 brrt aw, cool
14:38 ab6tract jnthn: cool, i've been wondering about that for a long time. love do-thunking, by the way!
14:39 orbus yeah, I guess I get it - it just seems a little counterintuitive
14:39 orbus start wasn't well documented that I could find
14:39 orbus Promise is
14:40 orbus m: sub foo{sleep 2; return 'b'}; my $p = start foo(); say 'a'; say $p.result;
14:40 camelia rakudo-moar de52f9: OUTPUT«a␤b␤»
14:40 lucs loren: I think arnsholt's suggestion of using <?{...}> will lead me to a solution. I'll tell you later.
14:40 orbus like that works, and I didn't expect it to
14:40 loren lucs, OK!
14:40 orbus but with Promise.start it would fail unless you wrapped it in curlies
14:41 jnthn orbus: Promise.start mainly exists to be the plumbing used by start blocks.
14:41 orbus if start's not a subroutine, that would explain why it's not in the "subroutine" part of the documentation
14:42 orbus yeah, fair enough
14:42 jnthn There's a lot of things in Perl 6 that are handled under the same rules as start, so once you learn the pattern it'll probably not feel so odd. :)
14:42 orbus I guess I just expected if you passed it a sub reference it would just work
14:42 orbus yeah, probably
14:43 orbus I've been poking at it a little bit, but I still work mostly with perl5
14:44 orbus oh, jnthn - while I have your attention, I was curious about the status of moarvm on platforms that aren't x86 linux
14:44 orbus I was looking at building on sparc solaris 10 a while back and I never could get it going
14:45 orbus was wondering what the plans are for Christmas release
14:45 Skarsnik x-mas focus me on the language that having a fully working rakduo/moar everywhere if I understand correctly x)
14:46 jnthn Short of somebody patching it (though I think somebody *is* looking into Solaris patches at the moment), it'll work on the places it does now
14:46 orbus I figured - but that's cool
14:46 jnthn Which includes Windows, OS X, Linux, various BSDs...
14:46 jnthn We did a bunch of work for Big Endian support too
14:46 orbus I finally did get it to compile after patching a couple things, and playing with defines
14:46 orbus but then it segfaulted
14:46 jnthn So shouldn't just be restricted to x86/x64
14:46 orbus okay - this was a few months ago
14:47 orbus maybe I'll try again with a newer tree
14:47 orbus I think the build I finally managed would run enough to spit out like -version
14:47 orbus or -help
14:47 orbus but if you tried to build nqp it blew up
14:47 moritz nine, jnthn: is anybody looking into the require ::('DBDish::mysql') problems that DBIish runs into right now?
14:50 orbus alright, thanks folks - time to head to the office
14:50 nine moritz: do you have a ticket or issue for me ?
14:50 orbus really looking forward to digging into perl6 though - especially the concurrency stuff
14:50 jnthn orbus: I think we'll really need to get ourselves regular builds on a range of more interesting platforms in order to keep them working.
14:51 orbus seems like it should be vastly easier to write concurrent programs than in perl5 - especially since threads were officially discouraged :)
14:51 moritz nine: https://rt.perl.org/Ticket/Display.html?id=126816
14:51 jnthn orbus: Otherwise we'll probably accidentally bust stuff that we already made work...
14:51 orbus jnthn: yeah - probably.  And I realize Solaris 10 is kind of ancient history
14:51 jnthn orbus: But, so much to worry about at the moment... :)
14:51 orbus but a lot of people are still stuck on it
14:51 orbus oh yeah, I know
14:51 Skarsnik hm, NC does not create the Pointer object when you say sub blabla returns Pointer[something]; It does not let me call .deref on the func call
14:52 orbus I hear you
14:52 orbus well, best of luck - I'll have another go at building on solaris and maybe pop into #moarvm when I have time
14:52 orbus thanks all!
14:54 jnthn Let us know how it goes :-)
14:57 ab6tract nine: keep in mind that t/basics.t has some known failures in it, in case you come across it
14:58 sufrostico joined #perl6
14:58 Skarsnik moritz, do you have time to look at my DBIish fork? mysql-server refuse to work on my system so I can't test it ~~
14:58 nine moritz: I do have an idea
14:58 jdv79 ab6tract: nice advent.  be cool if there was a link to a more thorough treatment of youz guyz adventures that night
14:59 moritz Skarsnik: not right now; maybe tonight
14:59 Skarsnik ok thx
14:59 nine moritz: I do have evidence supporting my idea
15:00 ab6tract jdv79: thanks man! yeah, if i do write that, it will be chapter length at least :)
15:00 jdv79 evidential ideation is afoot!
15:00 CQ2 joined #perl6
15:02 andreoss joined #perl6
15:04 Ven joined #perl6
15:06 andreoss why does perl6 try to append with :ver<True>:auth<True>:api<True> to modules name I use?
15:07 Ven joined #perl6
15:07 ZoffixW joined #perl6
15:07 ZoffixW andreoss, what makes you think it does?
15:07 andreoss $ perl6 -e 'use _007'
15:07 andreoss ===SORRY!===
15:07 andreoss Could not find _007::Runtime::Builtins:ver​<True>:auth<True>:api<True>
15:08 zengargoyle good * #perl6
15:08 jnthn It's just in the error reporting the full set of qualifiers it used to search for the module
15:08 ZoffixW andreoss, that's fine. It's 'cause you can specify those three things.
15:08 Ven joined #perl6
15:08 ZoffixW colomon, how come the Issues are closed for https://github.com/colomon/io-prompter ? It's currently failing tests and I don't see a bug tracker to report the issues at
15:09 jnthn True always smartmatches True against anything
15:09 andreoss ZoffixW: i had the same behavior with Shell::Command , nuking moar-nom and rebuilding it solved the problem
15:09 |Tux| test             50000    21.927    21.819
15:09 |Tux| test-t           50000    19.958    19.850
15:09 |Tux| csv-parser       50000    24.676    24.568
15:10 colomon ZoffixW: I dunno about issues.  well known that it’s failing tests, that’s been the case ever since we switched to MoarVM
15:10 andreoss ZoffixW: i don't quite get. Should it be a String in :ver<...>?
15:10 andreoss why True is there?
15:10 colomon ZoffixW: it’s possible recent changes have made it fixable
15:10 ZoffixW andreoss, yeah, but that was because of precomp stuff
15:10 colomon ZoffixW: but I don’t have time at the minute to look at it.
15:10 ZoffixW colomon, k, I'll try to remember to look at it when I get a chance :)
15:11 ZoffixW andreoss, True in there means "any value"
15:11 ZoffixW andreoss, so it's looking for module named _007 any with value set for the :ver, :auth, and :api adverbs
15:11 ZoffixW andreoss, where is that module located?
15:11 andreoss ZoffixW: so it basiically means that the module i try to use is not installed properly
15:11 ZoffixW andreoss, it's not finding it right.
15:12 ZoffixW andreoss, where is it located?
15:12 ZoffixW er,
15:13 ZoffixW andreoss, weird that it's looking for _007::Runtime::Builtins
15:13 ZoffixW andreoss, so the it's some module used by your _007 that's missing
15:13 andreoss :ver<Any>:api<Any> would be much nicer to see
15:13 andreoss or even :ver<*>
15:13 ZoffixW andreoss, but that a completely different meaning
15:14 ZoffixW m: 42 ~~ Any
15:14 camelia rakudo-moar de52f9: ( no output )
15:14 ZoffixW m: say so 42 ~~ Any
15:14 camelia rakudo-moar de52f9: OUTPUT«True␤»
15:14 ZoffixW hm
15:14 ZoffixW m: say so Any ~~ 42
15:14 camelia rakudo-moar de52f9: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/ay79c2BR0t:1␤False␤»
15:14 ZoffixW m: say so * ~~ 42
15:14 camelia rakudo-moar de52f9: OUTPUT«WhateverCode.new␤»
15:14 b2gills timotimo: the race tests don't actually call race, they call hyper
15:14 andreoss "use Module of any version available"?
15:14 andreoss vs. "use Module of True version available"
15:14 andreoss what a True version?
15:15 ZoffixW m: say so True ~~ 42
15:15 camelia rakudo-moar de52f9: OUTPUT«False␤»
15:15 ZoffixW m: say so 42 ~~ True
15:15 camelia rakudo-moar de52f9: OUTPUT«True␤»
15:15 ZoffixW m: say so 42 ~~ *
15:15 camelia rakudo-moar de52f9: OUTPUT«WhateverCode.new␤»
15:16 ZoffixW andreoss, agreed, * or Any in the error would be nicer
15:19 ZoffixW It's a bit saddening to see so much bitrot in our ecosystem, considering just how small it is...
15:21 lucs Okay, this -> <- close to solving my ab thing. Question:
15:21 ZoffixW ab thing? Going for the 8-pack, eh :)
15:21 lucs (not sure how to say it, hang on...)
15:22 lucs ZoffixW: No, silly :)
15:22 zengargoyle antici....
15:22 lucs Rooughly: can a grammar have lexically scoped vars to do its work?
15:22 lucs s/o//
15:23 DrForr lucs: Can I see the latest?
15:23 atta joined #perl6
15:23 RabidGravy joined #perl6
15:24 DrForr (rewriting a grammar-based talk tonight.)
15:24 lucs DrForr: Um, not quite presentable yet, but Real Soon Now!
15:25 DrForr Eeh, you think that's bad, check https://github.com/drforr/perl6-ANTL​R4/blob/master/lib/ANTLR4/Grammar.pm ...
15:25 ChristopherBotto joined #perl6
15:26 lucs I'd like to do something like this: for ... { my $foo; $grammar.parse; } # $grammar, and only $grammar should see $foo.
15:26 lucs DrForr: That's a nice big one for a presentation, eh :)
15:27 nine moritz: find_symbol is most probably $*W.find_symbol. However $*W is only available at compile time. That's why BEGIN require ::("DBD::mysql"); works
15:27 jnthn lucs: Sounds more like dynamic variables
15:27 DrForr I'm curious as to why you have variables in the grammar in the first place... usually it's in the action.
15:28 jnthn Well, Perl 6's grammar has plenty of dynamics
15:29 lucs I'll show you guys something that works soon (hopefully).
15:29 dalek rakudo-star-daily: 412da6c | coke++ | log/ (2 files):
15:29 dalek rakudo-star-daily: today (automated commit)
15:29 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/412da6c374
15:31 kyclark joined #perl6
15:32 kyclark Does P6 support partial binding of subroutines?
15:32 lucs DrForr: Not in the action because of arnsholt's answer a few lines down from here: http://colabti.org/irclogger/irclog​ger_log/perl6?date=2015-12-11#l881
15:33 moritz nine: that all makes sense
15:33 vytas when installing Task::Star, I get error "Cannot unbox a type object". If I rerun it succeeds. got this for Grammar::Debugger, and just got one for URI. Is this known bug ?
15:34 nine moritz: the offending line is most probably my $CompUnitHandle := $*W.find_symbol(["CompUnit", "Handle"]); in src/Perl6/ModuleLoader.nqp
15:34 dalek roast: 0bc8cac | (Brad Gilbert)++ | S07-hyperrace/race.t:
15:34 dalek roast: S07-hyperrace/race.t should test race, not hyper
15:34 dalek roast: review: https://github.com/perl6/roast/commit/0bc8cac8b8
15:34 dalek roast: 7b0fc11 | jnthn++ | S07-hyperrace/race.t:
15:34 dalek roast: Merge pull request #86 from b2gills/patch-1
15:34 dalek roast:
15:34 dalek roast: S07-hyperrace/race.t should test race, not hyper
15:34 dalek roast: review: https://github.com/perl6/roast/commit/7b0fc114ca
15:34 ZoffixW vytas, I was just having the same issues. Got it on Grammar::Debugger and on Bailador. Not sure if it's a known bug though
15:34 tadzik vytas: can you reproduce it without installing Task::Star, just trying URI/Grammar::Debugger over and over?
15:35 vytas tadzik, let me try
15:35 abraxxa what does the error message 'Default constructor for 'Pointer' only takes named arguments' mean?
15:35 abraxxa the line in question is my $valuep := Pointer[num64].new($value);
15:36 vytas Zoffix, for me bailador is failed test - "cannot find method 'run_alt'" - will log a bug
15:36 b2gills m: my &squared = &infix:<**>.assuming(*,2); say squared 12 # kyclark
15:36 camelia rakudo-moar de52f9: OUTPUT«144␤»
15:36 [Coke] these hangs are making it impossible for the daily runs to finish. I'm going to have to spend some time figure out why the process killer isn't.
15:36 kyclark b2gills: interesting!  thanks
15:37 nine moritz: So how do I get at a Perl6 class by name from NQP reliably at compile and runtime?
15:37 [Coke] sorry, process killer is a different thing. I mean ulimit.
15:37 ZoffixW vytas, that's already logged: https://rt.perl.org/Ticket/Display.html?id=126832  You may want to comment on it, saying that you got that error, while someone else (me) successfully installed the module using the same means.
15:37 vytas Zoffix, rerunning it passed tests :/
15:37 nine [Coke]: ulimit would not help with a deadlock
15:39 kyclark How can I do something like this in P6? map { $_ * 2 } [1,2,3]
15:39 AlexDaniel joined #perl6
15:40 ZoffixW m: say map { $_ * 2 }, 1,2,3
15:40 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:40 ZoffixW m: say [1,2,3].map({$_ * 2})
15:40 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:40 kyclark Ah, missing a comma
15:40 kyclark Ye olde map didn't take that
15:41 ZoffixW m: say [1,2,3].map(* * 2)
15:41 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:41 ZoffixW \o/
15:41 ZoffixW m: say [1,2,3]»*
15:41 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UD3oAOrnF1␤Malformed postfix␤at /tmp/UD3oAOrnF1:1␤------> 3say [1,2,3]»7⏏5*␤    expecting any of:␤        postfix␤»
15:41 kyclark Right, so what is the diff b/w * and $_ in the map block?
15:41 ZoffixW kyclark, the version with the * did not have a block :)
15:42 vytas tadzik, tried panda --force install URI and Grammar::Debugger for 10 times each. Nothing.
15:42 kyclark When should one use a block or not?
15:42 AlexDaniel kyclark:  well, here is a helpful error message
15:42 b2gills If it is simple don't bother with a block
15:42 AlexDaniel m: say [1,2,3].map({* * 2})
15:42 DrForr m: say <1 2 3>.map{* *2}
15:42 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PKdfokJj0z␤Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *␤at /tmp/PKdfokJj0z:1␤------> 3say [1,2,3].m…»
15:42 camelia rakudo-moar de52f9: OUTPUT«Cannot call map(List: ); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in block <unit> at /tmp/9eZFl8Ht1Q:1␤␤»
15:42 ZoffixW heh
15:43 DrForr m: say <1 2 3>.map(* *2)
15:43 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:43 AlexDaniel m: say <1 2 3>.map: {* *2}
15:43 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1e_T3hbnyk␤Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *␤at /tmp/1e_T3hbnyk:1␤------> 3say <1 2 3>.m…»
15:43 b2gills m: my &squared = * ** 2; say squared 12
15:43 kyclark Is there a way to write the map using the >> hyperoperator and a partially bound sub?  Something like [1,2,3]>>($_ * 2)
15:43 camelia rakudo-moar de52f9: OUTPUT«144␤»
15:44 b2gills m: say (1,2,3)».&(* * 2)
15:44 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:44 * moritz is scared of b2gills
15:44 b2gills m: say (1,2,3)».&({ $_ * 2})
15:44 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:44 b2gills I'm really good at seeing patterns
15:45 kyclark Why the dot and ampersand?  Dot is now the invocant-something-or-other
15:45 b2gills method call
15:45 jnthn Suspect it just calls out of $foo.&bar()
15:45 ZoffixW m: my &squared = * ** 2;  say (1,2,3)».squared
15:45 camelia rakudo-moar de52f9: OUTPUT«Method 'squared' not found for invocant of class 'Int'␤  in block <unit> at /tmp/gbCOhJl6HV:1␤␤»
15:45 ZoffixW m: my &squared = * ** 2;  say (1,2,3)».&squared
15:45 camelia rakudo-moar de52f9: OUTPUT«(1 4 9)␤»
15:45 jnthn Contextualizers are parsed by variable
15:45 jnthn iirc
15:45 kyclark m: <1 2 3>>>.&(* * 2)
15:45 camelia rakudo-moar de52f9: ( no output )
15:46 kyclark <1 2 3>>>.&(* * 2)
15:46 AlexDaniel ahahha >>>
15:46 b2gills add a say
15:46 kyclark That works for me
15:46 kyclark m: say <1 2 3>>>.&(* * 2)
15:46 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:46 ZoffixW kyclark, you forgot to tell the bot to «say»
15:46 kyclark Wild
15:46 AlexDaniel m: say <<1 2 3>>>>.&(* * 2)
15:46 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:46 b2gills m: say  «1 2 3»>>.&(* * 2)
15:46 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:47 ZoffixW m: say  «1 2 3»».&(* * 2)
15:47 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:47 kyclark I still don't get why the dot before the amper
15:47 ZoffixW m: say  «1 2 3»»&(* * 2)
15:47 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KfruvuHtUG␤Malformed postfix␤at /tmp/KfruvuHtUG:1␤------> 3say  «1 2 3»»7⏏5&(* * 2)␤    expecting any of:␤        postfix␤»
15:47 b2gills It's to get around the parser so it sees it as calling a subroutine as a method
15:47 kyclark Is the amper somewhat like "lamba"?
15:48 lucs Okay, solved to my satisafaction, but any suggested improvements welcome: https://gist.github.com/lucs/cd3e912f20d6953f480b
15:48 b2gills no * * 2 is a lambda so is {.perl} and -> $_ { .perl }
15:48 kyclark Would it be possible to <1 2 3>>>sub($n) { $n * 2 }
15:48 lucs loren: ^^
15:49 b2gills m: say  <1 2 3>»&(sub($n) { $n * 2 })
15:49 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zDrcxM8pTx␤Malformed postfix␤at /tmp/zDrcxM8pTx:1␤------> 3say  <1 2 3>»7⏏5&(sub($n) { $n * 2 })␤    expecting any of:␤        postfix␤»
15:49 ZoffixW m: say  «١ ٢ ٣»».&(* * ٢)
15:49 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:49 lucs DrForr: ^^
15:49 * ZoffixW grins
15:49 b2gills m: say  <1 2 3>».&(sub($n) { $n * 2 })
15:49 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5atJvDRJEc␤Variable '$n' is not declared␤at /tmp/5atJvDRJEc:1␤------> 3say  <1 2 3>».&(sub(7⏏5$n) { $n * 2 })␤»
15:49 b2gills m: say  <1 2 3>».&(sub ($n) { $n * 2 })
15:49 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:49 loren lucs, finished ?
15:50 lucs loren: Yes.
15:50 lucs loren: https://gist.github.com/lucs/cd3e912f20d6953f480b
15:50 lucs loren: So I used a hash :)
15:50 ZoffixW m: say  «١ ٢ ٣»».&( -> $n { $n * ٢ })
15:50 camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
15:51 ZoffixW m: say  «١ ٢ ٣»».&( -> $n { $n * ٢; sleep 2 }); say now - INIT now
15:51 camelia rakudo-moar de52f9: OUTPUT«(Nil Nil Nil)␤6.0117417␤»
15:52 znpy joined #perl6
15:52 ZoffixW I though » was a hyper? Concurrent and stuff
15:52 ZoffixW m: say  «١ ٢ ٣».hyper(batch => 1).&( -> $n { sleep 1; $n * ٢; }); say now - INIT now
15:52 camelia rakudo-moar de52f9: OUTPUT«Cannot call Numeric(HyperSeq: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/B7JbX3xvXN:1␤␤»
15:52 ZoffixW m: say  «١ ٢ ٣».hyper(batch => 1)».&( -> $n { sleep 1; $n * ٢; }); say now - INIT now
15:52 camelia rakudo-moar de52f9: OUTPUT«()␤0.0167718␤»
15:52 AlexDaniel ZoffixW: it is but it has to return a list, I guess
15:52 ZoffixW I see
15:53 loren lucs, i say .
15:53 ZoffixW m: «١ ٢ ٣».hyper(batch => 1)».&( -> $n { sleep 1; say $n * ٢; }); say now - INIT now
15:53 AlexDaniel aah no
15:53 camelia rakudo-moar de52f9: OUTPUT«0.01385305␤»
15:53 AlexDaniel 6 seconds, indeed
15:53 ZoffixW AlexDaniel, it's just the default batch is 4 or something
15:54 kyclark Forgive me, but, as interesting as all the above is, it doesn't beat "map (+2) [1, 2]"
15:56 ZoffixW kyclark, what language is that?
15:56 kyclark Haskell
15:56 timotimo b2gills, good catch, feel free to gix if you like
15:56 jnthn I'm not sure I'd use >>.&(...) in reality :)
15:56 ZoffixW :)
15:56 timotimo ah. you did
15:56 AlexDaniel m: say  ^20>>.&( -> $n { sleep 1; $n * 2; }); say now - INIT now
15:56 jnthn m: say map *+2, 1, 2
15:56 camelia rakudo-moar de52f9: OUTPUT«^1␤1.00748194␤»
15:56 camelia rakudo-moar de52f9: OUTPUT«(3 4)␤»
15:56 jnthn That's fine enough
15:56 ZoffixW :)
15:56 AlexDaniel hm…
15:56 kyclark Ah, that's closer to what I'm looking for jnthn!
15:57 ZoffixW AlexDaniel, hyper is broken ATM
15:57 AlexDaniel m: say (^20)>>.&( -> $n { sleep 1; $n * 2; }); say now - INIT now
15:57 camelia rakudo-moar de52f9: OUTPUT«(0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38)␤20.0160612␤»
15:57 nine jnthn: how can I get at CompUnit::Handle from NQP code at runtime?
15:57 kyclark m: say map **2, 1, 2
15:57 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JcDIYT21WI␤Two terms in a row␤at /tmp/JcDIYT21WI:1␤------> 3say map **7⏏2, 1, 2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        …»
15:57 ZoffixW m: sleep 2 for ^4 .hyper: :1batch; say now - INIT now
15:57 camelia rakudo-moar de52f9: OUTPUT«0.0106910␤»
15:57 AlexDaniel ZoffixW: I've always thought that this fancy thing was NYI
15:58 ZoffixW AlexDaniel, I used the above code a few weeks ago successfully.
15:58 ZoffixW Even bragged on Twitter
15:58 AlexDaniel ZoffixW: I mean, not the operator itself, but the fact that it does stuff in parallel
15:58 ZoffixW Yeah, the above used to run in 2 seconds.
15:58 ZoffixW So 4 sleep 2s in 2 seconds.
15:59 jnthn nine: As in, the type object for that?
15:59 khw joined #perl6
15:59 ZoffixW Now... well, I don't even know what it's doing
15:59 nine jnthn: yes
15:59 robertle joined #perl6
15:59 nine jnthn: so I can call the constructor
15:59 jnthn nine: I'd probably use the hll stash
16:00 jnthn nine: Store it with bindhllsym in CORE.setting load, and look it up with gethllsym or so in NQP
16:00 ZoffixW m: sleep 2 for ^4 .race: :1batch; say now - INIT now
16:00 camelia rakudo-moar de52f9: OUTPUT«0.01277227␤»
16:00 andreoss m: say [1..3] »*2»
16:00 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v9BF4nSRQ8␤Missing « or »␤at /tmp/v9BF4nSRQ8:1␤------> 3say [1..3] »*7⏏2»␤    expecting any of:␤        infix␤        infix stopper␤»
16:00 kyclark OK, just needed space:
16:00 andreoss m: say [1..3] »*» 2
16:00 camelia rakudo-moar de52f9: OUTPUT«[2 4 6]␤»
16:00 kyclark m: say map * ** 2, 1,2
16:00 camelia rakudo-moar de52f9: OUTPUT«(1 4)␤»
16:00 andreoss kyclark: ^^
16:00 kyclark m: say map * * 2, 1,2
16:00 camelia rakudo-moar de52f9: OUTPUT«(2 4)␤»
16:00 andreoss kyclark: consider hyper ops
16:00 nine jnthn: will do, thanks!
16:01 robertle p6 noob here, I am failing to understand how p6 locates modules. I have a piece of code, is uses one module ok, the other one it says "Could not find", both installed via panda. I did strace it just to see where it was looking and quite obviously it's not as simple as in perl5 ;) how do I find out what went wrong?
16:01 kyclark andreoss, I've been trying to figure out which is cleaner, hyperops or map
16:01 kyclark (see above)
16:01 ZoffixW robertle, which modules are those?
16:02 ZoffixW robertle, the could not find one in particular
16:02 robertle HTTP::Server::Async
16:03 robertle but I am just playing around, so I am much more interested in understanding how it locates modules (what's this "short" stuff and the hashes?) then getting it to work...
16:03 timotimo and the drive continues
16:03 ZoffixW tadzik, tried reinstalling Grammar::Debugger 50 times, and I did not get that unbox error in any of them
16:04 nine jnthn: /win 18
16:04 ZoffixW I'm getting a bunch of deprecation errors/warnings from HTTP::Server::Async's test suite...
16:05 jnthn nine: What? :)
16:05 ZoffixW robertle, it's cause P6, unlike P5, precompiles modules. The hashes is for it to find those precomps
16:06 prammer joined #perl6
16:06 robertle ok, that sounds good because it relates to my second question :)
16:06 nine jnthn: tried to switch windows while typing a message to you ;)
16:07 ZoffixW Which is? :)
16:07 jnthn hah! :)
16:07 nine jnthn: I found a much simpler solution: just don't use CompUnit::Handle in NQP code. With CompUnit::Repository::NQP I don't need to anymore :)
16:07 kyclark On this page https://perl6advent.wordpress.co​m/2009/12/05/day-5-metaoperator/, it says I can do @xyz»++
16:07 robertle but how does that work? does it compute a hash of "XXX" when i do "use XXX;" and then go from there?
16:07 kyclark m: say [1,2,3,4]>>++
16:07 camelia rakudo-moar de52f9: OUTPUT«[1 2 3 4]␤»
16:08 ZoffixW m: my @a = ^4; say @a; @a»++; say @a
16:08 camelia rakudo-moar de52f9: OUTPUT«[0 1 2 3]␤[1 2 3 4]␤»
16:08 ZoffixW m: my @a = ^4; say @a; say @a»++; say @a
16:08 jnthn m: say ++<<[1,2,3,4]
16:08 camelia rakudo-moar de52f9: OUTPUT«[0 1 2 3]␤[0 1 2 3]␤[1 2 3 4]␤»
16:08 camelia rakudo-moar de52f9: OUTPUT«[2 3 4 5]␤»
16:08 robertle my second question was that I did a "lib 'somewhere';", and because I did not have write permissions it complained that it can't create .precomp. we used to have such libraries in the perl5 world for all sorts of shared code, and I was wondering how to do sth similar going forward
16:08 jnthn >>++ is post-increment, so it'll mutate the (anonymous) array and give you back what it used to be :)
16:08 robertle or to place modules for a given software in
16:09 andreoss jnthn: should it give a warning about changing immutable value here?
16:09 jnthn It didn't.
16:09 dalek rakudo/repository_registry: 20393f1 | (Stefan Seifert)++ | src/ (2 files):
16:09 dalek rakudo/repository_registry: Move CompUnit::Handle creation from NQP code to CompUnit::Repository::NQP
16:09 dalek rakudo/repository_registry:
16:09 dalek rakudo/repository_registry: Since we unified module loading of all languages at the repository level,
16:09 dalek rakudo/repository_registry: there's no need anymore to present a unified interface at the lower levels.
16:09 dalek rakudo/repository_registry: That's why we can lift the CompUnit::Handle creation up into Perl 6 code.
16:09 dalek rakudo/repository_registry: review: https://github.com/rakudo/rakudo/commit/20393f19cc
16:09 ZoffixW m: my @a = ^4; say @a; say ++«@a»++; say @a
16:09 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eRI0m_k3HO␤Operators '++«' and '»++' are non-associative and require parentheses␤at /tmp/eRI0m_k3HO:1␤------> 3my @a = ^4; say @a; say ++«@a»++7⏏5; say @a␤    expecting any of:␤        postf…»
16:09 nine ZoffixW: this ^^^ fixes the DBIish problem for me
16:09 jnthn You *can't* change an immutable value, by definition :P
16:09 AlexDaniel nine: hoooooooraaaaaaaaaaaaaaaaaay
16:09 rurban joined #perl6
16:10 kyclark I was expecting to get back a new list with incremented values
16:10 ZoffixW Why? :)
16:10 geekosaur then use preincrement?
16:10 nine Maybe I should merge repository_registry soon so the fix gets out in the wild. I think all the external API changes are done anyway.
16:10 jnthn Or better + :)
16:10 kyclark Is the advent page wrong on this example?
16:11 ugexe robertle: you cant yet. hopefully very soon
16:11 jnthn m: say (1,2,3) >>+>> 2
16:11 camelia rakudo-moar de52f9: OUTPUT«(3 4 5)␤»
16:11 robertle ugexe: ok, that's great
16:12 ZoffixW kyclark, I don't see where on the page it's accessing elements of @xyz before they're incremented
16:12 AlexDaniel kyclark: it is not wrong, you can still increment an existing array like this
16:12 ZoffixW kyclark, consider this:   say $i++; Will you expect to get the incremented version of $i?
16:12 AlexDaniel m: my @xyz = 2, 4, 8; @xyz»++; say @xyz
16:12 camelia rakudo-moar de52f9: OUTPUT«[3 5 9]␤»
16:12 AlexDaniel though it does not look like a good way to do it :)
16:12 robertle regarding the HTTP::Server::Async case, I installed another module with panda, and the code shows up in site/sources as hash-named files. HTTP::Server::Async does not. I have to admit I did a --force on the latter one when installing, as some tests failed on install. would that prevent panda from creating the hashes?
16:13 andreoss m: say ^4 >>&( { $^a * $^b } )>> 2
16:13 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hV0WO0HwJW␤Missing << or >>␤at /tmp/hV0WO0HwJW:1␤------> 3say ^4 >>&7⏏5( { $^a * $^b } )>> 2␤    expecting any of:␤        infix␤        infix stopper␤»
16:13 andreoss can i embed code inside hyper quotes?
16:13 tadzik ZoffixW: wow, weird
16:13 nine ab6tract: can repro the examples/matrix-ish.p6 failure here
16:13 tadzik ZoffixW, vytas: seems like the fact that it's a dependency of something makes it a problem
16:13 tadzik I don't see why that would happen
16:14 loren lucs, good job !
16:16 AlexDaniel m: 'say (^4)».&({ $^a * $^b })»5 # :/
16:16 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ccchXaFtEM␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/ccchXaFtEM:1␤------> 3'say (^4)».&({ $^a * $^b })»5 # :/7⏏5<EOL>␤    expecting any of:␤        single q…»
16:16 AlexDaniel m: say (^4)».&({ $^a * $^b })»5 # :/
16:16 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nOeQtODhVw␤Malformed postfix␤at /tmp/nOeQtODhVw:1␤------> 3say (^4)».&({ $^a * $^b })»7⏏5 # :/␤    expecting any of:␤        method arguments␤        postfix␤»
16:17 ZoffixW What's "»5" supposed to do? :)
16:17 robertle hmm, my installation problem seems to have resolved itself after a few more tries, perhaps I was just stupid.
16:17 ZoffixW The installation is has a few rough edges still. We've just had a massive overhaul not so long ago
16:17 robertle but there was a file "(HANDLED) Failed to open file " in my rakudobrew/moar-nom/install/share/perl6 directory, perhaps leftovers from someting crashing?
16:18 AlexDaniel m: my @a = 2, 5, 10; say @a »*» 3.5
16:18 camelia rakudo-moar de52f9: OUTPUT«[7 17.5 35]␤»
16:18 ZoffixW robertle, sounds like your rakudo is too old.
16:18 AlexDaniel m: my @a = 2, 5, 10; say @a ».&({$^a * $^b})» 3.5
16:18 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/csTeFFmkbd␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/csTeFFmkbd:1␤------> 3my @a = 2, 5, 10; say @a ».&7⏏5({$^a * $^b})» 3.5␤»
16:18 AlexDaniel m: my @a = 2, 5, 10; say @a».&({$^a * $^b})» 3.5
16:18 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MR4TXbYOOe␤Missing postfix␤at /tmp/MR4TXbYOOe:1␤------> 3y @a = 2, 5, 10; say @a».&({$^a * $^b})»7⏏5 3.5␤    expecting any of:␤        method arguments␤        postfix␤»
16:18 ZoffixW ah
16:19 AlexDaniel b2gills: did you say something about patterns? :)
16:19 ZoffixW :D
16:19 andreoss m: say [^4]».&( * + 1)
16:19 camelia rakudo-moar de52f9: OUTPUT«[1 2 3 4]␤»
16:20 andreoss m: say [^4] ».&( * + * )» 2
16:20 camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qLpr0dFpsB␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/qLpr0dFpsB:1␤------> 3say [^4] ».&7⏏5( * + * )» 2␤»
16:20 diakopter backlog asplode
16:21 robertle Zoffix: man, it's only hours old! or at least that's when I ran rakudobrew, does that take the latest and greatest or some specific tag that lags behind head?
16:23 ab6tract nine: well, that makes me happy and sad at the same time
16:23 nine ab6tract: I think, I understand what's going wrong
16:23 Ven joined #perl6
16:24 uruwi joined #perl6
16:25 AlexDaniel m: say [10, 15, 20]»(.&(* + 1).WHAT) # Who would have thought that the result is [2 2 2]
16:25 camelia rakudo-moar de52f9: OUTPUT«Use of uninitialized value of type Any in numeric context  in whatevercode  at /tmp/yteZOVpCnr:1␤Use of uninitialized value of type Any in numeric context  in whatevercode  at /tmp/yteZOVpCnr:1␤[2 2 2]␤»
16:26 dalek rakudo/nom: c4f39c9 | jnthn++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp:
16:26 dalek rakudo/nom: Fix SomeRole.^roles.
16:26 dalek rakudo/nom:
16:26 dalek rakudo/nom: Using the same "assume you're talking about the default candidate"
16:26 dalek rakudo/nom: logic we use for .^methods and friends.
16:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c4f39c9a5a
16:26 dalek rakudo/nom: 7a1aebd | jnthn++ | src/Perl6/Metamodel/ (4 files):
16:26 dalek rakudo/nom: Make :transitive the default for .^roles.
16:26 dalek rakudo/nom:
16:26 dalek rakudo/nom: Since roles are "flat" in nature, this is a less surprising default.
16:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a1aebd987
16:27 dalek roast: 61758a2 | jnthn++ | S12-introspection/roles.t:
16:27 dalek roast: Update .^roles tests.
16:27 dalek roast:
16:27 dalek roast: Includes coverage of RT #125731.
16:27 dalek roast: review: https://github.com/perl6/roast/commit/61758a2278
16:29 ugexe what is a transitive role?
16:29 perl6joe joined #perl6
16:30 jnthn m: role A { }; role B does A { }; say B.new.^roles
16:30 camelia rakudo-moar de52f9: OUTPUT«((B))␤»
16:30 jnthn That now says ((B) (A)) instead
16:30 ugexe ah
16:30 jnthn Just a change of default to something a bit less surprising.
16:31 ugexe just glad to learn something new
16:31 jnthn But along the way I discovered that .^roles(:transitive) was broken.
16:31 jnthn So patched that too :)
16:31 b2gills AlexDaniel: I said I'm really good at spotting them, for example putting together puzzles I look at the box to see where a given piece goes
16:31 llfourn joined #perl6
16:31 b2gills jnthn: I knew that it was broken for a while ( should have rakudobugged )
16:32 b2gills really it was calling .^roles on a role
16:33 jnthn Right :)
16:33 jnthn Well, fixed and test covered now.
16:33 lizmat joined #perl6
16:34 * lizmat waves from inside a car inside a train
16:34 jnthn Yo dawg...
16:34 jnthn Unlucky for some, 13 xmas RTs left
16:35 jnthn Though I need to make a pass through tickets filed after I did the xmas list for new ones that belong on the list.
16:36 b2gills better fix at least one before the 13th
16:36 nine ab6tract: oh yes, looking good :)
16:36 TimToady I guess I needed to sleep that hard...
16:36 yoleaux 11:57Z <jnthn> TimToady: Is fail sufficiently like return that, if outside of a return, it should die that you can't fail outside of a routine?
16:38 TimToady jnthn: sure, it should probably throw the original exception immediately in that case
16:38 TimToady as if there were a 'use fatal' in the caller of the mainline code
16:40 nine ab6tract: I do have a fix, but have to leave for the company christmas party. Can push it tomorrow
16:41 nine ab6tract: fix is just to abort precompilation if we encounter a dependency that we couldn't load from a precomp file
16:41 cdg joined #perl6
16:46 El_Che jnthn: 13 left? wow. Nice
16:47 lizmat anybody checked out https://www.nu42.com/2015/12/perl6​-newline-translation-botched.html ?
16:47 lizmat entering the tunnel soon&
16:49 flussence on the bright side, «use newline» works once again...
16:49 dwarring joined #perl6
16:51 RabidGravy on the downside is it the new thing to make a negative blog post rather than engaging with people to try and work it out?
16:52 ZoffixW joined #perl6
16:55 lostinfog joined #perl6
16:57 jnthn RabidGravy: Indeed, my feeling after reading that is "screw it, somebody else can deal with this" :)
16:57 jnthn I don't get the test failures the post does.
16:57 flussence it ends with a link to reddit... I guess they'll find all the answers they're expecting there.
16:58 jnthn I wonder if they managed to get a git checkout of the spectests that didn't do the line translation.
16:58 jnthn The only ones I see are S17-supply/lines.t.
16:58 El_Che for personal experience, bugs are welcomed here and on RT. I wonder what's the rationale to go around. No need.
16:58 flussence can mixing cygwin/non-cygwin stuff cause line ending problems like that?
16:59 jnthn Yes
16:59 jnthn Well, I guess so
16:59 nige1 joined #perl6
17:00 retupmoca jnthn: "... git and hg are set up not to touch line endings ..." - looks like he set it up that way on purpose
17:01 jnthn Well, for me:
17:01 jnthn git config core.autocrlf
17:01 jnthn true
17:01 nige1 need a little help constructing a list of playing cards - previously this worked ok
17:02 TimToady nige1: you probably need a | to slip sublists into lists
17:02 nige1 my @ranks = 1 .. 10 , 'A'. 'J','Q', 'K'
17:02 nige1 yes
17:02 nige1 so that would be
17:02 flussence m: say "\x[1F0A1]".."\x[1F0DE]"
17:02 camelia rakudo-moar 7a1aeb: OUTPUT«"🂡".."🃞"␤»
17:02 nige1 #my @ranks  =  |(1 .. 10), 'A', 'J', 'Q', 'K';
17:03 nige1 to force the slip?
17:03 TimToady yes
17:03 nige1 cool - I think I understand that
17:03 TimToady or just flat the whole thing
17:03 jnthn or just
17:03 nige1 ok
17:03 jnthn my @ranks = flat 1..10, ...
17:03 * TimToady is reading everyone's mind this morning :)
17:03 nige1 ok
17:03 ZoffixW m: say set(74).map(*.chr);
17:03 camelia rakudo-moar 7a1aeb: OUTPUT«Method 'chr' not found for invocant of class 'Pair'␤  in block <unit> at /tmp/qggTJJKnhg:1␤␤»
17:03 ZoffixW Pair? :S
17:03 nige1 during testing - I found that yadda yadda worked too
17:04 nige1 1 ... 10
17:04 TimToady yes, that should work here
17:04 moritz it's not yadda in an infix position
17:04 moritz it's the sequence operator
17:04 TimToady well, it's still 'and so on' :)
17:05 TimToady which is kinda what 'yadda, yadda, yadda' means
17:05 jnthn ZoffixW: Sets work like hashes
17:05 jnthn m: say set(74).keys.map(*.chr);
17:05 camelia rakudo-moar 7a1aeb: OUTPUT«(J)␤»
17:05 nige1 - yes - I like that mnemonic
17:05 ChristopherBotto m: my @a = map { $_ }, ( (1,2), (3,4)); @a.perl.say;
17:05 camelia rakudo-moar 7a1aeb: OUTPUT«[(1, 2), (3, 4)]␤»
17:05 psch way i understand that newline blog post:  the author configured their windows to behave as linux does wrt line endings and is confused that perl6 behaves windows-y
17:05 nige1 so the combination the Seq and , then causes the list to be eagerly constructed
17:06 nige1 ?
17:06 idiosyncrat_ joined #perl6
17:06 jnthn Well, they want us to do things as Perl 5 does, which is to just translate at boundaries, I guess
17:06 psch right, the boundary bound translation is the closest to a valid criticism buried in there imo
17:07 jnthn It's funny that we get complained at here for not implementing the solution that loses info, yet with NFG people worry about losing the original byte input order. Can't win. :P
17:08 idiosyncrat_ I have a question about Perl 6 parsing -- my understanding is that the std.pm parser is mainly for reference -- that the actual implementations like Rakudo parse using other means.
17:08 RabidGravy yes
17:08 idiosyncrat_ And my expectation is that those "other means" would be recursive descent.
17:09 TimToady both of those parsers are recursive descent, except when they aren't
17:09 idiosyncrat_ Given the loose definition of recursive descent, how does one "not" be recursive descent
17:09 idiosyncrat_ ?
17:09 TimToady EXPR is bottom-up
17:10 ZoffixW Surely that's an ellipsis :)
17:10 ZoffixW m: say 1, 2 … 10
17:10 camelia rakudo-moar 7a1aeb: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
17:10 idiosyncrat_ OK.  Another question -- wrt the operator precedence grammar -- there can only be one of those?
17:10 ZoffixW .u …
17:10 yoleaux U+2026 HORIZONTAL ELLIPSIS [Po] (…)
17:10 ZoffixW jnthn, thanks, back to reading the doc I guess :)
17:10 * jnthn hopes the dog is correct
17:10 jnthn uh, doc :)
17:10 RabidGravy woof
17:10 TimToady idiosyncrat_: only one called EXPR
17:11 TimToady but you can freely add operators with other precedences if you like
17:11 TimToady or write your own bottom-rule
17:11 TimToady *-up
17:11 idiosyncrat_ OK.  I read the advent post on grammars with great interest.
17:12 nige1 thanks for help perl6++ looking forward to sharing some joy of six at lpw tomorrow ;-)
17:12 idiosyncrat_ And I did think it overlooked potential difficulties in taking Perl 6 grammars into metaprogramming, composability, 2nd order stuff.
17:12 ollej joined #perl6
17:13 TimToady 2nd-order stuff?
17:13 idiosyncrat_ BNF which writes BNF
17:13 TimToady grammars just compose and metaprogram like classes
17:14 idiosyncrat_ 2nd order languages in the stricter sense.
17:14 * jnthn bbl
17:15 ChristopherBotto my @a = map { $_ }, ( (1,2), (3,4)); @a.perl.say;
17:15 ChristopherBotto m: my @a = map { $_ }, ( (1,2), (3,4)); @a.perl.say;
17:15 camelia rakudo-moar 7a1aeb: OUTPUT«[(1, 2), (3, 4)]␤»
17:15 ChristopherBotto m: my @a = flatmap { $_ }, ( (1,2), (3,4)); @a.perl.say;
17:15 camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eVo8WIMP33␤Undeclared routine:␤    flatmap used at line 1␤␤»
17:15 ChristopherBotto m: my @a = map { $_ }, |((1,2), (3,4)); @a.perl.say;
17:15 camelia rakudo-moar 7a1aeb: OUTPUT«[(1, 2), (3, 4)]␤»
17:15 idiosyncrat_ A reason, for example, yacc was never used for 2nd order is that you had no good way of knowing if yacc would parse the generated grammar.
17:15 ugexe m: my @a = flat map { $_ }, ( (1,2), (3,4)); @a.perl.say;
17:15 camelia rakudo-moar 7a1aeb: OUTPUT«[1, 2, 3, 4]␤»
17:16 idiosyncrat_ And these kinds of limits exist, even in Marpa.
17:16 ChristopherBotto ugexe: Thanks!
17:16 idiosyncrat_ That is, you've got to make sure the composed or generated grammar can reaasonably be parsed by your parse engine.
17:17 idiosyncrat_ So if you compose two Marpa grammars and create an ambiguity, the result may go cubic.
17:18 ChristopherBotto m: &flatmap.gist.say
17:18 camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Tn8qPz_NtJ␤Undeclared routine:␤    flatmap used at line 1␤␤»
17:18 idiosyncrat_ The practical impact of that being that, yes, you can compose grammars, but in practice, you've got to make sure you're not creating too much ambiguity.
17:19 ChristopherBotto Okay. I see. flatmap is gone because we don't need it anymore.
17:19 TimToady well, at the moment we're just trying to get a Perl 6 compiler out the door in the next week or two, so that's something we'll be more interested in after that, I suspect
17:19 xfix joined #perl6
17:20 idiosyncrat_ I don't expect you to do anything about this at the moment.
17:20 idiosyncrat_ But I'm working up a blog post, and I wanted to try to stay fact-based. :-)
17:20 TimToady though I'd be interested at that time to know what goes cubic, and whether we're susceptbile :)
17:20 idiosyncrat_ The blog post will be about that.
17:21 TimToady we already know some things we need to improve with what we have now
17:21 idiosyncrat_ The limit is that you're PEG/LL based.
17:22 TimToady well, we don't really do LL even
17:22 lizmat joined #perl6
17:22 dalek perl6.org: 0958a00 | (Christopher Bottoms)++ | source/documentation/index.html:
17:22 dalek perl6.org: Added 2015 to list of Perl 6 Advent Calendars
17:22 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/0958a00994
17:22 dalek perl6.org: ed2062e | (Zoffix Znet)++ | source/documentation/index.html:
17:22 dalek perl6.org: Merge pull request #43 from molecules/patch-1
17:22 dalek perl6.org:
17:22 dalek perl6.org: Added 2015 to list of Perl 6 Advent Calendars [Will need to update it to Table of Contents, when that is ready]
17:22 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/ed2062e9a0
17:22 idiosyncrat_ If it's top-down the nearest mathematical description is LL
17:22 * lizmat waves from the left-hand driving side of the channel
17:22 TimToady idiosyncrat_: sure
17:22 idiosyncrat_ That is, the math imposes basic limits on what a parser can do.
17:23 idiosyncrat_ As you of course know.
17:23 idiosyncrat_ And from that point of view, I believe you are LL.
17:24 idiosyncrat_ Btw, this is something I'd been wanting to bring up for some time, but your underlying parsing strategy is thoroughly committed to LL, which can work for Perl 6 itself, and suggesting a change was simply not constructive.
17:24 idiosyncrat_ So I kept (more or less) quiet.
17:25 vytas tadzik, if it helps I always get this issue when "rakudobrew nuke moar && rakudobrew build moar && rakudobrew build panda && panda install Task::Star". once for Grammar::Debugger and then once for URI
17:25 idiosyncrat_ But the advent post kind of put the matter of composability, 2nd order languages, etc. "out there"
17:26 idiosyncrat_ So my point is not about how to parse Perl 6, which I'm glad to leave to you guys ...
17:27 idiosyncrat_ but about these 2nd order language, metalanguage matters, where nobody is committed to a strategy yet.
17:28 TimToady certainly we need many kinds of parsers besides the Perl 6 parser, which is structured more to provide excellent error messages than for anything else
17:29 idiosyncrat_ Btw, I very much look forward to Perl 6
17:30 TimToady ain't we all :)
17:30 Skarsnik well it's already here x)
17:30 idiosyncrat_ When it comes to the human-computer interface, or the use of code as a means of communication between people ...
17:30 idiosyncrat_ I think you're the best language designer ever.
17:30 TimToady in spots
17:31 TimToady other spots, not so much :)
17:31 RabidGravy fewer defects than others ;-)
17:32 idiosyncrat_ When you're taking the lead, you're doing your learning in public, so it's easy to see the mistakes.
17:32 idiosyncrat_ And your brilliant insights get imitated by everyone, so in retrospect they seem obvious ...
17:33 AlexDaniel b2gills: Well, then, any idea how to make this work? 「my @a = 2, 5, 10; say @a».&({$^a * $^b})» 3.5」
17:33 idiosyncrat_ and a generation grows up that takes them for granted.
17:34 idiosyncrat_ The Perl *5* parser, for example, is a stunning achievement.
17:34 AlexDaniel idiosyncrat_: heh, well, tell that to other language designers :D
17:34 domidumont joined #perl6
17:34 idiosyncrat_ I think it was the furthest anyone ever took yacc/LALR -- a kind of high-water mark for it.
17:35 TimToady the Perl 5 parser shows how far you can torment yacc when you don't actually understand it much :)
17:35 RabidGravy 477 modules in the ecosystem, getting there :)
17:36 TimToady but the rest of the lexer/compiler suffered multiple personality disorder as a result :)
17:36 b2gills AlexDaniel: » is like a map that takes a single argument at a time, so there is no way to get it to work like that
17:36 idiosyncrat_ Yes, I once made a project of reading all the Perl parsers
17:36 idiosyncrat_ Every version, from 1 to 5.
17:36 idiosyncrat_ The parser actually changes very little from 1 to 5 IIRC.
17:37 TimToady yes, that part was fairly conserved, though there were some simplifications from 4 -> 5
17:37 AlexDaniel b2gills: Fine. But what does this mean then? 「my @a = 2, 5, 10; say @a »*» 3.5」
17:37 AlexDaniel m: my @a = 2, 5, 10; say @a »*» 3.5
17:37 camelia rakudo-moar 7a1aeb: OUTPUT«[7 17.5 35]␤»
17:38 idiosyncrat_ btw, anyone who wants to use yacc I have two suggestions:
17:38 idiosyncrat_ 1.) study Larry's work on Perls 1-5.
17:38 b2gills @a.map: { $_ * 3}
17:38 idiosyncrat_ 2.) Reconsider.
17:38 TimToady :D
17:39 rurban who wants yacc? marpa is the alternative to PEG/LL
17:39 idiosyncrat_ So, anyway, I'll get to work on that blog post.
17:39 RabidGravy I think I have used yacc seriously precisely once
17:40 kyclark b2gills, why can you use the colon like that?
17:40 lizmat joined #perl6
17:40 rurban yacc is nice, but you have to hack it like Larry did in perl5. and then it becomes really ugly
17:40 idiosyncrat_ I won't have kind things to say about PEG/LL based parsing, at least as they apply to metalanguages, composability, 2nd order languages, but I expect that won't surprise folks.
17:40 AlexDaniel kyclark: it's there to get rid of ()
17:40 kyclark So it's Good or Bad?
17:40 AlexDaniel kyclark: with method calls you can either use : or ()
17:41 AlexDaniel kyclark: depends
17:41 kyclark Oh, I misunderstood you
17:41 kyclark Why have both options?
17:41 rurban The only PEG/LL problem is the op precedence in expressions, but this problem is solved already.
17:41 AlexDaniel m: say (1, 5, 8).pick(2)
17:41 camelia rakudo-moar 7a1aeb: OUTPUT«(8 5)␤»
17:41 AlexDaniel m: say (1, 5, 8).pick: 2
17:41 camelia rakudo-moar 7a1aeb: OUTPUT«(5 1)␤»
17:42 AlexDaniel bad example, the result is different :)
17:42 kyclark Understood.
17:42 AlexDaniel kyclark: well, there is more than one way to do it
17:42 AlexDaniel kyclark: also, sometimes you have too many parens and it gets unreadable
17:42 AlexDaniel kyclark: in such cases : helps
17:42 kyclark Yes, but is there any advantage for having both?  I've just taken a class of 15 grads and undergrads through Perl5
17:42 b2gills AlexDaniel:  「1,2,3,4 »*» 1,2」 =:= 「(1,2,3,4) Z* (1,2,2,2)」
17:43 kyclark I have to figure out how and what to teach beginners
17:43 ChristopherBotto m: say: 'Hello', ' ', 'World', '!'
17:43 camelia rakudo-moar 7a1aeb: OUTPUT«WARNINGS:␤Useless use of constant string " " in sink context (line 1)␤Useless use of constant string "Hello" in sink context (line 1)␤Useless use of constant string "World" in sink context (line 1)␤Useless use of constant string "!" in sink context…»
17:43 ChristopherBotto m: say('Hello', ' ', 'World', '!')
17:43 camelia rakudo-moar 7a1aeb: OUTPUT«Hello World!␤»
17:43 AlexDaniel kyclark: .map({ $_ + 5 }) vs .map: { $_ + 5 }
17:43 AlexDaniel kyclark: () are kinda universal
17:43 uruwi Now the latter is nicer.
17:44 RabidGravy kyclark, I'd go with parens and then sneak a : in to provoke the question
17:44 b2gills ChristopherBotto: you use : on methods not subroutines ( otherwise it looks like a label )
17:44 kyclark m: say [1,2,3].map: * * 2
17:44 camelia rakudo-moar 7a1aeb: OUTPUT«(2 4 6)␤»
17:44 TimToady well, the first let's you chain .foo.bar after the parens, while the 2nd let's you write a huge block and terminate it with a bare }
17:44 kyclark m: say [1,2,3].map: {$_ * 2}
17:44 camelia rakudo-moar 7a1aeb: OUTPUT«(2 4 6)␤»
17:44 Begi joined #perl6
17:44 ChristopherBotto m: my $a = "Hello"; my $b = "World"; say: $a, $b;
17:44 camelia rakudo-moar 7a1aeb: OUTPUT«WARNINGS:␤Useless use of variable $b in sink context (line 1)␤Useless use of variable $a in sink context (line 1)␤»
17:44 TimToady it's really about end-weight
17:44 kyclark Why/how do I decide when to use brackets/$_ and not/*?
17:44 ChristopherBotto m: my $a = "Hello"; my $b = "World"; say: ($a, $b);
17:44 camelia rakudo-moar 7a1aeb: OUTPUT«WARNINGS:␤Useless use of variable $b in sink context (line 1)␤Useless use of variable $a in sink context (line 1)␤»
17:45 Skarsnik Array.push:@tab does not do Array.push(@tab) x)
17:45 ChristopherBotto m: my $a = "Hello"; my $b = "World"; say($a, $b);
17:45 camelia rakudo-moar 7a1aeb: OUTPUT«HelloWorld␤»
17:45 TimToady you can't use : on a listop to turn it into a listop, because it already are one
17:45 b2gills m: say $*OUT: "hello" # calls the method .say on $*OUT
17:45 camelia rakudo-moar 7a1aeb: OUTPUT«hello␤»
17:45 AlexDaniel goddammit, can we have a unicode symbol for whatever star? “* * 2” is horrible…
17:45 _nadim joined #perl6
17:45 ChristopherBotto m: say $OUT: 'Hello', ' ', 'World', '!'
17:45 uruwi ★?
17:45 camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/05qjIOEdla␤Variable '$OUT' is not declared␤at /tmp/05qjIOEdla:1␤------> 3say 7⏏5$OUT: 'Hello', ' ', 'World', '!'␤»
17:46 ugexe `use trace;` in a dependency doesn't seem to work anymore
17:46 ChristopherBotto m: say $*OUT: 'Hello', ' ', 'World', '!'
17:46 camelia rakudo-moar 7a1aeb: OUTPUT«Hello World!␤»
17:46 TimToady m: constant _ = *; say (_ * 2)(3)
17:46 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:46 uruwi You can do that?!!
17:46 TimToady nope, I just put that in as an Easter egg :P
17:46 RabidGravy :)
17:47 uruwi Even if you assumed that _ now has the value of a function that returns the parameter
17:47 uruwi m: say (_ * 2)(3)
17:47 camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/17ps9YkHgC␤Two terms in a row␤at /tmp/17ps9YkHgC:1␤------> 3say (_ *7⏏5 2)(3)␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        stat…»
17:47 uruwi m: constant a = *; say(a * 2)(3);
17:47 camelia rakudo-moar 7a1aeb: OUTPUT«WhateverCode.new␤Cannot find method 'CALL-ME'␤  in block <unit> at /tmp/4rJZhIoubc:1␤␤»
17:47 uruwi Whoops, it fell apart quickly.
17:47 AlexDaniel space?
17:48 RabidGravy no space
17:48 AlexDaniel m: constant a = *; say (a * 2)(3);
17:48 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:48 moritz it's parsed as (say a * 2)(3)
17:48 uruwi m: constant a = * - 1; say (a * 2)(3); # should be 4
17:48 camelia rakudo-moar 7a1aeb: OUTPUT«Cannot call Numeric(WhateverCode: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/GHcHGspdZP:1␤␤»
17:49 b2gills *-1 creates a whatever lambda
17:49 AlexDaniel m: constant whatever = *; say (whatever * 2)(3);
17:49 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:49 TimToady yes, that should probably work too
17:50 psy joined #perl6
17:50 AlexDaniel m: constant smth = *; say (smth * 2)(3);
17:50 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:50 leont joined #perl6
17:51 b2gills m: constant whatever = Whatever.new; say (whatever * 2)(3);
17:51 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:51 AlexDaniel m: say (* * 2)(3); # noooooo…
17:51 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:51 psy joined #perl6
17:51 AlexDaniel m: say (* * *)(3, 2); # noooooo-ooooo…
17:51 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:51 cognominal m: say "/".IO.WHAT
17:51 camelia rakudo-moar 7a1aeb: OUTPUT«(Path)␤»
17:51 AlexDaniel m: say (* * * * *)(3, 2, 1); # noooooo-ooooo-oooo…
17:51 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:51 cognominal whay not IO::Path?
17:52 b2gills m: say &infix:<*>.assuming(2).(3)
17:52 camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:52 leont .gist always uses the local name for some reason
17:52 TimToady m: say (EVAL(42.chr) * 2)(3)
17:52 camelia rakudo-moar 7a1aeb: OUTPUT«Cannot call Numeric(Whatever: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/N6uoxwL84C:1␤␤»
17:52 leont so if you do «module IO { class Path {} }, it will gist to Path
17:52 cognominal m: say "/".IO.WHAT.perl
17:52 camelia rakudo-moar 7a1aeb: OUTPUT«IO::Path␤»
17:52 TimToady m: say (BEGIN {EVAL(42.chr)} * 2)(3)
17:52 camelia rakudo-moar 7a1aeb: OUTPUT«Cannot call Numeric(Whatever: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/xnFBye2jed:1␤␤»
17:53 kyclark _ seems a better choice than * for Whatever
17:53 uruwi m: say (* * * * * * * * * * * * * * * * *)(@(1 .. 9));
17:53 camelia rakudo-moar 7a1aeb: OUTPUT«Too few positionals passed; expected 9 arguments but got 1␤  in block <unit> at /tmp/TJMad2EAGc:1␤␤»
17:53 uruwi m: say (* * * * * * * * * * * * * * * * *)(|(1 .. 9));
17:53 camelia rakudo-moar 7a1aeb: OUTPUT«362880␤»
17:53 kyclark But I guess it's confused with $_, but then P6 also has just $ which I'm trying to understand
17:53 TimToady but a lot of people want to use _ for other purposes, such as I18n
17:54 AlexDaniel m: say (* * * * * * * * * * * * * * * * *)(|^8);
17:54 camelia rakudo-moar 7a1aeb: OUTPUT«Too few positionals passed; expected 9 arguments but got 8␤  in block <unit> at /tmp/lSgrBgSMfr:1␤␤»
17:54 AlexDaniel m: say (* * * * * * * * * * * * * * * * *)(|^9);
17:54 kyclark I just can't understand when to use $_ vs *
17:54 camelia rakudo-moar 7a1aeb: OUTPUT«0␤»
17:54 b2gills $ is an anonymous state scalar (unless you prefix it with my)
17:54 TimToady * creates {}, $_ doesn't
17:54 kyclark Right, I was just reading about $
17:54 cognominal ok, I still sometimes have trouble to choose the right one at the right time for .gist/.Str/.perl  :(
17:54 RabidGravy I dunno, despite it's somewhat overloaded use, it is most often seen as a replacement for 'anything'
17:54 b2gills kyclark: { $_.perl } vs *.perl
17:54 kyclark b2gills, I think you said that to me earlier but it's just starting to sink in
17:55 b2gills Use whichever makes your code clearer
17:55 geekosaur maybe Whatever should have been ‽
17:55 AlexDaniel cognominal: .perl is for kinda perl-like code, .gist is human readable and .Str is just a stringified thing
17:55 geekosaur :p
17:55 cognominal to see the glass half full, it probably is because most of the time the default conversion is good enough
17:56 lizmat joined #perl6
17:56 AlexDaniel cognominal: by default conversion you mean .gist?
17:56 * leont doesn't like the .gist behavior here, it's a bit confusing IMO
17:56 b2gills kyclark: I tend to choose whichever form of lambda will make my code shorter ( for codegolf )
17:56 cognominal AlexDaniel, it depends on what function you use too
17:57 cognominal say/print/note/...
17:57 AlexDaniel cognominal: well “say” is for humans, “print” is for computers
17:57 TimToady well, line printers...
17:57 cognominal :)
17:58 b2gills One of my first Perl 5 programs was about talking directly to an Epson Dot-Matrix printer
17:58 flussence .oO( and «put» is for cyborgs )
17:58 AlexDaniel cognominal: and “note” is like “say” but for stderr, unless I'm wrong
17:58 RabidGravy I miss line printers
17:59 cognominal it all makes sense, but one has to get used to it.
17:59 cognominal m: say "/".IO.perl
17:59 camelia rakudo-moar 7a1aeb: OUTPUT«q|/|.IO(:SPEC(IO::Spec::Unix))␤»
18:00 TimToady put is just a print variant, short for 'print-und-terminate' or so
18:01 AlexDaniel right, there's also put…
18:02 TimToady .oO(not to be confused with putt, which is for code golf)
18:02 * stmuk doesn't miss sending binary files to decwriters by mistake at all
18:03 TimToady well, a line printer can chew a box of paper even faster
18:03 RabidGravy :)
18:04 RabidGravy I used to love the sending unix files to mainframe printer instant confetti gag
18:04 b2gills you can set an Epson Dot-Matrix printer to print out the hex code of what it recieves
18:05 flussence some HP printers do that too, great fun when you run nmap and aren't expecting it...
18:06 b2gills flussence: I did that about a month or 2 ago
18:07 b2gills I found out that the brand new printer has linux 2.4 on it
18:10 stmuk does it run an open mail relay too?
18:11 ollej left #perl6
18:13 RabidGravy :)
18:13 moritz stmuk: probably takes only a few days :-)
18:13 RabidGravy also the mandelbrot figure in postscript used to be fun
18:14 AndyDee joined #perl6
18:16 RabidGravy I'm sure also I've seen a web server written in postscript for HP printers
18:18 TimToady m: sub foo() { 1+1; 42 }  # this seems to be telling me that the optimizer is not running on routine bodies AT ALL
18:18 camelia rakudo-moar 7a1aeb: ( no output )
18:18 TimToady which is only, like, most of our code
18:18 lizmat joined #perl6
18:18 [Coke] nine: (deadlock, ulimit) that'd avoid the ulimit time check also?
18:18 RabidGravy oops
18:19 AlexDaniel m: macro circumfix:["<!--","-->"] ($text) is parsed / .*? / { "" }; <!-- $var = 1; -->; $var == 0;
18:19 camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0lkaYEj3KM␤Use of macros is experimental; please 'use experimental :macros'␤at /tmp/0lkaYEj3KM:1␤------> 3macro7⏏5 circumfix:["<!--","-->"] ($text) is par␤»
18:19 TimToady m: class Foo { method foo() { 1+1; 42 } }
18:19 camelia rakudo-moar 7a1aeb: ( no output )
18:19 AlexDaniel m: use experimental :macros; macro circumfix:["<!--","-->"] ($text) is parsed / .*? / { "" }; <!-- $var = 1; -->; $var == 0;
18:19 camelia rakudo-moar 7a1aeb: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
18:23 ab5tract .tell nine thanks for looking into it! "fix is just to abort precompilation if we encounter a dependency that we couldn't load from a precomp file". wouldn't that imply that 'no precompilation;' will bubble up from it's scope into anything which depends on it? i'm assuming not, but curious to know further. hope you enjoy(ed) the party!
18:23 yoleaux ab5tract: I'll pass your message to nine.
18:24 AlexDaniel m: multi sub circumfix:<‟ ⹂> { flip $^a }; say ‟‘hello world’⹂
18:24 camelia rakudo-moar 7a1aeb: OUTPUT«dlrow olleh␤»
18:24 AlexDaniel too bad you have to use another pair of quotes inside
18:24 AlexDaniel .u ‟⹂
18:24 yoleaux U+201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK [Pi] (‟)
18:24 cognominal I forgot the syntax of type for hashes with typed keys :(
18:24 AlexDaniel .u ⹂
18:24 yoleaux No characters found
18:25 jnthn m: class A::B { }; say A::B.WHAT; say A::B.WHO; # use .WHO for fully qualified
18:25 camelia rakudo-moar 7a1aeb: OUTPUT«(B)␤A::B␤»
18:25 ab5tract AlexDaniel: just need to wait for 'no strict;' ;)
18:25 AlexDaniel ab5tract: no, macros! I need macros! :)
18:25 ab5tract much better approach :)
18:26 regreg joined #perl6
18:27 cognominal subset Sha1 of Str where *.chars == 40 and m:i/<[A..Z 0..9]>/  #  say I want a hash which keys are Sha1
18:27 ab5tract TimToady: i'm feeling dense, but how does that example demonstate that?
18:28 cognominal better I want the key forced to lower cases :)
18:29 idiosyncrat_ left #perl6
18:29 RabidGravy cognominal, the gut feeling is that you might want to implement your own Associative class
18:29 AlexDaniel .u ’’‘
18:30 yoleaux U+2018 LEFT SINGLE QUOTATION MARK [Pi] (‘)
18:30 yoleaux U+2019 RIGHT SINGLE QUOTATION MARK [Pf] (’)
18:30 AlexDaniel .u ’
18:30 yoleaux U+2019 RIGHT SINGLE QUOTATION MARK [Pf] (’)
18:30 AlexDaniel .u ’
18:30 yoleaux U+2019 RIGHT SINGLE QUOTATION MARK [Pf] (’)
18:30 TimToady m: 1+1; 42
18:30 camelia rakudo-moar 7a1aeb: OUTPUT«WARNINGS:␤Useless use of "+" in expression "1+1" in sink context (line 1)␤Useless use of constant integer 42 in sink context (line 1)␤»
18:30 ab5tract cognominal: if you want to coerce them to lc, you would want to make your own class.
18:30 ab5tract otherwise subset LcHash where *.keys.grep($_ ~~ /'a'..'z'/)
18:30 TimToady the optimizer is what prints those messages
18:30 ab5tract TimToady: ah. that makes sense now!
18:30 jnthn m: subset Sha1 of Str where .chars == 40 and m:i/<[A..Z0..9]>/; my %h{Sha1}; %h<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> = 0;
18:30 camelia rakudo-moar 7a1aeb: ( no output )
18:30 TimToady so the optimizer is probably not even looking at the statements inside
18:30 jnthn m: subset Sha1 of Str where .chars == 40 and m:i/<[A..Z0..9]>/; my %h{Sha1}; %h<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> = 0;
18:30 camelia rakudo-moar 7a1aeb: OUTPUT«Type check failed in binding key; expected Sha1 but got Str␤  in block <unit> at /tmp/bOAvZFf0KV:1␤␤»
18:30 jnthn cognominal: ^^
18:31 jnthn For just checking
18:31 cognominal probably waht I want  https://github.com/perl6/specs/commit/5​24d26c4485a7f010e14f3828d12a1ee6aa522b3      my Mu %hash{Str(Any)};
18:31 TimToady tjere
18:31 cognominal I mean I need to adapt that
18:31 d^_^b .messages
18:31 ab5tract jnthn: ah! i did not realize that typed hashes had arrived :D
18:31 d^_^b hi
18:31 ab5tract cognominal: then what you do is write a class with a custom AT-KEY/ASSIGN-KEY
18:32 jnthn ab5tract: A year or two ago, I thought? :)
18:32 TimToady there's also a major disconnect in the optimizer between .sink and void context
18:32 ab5tract jnthn: i thought objec hashes only arrived a few months ago, but it makes sense that we could do type checking even with .WHICH keys
18:33 jnthn TimToady: Note https://rt.perl.org/Ticket/Display.html?id=125769 which implies we need some further fixes with regard to sink handling
18:34 cognominal ab5tract++ jnthn++
18:34 lizmat joined #perl6
18:34 leont joined #perl6
18:34 ab5tract m: class F { has %!h; method AT-KEY { %!h{ $^a.lc } }; method ASSIGN-KEY { %!h{ $^a.lc } = $^b } }; my $b = F.new; $b<FoO> = True; $b<foo>.say
18:34 camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/x5XLVdbRR_␤Placeholder variables cannot be used in a method␤at /tmp/x5XLVdbRR_:1␤------> 3class F { has %!h; method7⏏5 AT-KEY { %!h{ $^a.lc } }; method ASSIGN␤»
18:35 TimToady jnthn: okay, I'll sink a day into it :)
18:36 jnthn TimToady: If you fancy ;)
18:37 jnthn TimToady: I was thinking of actually doing something in Actions to mark sinks at routine level
18:37 jnthn TimToady: And force it for BEGINs or so
18:37 spider-mario joined #perl6
18:37 jnthn TimToady: Rather than emitting all the QAST::Want void nodes
18:37 TimToady that's what autosink is supposed to be doing, but I think it's incomplete
18:37 * timotimo has arrived at his destination
18:37 jnthn TimToady: Well, it leaves the "is it void" stuff to the lower level compiler
18:37 ab5tract m:  class F { has %!h; method AT-KEY(Str() $a) { %!h{$a.lc} }; method ASSIGN-KEY(Str() $a, $b) { %!h{$a.lc} = $b } }; my $b = F.new; $b<FoO> = now; $b<foo>.say
18:37 camelia rakudo-moar 7a1aeb: OUTPUT«Instant:1449859114.618935␤»
18:38 TimToady true
18:38 AlexDaniel .u ′
18:38 cognominal ab5tract, I think I got the idea :)
18:38 yoleaux U+2032 PRIME [Po] (′)
18:38 jnthn TimToady: But we may be better of fully handling it in Actions.
18:38 jnthn *off
18:38 ab5tract cognominal: :)
18:38 AlexDaniel m: my $x′
18:38 camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7xc4G648Z0␤Bogus postfix␤at /tmp/7xc4G648Z0:1␤------> 3my $x7⏏5′␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix␤        statement end␤  …»
18:38 TimToady jnthn: that's more like how P5 did it
18:38 TimToady *does* it :)
18:38 jnthn TimToady: 'cus the lower level compiler has a per-block view, and the bug is because we sink the result of a block
18:38 jnthn Even if the last statement was an unsinkable
18:39 ab5tract the Unsinkable Molly Block
18:41 TimToady so basically it's losing track of .ann('nosink') then...
18:41 timotimo jnthn: would it help to sprinkle debug output all over the hyper and race seq thingies?
18:41 dalek rakudo/nom: 3128db8 | jnthn++ | src/core/Failure.pm:
18:41 dalek rakudo/nom: fail should reliably die if outside of a routine.
18:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3128db83ae
18:42 dalek roast: 2de874c | jnthn++ | S04-exceptions/fail.t:
18:42 dalek roast: Tests for fail outside of a routine.
18:42 dalek roast: review: https://github.com/perl6/roast/commit/2de874c2a2
18:42 timotimo jnthn: i mean: would it help you if i did that
18:42 jnthn timotimo: Well, only if it leads you to fix it yourself :D
18:42 timotimo hah, OK
18:43 jnthn timotimo: My brane isn't quite up for parallelism bugs today
18:45 timotimo sure :)
18:45 timotimo i'll have a look anyway
18:46 lizmat joined #perl6
18:48 AlexDaniel I've seen 「’」 being used as apostrophe a lot. But it turns out that it is a quote… so in the end, the only true single quotation marks are 「‘’」 and the only true apostrophe is 「'」…
18:48 AlexDaniel well, you can also count 「‚」 if you want
18:48 AlexDaniel .u ‚
18:48 yoleaux U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
18:49 * TimToady is not terribly interesting in supporting identifiers of the form won’t-support
18:51 AlexDaniel TimToady: well, we have a macron acting as a minus…
18:51 TimToady that was an accident :)
18:52 TimToady unicode is definitely a slippery slope, and I don't mind stopping 10% of the way down...
18:53 AlexDaniel this accident is still there IIRC :)
18:53 AlexDaniel .u ʼ
18:53 yoleaux U+02BC MODIFIER LETTER APOSTROPHE [Lm] (ʼ)
18:53 AlexDaniel what is that
18:53 cognominal ab5tract,   next I need to declare my associative Sha1 type as a container or something like that so I can use the % sigil.   instead, my Sha1 %h  declares the type of the hash values
18:53 cognominal not sure if it is implemented and what is the syntax
18:54 AlexDaniel every time I see “MODIFIER LETTER” thing in unicode I'm just so confused
18:54 ab5tract cognominal: this is true. i've just accepted treating them as scalars
18:54 ab5tract it helps to keep them clear as objects, but i can also see arguments for wanting them to looke like hashes when they act like hashes.
18:54 cognominal ab5tract, which is already quite good :)
18:54 AlexDaniel what are these “modifier” things?
18:55 TimToady m: constant weʼll-support = 42; say weʼll-support
18:55 camelia rakudo-moar 3128db: OUTPUT«42␤»
18:55 TimToady they are officially letters
18:56 TimToady m: say 'ʼ'.uniprop
18:56 camelia rakudo-moar 3128db: OUTPUT«Lm␤»
18:56 TimToady m: say $aʼ = 42; say $aʼ
18:56 camelia rakudo-moar 3128db: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HvscABsPRK␤Variable '$aʼ' is not declared␤at /tmp/HvscABsPRK:1␤------> 3say 7⏏5$aʼ = 42; say $aʼ␤»
18:56 TimToady m: my $aʼ = 42; say $aʼ
18:56 camelia rakudo-moar 3128db: OUTPUT«42␤»
18:57 dalek rakudo/nom: f4a52c7 | jnthn++ | / (3 files):
18:57 dalek rakudo/nom: Move sub-byte native int types to experimental.
18:57 dalek rakudo/nom:
18:57 dalek rakudo/nom: We don't handle them anywhere at all yet, so better avoid confusion by
18:57 dalek rakudo/nom: simply not including them in 6.c.
18:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f4a52c7026
18:57 ab5tract cognominal: mind if i see a paste?
18:57 dalek roast: 80ba7dc | jnthn++ | S02-types/WHICH.t:
18:57 dalek roast: Sub-byte native int types gone from 6.c.
18:57 dalek roast: review: https://github.com/perl6/roast/commit/80ba7dc9f1
18:57 lucs In some grammar, given  token Foo { ... <{ say ? }> }  , what can I put at ? to obtain 'Foo'?
18:57 TimToady m: my $aʹ = 42; say $aʹ
18:57 camelia rakudo-moar 3128db: OUTPUT«42␤»
18:57 TimToady or that, if you want a real PRIME
18:57 ab5tract bam!
18:57 cognominal m: class A is Associative {}; my %h is A
18:57 camelia rakudo-moar 3128db: ( no output )
18:57 TimToady .u ʹ
18:57 yoleaux U+02B9 MODIFIER LETTER PRIME [Lm] (ʹ)
18:58 awwaiid haha
18:58 lizmat joined #perl6
18:58 jnthn m: say uniprop(0x2B9, 'Canonical_Combining_order')
18:58 camelia rakudo-moar 3128db: OUTPUT«0␤»
18:58 jnthn m: say '$aʹ'.chars
18:58 camelia rakudo-moar 3128db: OUTPUT«3␤»
18:58 lizmat jnthn: seems like whenever doesn't handle signal supplies (well): https://gist.github.com/li​zmat/04ed058084945a5c1e4b
18:59 TimToady yeah, they're just funny looking letters, not combiners
18:59 ab5tract cognominal: i'm not sure what the advantages are to using 'is Associative' vs doing it via AT-KEY/ASSIGN-KEY
18:59 domidumont joined #perl6
19:00 jnthn lizmat: Odd, just tried it here and it worked and said goodbye
19:00 lizmat well, maybe on Win  :-)
19:00 ab5tract but i've always used the latter approach. it won't give the you the %h semantics, but you can mutate/validate the keys you receive in a granular manner
19:00 AlexDaniel let's say I have a blog post and I need an apostrophe there. Should I use 「'」, 「’」 or 「ʼ」? 「'」 kinda makes sense, but it does not look pretty. 「’」 is a quote, it's not an apostrophe. 「ʼ」 is a letter all by itself, but does it fit? What if some search engine stumbles upon it, what is it going to think?
19:01 lizmat jnthn: rakudobuggable ?
19:01 jnthn lizmat: Yeah, but if it's "maybe on Win" then whether you use whenever shouldn't matter...can you also get it without that?
19:01 cognominal ab5tract, it would be an executable documentation thing stating my intentation
19:01 cognominal * intention
19:02 awwaiid TimToady: I still think we should step back up the slope a bit and make ' in identifiers not-special, unlike '-'; then let people put primes or whatever in if they must. I still haven't seen any useful single-quote-in-identifier examples, though I start off from a biased place I suppose :)
19:02 cognominal m: say ('a' ~~ /$<a>=a/) ~~ Associative
19:02 camelia rakudo-moar 3128db: OUTPUT«False␤»
19:02 flussence m: my \ꓼ = 45; say ꓼ
19:02 camelia rakudo-moar 3128db: OUTPUT«45␤»
19:03 ab5tract if you want a hash where the only keys can be Sha1, then i would use the style in jnthn's example by declaring a Sha1 subset. note that you can also combine both jnthn and my's examples by declaring the internal class hash like 'has %!h{Sha1}'. then have the AT-KEY/ASSIGN-KEY subs create and/or validate the Sha1's before inserting or accessing the hash
19:03 cognominal ab5tract: note that the core does care much, Match is associative but does not bother to claim it. Bad, as pedagoy goes.
19:03 cognominal * does not care
19:04 TimToady m: constant ʽhahaʹ = ‘hoho’; say ʽhahaʹ; say ‘hoho’;
19:04 camelia rakudo-moar 3128db: OUTPUT«hoho␤hoho␤»
19:04 TimToady awwaiid: no, ' stays
19:05 TimToady it's too useful for contractions
19:05 flussence methinks maybe there's a case there for syntax highlighters to paint all non-latin1 things a funny colour. Not just in perl6, too.
19:05 awwaiid ok, I'll stop bothering us about it :)
19:06 awwaiid (thanks TimToady, I like/appreciate having that confirmation)
19:06 TimToady you're welcome, and thanks for being a person who can let something go :)
19:07 ab5tract cognominal: you lost me a bit there. 'the core does not care'. which core?
19:07 ab5tract oh, sorry, i understood as soon as i declared i didn't
19:08 AlexDaniel m: say +((0..0x1FFFF ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ }) ==> map { .chr })
19:08 camelia rakudo-moar 3128db: OUTPUT«220␤»
19:08 ab5tract AlexDaniel++
19:08 lizmat joined #perl6
19:08 lizmat jnthn: signal(SIGINT).tap: { say "goodbye"; exit }   followed by either sleep 20 or loop {}
19:08 ab5tract i had almost forgotten about feeds! :)
19:08 lizmat works fine
19:09 lizmat as in: it says goodbye
19:10 dalek roast: 98bdc2d | jnthn++ | S06-signature/definite-return.t:
19:10 dalek roast: Test pointy blocks with definite returns.
19:10 dalek roast:
19:10 dalek roast: Already worked, but didn't see any tests for it.
19:10 dalek roast: review: https://github.com/perl6/roast/commit/98bdc2da3f
19:10 jnthn lizmat: Odd
19:10 lizmat that was my thinking as well  :-)
19:12 cognominal ab5tract, https://gist.github.com/cogn​ominal/3aed2e52f2cecce1d653  # apparently the casting is ignored :(
19:12 timotimo jnthn: can you explain why we setelems($!output, 0) in HyperWorkBuffer.swap?
19:12 flussence m: say +(^0x20000).grep(*.unimatch(‘Lm’)).map(&chr) # bit shorter
19:12 camelia rakudo-moar f4a52c: OUTPUT«248␤»
19:12 grondilu_ joined #perl6
19:12 flussence (but includes symbols too)
19:13 ab5tract cognominal: i haven't tackled these coercion types at all
19:13 flussence m: say (^0x20000).grep(*.unimatch(‘Lm’)) (-) (0..0x1FFFF ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ })
19:13 grondilu_ joined #perl6
19:13 jnthn timotimo: swap is used when we want to exhcnage input/output buffers to allow re-use of the same mbuffers
19:13 camelia rakudo-moar f4a52c: OUTPUT«set(8338, 92993, 12347, 711, 94104, 1765, 7528, 12340, 94101, 8319, 3782, 8343, 12341, 42232, 94111, 8336, 884, 94103, 12338, 8305, 2036, 7293, 12446, 7523, 12445, 43764, 7290, 12339, 8339, 43471, 1600, 92995, 2417, 12542, 94105, 3654, 7522, 7527, 7529, 94…»
19:13 jnthn *buffers
19:13 jnthn To avoid reallocations
19:14 ab5tract cognominal: also not sure about ($_) as subroutine signature..
19:14 flussence m: say ((^0x20000).grep(*.unimatch(‘Lm’)) (-) (0..0x1FFFF ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ })).map(&chr)
19:14 * ab5tract forks the gist :)
19:14 camelia rakudo-moar f4a52c: OUTPUT«Cannot call chr(Pair); none of these signatures match:␤    (Int:D \x --> Str:D)␤    (Cool \x --> Str:D)␤    (int $x --> str)␤  in block <unit> at /tmp/Uf2G6AB5KJ:1␤␤»
19:14 jnthn m: use Test; throws-like '(-> --> Int { |(1,2,3) })()', X::TypeCheck::Return;
19:14 camelia rakudo-moar f4a52c: OUTPUT«    1..2␤    not ok 1 - '(-> --> Int { |(1,2,3) })()' died␤    ␤# Failed test ''(-> --> Int { |(1,2,3) })()' died'␤# at /tmp/FRHziL4Rwx line 1␤    ok 2 - # SKIP Code did not die, can not check exception␤    # Looks like you failed 1 test of 2…»
19:14 ab5tract cognominal: is that to allow the .lc there?
19:15 AlexDaniel flussence: just ==> map(&chr)
19:15 ab5tract that's a neat trick :)
19:15 TimToady why not just ».chr ?
19:15 ab5tract cognominal: does it wqork with just %!h{Sha1} ?
19:15 timotimo jnthn: well, at least for the .map(*.say) case we're swapping before we're running the *.say, which makes both buffers be 0 items big
19:15 dalek rakudo/nom: 6d7c65d | jnthn++ | src/Perl6/Actions.nqp:
19:15 dalek rakudo/nom: Enforce return types in pointy block sigs.
19:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d7c65dc22
19:15 mohae joined #perl6
19:15 jnthn timotimo: ugh, that's not right
19:16 jnthn We were meant to only swap in multi-stage pipelines
19:16 timotimo right, so something has to return Mu, but doesn't
19:16 timotimo in its process-buffer method
19:16 cognominal m: my %h{Int(Str)}; %h<10> = 4
19:16 timotimo ah, well, Iterable.pm has the process-buffer method that uses --> Nil
19:16 camelia rakudo-moar f4a52c: OUTPUT«Type check failed in binding key; expected Int(Str) but got IntStr␤  in block <unit> at /tmp/XC9rm1PFD9:1␤␤»
19:16 dalek roast: 0c6958a | jnthn++ | S04-blocks-and-statements/pointy.t:
19:16 dalek roast: Test covering RT #126232.
19:16 dalek roast: review: https://github.com/perl6/roast/commit/0c6958a565
19:16 AlexDaniel TimToady: indeed
19:16 jnthn timotimo: d'oh
19:17 jnthn timotimo: I wonder if TimToady went and messed that up when reviewing what things return.
19:17 timotimo maybe that's the solution
19:17 ab5tract cognominal: also, neat trick with the 'is Sha1h' !
19:17 jnthn That'd explain why it broke.
19:17 timotimo hm. though --> Mu isn't the same as --> Nil
19:17 timotimo because it's not definite return
19:17 daxim lizmat, pong
19:17 cognominal m: sub a(Int(Str)$a) { say $a.WHAT } ; a '10'
19:17 camelia rakudo-moar f4a52c: OUTPUT«(Int)␤»
19:18 timotimo so i'll put Mu in the block
19:18 ab5tract cognominal: just drop the type coercions :)
19:18 jnthn timotimo: oh, you're right
19:18 jnthn timotimo: Yeah, or change the calling code to look for Nil
19:18 ab5tract m: sub a(Int()$a) { say $a.WHAT } ; a '10'
19:18 camelia rakudo-moar f4a52c: OUTPUT«(Int)␤»
19:18 cognominal ab5tract: I know, I try to use every possible feature :)
19:19 timotimo jnthn: that's an API design decision, so i'd leave it up to you
19:19 lucs (repeat, sorry) In some grammar, given  token Foo { ... <{ say ? }> }  , what can I put at ? to obtain 'Foo'?
19:19 ab5tract cognominal: the thing is, coercion syntax covers cases where there is an eplicit coercion sub defined on the class
19:19 timotimo jnthn: that makes it work \o/
19:19 jnthn \o/
19:20 timotimo not all of my tests
19:20 jnthn I only really implemented .race
19:20 jnthn I didn't do the re-ordering for .hyper
19:20 cognominal ab5stract, the coercion is on the elements not on the hash itself
19:21 ab5tract i've got an example gist coming up :)
19:21 jnthn Good news for the superstitious: we're now down to 12 xmas RTs ;)
19:21 cognominal If it works on subs parameter, it should on hash declaration
19:21 [Coke] looks like the go user is hung on hack running spectest on integration/advent2013-day14.t
19:21 jnthn lucs: &?ROUTINE.name maybe
19:21 lucs jnthn: Okay, thanks, will look that up.
19:21 curious_ joined #perl6
19:22 jnthn cognominal: Coercion types are only implemented for parameters
19:22 jnthn (We'll broaden it in a future Perl 6)
19:22 AlexDaniel m: "my @x = (0..0x1F ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ })».chr; my $x = 25
19:22 camelia rakudo-moar f4a52c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GaQNcUeDSP␤Variable '$x' is not declared␤at /tmp/GaQNcUeDSP:1␤------> 3ame ~~ m/‘MODIFIER LETTER’/ })».chr; my 7⏏5$x = 25␤»
19:22 AlexDaniel what is going on?
19:23 cognominal jnthn++, good to know
19:23 AlexDaniel m: my @a = (0..0x1F); my $x = 25
19:23 camelia rakudo-moar f4a52c: ( no output )
19:23 jnthn People pasting stray quotes to camelia, that's what. :P
19:23 lucs jnthn: And good luck with the 12 RTs of Christmas :)
19:23 AlexDaniel ahh
19:23 AlexDaniel m: my @x = (0..0x1F ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ })».chr; my $x = 25
19:23 camelia rakudo-moar f4a52c: ( no output )
19:23 AlexDaniel indeed :D
19:23 jnthn ;)
19:23 dalek perl6-roast-data: 7c49da3 | coke++ | bin/doit:
19:23 dalek perl6-roast-data: Don't run (slow, hanging) JVM backends for now
19:23 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/7c49da37a0
19:23 dalek perl6-roast-data: 085928f | coke++ | / (7 files):
19:23 dalek perl6-roast-data: today (automated commit)
19:23 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/085928fff0
19:24 curious_ hey all, just curious if anyone is going to update the perl6.org homepage to say "OMG Perl 6.0.0 will be released on Dec 25"
19:24 captain-adequate Great idea
19:25 curious_ as someone who only checks in on perl 6 every once in a while, it was actually hard to find any confirmation of that
19:25 [Coke] still getting MOAR failures on stresstest runs.
19:25 [Coke] (running on hack.p6c.org)
19:25 cognominal indeed the Int(str) in %h{Int(Str)} is parsed as an EXPR
19:26 cognominal ...while it is parsed as an type_constraint for a parameter
19:26 [Coke] 537 test failures on moar-no-jit, 539 failures on moar-jit
19:26 [Coke] Is no one else seeing this?
19:26 cognominal * type_constraint
19:27 bartolin_ [Coke]: http://irclog.perlgeek.de/p​erl6/2015-12-11#i_11696671 and http://irclog.perlgeek.de/p​erl6/2015-12-11#i_11696955
19:27 bartolin_ [Coke]: I guess, you see those, too?
19:30 AlexDaniel .u ˽
19:30 yoleaux U+02FD MODIFIER LETTER SHELF [Sk] (˽)
19:30 AlexDaniel .u ᶥ
19:30 yoleaux U+1DA5 MODIFIER LETTER SMALL IOTA [Lm] (ᶥ)
19:31 ab5tract cognominal: weird.. i was sure that this approach would work :(  https://gist.github.com/ab5​tract/20c489d20f289af31533
19:31 * grondilu watched https://www.youtube.com/watch?v=5r6yzFEXajQ and was convinced to give emacs an other try after a few years
19:32 ab5tract hmmm.. if %!h{T} declares that keys must be of type T, can you declare a hash such that all *values* must be of a single type?
19:32 jnthn Same with arrays
19:32 jnthn has ValueType %!h{KeyType} # if you want both
19:33 ab5tract gotcha
19:33 ab5tract okay, documenting this now :)
19:33 sergot m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a.push: @b; say @a.perl;
19:33 camelia rakudo-moar 6d7c65: OUTPUT«[1, 2, 3, [4, 5, 6]]␤»
19:34 timotimo jnthn: hyper + grep seems broken still, but hyaper + map works - even two-stage
19:34 sergot hmm, how can I push this array and still have @a flat?
19:34 timotimo you need to use .append
19:34 AlexDaniel m: my @weirdos = (0..0x1FFFF).grep(*.unimatch(‘Lm’))».chr; sub x { @weirdos.pick(6).join(‘’) }; my ($a, $b, $c) = (x, x, x); say “constant $a = 15; constant $b = 16; constant $c = 23; say $a + $b + $c”
19:34 camelia rakudo-moar 6d7c65: OUTPUT«constant ᶠᵁᶫᶝꭞₜ = 15; constant ՙᶽᶢᵈᶼˏ = 16; constant ᶿᵃₖᵊᴴՙ = 23; say ᶠᵁᶫᶝꭞₜ + ՙᶽᶢᵈᶼˏ + ᶿᵃₖᵊᴴՙ␤»
19:35 sergot oh, I missed that one, timotimo++ thanks a lot!
19:35 timotimo :)
19:35 AlexDaniel m: constant ᶠᵁᶫᶝꭞₜ = 15; constant ՙᶽᶢᵈᶼˏ = 16; constant ᶿᵃₖᵊᴴՙ = 23; say ᶠᵁᶫᶝꭞₜ + ՙᶽᶢᵈᶼˏ + ᶿᵃₖᵊᴴՙ
19:35 camelia rakudo-moar 6d7c65: OUTPUT«54␤»
19:35 sergot m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a.append: @b; say @a.perl;
19:35 camelia rakudo-moar 6d7c65: OUTPUT«[1, 2, 3, 4, 5, 6]␤»
19:35 sergot works timotimo++
19:35 timotimo sergot: it seems to me you had been off #perl6 for a while
19:35 pyrimidine joined #perl6
19:35 cognominal ab5tract, as jhntn said, coercion is not supported in hash declaration
19:35 sergot timotimo: yes, unfortunately this is true :(
19:36 timotimo it's okay
19:36 timotimo it's nice to see you back here :)
19:36 [Coke] S17-supply/syntax.t has been unreliable for ages.
19:36 timotimo if you've been away for a while, there's lots of great stuff for you to discover
19:36 sergot timotimo: I wish I could spend more time on p6
19:37 [Coke] reduce is one of the failing test files, yes.
19:37 timotimo dalek has been gone for a while now
19:37 bartolin_ [Coke]: true, but the current failure mode seems new to me. (I could be wrong on this, though)
19:37 sergot I have this tho: http://imgur.com/WYhxKWF hehe :)))
19:38 sergot it makes me p6 developer... right? hehe :))
19:38 timotimo https://github.com/rakudo/rakudo/commit/​a61bbddc005d0188e2409a9ef8feee0c9551ab08  -  i committed this, which fixes .hyper.map
19:38 AlexDaniel m: say join ‘’, (0..0x1FFFF).grep(*.unimatch(‘Lm’))».chr
19:38 camelia rakudo-moar 6d7c65: OUTPUT«ʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁˆˇˈˉˊˋˌˍˎˏːˑ​ˠˡˢˣˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨॱๆໆჼៗᡃᪧᱸᱹᱺᱻᱼᱽᴬᴭᴮᴯᴰ​ᴱᴲᴳᴴᴵᴶᴷᴸᴹᴺᴻᴼᴽᴾᴿᵀᵁᵂᵃᵄᵅᵆᵇᵈᵉᵊᵋᵌᵍᵎᵏᵐᵑ…»
19:39 ab5tract http://doc.perl6.org/type/Hash
19:39 AlexDaniel .u ៗ
19:39 yoleaux U+17D7 KHMER SIGN LEK TOO [Lm] (ៗ)
19:39 AlexDaniel m: constant ៗ = 42; say ៗ
19:39 camelia rakudo-moar 6d7c65: OUTPUT«42␤»
19:39 ab5tract cognominal: oops, missed that while i was off carving that example :)
19:40 timotimo jnthn: i'ven't yet found the code that lets a non-hyper seq like Grepper grab the results of a HyperSeq
19:40 AlexDaniel m: my $xₙ = 25; say $xₙ
19:40 camelia rakudo-moar 6d7c65: OUTPUT«25␤»
19:40 timotimo jnthn: i expect there's a problem with that, otherwise i don't understand why hyper.map.grep doesn't work right
19:41 AlexDaniel .u ᱹ ꓺ
19:41 yoleaux U+0020 SPACE [Zs] ( )
19:41 yoleaux U+1C79 OL CHIKI GAAHLAA TTUDDAAG [Lm] (ᱹ)
19:41 yoleaux U+A4FA LISU LETTER TONE MYA CYA [Lm] (ꓺ)
19:41 sergot m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a = @a, @b; say @a.perl;
19:41 camelia rakudo-moar 6d7c65: OUTPUT«(my \Array_50621312 = [Array_50621312, [4, 5, 6]])␤»
19:41 jnthn timotimo: .iterator on a HyperSeq will give a serial iterator
19:42 sergot m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a = @a[0 ..1], @b; say @a.perl;
19:42 camelia rakudo-moar 6d7c65: OUTPUT«[(1, 2), [4, 5, 6]]␤»
19:42 ab5tract the object you pass to Sha1(Str) should still technically 'is Str' and have a method named 'Sha1'
19:42 cognominal ab5tract:  I will go with https://gist.github.com/cogn​ominal/3aed2e52f2cecce1d653  :)
19:42 sergot timotimo: how can I make this to be flat?
19:42 ab5tract *technically need to be
19:42 AlexDaniel sergot: https://rt.perl.org/Public/​Bug/Display.html?id=126858
19:43 sergot AlexDaniel: thanks
19:43 * ab5tract botched that grammatical revision
19:43 AlexDaniel sergot: it's recursive, there is no way to make it flat. Whoops. It is probably a bug
19:43 sergot :(
19:43 sergot it would make so many codes look easier
19:44 sergot I've just found this in my old code and this  doesn't work anymore, that's why I'm asking
19:44 AlexDaniel m: my $x = $x
19:44 camelia rakudo-moar 6d7c65: OUTPUT«5===SORRY!5=== Error while compiling /tmp/glf6AiNUhx␤Cannot use variable $x in declaration to initialize itself␤at /tmp/glf6AiNUhx:1␤------> 3my $x = $7⏏5x␤    expecting any of:␤        term␤»
19:44 AlexDaniel m: my @a = @a, 5
19:44 camelia rakudo-moar 6d7c65: OUTPUT«5===SORRY!5=== Error while compiling /tmp/B7a8wkwIDV␤Cannot use variable @a in declaration to initialize itself␤at /tmp/B7a8wkwIDV:1␤------> 3my @a = @7⏏5a, 5␤    expecting any of:␤        term␤»
19:44 AlexDaniel sergot: it seems like it should not be allowed at all
19:45 retupmoca m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a = |@a, |@b; say @a.perl;
19:45 camelia rakudo-moar 6d7c65: OUTPUT«[1, 2, 3, 4, 5, 6]␤»
19:45 sergot AlexDaniel: right
19:45 sergot retupmoca: oh, I could also think about this, silly me
19:45 jnthn m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a = flat @a[0 ..1], @b; say @a.perl;
19:45 camelia rakudo-moar 6d7c65: OUTPUT«[1, 2, 4, 5, 6]␤»
19:45 sergot retupmoca++ thanks
19:45 sergot ohh, and this one, jnthn++ thanks
19:46 AlexDaniel sergot: oh well, I thought that you wanted to have recursive array :)
19:46 ab5tract cognominal: looks good to me :)    note that %!h{Sha1} is another approach which would have the same effect wrt to assignment failure with a non Sha1 key. then you get you keep the terseness of your $_ sub sigs :)
19:46 AlexDaniel sergot: because if not, then why not @a.append(@b)?
19:47 AlexDaniel m: my @a = 2,3; my @b = 4,5; @a.append(@b); say @a
19:47 camelia rakudo-moar 6d7c65: OUTPUT«[2 3 4 5]␤»
19:48 mohae joined #perl6
19:48 sergot AlexDaniel: I had something like this: @a = @a[without_some_elements], $and-a-new-element here; this looks just better for me than @a = @a[range]; @a.append: $a-new-element; :)
19:48 ab5tract http://doc.perl6.org/type/Hash ... mentions Parcel :O
19:48 jnthn dinner &
19:48 AlexDaniel sergot: indeed
19:48 awwaiid we kill all Parcel, ya?
19:49 sergot oh, and btw, do you know anything about those weird warning like "Use of uninitialized value %ENV of type Any in string context" every first time I run a program?
19:50 AlexDaniel m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a = |(@a, @b); say @a.perl
19:50 camelia rakudo-moar 6d7c65: OUTPUT«(my \Array_61266832 = [Array_61266832, [4, 5, 6]])␤»
19:50 awwaiid ab5tract: I opened https://github.com/perl6/doc/issues/237
19:50 ab5tract awwaiid: no worries i am updating it now
19:50 * grondilu actually gave a wrong link earlier:  https://www.youtube.com/watch?v=JWD1Fpdd4Pc
19:50 sergot AlexDaniel++: this also works, thanks
19:51 AlexDaniel sergot: wait, it doesn't
19:51 TimToady m: (1,2).sink
19:51 camelia rakudo-moar a61bbd: ( no output )
19:52 vytas joined #perl6
19:52 sergot I get those weird errors every first run of a program:
19:52 sergot https://gist.github.com/se​rgot/56d54f782d1210ac6203
19:52 sergot any ideas?
19:53 ab5tract sergot: known bug.
19:53 sergot ab5tract++: ok, thanks :)
19:53 ab5tract apparently harmless, and i'm sure it will get squashed soon
19:53 sergot great :)
19:54 cognominal ab5tract: yea
19:54 ab5tract "Wrapping the C<for> loop's input in parentheses is not normally necessary when the input is a C<List>."
19:54 ab5tract is this ever necessary?
19:55 ab5tract the only time i can think of using () in an argument to for is when i want to run a method on the output of an expression
19:56 TimToady well, then technically it's an argument to the method, not to the for
19:56 ab5tract exactly
19:56 ab5tract TimToady: revising some old documentation and that part looked suspicious :)
19:57 TimToady for (lines) {} though
19:57 TimToady equivalent to for lines() {}
19:57 ab5tract hmm. right. that's a tricky part of examples in perl 6 :)
19:57 TimToady the error is intentionally ambiguous that way
19:57 TimToady m: for lines {}
19:57 camelia rakudo-moar a61bbd: OUTPUT«5===SORRY!5===␤Function 'lines' needs parens to avoid gobbling block␤at /tmp/sZzHcnwVbu:1␤------> 3for lines {}7⏏5<EOL>␤Missing block (apparently claimed by 'lines')␤at /tmp/sZzHcnwVbu:1␤------> 3for lines {}7⏏5<EOL>␤␤»
19:57 ab5tract and part of what made the learnathon so successful
19:57 znpy joined #perl6
19:58 ab5tract it's very natural for one example to lead to several topics at once :)
19:59 TimToady .oO(Choose Your Own Adventure)
20:02 timotimo jnthn: with enough values in the source, hyper can deadlock ...
20:05 nige1 joined #perl6
20:06 ab5tract TimToady: it does make linear topic documentation a bit tricky though :)
20:09 brrt joined #perl6
20:10 * brrt backlogging
20:10 brrt i thought we had a strategy for stopping trolling about camelia... we might need to dig that up again
20:11 TimToady m: (1,2).sink
20:11 camelia rakudo-moar 04791b: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 2 in sink context (line 1)␤»
20:12 JPGainsborough joined #perl6
20:13 ajs__ joined #perl6
20:14 ab5tract http://doc.perl6.org/routine/%3D%3D%3D <--- calls === the "value identity", which i have to say is not all that descriptive to me of the form of equivalence === provides
20:14 ab5tract i would call it the identity equivalence or something
20:15 ab5tract not sure if this was bikeshedded long ago, so i apoligize if i open new wounds
20:15 sergot retupmoca: may I have a question about your Text::Markdown module?
20:15 TimToady it's object identity if you stipulate that immutable objects give the same identity to identical values
20:16 TimToady underneath, it's really .WHICH identity
20:16 ab5tract TimToady: ah, i see the ambiguity there
20:16 TimToady m: say 42.WHICH === 42.WHICH
20:16 camelia rakudo-moar 04791b: OUTPUT«True␤»
20:17 TimToady m: say [42].WHICH === [42].WHICH
20:17 camelia rakudo-moar 04791b: OUTPUT«False␤»
20:17 ab5tract yeah, discussing WHICH in the context of object hashes (background)
20:17 retupmoca sergot: sure
20:17 TimToady There is only one 42!!!
20:17 retupmoca sergot: just remember I don't consider it particularly "good" - just slightly better than the old one
20:17 ab5tract which use WHICH except unless object hashes, right?
20:17 ab5tract m: say 42 xx 2; :)
20:17 camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MbghCeg42k␤Bogus statement␤at /tmp/MbghCeg42k:1␤------> 3say 42 xx 2; :7⏏5)␤    expecting any of:␤        colon pair␤»
20:17 ab5tract m: say 42 xx 2; #:)
20:17 camelia rakudo-moar 04791b: OUTPUT«(42 42)␤»
20:18 TimToady #:) looks like Moe
20:18 sergot retupmoca: does it support nested markups, like ***something***? or **_sth_** ?
20:18 ab5tract ie we build the lookup hash value from the WHICH value?
20:19 TimToady object hashes are supposed to have that built-in, but we fake it for now
20:19 retupmoca sergot: I'm not sure, actually - it looks like I stole that bit from masak
20:20 ab5tract TimToady: oh, ok so we use WHICH only in the context of object hashes?
20:20 lizmat joined #perl6
20:20 ab5tract sorry to be dense, just aiming for accuracy in the docs
20:20 retupmoca sergot: if you're OK with a C library, you might check out Text::Markdown::Discount
20:20 retupmoca sergot: I'd bet it's a lot more correct than mine
20:21 sergot retupmoca: oh, I just made masak/sambal work with your :))
20:21 ab5tract ok, so i think i have it. object hashes use WHICH for now, and non-object hashes just call .Str
20:22 retupmoca sergot: well, if it doesn't seem to support nested things, feel free to open a github issue and/or PR
20:22 retupmoca sergot: I'm still chasing CURLI changes right now, but I'll get to it eventually if noone else does :)
20:22 sergot retupmoca: looks so, I will try to make it :)
20:23 sergot retupmoca: it also looks like we can't use ::Discount, because we have no access to the DOM, but I'm not sure.
20:26 adhoc joined #perl6
20:27 ab5tract TimToady: one last question, I promise :)
20:28 ab5tract m: my %h := :{ (now) => (now) }; %h.kv>>.say
20:28 camelia rakudo-moar 04791b: OUTPUT«Instant:1449865732.5682​62␤Instant:1449865732.570702␤»
20:28 stmuk has anyone tried building on a RPI2 recently?
20:28 sergot retupmoca: thanks for help!
20:28 ab5tract this kind of "assignment" object hash creation requires the binding
20:29 ab5tract but the 'my %h{Any}' approach does not
20:29 retupmoca sergot: you're welcome :)
20:30 RabidGravy stmuk, aboout a week ago
20:32 stmuk RabidGravy: how long does it take roughly?
20:32 RabidGravy hour or so
20:32 RabidGravy let's see
20:32 lizmat_ joined #perl6
20:33 lizmat_ ab5tract: because otherwise you would be assigning an object hash to a normal hash
20:33 ab5tract lizmat_: it makes perfect sense to me
20:34 jnthn Note that we need binding a little less often now
20:34 ab5tract you cannot assign such an absolute RHS
20:34 RabidGravy stmuk, just kicking it off
20:34 jnthn m: my %b is BagHash; say %b.WHAT
20:34 camelia rakudo-moar 04791b: OUTPUT«(BagHash)␤»
20:34 jnthn Don't need it for those cases, can use is :)
20:35 ab5tract to me the binding requirement read like "you can't just assign a hash of objects!"
20:35 ab5tract *reads
20:35 woolfy joined #perl6
20:36 ab5tract jnthn++ ; # this is a fantastic thing!
20:36 ab5tract i made note of that earlier while working with cognomial
20:36 jnthn ab5tract: I tend to think of assignment as a copying operation
20:37 jnthn ab5tract: That is, take the things on the right and copy them into the thing on the left
20:37 lizmat_ [Coke]: this is my spectest status as of just now: https://gist.github.com/li​zmat/14213d547714300f08bf
20:37 jnthn That is, it's an operation *on* the thing on the left, not a repalcement of it.
20:37 ab5tract jnthn: agreed. which is why the binding requirement for an object hash declare-"assign" statement makes sense to me as a bind
20:37 jnthn Right :)
20:38 ab5tract there's a balance there, where the language is explaining to you that it cannot give you both the precise version of the object *and* assign it at the same time
20:38 lizmat jnthn: t/spec/S07-hyperrace/hyper.t and t/spec/S07-hyperrace/race.t pass for me, should they be unfudged ?
20:38 ab5tract *assign it to something else
20:38 jnthn lizmat: I'd ask timotimo++ :)
20:39 jnthn But forgiveness > permission
20:40 muraiki joined #perl6
20:42 * stmuk wonders if liz is IRCing from the "Sports Bar"
20:42 lizmat_ joined #perl6
20:43 lizmat_ stmuk: no, from our room at the Holiday Inn, Regent's Park
20:43 lizmat_ but the wifi sucks, so I'm thethering from 3G, but that looks to be flaky as well  :-(
20:44 stmuk ah
20:44 * lizmat_ takes out the USB extension cord and puts the phone in the window sill
20:46 jnthn ...maybe try dangling it out the window next? :)
20:47 lizmat_ yeah, tried that before, but not when on the 5th floor  :-)
20:48 diakopter oh I've stayed there
20:50 moritz masak: let me remind you that you have a p6 advent slot tomorrow
20:50 RabidGravy totally off-topic but is there a thing, possibly USB, where you can get i2c (or twi) interface from a standard PC without the intervention of a arduino or RPi?
20:51 moritz RabidGravy: something like http://www.robot-electronics​.co.uk/htm/usb_i2c_tech.htm?
20:52 masak moritz: thanks -- haven't forgotten ;)
20:52 moritz RabidGravy: first google hit for "usb to i2c"
20:52 timotimo lizmat: there are a few passes on my end, too. but also a few failures
20:53 moritz https://www.sparkfun.com/products/9903
20:53 stmuk https://www.adafruit.com/products/2264
21:01 masak I think I will advent blog about http://irclog.perlgeek.de/p​erl6/2015-11-30#i_11626659
21:01 RabidGravy chhers, I must be going stupid as I'm sure I googled it before
21:04 lizmat joined #perl6
21:04 stmuk I thought I saw a way ages back of just sticking two wires in a PC port and using that but I may have been mistaken
21:05 stmuk or maybe the port was some old legacy one
21:05 RabidGravy stmuk, when it does "Stage parse      : 544.028"  you know it's going to take ages
21:05 stmuk :D
21:06 timotimo masak: oh, "when"/"default"? will that include a lot of smart matching stuff? or just the "succeed/proceed" business?
21:06 stmuk probably an hour I'd guess then
21:06 geekosaur how many pcs have parallel ports any more?
21:06 RabidGravy stmuk, yeah it may work with any ttl level interface, rs232, parallel etc
21:07 timotimo lizmat: do all tests of hyper.t and race.t actually succeed for you?
21:07 geekosaur (the ones I recall all used the parallel port, the cheap version indeed being stuff a couple wires into the right pins and then send data to or read from the parallel port device)
21:07 cygx joined #perl6
21:08 geekosaur (this being a time when people still used modems but printers were already USB)
21:08 geekosaur (plus the parallel port voltages are more amenable to quick hacks like that)
21:09 geekosaur the problem with rs232 being that voltages are relative
21:09 cygx .tell hoelzro you left a message a while ago about Native::LibC not picking out the correct MS CRT - the v2 branch https://github.com/cygx/p6-native-libc/tree/v2 does so, among other things, but it hasn't been tested
21:09 yoleaux cygx: I'll pass your message to hoelzro.
21:09 masak timotimo: neither. I already advent posted about that once https://perl6advent.wordpress.com/2009/12​/16/day-16-we-call-it-the-old-switcheroo/
21:09 nanis joined #perl6
21:09 timotimo oh
21:09 _nadim I read, but can't find it anymore of course, that one couls say something like $s ~~ m/Q'what I want here'/, eg, everything in between Q'' is taken as is. but it is not Q I guess
21:09 grondilu joined #perl6
21:09 masak timotimo: this is just about the new given/when semantics as of July this year
21:10 woolfy left #perl6
21:10 hoelzro cygx: excellent, thanks for taking that into consideration!
21:10 yoleaux 21:09Z <cygx> hoelzro: you left a message a while ago about Native::LibC not picking out the correct MS CRT - the v2 branch https://github.com/cygx/p6-native-libc/tree/v2 does so, among other things, but it hasn't been tested
21:10 jnthn _nadim: It's just quotes
21:11 RabidGravy stmuk, just finished so ~ 45 minutes
21:11 lizmat_ joined #perl6
21:11 lizmat I was looking at 624ff76ca66f39d9687 earlier today, from July 2013
21:11 lizmat it mentions a benchmark
21:11 lizmat we're about 40x faster compared to before that commit :-)
21:11 nanis p6: IO::Spec.devnull.say
21:11 camelia rakudo-moar 04791b: OUTPUT«Method 'devnull' not found for invocant of class 'IO::Spec'␤  in block <unit> at /tmp/tmpfile:1␤␤»
21:11 _nadim jnthn: thank you
21:11 nanis p6: $*SPEC.devnull.say
21:11 camelia rakudo-moar 04791b: OUTPUT«/dev/null␤»
21:12 lizmat m: IO::Spec::Unix.devnull.say
21:12 camelia rakudo-moar 04791b: OUTPUT«/dev/null␤»
21:12 * lizmat hates IO::Spec
21:12 nanis I am trying to understand the last part of io-spec-win.t
21:13 cygx hoelzro: it also no loger requires a DLL at runtime, but it does so by parsing prepropcessor output to get at the function that backs the errno 'variable'
21:13 vendethiel joined #perl6
21:13 nanis should those tests have been written to use `$*SPEC` rather than `IO::Spec`?
21:13 hoelzro whoa
21:13 cygx it works with MinGW and, according to Travis, whatever libc they use (GNU?)
21:14 bitmap joined #perl6
21:17 nanis lizmat What is the correct way to use invoke IO::Spec methods in a platform-independent way?
21:17 lizmat using $*SPEC
21:18 lizmat because that's supposed to have the right IO::Spec class loaded for the platform you're on
21:18 nanis Thank you. So, does that mean these tests are incorrectly written https://github.com/perl6/roast/blo​b/master/S32-io/io-spec-win.t#L299
21:18 lizmat m: say $*SPEC.WHAT
21:18 camelia rakudo-moar 04791b: OUTPUT«(Unix)␤»
21:18 Skarsnik maybe try IO::Spec.^can('stuff')?
21:19 timotimo masak: i don't actually remember anything changing about given/when in july :S
21:21 nanis lizmat Thank you. I ask because io-spec-win.t tries to invoke methods on `IO::Spec` ... so, not knowing much, I am confused.
21:22 masak timotimo: actually, the spec change brought the Perl 6 spec in line with pragmatic reality, so you probably haven't missed much.
21:22 masak timotimo: still, it was interesting to me that we aligned the spec in that way.
21:22 masak timotimo: ...read the post tomorrow, I guess ;)
21:23 timotimo i will! with pleasure :)
21:24 cygx jnthn: btw, any thoughts on what should happen to IO::Handle.open(:bin)?
21:25 cygx that's blocking my documentation update
21:25 stmuk src/6model/reprs/MVMIter.c:304:1: internal compiler error: in extract_insn, at recog.c:2109
21:25 stmuk maybe I need an updated/different gcc
21:25 jnthn Yup :)
21:25 RabidGravy stmuk, yeah
21:26 RabidGravy gcc (Raspbian 4.8.2-21~rpi3rpi1) 4.8.2 - I think the default is a 4.6
21:28 RabidGravy I think I talked someone through altering it about two months ago
21:30 lizmat joined #perl6
21:30 stmuk this is actually sue's pi .. I need my own .. maybe one of https://www.etsy.com/uk/shop/TynemouthSoftware?s​ection_id=14583700&amp;ref=shopsection_leftnav_2
21:30 stmuk "Upcycled Computers"
21:31 RabidGravy I just got it at maplins
21:32 stmuk not artisanal enough
21:32 RabidGravy hipster
21:33 Skarsnik lol expensive keyboard
21:33 stmuk I want to put one in a security tray at an airport
21:37 nanis left #perl6
21:38 RabidGravy I'm quite liking a diy tablet thing with an rpi, 7" touch screen and some lipo battery
21:38 espadrine joined #perl6
21:40 lizmat joined #perl6
21:40 * lizmat gave up on tethering
21:41 jnthn You...reached the end of your tether?
21:42 lizmat yes, and while on the 5th floor, that is no mean feat!   :-)
21:42 lizmat I gave in to the hotel's ploy at robbing me to get decent wifi access
21:44 * geekosaur wonders if they're doing the interference trick
21:45 stmuk I doubt that would be legal
21:46 RabidGravy I always find the wifi is best in the bar
21:46 * geekosaur is from the US, where far too many things like that are legal :(
21:46 muraiki in the US at least, there was recently a fine issued to some large hotel chain for actively disrupting people's personal wifi
21:46 rurban joined #perl6
21:46 RabidGravy that actually sucks
21:47 muraiki so if it was gray I'm pretty certain that the FCC has declared that it's illegal
21:47 geekosaur since it's pretty much legal until proven otherwise, and the "oproven otherwise" is still making its way throygh the legal system
21:47 muraiki https://www.fcc.gov/document/wa​rning-wi-fi-blocking-prohibited
21:47 muraiki since jan 27 2015
21:48 muraiki I think the particular case I recall then was that the hotel claimed that their 3rd party wifi consultancy or whatever did it
21:48 geekosaur hm. wonder how long that holds up. Congress has taken to threatening the FCC's funding if they don't stop interfering with the sovereign right of businesses to do whatever they want :(
21:48 geekosaur (see also: net neutrality)
21:48 koo8 joined #perl6
21:49 cygx geekosaur: you mean obamacare for the internet?
21:49 skids Most of the enterprise WiFi vendors support (technically speaking) breaking the law that way and have for ages.  I've always wondered how many people just assumed since the product could do it it was legal.
21:50 lizmat well, this was about 3/4G being flaky
21:51 geekosaur aka "Comcast shouldn't engage in what was called a protection racket before Congress decided it was a legitimate business plan"
21:51 lizmat pretty sure they wouldn't be interfering with that
21:51 lizmat there's some special event going on in the hotel with a lot of people...
21:51 muraiki oh, I took this completely out of cnotext then
21:51 muraiki sorry
21:51 lizmat feels more like overload local cell, come to think of it
21:51 lizmat *overloaded
21:51 TEttinger joined #perl6
21:52 * geekosaur just a trifle cynical these days...
21:52 adhoc joined #perl6
21:53 cygx .oO( you see these nice little packets you want delivered? it would a shame if anything... happened to them, don't you think? )
21:54 * masak , in his research, stumbles over http://irclog.perlgeek.de/​perl6/2009-12-31#i_1878950
21:55 geekosaur more or less. their business plan was: (1) you pay them for a particular data rate; (2) you pay them more to actually *get* that data rate; (3) you force the sites you visit to *also* pay them so connections to them won't be throttled
21:55 geekosaur nice triple-dipping in the style of a protection racket
21:56 * geekosaur does not see how this would be legal in a civilized country. but, sadly, this is the US.
21:56 profan does anyone know where to find a bit more of an in depth write-up on destructuring?
21:57 masak profan: you mean, destructuring as used in Perl 6?
21:58 profan yeah
21:58 masak Perl 6 does not have destructuring. :)
21:58 profan maybe im using the wrong terminology here
21:58 masak it has nested signatures, though
21:58 profan ah yes, this is what i'm referring to
21:58 RabidGravy yeah that's what I was taking it as
21:59 masak S06 goes through nested signatures
21:59 Begi2 joined #perl6
22:00 profan ah, there we go
22:00 profan awesome, thanks
22:01 profan my main difficulty with perl 6 so far has been knowing what terminology to substitute for what im used to calling things when searching for them.. :P
22:03 masak profan: heh :)
22:03 masak profan: we're eager to help here with that, and we try hard not to be snarky about it ;)
22:03 jnthn I tend to answer "how do you do destructuring in Perl 6" with "with signatures" :)
22:03 masak jnthn: that was not the exact question, though
22:04 jnthn masak: I'm not sure "Perl 6 doesn't have destructuring" is really an accurate answer, when there clearly is a way to do it :)
22:04 profan masak: the community is wonderful, my comment can be taken as "i've not really found anything else to complain about" :)
22:05 Skarsnik what is destructuring? x)
22:05 masak jnthn: you're right
22:05 jnthn m: class Cat { has $.name; has $.lives-left = 9; }; my $c = Cat.new(name => 'Bob'); my (:$name, :$lives-left) := $c; say $name; say $lives-left;
22:05 camelia rakudo-moar 04791b: OUTPUT«Bob␤9␤»
22:05 masak jnthn: my response, I realize, is a consequence of how I factor things in my mind
22:05 jnthn :-)
22:06 masak jnthn: in for example ES6, destructuring is done with assignment. in Perl 6, you have to use binding (and signatures).
22:06 jnthn I thought you were going to whip me with some deep category-theoretical explanation of why Perl 6's signatures don't do destructuring. ;)
22:06 masak jnthn: that makes the two things different enough for me to go "Perl 6 does not have destructuring"
22:06 masak jnthn: haha
22:06 jnthn Fair enough
22:06 masak jnthn: now that you mention it... :P
22:07 jnthn uh-oh :P
22:07 * masak .oO( destructuring, oddly enough, is dual to Skittlebräu )
22:08 yqt joined #perl6
22:08 profan ...Skittlebräu? sounds vaguely terrifying
22:08 masak just like destructuring sounds vagule appealing. ta-daa!
22:08 masak vaguely*
22:08 Zoffix http://cdn.fashionmagazine.com/wp-co​ntent/uploads/2012/03/Mar12-Main.jpg
22:09 profan haha, well played
22:09 cpage_ joined #perl6
22:11 pippo joined #perl6
22:11 pippo m: say (2, 4 ... 5);
22:11 camelia rakudo-moar 04791b: OUTPUT«(2 4)␤»
22:12 pippo m: say (2, ->$i {$i * 2} ... 5);
22:12 camelia rakudo-moar 04791b: OUTPUT«(2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736 …»
22:12 pippo ^^ bug?
22:12 jnthn No
22:13 ab5tract masak: i was really hoping that 'vagule' was just a word i hadn't learned yet :)
22:13 jnthn This was discussed a little earlier today
22:13 Zoffix jnthn, is .hyper broken right now?
22:13 Zoffix m: sleep 2 for ^4 .hyper: :1batch
22:13 camelia rakudo-moar 04791b: ( no output )
22:13 Zoffix m: sleep 2 for ^4 .hyper: :1batch; say now - INIT now
22:13 jnthn Zoffix: .hyper never was fully done, .race did work, then got bust, and timotimo at least partially fixed it earlier on today
22:13 camelia rakudo-moar 04791b: OUTPUT«2.01799386␤»
22:13 Zoffix Ah
22:13 pippo jnthn: OK. Thank you.
22:14 Zoffix It actually seems to be working now. Earlier today, the line above was giving me like 0.01 seconds run time
22:14 Zoffix timotimo++
22:14 pippo m: say (2, ->$i {$i * 2} ... 8);
22:14 camelia rakudo-moar 04791b: OUTPUT«(2 4 8)␤»
22:14 ab5tract Zoffix: slick use of INIT-thunk !
22:14 jnthn pippo: I think the summary is something like, "the upper acts as a threshold only for arithmetic/geometric sequences"
22:14 masak ab5tract: dictionary.reference.com says "Did you mean 'vagile'?", and I was afraid to click that link, but apparently that means "having the freedom of movement".
22:14 Zoffix ab5tract++ reading your advent post right now :)
22:15 RabidGravy vagule!
22:15 jnthn masak: Well, that evaginated your expectations...
22:16 Zoffix heh
22:16 ab5tract jnthn: well, evens will never reach 5. does that mean it's not arithmetic? i guess a mathematician would argue that only correct math is ever math
22:16 jnthn ab5tract: I meant "inferred from values"
22:17 pippo m: say (2, ->$i {$i ** 2} ... 16);
22:17 camelia rakudo-moar 04791b: OUTPUT«(2 4 16)␤»
22:17 ab5tract right, but i guess my point is that the endpoint is still inferred from the values, it's just inferred to be infinite
22:17 geekosaur actually, a mathematician would argue that whether it si correct or not depends on the rules for that particular math
22:19 ab5tract it's precisely the even-ness of the values/value closure that deduces the endpoint to be infinite, right?
22:19 ab5tract m: say ( 2, * + 1 ... 5 )
22:19 camelia rakudo-moar 04791b: OUTPUT«(2 3 4 5)␤»
22:19 b2gills m: say 0, {$_ + Order.pick} ... 10
22:19 camelia rakudo-moar 04791b: OUTPUT«(0 1 2 1 1 1 1 2 2 2 3 3 4 5 4 4 3 2 2 2 2 2 2 1 0 1 0 1 2 3 4 4 5 5 4 4 5 4 5 5 4 4 4 3 4 5 4 3 4 4 5 4 3 4 4 4 5 6 5 5 6 7 8 8 9 9 8 9 10)␤»
22:19 ab5tract i'm sure i'm just splitting hairs here
22:19 jnthn iiuc, we will always treat the endpoing as an absolute targert if there is a code block
22:20 jnthn We used to *always* treat it that way
22:20 ab5tract m: say (2, * * 2 ... 5) # but?
22:20 camelia rakudo-moar 04791b: OUTPUT«(2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736 …»
22:21 TimToady we only deduce endpoint crossing on intuited sequences
22:21 TimToady with a function, we cannot solve the halting problem
22:21 b2gills It has no way to know if you are going to go past, then come back down to the endpoint
22:22 TimToady correct
22:22 TimToady and there are plenty of sequences that do that
22:23 timotimo https://www.nu42.com/2015/12/perl6​-newline-translation-botched.html - this just crossed my screen
22:23 ab5tract ok, so in the * + 1 example, is there intuition going on?
22:23 jnthn ab5tract: No, that says how to compute the next element
22:24 Zoffix timotimo, it was mentioned today, unless that's where you found that link :) http://irclog.perlgeek.de/p​erl6/2015-12-11#i_11699372
22:24 ab5tract okay, but it still stops at 5.
22:24 ab5tract ah, nevermind
22:24 ab5tract :)
22:24 b2gills m: say 0, * + ¾ ... 5
22:24 camelia rakudo-moar 04791b: OUTPUT«(0 0.75 1.5 2.25 3 3.75 4.5 5.25 6 6.75 7.5 8.25 9 9.75 10.5 11.25 12 12.75 13.5 14.25 15 15.75 16.5 17.25 18 18.75 19.5 20.25 21 21.75 22.5 23.25 24 24.75 25.5 26.25 27 27.75 28.5 29.25 30 30.75 31.5 32.25 33 33.75 34.5 35.25 36 36.75 37.5 38.25 39 39.75 …»
22:25 ab5tract b2gills: yup, that lightbulb is officially on :)
22:26 ab5tract m: say 0, * + (^5).pick(*) ... 5
22:26 camelia rakudo-moar 04791b: OUTPUT«(0 5)␤»
22:27 timotimo Zoffix: okad
22:27 timotimo okay*
22:28 TimToady http://rosettacode.org/wiki/Stern-Brocot_sequence is an example where if you put ... 6 it would end too soon, since 7 comes out before 6
22:28 Zoffix m: module F { sub foo (Str $xx, :$foo ) { say "foo $xx $foo"; }; our &prefix:<☌> is export = sub (|c){ foo(|c) } }; import F; ☌(42, "foo");
22:28 camelia rakudo-moar 04791b: OUTPUT«Type check failed in binding $xx; expected Str but got List␤  in sub foo at /tmp/tHWA90Wzyz:1␤  in sub  at /tmp/tHWA90Wzyz:1␤  in block <unit> at /tmp/tHWA90Wzyz:1␤␤»
22:28 Zoffix aww
22:28 Zoffix ab5tract, your article made me hope I could make the above work somehow :(
22:28 Zoffix Goal: make ☌ behave like foo() and be exported
22:30 ab5tract m: until 0, (* + (^5).pick) ... 5 !~~ Inf { say $++ } # unexpected :D
22:30 camelia rakudo-moar 04791b: ( no output )
22:30 ab5tract m: say until 0, (* + (^5).pick) ... 5 !~~ Inf { say $++ } # unexpected :D
22:30 camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9_meHlzQVP␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at /tmp/9_meHlzQVP:1␤------> 3…»
22:30 cygx 'night o/
22:30 ab5tract it will be worth it, i think
22:31 lucs Can I name my own character class? I want to do something like  < :myCharClass - [fobar] >
22:31 TimToady though I see that RC entry is using first-index...fixing
22:31 ab5tract m: (until 0, (* + (^5).pick) ... 5 !~~ Inf { say $++ }).WHAT.say
22:31 camelia rakudo-moar 04791b: OUTPUT«(List)␤»
22:31 ab5tract locally i get (Sub+{Precedence})
22:32 * ab5tract updates
22:32 Zoffix same
22:32 Zoffix And I updated last night
22:33 jnthn lucs: Just write a toekn that matches one char and use it as <+myCharClass - [fobar]> or so
22:33 lucs jnthn: I tried something along those lines, but not quite like that, I'll try again.
22:33 lucs Thanks.
22:33 TimToady turns out the optmizer does visit subs, but most of the checks are disabled by $!in_declaration being lots of places it shouldn't be
22:34 Zoffix Does that mean we can optimize a lot of stuff if we fix that?
22:34 ab5tract Zoffix: i think you can get what you want with 'sub prefix:<☌>(|c) is export { foo(|c) }'
22:34 ab5tract but i might be mistaken
22:35 ab5tract TimToady++ # finding a Biggie
22:35 Zoffix m: module F { sub foo (Str $xx, :$foo ) { say "foo $xx $foo"; }; our &prefix:<☌>(|c) is export { foo(|c) } }; import F; ☌(42, "foo");
22:35 camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TrR7cs1rLw␤The () shape syntax in routine declarations is reserved (maybe use :() to declare a longname?)␤at /tmp/TrR7cs1rLw:1␤------> 3ay "foo $xx $foo"; }; our &prefix:<☌>(|c7⏏5) is export { foo(…»
22:35 lucs jnthn++ : Perfect (as was your earlier answer to me)
22:35 TimToady Zoffix: if you're asking me, probably not a lot of win
22:35 Zoffix TimToady, aww :(
22:35 TimToady except insofar as we'll figure out more of the missing void contexxts
22:36 Zoffix m: sub foo ($x) { $x+1 }; foo(1) for ^1000000; say now - INIT now;
22:36 camelia rakudo-moar 04791b: OUTPUT«0.91260613␤»
22:36 Zoffix m: sub foo ($x) is pure { $x+1 }; foo(1) for ^1000000; say now - INIT now;
22:36 camelia rakudo-moar 04791b: OUTPUT«0.279157␤»
22:36 TimToady and void/sink context drives various optimizations
22:36 Zoffix This is awesome
22:37 TimToady dalek didn't report it, but you can get a conjectural optimization that turns ++$i into $i = $i + 1 if you set your optimization level to 4
22:37 TimToady (on native ints)
22:38 TimToady it's there just in case the spesher doesn't get to it before xmas
22:38 jnthn It goes up to 4 now? :)
22:38 jnthn TimToady: spesh won't get to it before xmas
22:38 TimToady I'm using it to hold the optimization in reserve, but you can test with it
22:38 TimToady then we can lower it to 3 :)
22:39 jnthn TimToady: It's non-trivial enough to implement that I really don't want to sneak it in just before a release. :)
22:39 jnthn And doing it sensibly needs a little re-organization in spesh.
22:39 TimToady this will also optimize $i++, but only in void context, which turns out to be missing a surprising number of places
22:39 TimToady which is why I'm looking at it today...
22:39 jnthn :)
22:40 jnthn Suspect I'm about beat for the day.
22:40 TimToady like, we sink the 3rd arg to a loop, but for some reason it doesn't pick up that want-v
22:41 TimToady but I agree that some of the void policy needs to be pushed up into actions
22:42 TimToady I'll also need to straighten out the $!in_declaration mess, I suspect
22:42 hankache joined #perl6
22:42 jnthn Good luck :)
22:43 jnthn I suspect my next mess to straighten out is our unsigned and sized natives in lexicals...
22:43 TimToady if I take $!in_declaration out of the guard for Useless use of operators, I get all sorts of reports on stuff inside bare blocks
22:43 TimToady where { $_ < 4 } reports useless use of <, for instance, when obviously it's not in void context really
22:44 Zoffix ab5tract++ I learned a lot from your Advent article.
22:44 timotimo jnthn: how much new stuff will we require to build for multi-dim nativerefs to work?
22:44 jnthn timotimo: Not loads
22:44 timotimo would it be enough just to calculate the offset into the linear memory location from a multi-dim array type?
22:44 timotimo and use the already existing positional ref?
22:44 jnthn timotimo: That's...hmm
22:44 jnthn :)
22:45 timotimo i honestly see no problem with that :)
22:45 jnthn I think it'll be fragile
22:45 TimToady what about shaped array hypers?
22:45 timotimo well, shaped arrays are already immutable in all the right ways for this to work
22:45 timotimo and IIUC nativeref has only got to take extra care about holding on to the right structures for the GC
22:45 timotimo what were you planning to put into a MultiDimPositionalNativeRef?
22:46 jnthn Yes, but we'll have to break the encapsulation of the multi-dim array REPR to actually reach into the memory
22:46 jnthn 'cus it doesn't expose a flat view
22:46 TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix »+» 1
22:46 camelia rakudo-moar 04791b: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤  in block <unit> at /tmp/A4BALXWN5i:1␤␤»
22:46 TimToady that oughta make a new matrix of the same shape, incremented
22:46 jnthn Aye
22:47 jnthn TimToady: Probably a pointer to the indices array
22:47 jnthn oops
22:47 jnthn timotimo: ^
22:47 * TimToady sinks back into the void
22:47 muraiki sinks back into the void pointer
22:48 jnthn timotimo: Can just store the int MVMArray or so we get given
22:52 timotimo hum. that'd make accessing that ref a bit expensive
22:52 timotimo i thought taking the ref would be the responsibility of the shaped array repr, which knows about its inner workings
22:54 jnthn No
22:55 masak er.
22:55 jnthn Otherwise positional refs would only work with one repr
22:55 masak ok, advent post published, a bit before 12th, it seems.
22:55 jnthn masak: It's the 12th somewhere :)
22:55 Coke2 joined #perl6
22:55 Coke2 is hack down?
22:55 masak I distinctly remember there being a big blue "Schedule" button one had to press even after setting the scheduled time.
22:56 masak apparently they changed now, and the big blue "Publish" button actually prematurely publishes the post instead :)
22:56 masak future advent bloggers, take heed... :)
22:56 masak anyway, five minutes before local midnight is not so bad.
22:56 masak people, feel free to review my dr^Wpublished post! :P
22:56 masak https://perl6advent.wordpress.com/2015/12/11/d​ay-12-i-just-felt-a-disturbance-in-the-switch/
22:57 Zoffix drolsky++ good advent post, though my main takeaway was: don't use Pod as you'll be wasting CPU cycles parsing it
22:57 Coke2 I can't ssh into hack.
22:58 firstdayonthejob joined #perl6
22:58 jnthn Coke2: Well, dalek seems to have vanished too
22:58 masak Coke2: I'm writing this from hack
22:58 Zoffix Coke2, I can... well, I can get it to ask me for a password :)
22:59 masak yeah, same.
22:59 masak don't seem to get further than that
22:59 Coke2 My auth works (key), but then it hangs.
22:59 Zoffix weird
23:01 masak so being *on* hack already works, but ssh'ing into it is currently busted
23:01 masak some resource being all eaten up, perhaps?
23:03 RabidGravy run out of space in /var ?
23:04 RabidGravy or ptys, doesn't make the pty until you log in
23:05 masak *nod*
23:06 Zoffix m: $_ = 42; when 42 { say "42!" }; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; when 42 { say "Another 42" }; "foo"
23:06 camelia rakudo-moar 04791b: OUTPUT«42!␤»
23:06 Zoffix m: $_ = 42; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; when 42 { say "Another 42" }; "foo"
23:06 camelia rakudo-moar 04791b: OUTPUT«Kabloom!␤»
23:06 _nadim good evening, the dumper I am writing checks if a class 'can' a method and calls it if it exists, right now the method is called ddt_get_header. i wonder if it possible to put  that in a sub class, it feels a bit cleaner. how can one check if the sub class exists and get the method
23:06 Zoffix Daum.. Perl 6 is so smart
23:08 Zoffix m: $_ = 42; when 42 { say "42!" }; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; $_ = 42; when 42 { say "Another 42" }; "foo"
23:08 camelia rakudo-moar 04791b: OUTPUT«42!␤»
23:08 Zoffix or not :)
23:08 Skarsnik I had weird bug with when something {} and something when . but I did not manage to defound it ($_ was miused)
23:08 Zoffix m: $_ = 42; when 42 { say "42!" }; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; $_ = 42; when 42 { say "Another 42" }; "foo"
23:08 camelia rakudo-moar 04791b: OUTPUT«42!␤»
23:08 Zoffix m: $_ = 42; when 42 { say "42!" }; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; $_ = 42; when 42 { say "Another 42" }; say "foo"
23:08 camelia rakudo-moar 04791b: OUTPUT«42!␤»
23:09 Zoffix huh? the last say "foo" doesn't work?
23:09 Skarsnik it exit at the first when that work
23:09 Zoffix oh :(
23:09 Skarsnik Did you read the post! x)
23:09 Zoffix m: for 42, 52, 'bar' { when 42 { say "42!" }; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; $_ = 42; when 42 { say "Another 42" }; say "foo" }
23:09 camelia rakudo-moar 04791b: OUTPUT«42!␤52␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5bar' (indicated by ⏏)␤  in block <unit> at /tmp/B1nm5zTwUO:1␤␤Actually thrown at:␤  in block <unit> at /tmp/B1nm5zTwUO:1␤␤»
23:09 Zoffix :S
23:09 Zoffix Skarsnik, I'm in the middle of reading it
23:10 timotimo jnthn: so nativeref will become one 64bit integer bigger, because of its union? :\
23:10 jnthn timotimo: How do?
23:10 jnthn *so
23:10 timotimo well, i'm supposed to store the index array, right?
23:10 timotimo oh, wait. it was a single number before, now it's a pointer
23:11 jnthn Right, and anyway, you've a pointer to spare anyway
23:11 timotimo now i'll actually go dig in the code and my questions will turn into informed questions
23:11 timotimo oh, neat.
23:11 Zoffix wait, why is it complaining about 'bar' above?
23:11 jnthn 'cus look at the attribute member of the union
23:11 Zoffix Why is it trying to convert anything to base-10?
23:11 timotimo ah
23:12 TimToady m: say 'bar' ~~ 42
23:12 camelia rakudo-moar 04791b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5bar' (indicated by ⏏)␤  in block <unit> at /tmp/Lne4xgZ0FH:1␤␤Actually thrown at:␤  in block <unit> at /tmp/Lne4xgZ0FH:1␤␤»
23:12 TimToady that is all
23:12 Zoffix that stucks
23:13 Zoffix m: my $x = 42; if ( $x ~~ 42 ) { say "42 num" } elsif ( $x ~~ "42" ) { say "42 str" }
23:13 camelia rakudo-moar 04791b: OUTPUT«42 num␤»
23:13 Zoffix Hm
23:13 lizmat _nadim: are you aware of the .?method syntax?
23:13 Zoffix m: $_ = 42; if ( $_ ~~ 42 ) { say "42 num" } elsif ( $_ ~~ "42" ) { say "42 str" }
23:13 camelia rakudo-moar 04791b: OUTPUT«42 num␤»
23:13 Zoffix m: $_ = 42; when "42" { say "42 str" }
23:13 camelia rakudo-moar 04791b: OUTPUT«42 str␤»
23:13 lizmat m: dd 42.Ztr
23:13 camelia rakudo-moar 04791b: OUTPUT«Method 'Ztr' not found for invocant of class 'Int'␤  in block <unit> at /tmp/lhmCBwZsr5:1␤␤»
23:13 lizmat m: dd 42.?Ztr
23:13 camelia rakudo-moar 04791b: OUTPUT«Any $var = Any␤»
23:14 Zoffix m: given 42 { when "42" { say "42 str" } }
23:14 camelia rakudo-moar 04791b: OUTPUT«42 str␤»
23:14 lizmat _nadim: only call the method if you can, if not return Nil
23:14 TimToady hmm, dd should be taught to propagate Nil
23:14 Zoffix ¯\_(ツ)_/¯
23:15 lizmat TimToady: probably... but not tonight, not by me  :-)
23:15 Zoffix m: $_ = 42; if ( $_ ~~ "42" ) { say "42 num" } elsif ( $_ ~~ 42 ) { say "42 str" }
23:15 camelia rakudo-moar 04791b: OUTPUT«42 num␤»
23:15 Zoffix m: $_ = 'bar'; if ( $_ ~~ 42 ) { say "42 num" } elsif ( $_ ~~ "42" ) { say "42 str" }
23:15 camelia rakudo-moar 04791b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5bar' (indicated by ⏏)␤  in block <unit> at /tmp/4mA7VPoGN2:1␤␤Actually thrown at:␤  in block <unit> at /tmp/4mA7VPoGN2:1␤␤»
23:16 Zoffix m: $_ = 'bar'; if ( $_ ~~ "42" ) { say "42 num" } elsif ( $_ ~~ 42 ) { say "42 str" }
23:16 camelia rakudo-moar 04791b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5bar' (indicated by ⏏)␤  in block <unit> at /tmp/b2rAcbB9h5:1␤␤Actually thrown at:␤  in block <unit> at /tmp/b2rAcbB9h5:1␤␤»
23:16 Zoffix m: $_ = 'bar'; if ( $_ ~~ "42" ) { say "42 num" } elsif ( $_ ~~ "42" ) { say "42 str" }
23:16 camelia rakudo-moar 04791b: ( no output )
23:16 Zoffix hm
23:18 Zoffix masak++ good Advent post :) Learned stuff :)
23:19 Zoffix Probably could make use of the new info to better rewrite the precision stuff in Number::Denominate https://github.com/zoffixznet/perl6-Number-Denom​inate/blob/master/lib/Number/Denominate.pm6#L103
23:21 kid51 joined #perl6
23:22 masak :)
23:22 masak by the way, the backlog in http://irclog.perlgeek.de/​perl6/2009-12-31#i_1878950 is *riveting* reading
23:22 masak (people are discussing whether to slap "official" on Rakudo. in 2009.)
23:23 Zoffix hehe
23:24 masak that whole discussion culminated in TimToady++ updating S01.
23:24 masak "The language designer is neither omniscient nor omnipotent, and never will be, despite requests for those particular features."
23:25 masak "As long as anyone is hacking on any implementation of Perl 6 to make it conform to the test suite, or hacking on the test suite to make it reflect consensus of specification, the rate of convergence will be deemed to be positive."
23:25 masak "If you are unhappy with the current rate of convergence, please cooperate more with someone else you think is interested in convergence."
23:26 masak I almost want to call that last sentence "passive-aggressive encouragement to be constructive" :)
23:26 Zoffix Too bad the notes.txt stuff is no longer available
23:26 masak Zoffix: a summary can be gleaned from http://irclog.perlgeek.de/​perl6/2009-12-31#i_1879670
23:27 TimToady m: sub moo (Mu **x) { say x }; moo(Nil)
23:27 camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HdOTrMkMJC␤Malformed parameter␤at /tmp/HdOTrMkMJC:1␤------> 3sub moo (Mu **7⏏5x) { say x }; moo(Nil)␤    expecting any of:␤        formal parameter␤»
23:28 TimToady m: sub moo (Mu **@x) { say x }; moo(Nil)
23:28 camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5===␤Slurpy positional parameters with type constraints are not supported␤at /tmp/A9c_TwiI4L:1␤------> 3sub moo (Mu **@x7⏏5) { say x }; moo(Nil)␤Undeclared routine:␤    x used at line 1␤␤␤»
23:28 TimToady m: sub moo (**@x) { say @x }; moo(Nil)
23:28 camelia rakudo-moar 04791b: OUTPUT«[(Any)]␤»
23:28 TimToady that is the basic problem with dd
23:28 TimToady no way to run off the Any default
23:28 diakopter dd is like .perl but...?
23:28 TimToady also prints var name if it can
23:29 TimToady my $x = 42; dd $x
23:29 TimToady m: my $x = 42; dd $x
23:29 camelia rakudo-moar 04791b: OUTPUT«Int $var = 42␤»
23:29 TimToady hmm, that's not right either :)
23:32 Zoffix masak, wow, lots of drama in there :) I'll need a fresh batch of popcorn.
23:33 masak Zoffix: yeah. lots of back and forth.
23:33 bitmap joined #perl6
23:33 masak Zoffix: but it's mostly interesting because of the benefit of six more years after that.
23:33 masak Zoffix: speicifically, Rakudo is now the uncontested leader without being branded "official".
23:33 masak specifically*
23:34 masak (and while it could be argued that branding it such would have made us reach this point sooner, I kind of doubt that)
23:35 Zoffix It's interesting for me to see that log, because in 2009, I was definitely coding Perl (5).. have a ton of modules released in 2008, but I never realized at the time these heated arguments were taking place.
23:36 masak :)
23:37 masak m: use experimental :macros; say 2 + 2; macro infix:<+>($l, $r) { quasi { "OH HAI" } }
23:37 camelia rakudo-moar 04791b: OUTPUT«AST.new␤»
23:37 masak need to do something about this case: post-declared macro operators that override an existing operator
23:39 lizmat TimToady: dd got broke when I tried to handle named params
23:39 lizmat m: my $a = 42; dd :$a
23:39 camelia rakudo-moar 04791b: OUTPUT«Int a = 42␤»
23:40 TimToady probably better to use |c and dissect that
23:40 diakopter masak: so the output will always end with "and a partridge in a pear tree a partridge in a pear tree"
23:40 diakopter masak: or did you forget a proceed?
23:41 skids joined #perl6
23:41 TimToady no, it works right, there's an implied succeed there that skips the last say
23:41 diakopter oh
23:42 diakopter what would you change to not repeat the phrase
23:43 diakopter print "and "; proceed?
23:43 woodruffw joined #perl6
23:43 diakopter how would you invoke that given block inline?
23:46 masak I don't understand that last question.
23:46 TimToady just turn it into a for 1..10
23:46 diakopter like, in a "fluent" pattern
23:46 diakopter statement less
23:47 diakopter ok, for 1..12 { given blah
23:47 masak right
23:47 TimToady don't need the given if you have for
23:47 masak or even without the.. what TimToady said
23:47 masak that's actually one of the points of the 2009 post! :D
23:47 masak which see
23:47 TimToady you'll need a statement before the first when that does "On the $nth day of Christmas"
23:48 Skarsnik pls no x)
23:48 Skarsnik I don't want to have stupid song stuck in my head xD
23:49 diakopter er I meant when
23:49 masak Skarsnik: FIIIIVE GOLDEN RINGS
23:49 TimToady "The first day after Christmas, my true love and I had a fight, and so I chopped the pear tree down, and burned it just for spite..."
23:49 TimToady a much better song to have stuck in your head
23:50 TimToady and musically funny, because the melody is an inversion of the original, more or less
23:50 masak the way I got acquainted with the Twelve Days song was to listen to lots of pariodies of it on Mad Music Hour (a spinoff of Dr Demento's)
23:50 snarkyboojum joined #perl6
23:51 diakopter maybe we could be, like, the 4000th day Adventists
23:52 TimToady I don't think they go that high...
23:53 cognominal m: use nqp; say nqp::sha1()    # is the bot protected against unsafe nqp:: call unlike nqp::sha1 ?
23:53 camelia rakudo-moar 04791b: OUTPUT«===SORRY!===␤Arg count 0 doesn't equal required operand count 2 for op 'sha1'␤»
23:54 RabidGravy no then :)
23:54 RabidGravy but sssh
23:55 cognominal hopefully the nqp::shell signature is hard :)
23:55 TimToady not very :)
23:56 TimToady but it gets tiresome, and eventually you just ask nine++ for an account :)
23:56 cognominal :)
23:56 Psyche^_ joined #perl6
23:58 diakopter m: use nqp; say nqp::sha1(nqp::rand_i()) for ^999
23:58 camelia rakudo-moar 04791b: OUTPUT«6B99E2C1E3CB29FFBEF6C568525DF551C8D0​0946␤D05BC641EB3500A97348E9EFE12DBF7C268989​13␤5CE614D9B5B0EA97AA2AC61FC909221DA785D9BC​␤865ED8D369E5EEBEF3BE54FB7245961F1F85BE96␤9​720140689C747C08059F0FDA4498CFA95356A32␤0D8​9F46D34AC3C43C42CEC7CD0BB6234715E3EDD…»
23:58 diakopter m: use nqp; say nqp::sha1(nqp::rand_i()) for ^999
23:58 camelia rakudo-moar 04791b: OUTPUT«9081B1E39EC6393C4FC33076D0348D6BF227​28D4␤C3D6AB223A68E5FC0CD74E322DD88E4D7DE2C0​12␤4F8CDC1A3399A638F48C5F09D2B9148C43192E1E​␤3E029327CA91F0EC0EF1A1392F65B33A3E712E98␤7​0E5E4E663BB6C46F08965DDF1B3C218CB46055A␤760​98466C69D7D386CDB1A9D829A85FE7DEAFC9A…»
23:59 diakopter we have sha1 but not sha2 or sha3?

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

Perl 6 | Reference Documentation | Rakudo