»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by masak on 28 November 2015.
00:01 Psyche^ joined 00:10 n0tjack left
RabidGravy boom! 00:15
00:19 jeffa joined 00:20 RabidGravy left 00:21 Herby__ joined
Herby__ Good evening, everyone! 00:22
jeffa can we change the mascot, to something professional?
flussence jeffa: I'm sure you've already read the requirements for doing so. Patches welcome :)
CQ ...like a freebsd mascot holding a tricorder?
Herby__ how does one go about pulling results from a Grammar.parse? 00:23
jeffa my patch is to simply remove it
TimToady rejected
anthropology is important :)
jeffa as expected
CQ erm, sorry, wrong channel, I thought the question was in ##pfsense : )
jeffa professionalism is more
looks like a 5 year old made it
TimToady that's a feature 00:24
installed for very professional reasons
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…»
Herby__ lol figured I hosed that up
Juerd jeffa: Can you explain why something that looks like a 5 year old made it, cannot be professional? 00:26
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 )
Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test 2 }; }; say Test.parse("test1test2");
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…»
Herby__ where am I messing up?
m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; say Test.parse("test1test2");
camelia rakudo-moar f45700: OUTPUT«「test1test2」␤ a => 「test1test2」␤ b => 「test1」␤ c => 「test2」␤»
Juerd jeffa: It's not about that. It's just that I think you have a weird defintion.
Herby__ there we go
Juerd definition even
00:28 ZoffixGaming joined
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.
Herby__: \o
Juerd jeffa: Will the drawing stop you from using the language? 00:29
jeffa yes
flussence mission accomplished!
ZoffixGaming :D
jeffa: well, there are some good reasons for using such a logo. 00:30
jeffa such as ...
Juerd jeffa: So to you, Camelia's appearance is, by itself, more important than all the goodies that the language provides combined?
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>;
camelia rakudo-moar f45700: OUTPUT«Use of Nil in string context in block <unit> at /tmp/NvQi4jYD8q:1␤␤»
jeffa a picture paints a thousand words
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>;
camelia rakudo-moar f45700: OUTPUT«test1test2␤»
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>;
camelia rakudo-moar f45700: OUTPUT«Use of Nil in string context in block <unit> at /tmp/RAwvhjhkcH:1␤␤»
ZoffixGaming jeffa: it does.
Herby__ how do I extract values from a Grammar result? 00:31
ZoffixGaming Herby__: your grammar isn't matching
Herby__ m: grammar Test { token TOP { <a> }; token a { <b> <c> }; token b { test1 }; token c { test2 }; }; say Test.parse("test1test2");
camelia rakudo-moar f45700: OUTPUT«「test1test2」␤ a => 「test1test2」␤ b => 「test1」␤ c => 「test2」␤»
ZoffixGaming oh wait, yeaht it does
Right taht way
flussence $match<a><b>
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␤»
ZoffixGaming Herby__: there's also docs.perl6.org/language/grammars#Action_Objects
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?!
Herby__ ...
I swear it wasn't working before :)
ZoffixGaming :)
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>;
camelia rakudo-moar f45700: OUTPUT«Use of Nil in string context in block <unit> at /tmp/EyKYNmj9BP:1␤␤»
jeffa it looks like a 5 year old drew it
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>;
camelia rakudo-moar f45700: OUTPUT«test2␤»
jeffa now, i know this sounds pompous --- but i am a professional
not a 5 year old
Herby__ Thanks fluss!
flussence Herby__: np :)
jeffa and my manager hired a pro, not a 5 year old --- what are THEY going to think?
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
Juerd jeffa: They never hired you to draw pictures of programming languages, I think
jeffa see?
flussence jeffa: you're failing to convince us you're in any way professional with that infantile attitude.
ZoffixGaming jeffa: well, made a 5-year old did draw it. Again, why do you think it's a bad thing?
jeffa see?
stmuk blog.golang.org/gopher
ZoffixGaming jeffa: why is it bad to include 5-year olds in programming?
stmuk that's similar :)
jeffa because they have no experience
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
ZoffixGaming jeffa: do you spot anything wrong with this picture? It was taken during most recent Reactive Conf, a JavaScript conference: pbs.twimg.com/media/CS4bdkRU8AAUcIu.jpg
stmuk jeffa: is the go gopher more or less professional? :)
jeffa it looks more
it's not the animal, it's the implementation
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?
ZoffixGaming jeffa: so... notice anything in that photo yet?
jeffa it looks shabby, unprofessional and more like the prototype
ZoffixGaming jeffa: one of the reasons of Camelia is to counter that.... 00:35
jeffa i was talking about Camelia
ZoffixGaming Looks pretty professional to me
Juerd jeffa: If you walk next to a kid, does this make you look childish?
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
Juerd jeffa: If you sit right next to a child's drawing, does this make you look childish?
jeffa a better looking butterfly
with colors that match
Juerd jeffa: Oh, come on, you know that Camelia doesn't write code for you :)
ZoffixGaming jeffa: better meaning what?
flussence jeffa: which language do you hold up as an example of "professional"? Why aren't you there right now?
ZoffixGaming heh
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
go ahead
goodbye
flussence we aren't selling anything.
stmuk noone selects a language based on the logo
jeffa this is why i am learning Ruby and Python intead of Perl6
ZoffixGaming jeffa: well, we aren't corporate drones thinking of the "bottom line" lol
flussence knew it :)
00:37 jeffa left
TimToady good, those are great langauges 00:37
Juerd flussence: That's not fair. Let jeffa express their concern.
ZoffixGaming pfft
skids poor ruby and python crowd. lucky for us though.
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.
Juerd flussence: Because they like Perl 6 and are afraid their employers won't let them use it.
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
Juerd Actually, I once almost lost a client over my use of pink UTP cables :)
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...
ZoffixGaming Wait! Wtf? Samsung uses a plain oval for their logo? How unprofessional!
ZoffixGaming throws their phone intro trash
00:39 pierre-vigier joined
Juerd ZoffixGaming: Plain and bland are professional, didn't anyone tell you this? 00:40
00:40 AlexDaniel joined
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
stmuk the FreeBSD people actually changed their default boot logo to be less "satanic" following complaints apparently :)
Juerd Except in Japan :)
flussence wait, I thought ignoring QA and shipping rushed products to market was professional... now I'm confused
Juerd I did think Camelia looked better in mono, tbh. Less of an eyesore :D 00:41
juerd.nl/tmp/Camelia_mono.svg
stmuk personally I think the wings should flap 00:42
00:42 idiosyncrat_ joined
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)␤»
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 :)
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");
camelia rakudo-moar f45700: OUTPUT«Nil␤»
ZoffixGaming weird 00:43
Ah
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>
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␤␤»
Herby__ blah
I'm tired
ZoffixGaming Herby__: \s needs at least one space at the end
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
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>
camelia rakudo-moar f45700: OUTPUT«test1test2 test3test4␤»
Herby__ :)
TimToady this was not a "random", but a recurrent visitor :)
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>
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␤␤»
Herby__ thats the error I'm thinking off
of
TimToady who generally only comes in to say something provocative
00:44 BenGoldberg joined
idiosyncrat_ whether it uses LL tables (I think not) 00:44
Herby__ how would I get to test3 and test4?
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>
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␤␤»
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
camelia rakudo-moar f45700: OUTPUT«「test1test2 test3test4 」␤ a => 「test1test2」␤ b => 「test1」␤ c => 「test2」␤ a => 「test3test4」␤ b => 「test3」␤ c => 「test4」␤»
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?
or assign "test4" to a variable
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>
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␤␤»
ZoffixGaming too wasted for this
idiosyncrat_ flussence: are you telling me that it is not top-down?
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␤␤»
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>
camelia rakudo-moar f45700: OUTPUT«test2␤»
Herby__ hmmm
might be on to something
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>
camelia rakudo-moar f45700: OUTPUT«test4␤»
Herby__ there we go
ok, i think I understand now
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>
camelia rakudo-moar f45700: OUTPUT«「test4」␤»
flussence idiosyncrat_: it's at least as complicated as the perl5 parser, by virtue of having to support perl5 code inline
ZoffixGaming oh
Herby__ great minds think alike!
ZoffixGaming is too late to the party
00:47 ZoffixGaming left
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:47
idiosyncrat_ flussence: Is there a doc on it? 00:48
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␤»
flussence idiosyncrat_: doubt it
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>
camelia rakudo-moar f45700: OUTPUT«test4␤»
00:56 adhoc left 00:58 adhoc joined 00:59 dwarring left
idiosyncrat_ OK found it 01:03
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."
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:04
01:05 adhoc left 01:06 adhoc joined 01:07 CurtisOvidPoe joined
geekosaur I recall that going in several years ago 01:07
PerlJam idiosyncrat_: that's been in there since May 2010
idiosyncrat_ That's bad news wrt my memory. 01:08
01:08 Herby__ left
idiosyncrat_ So S05 actually contains a reasonably precise characterization of the Perl 6 parse engine -- there's a literature on PEG. 01:09
And it looks like Perl 6 does some innovative things with tie breaking.
01:11 Zoffix joined 01:12 adhoc left 01:13 adhoc joined
PerlJam q 01:13
01:13 yeahnoob joined
Zoffix r 01:15
01:17 roguelazer joined 01:24 kid51 joined 01:30 pierre-vigier left 01:41 uruwi left 01:48 adhoc left 01:49 pierre-vigier joined, adhoc joined 01:54 adhoc left 01:56 adhoc joined 01:58 znpy left 01:59 uruwi joined 02:01 adhoc left 02:03 adhoc joined, idiosyncrat_ left 02:04 cdg left 02:08 adhoc left 02:09 adhoc joined 02:15 adhoc left 02:16 adhoc joined 02:26 xinming left, Sqirrel left 02:27 xinming joined 02:30 yeahnoob left 02:31 yeahnoob joined 02:33 adhoc left, cognominal left 02:35 adhoc joined 02:43 kaare_ joined 02:49 herby_ joined 02:50 yqt left
herby_ \o 02:53
03:06 kid51 left 03:16 sammers joined 03:18 pierre-vigier left 03:22 kaare_ left 03:24 pierre-vigier joined 03:28 adhoc left
sammers hi all, what is the best way to handle noecho for prompt / passwords? 03:44
03:46 adhoc joined 03:51 adhoc left 03:52 adhoc joined
ugexe as far as i know there isnt one yet 03:55
03:57 adhoc left 03:58 noganex joined, adhoc joined 04:04 pierre-vigier left, adhoc left 04:06 adhoc joined
flussence qx[stty -echo]; ... ; qx[stty echo] is currently the worst best way. Better than no way, at least 04:06
04:11 adhoc left, herby_ left 04:12 pierre-vigier joined 04:13 adhoc joined 04:18 adhoc left
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
04:19 adhoc joined
skids Though IIRC linenoise isn't equipped to deal with tty != stdin. 04:20
04:24 adhoc left 04:26 adhoc joined 04:31 adhoc left, Ben_Goldberg joined 04:32 pierre-vigier left, adhoc joined 04:33 BenGoldberg left 04:34 CQ2 joined 04:37 CQ2 is now known as CQ 04:38 adhoc left 04:39 adhoc joined 04:44 adhoc left, quester joined 04:45 adhoc joined 05:00 adhoc left 05:02 adhoc joined 05:09 adhoc left 05:11 adhoc joined 05:16 adhoc left 05:17 adhoc joined 05:20 perlfan joined
sammers @flussence thanks, that will work for now... 05:20
perlfan hello new to IRC 05:21
05:22 perlfan left 05:23 perlfan joined, adhoc left 05:24 adhoc joined
skids o/ 05:25
05:27 perlfan left 05:29 adhoc left 05:31 adhoc joined 05:32 skids left 05:33 Ben_Goldberg left 05:36 adhoc left 05:37 adhoc joined
AlexDaniel camelia in mono looks dead 05:40
05:43 adhoc left 05:44 adhoc joined
AlexDaniel is so happy with the current logo. 05:44
AlexDaniel does not understand why would somebody want to hurt Camelia by saying that she does not look professional 05:45
05:50 adhoc left 05:51 adhoc joined 05:56 adhoc left 05:57 adhoc joined 05:58 vendethiel joined 06:01 ChristopherBotto joined 06:02 khw left 06:03 adhoc left, adhoc joined 06:09 adhoc left 06:11 adhoc joined 06:19 adhoc left 06:21 adhoc joined 06:22 vendethiel left
nine Oh, we've hada a Camelia rant again... always when I sleep. But apparently Camelia did her job well :) 06:31
06:32 pierre-vigier joined, littlebutterfly joined 06:34 littlebutterfly left 06:47 geraud left 06:48 snarkyboojum left 06:52 AlexDaniel left 07:01 bjz joined 07:13 bjz left 07:14 darutoko joined 07:16 bjz joined
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
screw the haters :D
07:40 Sqirrel joined 07:54 rurban joined 07:57 adhoc left 08:00 CIAvash joined 08:03 abraxxa joined 08:10 flaviusb joined 08:16 km3 joined
Woodi hallo today :) 08:25
lizmat Woodi o/ 08:26
good *, #perl6!
08:27 rindolf joined 08:29 Actualeyes left
Woodi do penguin is professional enought ? :) www.photography-match.com/views/ima...per_18.jpg 4.bp.blogspot.com/-QF6q-hf66KQ/TYnc...ils876.png 08:31
realy, it (moustly) does not matter 08:32
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
worth reporting?
08:35 adhoc joined
moritz llfourn: yes 08:36
llfourn kk
El_Che hi liz 08:40
hi everyone else :)
08:40 Ven joined 08:43 adhoc left 08:45 adhoc joined
Woodi o/ 08:46
08:49 adhoc left
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
sorry, wrong channel
08:51 adhoc joined
masak good morning, #perl6 08:54
jnthn morning, #perl6 09:01
DrForr Mornin'. 09:02
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
also morning masak et al
09:13 RabidGravy joined 09:16 quester left 09:17 CIAvash left
grondilu I have a module in ./lib and it seems that perl6 doesn't re-compile it after I edited the file. 09:19
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:20
so IMHO our spectests are not reliable atm :-( 09:21
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
Didn't have time to look at what's actually going on there
bartolin_ while looking at the aborts I also found some weird behaviour which seems to involve 'use v6', routine supply, method tap and SPESH: gist.github.com/usev6/6280b4010aabeada760f
jnthn
.oO( SPESH makes PERL run faster! :P )
09:24
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
09:25 n0xff joined
bartolin_ that sounds plausible, yeah 09:25
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
jnthn So it could well be that
It doesn't crash on Windows either
I can quite imagine a BSD being engineered to cope with freeing the locked mutex.
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
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
bartolin_ jnthn: S17-supply/syntax.t currently dies on FreeBSD :-/
jnthn Ah, then maybe it's just another "getting lucky"
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
jnthn It needs folks who can actually deal with the guts
lizmat commutes :-)
jnthn: maybe diakopter can help ? 09:29
jnthn Maybe :)
bartolin_ (folks who can actually deal with the guts)++
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 )
jnthn I don't have much to do besides Perl 6 for the coming week or so :)
bartolin_ \o/ 09:32
09:33 robertle joined
lizmat jnthn: I wonder if the El_Che script isn't the easiest to debug, and maybe the same underlying cause 09:33
jnthn lizmat: It's *possible*, but it didn't immediately show the same symptoms 09:34
(A hang rather than an abort)
lizmat jnthn: it aborted for me
jnthn But if it's somehow a lock scoping confusion...then yeah, maybe.
lizmat consistently, in the 70th or 77th iteration 09:35
jnthn Oh...the stack traces I got showed a hang
Ah, then maybe it is the same
I'd thought it was hanging for you also
So yeah, it could be a good one.
lizmat double checks 09:36
nine grondilu: I assume you are on a current rakudo? 09:38
grondilu I am
well, almost
grondilu just pulled
nine grondilu: what system are you on? 09:39
grondilu debian jessie, 32bits
nine And I assume you don't have any weird mount options that would prevent mtime of files getting updated? 09:40
grondilu: I can confirm the bug locally 09:41
grondilu ok
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 ? :)
grondilu it's quite annoying. I can't do any local development of my modules :(
(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...
grondilu I'm suspecting the recent updates of DateTime
lizmat jnthn: Run 63Abort trap: 6 # with MVM_SPESH_DISABLE=1
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
grondilu ok good 09:45
jnthn lizmat: OK, thanks for checking 09:48
jnthn going to relax a little more from travel, before he digs into hacking on stuff :) 09:49
bbiab
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:51
lizmat robertle: not sure, but if you want to make sure it is done in a separate thread, use a start block 09:52
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
By default, that is the work queue of a thread pool scheduler
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...
jnthn: thanks, that's what I was hoping. and thats also quite awesome
lizmat from what jnthn just said, I would say no
jnthn really goes for that rest :) 09:55
&
09:57 _nadim left 09:58 _nadim joined 09:59 adhoc left
_nadim Good morning 10:00
10:00 adhoc joined
_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:02
dalek kudo/nom: 3e2ef33 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
Fix regression on outdating precomp files

