»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
Ven
.oO( [Z] @a is actually a precircumfix )
00:02
mickcy_ca Hello Perl 6, I wonder if there is a way to do a negative match similarly to a negative character class. Specifically, I want to do something like <-[*/]> where */ always is in that order. 01:09
pmichaud mickcy_ca: you're wanting to match any pair of characters that aren't "*/" ? 01:13
mickcy_ca pmichaud: Pretty much. 01:14
pmichaud well, the obvious is <!before '*/'> .. 01:15
mickcy_ca pmichaud: More like any character that is not * that is followed by /
pmichaud but I suspect that's not exactly what you're trying to do
moritz <-[*]> <!before '/'>
pmichaud uhhhh. no? 01:16
that looks very wrong to me
moritz it's equivalnt to / <!before '*/'> . /
pmichaud no it isn't.
r: say '*a' ~~ / <!before '*/'> ./ 01:17
+camelia rakudo-{parrot,moar} ce1e74: OUTPUT«「*」␤␤»
moritz oh, right, sorry
pmichaud mickcy_ca: I do have to ask, though, if you're trying to match everything up to '*/' as a closing delimiter. 01:19
mickcy_ca pmichaud: that is actually the purpose of my question.
pmichaud If so, you can do something like .*? '*/' 01:20
moritz ... and make sure nothing backtracks into it 01:21
mickcy_ca pmichaud: my original thought was that ...
Would be part of a token. 01:22
No backtracking problem there.
pmichaud r: say " everything before */ and other stuff after" ~~ / .*? '*/' /
+camelia rakudo-{parrot,moar} ce1e74: OUTPUT«「 everything before */」␤␤»
moritz [:!r .*? '*/'] 01:22
pmichaud why would backtracking be a problem there, other than possible performance? 01:23
well, other than backtracking has to be turned on.
So...:
mickcy_ca I am still getting used to all the new things in Perl 6 01:24
mickcy_ca If I continue with with the C header parse ... is it really worth picking out all conditional defines, enum, and the like? End goal toward building a wrapper class around the library. 01:32
FROGGS jnthn: awesome, thank you 01:48
+yoleaux 28 Dec 2014 22:11Z <jnthn> FROGGS: doing that at QAST level is absolutely wrong, I think. It will pessimize every loop that doesn't care for the rsults, and worse it'd be useless for Perl 6 which needs lazy execution. This ties into GLR's proposed LoopIter, and I think we likely want to leave it for that.
mickcy_ca I think I have found a bug ... not sure how reproduceable it is ... but you see my gist for it on pastebin.com/chjgKfg5 01:55
Line 21 is the offender.
And just in case anybody is looking at it ... enum and comment don't parse properly yet. 01:59
skids No compile failures with that here. 02:08
mickcy_ca skids: Not sure why not ... it blows up on my machine. 02:19
skids Any error message?
mickcy_ca Too many positionals passed; expected 1 argument but got 2 02:20
Timbus thats a runtime error :I
mickcy_ca And that error refers to the last line of my script. 02:20
skids Probably that is a runtime error 02:20
mickcy_ca That ONLY happens when {\s*} is used at the offending line. 02:21
Timbus yes but, we need to know how its being used, not just what it is
mickcy_ca Timbus: Granted, but would one not expect a runtime error to raise it's ugly head if {\s+) was used? 02:22
And that being the ONLY change in the code.
skids That depends. Got any sample input?
Timbus that change will cause the match to work completely differently 02:23
mickcy_ca Just a moment ...
See pastebin.com/JjMJMhhV for the input.
skids OK, that gets me the same error. 02:24
mickcy_ca Ergo repeatable error. 02:25
Timbus: Granted, the match would be different between {\s+} and {\s*}, but if ran without error I believe that type of change should not cause a runtime error. Is this reasonable? 02:27
mickcy_ca I really need to read my posts prior to hitting <enter> 02:27
That should be "...but if one ran without ..." 02:28
skids I wouldn't say that's a reasonable expectation, no. 02:29
Timbus ^
skids Any expression that can match on 0 characters seems to present the same error message. 02:33
Timbus i was looking into that too
mickcy_ca OK, maybe I did not phrase that correctly ... If I am doing nothing but parsing some text, I can see matches failing due to the difference one-or-more or zero-or-more tests ... but honestly, if the parse runs without error on one, how could it crash with a runtime error on the other?
My gist has MANY places where it could match on 0 characters, the only place that I have found that causes the issue is that one instance. 02:36
skids I do agree the error message is not fully awesome. 02:37
Timbus it matches infinitely on \s* 02:39
but it crashes specifically because the rule is called 'item'
lue mickcy_ca: if I change all of your "rule"s to "token"s, it goes from a runtime error to a failed match ( say $/ prints "(Any)" ). I think something about using rules is causing the error.
Timbus well okay
because 'item' is a methopd name, probably present in the grammar class? 02:40
at a guess?
mickcy_ca OK.
Never would have guessed that one off of the error ... especially since the error is triggered elsewhere with a seemingly unrelated change. 02:41
Timbus haha. just a quick reminder :P <masakq> right. those tokens there probably want to be rules.
lue Yeah, seems calling it "item" causes the error, and then the use of \s* within "rule" regexes gets you a hanging program.
Timbus i hate that hanging error 02:42
mickcy_ca Not worried about a hang on that one at the moment ... it is just an example of the error I noticed.
Timbus mickcy_ca, thats cool. i just needed to know how you were causing it. theres thousands of ways to do use a broken function without ever tripping the runtime error. 02:45
to use* 02:46
mickcy_ca Glad I could be of service. 02:47
And about the rule/token debate ... I have been doing some reading and the only difference noted in my reading is that rules match whitespace, tokens do not. I am pretty sure that any rule in there could unmodified, be a token, but not vice versa. Am I correct in this? 02:50
Or am I missing something of a deeper difference between them. 02:51
Timbus m: grammar test { rule TOP { <item> }; rule item { \s* }; }; say test.parse("foo") 02:52
+camelia rakudo-moar ce1e74: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method item at src/gen/m-CORE.setting:1148␤ in any !reduce at gen/moar/stage2/QRegex.nqp:1241␤ in any !cursor_pass at gen/moar/stage2/QRegex.nqp:1202␤ in regex item at /tmp/cqzQMqnz…»
Timbus how do you even test that.. "correct behaviour: should hang indefinitely" 02:53
expected output: heat death of universe
TimToady a rule used instad of a token would admit whitespace in places the grammar might not want
mickcy_ca TimToady, is that what I said, or opposite to what I said? 02:54
lue mickcy_ca: in general, if you change what kind of rule it is (a "regex", "token", or "rule"), you'll have to make some changes to the regex within if you want it to work the same as before. 02:56
mickcy_ca That is my general understanding ... but I was referring only to the grammar which I posted. 02:57
TimToady has not had a chance to see what "in there" refers to 03:00
mickcy_ca Timbus: Curious, why would "correct" behaviour be to hang on that example? I would expect just that the match would fail, even with backtracking enabled. There should be some fundamental limit on how many times a regex would be allowed to backtrack based on some complexity and length of string. 03:01
mickcy_ca TimToady: "in there" is a reference to the gist that I posted earlier. 03:02
Timbus how many times can you match a zero width char
mickcy_ca Infinite times ... but the engine should be smart enough to not do that. 03:03
Timbus yeaaaaah. thats what i said
TimToady well, in some cases, but in general you're talking about solving the halting problem 03:04
the engine could certainly do better in the obvious cases
Timbus how does perl 5 do it
mickcy_ca ^
Do what? Not hang on a zero width char test? 03:05
TimToady I think p5 catches that one at compile time 03:07
Timbus yea. but it's probably to do with perl 5 not having subrules, or grammars like this in general
or.. it catches it at compile time. okay
TimToady it's easy to detect when something must be zero-width, but harder when something *might* be zerowidth
m: '' ~~ / ''* / 03:08
+camelia rakudo-moar ce1e74: OUTPUT«Memory allocation failed; could not allocate 933298176 bytes␤»
TimToady that should be easy to detect, but just NYI
Timbus i thought it just p5 moved along after matching a zero width space. i remember lizmat saying we should not-match a zw char more than once or something. and then jnthn wrote an essay while i nodded and pretended to understand, and here we still are 03:09
mickcy_ca I am curious about the reasoning that jnthn had used. 03:10
Timbus parsers are hard! thats the extent of my expert knowledge on the subject 03:12
Timbus puts a sippy cup lid on his coffee and sits at the baby table
mickcy_ca I may have found the IRC log for that. Although it dates back to 2011-11-18 03:13
Timbus eesh. nah it was this year, maybe last 03:17
TimToady well, the subject comes up periodically 03:18
Timbus but perhaps it is an infinitely recurring subject :>
TimToady there are several bits to the argument
mickcy_ca I noticed that ... and hopefully not infinitely recurring.
TimToady one is that the general case isn't possible to solve, of course
mickcy_ca I have been reading many logs ... 03:19
TimToady the next is that we don't prevent infinite loops elsewhere...
m: loop {}
but mainly it hasn't bubbled up to anyone's level of attention yet
Timbus one is slightly-more-accidental
+camelia rakudo-moar ce1e74: OUTPUT«(timeout)»
TimToady it's not that we don't point out obvious errors elsewhere
though in this case, the boundary between obvious and not-so-obvious is kinda squishy 03:20
skids r: perl6-m -e 'say "a#" ~~ m/a \#/; # LTA error IMO. The message for the 'a\#' (unspace) suggests using '#' or \x23 this case might benefit from that too. 03:21
+camelia rakudo-{parrot,moar} ce1e74: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> perl6-m -e ⏏'say "a#" ~~ m/a \#/; # LTA error IMO.␤ expecting any of:␤ infix stopper␤ …»
skids oops
r: say "a#" ~~ m/a \#/
+camelia rakudo-{parrot,moar} ce1e74: OUTPUT«===SORRY!===␤Regex not terminated.␤at /tmp/tmpfile:1␤------> say "a#" ~~ m/a \#/⏏<EOL>␤Couldn't find terminator /␤at /tmp/tmpfile:1␤------> say "a#" ~~ m/a \#/⏏<EOL>␤ exp…»
mickcy_ca I too have noticed that the \ operator doesn't always escape the expected way ... so I have switched to direct quotes instead. That said, '#' and \# should produce the same results. 03:23
m: say "a#" ~~ m/a '#'/ 03:24
+camelia rakudo-moar ce1e74: OUTPUT«「a#」␤␤»
TimToady std: say "a#" ~~ m/a \#/
+camelia std f9b7f55: OUTPUT«===SORRY!===␤Regex not terminated at /tmp/IZIxCK9Jb2 line 1 (EOF):␤------> say "a#" ~~ m/a \#/⏏<EOL>␤ expecting quantifier␤Parse failed␤FAILED 00:00 138m␤»
TimToady std: say "a#" ~~ m/a \# b/
+camelia std f9b7f55: OUTPUT«===SORRY!===␤Regex not terminated at /tmp/HBpZdfjt4a line 1 (EOF):␤------> say "a#" ~~ m/a \# b/⏏<EOL>␤ expecting quantifier␤Parse failed␤FAILED 00:00 138m␤»
TimToady hmm 03:25
std: say "a#" ~~ m/a \ # b/
+camelia std f9b7f55: OUTPUT«===SORRY!===␤Regex not terminated at /tmp/sJ1XLvgos5 line 1 (EOF):␤------> say "a#" ~~ m/a \ # b/⏏<EOL>␤ expecting quantifier␤Parse failed␤FAILED 00:01 138m␤»
TimToady std: say "a#" ~~ m/a\ # b/
+camelia std f9b7f55: OUTPUT«===SORRY!===␤No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes (' ') or use a backslashed form like \x20 at /tmp/FnrllZpuSU line 1:␤------> say "a#" ~~ m/a\⏏ # b/…»
TimToady std: say "a#" ~~ m/a\# b/
+camelia std f9b7f55: OUTPUT«===SORRY!===␤No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('#') or use a backslashed form like \x23 at /tmp/UKnYD0sEGM line 1:␤------> say "a#" ~~ m/a\⏏# b/␤…»
mickcy_ca Only way that works at this time is quoting
TimToady there's some interaction with unquoting, which \# can start
skids (well \x23 works too) 03:26
TimToady std: / <[ \# ]> /
+camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
TimToady std: / <[ \ ]> /
+camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
TimToady hmm, not how I remembered it...
TimToady is a bit distracted by relatives at the moment, sorry 03:27
mickcy_ca std: say 'a#' ~~ /<[\#]> 03:28
+camelia std f9b7f55: OUTPUT«===SORRY!===␤Regex not terminated at /tmp/6RvSKst4oy line 1 (EOF):␤------> say 'a#' ~~ /<[\#]>⏏<EOL>␤ expecting quantifier␤Parse failed␤FAILED 00:00 139m␤»
Timbus m: grammar test { rule TOP { <item> }; rule item { a }; }; say test.parse("a")
+camelia rakudo-moar ce1e74: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method item at src/gen/m-CORE.setting:1148␤ in any !reduce at gen/moar/stage2/QRegex.nqp:1241␤ in any !cursor_pass at gen/moar/stage2/QRegex.nqp:1202␤ in regex item at /tmp/mPpD7YH5…»
Timbus could someone ticket that? i cant even remember how :/ 03:29
unless we use github tickets now
mickcy_ca See rakudo.org/tickets/ 03:31
ugexe_ any tricks to getting libicu-dev detected by rakudo's Configure.PL for the latest rakudo commit referencing parrot? 03:50
apt-get install libdev-icu && perl Configure.pl --backends=parrot --gen-parrot --gen-nqp: ... Parrot without ICU is not supported anymore. Failed running perl Configure.pl 03:51
(libdev-icu install was successfull)
mickcy_ca Going for a movie ... ta ta 4 now. 03:55
hoelzro is it unusual to add named params to Str implementations? 04:21
ex. $xmly-type.Str(:pretty) 04:22
andreoss is there a decreasing range operator? Inf..0 09:48
andreoss m: (100..1).elems 09:50
+camelia ( no output )
andreoss m: say (100..1).elems 09:50
+camelia rakudo-moar ce1e74: OUTPUT«0␤»
moritz m: .say for 10 ... 1 09:52
+camelia rakudo-moar ce1e74: OUTPUT«10␤9␤8␤7␤6␤5␤4␤3␤2␤1␤»
andreoss moritz: is it still a range? 09:54
moritz andreoss: no, just a lazy list 09:55
andreoss ok. why Inf..0 works but 100..0 not? 09:56
moritz work? how does it work? 09:57
m: say (Inf...0).perl
m: say (Inf..0).perl
+camelia rakudo-moar ce1e74: OUTPUT«(timeout)»
rakudo-moar ce1e74: OUTPUT«Inf..0␤»
moritz m: say (100..0).perl
+camelia rakudo-moar ce1e74: OUTPUT«100..0␤»
andreoss oh.. its actually -Inf..0, so it's not decreasing 09:58
FROGGS andreoss: -Inf..0 does not make that much sense
it can only be used in a range check and that is identical to * < 0
andreoss Inf itself does not make much sense 10:00
JimmyZ well, X ... * does make sense 10:01
andreoss ranges can be compared fast, lazy list should be evaluated for this 10:02
m: say (1..1_000_000) == (1..1_000_000)
+camelia rakudo-moar ce1e74: OUTPUT«True␤»
andreoss m: say (1...1_000_000) == (1...1_000_000)
moritz that only compares number
+camelia rakudo-moar ce1e74: OUTPUT«(timeout)»
moritz m: say (1..1_000_000) eqv (1..1_000_000) 10:03
+camelia rakudo-moar ce1e74: OUTPUT«(timeout)»
andreoss moritz: what smartmatch operator does here? 10:04
m: say (1..1_000_000) ~~ (1..1_000_000)
+camelia rakudo-moar ce1e74: OUTPUT«True␤»
andreoss still compares only size?
m: 1...10 ~~ 1...10 10:05
+camelia rakudo-moar ce1e74: OUTPUT«(timeout)» 10:06
andreoss forgot parens
andreoss which chained method calls where do i put new line? 10:52
andreoss it gives a error about "." using to concatenate strings. 10:52
nine moritz: Sorry for the inconvenience. It seems like the default route for IPv6 does not get set automatically after a reboot and I tend to forget that. I hope the upgrade to openSUSE 13.2 will fix that. 11:08
moritz nine: I manged with ssh -4, so no worries 11:18
azawawi hi 11:23
i have been looking at github.com/perl6/roast/blob/master...-win.t#L92 11:24
$*SPEC.catdir('C:', 'rakudo') should return C:\rakudo not C:rakudo on windows 11:25
moritz sounds vaguely sane 11:27
azawawi \ is the volume/directory separator on windows 11:28
moritz: Happy new year in advance btw :)
moritz azawawi: thanks :-)
azawawi moritz: and thanks for updating rakudo on win32
moritz azawawi: I did no such thing 11:29
azawawi moritz: been trying to get farabi6 working again
moritz: you blogged about it :)
moritz azawawi: FROGGS++ has built an r-star .msi
azawawi FROGGS++ indeed
i wonder if the MSI installer should add C:\rakudo\bin and C:\rakudo\languages\perl6\site\bin in local or system %PATH% 11:31
that way panda-installed scripts can work out of the box
could you please point me to MSI installer code?
moritz azawawi: in the rakudo/star repo, the Makefile template in tools/build/Makefile.in contains an 'msi' target 11:35
FROGGS there are xml files that specify what the installer should do 11:47
a3gis lizmat: hi! I heard you wrote github.com/rakudo/rakudo/blob/nom/...ore/Set.pm ? 12:12
lizmat well, I ported it from the Niecza implementation and then added to it
a3gis oh ok; I was just wondering why Set isn't type-parameterised 12:13
lizmat you mean, why isn't it using typed hashes ?
a3gis I mean, being able to create a Set over elements of a specific type. e.g. Set[Int] 12:14
azawawi FROGGS: you mean github.com/rakudo/star/blob/master...oduct.wxs, right? 12:16
lizmat well, perhaps because it doesn't say anything about that in the spec
and because we don't do constraints just yet ?
a3gis alright, then maybe I should read the spec :p
thanks
azawawi moritz: thanks
lizmat a3gis: that's not saying it doesn't make sense 12:17
but I know that the way typed hashes are currently implemented may well change in the future 12:18
it's a bit of an adhoc implementation atm
lizmat make it work and all that :-) 12:18
Mouq masak: github.com/masak/007/pull/1 12:24
moritz Mouq++ 12:37
+dalek c: edef417 | Mouq++ | lib/Language/ (2 files):
Discuss :sigspace in a bit more depth.
13:33
rjbs Heh, while doing moderation: 14:08
To: perl6-announce@perl.org
Subject: Parking Violation Notice 14:09
FROGGS *g* 14:17
xfix rjbs, clearly spam 14:18
rjbs xfix: I know.
Sometimes, spam subjects are funny. 14:19
jdv79 rjbs: haven't you worked at an an "email" company for a while? 14:22
rjbs Coming up on ten years.
jdv79 how can you find that funny? have you not seen it all byt now? ;) 14:23
xfix I saw spam with [SPAM] tag. 14:23
FROGGS I guess it is the combination of subject and recipient this time :o)
jdv79 ugh, i've been at this gig for 6 and its been quite enough. i can't imagine doing 10.
rjbs If I was the kind of person who got burned out and cynical after setting it all, I wouldn't be working working with perl5 and email for so long. ;) 14:24
s/setting/seeing
FROGGS xfix: that's what your provider adds... mine are tagged ***SPAM***
xfix My provider doesn't add tags to spam.
It's just in spam directory.
FROGGS my spam mails are also often funny, because my address is email@froggs.de and so they talk to me as if my name is 'email' :o) 14:25
rjbs Yeah, I get that sort of thing, too. "Dear cpan:"
FROGGS yeah
jdv79 i just meant tired and/or uninterested; not necessarily cynical. 14:26
xfix Like CPAN is a real person.
rjbs "Dear cpan, you won't believe these embarrassing photos of you!"
xfix rjbs, sure, under Acme::CPANPhotos
jdv79 as someone that "does email" do you think the spam war will ever be won? i still get tons of it.
xfix (not a real module)
rjbs jdv79: Not on SMTP, no.
Or: not without a few more significant policy cahnges. 14:27
xfix I checked spam directory. Hm, apparently I have won 2,500 million pounds. Sounds legit.
FROGGS click it!
xfix It has a footer: This email is free from viruses and malware because avast! Antivirus protection is active.
(and link to antivirus)
rjbs Ha, somebody just clicked the link in the "you won £2,500mn pounds" scam I sent out!
xfix I didn't. 14:28
FROGGS :P
xfix "You Have Won £2,500,000.00 Pounds Sterling. Get back for claim."
Hm, no attachments...
That's the entire mail.
jdv79 i found the discovery and use of my "contacts" lately the creepiest yet. i get spam from people that are probably connected to me on the net somewhere... 14:29
rjbs "Want 300 free e-gold for speeding up crops? Let us connect to your contacts!"
xfix Hm, I wonder what this e-gold is. 14:30
(probably not useful for anything)
Why Rakudo Star compilation freezes for me on '/home/xfix/Projects/Packages/rakudo-star/pkg/rakudo-star/usr/bin/perl6-p --target=pir --output=/home/xfix/Projects/Packages/rakudo-star/pkg/rakudo-star/usr/lib/parrot/6.11.0/languages/perl6/lib/Pod/To/HTML.pm.pir /home/xfix/Projects/Packages/rakudo-star/pkg/rakudo-star/usr/lib/parrot/6.11.0/languages/perl6/lib/Pod/To/HTML.pm' 14:31
(100% of CPU used, and doesn't continue)
Hm, I guess it's because I already had not working Perl 6. Removed it, and restarted the compilation. Perhaps it will work. 14:35
b2gills Write a program that makes 2 + 2 = 5 : codegolf.stackexchange.com/a/28887/1147 15:10
xfix b2gills, yes, I totally don't have an idea how it works. 15:12
b2gills Well then don't click the `edited Jun 6 at 12:06` text
... If you want to stay in the dark. 15:13
a3gis hello again! could someone help me out as to why "True & False ~~ Bool" returns False? 16:05
or all(True) ~~ Bool 16:06
Mouq m: say True & False ~~ Junction 16:07
+camelia rakudo-moar ce1e74: OUTPUT«True␤»
a3gis oh
so it doesn't distribute ~~ over the junction or something? 16:08
Mouq It depends on the right hand side. foo ~~ bar is just sugar for bar.ACCEPTS(foo) 16:11
a3gis oh ok
Mouq If ACCEPTS takes Mu, it'll take the Junction itself, instead of the individual values.
a3gis what would be the best way to translate all($xs) ~~ T ? 16:12
Mouq I'm trying to figure that out myself :/ 16:13
You might try all(map &WHAT, @$xs) ~~ T 16:15
Err
=== T
a3gis mh 16:16
Mouq But at that point you may as well just do all map {.WHAT ~~ T}, @$xs
psch hi #perl6 \o 16:22
psch m: say so (True, False) >>~~>> Bool 16:22
+camelia rakudo-moar ce1e74: OUTPUT«True␤»
a3gis ooh 16:23
psch the "silly fish" operator \o/
...except of course not really :)
a3gis great, thanks :)
I tried "if all($prod.factors.map(* ~~ BNF::NonTerminal)) {" 16:24
but was getting "No such method 'count' for invocant of type 'Bool'"
Mouq a3gis: * doesn't become code with ~~ 16:26
Probably needs a warning, I know I've fallen into the same trap... 16:27
Mouq m: say * min 4 # same thing; useful, but potentially confusing 16:29
+camelia rakudo-moar ce1e74: OUTPUT«4␤»
psch there's bug for WhateverCode not priming everything iirc
#122708 16:30
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122708
psch .tell Timbus the issue with .item in a grammar is already ticketed, #77350. the example is with .any, but .item is a method on Mu as well
+yoleaux psch: I'll pass your message to Timbus.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77350
a3gis Mouq: oh 16:32
a3gis would someone mind to take a look at l108-135 and tell me if I can simplify anything? gist.github.com/a3gis/d1ed877a269bbea6b473 16:32
jdv79 NativeCall's tests don't seem to pass on my version here. perl6 version 2014.10-104-g209674f built on MoarVM version 2014.10-31-geba41f9. 16:36
jdv79 i guess i'll update and see if that helps 16:39
jdv79 nope. NativeCall tests still fail on newest moar-jit brew 16:59
nopaste.info/ab25d417f9.html 17:01
+dalek rl6-roast-data: 0218abb | coke++ | / (5 files):
today (automated commit)
17:03
TimToady hmm, I have libicu52 and libicu-dev installed, but when I config I get "===SORRY=== Parrot without ICU is not supported anymore." 17:09
raydiak hey #perl6 o/ 17:09
TimToady moritz: ^^^ 17:10
raydiak: \o
jdv79 hmm. i just tried to write the simplest of web scrapers and its not happy.
raydiak good morning TimToady 17:11
jdv79 nopaste.info/2bda1ebe10.html should be no problem, right? i'm not sure how to debug that. 17:12
seems to hang fetching after fetching google eating 90-100% cpu. 17:13
raydiak jdv79: yeah I don't think you're doing anything wrong...if you wanted to debug it, I wonder if yahoo redirecting to https has anything to do with it...problem might be in IO::Socket::SSL instead of HTTP::UserAgent 17:19
(I partly suspect IO::Socket::SSL because I had to --notests to get it to install) 17:21
jdv79 i had to use --notests to install NativeCall and HTTP::UserAgent but not IO::Socket::SSL 17:28
raydiak jdv79: sounds like maybe we both have some issues to report :) but only the yahoo one fails for me, what about on your end? 17:31
jdv79 yeah, google and ddg are ok 17:32
raydiak jdv79: probably is a problem with the https redirect then, in one module or another 17:33
jdv79 seems to be https related - www.google.com hangs 17:34
raydiak darn you github, quit mangling my issue reports with markdown... 17:43
FROGGS TimToady: perhaps it's checking for the existence of /usr/include/unicode/something.h 17:43
TimToady: IIRC it is meant to use pkg-config instead of icu-config, but I dunno if it does use the former nowadays or not 17:44
TimToady blowing away parrot and install/bin is not sufficient, despite the new parrot finding ICU 17:45
TimToady so the test is bogus somehow 17:45
ugexe i opened an issue on the icu thing last night on NQP fwiw 17:47
TimToady hmm, it's actually looking in nqp_config
ugexe parrot actually sees ICU as installed too (as seen here: travis-ci.org/ugexe/P6TCI/jobs/45332054#L278)
TimToady moritz: basically, it looks like nom requires nqp to supply ICU, but nqp does not require parrot to supply ICU, so any old parrot makes nqp happy but not nom 17:58
[Coke] parrot build died today on OS X, digging.
[Coke] I think the icu failure might be too eager. 18:00
it's not even building parrot first.
TimToady [Coke]: see what I just said
itz_ hmm I just had panda seg fault with moar (deleting and rebuilding everything) 18:01
[Coke] danke.
TimToady is attempting a rebuild after blowing away nqp to see if that is a workaround
[Coke] (and I lied, it did build parrot, I didn't do this in a clean dir). I have icu installed, so parrot -should- have enabled it.
... and my parrot does. 18:02
TimToady blowing away nqp also does not help 18:04
[Coke] However it's checking for icu seems wrong, since the parrot I'm building does have it. 18:06
ugexe not the checking, but setting it in the config
$impls{parrot}{config}{has_icu} doesnt seem to get set 18:07
TimToady maybe we should revert until we figure out what's happening 18:11
unless someone feels like they'll have a fix soon
ugexe i spent a few hours last night track it down with no success :( 18:14
raydiak rakudo's Configure.pl on L179 is checking $nqp_config{'has_icu'}, but %nqp_config's keys are named like 'parrot::has_icu' 18:25
+dalek kudo/nom: 49dac31 | hoelzro++ | src/core/asyncops.pm:
Don't use busy waiting if you don't have to with earliest

If we have a single channel and we're not using a wait block, we can simply call $c.receive. This addresses RT #123515, but a facility (probably VM-level) should be added to prevent busy waiting, even in the multi-channel case
18:26
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123515
+dalek kudo/nom: 80b9123 | TimToady++ | Configure.pl:
Revert "Require ICU support on the Parrot backend"

This reverts commit 7fca9456786ed5e39d28d37d74b445fc2e60c8c8. It's falsely reporting the absence of ICU.
18:31
raydiak TimToady: I think changing that key I just mentioned fixes it; testing... 18:35
TimToady oh, didn't see your note
raydiak y'all could probably have that tested and fixed before my build finishes :) 18:36
TimToady has to take the maternal uncle of Perl to the doctor
afk &
raydiak \o
moritz TimToady: IMHO it's fine for nqp to not need ICU 18:40
TimToady: though one might argue that nqp's Configure.pl should have a flag --requires-icu which makes it reject a parrot without icu 18:41
raydiak should have tried this out on hack instead of his own laptop
raydiak yep, think that fixed it for me...someone w/more git experience and a rakudo commit bit want to un-revert and fix? 18:47
(of course you'll need to quote the key when you add the ::, or p5 changes its mind and thinks you're calling a sub instead of literally naming a key) 18:49
raydiak guesses you unrevert by reverting a revert commit 18:53
b2gills raydiak: I actually like that GitHub supports Markdown, I would like it if mail readers would support it as well 18:57
raydiak b2gills: when I want to indicate typed commands with a leading >, and insert my own commentary as comments with leading #, I don't like the result 18:59
just wish I could optionally switch it off, at least
bartolin FWIW: s/has_icu/'parrot::has_icu'/ in 7fca945 fixed the parrot build for me as well (on freebsd). (but I don't have a rakudo commit bit) 19:00
jdv79 where are the smoke tests again? i'm surprised that https breakage wasn't flagged
b2gills Just indent by four spaces 19:01
b2gills It also helps to set code apart from normal written text 19:03
jdv79 so there aren't any automated smokings? just end users reporting at install/upgrade time?
last linux HTTP::UserAgent smoke looks like its from last month. 19:04
raydiak github.com/rakudo/rakudo/pull/342 <- parrot fix 19:05
bartolin raydiak++ 19:06
raydiak jdv79: there are, but I don't think they run unless the module's version changes...our testing infrastructure is quite new
jdv79 i would smoke stuff myself but last i tried rakudo couldn't build on a mem constrainted machine:( 19:07
*constrained
raydiak some backends build easier than other
*others
jvm for example used to give me a ton of problems before I switched to moar for everything 19:08
jdv79 i personally only care about moar since slow startup and no async are not what i am interested in
bartolin jdv79: I'm planning to add panda smoke to my daily compiler builds.
jdv79 nice
raydiak is the jvm async broken?
jdv79 no idea. but jvm startup is slow. 19:09
raydiak for sure
jdv79 i was just enumarating the reasons i don't care about parrot and jvm
raydiak (I used to have minute+ startup times for Pray on jvm)
jdv79 plenty of time for naps i guess
raydiak well, I'd have to let the rendering go overnight half the time anyway, so... 19:10
raydiak should work on that one again in the next few months, people seemed to enjoy it
well, enjoy looking at it...nobody else ever committed (heh pun intended I guess) 19:12
+dalek kudo/nom: dd01c45 | raydiak++ | Configure.pl:
Revert "Revert "Require ICU support on the Parrot backend""

This reverts commit 80b9123b6239914a4ccc7680175f201d7d9d6bb0. A fix was found.
19:13
kudo/nom: d555811 | raydiak++ | Configure.pl:
Fix parrot ICU support detection
[Coke] raydiak: merged.
+dalek kudo/nom: e646d8b | (Will Coleda)++ | Configure.pl:
Merge pull request #342 from raydiak/nom

Fix and re-enable parrot ICU check
[Coke] double checking post-merge. :) 19:14
mathw Is there a convenient way provided to get a Supply of characters read from $*IN?
[Coke] that seems better, thanks.
raydiak glad to help...don't think I've contrib'd actual code to rakudo before, so...yay me :) 19:16
[Coke] raydiak++ 19:17
moritz [Coke]: re Supply from $*IN, I'd only know how to do it manually 19:26
[Coke]: my $s = Supply.new; while !$*IN.eof { $s.emit($*IN.getc) }; $s.done 19:27
+dalek kudo/nom: 7787a19 | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java:
Add a fix for RT #121622.

This is strongly inspired by the corresponding bit in moar.
19:38
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121622
+dalek kudo/nom: 8f2f215 | (Will Coleda)++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java:
Merge pull request #341 from peschwa/rt121622

Add a fix for RT #121622.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121622
+dalek ast: 9dc11e3 | coke++ | integration/advent2013-day12.t:
this is fixed by rakudo #341
19:40
nyuszika7h I like the nicks of the bots 19:41
bcode hi nyuszika7h o/
bcode nyuszika7h, i'm actually mostly lurking. so "hugme" is a coincidence, i swear :D 19:41
nyuszika7h lol 19:43
I wonder if this does anything
nyuszika7h hugs hugme
:(
bcode hugme, hug nyuszika7h
hugme hugs nyuszika7h
bcode i mostly lurk but i do know about that feature <_<
but yeah, this is a quite friendly community. what other programming language has a hugme bot in their channel to greet you :D 19:44
fwilson :D 19:47
raiph Sinan says 'I still have no idea what should be fixed and where — except that I am uncomfortable with what seems to be a "everything is Unix" assumption in perl 6.' 19:48
(from blog.nu42.com/2014/12/utf-8-output-...rl-6.html)
reddited at www.reddit.com/r/perl/comments/2qpe...vs_perl_6/ 19:49
er, weird URL... 19:51
corrected reddit URL: www.reddit.com/r/perl/comments/2qpe...vs_perl_6/ 19:52
raiph re Sinan's comment, aiui: 19:54
1. P6 doesn't have an everything is Unix assumption.
[Coke] whoever wanted supply from $*in, check my backlog. :)
raydiak anyone taking the advice in that reddit comment might want to try "\r\n" instead of "\n\r", unless you're on pre-X MacOS 19:55
raiph 2. The current workaround is to manually add an explicit CR if printing on Windows
lizmat .tell hoelzro wrt to earliest on a single channel: what would be the value of a wait time then? 19:57
+yoleaux lizmat: I'll pass your message to hoelzro.
gtodd tge 2014.12 ChangeLog says $str ~~ s/// now returns a Match or list of Matches 19:59
what did it return previously? 20:00
was it always a just a Match object?
psch gtodd: the fake Match object was never fully implemented. iirc $str ~~ s/// returned a list of Matches for some time, but infix:<~~> didn't consider that True 20:01
gtodd ah ok 20:02
so it's more consistent now
psch the actual change is more that we now consider List.Bool as valid truthy semantic for smartmatch, which we previously didn't 20:03
i.e. before TimToady++'s patch for infix:<~~> $str ~~ s:g/// was always False 20:04
at least that's the part concerning smart match semantics that i know and remember, there might have been more involved
raydiak I think s/// w/o ~~ was returning the modified string, and ~~ s/// was returning True or False 20:06
gtodd hmm well the naive user benchmark www.perlmonks.org/?node_id=1099617 continues to get marginally faster (not a real test and I don't have a serious test/benchmark environment but ...) so I'm happy :-D 20:07
+dalek kudo/nom: 32af9f5 | lizmat++ | src/core/asyncops.pm:
Eradicate winner some more
20:12
psch m: $_ = "abc"; say (s/./z/).WHAT 20:14
+camelia rakudo-moar 80b912: OUTPUT«(Match)␤»
psch raydiak: s/// always returns Match now, but $str ~~ s/// used to be special-cased in make_smartmatch in Perl6/Actions.nqp to check the Match object for truthiness 20:15
raydiak: but that broke when s:g/// returned a List of Match objects, so now Lists are also allowed in smart matching 20:16
raydiak m: say "foo" ~~ List.new(1,2,3) # I see... 20:24
+camelia rakudo-moar 80b912: OUTPUT«1 2 3␤»
raydiak m: say so "foo" ~~ List.new(1,2,3) # I see, but I don't like... 20:25
+camelia rakudo-moar 80b912: OUTPUT«True␤»
psch m: say "bar" ~~ List.new()
+camelia rakudo-moar 80b912: OUTPUT«␤»
psch m: say so "bar" ~~ List.new()
+camelia rakudo-moar 80b912: OUTPUT«False␤»
psch it's pretty much the same as putting True or False on the RHS, which False corresponding to the empty List 20:26
which is the same as normal Bool coercion without smart match around
psch i'm not sure what else a List on the RHS should do. i think the apocalypse had mention of "check if LHS is contained in the RHS" somewhere as a proposal, but that seems overly smart 20:31
raydiak m: say "foo" ~~ Array.new(1); say "foo" ~~ List.new(1); # this just feels kinda WAT...
+camelia rakudo-moar 80b912: OUTPUT«False␤1␤»
raydiak other positionals do eqv, methinks 20:32
psch m: say so Array.new(1) ~~ Array.new(1) 20:32
+camelia rakudo-moar 80b912: OUTPUT«True␤»
raydiak anyway, don't mean to be complaining, the s/// and s:g/// cases certainly feel *less* WAT 20:33
psch well, there is some waterbedding. implementing the fake Match object was rather WAT in other cases
hoelzro lizmat: sorry, what do you mean?
+yoleaux 19:57Z <lizmat> hoelzro: wrt to earliest on a single channel: what would be the value of a wait time then?
hoelzro do you mean the value as in the point? 20:34
lizmat if +%distinct-channels == 1 && !$wait
if you're just doing a receive, what's the use of doing a wait at all then?
psch raydiak: i.e. for m:g/$pat/ { } didn't iterate over the contained Match objects, but only the outer most Match. as in for m:g/(.)/ { #`( only here once ) }
lizmat I mean: with a single channel, why not just disregard the "wait" ? 20:35
psch and "if you use :g you have to wrap the m// in @( )" is kind of annoying
raydiak psch: well that's certainly no good either 20:37
hoelzro lizmat: because if you $c.receive, it will block who knows how long
raydiak psch: my thoughts are not well-formed on this issue atm, but something vaguely in this area feels like we're trying to squeeze too much meaning into/out of one value
hoelzro whereas wait tells it to only block up to a certain amount of time, right? 20:38
lizmat hoelzro: you're right, must not have my thinking cap on
moritz hoelzro: $supply.wait waits until the supply is .done
hoelzro well, the other pair of eyes on the code is appreciated =)
lizmat moritz: this is more about Channel.list, which is what Supply.list really is 20:39
psch raydiak: well, there's still the OKness proposal. i'm fairly sure that would reduce squeezing, but it'd also be quite a big change iiuc
raydiak psch: not familiar with it, but sounds like someone has already been barking up this tree (with better-defined ideas, no doubt) 20:42
psch raydiak: gist.github.com/TimToady/1828667 if you're interested 20:44
nyuszika7h m: ('⚀' .. '⚅').roll(5).sort 20:45
+camelia ( no output )
nyuszika7h looks at bcode
m: ('⚀' .. '⚅').roll(5).sort.say
+camelia rakudo-moar 80b912: OUTPUT«⚀ ⚀ ⚁ ⚂ ⚂␤»
flussence r: await Promise.anyof( start({ sleep 2*3; say 3 }), Promise.in(2*1).then({ say 1 }) ); sleep 2*2; say 2; # why this order? 20:46
+camelia rakudo-parrot 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared name:␤ Promise used at line 1␤Undeclared routines:␤ await used at line 1␤ start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?␤␤»
..rakudo-moar 80b912: OUTPUT«3␤1␤2␤»
raydiak psch: thanks...yeah something along those lines is where I was heading, I think 20:48
lizmat flussence: that feels wrong, indeed
even rakudobuggable on first sight
flussence r-j: await Promise.anyof( start({ sleep 2*3; say 3 }), Promise.in(2*1).then({ say 1 }) ); sleep 2*2; say 2; 20:49
+camelia rakudo-jvm 80b912: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
flussence bah... 20:50
same result on perl6-j here...
lizmat flussence: same here
flussence this is something that's been confusing me for a while, it just took me this long to golf it down properly :) 20:52
lizmat please rakudobug it
flussence does! (first one I'll have sent myself, too)
+dalek kudo/nom: eb78b78 | lizmat++ | src/core/asyncops.pm:
Poor man's typed hash and a small opt
20:57
+dalek ast: 3f8907e | usev6++ | S0 (2 files):
Extend tests for dotted form of postfix operator after unary postfix hyper operator
21:09
flussence makes a mental note to use a real wysiwyg mail client for sending plaintext mail next time and not gmail's icky webapp stuff... 21:34
Ven m: Bool::Tue # LTA? 21:47
+camelia rakudo-moar 80b912: OUTPUT«Could not find symbol '&Tue'␤ in method <anon> at src/gen/m-CORE.setting:13871␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2737␤ in any find_method at src/gen/m-Metamodel.nqp:988␤ in block <unit> at /tmp/ciHWYvXV62:1␤␤»
Ven m: Bool::Tre # LTA? uh 21:47
+camelia rakudo-moar 80b912: OUTPUT«Could not find symbol '&Tre'␤ in method <anon> at src/gen/m-CORE.setting:13871␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2737␤ in any find_method at src/gen/m-Metamodel.nqp:988␤ in block <unit> at /tmp/uMCcBeFhLw:1␤␤»
Ven well, I get "cannot find method 'Any'" on yesterday's rakudo
Ven m: given (1, 2, 3) { when :(Int $a, Int, Bool) { say "hey $a" } } # is that by design? 21:49
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/aXUflWEUov␤Variable '$a' is not declared␤at /tmp/aXUflWEUov:1␤------> when :(Int $a, Int, Bool) { say "hey $a⏏" } } # is that by design?␤ expecting any of:␤ …»
Ven whoops 21:50
m: given (1, 2, 3) { when :(Int $foo, Int, Int) { say "hey $foo" } } # is that intended?
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/dbqbCiD0f0␤Variable '$foo' is not declared␤at /tmp/dbqbCiD0f0:1␤------> en :(Int $foo, Int, Int) { say "hey $foo⏏" } } # is that intended?␤ expecting any of:␤ …»
TimToady :() will not declare anything without a declarator 21:51
Ven TimToady: where should the declarator be put?
TimToady m: given (1, 2, 3) { when * -> Int $a, Int, Bool { say "hey $a" } } # this is specced 21:52
+camelia rakudo-moar 80b912: OUTPUT«Too few positionals passed; expected 3 arguments but got 0␤ in block at /tmp/og2uZ0vrtO:1␤ in block <unit> at /tmp/og2uZ0vrtO:1␤␤»
TimToady but NYI obviously
Ven (also, the error message is not the same locally)
TimToady m: my $a; given (1, 2, 3) { when :(Int $a, Int, Bool) { say "hey $a" } } 21:53
+camelia ( no output )
TimToady that should conceivably work
m: my $a; given (1, 2, True) { when :(Int $a, Int, Bool) { say "hey $a" } }
+camelia rakudo-moar 80b912: OUTPUT«use of uninitialized value $a of type Any in string context in block <unit> at /tmp/NYp6f7ZmJY:1␤␤hey ␤»
timotimo media.ccc.de/browse/congress/2014/ ← in the near future (no clue when exactly) a recording of the "omg most dangerous perl exploit ever!" talk will appear; allegedly it's good 21:59
Ven TimToady: ah, amazing!
timotimo (there are other interesting talks there, too, surely.) 22:00
Ven m: sub id(::T $val --> T) $val }; id(1); # TimToady : this looks to me like it's a NYI, correct? 22:02
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/dcDMj1lgUz␤Missing block␤at /tmp/dcDMj1lgUz:1␤------> sub id(::T $val --> T) ⏏$val }; id(1); # TimToady : this looks t␤»
Ven m: sub id(::T $val --> T) { $val }; id(1); # TimToady : this looks to me like it's a NYI, correct?
+camelia rakudo-moar 80b912: OUTPUT«No such method 'item' for invocant of type 'T'␤ in method message at src/gen/m-CORE.setting:13542␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤ in sub id at /tmp/IRJ2av1dTZ:1␤ in block <unit> at /tmp/IRJ2av1dTZ:1␤␤»
psch timotimo: i didn't particularly like the talk, too much "omg stop writing perl" for my taste 22:07
psch timotimo: but then, i did enjoy the WAT talk, so i'm probably just biased because i do like perl5 :) 22:08
(in contrast to javascript)
Ven psch: the WAT talk is really, really biased ;) 22:09
timotimo psch: did you see it on the stream or were you actually at congress? 22:10
psch timotimo: just on the stream, no budget for c3 sadly
timotimo OK
psch Ven: it sure is. the difference is that the speaker in the WAT talk says "this is really weird", but the perl talk just now says "this is really weird, no one ever does it right and there exist vulnerabilities to prove it" 22:12
...which is true
which is why i'm saying i'm probably just biased towards perl, away from js, which explains my "it's not that great" impression of the perl talk 22:13
sergot good evening o/ 22:13
psch o/ sergot
sergot hi psch ! 22:14
pnu LWP::Simple tests have been failing for a while, this fixes it: github.com/cosimo/perl6-lwp-simple/pull/39 ... however, I'm wondering would there be a more "stable" URL to test? 23:23
tadzik perhaps an URL to soemthing inside LWP::Simple's github repo? :) 23:24
that could be easily controlled 23:25
leedo_ spin up a local http server? :P
raydiak is there an easy way to install p6 modules on windows w/o installing other heavy stuff like cygwin? 23:26
(iow panda requires git) 23:29
tadzik oh, hmmmm 23:29
I think there's a ticket for panda to make it download .tar.dz from github rather than cloning, not sure
raydiak a friend likes to mock me when I say "I wrote cool thing X" and he cannot easily download and install it :P 23:31
raydiak so I tried the R* msi on our media box here, and noticed rakudo/bin doesn't get put in the path, and panda install doesn't work 23:32
tadzik: how hard would that be? is git used for anything besides clone, like version stuff? 23:38
tadzik raydiak: nah, just cloning 23:39
another issue is that if you download a tarball you still need to unpack it
raydiak good point 23:40
raydiak is a pure perl 'git clone' implementation out of the question? idk anything about the git protocol 23:59
raydiak gotta run, back in a little while 23:59