Trying not to overwrite already existing precomp files made updating outdated precomp files regress again. Instead of further complicating the check or sprinkling :force flags everywhere, we now just delete outdated precomp files on sight.
Thanks to grondilu++ for reporting!
10:06
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 yeahnoob left, bpmedley joined 10:11 espadrine joined
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…»
grondilu m: say my @ = first { .[0] %% .[1] }, (^8).pick(2) xx *;
camelia rakudo-moar 3e2ef3: OUTPUT«[...]␤»
grondilu ^not sure what's going on here 10:13
m: say my @ = first { .[0] % 1 }, (^8).pick(2) xx *; 10:14
m: say my @ = first { .[0] % 3 }, (^8).pick(2) xx *;
camelia rakudo-moar 3e2ef3: OUTPUT«(timeout)»
rakudo-moar 3e2ef3: OUTPUT«[...]␤»
grondilu m: say .perl given my @ = first { .[0] % 3 }, (^8).pick(2) xx *;
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␤␤»
grondilu how can "first" return a lazy list? Shouldn't it be eager? 10:15
m: say my $ = first { .[0] % 3 }, (^8).pick(2) xx *;
camelia rakudo-moar 3e2ef3: OUTPUT«(...)␤»
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
but I can't reproduce :/
lizmat grondilu: because the original list is lazy ?
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.
lizmat grondilu: checking the code, I don't think first returns a List ever ? 10:18
grondilu lizmat: yeah, my bad. There is no reason for first to be eager. 10:20
10:21 brrt joined
brrt good * #perl6 10:22
lizmat brrt o/
brrt \o lizmat
lizmat is still working on slides 10:23
brrt oh, for LPW?
will it be recorded?
stmuk the main sessions are almost certainly recorded 10:24
lizmat and I guess mine could be considered a main session
being the closing keynote and all 10:25
DrForr Mine is just a warmup :)
brrt oh, cool 10:26
stmuk plugs act.yapc.eu/lpw2015/talk/6470 <=-- click on add to schedule 10:27
10:28 zakharyas joined
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?
nine llfourn: I wish there were :/ 10:29
llfourn nine: thanks. At least all the time I've been waiting for things to recompile has not been unnecessary :) 10:30
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
llfourn: it becomes a monolithic web of precomped files, that are basically statically linked
nine You can modify MoarVM 10:34
10:38 Ven left
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
I am talking about p6 at sydney.pm next week
lizmat github.com/edumentab/rakudo-and-nq...als-course
llfourn: ^^^
arnsholt llfourn: NQP is a bootstrapping compiler
yoleaux 10 Dec 2015 20:19Z <ZoffixW> arnsholt: you have some PRs waiting, some since March: github.com/arnsholt/Algorithm-Viterbi/pulls
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
llfourn arnsholt: I guess I need to understand what that means at a concrete level
arnsholt Then that compiler was extended so that an NQP compiler could be implemented in NQP 10:41
llfourn arnsholt: ahhhh
now I do understand. That was kinda missing from everything I read.
(understand a bit)
there was a presentation on jnthn.net "Implementing Perl 6, in Perl 6, on Parrot" 10:42
but it 404s atm :P
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
llfourn it is still implemented in parrot? 10:43
or the compiler that's used was originally generated from parrot I guess is the question
arnsholt There's stage0 code for all three NQP backends: Parrot, Moar and JVM 10:44
pmichaud's original code is around somewhere, I think. Probably in the Parrot repo
llfourn I am looking at: github.com/perl6/nqp/tree/master/s...oar/stage0
arnsholt Yeah, that's just bytecode 10:45
llfourn so nqp.moarvm was...generated by parrotvm?
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
llfourn fascinating :D 10:46
arnsholt Anyways, you don't really need to care too much about the bootstrapping stuff
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
thanks for your help :) 10:48
10:55 pierre-vigier left
lizmat commute to London& 10:55
10:58 iH2O joined
_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:01
11:01 brrt left 11:04 rindolf left
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 11:09 andreoss joined
_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:11
andreoss > Could not find Shell::Command:ver<True>:auth<True>:api<True> in: 11:18
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?
andreoss RabidGravy: i did, and panda is not working since 11:20
11:20 koo8 joined
andreoss also it gives this warning while bootstraping 11:20
RabidGravy guesses a "rakudobrew self-upgrade" was required 11:23
andreoss Use of uninitialized value %ENV of type Any in string context 11:24
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in sub MAIN at bootstrap.pl:64
RabidGravy: it did not help 11:25
11:28 Ven joined, flaviusb left
jnthn vytas: Thanks, I'm quite sure we will have a nice time, just sadly not with my family. 11:29
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:32
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
11:33 ab6tract joined 11:35 gensym joined
jnthn Down to 15 xmas RTs :) 11:36
nine: Is my best bet to just review that branch?
nine: And do you have a 1-sentence summary of the direction? :)
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
nine jnthn: I think the commit messages should give a pretty good picture 11:38
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:39
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.
jnthn nine: :from becomes part of the dependency spec?
nine ab6tract: I was always hoping that someone becomes annoyed enough to just go and fix them. Should be trivial patches :) 11:41
jnthn: yes
Ven jnthn++ nine++ :)
stmuk nine: I did try that but failed :/
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'"
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, lucasb joined
jnthn m: say (-> --> Int { fail })().WHAT 11:44
camelia ( no output )
jnthn m: say (-> --> Int { return })().WHAT
camelia rakudo-moar 3e2ef3: OUTPUT«Attempt to return outside of any Routine␤ in block <unit> at /tmp/Oyx_A6eiTK:1␤␤»
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␤»
ab6tract when did we lose read-only bind??? 11:46
11:46 _nadim left
ab6tract guys i feel like i am going crazy the past few weeks with rakudo changes :( 11:46
11:46 _nadim joined
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?
jnthn ab6tract: This is the last chance to clean up remaining semantic issues, so *of course* we're taking it.
ab6tract gotcha
jnthn ab6tract: We've specifically decided to defer it to after Christmas 11:48
(::= that is)
ab6tract okay, thanks for the clarification
jnthn The language churn will settle down soon. :)
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
hahainternet jnthn: where should i read to understand why [["hi"]] returns an Array of Str but [["hi"],] does as expected
i tried to spot it in the docs but didn't find anything concrete
moritz hahainternet: doc.perl6.org/type/List#Items%2C_Fl...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?
hahainternet moritz: maybe i'm stupid but i couldn't see anything explicit there 11:51
i'll re-read
jnthn hahainternet: That's known as the single arg rule. design.perl6.org/S07.html#The_singl...ument_rule
Bottom section has it
hahainternet jnthn: perfect thank you :)
jnthn It's the WAT of a consistent rule to make many other things DWIM
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:52 RabidGravy left
ab6tract nine: "processes" ? not that i know of, unless you count threads or qq:x 11:53
nine: appears to be related to a 'no precompilation;' statement i had included in a loaded module 11:54
which is necessary for proper functionality, as that loaded module will determine the size of the current terminal window 11:55
11:56 brrt joined, leont joined
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:57 uruwi left
andreoss $ perl6 -e 'use Shell::Command;' 11:58
===SORRY!===
Could not find Shell::Command:ver<True>:auth<True>:api<True> in:
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
andreoss: I'd nuke the rakudo installation and try again with the most up to date versions of rakudo and panda 12:00
12:01 km3 left 12:03 aigan joined 12:07 rindolf joined
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?␤»
jnthn Don't think it's a bug; you get a $_ declared automatically. 12:10
So you're redeclaring something that already is there. 12:11
llfourn m: my $_ = '';
camelia rakudo-moar 3e2ef3: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $_␤ at /tmp/WQhTh2M9BR:1␤ ------> 3my $_7⏏5 = '';␤»
llfourn ah right. My bad.
jnthn Every block gets one
So you never need to declare it 12:12
llfourn makes sense. I was thinking in dynamic land I guess.
andreoss m: sub { my $^x = 1 } ();
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…»
andreoss m: my &z = sub { my $^x = 1 } ; z(); 12:13
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 TEttinger left
andreoss m: my &z = { my $^x = 1 } ; say z(4); 12:14
camelia rakudo-moar 3e2ef3: OUTPUT«1␤»
jnthn Not sure it's too wise to let you "my" those... :)
It seems it ends up doing the right thing though :)
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␤␤»
jnthn I'd say that's right too; rw-ness is rare enough to make folks write a signature. 12:17
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);
camelia rakudo-moar 3e2ef3: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/uPA1JdJBCz:1␤␤»
jnthn o.O
moritz: No. :P 12:19
moritz jnthn: :-)
jnthn { $^x = 1 } is the same as -> $x { $x = 1 }
andreoss why $_ is rw but $^x is not? for historical reasons? 12:20
moritz yes 12:21
andreoss so it makes $^x is more favorable default variable now
jnthn Well, I'd say it's a decent balance too
$_ is mostly about convenience 12:22
And a bunch of convenient patterns want it mutable
12:22 yqt joined
jnthn The commonest parts of a language are the ones where inconsistency is most allowable. 12:22
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)␤»
Juerd m: say $ //= do { say "run"; 42 } for 1, 2; 12:26
camelia rakudo-moar 3e2ef3: OUTPUT«run␤42␤42␤»
_nadim How can I know if something is a BOOTSTRATATTR? since get_value doesn't work on them 12:27
Juerd jnthn: Like that?
jnthn Juerd: Yes, that's the output I'd expect
timotimo m: (^100).hyper.map(*.say) 12:28
camelia ( no output )
Juerd I'm looking forward to a readable version of $ //=do :)
timotimo jnthn: did you notice this? ^
jnthn Though a little fragile
timotimo: yes, people have only told me about it 50 times by now :)
It's on le todo list :)
Were you working on some tests for it, btw? 12:29
jnthn wrote none :/
Skarsnik hello 12:30
_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
Skarsnik: morning
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, kid51 joined
jnthn _nadim: Maybe; we'll probably try to eliminate more of them in time 12:34
12:35 lucasb left
jnthn They're kinda ugly, but bootstrapping stuff usually is. 12:35
timotimo jnthn: all right! i have a few tests i can push 12:36
i just have to Todo-fudge them %)
jnthn Yes :) 12:37
Did you do some for hyper vs. race?
timotimo aye
jnthn cool
timotimo but they are just copy-pasted and put .sort on the results before comparing
jnthn That's OK
timotimo and they don't test batch and the other parameter
jnthn *nod*
It's a start :)
siriu5b hi ... got a question. It seems i already have the answer btw ... *unpack* not available yet ? 12:39
dalek ast: 60af242 | timotimo++ | .gitignore:
ignore .precomp folders
ast: 7871621 | timotimo++ | S07-hyperrace/ (2 files):
test .hyper and .race a little bit
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
siriu5b ( unpack used at line 62. Did you mean 'pack'? ) 12:40
timotimo unpack is a method on Blob and Buf, AFAIK
perhaps it's just not available as a sub
12:40 kid51 left
andreoss nine: nuking moar-nom resolved the issue with Shell::Command, but now i'm getting the same error with other modules 12:40
12:41 dj_goku joined
timotimo m: Buf.new(20, 21, 22).unpack("a*").say 12:41
12:41 dj_goku left, dj_goku joined
camelia rakudo-moar 3e2ef3: OUTPUT«␤» 12:41
timotimo oh, those are not where letters are
m: say "a".ord
camelia rakudo-moar 3e2ef3: OUTPUT«97␤»
timotimo wow, i missed by quite a bit
m: Buf.new(97, 98, 99, 100).unpack("a*").say
camelia rakudo-moar 3e2ef3: OUTPUT«abcd␤»
timotimo BBIAB
siriu5b got it ! 12:42
thanks =)
jnthn timotimo: Cool, thanks. Having tests already will save me a bit of time :) 12:43
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?
jnthn You can't modify a type object by definition :) 12:45
You can SomeType but ARole 12:46
Which gives you back the type that an instance of SomeType would end up with if you did $the-instance does ARole
12:46 pierre-vigier left
nine andreoss: but you could install panda? 12:46
12:47 uruwi joined
_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:47
jnthn _nadim: What are you working on, ooc? 12:49
_nadim jnthn: a dumper
jnthn Ah
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
jnthn: not black listing them, they still need to be dumped, not the BOOTSTARAPATT elements but the value it has
I'd be happy if I could just say is this a bootstrapattr then do this ... 12:51
ie if I can query the bootstrapattr-edness of a variable 12:52
12:53 kaare_ joined
jnthn I'd probably just wrap a try around the .get_value and just note the value is unavailable if it fails 12:54
_nadim or maybe a can('get_value') could work too 12:56
jnthn Or that
Or .?get_value 12:57
_nadim aha? what is .?get_value, looks like somehting I like already, 12:58
jnthn .?foo = call foo if it exists, otherwise Nil
m: say 'foo'.?flip
camelia rakudo-moar 3e2ef3: OUTPUT«oof␤»
jnthn m: say 'foo'.?filip
camelia rakudo-moar 3e2ef3: OUTPUT«Nil␤»
_nadim hmmmmmm tasty
Skarsnik hm, is there a variable to know the p6/rakudo running version? 12:59
nine $*PERL.version 13:00
or $*PERL.compiler.version
Skarsnik Oh thx :)
_nadim jnthn: Method 'dispatch:<.?>' not found for BOOTSTRAPATTR :) 13:01
jnthn d'oh :) 13:02
Yeah, we really don't like folks poking around there. :P 13:03
Probably will have to go with the try approach
_nadim jnthn: Method 'can' not found .... 13:04
jnthn Told you.
_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
They're just an implementation artefact that will vanish at some point when we figure out how.
13:05 domidumont joined
_nadim I get that, the problem, I believe is that object.attributes returns them, not Str, Int, ... Let me chech that theory 13:07
13:08 cognominal joined 13:10 prammer joined
_nadim jnthn: wrong theory, what I have is a Match object, it's attributes are of type BOOTSTRAPATTR, other objects dont. 13:11
jnthn: I'll try to find out which one it is
timotimo you know
when we see an undefined sub 13:12
we could actually check if classes from the setting offer that as a method
dalek kudo/nom: 2342af8 | timotimo++ | t/spectest.data:
run hyper/race tests
13:13
daxim pong
timotimo yo daxim :)
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".
Problem: the compilation of modules fails because 'gen/moar/stage2/QRegex.nqp' is missing (See paste.debian.net/343291/)
jnthn daxim: Think she's probably on the road at the momnet
daxim so am I! hola from barcelona!
timotimo domidumont: that means your nqp and rakudo weren't matching 13:15
dalek kudo/nom: de52f97 | jnthn++ | src/Perl6/Actions.nqp:
Fix once inside of statement of statement-mod for.
timotimo oh, hum.
actually that comes from gen/moar/m-main.nqp, which surprises me a little bit
dalek ast: 520b273 | jnthn++ | S04-statements/once.t:
Tests for RT #114914.
domidumont The missing file is generated when nqp is compiled, but this file is not delivered in nqp package 13:16
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.
jnthn _nadim: Yes, in an ideal world. The world is not ideal. 13:18
_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 :)
moritz being confronted with low-level stuff is an inevitable consequence of introspection
_nadim: why are you introspecting at all?
_nadim jnthn: Yes we think alike
moritz: writting a dumper
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? meetup.com/Vienna-Perl-Mongers/events/227358103 news.ycombinator.com/item?id=10565555
_nadim True but the results inside a Match are of interest
13:21 znpy joined
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
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 :)
_nadim Bon appetit
moritz _nadim: the MOP isn't really public interface
timotimo bon appetit :)
13:22 oscar___ joined
_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:24
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.
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␤␤»
moritz m: say Match.^attributes().elems
camelia rakudo-moar 3e2ef3: OUTPUT«7␤»
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␤␤»
moritz m: say Match.^attributes().grep({$_.^isa(Attribute)}).elems
camelia rakudo-moar 3e2ef3: OUTPUT«5␤»
moritz _nadim: it seems .^isa(Attribute) is a working check for that
(for the opposite, that is)
13:28 oscar___ left
_nadim hmm, nice an attributes list that doesn contain attributes ;) I'll check immediately 13:28
Skarsnik *not sure what to think of the time at the bottom www.nyo.fr:1080/fimstuff/stats_230097.html * It seem slow for a I7 x) 13:30
masak Perl 6 day today! \o/ 13:31
13:31 Ven left
andreoss nine: yes, panda is working now 13:32
13:33 Ven joined 13:38 loren joined
loren Evening, perl6 .. 13:39
DrForr Afternoon.
loren m: say (1, * + 3 ... 7); say (1, * + 3 ... 6);
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…»
_nadim moritz: this feel much more fool proof, thank you for the ^isa tip
loren when i give '6' is not a value in range, the list become so long 13:40
{list}{range} 13:41
Is it a bug ? or something else
13:43 brrt left
lucs How does a method of a grammar's actions signify "no match here actually"? 13:43
loren ^_^ Em ??
lucs (if that makes any sense) 13:44
For example, a token matches <num> as \d+, but if it turns out that the number is 42, consider it as not matching. 13:46
loren m: say 42 ~~ /\d+/; 13:47
camelia rakudo-moar de52f9: OUTPUT«「42」␤»
lucs loren: I know that much :)
I'm not being clear I guess. Let me try to rephrase... 13:48
loren lucs, em 13:49
lucs, print some debug msg may be help ..
arnsholt lucs: You can't do that in an action 13:50
But you can use code assertions in the regex part with <?{ ... }>
moritz well, you can always throw an exception
lucs arnsholt: Aha, I'll try with that, thanks. 13:51
moritz which aborts the parse
which is what rakudo uses all over the place
arnsholt Oh, true, true
loren m: say (1, * + 3 ... 6 );
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…»
loren moritz, why the range become so long ..
lucs Hmm... Aborting the whole parse? Maybe overkill, but I'll see. 13:52
arnsholt loren: It needs to hit the limit exactly 13:53
m: say (1, * + 3 ... 7 );
camelia rakudo-moar de52f9: OUTPUT«(1 4 7)␤»
loren Em, arnsholt 13:54
It is difficult to understand ...
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
moritz m: say (1, *+3 ...^ *> 6)
camelia rakudo-moar de52f9: OUTPUT«(1 4)␤»
timotimo seeya everyone!
moritz m: say (1, *+3 ... *> 6)
camelia rakudo-moar de52f9: OUTPUT«(1 4 7)␤»
moritz loren: ... only stops when a generated element matched the thing on the right-hand side 13:55
loren I just think a kind of operator's behavior should be consistent, that sames strange for me . 13:56
colomon loren: it *is* consistent. 13:57
loren: what it consistently does is smart match the RHS against the most recent element in the sequence.
loren ..And i know how to do , thks moritz, arnsholt 13:58
colomon loren: and it stops when the smartmatch is true
masak m: say (1, 3, 5 ... 12)
camelia rakudo-moar de52f9: OUTPUT«(1 3 5 7 9 11)␤»
masak colomon: except in that case.
colomon masak: !
who put that back?
masak TimToady
colomon glares 13:59
masak I can probably get you the spec commit.
colomon m: say (5, 3, 1 … 12)
camelia rakudo-moar de52f9: OUTPUT«()␤»
loren Strange for normal user, i think it should be a *real* range
colomon argh
m: say (5, 3, 1 … -1) 14:00
camelia rakudo-moar de52f9: OUTPUT«(5 3 1 -1)␤»
colomon m: say (5, 3, 1 … 12)[0]
camelia rakudo-moar de52f9: OUTPUT«Nil␤»
masak loren: um, but the range operator is infix:<..>, not infix:<...> 14:01
colomon: ah. f752ddb5. April this year. 14:03
loren em, oh.
masak +When there is a deduced function from the last three values, and when
+there is a limit that "misses" but is suitably literal and of a similar
+type (that is, a numeric value for a numeric sequence, or a string value
+for a string sequence), then the deduced function will attempt to detect
+when the limit would be bypassed, and stop the sequence right there
+instead of running off to infinity
14:04 Upasaka joined
colomon masak++ 14:04
masak and this seems to be the motivation in the backlog: irclog.perlgeek.de/perl6/2015-04-09#i_10413093 14:06
lucs I need some help with my "don't actually match": gist.github.com/lucs/cd3e912f20d6953f480b 14:09
loren masak ++ 14:10
lucs I'm not sure where to save the state exactly. 14:11
DrForr lucs: It'll still match 'bbX' - Is your description correct?
lucs DrForr: Yes, it's currently broken.
DrForr (reading line 7)
lucs I'm not sure how to make it work cleanly. 14:12
DrForr ('a'|'b'|'ab'|'ba')? 'X' # if you just enumerate explicitly.
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
unless we expect that 'no precompilation;' has special requirements, at which point those requirements should be explicit :S 14:13
14:14 andreoss left, robertle left
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:14
14:15 uruwi left, ChristopherBotto left
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"
DrForr: Oh, could be. (suggestions welcome!) 14:17
loren lucs, I try it , it success match 'aaX', not match 'cX'
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
lucs loren: Right, that part works :) 14:19
14:19 brrt joined
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.
DrForr loren - Look at line 7 of his gist.
14:22 uruwi joined
loren DrForr, oh sorry .. 14:22
14:22 Ven left
DrForr You can probably do this with <![ab]>, not sure if that'd still be exponential. 14:22
loren: No problem, just pointing out what you might've missed.
nine ab6tract: is the code available somewhere? 14:23
14:23 zakharyas1 joined
loren It's a little different for me .. 14:23
It's a little difficult for me .... 14:24
14:24 skids joined, Ai joined 14:25 Ai is now known as Guest99950, zakharyas left, Guest99950 left
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:26
moritz $str eq any @elems.permutations.map(*.join) 14:28
not very performant though :-)
loren oh, lucs , I think understand that..
DrForr Or just sort the elements and count multiples.
No need to sort if you're counting, come to think of it.
moritz not so trivial
$str = 'ababab', @elems = ('ab', 'abab')
if @elems isn't free of prefixes, this can be a really nasty problem, I think 14:29
14:29 sammers left
orbus greetings folks - don't want to interrupt, but I have a question 14:31
I'm trying to understand the differing behavious of the the subroutine start, vs. Promise.start 14:32
brrt hi orbus
orbus hi
brrt good question
orbus yeah, subroutine start doesn't seem to be very well documented 14:33
moritz m: say await start 42
camelia rakudo-moar de52f9: OUTPUT«42␤»
loren lucs, may be can u use a hash
orbus but they do seem to behave differently
loren lucs, may be u can use a hash
moritz orbus: it's not a subroutine, it's a special syntactic form
orbus okay
ab6tract nine: github.com/ab5tract/Terminal-Print
lucs moritz: Right, that's too much generality I guess (and more than I need).
brrt can you elaborate on how they differ for you?
lucs loren: But where do I keep it? 14:34
orbus yeah, I threw together an example
hang on
ab6tract the 'no precompilation;' statement is current coimmented out in Terminal::Print::Commands
moritz orbus: which optionally takes an expression, not a block
ab6tract *currently
orbus say I do this
my $p = start {sleep 2; 'b'};
say 'a';
say $p.result;
loren m: my @x< a a X>; say keys(%(@x X=> True));
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));␤»
orbus result is a
b
loren m: my @x = < a a X>; say keys(%(@x X=> True));
camelia rakudo-moar de52f9: OUTPUT«(X a)␤»
orbus and if I do 14:35
my $p = Promise.start({sleep 2; 'b'});
say 'a';
say $p.result;
result is the same
but
nine ab6tract: cloned the repo. What do I have to do to reproduce?
orbus if I do this
my $p = start sub{sleep 2; return 'b'};
say 'a';
say $p.result;
a 14:36
sub () { #`(Sub|81191480) ... }
I get that back
jnthn That's 'cus it's the same as start { sub{sleep 2; return 'b'} }
orbus whereas with Promise.start it accepts a function reference just fine and returns b like I expected
ab6tract uncomment the 'no precompilation;' on line 5 of lib/Terminal/Print/Commands.pm6 and try running one of the examples
perl6 examples/matrix-ish.p6 is a fun one :)
orbus jnthn: hmmm 14:37
14:37 znpy left
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!
jnthn It's not a subroutine.
brrt m: my &foo = sub { say "a"; return $b; }; my $p = start &foo; say $p.result;
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␤»
orbus okay
jnthn So yes, that's an intentional difference.
ab6tract jnthn: ah! is that what thunking means? :D
loren lucs, sort is a good idea, but 'cX' still not matched i think..
brrt m: my &foo = sub { say "a"; return 'b'; }; my $p = start &foo; say $p.result;
camelia rakudo-moar de52f9: OUTPUT«sub () { #`(Sub|88656720) ... }␤»
brrt m: my &foo = sub { say "a"; return $b; }; my $p = start foo; say $p.result;
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;␤»
jnthn ab6tract: Well, in general in Perl 6, it means "you didn't write curlies around something but we'll pretend you did"
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␤»
brrt aw, cool
14:38 brrt left
ab6tract jnthn: cool, i've been wondering about that for a long time. love do-thunking, by the way! 14:38
orbus yeah, I guess I get it - it just seems a little counterintuitive 14:39
start wasn't well documented that I could find
Promise is
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␤»
lucs loren: I think arnsholt's suggestion of using <?{...}> will lead me to a solution. I'll tell you later.
orbus like that works, and I didn't expect it to
loren lucs, OK!
orbus but with Promise.start it would fail unless you wrapped it in curlies
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
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. :)
orbus I guess I just expected if you passed it a sub reference it would just work
yeah, probably
I've been poking at it a little bit, but I still work mostly with perl5 14:43
oh, jnthn - while I have your attention, I was curious about the status of moarvm on platforms that aren't x86 linux 14:44
I was looking at building on sparc solaris 10 a while back and I never could get it going
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)
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
jnthn Which includes Windows, OS X, Linux, various BSDs...
We did a bunch of work for Big Endian support too
orbus I finally did get it to compile after patching a couple things, and playing with defines
but then it segfaulted
jnthn So shouldn't just be restricted to x86/x64
orbus okay - this was a few months ago 14:47
maybe I'll try again with a newer tree
I think the build I finally managed would run enough to spit out like -version
or -help
but if you tried to build nqp it blew up
moritz nine, jnthn: is anybody looking into the require ::('DBDish::mysql') problems that DBIish runs into right now?
orbus alright, thanks folks - time to head to the office 14:50
nine moritz: do you have a ticket or issue for me ?
orbus really looking forward to digging into perl6 though - especially the concurrency stuff
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 :)
moritz nine: rt.perl.org/Ticket/Display.html?id=126816
jnthn orbus: Otherwise we'll probably accidentally bust stuff that we already made work...
orbus jnthn: yeah - probably. And I realize Solaris 10 is kind of ancient history
jnthn orbus: But, so much to worry about at the moment... :)
orbus but a lot of people are still stuck on it
oh yeah, I know
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
well, best of luck - I'll have another go at building on solaris and maybe pop into #moarvm when I have time
thanks all!
jnthn Let us know how it goes :-) 14:54
ab6tract nine: keep in mind that t/basics.t has some known failures in it, in case you come across it 14:57
14:58 sufrostico joined
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
jdv79 ab6tract: nice advent. be cool if there was a link to a more thorough treatment of youz guyz adventures that night
moritz Skarsnik: not right now; maybe tonight 14:59
Skarsnik ok thx
nine moritz: I do have evidence supporting my idea
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 15:02 andreoss joined, CQ left, CQ2 is now known as CQ 15:04 Ven joined
andreoss why does perl6 try to append with :ver<True>:auth<True>:api<True> to modules name I use? 15:06
15:06 Ven left 15:07 Ven joined, ZoffixW joined
ZoffixW andreoss, what makes you think it does? 15:07
andreoss $ perl6 -e 'use _007'
===SORRY!===
Could not find _007::Runtime::Builtins:ver<True>:auth<True>:api<True>
15:08 Ven left
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
ZoffixW andreoss, that's fine. It's 'cause you can specify those three things.
15:08 Ven joined
ZoffixW colomon, how come the Issues are closed for github.com/colomon/io-prompter ? It's currently failing tests and I don't see a bug tracker to report the issues at 15:08
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
|Tux| test 50000 21.927 21.819
test-t 50000 19.958 19.850
csv-parser 50000 24.676 24.568
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<...>?
why True is there?
colomon ZoffixW: it’s possible recent changes have made it fixable
ZoffixW andreoss, yeah, but that was because of precomp stuff
colomon ZoffixW: but I don’t have time at the minute to look at it.
ZoffixW colomon, k, I'll try to remember to look at it when I get a chance :)
andreoss, True in there means "any value" 15:11
andreoss, so it's looking for module named _007 any with value set for the :ver, :auth, and :api adverbs
andreoss, where is that module located?
andreoss ZoffixW: so it basiically means that the module i try to use is not installed properly
ZoffixW andreoss, it's not finding it right.
andreoss, where is it located? 15:12
er,
andreoss, weird that it's looking for _007::Runtime::Builtins 15:13
andreoss, so the it's some module used by your _007 that's missing
andreoss :ver<Any>:api<Any> would be much nicer to see
or even :ver<*>
ZoffixW andreoss, but that a completely different meaning
m: 42 ~~ Any 15:14
camelia ( no output )
ZoffixW m: say so 42 ~~ Any
camelia rakudo-moar de52f9: OUTPUT«True␤»
ZoffixW hm
m: say so Any ~~ 42
camelia rakudo-moar de52f9: OUTPUT«Use of uninitialized value of type Any in numeric context in block <unit> at /tmp/ay79c2BR0t:1␤False␤»
ZoffixW m: say so * ~~ 42
camelia rakudo-moar de52f9: OUTPUT«WhateverCode.new␤»
b2gills timotimo: the race tests don't actually call race, they call hyper
andreoss "use Module of any version available"?
vs. "use Module of True version available"
what a True version?
ZoffixW m: say so True ~~ 42 15:15
camelia rakudo-moar de52f9: OUTPUT«False␤»
ZoffixW m: say so 42 ~~ True
camelia rakudo-moar de52f9: OUTPUT«True␤»
ZoffixW m: say so 42 ~~ *
camelia rakudo-moar de52f9: OUTPUT«WhateverCode.new␤»
ZoffixW andreoss, agreed, * or Any in the error would be nicer 15:16
It's a bit saddening to see so much bitrot in our ecosystem, considering just how small it is... 15:19
lucs Okay, this -> <- close to solving my ab thing. Question: 15:21
ZoffixW ab thing? Going for the 8-pack, eh :)
lucs (not sure how to say it, hang on...)
ZoffixW: No, silly :) 15:22
zengargoyle antici....
lucs Rooughly: can a grammar have lexically scoped vars to do its work?
s/o//
DrForr lucs: Can I see the latest? 15:23
15:23 atta joined, RabidGravy joined
DrForr (rewriting a grammar-based talk tonight.) 15:24
lucs DrForr: Um, not quite presentable yet, but Real Soon Now!
DrForr Eeh, you think that's bad, check github.com/drforr/perl6-ANTLR4/blo...Grammar.pm ... 15:25
15:25 ChristopherBotto joined
lucs I'd like to do something like this: for ... { my $foo; $grammar.parse; } # $grammar, and only $grammar should see $foo. 15:26
DrForr: That's a nice big one for a presentation, eh :)
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
DrForr I'm curious as to why you have variables in the grammar in the first place... usually it's in the action.
jnthn Well, Perl 6's grammar has plenty of dynamics 15:28
15:28 _nadim left
lucs I'll show you guys something that works soon (hopefully). 15:29
dalek kudo-star-daily: 412da6c | coke++ | log/ (2 files):
today (automated commit)
15:30 uruwi left 15:31 kyclark joined
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: colabti.org/irclogger/irclogger_log...12-11#l881
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
dalek ast: 0bc8cac | (Brad Gilbert)++ | S07-hyperrace/race.t:
S07-hyperrace/race.t should test race, not hyper
ast: 7b0fc11 | jnthn++ | S07-hyperrace/race.t:
Merge pull request #86 from b2gills/patch-1

S07-hyperrace/race.t should test race, not hyper
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
tadzik vytas: can you reproduce it without installing Task::Star, just trying URI/Grammar::Debugger over and over?
vytas tadzik, let me try 15:35
abraxxa what does the error message 'Default constructor for 'Pointer' only takes named arguments' mean?
the line in question is my $valuep := Pointer[num64].new($value);
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
camelia rakudo-moar de52f9: OUTPUT«144␤»
[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.
kyclark b2gills: interesting! thanks
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.
ZoffixW vytas, that's already logged: 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.
vytas Zoffix, rerunning it passed tests :/
nine [Coke]: ulimit would not help with a deadlock
kyclark How can I do something like this in P6? map { $_ * 2 } [1,2,3] 15:39
15:39 AlexDaniel joined
ZoffixW m: say map { $_ * 2 }, 1,2,3 15:40
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
ZoffixW m: say [1,2,3].map({$_ * 2})
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
kyclark Ah, missing a comma
Ye olde map didn't take that
ZoffixW m: say [1,2,3].map(* * 2) 15:41
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
ZoffixW \o/
m: say [1,2,3]»*
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␤»
kyclark Right, so what is the diff b/w * and $_ in the map block?
ZoffixW kyclark, the version with the * did not have a block :)
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?
AlexDaniel kyclark: well, here is a helpful error message
b2gills If it is simple don't bother with a block
AlexDaniel m: say [1,2,3].map({* * 2})
DrForr m: say <1 2 3>.map{* *2}
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…»
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␤␤»
ZoffixW heh
DrForr m: say <1 2 3>.map(* *2) 15:43
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
AlexDaniel m: say <1 2 3>.map: {* *2}
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…»
b2gills m: my &squared = * ** 2; say squared 12
kyclark Is there a way to write the map using the >> hyperoperator and a partially bound sub? Something like [1,2,3]>>($_ * 2)
camelia rakudo-moar de52f9: OUTPUT«144␤»
b2gills m: say (1,2,3)».&(* * 2) 15:44
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
moritz is scared of b2gills
b2gills m: say (1,2,3)».&({ $_ * 2})
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
b2gills I'm really good at seeing patterns 15:45
kyclark Why the dot and ampersand? Dot is now the invocant-something-or-other
b2gills method call
jnthn Suspect it just calls out of $foo.&bar()
ZoffixW m: my &squared = * ** 2; say (1,2,3)».squared
camelia rakudo-moar de52f9: OUTPUT«Method 'squared' not found for invocant of class 'Int'␤ in block <unit> at /tmp/gbCOhJl6HV:1␤␤»
ZoffixW m: my &squared = * ** 2; say (1,2,3)».&squared
camelia rakudo-moar de52f9: OUTPUT«(1 4 9)␤»
jnthn Contextualizers are parsed by variable
iirc
kyclark m: <1 2 3>>>.&(* * 2)
camelia ( no output )
kyclark <1 2 3>>>.&(* * 2) 15:46
AlexDaniel ahahha >>>
b2gills add a say
kyclark That works for me
m: say <1 2 3>>>.&(* * 2)
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
ZoffixW kyclark, you forgot to tell the bot to «say»
kyclark Wild
AlexDaniel m: say <<1 2 3>>>>.&(* * 2)
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
b2gills m: say «1 2 3»>>.&(* * 2)
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
ZoffixW m: say «1 2 3»».&(* * 2) 15:47
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
kyclark I still don't get why the dot before the amper
ZoffixW m: say «1 2 3»»&(* * 2)
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␤»
b2gills It's to get around the parser so it sees it as calling a subroutine as a method
kyclark Is the amper somewhat like "lamba"?
lucs Okay, solved to my satisafaction, but any suggested improvements welcome: gist.github.com/lucs/cd3e912f20d6953f480b 15:48
b2gills no * * 2 is a lambda so is {.perl} and -> $_ { .perl }
kyclark Would it be possible to <1 2 3>>>sub($n) { $n * 2 }
lucs loren: ^^
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␤»
ZoffixW m: say «١ ٢ ٣»».&(* * ٢)
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
lucs DrForr: ^^
ZoffixW grins
15:49 rurban left
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 })␤»
b2gills m: say <1 2 3>».&(sub ($n) { $n * 2 })
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
loren lucs, finished ?
lucs loren: Yes. 15:50
loren: gist.github.com/lucs/cd3e912f20d6953f480b
loren: So I used a hash :)
ZoffixW m: say «١ ٢ ٣»».&( -> $n { $n * ٢ })
camelia rakudo-moar de52f9: OUTPUT«(2 4 6)␤»
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
ZoffixW I though » was a hyper? Concurrent and stuff 15:52
m: say «١ ٢ ٣».hyper(batch => 1).&( -> $n { sleep 1; $n * ٢; }); say now - INIT now
camelia rakudo-moar de52f9: OUTPUT«Cannot call Numeric(HyperSeq: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at /tmp/B7JbX3xvXN:1␤␤»
ZoffixW m: say «١ ٢ ٣».hyper(batch => 1)».&( -> $n { sleep 1; $n * ٢; }); say now - INIT now
camelia rakudo-moar de52f9: OUTPUT«()␤0.0167718␤»
AlexDaniel ZoffixW: it is but it has to return a list, I guess
ZoffixW I see
loren lucs, i say . 15:53
ZoffixW m: «١ ٢ ٣».hyper(batch => 1)».&( -> $n { sleep 1; say $n * ٢; }); say now - INIT now
AlexDaniel aah no
camelia rakudo-moar de52f9: OUTPUT«0.01385305␤»
AlexDaniel 6 seconds, indeed
ZoffixW AlexDaniel, it's just the default batch is 4 or something
kyclark Forgive me, but, as interesting as all the above is, it doesn't beat "map (+2) [1, 2]" 15:54
ZoffixW kyclark, what language is that? 15:56
kyclark Haskell
timotimo b2gills, good catch, feel free to gix if you like
jnthn I'm not sure I'd use >>.&(...) in reality :)
ZoffixW :)
timotimo ah. you did
AlexDaniel m: say ^20>>.&( -> $n { sleep 1; $n * 2; }); say now - INIT now
jnthn m: say map *+2, 1, 2
camelia rakudo-moar de52f9: OUTPUT«^1␤1.00748194␤»
rakudo-moar de52f9: OUTPUT«(3 4)␤»
jnthn That's fine enough
ZoffixW :)
AlexDaniel hm…
kyclark Ah, that's closer to what I'm looking for jnthn!
ZoffixW AlexDaniel, hyper is broken ATM 15:57
AlexDaniel m: say (^20)>>.&( -> $n { sleep 1; $n * 2; }); say now - INIT now
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␤»
nine jnthn: how can I get at CompUnit::Handle from NQP code at runtime?
kyclark m: say map **2, 1, 2
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⏏052, 1, 2␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ …»
ZoffixW m: sleep 2 for ^4 .hyper: :1batch; say now - INIT now
camelia rakudo-moar de52f9: OUTPUT«0.0106910␤»
AlexDaniel ZoffixW: I've always thought that this fancy thing was NYI
ZoffixW AlexDaniel, I used the above code a few weeks ago successfully. 15:58
Even bragged on Twitter
AlexDaniel ZoffixW: I mean, not the operator itself, but the fact that it does stuff in parallel
ZoffixW Yeah, the above used to run in 2 seconds.
So 4 sleep 2s in 2 seconds.
jnthn nine: As in, the type object for that? 15:59
15:59 khw joined
ZoffixW Now... well, I don't even know what it's doing 15:59
nine jnthn: yes
15:59 robertle joined
nine jnthn: so I can call the constructor 15:59
jnthn nine: I'd probably use the hll stash
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
camelia rakudo-moar de52f9: OUTPUT«0.01277227␤»
16:00 abraxxa left
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⏏052»␤ expecting any of:␤ infix␤ infix stopper␤»
kyclark OK, just needed space:
andreoss m: say [1..3] »*» 2
camelia rakudo-moar de52f9: OUTPUT«[2 4 6]␤»
kyclark m: say map * ** 2, 1,2
camelia rakudo-moar de52f9: OUTPUT«(1 4)␤»
andreoss kyclark: ^^
kyclark m: say map * * 2, 1,2
camelia rakudo-moar de52f9: OUTPUT«(2 4)␤»
andreoss kyclark: consider hyper ops
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?
kyclark andreoss, I've been trying to figure out which is cleaner, hyperops or map
(see above)
ZoffixW robertle, which modules are those?
robertle, the could not find one in particular 16:02
robertle HTTP::Server::Async
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
ZoffixW tadzik, tried reinstalling Grammar::Debugger 50 times, and I did not get that unbox error in any of them
nine jnthn: /win 18 16:04
ZoffixW I'm getting a bunch of deprecation errors/warnings from HTTP::Server::Async's test suite...
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:05 prammer left 16:06 prammer joined
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 ;)
ZoffixW Which is? :) 16:07
jnthn hah! :)
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 :)
kyclark On this page perl6advent.wordpress.com/2009/12/...operator/, it says I can do @xyz»++
robertle but how does that work? does it compute a hash of "XXX" when i do "use XXX;" and then go from there?
kyclark m: say [1,2,3,4]>>++
camelia rakudo-moar de52f9: OUTPUT«[1 2 3 4]␤»
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]␤»
ZoffixW m: my @a = ^4; say @a; say @a»++; say @a
jnthn m: say ++<<[1,2,3,4]
camelia rakudo-moar de52f9: OUTPUT«[0 1 2 3]␤[0 1 2 3]␤[1 2 3 4]␤»
rakudo-moar de52f9: OUTPUT«[2 3 4 5]␤»
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
jnthn >>++ is post-increment, so it'll mutate the (anonymous) array and give you back what it used to be :)
robertle or to place modules for a given software in 16:09
andreoss jnthn: should it give a warning about changing immutable value here?
jnthn It didn't.
dalek kudo/repository_registry: 20393f1 | (Stefan Seifert)++ | src/ (2 files):
Move CompUnit::Handle creation from NQP code to CompUnit::Repository::NQP

Since we unified module loading of all languages at the repository level, there's no need anymore to present a unified interface at the lower levels. That's why we can lift the CompUnit::Handle creation up into Perl 6 code.
ZoffixW m: my @a = ^4; say @a; say ++«@a»++; say @a
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…»
nine ZoffixW: this ^^^ fixes the DBIish problem for me
jnthn You *can't* change an immutable value, by definition :P
AlexDaniel nine: hoooooooraaaaaaaaaaaaaaaaaay
16:10 rurban joined
kyclark I was expecting to get back a new list with incremented values 16:10
ZoffixW Why? :)
geekosaur then use preincrement?
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.
jnthn Or better + :)
kyclark Is the advent page wrong on this example? 16:11
ugexe robertle: you cant yet. hopefully very soon
jnthn m: say (1,2,3) >>+>> 2
camelia rakudo-moar de52f9: OUTPUT«(3 4 5)␤»
robertle ugexe: ok, that's great
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 znpy left
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
camelia rakudo-moar de52f9: OUTPUT«[3 5 9]␤»
AlexDaniel though it does not look like a good way to do it :)
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?
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␤»
andreoss can i embed code inside hyper quotes?
tadzik ZoffixW: wow, weird
nine ab6tract: can repro the examples/matrix-ish.p6 failure here
tadzik ZoffixW, vytas: seems like the fact that it's a dependency of something makes it a problem
I don't see why that would happen
loren lucs, good job ! 16:14
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…»
AlexDaniel m: say (^4)».&({ $^a * $^b })»5 # :/
camelia rakudo-moar de52f9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nOeQtODhVw␤Malformed postfix␤at /tmp/nOeQtODhVw:1␤------> 3say (^4)».&({ $^a * $^b })»7⏏055 # :/␤ expecting any of:␤ method arguments␤ postfix␤»
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.
ZoffixW The installation is has a few rough edges still. We've just had a massive overhaul not so long ago
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?
AlexDaniel m: my @a = 2, 5, 10; say @a »*» 3.5 16:18
camelia rakudo-moar de52f9: OUTPUT«[7 17.5 35]␤»
ZoffixW robertle, sounds like your rakudo is too old.
AlexDaniel m: my @a = 2, 5, 10; say @a ».&({$^a * $^b})» 3.5
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␤»
AlexDaniel m: my @a = 2, 5, 10; say @a».&({$^a * $^b})» 3.5
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␤»
ZoffixW ah
AlexDaniel b2gills: did you say something about patterns? :) 16:19
ZoffixW :D
andreoss m: say [^4]».&( * + 1)
camelia rakudo-moar de52f9: OUTPUT«[1 2 3 4]␤»
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 ZoffixW left
diakopter backlog asplode 16:20
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:21
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 left, Ven joined 16:24 uruwi joined
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]␤»
dalek kudo/nom: c4f39c9 | jnthn++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp:
Fix SomeRole.^roles.

Using the same "assume you're talking about the default candidate" logic we use for .^methods and friends.
16:26
kudo/nom: 7a1aebd | jnthn++ | src/Perl6/Metamodel/ (4 files):
Make :transitive the default for .^roles.

Since roles are "flat" in nature, this is a less surprising default.
ast: 61758a2 | jnthn++ | S12-introspection/roles.t:
Update .^roles tests.

Includes coverage of RT #125731.
16:27
16:28 Ven left
ugexe what is a transitive role? 16:29
16:29 perl6joe joined
jnthn m: role A { }; role B does A { }; say B.new.^roles 16:30
camelia rakudo-moar de52f9: OUTPUT«((B))␤»
jnthn That now says ((B) (A)) instead
ugexe ah
jnthn Just a change of default to something a bit less surprising.
ugexe just glad to learn something new 16:31
jnthn But along the way I discovered that .^roles(:transitive) was broken.
So patched that too :)
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
b2gills jnthn: I knew that it was broken for a while ( should have rakudobugged ) 16:31
really it was calling .^roles on a role 16:32
jnthn Right :) 16:33
Well, fixed and test covered now.
16:33 lizmat joined
lizmat waves from inside a car inside a train 16:34
jnthn Yo dawg...
Unlucky for some, 13 xmas RTs left
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:35
b2gills better fix at least one before the 13th 16:36
nine ab6tract: oh yes, looking good :)
TimToady I guess I needed to sleep that hard...
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:37 sufrostico left
TimToady jnthn: sure, it should probably throw the original exception immediately in that case 16:38
16:38 andreoss left
TimToady as if there were a 'use fatal' in the caller of the mainline code 16:38
nine ab6tract: I do have a fix, but have to leave for the company christmas party. Can push it tomorrow 16:40
ab6tract: fix is just to abort precompilation if we encounter a dependency that we couldn't load from a precomp file 16:41
16:41 cdg joined
El_Che jnthn: 13 left? wow. Nice 16:46
lizmat anybody checked out www.nu42.com/2015/12/perl6-newline...tched.html ? 16:47
entering the tunnel soon&
16:47 lizmat left 16:49 yqt left
flussence on the bright side, «use newline» works once again... 16:49
16:49 dwarring joined
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:51
16:52 ZoffixW joined 16:53 domidumont left 16:54 loren left 16:55 lostinfog joined
jnthn RabidGravy: Indeed, my feeling after reading that is "screw it, somebody else can deal with this" :) 16:57
I don't get the test failures the post does.
flussence it ends with a link to reddit... I guess they'll find all the answers they're expecting there.
16:58 robertle left
jnthn I wonder if they managed to get a git checkout of the spectests that didn't do the line translation. 16:58
The only ones I see are S17-supply/lines.t.
El_Che for personal experience, bugs are welcomed here and on RT. I wonder what's the rationale to go around. No need.
flussence can mixing cygwin/non-cygwin stuff cause line ending problems like that?
jnthn Yes 16:59
Well, I guess so
16:59 nige1 joined
retupmoca jnthn: "... git and hg are set up not to touch line endings ..." - looks like he set it up that way on purpose 17:00
jnthn Well, for me: 17:01
git config core.autocrlf
true
17:01 leont left
nige1 need a little help constructing a list of playing cards - previously this worked ok 17:01
TimToady nige1: you probably need a | to slip sublists into lists 17:02
nige1 my @ranks = 1 .. 10 , 'A'. 'J','Q', 'K'
yes
so that would be
flussence m: say "\x[1F0A1]".."\x[1F0DE]"
camelia rakudo-moar 7a1aeb: OUTPUT«"🂡".."🃞"␤»
nige1 #my @ranks = |(1 .. 10), 'A', 'J', 'Q', 'K';
to force the slip? 17:03
TimToady yes
nige1 cool - I think I understand that
TimToady or just flat the whole thing
jnthn or just
nige1 ok
jnthn my @ranks = flat 1..10, ...
TimToady is reading everyone's mind this morning :)
nige1 ok
ZoffixW m: say set(74).map(*.chr);
camelia rakudo-moar 7a1aeb: OUTPUT«Method 'chr' not found for invocant of class 'Pair'␤ in block <unit> at /tmp/qggTJJKnhg:1␤␤»
ZoffixW Pair? :S
nige1 during testing - I found that yadda yadda worked too
1 ... 10 17:04
TimToady yes, that should work here
moritz it's not yadda in an infix position
it's the sequence operator
TimToady well, it's still 'and so on' :)
which is kinda what 'yadda, yadda, yadda' means 17:05
jnthn ZoffixW: Sets work like hashes
m: say set(74).keys.map(*.chr);
camelia rakudo-moar 7a1aeb: OUTPUT«(J)␤»
nige1 - yes - I like that mnemonic
ChristopherBotto m: my @a = map { $_ }, ( (1,2), (3,4)); @a.perl.say;
camelia rakudo-moar 7a1aeb: OUTPUT«[(1, 2), (3, 4)]␤»
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
nige1 so the combination the Seq and , then causes the list to be eagerly constructed 17:06
?
17:06 idiosyncrat_ joined
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
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:07
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
idiosyncrat_ And my expectation is that those "other means" would be recursive descent.
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
?
TimToady EXPR is bottom-up
ZoffixW Surely that's an ellipsis :) 17:10
m: say 1, 2 … 10
camelia rakudo-moar 7a1aeb: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
idiosyncrat_ OK. Another question -- wrt the operator precedence grammar -- there can only be one of those?
ZoffixW .u …
yoleaux U+2026 HORIZONTAL ELLIPSIS [Po] (…)
ZoffixW jnthn, thanks, back to reading the doc I guess :)
jnthn hopes the dog is correct
uh, doc :)
RabidGravy woof
TimToady idiosyncrat_: only one called EXPR
but you can freely add operators with other precedences if you like 17:11
or write your own bottom-rule
*-up
idiosyncrat_ OK. I read the advent post on grammars with great interest.
17:11 ab6tract left, zakharyas1 left
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:13 ollej joined
TimToady 2nd-order stuff? 17:13
idiosyncrat_ BNF which writes BNF
TimToady grammars just compose and metaprogram like classes
idiosyncrat_ 2nd order languages in the stricter sense. 17:14
17:14 ZoffixW left
jnthn bbl 17:14
ChristopherBotto my @a = map { $_ }, ( (1,2), (3,4)); @a.perl.say; 17:15
m: my @a = map { $_ }, ( (1,2), (3,4)); @a.perl.say;
camelia rakudo-moar 7a1aeb: OUTPUT«[(1, 2), (3, 4)]␤»
ChristopherBotto m: my @a = flatmap { $_ }, ( (1,2), (3,4)); @a.perl.say;
camelia rakudo-moar 7a1aeb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eVo8WIMP33␤Undeclared routine:␤ flatmap used at line 1␤␤»
ChristopherBotto m: my @a = map { $_ }, |((1,2), (3,4)); @a.perl.say;
camelia rakudo-moar 7a1aeb: OUTPUT«[(1, 2), (3, 4)]␤»
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.
ugexe m: my @a = flat map { $_ }, ( (1,2), (3,4)); @a.perl.say;
camelia rakudo-moar 7a1aeb: OUTPUT«[1, 2, 3, 4]␤»
idiosyncrat_ And these kinds of limits exist, even in Marpa. 17:16
ChristopherBotto ugexe: Thanks!
idiosyncrat_ That is, you've got to make sure the composed or generated grammar can reaasonably be parsed by your parse engine.
So if you compose two Marpa grammars and create an ambiguity, the result may go cubic. 17:17
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␤␤»
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.
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
idiosyncrat_ I don't expect you to do anything about this at the moment. 17:20
But I'm working up a blog post, and I wanted to try to stay fact-based. :-)
TimToady though I'd be interested at that time to know what goes cubic, and whether we're susceptbile :)
idiosyncrat_ The blog post will be about that.
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.
TimToady well, we don't really do LL even 17:22
17:22 lizmat joined
dalek href="https://perl6.org:">perl6.org: 0958a00 | (Christopher Bottoms)++ | source/documentation/index.html:
Added 2015 to list of Perl 6 Advent Calendars
17:22
href="https://perl6.org:">perl6.org: ed2062e | (Zoffix Znet)++ | source/documentation/index.html:
Merge pull request #43 from molecules/patch-1

Added 2015 to list of Perl 6 Advent Calendars [Will need to update it to Table of Contents, when that is ready]
idiosyncrat_ If it's top-down the nearest mathematical description is LL
lizmat waves from the left-hand driving side of the channel
TimToady idiosyncrat_: sure
idiosyncrat_ That is, the math imposes basic limits on what a parser can do.
As you of course know. 17:23
And from that point of view, I believe you are LL.
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
So I kept (more or less) quiet.
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"
So my point is not about how to parse Perl 6, which I'm glad to leave to you guys ... 17:26
but about these 2nd order language, metalanguage matters, where nobody is committed to a strategy yet. 17:27
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:28
idiosyncrat_ Btw, I very much look forward to Perl 6 17:29
TimToady ain't we all :) 17:30
Skarsnik well it's already here x)
idiosyncrat_ When it comes to the human-computer interface, or the use of code as a means of communication between people ...
I think you're the best language designer ever.
TimToady in spots
other spots, not so much :) 17:31
RabidGravy fewer defects than others ;-)
idiosyncrat_ When you're taking the lead, you're doing your learning in public, so it's easy to see the mistakes. 17:32
And your brilliant insights get imitated by everyone, so in retrospect they seem obvious ...
17:32 vytas left
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.
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 lizmat left, domidumont joined
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 domidumont left
RabidGravy 477 modules in the ecosystem, getting there :) 17:35
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
idiosyncrat_ Yes, I once made a project of reading all the Perl parsers
Every version, from 1 to 5.
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
AlexDaniel b2gills: Fine. But what does this mean then? 「my @a = 2, 5, 10; say @a »*» 3.5」
m: my @a = 2, 5, 10; say @a »*» 3.5
camelia rakudo-moar 7a1aeb: OUTPUT«[7 17.5 35]␤»
idiosyncrat_ btw, anyone who wants to use yacc I have two suggestions: 17:38
1.) study Larry's work on Perls 1-5.
b2gills @a.map: { $_ * 3}
idiosyncrat_ 2.) Reconsider.
TimToady :D
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.
RabidGravy I think I have used yacc seriously precisely once
kyclark b2gills, why can you use the colon like that? 17:40
17:40 lizmat joined
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.
AlexDaniel kyclark: it's there to get rid of ()
kyclark So it's Good or Bad?
AlexDaniel kyclark: with method calls you can either use : or ()
kyclark: depends 17:41
kyclark Oh, I misunderstood you
Why have both options?
rurban The only PEG/LL problem is the op precedence in expressions, but this problem is solved already.
AlexDaniel m: say (1, 5, 8).pick(2)
camelia rakudo-moar 7a1aeb: OUTPUT«(8 5)␤»
AlexDaniel m: say (1, 5, 8).pick: 2
camelia rakudo-moar 7a1aeb: OUTPUT«(5 1)␤»
AlexDaniel bad example, the result is different :) 17:42
kyclark Understood.
AlexDaniel kyclark: well, there is more than one way to do it
kyclark: also, sometimes you have too many parens and it gets unreadable
kyclark: in such cases : helps
kyclark Yes, but is there any advantage for having both? I've just taken a class of 15 grads and undergrads through Perl5
b2gills AlexDaniel: 「1,2,3,4 »*» 1,2」 =:= 「(1,2,3,4) Z* (1,2,2,2)」
kyclark I have to figure out how and what to teach beginners 17:43
ChristopherBotto m: say: 'Hello', ' ', 'World', '!'
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 nige1 left
ChristopherBotto m: say('Hello', ' ', 'World', '!') 17:43
camelia rakudo-moar 7a1aeb: OUTPUT«Hello World!␤»
AlexDaniel kyclark: .map({ $_ + 5 }) vs .map: { $_ + 5 }
kyclark: () are kinda universal
uruwi Now the latter is nicer.
17:44 rurban left
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 )
kyclark m: say [1,2,3].map: * * 2
camelia rakudo-moar 7a1aeb: OUTPUT«(2 4 6)␤»
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 }
kyclark m: say [1,2,3].map: {$_ * 2}
camelia rakudo-moar 7a1aeb: OUTPUT«(2 4 6)␤»
17:44 Begi joined
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)␤»
TimToady it's really about end-weight
kyclark Why/how do I decide when to use brackets/$_ and not/*?
ChristopherBotto m: my $a = "Hello"; my $b = "World"; say: ($a, $b);
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)␤»
Skarsnik Array.push:@tab does not do Array.push(@tab) x) 17:45
ChristopherBotto m: my $a = "Hello"; my $b = "World"; say($a, $b);
camelia rakudo-moar 7a1aeb: OUTPUT«HelloWorld␤»
17:45 koo8 left, Upasaka left
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
camelia rakudo-moar 7a1aeb: OUTPUT«hello␤»
AlexDaniel goddammit, can we have a unicode symbol for whatever star? “* * 2” is horrible…
17:45 _nadim joined
ChristopherBotto m: say $OUT: 'Hello', ' ', 'World', '!' 17:45
uruwi ★?
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', '!'␤»
ugexe `use trace;` in a dependency doesn't seem to work anymore 17:46
ChristopherBotto m: say $*OUT: 'Hello', ' ', 'World', '!'
camelia rakudo-moar 7a1aeb: OUTPUT«Hello World!␤»
TimToady m: constant _ = *; say (_ * 2)(3)
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
uruwi You can do that?!!
TimToady nope, I just put that in as an Easter egg :P
RabidGravy :)
uruwi Even if you assumed that _ now has the value of a function that returns the parameter 17:47
m: say (_ * 2)(3)
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…»
uruwi m: constant a = *; say(a * 2)(3);
camelia rakudo-moar 7a1aeb: OUTPUT«WhateverCode.new␤Cannot find method 'CALL-ME'␤ in block <unit> at /tmp/4rJZhIoubc:1␤␤»
uruwi Whoops, it fell apart quickly.
AlexDaniel space? 17:48
RabidGravy no space
AlexDaniel m: constant a = *; say (a * 2)(3);
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
moritz it's parsed as (say a * 2)(3)
uruwi m: constant a = * - 1; say (a * 2)(3); # should be 4
camelia rakudo-moar 7a1aeb: OUTPUT«Cannot call Numeric(WhateverCode: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at /tmp/GHcHGspdZP:1␤␤»
b2gills *-1 creates a whatever lambda 17:49
17:49 lizmat left
AlexDaniel m: constant whatever = *; say (whatever * 2)(3); 17:49
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
TimToady yes, that should probably work too
17:50 psy joined
AlexDaniel m: constant smth = *; say (smth * 2)(3); 17:50
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:50 leont joined, psy left
b2gills m: constant whatever = Whatever.new; say (whatever * 2)(3); 17:51
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
AlexDaniel m: say (* * 2)(3); # noooooo…
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
17:51 psy joined
AlexDaniel m: say (* * *)(3, 2); # noooooo-ooooo… 17:51
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
cognominal m: say "/".IO.WHAT
camelia rakudo-moar 7a1aeb: OUTPUT«(Path)␤»
AlexDaniel m: say (* * * * *)(3, 2, 1); # noooooo-ooooo-oooo…
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
cognominal whay not IO::Path?
b2gills m: say &infix:<*>.assuming(2).(3) 17:52
camelia rakudo-moar 7a1aeb: OUTPUT«6␤»
leont .gist always uses the local name for some reason
TimToady m: say (EVAL(42.chr) * 2)(3)
camelia rakudo-moar 7a1aeb: OUTPUT«Cannot call Numeric(Whatever: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at /tmp/N6uoxwL84C:1␤␤»
leont so if you do «module IO { class Path {} }, it will gist to Path
cognominal m: say "/".IO.WHAT.perl
camelia rakudo-moar 7a1aeb: OUTPUT«IO::Path␤»
TimToady m: say (BEGIN {EVAL(42.chr)} * 2)(3)
camelia rakudo-moar 7a1aeb: OUTPUT«Cannot call Numeric(Whatever: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at /tmp/xnFBye2jed:1␤␤»
kyclark _ seems a better choice than * for Whatever 17:53
uruwi m: say (* * * * * * * * * * * * * * * * *)(@(1 .. 9));
camelia rakudo-moar 7a1aeb: OUTPUT«Too few positionals passed; expected 9 arguments but got 1␤ in block <unit> at /tmp/TJMad2EAGc:1␤␤»
uruwi m: say (* * * * * * * * * * * * * * * * *)(|(1 .. 9));
camelia rakudo-moar 7a1aeb: OUTPUT«362880␤»
kyclark But I guess it's confused with $_, but then P6 also has just $ which I'm trying to understand
TimToady but a lot of people want to use _ for other purposes, such as I18n
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␤␤»
AlexDaniel m: say (* * * * * * * * * * * * * * * * *)(|^9);
kyclark I just can't understand when to use $_ vs *
camelia rakudo-moar 7a1aeb: OUTPUT«0␤»
b2gills $ is an anonymous state scalar (unless you prefix it with my)
TimToady * creates {}, $_ doesn't
kyclark Right, I was just reading about $
cognominal ok, I still sometimes have trouble to choose the right one at the right time for .gist/.Str/.perl :(
RabidGravy I dunno, despite it's somewhat overloaded use, it is most often seen as a replacement for 'anything'
b2gills kyclark: { $_.perl } vs *.perl
kyclark b2gills, I think you said that to me earlier but it's just starting to sink in
b2gills Use whichever makes your code clearer 17:55
geekosaur maybe Whatever should have been ‽
AlexDaniel cognominal: .perl is for kinda perl-like code, .gist is human readable and .Str is just a stringified thing
geekosaur :p
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
AlexDaniel cognominal: by default conversion you mean .gist? 17:56
leont doesn't like the .gist behavior here, it's a bit confusing IMO
b2gills kyclark: I tend to choose whichever form of lambda will make my code shorter ( for codegolf )
cognominal AlexDaniel, it depends on what function you use too 17:57
17:57 lizmat left
cognominal say/print/note/... 17:57
AlexDaniel cognominal: well “say” is for humans, “print” is for computers
TimToady well, line printers...
cognominal :)
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 )
AlexDaniel cognominal: and “note” is like “say” but for stderr, unless I'm wrong
RabidGravy I miss line printers 17:59
cognominal it all makes sense, but one has to get used to it.
m: say "/".IO.perl
camelia rakudo-moar 7a1aeb: OUTPUT«q|/|.IO(:SPEC(IO::Spec::Unix))␤»
TimToady put is just a print variant, short for 'print-und-terminate' or so 18:00
AlexDaniel right, there's also put… 18:01
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
TimToady well, a line printer can chew a box of paper even faster 18:03
RabidGravy :)
18:04 espadrine left
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
flussence some HP printers do that too, great fun when you run nmap and aren't expecting it... 18:05
b2gills flussence: I did that about a month or 2 ago 18:06
I found out that the brand new printer has linux 2.4 on it 18:07
18:07 leont left
stmuk does it run an open mail relay too? 18:10
18:11 ollej left
RabidGravy :) 18:13
moritz stmuk: probably takes only a few days :-)
RabidGravy also the mandelbrot figure in postscript used to be fun
18:14 AndyDee joined
RabidGravy I'm sure also I've seen a web server written in postscript for HP printers 18:16
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 ( no output )
TimToady which is only, like, most of our code
18:18 lizmat joined
[Coke] nine: (deadlock, ulimit) that'd avoid the ulimit time check also? 18:18
RabidGravy oops
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␤»
TimToady m: class Foo { method foo() { 1+1; 42 } }
camelia ( no output )
AlexDaniel m: use experimental :macros; macro circumfix:["<!--","-->"] ($text) is parsed / .*? / { "" }; <!-- $var = 1; -->; $var == 0;
camelia rakudo-moar 7a1aeb: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
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.
AlexDaniel m: multi sub circumfix:<‟ ⹂> { flip $^a }; say ‟‘hello world’⹂ 18:24
camelia rakudo-moar 7a1aeb: OUTPUT«dlrow olleh␤»
AlexDaniel too bad you have to use another pair of quotes inside
.u ‟⹂
yoleaux U+201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK [Pi] (‟)
cognominal I forgot the syntax of type for hashes with typed keys :(
AlexDaniel .u ⹂
yoleaux No characters found 18:25
jnthn m: class A::B { }; say A::B.WHAT; say A::B.WHO; # use .WHO for fully qualified
camelia rakudo-moar 7a1aeb: OUTPUT«(B)␤A::B␤»
ab5tract AlexDaniel: just need to wait for 'no strict;' ;)
AlexDaniel ab5tract: no, macros! I need macros! :)
ab5tract much better approach :)
18:26 regreg joined 18:27 lizmat left
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?
cognominal better I want the key forced to lower cases :) 18:28
18:29 idiosyncrat_ left
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] (‘)
U+2019 RIGHT SINGLE QUOTATION MARK [Pf] (’)
AlexDaniel .u ’
yoleaux U+2019 RIGHT SINGLE QUOTATION MARK [Pf] (’)
AlexDaniel .u ’
yoleaux U+2019 RIGHT SINGLE QUOTATION MARK [Pf] (’)
TimToady m: 1+1; 42
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)␤»
ab5tract cognominal: if you want to coerce them to lc, you would want to make your own class.
otherwise subset LcHash where *.keys.grep($_ ~~ /'a'..'z'/)
TimToady the optimizer is what prints those messages
ab5tract TimToady: ah. that makes sense now!
jnthn m: subset Sha1 of Str where .chars == 40 and m:i/<[A..Z0..9]>/; my %h{Sha1}; %h<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> = 0;
camelia ( no output )
TimToady so the optimizer is probably not even looking at the statements inside
jnthn m: subset Sha1 of Str where .chars == 40 and m:i/<[A..Z0..9]>/; my %h{Sha1}; %h<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> = 0;
camelia rakudo-moar 7a1aeb: OUTPUT«Type check failed in binding key; expected Sha1 but got Str␤ in block <unit> at /tmp/bOAvZFf0KV:1␤␤»
jnthn cognominal: ^^
For just checking 18:31
cognominal probably waht I want github.com/perl6/specs/commit/524d...ee6aa522b3 my Mu %hash{Str(Any)};
TimToady tjere
cognominal I mean I need to adapt that
d^_^b .messages
ab5tract jnthn: ah! i did not realize that typed hashes had arrived :D
d^_^b hi
ab5tract cognominal: then what you do is write a class with a custom AT-KEY/ASSIGN-KEY
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
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
jnthn TimToady: Note rt.perl.org/Ticket/Display.html?id=125769 which implies we need some further fixes with regard to sink handling 18:33
cognominal ab5tract++ jnthn++ 18:34
18:34 lizmat joined, leont joined
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:35
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␤»
TimToady jnthn: okay, I'll sink a day into it :)
jnthn TimToady: If you fancy ;) 18:36
TimToady: I was thinking of actually doing something in Actions to mark sinks at routine level 18:37
TimToady: And force it for BEGINs or so
18:37 spider-mario joined
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
timotimo has arrived at his destination
jnthn TimToady: Well, it leaves the "is it void" stuff to the lower level compiler
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
camelia rakudo-moar 7a1aeb: OUTPUT«Instant:1449859114.618935␤»
TimToady true 18:38
AlexDaniel .u ′
yoleaux U+2032 PRIME [Po] (′)
cognominal ab5tract, I think I got the idea :)
jnthn TimToady: But we may be better of fully handling it in Actions.
*off
ab5tract cognominal: :)
AlexDaniel m: my $x′
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␤ …»
TimToady jnthn: that's more like how P5 did it
*does* it :)
jnthn TimToady: 'cus the lower level compiler has a per-block view, and the bug is because we sink the result of a block
Even if the last statement was an unsinkable
ab5tract the Unsinkable Molly Block 18:39
18:40 lizmat left
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?
dalek kudo/nom: 3128db8 | jnthn++ | src/core/Failure.pm:
fail should reliably die if outside of a routine.
ast: 2de874c | jnthn++ | S04-exceptions/fail.t:
Tests for fail outside of a routine.
18:42
timotimo jnthn: i mean: would it help you if i did that
jnthn timotimo: Well, only if it leads you to fix it yourself :D
timotimo hah, OK
jnthn timotimo: My brane isn't quite up for parallelism bugs today 18:43
timotimo sure :) 18:45
i'll have a look anyway
18:46 lizmat joined, grondilu left
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
well, you can also count 「‚」 if you want
.u ‚
yoleaux U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
TimToady is not terribly interesting in supporting identifiers of the form won’t-support 18:49
18:50 leont left
AlexDaniel TimToady: well, we have a macron acting as a minus… 18:51
TimToady that was an accident :)
18:52 lizmat left
TimToady unicode is definitely a slippery slope, and I don't mind stopping 10% of the way down... 18:52
AlexDaniel this accident is still there IIRC :) 18:53
.u ʼ
yoleaux U+02BC MODIFIER LETTER APOSTROPHE [Lm] (ʼ)
AlexDaniel what is that
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
not sure if it is implemented and what is the syntax
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
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.
cognominal ab5tract, which is already quite good :)
AlexDaniel what are these “modifier” things?
TimToady m: constant weʼll-support = 42; say weʼll-support 18:55
camelia rakudo-moar 3128db: OUTPUT«42␤»
TimToady they are officially letters 18:56
m: say 'ʼ'.uniprop
camelia rakudo-moar 3128db: OUTPUT«Lm␤»
TimToady m: say $aʼ = 42; say $aʼ
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ʼ␤»
TimToady m: my $aʼ = 42; say $aʼ
camelia rakudo-moar 3128db: OUTPUT«42␤»
dalek kudo/nom: f4a52c7 | jnthn++ | / (3 files):
Move sub-byte native int types to experimental.

We don't handle them anywhere at all yet, so better avoid confusion by simply not including them in 6.c.
18:57
ab5tract cognominal: mind if i see a paste?
dalek ast: 80ba7dc | jnthn++ | S02-types/WHICH.t:
Sub-byte native int types gone from 6.c.
lucs In some grammar, given token Foo { ... <{ say ? }> } , what can I put at ? to obtain 'Foo'?
TimToady m: my $aʹ = 42; say $aʹ
camelia rakudo-moar 3128db: OUTPUT«42␤»
TimToady or that, if you want a real PRIME
ab5tract bam!
cognominal m: class A is Associative {}; my %h is A
camelia ( no output )
TimToady .u ʹ 18:58
yoleaux U+02B9 MODIFIER LETTER PRIME [Lm] (ʹ)
awwaiid haha
18:58 lizmat joined
jnthn m: say uniprop(0x2B9, 'Canonical_Combining_order') 18:58
camelia rakudo-moar 3128db: OUTPUT«0␤»
jnthn m: say '$aʹ'.chars
camelia rakudo-moar 3128db: OUTPUT«3␤»
lizmat jnthn: seems like whenever doesn't handle signal supplies (well): gist.github.com/lizmat/04ed058084945a5c1e4b
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
jnthn lizmat: Odd, just tried it here and it worked and said goodbye 19:00
lizmat well, maybe on Win :-)
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
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?
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?
cognominal ab5tract, it would be an executable documentation thing stating my intentation
* intention
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
camelia rakudo-moar 3128db: OUTPUT«False␤»
flussence m: my \ꓼ = 45; say ꓼ
camelia rakudo-moar 3128db: OUTPUT«45␤»
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.
* does not care
TimToady m: constant ʽhahaʹ = ‘hoho’; say ʽhahaʹ; say ‘hoho’; 19:04
camelia rakudo-moar 3128db: OUTPUT«hoho␤hoho␤»
TimToady awwaiid: no, ' stays 19:05
it's too useful for contractions
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.
awwaiid ok, I'll stop bothering us about it :)
19:06 lizmat left
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 :)
ab5tract cognominal: you lost me a bit there. 'the core does not care'. which core? 19:07
oh, sorry, i understood as soon as i declared i didn't
AlexDaniel m: say +((0..0x1FFFF ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ }) ==> map { .chr }) 19:08
camelia rakudo-moar 3128db: OUTPUT«220␤»
ab5tract AlexDaniel++
19:08 lizmat joined
lizmat jnthn: signal(SIGINT).tap: { say "goodbye"; exit } followed by either sleep 20 or loop {} 19:08
ab5tract i had almost forgotten about feeds! :)
lizmat works fine
as in: it says goodbye 19:09
dalek ast: 98bdc2d | jnthn++ | S06-signature/definite-return.t:
Test pointy blocks with definite returns.

Already worked, but didn't see any tests for it.
19:10
jnthn lizmat: Odd
lizmat that was my thinking as well :-)
cognominal ab5tract, gist.github.com/cognominal/3aed2e52f2cecce1d653 # apparently the casting is ignored :( 19:12
timotimo jnthn: can you explain why we setelems($!output, 0) in HyperWorkBuffer.swap?
flussence m: say +(^0x20000).grep(*.unimatch(‘Lm’)).map(&chr) # bit shorter
camelia rakudo-moar f4a52c: OUTPUT«248␤»
19:12 grondilu_ joined
flussence (but includes symbols too) 19:12
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_ left, grondilu_ joined
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…»
jnthn *buffers
To avoid reallocations
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)
ab5tract forks the gist :)
19:14 grondilu_ is now known as grondilu
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;
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…»
ab5tract cognominal: is that to allow the .lc there?
AlexDaniel flussence: just ==> map(&chr) 19:15
ab5tract that's a neat trick :)
TimToady why not just ».chr ?
ab5tract cognominal: does it wqork with just %!h{Sha1} ?
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
dalek kudo/nom: 6d7c65d | jnthn++ | src/Perl6/Actions.nqp:
Enforce return types in pointy block sigs.
19:15 mohae joined
jnthn timotimo: ugh, that's not right 19:15
We were meant to only swap in multi-stage pipelines 19:16
timotimo right, so something has to return Mu, but doesn't
in its process-buffer method
cognominal m: my %h{Int(Str)}; %h<10> = 4
timotimo ah, well, Iterable.pm has the process-buffer method that uses --> Nil
camelia rakudo-moar f4a52c: OUTPUT«Type check failed in binding key; expected Int(Str) but got IntStr␤ in block <unit> at /tmp/XC9rm1PFD9:1␤␤»
dalek ast: 0c6958a | jnthn++ | S04-blocks-and-statements/pointy.t:
Test covering RT #126232.
AlexDaniel TimToady: indeed
jnthn timotimo: d'oh 19:17
timotimo: I wonder if TimToady went and messed that up when reviewing what things return.
timotimo maybe that's the solution
ab5tract cognominal: also, neat trick with the 'is Sha1h' !
jnthn That'd explain why it broke.
timotimo hm. though --> Mu isn't the same as --> Nil
because it's not definite return
daxim lizmat, pong
cognominal m: sub a(Int(Str)$a) { say $a.WHAT } ; a '10'
camelia rakudo-moar f4a52c: OUTPUT«(Int)␤»
timotimo so i'll put Mu in the block 19:18
ab5tract cognominal: just drop the type coercions :)
jnthn timotimo: oh, you're right
timotimo: Yeah, or change the calling code to look for Nil
19:18 lizmat left
ab5tract m: sub a(Int()$a) { say $a.WHAT } ; a '10' 19:18
camelia rakudo-moar f4a52c: OUTPUT«(Int)␤»
cognominal ab5tract: I know, I try to use every possible feature :)
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'?
ab5tract cognominal: the thing is, coercion syntax covers cases where there is an eplicit coercion sub defined on the class
timotimo jnthn: that makes it work \o/
jnthn \o/
timotimo not all of my tests 19:20
jnthn I only really implemented .race
I didn't do the re-ordering for .hyper
cognominal ab5stract, the coercion is on the elements not on the hash itself
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 ;)
cognominal If it works on subs parameter, it should on hash declaration
[Coke] looks like the go user is hung on hack running spectest on integration/advent2013-day14.t
jnthn lucs: &?ROUTINE.name maybe
lucs jnthn: Okay, thanks, will look that up.
19:22 curious_ joined, uruwi left
jnthn cognominal: Coercion types are only implemented for parameters 19:22
(We'll broaden it in a future Perl 6)
AlexDaniel m: "my @x = (0..0x1F ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ })».chr; my $x = 25
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␤»
AlexDaniel what is going on?
cognominal jnthn++, good to know 19:23
AlexDaniel m: my @a = (0..0x1F); my $x = 25
camelia ( no output )
jnthn People pasting stray quotes to camelia, that's what. :P
lucs jnthn: And good luck with the 12 RTs of Christmas :)
AlexDaniel ahh
m: my @x = (0..0x1F ==> grep { .uniname ~~ m/‘MODIFIER LETTER’/ })».chr; my $x = 25
camelia ( no output )
AlexDaniel indeed :D
jnthn ;)
dalek rl6-roast-data: 7c49da3 | coke++ | bin/doit:
Don't run (slow, hanging) JVM backends for now
rl6-roast-data: 085928f | coke++ | / (7 files):
today (automated commit)
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
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.
(running on hack.p6c.org)
cognominal indeed the Int(str) in %h{Int(Str)} is parsed as an EXPR
...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
Is no one else seeing this?
cognominal * type_constraint
bartolin_ [Coke]: irclog.perlgeek.de/perl6/2015-12-11#i_11696671 and irclog.perlgeek.de/perl6/2015-12-11#i_11696955 19:27
[Coke]: I guess, you see those, too?
19:28 dalek left, khw left, curious_ left
AlexDaniel .u ˽ 19:30
yoleaux U+02FD MODIFIER LETTER SHELF [Sk] (˽)
AlexDaniel .u ᶥ
yoleaux U+1DA5 MODIFIER LETTER SMALL IOTA [Lm] (ᶥ)
ab5tract cognominal: weird.. i was sure that this approach would work :( gist.github.com/ab5tract/20c489d20f289af31533 19:31
grondilu watched www.youtube.com/watch?v=5r6yzFEXajQ and was convinced to give emacs an other try after a few years
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
has ValueType %!h{KeyType} # if you want both
ab5tract gotcha 19:33
okay, documenting this now :)
sergot m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a.push: @b; say @a.perl;
camelia rakudo-moar 6d7c65: OUTPUT«[1, 2, 3, [4, 5, 6]]␤»
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?
timotimo you need to use .append
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”
camelia rakudo-moar 6d7c65: OUTPUT«constant ᶠᵁᶫᶝꭞₜ = 15; constant ՙᶽᶢᵈᶼˏ = 16; constant ᶿᵃₖᵊᴴՙ = 23; say ᶠᵁᶫᶝꭞₜ + ՙᶽᶢᵈᶼˏ + ᶿᵃₖᵊᴴՙ␤»
sergot oh, I missed that one, timotimo++ thanks a lot! 19:35
timotimo :)
AlexDaniel m: constant ᶠᵁᶫᶝꭞₜ = 15; constant ՙᶽᶢᵈᶼˏ = 16; constant ᶿᵃₖᵊᴴՙ = 23; say ᶠᵁᶫᶝꭞₜ + ՙᶽᶢᵈᶼˏ + ᶿᵃₖᵊᴴՙ
camelia rakudo-moar 6d7c65: OUTPUT«54␤»
sergot m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a.append: @b; say @a.perl;
camelia rakudo-moar 6d7c65: OUTPUT«[1, 2, 3, 4, 5, 6]␤»
sergot works timotimo++
timotimo sergot: it seems to me you had been off #perl6 for a while
19:35 pyrimidine joined
cognominal ab5tract, as jhntn said, coercion is not supported in hash declaration 19:35
sergot timotimo: yes, unfortunately this is true :(
timotimo it's okay 19:36
19:36 regreg left
timotimo it's nice to see you back here :) 19:36
[Coke] S17-supply/syntax.t has been unreliable for ages.
timotimo if you've been away for a while, there's lots of great stuff for you to discover
sergot timotimo: I wish I could spend more time on p6
[Coke] reduce is one of the failing test files, yes. 19:37
timotimo dalek has been gone for a while now
bartolin_ [Coke]: true, but the current failure mode seems new to me. (I could be wrong on this, though)
sergot I have this tho: imgur.com/WYhxKWF hehe :)))
it makes me p6 developer... right? hehe :)) 19:38
19:38 pyrimidi_ left
timotimo github.com/rakudo/rakudo/commit/a6...0c9551ab08 - i committed this, which fixes .hyper.map 19:38
19:38 mohae left
AlexDaniel m: say join ‘’, (0..0x1FFFF).grep(*.unimatch(‘Lm’))».chr 19:38
camelia rakudo-moar 6d7c65: OUTPUT«ʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁˆˇˈˉˊˋˌˍˎˏːˑˠˡˢˣˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨॱๆໆჼៗᡃᪧᱸᱹᱺᱻᱼᱽᴬᴭᴮᴯᴰᴱᴲᴳᴴᴵᴶᴷᴸᴹᴺᴻᴼᴽᴾᴿᵀᵁᵂᵃᵄᵅᵆᵇᵈᵉᵊᵋᵌᵍᵎᵏᵐᵑ…»
ab5tract doc.perl6.org/type/Hash 19:39
AlexDaniel .u ៗ
yoleaux U+17D7 KHMER SIGN LEK TOO [Lm] (ៗ)
AlexDaniel m: constant ៗ = 42; say ៗ
camelia rakudo-moar 6d7c65: OUTPUT«42␤»
ab5tract cognominal: oops, missed that while i was off carving that example :)
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ₙ
camelia rakudo-moar 6d7c65: OUTPUT«25␤»
timotimo jnthn: i expect there's a problem with that, otherwise i don't understand why hyper.map.grep doesn't work right
AlexDaniel .u ᱹ ꓺ 19:41
yoleaux U+0020 SPACE [Zs] ( )
U+1C79 OL CHIKI GAAHLAA TTUDDAAG [Lm] (ᱹ)
U+A4FA LISU LETTER TONE MYA CYA [Lm] (ꓺ)
sergot m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a = @a, @b; say @a.perl;
camelia rakudo-moar 6d7c65: OUTPUT«(my \Array_50621312 = [Array_50621312, [4, 5, 6]])␤»
jnthn timotimo: .iterator on a HyperSeq will give a serial iterator
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]]␤»
ab5tract the object you pass to Sha1(Str) should still technically 'is Str' and have a method named 'Sha1'
cognominal ab5tract: I will go with gist.github.com/cognominal/3aed2e52f2cecce1d653 :)
sergot timotimo: how can I make this to be flat?
ab5tract *technically need to be
AlexDaniel sergot: rt.perl.org/Public/Bug/Display.html?id=126858
sergot AlexDaniel: thanks 19:43
ab5tract botched that grammatical revision
AlexDaniel sergot: it's recursive, there is no way to make it flat. Whoops. It is probably a bug
sergot :(
it would make so many codes look easier
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
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␤»
AlexDaniel m: my @a = @a, 5
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␤»
AlexDaniel sergot: it seems like it should not be allowed at all
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]␤»
sergot AlexDaniel: right
retupmoca: oh, I could also think about this, silly me
jnthn m: my @a = 1, 2, 3; my @b = 4, 5, 6; @a = flat @a[0 ..1], @b; say @a.perl;
camelia rakudo-moar 6d7c65: OUTPUT«[1, 2, 4, 5, 6]␤»
sergot retupmoca++ thanks
19:45 Sqirrel left
sergot ohh, and this one, jnthn++ thanks 19:45
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 :)
AlexDaniel sergot: because if not, then why not @a.append(@b)?
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
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 doc.perl6.org/type/Hash ... mentions Parcel :O
jnthn dinner &
AlexDaniel sergot: indeed
awwaiid we kill all Parcel, ya?
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:49
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]])␤»
awwaiid ab5tract: I opened github.com/perl6/doc/issues/237
ab5tract awwaiid: no worries i am updating it now
grondilu actually gave a wrong link earlier: www.youtube.com/watch?v=JWD1Fpdd4Pc
sergot AlexDaniel++: this also works, thanks
AlexDaniel sergot: wait, it doesn't 19:51
TimToady m: (1,2).sink
camelia ( no output )
19:52 vytas joined
sergot I get those weird errors every first run of a program: 19:52
gist.github.com/sergot/56d54f782d1210ac6203
any ideas?
ab5tract sergot: known bug. 19:53
sergot ab5tract++: ok, thanks :)
ab5tract apparently harmless, and i'm sure it will get squashed soon
sergot great :)
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>."
is this ever necessary?
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:55
TimToady well, then technically it's an argument to the method, not to the for 19:56
ab5tract exactly
TimToady: revising some old documentation and that part looked suspicious :)
TimToady for (lines) {} though 19:57
equivalent to for lines() {}
ab5tract hmm. right. that's a tricky part of examples in perl 6 :)
TimToady the error is intentionally ambiguous that way
m: for lines {}
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>␤␤»
ab5tract and part of what made the learnathon so successful
19:57 znpy joined
ab5tract it's very natural for one example to lead to several topics at once :) 19:58
TimToady
.oO(Choose Your Own Adventure)
19:59
timotimo jnthn: with enough values in the source, hyper can deadlock ... 20:02
20:05 nige1 joined
ab5tract TimToady: it does make linear topic documentation a bit tricky though :) 20:06
20:09 brrt joined
brrt backlogging 20:10
i thought we had a strategy for stopping trolling about camelia... we might need to dig that up again
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 20:13 ajs__ joined
ab5tract 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
i would call it the identity equivalence or something
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?
TimToady it's object identity if you stipulate that immutable objects give the same identity to identical values
underneath, it's really .WHICH identity 20:16
ab5tract TimToady: ah, i see the ambiguity there
TimToady m: say 42.WHICH === 42.WHICH
camelia rakudo-moar 04791b: OUTPUT«True␤»
TimToady m: say [42].WHICH === [42].WHICH 20:17
camelia rakudo-moar 04791b: OUTPUT«False␤»
ab5tract yeah, discussing WHICH in the context of object hashes (background)
retupmoca sergot: sure
TimToady There is only one 42!!!
retupmoca sergot: just remember I don't consider it particularly "good" - just slightly better than the old one
ab5tract which use WHICH except unless object hashes, right?
m: say 42 xx 2; :)
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␤»
ab5tract m: say 42 xx 2; #:)
camelia rakudo-moar 04791b: OUTPUT«(42 42)␤»
TimToady #:) looks like Moe 20:18
sergot retupmoca: does it support nested markups, like ***something***? or **_sth_** ?
ab5tract ie we build the lookup hash value from the WHICH value?
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
ab5tract TimToady: oh, ok so we use WHICH only in the context of object hashes? 20:20
20:20 lizmat joined, darutoko left
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
sergot: I'd bet it's a lot more correct than mine
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
retupmoca sergot: well, if it doesn't seem to support nested things, feel free to open a github issue and/or PR 20:22
sergot: I'm still chasing CURLI changes right now, but I'll get to it eventually if noone else does :)
sergot retupmoca: looks so, I will try to make it :)
retupmoca: it also looks like we can't use ::Discount, because we have no access to the DOM, but I'm not sure. 20:23
20:24 brrt left, adhoc left 20:26 adhoc joined
ab5tract TimToady: one last question, I promise :) 20:27
m: my %h := :{ (now) => (now) }; %h.kv>>.say 20:28
camelia rakudo-moar 04791b: OUTPUT«Instant:1449865732.568262␤Instant:1449865732.570702␤»
stmuk has anyone tried building on a RPI2 recently?
sergot retupmoca: thanks for help!
ab5tract this kind of "assignment" object hash creation requires the binding
but the 'my %h{Any}' approach does not 20:29
20:29 CQ left
retupmoca sergot: you're welcome :) 20:29
RabidGravy stmuk, aboout a week ago 20:30
stmuk RabidGravy: how long does it take roughly? 20:32
RabidGravy hour or so
let's see
20:32 lizmat_ joined
lizmat_ ab5tract: because otherwise you would be assigning an object hash to a normal hash 20:33
20:33 lizmat left
ab5tract lizmat_: it makes perfect sense to me 20:33
jnthn Note that we need binding a little less often now 20:34
ab5tract you cannot assign such an absolute RHS
RabidGravy stmuk, just kicking it off
jnthn m: my %b is BagHash; say %b.WHAT
camelia rakudo-moar 04791b: OUTPUT«(BagHash)␤»
jnthn Don't need it for those cases, can use is :)
ab5tract to me the binding requirement read like "you can't just assign a hash of objects!" 20:35
*reads
20:36 woolfy joined
ab5tract jnthn++ ; # this is a fantastic thing! 20:36
i made note of that earlier while working with cognomial
jnthn ab5tract: I tend to think of assignment as a copying operation
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: gist.github.com/lizmat/14213d547714300f08bf
jnthn That is, it's an operation *on* the thing on the left, not a repalcement of it.
20:37 lizmat_ is now known as lizmat
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 :)
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 ?
ab5tract *assign it to something else
jnthn lizmat: I'd ask timotimo++ :)
But forgiveness > permission 20:39
20:40 muraiki joined
stmuk wonders if liz is IRCing from the "Sports Bar" 20:42
20:42 lizmat_ joined
lizmat_ stmuk: no, from our room at the Holiday Inn, Regent's Park 20:43
but the wifi sucks, so I'm thethering from 3G, but that looks to be flaky as well :-(
stmuk ah 20:44
lizmat_ takes out the USB extension cord and puts the phone in the window sill
20:46 lizmat left
jnthn ...maybe try dangling it out the window next? :) 20:46
lizmat_ yeah, tried that before, but not when on the 5th floor :-) 20:47
20:47 lizmat_ is now known as lizmat
diakopter oh I've stayed there 20:48
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?
moritz RabidGravy: something like www.robot-electronics.co.uk/htm/usb..._tech.htm? 20:51
masak moritz: thanks -- haven't forgotten ;) 20:52
moritz RabidGravy: first google hit for "usb to i2c"
20:52 grondilu left, domidumont left
timotimo lizmat: there are a few passes on my end, too. but also a few failures 20:52
moritz www.sparkfun.com/products/9903 20:53
stmuk www.adafruit.com/products/2264
20:58 lizmat left
masak I think I will advent blog about irclog.perlgeek.de/perl6/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
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
21:05 kaare_ left
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
stmuk :D
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
geekosaur how many pcs have parallel ports any more?
RabidGravy stmuk, yeah it may work with any ttl level interface, rs232, parallel etc
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
geekosaur (this being a time when people still used modems but printers were already USB) 21:08
(plus the parallel port voltages are more amenable to quick hacks like that)
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 github.com/cygx/p6-native-libc/tree/v2 does so, among other things, but it hasn't been tested
yoleaux cygx: I'll pass your message to hoelzro.
masak timotimo: neither. I already advent posted about that once perl6advent.wordpress.com/2009/12/...witcheroo/
21:09 nanis joined
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
masak timotimo: this is just about the new given/when semantics as of July this year 21:09
21:10 woolfy left
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 github.com/cygx/p6-native-libc/tree/v2 does so, among other things, but it hasn't been tested
jnthn _nadim: It's just quotes
RabidGravy stmuk, just finished so ~ 45 minutes 21:11
21:11 lizmat_ joined, lizmat left, lizmat_ is now known as lizmat
lizmat I was looking at 624ff76ca66f39d9687 earlier today, from July 2013 21:11
it mentions a benchmark
we're about 40x faster compared to before that commit :-)
nanis p6: IO::Spec.devnull.say
camelia rakudo-moar 04791b: OUTPUT«Method 'devnull' not found for invocant of class 'IO::Spec'␤ in block <unit> at /tmp/tmpfile:1␤␤»
_nadim jnthn: thank you
21:11 bitmap left
nanis p6: $*SPEC.devnull.say 21:11
camelia rakudo-moar 04791b: OUTPUT«/dev/null␤»
lizmat m: IO::Spec::Unix.devnull.say 21:12
camelia rakudo-moar 04791b: OUTPUT«/dev/null␤»
lizmat hates IO::Spec
nanis I am trying to understand the last part of io-spec-win.t
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
21:13 vendethiel joined
nanis should those tests have been written to use `$*SPEC` rather than `IO::Spec`? 21:13
hoelzro whoa
cygx it works with MinGW and, according to Travis, whatever libc they use (GNU?)
21:14 bitmap joined
nanis lizmat What is the correct way to use invoke IO::Spec methods in a platform-independent way? 21:17
lizmat using $*SPEC
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 github.com/perl6/roast/blob/master...win.t#L299
lizmat m: say $*SPEC.WHAT
camelia rakudo-moar 04791b: OUTPUT«(Unix)␤»
Skarsnik maybe try IO::Spec.^can('stuff')?
timotimo masak: i don't actually remember anything changing about given/when in july :S 21:19
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:21
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
timotimo: still, it was interesting to me that we aligned the spec in that way.
timotimo: ...read the post tomorrow, I guess ;)
timotimo i will! with pleasure :) 21:23
21:23 lizmat left
cygx jnthn: btw, any thoughts on what should happen to IO::Handle.open(:bin)? 21:24
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
maybe I need an updated/different gcc
jnthn Yup :)
RabidGravy stmuk, yeah 21:26
gcc (Raspbian 4.8.2-21~rpi3rpi1) 4.8.2 - I think the default is a 4.6
I think I talked someone through altering it about two months ago 21:28
21:30 lizmat joined
stmuk this is actually sue's pi .. I need my own .. maybe one of www.etsy.com/uk/shop/TynemouthSoft..._leftnav_2 21:30
"Upcycled Computers"
RabidGravy I just got it at maplins 21:31
stmuk not artisanal enough 21:32
RabidGravy hipster
Skarsnik lol expensive keyboard 21:33
stmuk I want to put one in a security tray at an airport
21:36 lizmat left 21:37 nanis left
RabidGravy I'm quite liking a diy tablet thing with an rpi, 7" touch screen and some lipo battery 21:38
21:38 espadrine joined 21:40 lizmat joined
lizmat gave up on tethering 21:40
jnthn You...reached the end of your tether? 21:41
lizmat yes, and while on the 5th floor, that is no mean feat! :-) 21:42
I gave in to the hotel's ploy at robbing me to get decent wifi access
geekosaur wonders if they're doing the interference trick 21:44
stmuk I doubt that would be legal 21:45
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 :(
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
RabidGravy that actually sucks 21:46
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
muraiki www.fcc.gov/document/warning-wi-fi...prohibited
since jan 27 2015
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
21:48 nige1 left
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
(see also: net neutrality)
21:48 koo8 joined
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.
lizmat well, this was about 3/4G being flaky 21:50
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
there's some special event going on in the hotel with a lot of people...
muraiki oh, I took this completely out of cnotext then
sorry
21:51 adhoc left
lizmat feels more like overload local cell, come to think of it 21:51
*overloaded
21:52 TEttinger joined
geekosaur just a trifle cynical these days... 21:52
21:52 adhoc joined
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:53
masak , in his research, stumbles over irclog.perlgeek.de/perl6/2009-12-31#i_1878950 21:54
21:55 vytas left
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
nice triple-dipping in the style of a protection racket
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?
masak profan: you mean, destructuring as used in Perl 6? 21:57
profan yeah 21:58
masak Perl 6 does not have destructuring. :)
profan maybe im using the wrong terminology here
masak it has nested signatures, though
profan ah yes, this is what i'm referring to
RabidGravy yeah that's what I was taking it as
masak S06 goes through nested signatures 21:59
21:59 Begi2 joined
profan ah, there we go 22:00
awesome, thanks
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:01
22:02 Begi left
masak profan: heh :) 22:03
profan: we're eager to help here with that, and we try hard not to be snarky about it ;)
jnthn I tend to answer "how do you do destructuring in Perl 6" with "with signatures" :)
22:03 skids left
masak jnthn: that was not the exact question, though 22:03
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" :)
Skarsnik what is destructuring? x) 22:05
masak jnthn: you're right
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;
camelia rakudo-moar 04791b: OUTPUT«Bob␤9␤»
masak jnthn: my response, I realize, is a consequence of how I factor things in my mind
jnthn :-)
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. ;)
masak jnthn: that makes the two things different enough for me to go "Perl 6 does not have destructuring"
jnthn: haha
jnthn Fair enough
masak jnthn: now that you mention it... :P
jnthn uh-oh :P 22:07
masak .oO( destructuring, oddly enough, is dual to Skittlebräu )
22:08 yqt joined
profan ...Skittlebräu? sounds vaguely terrifying 22:08
masak just like destructuring sounds vagule appealing. ta-daa!
vaguely*
Zoffix cdn.fashionmagazine.com/wp-content/...2-Main.jpg 22:09
profan haha, well played
22:09 cpage_ joined 22:11 pippo joined
pippo m: say (2, 4 ... 5); 22:11
camelia rakudo-moar 04791b: OUTPUT«(2 4)␤»
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 …»
pippo ^^ bug?
jnthn No
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
Zoffix jnthn, is .hyper broken right now?
m: sleep 2 for ^4 .hyper: :1batch
camelia ( no output )
Zoffix m: sleep 2 for ^4 .hyper: :1batch; say now - INIT now
jnthn Zoffix: .hyper never was fully done, .race did work, then got bust, and timotimo at least partially fixed it earlier on today
camelia rakudo-moar 04791b: OUTPUT«2.01799386␤»
Zoffix Ah
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
timotimo++
pippo m: say (2, ->$i {$i * 2} ... 8);
camelia rakudo-moar 04791b: OUTPUT«(2 4 8)␤»
ab5tract Zoffix: slick use of INIT-thunk !
jnthn pippo: I think the summary is something like, "the upper acts as a threshold only for arithmetic/geometric sequences"
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".
Zoffix ab5tract++ reading your advent post right now :)
RabidGravy vagule! 22:15
jnthn masak: Well, that evaginated your expectations...
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
jnthn ab5tract: I meant "inferred from values"
pippo m: say (2, ->$i {$i ** 2} ... 16); 22:17
camelia rakudo-moar 04791b: OUTPUT«(2 4 16)␤»
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 Begi2 left
geekosaur actually, a mathematician would argue that whether it si correct or not depends on the rules for that particular math 22:17
ab5tract it's precisely the even-ness of the values/value closure that deduces the endpoint to be infinite, right? 22:19
m: say ( 2, * + 1 ... 5 )
camelia rakudo-moar 04791b: OUTPUT«(2 3 4 5)␤»
b2gills m: say 0, {$_ + Order.pick} ... 10
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)␤»
ab5tract i'm sure i'm just splitting hairs here
jnthn iiuc, we will always treat the endpoing as an absolute targert if there is a code block
We used to *always* treat it that way 22:20
ab5tract m: say (2, * * 2 ... 5) # but?
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 …»
TimToady we only deduce endpoint crossing on intuited sequences 22:21
with a function, we cannot solve the halting problem
b2gills It has no way to know if you are going to go past, then come back down to the endpoint
22:22 prammer left
TimToady correct 22:22
and there are plenty of sequences that do that
timotimo www.nu42.com/2015/12/perl6-newline...tched.html - this just crossed my screen 22:23
ab5tract ok, so in the * + 1 example, is there intuition going on?
jnthn ab5tract: No, that says how to compute the next element
Zoffix timotimo, it was mentioned today, unless that's where you found that link :) irclog.perlgeek.de/perl6/2015-12-11#i_11699372 22:24
ab5tract okay, but it still stops at 5.
ah, nevermind
:)
22:24 rurban left
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 …»
ab5tract b2gills: yup, that lightbulb is officially on :) 22:25
m: say 0, * + (^5).pick(*) ... 5 22:26
camelia rakudo-moar 04791b: OUTPUT«(0 5)␤»
timotimo Zoffix: okad 22:27
okay*
TimToady 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");
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␤␤»
Zoffix aww
ab5tract, your article made me hope I could make the above work somehow :(
Goal: make ☌ behave like foo() and be exported
ab5tract m: until 0, (* + (^5).pick) ... 5 !~~ Inf { say $++ } # unexpected :D 22:30
camelia ( no output )
ab5tract m: say until 0, (* + (^5).pick) ... 5 !~~ Inf { say $++ } # unexpected :D
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…»
cygx 'night o/
ab5tract it will be worth it, i think
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
ab5tract m: (until 0, (* + (^5).pick) ... 5 !~~ Inf { say $++ }).WHAT.say
camelia rakudo-moar 04791b: OUTPUT«(List)␤»
22:31 cygx left
ab5tract locally i get (Sub+{Precedence}) 22:31
ab5tract updates 22:32
Zoffix same
And I updated last night
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.
Thanks.
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
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) }'
but i might be mistaken
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");
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(…»
lucs jnthn++ : Perfect (as was your earlier answer to me)
TimToady Zoffix: if you're asking me, probably not a lot of win
Zoffix TimToady, aww :(
TimToady except insofar as we'll figure out more of the missing void contexxts
22:36 kst` is now known as kst
Zoffix m: sub foo ($x) { $x+1 }; foo(1) for ^1000000; say now - INIT now; 22:36
camelia rakudo-moar 04791b: OUTPUT«0.91260613␤»
Zoffix m: sub foo ($x) is pure { $x+1 }; foo(1) for ^1000000; say now - INIT now;
camelia rakudo-moar 04791b: OUTPUT«0.279157␤»
TimToady and void/sink context drives various optimizations
Zoffix This is awesome
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
(on native ints)
it's there just in case the spesher doesn't get to it before xmas 22:38
jnthn It goes up to 4 now? :)
TimToady: spesh won't get to it before xmas
TimToady I'm using it to hold the optimization in reserve, but you can test with it
then we can lower it to 3 :)
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
And doing it sensibly needs a little re-organization in spesh.
TimToady this will also optimize $i++, but only in void context, which turns out to be missing a surprising number of places
which is why I'm looking at it today...
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
but I agree that some of the void policy needs to be pushed up into actions 22:41
I'll also need to straighten out the $!in_declaration mess, I suspect 22:42
22:42 hankache joined
jnthn Good luck :) 22:42
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
where { $_ < 4 } reports useless use of <, for instance, when obviously it's not in void context really
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?
jnthn timotimo: Not loads
timotimo would it be enough just to calculate the offset into the linear memory location from a multi-dim array type?
and use the already existing positional ref?
jnthn timotimo: That's...hmm
:)
timotimo i honestly see no problem with that :) 22:45
jnthn I think it'll be fragile
TimToady what about shaped array hypers?
timotimo well, shaped arrays are already immutable in all the right ways for this to work
and IIUC nativeref has only got to take extra care about holding on to the right structures for the GC
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
'cus it doesn't expose a flat view
TimToady m: my @matrix[3;3] = [1,2,3],[4,5,6],[7,8,9]; say @matrix »+» 1
camelia rakudo-moar 04791b: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤ in block <unit> at /tmp/A4BALXWN5i:1␤␤»
TimToady that oughta make a new matrix of the same shape, incremented
jnthn Aye
TimToady: Probably a pointer to the indices array 22:47
oops
timotimo: ^
TimToady sinks back into the void
muraiki sinks back into the void pointer
jnthn timotimo: Can just store the int MVMArray or so we get given 22:48
timotimo hum. that'd make accessing that ref a bit expensive 22:52
i thought taking the ref would be the responsibility of the shaped array repr, which knows about its inner workings
jnthn No 22:54
masak er. 22:55
jnthn Otherwise positional refs would only work with one repr
masak ok, advent post published, a bit before 12th, it seems.
jnthn masak: It's the 12th somewhere :)
22:55 Coke2 joined
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.
apparently they changed now, and the big blue "Publish" button actually prematurely publishes the post instead :) 22:56
future advent bloggers, take heed... :)
anyway, five minutes before local midnight is not so bad.
people, feel free to review my dr^Wpublished post! :P
perl6advent.wordpress.com/2015/12/...he-switch/
22:57 hankache left, muraiki left
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
jnthn Coke2: Well, dalek seems to have vanished too 22:58
masak Coke2: I'm writing this from hack
Zoffix Coke2, I can... well, I can get it to ask me for a password :)
masak yeah, same. 22:59
don't seem to get further than that
Coke2 My auth works (key), but then it hangs.
22:59 perl6joe left
Zoffix weird 22:59
23:01 xfix left
masak so being *on* hack already works, but ssh'ing into it is currently busted 23:01
some resource being all eaten up, perhaps?
RabidGravy run out of space in /var ? 23:03
or ptys, doesn't make the pty until you log in 23:04
masak *nod* 23:05
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!␤»
Zoffix m: $_ = 42; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; when 42 { say "Another 42" }; "foo"
camelia rakudo-moar 04791b: OUTPUT«Kabloom!␤»
_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
Zoffix Daum.. Perl 6 is so smart
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!␤»
Zoffix or not :)
Skarsnik I had weird bug with when something {} and something when . but I did not manage to defound it ($_ was miused)
Zoffix m: $_ = 42; when 42 { say "42!" }; when 52 { say "52"; }; default { say "Kabloom!"; }; default { say "meow" }; $_ = 42; when 42 { say "Another 42" }; "foo"
camelia rakudo-moar 04791b: OUTPUT«42!␤»
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"
camelia rakudo-moar 04791b: OUTPUT«42!␤»
Zoffix huh? the last say "foo" doesn't work? 23:09
Skarsnik it exit at the first when that work
Zoffix oh :(
Skarsnik Did you read the post! x)
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" }
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␤␤»
Zoffix :S
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? :\
jnthn timotimo: How do?
*so
timotimo well, i'm supposed to store the index array, right?
oh, wait. it was a single number before, now it's a pointer
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
oh, neat.
Zoffix wait, why is it complaining about 'bar' above?
jnthn 'cus look at the attribute member of the union
Zoffix Why is it trying to convert anything to base-10?
timotimo ah
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␤␤»
TimToady that is all
Zoffix that stucks
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␤»
Zoffix Hm
lizmat _nadim: are you aware of the .?method syntax?
Zoffix m: $_ = 42; if ( $_ ~~ 42 ) { say "42 num" } elsif ( $_ ~~ "42" ) { say "42 str" }
camelia rakudo-moar 04791b: OUTPUT«42 num␤»
Zoffix m: $_ = 42; when "42" { say "42 str" }
camelia rakudo-moar 04791b: OUTPUT«42 str␤»
lizmat m: dd 42.Ztr
camelia rakudo-moar 04791b: OUTPUT«Method 'Ztr' not found for invocant of class 'Int'␤ in block <unit> at /tmp/lhmCBwZsr5:1␤␤»
lizmat m: dd 42.?Ztr
camelia rakudo-moar 04791b: OUTPUT«Any $var = Any␤»
23:14 spider-mario left
Zoffix m: given 42 { when "42" { say "42 str" } } 23:14
camelia rakudo-moar 04791b: OUTPUT«42 str␤»
lizmat _nadim: only call the method if you can, if not return Nil
TimToady hmm, dd should be taught to propagate Nil
Zoffix ¯\_(ツ)_/¯
lizmat TimToady: probably... but not tonight, not by me :-) 23:15
Zoffix m: $_ = 42; if ( $_ ~~ "42" ) { say "42 num" } elsif ( $_ ~~ 42 ) { say "42 str" }
camelia rakudo-moar 04791b: OUTPUT«42 num␤»
Zoffix m: $_ = 'bar'; if ( $_ ~~ 42 ) { say "42 num" } elsif ( $_ ~~ "42" ) { say "42 str" }
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␤␤»
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␤␤»
Zoffix m: $_ = 'bar'; if ( $_ ~~ "42" ) { say "42 num" } elsif ( $_ ~~ "42" ) { say "42 str" }
camelia ( no output )
Zoffix hm
23:17 rindolf left
Zoffix masak++ good Advent post :) Learned stuff :) 23:18
Probably could make use of the new info to better rewrite the precision stuff in Number::Denominate github.com/zoffixznet/perl6-Number...e.pm6#L103 23:19
23:21 kid51 joined
masak :) 23:22
by the way, the backlog in irclog.perlgeek.de/perl6/2009-12-31#i_1878950 is *riveting* reading
(people are discussing whether to slap "official" on Rakudo. in 2009.) 23:23
Zoffix hehe
masak that whole discussion culminated in TimToady++ updating S01. 23:24
"The language designer is neither omniscient nor omnipotent, and never will be, despite requests for those particular features."
"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
"If you are unhappy with the current rate of convergence, please cooperate more with someone else you think is interested in convergence."
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
masak Zoffix: a summary can be gleaned from irclog.perlgeek.de/perl6/2009-12-31#i_1879670
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␤»
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␤␤␤»
TimToady m: sub moo (**@x) { say @x }; moo(Nil)
camelia rakudo-moar 04791b: OUTPUT«[(Any)]␤»
TimToady that is the basic problem with dd
no way to run off the Any default
diakopter dd is like .perl but...?
TimToady also prints var name if it can
my $x = 42; dd $x 23:29
m: my $x = 42; dd $x
camelia rakudo-moar 04791b: OUTPUT«Int $var = 42␤»
TimToady hmm, that's not right either :)
23:31 bitmap left
Zoffix masak, wow, lots of drama in there :) I'll need a fresh batch of popcorn. 23:32
23:33 JPGainsborough left
masak Zoffix: yeah. lots of back and forth. 23:33
23:33 bitmap joined
masak Zoffix: but it's mostly interesting because of the benefit of six more years after that. 23:33
Zoffix: speicifically, Rakudo is now the uncontested leader without being branded "official".
specifically*
(and while it could be argued that branding it such would have made us reach this point sooner, I kind of doubt that) 23:34
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:35
masak :) 23:36
m: use experimental :macros; say 2 + 2; macro infix:<+>($l, $r) { quasi { "OH HAI" } } 23:37
camelia rakudo-moar 04791b: OUTPUT«AST.new␤»
masak need to do something about this case: post-declared macro operators that override an existing operator
23:37 Coke2 left
lizmat TimToady: dd got broke when I tried to handle named params 23:39
m: my $a = 42; dd :$a
camelia rakudo-moar 04791b: OUTPUT«Int a = 42␤»
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"
masak: or did you forget a proceed?
23:41 skids joined
TimToady no, it works right, there's an implied succeed there that skips the last say 23:41
diakopter oh
23:42 kid51 left
diakopter what would you change to not repeat the phrase 23:42
print "and "; proceed? 23:43
23:43 woodruffw joined
diakopter how would you invoke that given block inline? 23:43
masak I don't understand that last question. 23:46
TimToady just turn it into a for 1..10
diakopter like, in a "fluent" pattern
statement less
ok, for 1..12 { given blah 23:47
masak right
TimToady don't need the given if you have for
masak or even without the.. what TimToady said
that's actually one of the points of the 2009 post! :D
which see
TimToady you'll need a statement before the first when that does "On the $nth day of Christmas"
Skarsnik pls no x) 23:48
I don't want to have stupid song stuck in my head xD
diakopter er I meant when 23:49
masak Skarsnik: FIIIIVE GOLDEN RINGS
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..."
a much better song to have stuck in your head
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, lostinfog left
diakopter maybe we could be, like, the 4000th day Adventists 23:51
TimToady I don't think they go that high... 23:52
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'␤»
RabidGravy no then :) 23:54
but sssh
cognominal hopefully the nqp::shell signature is hard :) 23:55
TimToady not very :)
but it gets tiresome, and eventually you just ask nine++ for an account :) 23:56
cognominal :)
23:56 Psyche^_ joined
diakopter m: use nqp; say nqp::sha1(nqp::rand_i()) for ^999 23:58
camelia rakudo-moar 04791b: OUTPUT«6B99E2C1E3CB29FFBEF6C568525DF551C8D00946␤D05BC641EB3500A97348E9EFE12DBF7C26898913␤5CE614D9B5B0EA97AA2AC61FC909221DA785D9BC␤865ED8D369E5EEBEF3BE54FB7245961F1F85BE96␤9720140689C747C08059F0FDA4498CFA95356A32␤0D89F46D34AC3C43C42CEC7CD0BB6234715E3EDD…»
diakopter m: use nqp; say nqp::sha1(nqp::rand_i()) for ^999
camelia rakudo-moar 04791b: OUTPUT«9081B1E39EC6393C4FC33076D0348D6BF22728D4␤C3D6AB223A68E5FC0CD74E322DD88E4D7DE2C012␤4F8CDC1A3399A638F48C5F09D2B9148C43192E1E␤3E029327CA91F0EC0EF1A1392F65B33A3E712E98␤70E5E4E663BB6C46F08965DDF1B3C218CB46055A␤76098466C69D7D386CDB1A9D829A85FE7DEAFC9A…»
diakopter we have sha1 but not sha2 or sha3? 23:59