»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
teatime that doesn't seem to be the case 00:00
00:00 dfcarpenterak joined
geekosaur (\X being a codepoint followed by any number, including zero, of modifiers) 00:00
teatime m: say '"̃"' ~~ rx:Perl5/^./
camelia rakudo-moar ec6c3b: OUTPUT«「"̃」␤»
geekosaur er, of combining codepoints
00:00 luser1 left
geekosaur if you hadn't noticed, rx:perl5 is not complete (and I would say in this example not correct) 00:00
probably as NYI as the modifiers :bytes etc 00:01
I'm testing them locally in perl5
remember that in perl 6, the string '"̃"' itself has only one character in it: a synthetic codepoint 00:03
..,wow, hexchat mangled that
teatime well that string has two
but yes I understand it doesn't have three 00:04
geekosaur yeh, I copy-pasted and hexchat doubled the "
but that means that rx:p5 would have to undo that to work just like perl 5, and it doesnt know that it needs to do that
so it's matching more than it should with ^.
teatime yes
I understand it's nyi, that's fine 00:05
geekosaur if youi do it in actual perl 5, it matches only one codepoint
teatime I was just testing and hoping.
interestingly, putting a ZWNJ after the opening " does not break up the grapheme, either to perl or on my terminal
would have thought it would
geekosaur I think that's a known glitch 00:06
actually ZWNJ is misrecognized/misimplemented all over the place
teatime I figured P6 would implement that w/ maybe 50% probability, but really shocked it doesn't work in my terminal
geekosaur I think jnthn ran into that while developing the current grapheme implementation
00:15 dolmen left 00:16 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 00:20 atweiden left 00:22 araujo joined, spider-mario left 00:24 dfcarpenterak left 00:27 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 00:31 cpage_ left 00:32 dolmen joined 00:33 sufrostico left 00:34 hotel joined 00:35 hotel_california left 00:36 BenGoldberg left 00:37 BenGoldberg joined 00:39 dfcarpenterak joined 00:47 dfcarpenterak left 00:57 zwu joined 01:01 dolmen left
zwu I understand it is too early to test the performance of perl6, due to my interesting, I tested perl6 performance for the same task at github.com/famzah/langs-performance, sorry I don't have the perl 6 code right on my computer, but from my test on perl 6 April release, it is about 18x slower than python2. 01:01
the benchmark of other language performance are there.
The code for perl 6 is very similar to other code for the implementation, I could post it tomorrow too. 01:02
gfldex it is for sure not to early to test the performance of Perl 6. It is however to early to expect the same performance then a language that was released in 1991. 01:03
timotimo please ping me with the code when you have it :)
zwu here is the benchmark of other language: blog.famzah.net/2016/02/09/cpp-vs-...mark-2016/
timotimo i wonder if you used "int" or "Int" in the perl6 code 01:04
zwu I used Int and @array using push
timotimo wow, your get_primes7 has a prototype definition 01:05
in the perl5 code, i mean
zwu so that could be the performance problem.
timotimo not necessarily :)
zwu btw: it is not my code on the git github.com/famzah/langs-performance.
timotimo as long as the numbers don't exceed 32bit, we at least don't allocate a full mp_int
but we're currently pretty dumb when it comes to creating far too many intermediate boxed results, and we have a few things that immediately prevent inlining in some cases, which really hurts performance 01:06
but all in all, 2016 is the year where many performance improvements will be made
zwu I believe there will be many performance improvements !!! 01:07
timotimo just yesterday lizmat gave Int a little performance optimization pass with results like div and / for Int, Int being about 50% faster
01:08 molaf left
timotimo i'm interested in running the code you came up with under --profile 01:10
zwu ok, I put my primes.p6 code there gist.github.com/anonymous/f31c6b7e...9a1085894, sorry for I didn't create a github repo. 01:14
timotimo not important, a gist is good enough 01:15
there seem to be some tab characters mixed in there :) 01:16
how long does it take on your machine, approximately?
zwu 531 seconds 01:17
run at a virtual machine. 01:18
for python2 it is about 31 seconds.
timotimo thanks
i'll probably have my sleep before actually working on this, though
01:20 molaf joined 01:23 winger__ joined 01:27 winger_ left
timotimo already a c-level profile reveals 8.2% spent in total just marking an array of objects 01:28
17% of overhead related to invoking frames, which means the optimization we're going to get this or next week will give a decent benefit here even before the code itself has been optimized 01:29
well, i'd even go as high as 25%
01:37 BenGoldberg left 01:38 pierre_ joined
gfldex it's filling up 1.3GB of RAM 01:38
timotimo it's going gc-crazy, too 01:39
01:39 Actualeyes joined
timotimo 69660380 Int objects, 59977737 Scalar objects 01:39
01:39 Actualeyes left
timotimo and an astronomical amount of BOOTHash, which i'm not 100% sure about their correctness 01:40
gfldex does `Int(sqrt($n))` acutally create an Int obj, even if the result ends in `int`? 01:41
timotimo "ends in"?
gfldex like in `my int $mroot = Int(sqrt($n))`;
timotimo just by sprinkling a few "int" around, i get from 272504.78ms to 159403.75ms
(but this is only 5 runs, not 10)
it will create an Int, yes 01:42
gfldex m: my @primes = (1..10000000).grep(*.is-prime); say @primes.elems;
timotimo i see a tremendous amount of IntLexRef being generated, which tells me my nativifying is doing the "stop all inlining now!" thing 01:43
camelia rakudo-moar ec6c3b: OUTPUT«(timeout)»
01:43 BenGoldberg joined 01:45 ilbot3 left
timotimo gfldex: wanna try out if you can do better than the loop that puts odd numbers into the @s array? 01:46
like with a "..." for example
or by using the return value of a loop 01:47
01:47 ilbot3 joined
gfldex i would like to keep the algorithm the same for a start to see how far I get that way. I do know the max size of the result array, so a native shaped is worth a try. 01:48
timotimo no, definitely not native shaped; they are currently the opposite of optimized 01:49
they will give you terrible performance
01:50 cdg left
timotimo it seems like 3, 5, 7 ... * > $n is slower than the loop with push in it :) 01:50
gfldex if it gets cache friendly it may still lead to a win
timotimo no. no, it will very much not be. it will still be 100x slower than a regular native array 01:51
01:51 cdg joined
timotimo do a small test up front and you'll see just how terrible performance of shaped arrays is right now 01:51
01:52 mohae joined 01:55 huggable left, huggable joined
timotimo wow, using the return value from a loop causes the program to run about 2x as long, and also eats up more than 2x more memory 01:55
01:55 cdg left
BenGoldberg If you use := instead of = for the array assignment, does it speed it up? 01:57
timotimo i don't have an array assignment at the moment; do you mean for the loop, or for a "..." call?
using int32 for the arrays makes memory usage a bit lower, but has nearly no impact on run time
BenGoldberg 'my @res = get_primes(10000000);' vs 'my @res := get_primes(10000000);' 01:59
Also for doing 'my @s = do loop ...' vs 'my @s := do loop ...' 02:00
timotimo the @s will be modified later on, so just putting a Seq in there won't fly 02:01
02:01 cpage_ joined
timotimo no change between = and := 02:02
er
it halves maximum resident set size, but it doesn't make things faster
better than half, actually
BenGoldberg Ok, what about replacing the 'for @s' loop with 'return @s' 02:03
Hmm, need to do unshift(@s, 2), first, to make the results correct. 02:04
timotimo wouldn't that change semantics?
BenGoldberg ?
timotimo that for loop basically implements .grep(*.so) 02:05
BenGoldberg Oh, I see.
Ok, then how about unshifting 2 onto the front of @s, then doing 'return @s.grep: @.so;' 02:06
Without putting stuff in @r. Actually, I don't think @r is really necessary.
timotimo i'm trying
the "original"(?) python code has the result thing anonymous in a return clause 02:07
return [2] + [x for x in s if x]
BenGoldberg That can be mimiced with 'return 2, |(@s.grep: *.so);' ... I'm not sure which would be faster. 02:08
timotimo my attempt at that makes it slower and use more memory
i'm going to bed 02:10
BenGoldberg G'night, then.
timotimo i have a hot water bottle waiting for me in bed <3 02:11
have fun with the benchmark, if you're going to continue working on it :) 02:12
02:19 noganex_ joined 02:21 noganex left 02:25 dwarring left 02:28 zwu left 02:43 kid51 left, BenGoldberg left 02:45 BenGoldberg joined 02:46 BenGoldberg left 02:47 BenGoldberg joined 02:49 mattp_ left 02:51 mattp_ joined 02:52 jack_rabbit joined
sortiz m: use Test; my @a; my $p = @a; does-ok $p, Positional; # So far, so good 02:57
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - The object does role 'Positional'␤»
sortiz m: use Test; my @a; does-ok @a, Positional; # Missing signature?
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - The object does role 'Positional'␤»
sortiz Hmm
02:58 finanalyst joined 03:03 pierre_ left 03:11 grondilu left 03:19 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
MadcapJake what do you mean missing signature? 03:21
m: @a.^roles.say
03:21 skids left
MadcapJake m: "hello?".say 03:22
camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ORxwbtUUbj␤Variable '@a' is not declared␤at /tmp/ORxwbtUUbj:1␤------> 3<BOL>7⏏5@a.^roles.say␤» 03:23
rakudo-moar ec6c3b: OUTPUT«hello?␤»
MadcapJake m: my @a; @a.^roles.say 03:24
camelia rakudo-moar ec6c3b: OUTPUT«((Positional) (Iterable))␤»
03:25 yqt left 03:27 musca joined
sortiz MadcapJake, nothing, a random glitch in the matrix ;-) 03:28
03:30 pierre_ joined
sortiz I'm writing json-c's NativeCall bindings, and was testing the properties of my objects. :-) 03:30
MadcapJake ahh i see! :) if there was a glitch, the agents might be on to you! Get to a phone quickly! ;) 03:35
sortiz :P 03:36
03:37 jack_rabbit left, jack_rabbit joined 03:53 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 03:54 milwaukee joined 04:08 hotel_california joined 04:09 hotel left 04:20 milwaukee left 04:26 BenGoldberg left 04:27 BenGoldberg joined 04:32 BenGoldberg left 04:34 BenGoldberg joined 04:37 khw left 04:46 BenGoldberg left 04:47 pierre_ left 04:59 Cabanossi left 05:02 Cabanossi joined 05:06 richi235 left, richi235 joined 05:07 firstdayonthejob joined, hotel_california left, hotel joined 05:18 sno left 05:32 domidumont joined 05:36 domidumont left 05:37 domidumont joined 05:40 hotel_california joined 05:41 hotel left 05:44 macsnowball left, finanalyst left 05:45 domidumont left 05:47 pierre_ joined, rurban joined 05:52 pierre_ left 05:55 huggable left, huggable joined 05:58 TimToady left, TimToady joined 05:59 nadim joined, RabidGravy joined 06:00 pierre_ joined 06:02 _nadim left, CIAvash joined 06:03 domidumont joined, domidumont left 06:04 xinming_ joined, domidumont joined 06:07 xinming left
RabidGravy Boom! 06:08
06:12 daxim joined 06:17 sno joined 06:29 wamba joined 06:31 lizmat joined 06:34 _mg_ joined 06:35 firstdayonthejob left 06:38 sjoshi joined 06:50 dolmen joined 06:56 dolmen left 07:05 rurban left 07:06 domidumont left, domidumont joined 07:14 lizmat left, Amnez777 left
ufobat good morning :) 07:15
RabidGravy erp 07:17
07:24 zakharyas joined 07:32 pierre_ left 07:41 pierre_ joined 07:51 darutoko joined, abraxxa joined 07:59 devtom30 joined 08:00 dakkar joined 08:05 zakharyas left, avenj left 08:06 [particle] left 08:08 pierre_ left 08:15 domidumont left 08:16 [TuxCM] joined, lizmat joined, avenj joined 08:18 domidumont joined 08:19 infina left, finanalyst joined 08:22 pierre_ joined, avenj left 08:29 Sound joined 08:31 avenj joined 08:34 winger_ joined 08:35 _28_ria joined 08:38 winger__ left 08:43 [particle] joined 08:49 [TuxCM] left 08:50 Amnez777 joined 08:51 jack_rabbit left 08:52 Hor|zon joined 08:54 Amnez777 left, Amnez777 joined
moritz
.oO( RabidGravy seems to like ERP systems :-)
09:01
09:01 Sound left 09:02 CIAvash left 09:04 pierre_ left 09:05 pierre_ joined 09:10 CIAvash joined 09:19 sjoshi left 09:21 [TuxCM] joined, rindolf joined
RabidGravy last time I worked with SAP it made me go blind or something 09:31
09:41 TEttinger left 09:50 domidumont left 09:51 Relsak joined 09:54 domidumont joined 09:55 huggable left, huggable joined 10:02 [TuxCM] left 10:06 uruwi_ joined 10:09 uruwi left 10:10 uruwi_ left 10:12 uruwi joined 10:15 kid51 joined 10:22 rindolf left, zakharyas joined 10:24 boegel left 10:26 boegel joined, kaare_ joined 10:39 finanalyst left 10:41 pierre_ left 10:46 brrt joined 10:53 infina joined, infina left, infina joined 10:55 Brock left 11:08 [particle] left 11:09 [particle] joined 11:16 wamba left 11:17 brrt left
stmuk SAP also made people rich 11:27
timotimo i didn't expect only a quarter screenful of irc to happen while i'm asleep :P 11:34
11:34 milwaukee joined
nine_ It's a quiiiiet day 11:41
jnthn Not here it ain't. It was the day of the month they decided to test the air raid siren. :P 11:42
Or nuke siren, or whatever it's for.
11:43 AlexDaniel joined
nine_ preferably at 6 in the morning? 11:43
jnthn No, at midday at least :)
11:43 brrt joined, flaviusb joined
jnthn They anounce the test in English too, funnily enough, but the speaker is so bad that it took me a year of hearing the announcements to realize that part of it even was in English. :) 11:44
AlexDaniel yea, just using native ints in primes.p6 thingy makes it run in like 50% time
jnthn So...nativism trumps again... :P 11:45
11:47 pmurias joined, kid51 left
brrt puzzles whether that is a pun 11:51
AlexDaniel “for @s { @r.push($_) if $_ }” is significantly faster than “@r.append: @s.grep: {$_}” 11:54
nine_ I'm not entirely surprised
12:01 rindolf joined
AlexDaniel it seems like just pushing these numbers takes a lot of time 12:01
12:03 cgfbee joined
AlexDaniel also, @a.append: @b is much faster than @a.push: |@b 12:04
12:05 cpage_ left
AlexDaniel m: my @a = 1..100000; my @b; @b.push: |@a 12:05
camelia rakudo-moar 480709: OUTPUT«Too many arguments in flattening array.␤ in block <unit> at /tmp/WYXkksBAXL line 1␤␤»
AlexDaniel mmmhm…
I haven't thought about it
12:08 wamba joined
timotimo i suppose the reason for grep with a block is slower is because we don't have trace jit yet, which means it'll invoke a code object for every single test 12:09
whereas in the for + if that's in-line for free
moritz maybe laziness is to blame
jnthn `@a.push: |@b` is a pretty bad idea :) 12:10
timotimo hm, append won't try to eagerly nom the whole list?
that'd be a bad miss :)
or do we want it to act like "plan"?
jnthn It actually flattens all the arguments
Into the callsite
timotimo yes, that's pretty terrible 12:11
AlexDaniel @s .= grep({$_}); @r.append: @s; is slightly faster than everything
jnthn And produces a callsite descriptor along the way
timotimo it'd end up like a triple copy of the whole list
jnthn Yeah, plus making the huge callsite descriptor. And, worse, while the argument limit in MoarVM is fairly high, the one on the JVM is 255 iirc.
12:11 infina left 12:15 sergot_ is now known as sergot 12:16 dj_goku joined, infina joined, infina left, infina joined
AlexDaniel ah… well, some things work faster without native ints 12:22
m: my int $x = 2; $x /= 2; say $x 12:26
camelia rakudo-moar 480709: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/RXCVNLBO3x line 1␤␤»
AlexDaniel is it ok?
timotimo yes, the GC time hardly gets reduced at all, which is because of all the IntLexRef objects being created and immediately tossed again
that's fine 12:27
m: my int $x = 2; $x div= 2; say $x
camelia rakudo-moar 480709: OUTPUT«1␤»
timotimo you want this anyway ^
AlexDaniel right
timotimo i'm still looking for the right peg to hang "turn this num into an int without going through Int" off of
it's just a matter of using the nqp op that i've already bound on a local branch, but how do i expose it to the user's code?
12:28 brrt left 12:29 ZoffixW joined
ZoffixW What does rakudobrew rehash do? 12:29
timotimo i think it just rebuilds the scripts in bin/ that point "to the actual things" 12:30
ZoffixW I see
12:32 rindolf left 12:33 cpage_ joined 12:35 pierre_ joined, infina left, infina joined, infina left, infina joined 12:39 zwu_ joined, rindolf joined 12:40 wamba left 12:41 zwu_ left 12:42 wamba joined
AlexDaniel looking at this comparison again, I think that it is pretty stupid. If you look closely, then in both P5 and suggested P6 versions there is a temp array @r that is there for no reason 12:42
while in e.g. python version there is no such thing
in perl 6, getting rid of this @r array actually makes things significantly faster 12:43
RabidGravy gosh the chromaprint api is really rather simple
timotimo AlexDaniel: in the python version it returns [2] + [a for a in s if a] or something 12:49
which is equivalent to @r
12:49 awwaiid2 joined
AlexDaniel timotimo: saving the result into array is a redundant step, which may have some impact 12:53
dalek osystem: bd5e63c | (Salvador Ortiz)++ | META.list:
Add JsonC to ecosystem.

NativeCall bindings to json-c library
AlexDaniel and if you use @s as an array of native ints, then indeed it does
timotimo right. you still need to filter it and put the 2 in front :)
the filter thing could surely be done easily with a two-pointer algorithm in-place, though 12:54
RabidGravy ah sortiz++
sortiz Yet another JSON module for Perl6 :-)
RabidGravy I looked at that a while back, decided it was too complicated to do quickly and for forgot about it 12:55
timotimo if it's a drop-in replacement for JSON::Fast, it'll probably eat its lunch :) 12:56
RabidGravy or at least it's breakfast
sortiz panda's projects.json is parsed in Parsed in 0.0034288s. 12:57
12:58 cdg joined, cdg left, sufrostico joined 12:59 cdg joined
ZoffixW sortiz++ 12:59
sortiz The idea is that the C library eat the file, and the unmarshaling is be lazy and on demand.
ZoffixW Now me need JSON::MaybeC :)
s/me/we/
stmuk we need more YAML parsing (not that I like the format)! 13:00
ZoffixW Why?
stmuk I don't think there is any module to read it 13:02
RabidGravy I made one in C# once
ZoffixW ugexe, doesn't look like #86 got resolved. I'm still having the same issue. That's after nuking everything and starting from scratch (github.com/ugexe/zef/issues/86)
stmuk ZoffixW: or was the Q why I don't like YAML? :) 13:03
ZoffixW stmuk, no, you said "more", so I assumed we already had YAML and needed more :)
I don't like it either
sortiz Any code review/comments/suggestions will be appreciated. 13:04
ZoffixW It's the Python equivalent of configuration files 😂😂😂
stmuk yes the whitespace sensitivity is a misfeature
RabidGravy it was the new hotness back in, oh, 2002 13:05
timotimo we have one yaml module that doesn't work, iirc 13:06
stmuk YAMLish looks hopeful 13:07
sortiz The json-c library is a little more permissive than JSON::Fast, so five 'should fail to parse' tests fails. 13:08
AlexDaniel anyway, here is the what I got: gist.github.com/AlexDaniel/ce3c60e...bedea03ff5
13:08 brrt joined
timotimo sortiz: that's not "permissive", that's "wrong" :) 13:08
AlexDaniel it runs about twice faster
but I am sure that there is a way to make it even faster if you manage to get rid of this .grep 13:09
sortiz timotimo, Indeed, but json-c is in github, so that can be fixed. ;-) 13:11
13:11 cpage_ left
ZoffixW sortiz, which tests are that? 13:11
I see JSON::Fast is broken and doesn't handle newer spec 13:12
timotimo oh? please elaborate
ZoffixW perl6 -MJSON::Fast -e 'from-json q{"foo"} error: 'a JSON string ought to be a list or an object
That's no longer true. Anything can be at top level
sortiz That is supported in JsonC. 13:13
ZoffixW rfc7159.net/rfc7159#rfc.section.2 (second paragraph, especially)
timotimo from when is that?
ZoffixW March 2014
timotimo oops. 13:14
RabidGravy ZoffixW, I'll alter the source-url in the App::ModuleSnap
AlexDaniel ZoffixW: but still no trailing commas allowed? :(
moritz JSON::Fast copied JSON::Tiny, which used to follow ECMA-404 13:15
13:15 pierre_ left
moritz later, JSON::Tiny relaxed its parsing 13:15
ZoffixW RabidGravy, alright. I'll be mentioning it in an upcoming article, and didn't want people having issues installing it :)
moritz ("copied" is wrong, it just implemented the same interface)
sortiz Right now JsonC is faiing t/01-parse.t's 75-76, 78, 80-81
RabidGravy I'll make it "git://github.com/jonathanstowe/App-ModuleSnap.git" which is the form that App::NoPaste uses 13:16
13:21 zwu_ joined 13:23 Sgeo left 13:28 pierre_ joined 13:32 ZoffixW left, zwu_ left 13:33 pmurias left 13:35 pierre_ left 13:37 pierre_ joined 13:40 pmurias joined 13:42 grondilu joined 13:51 brrt left 13:55 huggable left, huggable joined 14:04 wamba left 14:08 zakharyas left 14:09 zakharyas joined 14:11 finanalyst joined 14:13 zakharyas left 14:14 grondilu left, tharkun left 14:15 grondilu joined
grondilu m: say { $^n ?? $n*&?BLOCK($n-1) !! $n }(4) 14:16
camelia rakudo-moar 475063: OUTPUT«0␤»
14:16 tharkun joined
grondilu m: say { $^n ?? $n*&?BLOCK($n-1) !! 1 }(4) 14:16
camelia rakudo-moar 475063: OUTPUT«24␤»
14:18 milwaukee left
grondilu I remember long time ago I wanted to talk about tail recursion and asked if Perl 6 would support it. You guys told me that it would probably not for various complicated reasons. We have at least two kinds of Callables structures though: Sub and Block. Couldn't at least one of them support tail recursion optimization? So that we can have efficient recursive functions? 14:18
jnthn m: say { [*] 1..$^n }(4) # it's so esay to write this one iterative :P 14:19
camelia rakudo-moar 475063: OUTPUT«24␤»
timotimo my uneducated opinion is that once we have trace jit, TCO becomes a potential possibility 14:20
probably a case of "SMOP", with all the things that entails
jnthn We don't in general know if anything "downstream" will do things like CALLER::
I think the question isn't "can we do TCO some of the time" 14:21
It's "can we do it predictably enough that can rely on it happening"
Can we do it at all is "surely yes", it's the latter I'm highly doubtful about.
timotimo oof. 14:22
14:22 pierre_ left
timotimo right, fair enough 14:22
grondilu Could we not have a Calleable type that would prohibit anything that's incompatible with TCO?
jnthn Even if that's a dynamic prohibition?
(You'd get a runtime exception for doing something incompatible with it, that is) 14:23
grondilu jnthn: I don't know, but you make it sound like TCO is impossible or something. Some languages do it, just do whatever they do.
jnthn That's stupid. 14:24
grondilu rude
jnthn Other languages can do it because they made the trade-offs.
Saying "in return we can't do X"
14:24 brabo joined
[Coke] I think a better question than "can we do TCO" is "what is the plan for making rakudo faster". 14:25
MadcapJake sub tco($arg) is MONKEY-TAIL { ... }
timotimo accessing a caller's lexical variables, for example ... (only if they are marked dynamic, of course)
14:25 perlpilot_ joined
jnthn Language design is always trade-offs. 14:25
pmichaud good morning #perl6 14:26
grondilu my concern is that there are function that are very much easier to write recursively, but we always end up not writing them because of performance issues. That's very LTA.
jnthn And the langs I know where you can rely on tail calls all made it so you can analyze that.
o/ pmichaud
MadcapJake jnthn: could you explain a bit what the trade-offs are for TCO? I'm not following what the CALLER:: argument means
jnthn MadcapJake: In various languages, it's possible to staticly analyze things such that you can rewrite a recursion into an iteration. 14:27
MadcapJake: That relies on you knowing that you won't break anything in the process of doing so.
14:27 perlpilot joined
jnthn MadcapJake: And as a result of the rules around when it happens being fairly simple, folks can write code relying on it. 14:28
In Perl 6, various features make that static analysis fraught while others mean we simply can't do it.
14:28 wamba joined
pyrimidine jnthn: re: recursion to iteration, IIRC there is a fair amount in Higher Order Perl that covers doing so (for p5 of course) 14:28
pmichaud aren't C<nextsame> and C<nextwith> supposed to help with tailcalls? Or is that a fossil? (Or are we strictly discussing automatic TCO?) 14:29
14:29 ZoffixW joined
jnthn The moment you make a method call, it's late-bound and you don't know whether that code will do anything, like access CALLER::. 14:29
pmichaud: They're for iterating through pre-determined candidate lists. They potentially could make use of tail call optimization, though you could construct cases where the optimization would break things. 14:30
pmichaud I guess nextsame/nextwith aren't recursive tailcalls. But perhaps they point the way to there.
ZoffixW Is anyone feeling adventurous and wants to add Perl 6 to CodeMirror? :P codemirror.net/mode/index.html
jnthn method foo() { my $*x = 42; nextsame() }
Does the thing you nextsame to see $*x or not? 14:31
ZoffixW The Perl 5 version is 800 lines long :( Perl 6 version would probably be much larger: github.com/codemirror/CodeMirror/b...rl/perl.js
MadcapJake ZoffixW: I'm partway through a highlightjs mode but I got discouraged when I discovered heredocs were impossible
timotimo i think we already have a bit of codemirror for perl6
jnthn (The answer today is "yes"; replacing the callframe would change that answer, for example)
ZoffixW MadcapJake, :( 14:32
timotimo github.com/azawawi/farabi6/blob/ma...l6-mode.js <- ZoffixW
MadcapJake timotimo: that isn't usable actually, it's basically a copy-and-paste of perl5-mode
jnthn nextsame today functions as return callsame(...)
ZoffixW Yey! timotimo++ azawawi++
timotimo OK, sorry about that
pmichaud jnthn: and yes, I'd expect nextsame to be that way.
MadcapJake ZoffixW: do not use that, azawawi informed me that it's not implemented beyond just copying perl5-mode into a new file
jnthn It's really tail calls as a language feature, vs. tail calls as an optimization. 14:33
ZoffixW MadcapJake, aw. Too bad
jnthn The latter I'm pretty sure we could do in some cases; the former is a lot harder than "just copy what another language does". 14:34
pmichaud jnthn: agreed
ZoffixW MadcapJake, how come heredocs are impossible?
14:34 dakkar left
pyrimidine jnthn: could you indicate a method can be TCO, e.g. method foo() is tco { ... } 14:34
MadcapJake ZoffixW: the highlight.js lexing engine doesn't support capturing delimiters and reusing them
ZoffixW Ah 14:35
MadcapJake there's an issue in their tracker wrt to it and the author basically says "not possible and we're not implementing it any time soon"
ZoffixW :/
jnthn pyrimidine: What would that actually do?
I mean, sure we can indicate things, but what semantics go with it? 14:36
MadcapJake ZoffixW: I started a CodeMirror perl6 mode a little ways back actually (I forgot about it :). I'll try and get it finished this week (perhaps more likely next)
ZoffixW Sweet. No rush :)
jnthn If anything, the "this is a tailcall" mark would want to go on the call that should function that way.
ufobat ZoffixW, thanks for the PR
jnthn Which would mean you're explicitly saying "and if anything downstream isn't OK with that, it's my fault" 14:37
pyrimidine jnthn: yeah, true
ZoffixW ufobat, no problem
timotimo there's monsters in the basement preventing me from TCO! :(
jnthn Which, as pmichaud points out, is kinda taking the nextsame/callsame approach by making explicit what you want to happen 14:38
14:38 ptolemarch joined
CIAvash github.com/jneen/rouge also needs a Perl 6 lexer. It's being used in Gitlab and Jekyll 14:38
14:40 tbrowder joined
dalek pan style="color: #395be5">perl6-examples: 8e9d84e | (Tom Browder)++ | Makefile:
module 'Web::Request' not needed
14:42
perl6-examples: 1e2191e | (Tom Browder)++ | categories/99-problems/P40-rhebus.pl:
perl6-examples: add tilde to remove parens in output; remove last integer as input (or could add it to the test output if desired)
14:42 dalek left 14:43 dalek joined, ChanServ sets mode: +v dalek, perlpilot left
MadcapJake jnthn: In Perl 6, if you use {call,next}{with,same} and multi-dispatch heavily, will you run into issues? Because I think TCO is really about supporting that recursive paradigm more than anything and if we can support it without TCO then it's kind of a moot point. 14:43
14:43 khw joined, perlpilot_ is now known as perlpilot 14:44 perlpilot_ joined
MadcapJake CIAvash: ok it's on the todolist! I usually only have so much syntax highlighting juice in any given month though :P 14:44
jnthn MadcapJake: {call,next}{with,same} aren't for recursing anyway, they're through walking through (usually short, pre-destined) lists of implementations, so you can defer control to a more general candidate. 14:45
CIAvash MadcapJake: nice :) 14:46
jnthn MadcapJake: If you write heavily recursive stuff today - yes, you'll allocate a lot of stack frames.
And yes, tailcall as an explicit language feature is a lot more hopeful in Perl 6 than TCO.
MadcapJake jnthn: ok so those keywords are more about the dispatching than about recursing. specifically call{with,same} would seem related to recursion, at least at first glance. 14:47
nine_ I think there's still the endless loop issue with nextsame 14:48
14:48 dakkar joined
jnthn nine_: Yeah, that one should never be able to happen. I think I figured out how to fix it though: capture the frame that set the dispatcher. 14:48
nine_: And check that it's the caller of the thing trying to take it.
Then it won't be stolen by accident 14:49
Alternatively, we might be able to fix it with better code-gen.
nine_ jnthn: sounds like a step or two above my pay grade, so I'm no longer ashamed that I couldn't fix it :)
jnthn Just by forcing the takedispatcher to be earlier.
nine_: I dunno, I think you've done plenty of trickeir things ;-)
14:50 brrt joined
nine_ Well I guess things usually seem much less tricky after you've done them ;) 14:50
jnthn Don't they just...
jnthn looks forward to the current invocation changes he's doing seeming much less tricky... 14:52
MadcapJake I think another point wrt tailcall/TCO: Perl 6 has much more powerful iterative facilities that make recursion not so necessary.
14:52 prammer left, skids joined 14:53 prammer joined
pmurias MadcapJake: TCO is only truly necessary in functional languages 14:55
the python philosophy is that they won't implement it because it's not worth having worse stack traces 14:58
MadcapJake pmurias: yeah, as much as I like to think of Perl 6 as multi-paradigm, it seems there are certain things that require you to become entrenched in a particular paradigm (like TCO here). 14:59
15:00 rurban joined
MadcapJake interesting: ES6 has TCO actually www.2ality.com/2015/06/tail-call-op...ation.html 15:01
ZoffixW MadcapJake, I think azawawi did more work on the CodeMirror thing. It looks usable enough: i.imgur.com/DxB7sNf.png 15:03
15:03 domidumont left
ZoffixW Still highlighted code inside a heredoc as code, but at least nothing is broken (like in SubLime text 2 :P) 15:04
pmurias MadcapJake: according to the v8 team the want to change the spec to have implicit tail calls
MadcapJake yeah it works but it's mostly just perl 5 with a few added keywords. one negative is that perl 5 keywords and such will also be highlighted
pmurias: what does that mean? 15:05
ZoffixW JS spec? 15:06
15:07 _mg_ left
pmurias MadcapJake: you will have to syntactically mark that you want to have a tail call 15:07
nine_ explicit not implicit 15:09
pmurias nine_: yes, sorry
what they want to have: github.com/tc39/proposal-ptc-syntax
MadcapJake ahh yeah that's what my confusion was, I think that's a fine idea 15:12
brrt it's weird to specify an optimization in the language, i'd think 15:15
ZoffixW Well, we do have is cached already :P 15:17
grondilu and 'is pure' (?) 15:18
pmurias brrt: tail calls change semantics
brrt hmm, not necessarily
15:18 lichtkind_ joined
pmurias brrt: when they eat your stack trace they do 15:19
brrt or, well, it depends on whether your semantics include this notion of the stack
keep a parameter 'i'm N tail calls deep', reconstruct the stack trace, done :-)
actually, call trace 15:20
but anyway
i'm nitpicking
perlpilot brrt: have you ever had to debug a Perl 5 program where perl optimized away some of your call frames?
brrt my point is that the stack is an implicit assumption of routine local storage, which is not necessary to specify in a language
no, haven't, actually
that's using goto right?
ZoffixW goto is the explicit way 15:21
perlpilot no, using goto you did it to yourself
brrt hmm
didn't know perl5 optimized call frames 15:22
skids tco is what you end up with when you slander goto. :-)
15:22 pierre_ joined 15:23 lichtkind left
pmurias does perl 5 have TCO without using goto? 15:25
15:27 pierre_ left
Ulti latest profile for BioInfo mattoates.co.uk/files/perl6/bioinfo...05-04.html 15:27
still has lots of deopt
but the code does run faster than last time 15:28
2.5s down to nearer 2s
jnthn Curious, many in postcircumfix:<{ }> 15:29
Ulti ^ Rakudo version 2016.04-97-g480709d built on MoarVM version 2016.04
15:29 brrt left
Ulti jnthn: yeah which I dont think were there at all last time 15:29
my code isnt changing at all at the moment either 15:30
ugexe ZoffixW: it was my precomps that were not invalidated :x 15:32
ZoffixW Ah 15:33
ugexe thats why it worked for me (the original fix, which was not in a PR, was cleaned up and commited. but the cleaned up code was missing a match)
but it was still loading the original fix's precomp for me
ZoffixW :D 15:34
ugexe i wonder if there is a way to better detect these types of precomp issues
(which i suspect only happen for version "*", which needs to be treated special) 15:35
15:42 awwaiid joined, sortiz left 15:47 finanalyst left 15:56 kurahaupo joined 16:01 abraxxa left 16:02 boegel left
timotimo mxe.cc/ - huh, TIL 16:02
16:04 boegel joined 16:05 kaare_ left 16:19 felher joined 16:30 zakharyas joined 16:39 Emeric joined 16:47 Emeric left, Emeric joined, awwaiid2 left 16:50 dakkar left, zakharyas left, sno left 16:51 mr-foobar joined
MadcapJake .seen Skarsnik 17:01
yoleaux I saw Skarsnik 16 Apr 2016 17:14Z in #perl6: <Skarsnik> Hello
masak ahoy, #perl6 17:06
17:07 _rubio_ joined
ZoffixW \o 17:07
timotimo ahoyhoy masak
masak m: say "a" ~ "hoy" x (4..8).roll 17:08
camelia rakudo-moar 475063: OUTPUT«ahoyhoyhoyhoyhoy␤»
17:08 sena_kun joined
Xliff_ m: ^444.roll 17:12
camelia rakudo-moar 475063: OUTPUT«Potential difficulties:␤ Precedence of ^ is looser than method call; please parenthesize␤ at /tmp/KUJrHCZkOq:1␤ ------> 3^4447⏏5.roll␤WARNINGS for /tmp/KUJrHCZkOq:␤Useless use of "^" in expression "^444.roll" in sink context (line …»
Xliff_ m: say (^444).roll
camelia rakudo-moar 475063: OUTPUT«251␤»
ZoffixW m: ^444 .roll
camelia ( no output )
sena_kun hi, #perl6. Bailador question's here. Does routing by juctions implemented? If yes, It seems to be broken with 2016.04. Log: pastie.org/10824220 17:14
17:15 lichtkind_ is now known as lichtkind
ZoffixW sena_kun, junctions like what... what's your route definition? 17:16
sena_kun ZoffixW, get any('/h', '/help', '/halp') => sub { # Default example. 17:17
ZoffixW sena_kun, looking at the code, that doesn't seem to be implemented 17:18
sena_kun, get rx{ ^ [ '/h' | '/help' | '/halp' ] $ } => sub { ... will work tho
sena_kun ZoffixW, ah, okay then. Yeah, regexes work. 17:19
17:20 prammer left 17:23 nd3i joined
sena_kun If we can translate junction into regex like "one"|"two", it's not so hard to implement. I'll try to do so and send a pr. 17:24
nd3i g'day all. This silly problem has got the best of me ...
m: my (@a, @b) = <a b c>, <x y z> 17:25
camelia ( no output )
nd3i m: say my (@a, @b) = <a b c>, <x y z>
camelia rakudo-moar 475063: OUTPUT«([(a b c) (x y z)] [])␤»
17:26 domidumont joined
ZoffixW m: my @a = <a b c>; my @b = <x y z>; say @a, @b 17:26
camelia rakudo-moar 475063: OUTPUT«[a b c][x y z]␤»
nd3i ok, but what i want is the two inner lists assigned to the two arrays: @a:[a b c] @b:[x y z]
ZoffixW nd3i, The @a won't know when to stop
nd3i, the RHS is a list. That entire list goes inside @a. 17:27
nd3i or, maybe there's a more natural way to use the two lists; I need them to iterate over separately
ya, right, I get that.
I tried a hyper =: <<= no joy
ZoffixW m: my ($a, $b) = <a b c>, <x y z>; say $a
camelia rakudo-moar 475063: OUTPUT«(a b c)␤»
perlpilot m: say my (@a, @b) := <a b c>, <x y z>; 17:28
camelia rakudo-moar 475063: OUTPUT«(@a, @b)␤»
perlpilot m: my (@a, @b) := <a b c>, <x y z>; @a.say; @b.say
camelia rakudo-moar 475063: OUTPUT«(a b c)␤(x y z)␤»
ZoffixW hax
nd3i that's basically what I have now
ZoffixW m: say my (@a, @b) := <a b c>, <x y z>; @a[2] = 42; say @a
camelia rakudo-moar 475063: OUTPUT«(@a, @b)␤Cannot modify an immutable Str␤ in block <unit> at /tmp/ofJdjQO6O3 line 1␤␤»
ZoffixW huggable, xy problem 17:29
huggable ZoffixW, nothing found
perlpilot good point
nd3i it feels off to have a set of things in a scalar
ZoffixW heh
huggable, xy problem :is: You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. So, you ask about Y in order to solve X, which doesn't make sense. You should ask about X. 17:30
huggable ZoffixW, Added xy problem as You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. So, you ask about Y in order to solve X, which doesn't make sense. You should ask about X.
ZoffixW nd3i, it feels off to say it feels off to store *a* set inside a scalar :P
grondilu tried $ time perl6 -e 'say [+] rand xx 1e6' and is impressed. 17:31
nd3i sure :) I'm cool with it as long it's not going to get me laughed at 17:32
ZoffixW sena_kun, my personal opinion is that would be over-engineering. I don't think such use is common enough to justify the extra complexity (more docs for users to read, more code for developers to debug and maintain, etc)
grondilu, I'm not really :) gist.github.com/zoffixznet/7412d45...38d82af2a8 17:34
sena_kun ZoffixW, you meant conversion jun->re itself or routing by junctions at all? I looked into it not and it seems there are no clear way to get values of junctions, just really dirty parsing of .perl.
ZoffixW m: say "{6.028/0.747} times slower than P5" 17:35
camelia rakudo-moar 475063: OUTPUT«8.069612 times slower than P5␤»
sena_kun s/not/now/
17:35 skink joined
ZoffixW sena_kun, routing by junctions at all. 17:35
sena_kun ZoffixW, it makes sense. Then we need to comment code that is NYI in the example at least, I suppose. 17:36
timotimo i can't seem to figure out how to reply directly to a node in perlmonks
i can only see reply links for replies to that node itself 17:37
ZoffixW sena_kun, yeah. It should be tossed. But I'm not the dev of Bailador, ufobat is :) Maybe they will want to actually implement junctions 17:38
sena_kun ZoffixW, I know, but he's not here and you're far more confident with bailador codebase than me (: Issue will be enough, I suppose. 17:39
17:43 ZoffixW left 17:47 _rubio_ left
timotimo i see no reason to try to turn a junction into a regex like that 17:48
especially since "foobar" ~~ "foobar"|"bar" already works just fine 17:49
17:54 hankache joined 17:55 huggable left, huggable joined
hankache hola #perl6 17:55
18:00 prammer joined, pierre_ joined
grondilu 8 times slower than P5 is awesome compared to what it was say one year ago. 18:04
18:04 prammer left
grondilu now that I've tried P6 on a decent machine, I have renewed hopes that P6 will one day be faster than P5. 18:05
18:06 pierre_ left
mst if nothing else, I am highly confident that rakudo on moarvm will eventually be *fast enough* 18:07
grondilu that sounds more reasonable indeed
mst and the parallelisation stuff means that on N-core systems it'll probably be easier to make things that perform reasonably than it is in perl5 18:08
grondilu true too
18:09 prammer joined
mst and, y'know, I'm pretty good with a future where I end up writing perl5, perl6, ES6, go, and rust 18:09
grondilu sure, especially if they're all P6 slangs :P
18:09 dolmen joined
nd3i perlpilot: i'm using your := suggestion for now. Maybe it's p5 mindset but the @a reads like an array/list/set. TY 18:10
18:10 nd3i left
mst if nothing else I expect most of my toolchain stuff to remain perl5, since perl6's "we want to be completely cross platform" means that perl5 is much better at unix and I'm not sure it's worth 'fixing' that in perl6 when perl5 already exists 18:10
(because 'fixing' it would likely make perl6 less good at things that it's way better than perl5 at)
mspo C is more portable 18:11
mst C ... portable ... ... ... you're SO cute
mspo <shrug> on unix anyway 18:12
I thought nqp would replcae the p5 bootstrap stuff 18:13
being able to cross compile would be nice since p5 had issues with that
I think the miniperl build process wasn't cross-compile friendly
jnthn "It's portable on unix" kinda wonderfully sums up the life of a developer on Windows. :D 18:15
mst eh, what?
mspo: I don't think you're having the same conversation as anybody else 18:16
mspo jnthn: how the times have changed
mst: very likely
mst (1) no, actually, C is not that portable between unices unless you're extremely careful, you will learn this the hard way one day, grasshopper
grondilu jnthn: personal question : have you always developed on Windows or did you switch from a Unix background?
mst (2) I'm talking about *my* toolchain, as in the toolchain I'll use to deploy stuff, not rakudo's build system
mspo netbsd is portable c 18:17
but since linux switches all of its components every two years...
mst: oic
mst and netbsd being 'portable c' will help your parallel code run properly on windows how?
mspo mst: from what I thought "toolchain" meant, bootstrapping perl6 made sense 18:18
mst if you remove the word 'my' from the sentence I actually typed and replace it with something else, you get a different sentence
mspo in terms of "portable c" and "careful c", I was just giving an example 18:19
mst sure, but claiming C is more portable than perl6 is still obviously wrong
there's lots more cross-platform differences in C
much though I love NetBSD, it's not a *relevant* example
mspo mst: it's more cross-compile friendly :) 18:20
dalek c: b6766ee | (Tom Browder)++ | doc/Language/5to6-nutshell.pod:
try again to get a searchable term
c: 1b25728 | (Tom Browder)++ | doc/Language/about.pod:
try again to get a searchable term

correct linl URL
18:20 dalek left
jnthn grondilu: Putting aside my primary school's BBC micro, which is the first machine I programmed on, I did pretty much all my early programming stuff on Windows (QBasic, VB, etc.) Was 5 years after that until we got internet access at home. 18:20
mspo mst: in terms of perl6 toolchain, cross compilation is handy and c is better than perl5 for that
jnthn grondilu: So I started out on Windows, pretty much, and it's one of those "the devil you know" things. 18:21
18:21 dalek joined, ChanServ sets mode: +v dalek
mst jnthn: funny, I started on a BBC, then went to an archimedes, then when I ran face first into windows it was so horrible I stopped programming as a hobby for four or five years until I discovered unix 18:21
jnthn mst: Hm, I didn't have that reaction, curiously enough. It was just one dialect of BASIC to another ;) 18:22
18:23 macsnowball joined
TimToady C is portable only in the sense that it is ubiquitous. :) 18:23
jnthn Anyway, didn't take me long after getting internet access to want to put stuff on the internet, and later I got curious how stuff like forums and ecommerce sites worked, which led to Perl... :)
grondilu so you started using Perl on Windows? kind of odd. 18:24
mst mspo: that might turn out to be true, but has nothing to do with anything I was talking about :)
TimToady grondilu: my spies inside Microsoft indicate that Perl is still pretty heavily used internally
jnthn Well, the hosting servers I deployed stuff to were Linux or maybe some other Unix. This was back in the days when FTP was, like, The Way It Worked. :)
DrForr Quick poll - Is expecting beginners to pull off "Fizz Buzz" in Perl 6 after short exposure to print(), conditionals and loop() too much to expect, especially in a tutorial situation? 18:25
mst (also if you're going to have to write C anyway, why not write C to fix the perl5 build process to cross compile better :)
DrForr Heh. When I first had access to servers to deploy webby stuff to it was mostly Solaris + Sybase.
arnsholt You can write portable, bug-free C in the same sense as you can juggle machetes. Very, very carefully 18:26
jnthn But yeah, I'd done pretty much all my other development so far on Windows, so it didn't feel so odd to just develop Perl stuff on Windows too :)
Then I spent a bunch of years doing .Net stuff, which kinda kept me on Windows.
mspo I am only arguing that it is 1) everywhere and 2) cross-build-able 18:27
so generating perl6 for your rpi is faster when done on your x86_64 beefy box :)
jnthn Now I spent a decent bit of time in a Linux VM, mostly because of nice things like valgrind. :) 18:30
18:30 perlpilot left
mst mspo: 'arguing' isn't a particularly good word since, like I say, that wasn't the conversation we were even having :( 18:31
jnthn I'm really lazy, so I suspect Windows will survive as the primary OS on this box until it's time for a new one, at which point I'll probably go for something else. :)
mst jnthn: you missed the archimedes step, so you were just swapping dialects of BASIC, I was losing a massively superior GUI *and* the ability to drop into arm26
RabidGravy I actually wrote Perl for Netware before I wrote any for WIndows 18:32
mst I still miss RISC OS :(
jnthn mst: Well, not so much missed as didn't realize it was so significantly nicer. :)
mst jnthn: I mean 'missed' in that you didn't get a couple of years to fall in love with it before encountaring win 3.1
jnthn :) 18:33
Don't think I even encountered it, so yeah, no chance for me :)
mst I'm assuming if you'd spent a couple years on it you'd also've fallen in love, but that's because I'm biased as all get out and assume anybody with a clue would fall in love with it given the chance
jnthn It's possible I would have. Guess we'll never know. 18:34
18:34 prammer left, perlpilot joined
jnthn Guess OSX is "the other option" I could take :) 18:34
18:35 ZoffixW joined 18:37 prammer joined, prammer left
ZoffixW dalek glitching? The last announce it made is for a commit 3 days ago and the actual commit was a PR merge :/ 18:37
Ah, k. unsquashed commits from earlier on 18:39
18:40 CIAvash left
ZoffixW DrForr, beginners in what? Perl 6 or programming in general 18:40
Actually, don't matter. I think it's fine even for total beginners. 18:41
DrForr Perl 6, I'm assuming a scripting or at least C background. I'm rewriting a chunk of the tutorial.
ZoffixW It 18:42
MadcapJake for a nativecall module, is it expensive to use `is symbol` trait a lot?
ZoffixW It's perfectly fine methinks. Really, saying "you write a ternary like ?? !!, not ? :" should be enough :P
DrForr Thanks. I'm making sure there's a solid foundation, but I also want to make sure to repeat things to increase retention.
MadcapJake I like that Perl 6's ternary is very distinct from other operators 18:43
jnthn MadcapJake: I wouldn't imagine so, no 18:44
MadcapJake: It just takes that name rather than the sub's name to do the lookup in the native lib
ZoffixW It composes a role to do so 18:45
You know what this channel needs? A Markov chain bot.
wamba m: multi MAIN( :h(:$help) ) { say $?USAGE }
camelia rakudo-moar 475063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HQSy6Px0Ix␤Variable '$?USAGE' is not declared␤at /tmp/HQSy6Px0Ix:1␤------> 3multi MAIN( :h(:$help) ) { say 7⏏5$?USAGE }␤»
ZoffixW mst, right? :} 18:46
mst ZoffixW: plenty of free slots in my ignore list :D
ZoffixW lol
mst enough for all of your nicks at once even :P 18:47
18:49 dupek joined
dupek hi 18:49
I want to ask something
moritz joining a channel, ignoring every single nick in there, and enjoying the organic silence. That's hipster!
18:49 ZoffixW is now known as BrokenRobot, BrokenRobot is now known as ZoffixW
moritz (should have gone to mst) 18:49
18:49 telex left 18:50 cdg left
ZoffixW dupek, ask forth and ye shall receive :) 18:50
DrForr dupek: Just go ahead and ask.
dupek I read about this idea
www.perlmonks.org/?node=339754
it looks really great
whats happened than?
18:50 telex joined
mst it's a terrible idea so it died when the last person foolish enough to work on it got broed. 18:51
*bored
dupek lol
why it is terrible?
DrForr dupek: Sanity? Which admittedly is in short supply in the Perl community. And look at the year.
MadcapJake A Perl 6 shell would be great but a whole OS? 18:52
mst because perl isn't a systems language
DrForr dupek: Enough would have to be implemented in C to get reasonable performance that it's pointless.
mst neither perl is a systems language, and that's ok
if you want to replace C for OS stuff, look at rust
moritz or maybe at D, if you're more conservative 18:53
MadcapJake and speaking of Rust OS: www.redox-os.org
dupek Rust is okay 18:54
18:55 dolmen left, ZoffixW left
RabidGravy or BCPL 18:58
MadcapJake 2 other neat systems languages: ark-lang.org www.red-lang.org 19:01
19:05 prammer joined 19:08 zwu joined 19:11 hankache left 19:13 yqt joined, mr-foobar left 19:14 mr-foobar joined, jjido_ joined 19:15 zwu left
ufobat sena_kun, junctions were implemented, but never in the testcases. I 19:21
sena_kun, i realized that i dropped them out of the code when i already replaced the "old" routing with the nested routing feature 19:22
sena_kun, and i think you don't realy need it since the regex way (rx{ ^ [ '/h' | '/help' | '/halp' ] $ }) is basically just another "syntax" to achive the same behaviour 19:23
sena_kun ufobat, do you plan to fix the example then? 19:24
ufobat sena_kun, but still you're right.. do you really need this? i am currently thinking about just changing the example
sena_kun ufobat, no, I don't need this, I just tested the examples and notice that one of it is broken, then reported it. 19:25
ufobat yeah! :) thanks for the report!
i think i'll think about it and probably fix the example :) 19:26
RabidGravy I would say that being able to use a junction would be useful because it would enablle you to calculate a set of routes eaier
easier
ufobat easier? in what way? 19:27
sena_kun ufobat, also, do you have any roadmap/todo list? I'd like to dig into bailador codebase and looking for some(probably easy) tasks. Or issues page is my hope? 19:28
RabidGravy you add to an array and then use that to create a junction for instance, rather than building a string regex
ufobat RabidGravy, i see 19:29
but is it a common usecase to create the route destinations "dynamically"?
skink Anyone got an appveyor script that doesn't take an eternity?
ufobat thats what you're describing, right?
sena_kun, i am currently a bit.. i dont know how to say it ;) 19:30
disapointed is not the right word
RabidGravy yeah, if you are making a higher level inferface
ufobat and thinking about it, is not negative enough ;)
i am thinking about the differences between the http/p5sgi/p6w servers and the specification, supplys vs Blobs and stuff 19:31
RabidGravy, i see. hmm.. currently i think its hard to implement, because the "route" itself once was a Pair and now is a Bailador::Route 19:32
i guess you need to change the type in the Bailador::Route to be no longer just a regex but also a junction... 19:33
sena_kun, if you want to PR something easy, i guess its easy to implement that you have a <HTTP-ERROR-CODE>.xx template in order to customize error pages
19:34 ZoffixW joined
ufobat sena_kun, currently i am working on file uploads multipart/form-data vs url-encoded stuff 19:35
ZoffixW I don't see how much easier Junctions make anything. The usecase in question is using a junction to make a route work off multiple URLs... Is that really a common thing to do? I can't think of a single time I ever needed it in the past 8-9 years
sena_kun ufobat, okay, I'll look into it, thanks. 19:36
ufobat sena_kun, i think RabidGravy? did suggest to write a PSGI app that "tests" the specification. thats on my roadmap as well. but not really bailador related more a Devel::PSGI module
sena_kun, if you have questions or suggestions don't hesitate to talk to me :) 19:37
19:37 hotel_california left 19:38 hotel joined
sena_kun ufobat, yeah, will do so if needed. 19:39
19:39 CurtisOvidPoe joined
CurtisOvidPoe p6: my $thread = Thread.start({ for 1 .. 10 -> $v { say $v }}) 19:40
camelia rakudo-moar 475063: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
CurtisOvidPoe That’s interesting. I just rebuild rakudo on os x and got “Variable '$thread' is not declared. Did you mean 'Thread’?”
That’s from the following PerlMonks post: perlmonks.org/?node_id=1162208 19:41
19:42 dha joined
ZoffixW CurtisOvidPoe, you have a "typo" in your punctuation vars post in second do_something() sub: my $self = shift; is still there, after you already unpacked @_ into $self 19:43
moritz m: my $thread = Thread.start({ for 1 .. 10 -> $v { say $v }}); 19:44
camelia rakudo-moar 475063: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
CurtisOvidPoe ZoffixW: Just fixed it. Thanks.
ZoffixW m: $thread = Thread.start({ for 1 .. 10 -> $v { say $v }})
camelia rakudo-moar 475063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nCt2geRbuf␤Variable '$thread' is not declared. Did you mean 'Thread'?␤at /tmp/nCt2geRbuf:1␤------> 3<BOL>7⏏5$thread = Thread.start({ for 1 .. 10 -> ␤»
moritz does the missing semicolon at the end make a difference? 19:46
ZoffixW (note my eval above omited `my`, if you're referring to it)
jnthn moritz: ZoffixW's one missed the my at the start 19:47
19:47 Zrah joined
moritz yes, missed that. Thanks. 19:48
ZoffixW Works fine locally on Win7 with 2016.04 Star and on debian wheezy with rakudo brewed this morning.
19:48 ZoffixW left 19:49 Zrah left, Zrahurgh joined
moritz well, the perlmonks user had a 2013.something built on parrot 19:49
CurtisOvidPoe OK, I had an extra “ in my one-liner, causing a spurious error message.
jnthn Yeah, that ain't going to end well :)
CurtisOvidPoe 09:47:21 {master} ~/veure $ perl6 -e 'say "use Thread; my $thread = Thread.start({ for 1 .. 10 -> $v { say $v }});"' 19:50
===SORRY!=== Error while compiling -e
Variable '$thread' is not declared. Did you mean 'Thread'?
at -e:1
jnthn m: say "quoted string with an $undeclared"
camelia rakudo-moar 475063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QG9Z_YvvQQ␤Variable '$undeclared' is not declared␤at /tmp/QG9Z_YvvQQ:1␤------> 3say "quoted string with an 7⏏5$undeclared"␤»
CurtisOvidPoe That’s what I saw. It’s just a very misleading error message.
moritz I don't know how we could make it better
19:50 Relsak left
jnthn Me either...concrete suggestions welcome though. 19:51
mst CurtisOvidPoe: misleading how? it tells you the variable name you didn't declare, and guesses at the nearest symbol currently in scope
jnthn Not sure if adding "in quoted string" woulda given an additional clue at what went wrong 19:52
Though may be do-able
mst I do wonder whether the 'did you mean' is only actually useful with another variable name
people are unlikely mean a class name when they use a variable name, I'd've thought?
CurtisOvidPoe Oh, crap. I read all of that wrong and did too much cutting-n-pasting. Alcohol was involved. My apologies :)
19:53 Zra joined, Zrahurgh left
jnthn mst: Yeah, I was a little surprised it did that. The levenstein algo does weight sigils some: github.com/rakudo/rakudo/blob/nom/...ld.nqp#L69 19:54
Which I guess makes it less likely to do that, but an otherwise very close match is within the edit distance.
m: my \something = 42; say $something 19:55
camelia rakudo-moar 475063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/m29sdXkwiR␤Variable '$something' is not declared. Did you mean 'something'?␤at /tmp/m29sdXkwiR:1␤------> 3my \something = 42; say 7⏏5$something␤»
jnthn That one is kinda useful
19:57 Zra left 20:02 tharkun left, tharkun joined 20:03 sno joined 20:07 hotel_california joined, sena_kun left 20:08 hotel left 20:11 hotel joined
tadzik hey, good people. Do you have any idea where one could buy (I know, I know) Perl conference t-shirts? 20:13
20:13 hotel_california left
tadzik a friend of mine is being sent by his employer to a java conference and chose to display his protest in this peculiar way :) 20:13
dha I imagine TPF might have some overstock sitting around? *shrug* 20:14
jdv79 ask liz - they probably have something 20:15
dha That was my other thought. 20:16
tadzik good idea
lizmat: ping :)
lizmat pong
20:17 darutoko left
timotimo i don't mean to be mean here, but ... 20:17
lizmat tadzik: what size? and where to send ? :-)
timotimo how the flying fuck are people still running around with a 2013 rakudo
lizmat apt-get and friends ?
geekosaur debian?
tadzik lizmat: xxl, warsaw, poland :) 20:18
dha timotimo - clearly you were not around for the many years after the advent of Perl 5 that people were still using Perl 4.
lizmat tadzik: we could have given you one in Rugby :-(
20:18 firstdayonthejob joined
geekosaur (I never did use perl 4. went straight from 3 to 5) 20:19
tadzik lizmat: yeah, the friend just asked me today :/
20:19 colomon left
tadzik as sudden as it is confusing :) 20:19
El_Che timotimo: does people also count as perl6 users. They are counted when evaluating world domination :)
tadzik was the order_66 opcode already in in the 2013 version? 20:20
dha I once worked on a code base that was only technically Perl 5. It had "use Socket;" at the beginning.
timotimo i don't know what that means 20:22
geekosaur perl 4 with the absolute minimum changes to run in perl 5 20:23
20:23 yqt left
jdv79 lizmat: is there a doc of the p6 related qa hackathon points/issues? 20:24
lizmat jdv79: no, not really, the list of accomplishments in the P6W is the closest thing to it
dha Yeah. the use of a module is a Perl 5 feature. *Everything* else about it screamed Perl 4. And, of course, no use of any number of modules that would have made the code much more usable.
jdv79 oh 20:25
lizmat there is one action point remaining: mst promised to allow Perl 6 distributions to PAUSE in the coming weeks 20:26
after warning all of the toolchain people this is going to happen
dha Oh?
jdv79 i'm not sure what that means
20:26 Celelibi left
dha that should be... interesting. 20:26
20:27 cdg joined
lizmat it was already 2 years ago... 20:27
jdv79 doesn't that already happen?
lizmat not afaik
mst can tell more
jdv79 oh
mst jdv79: we turned it off while we fixed some stuff
most of that is now fixed
I'm going to warn people they have oine last chance to complain
jdv79 oh, the recent stuff?
mst then we're going to turn it back on
right
jdv79 ok
lizmat ++mst 20:28
20:31 yqt joined 20:32 Celelibi joined 20:36 colomon joined 20:39 itaipu joined 20:43 dolmen joined 20:45 ufobat left 20:47 TEttinger joined
AlexDaniel tbrowder++ # for working on documentation 20:49
20:49 sufrostico left
tbrowder AlexDaniel: you're welcome, indeed! 20:50
20:53 colomon left 20:54 colomon joined 20:56 ZoffixWin joined, colomon left, dupek left
c: 5a483f6 | (Zoffix Znet)++ | doc/Language/testing.pod:
Merge pull request #492 from tbrowder/master

correct link URL
20:58 skrsh joined, colomon joined 20:59 skids left, wamba left 21:00 Emeric left
dalek osystem: af23605 | RabidGravy++ | META.list:
Add Audio::Fingerprint::Chromaprint

See github.com/jonathanstowe/Audio-Fin...hromaprint
21:00
RabidGravy there
21:01 itaipu left, Emeric joined
ZoffixWin Is that 50th module now? RabidGravy++ 21:02
RabidGravy yaw, well ~ moving the Audio::PortMIDI and Audio::PortAudio to the noise gang 21:03
21:03 Emeric left
RabidGravy it would be the 51st I released infact, I released EventEmitter then discovered the tony-o relleased one almost the same almost simultaneously so merged them and pulled mine 21:04
21:10 ptolemarch left 21:11 rindolf left 21:12 jjido_ left
timotimo hehe 21:14
21:15 domidumont left, hotel_california joined
ZoffixWin Most pedantic PR I ever sent: github.com/ufobat/Bailador/pull/73 21:16
21:16 colomon left
ZoffixWin throws "this way it looks more professional" argument to back it up 21:16
21:17 hotel left
dha Correct spelling is particularly pedantic now? 21:17
ZoffixWin *shrug* it's just not that important in a test name :P 21:18
I probably wouldn't even noticed it if I weren't running zef with --debug switch
21:22 devtom30 left, dha left
jdv79 isn't that just brit vs amer spelling diff? 21:23
21:23 dha joined
ZoffixWin Nope. dictionary.reference.com/browse/existance www.merriam-webster.com/dictionary/existance 21:24
jdv79 oh 21:25
lucs ZoffixWin++ (correct spelling)++ everywhere 21:26
ZoffixWin has to deal with brit vs amer spelling for a living.... and then decide which version looks better for "Canadian" spelling :P 21:28
lucs Yeah, that's a pain. 21:29
dha Oh, the canadians are too polite to complain if you get it wrong.
ZoffixWin notes to add ~/.zef to the nuke list
MadcapJake how would I represent a float**? Pointer[Pointer[num32]]? 21:30
lucs Apart from the with/without "u" thing, are there a lot of other Brit vs American frequently occurring spelling differences?
MadcapJake aluminum/aluminium 21:31
Juerd lucs: -ise/-ize
dha I was just going to ask if that was one... 21:32
lucs MadcapJake: Right.
Juerd: Oh, a big one, yeah.
ZoffixWin lucs, on my list of common spellings we use at $work, I have 21 brit/amer words. That's just the common ones that usually appear on our flyers :) 21:33
RabidGravy MadcapJake, or some Pointer[CArray[num32]] depending on the intent or even CArray[CArray[num32]]
MadcapJake RabidGravy: ok thanks! 21:34
lucs ZoffixWin: Wow. Well, it's nice to see that you guys care enough about it :) 21:35
skink MadcapJake, Perhaps a helpful reference gist.github.com/Xliff/11acc06d8e4c...5bbfe47329 21:37
MadcapJake what does the nativecast function do? 21:38
RabidGravy Pointer to a perl thing 21:40
skink The examples I've seen have used it to specify what a pointer is actually supposed to point to
MadcapJake ohh, neat!
skink Or more succinctly that, yeah
timotimo RabidGravy: not just pointers
we can also cast CArray into Pointer, CArray into CArray, CArray to CStruct, ... 21:41
RabidGravy "pointers"
MadcapJake timotimo: but those are all technically pointers
timotimo haha
it's true
21:42 dha left 21:43 cpage_ joined
MadcapJake anyone able to decipher what these float**'s are in this function: github.com/quiasmo/fluidsynth/blob...#L277-L279 21:43
timotimo i guess you give it a pointer to the storage for your pointer and it'll fill the pointer you're supposed to use in there 21:44
*shrugs* could be way wrong
MadcapJake found it in the docs, they are arrays of floats 21:45
21:47 YP-QMUL-W joined 21:55 huggable left, huggable joined 21:58 zwu joined 21:59 dwarring joined 22:02 nadim left 22:10 YP-QMUL-W left 22:13 YP-QMUL-W joined
MadcapJake my fluidsynth parser was fine until *one* function that has a arg[]... seriously why does there have to be so many different ways to do the same thing in C... 22:14
timotimo um, "your" parser?
you're not using gptrixie? 22:15
MadcapJake nope, just doing it by hand
22:15 YP-QMUL-W left
MadcapJake I don't want to rely on castxml just for users to install my module 22:16
22:16 maybekoo2 joined
MadcapJake plus this way is a ton faster 22:17
also, since I'll be building and installing fluidsynth for users, I figured I'd just generate the bindings too 22:19
timotimo i wasn't telling you to put the gptrixie step into module installation 22:20
22:21 Sgeo joined
MadcapJake oh well yeah I could just use gptrixie and do all the legwork to clean it up, but i'm lazy ;) 22:22
22:24 prammer left 22:29 jack_rabbit joined 22:32 pmurias left 22:33 rurban left 22:34 lichtkind_ joined 22:35 lichtkind left 22:36 colomon joined 22:41 jack_rabbit left 22:49 CurtisOvidPoe left, dolmen left 22:54 edjsu joined
skink Xliff_, In your latest gist, you can also do for 1..$bytes/4 22:55
Not that it makes a difference, just saves a smidge of typing 22:56
23:06 YP-QMUL-W joined 23:07 YP-QMUL-W left
timotimo the path for $bytes div 4 might be more optimized 23:10
23:14 AlexDaniel left 23:15 sufrostico joined
ZoffixWin It's possible to disable colour output of error messages, yes? 23:18
23:18 BenGoldberg joined
ZoffixWin Looking at GlotIO, colours get translated into trash: glot.io/snippets/eedn2alr1s (run this) 23:18
23:19 firstdayonthejob left
timotimo yeah, it is possible 23:20
RAKUDO_ERROR_COLOR
23:20 zwu left
ZoffixWin timotimo++ thanks 23:21
Xliff_ skink, thanks. 23:23
23:25 RabidGravy left
ZoffixWin Does MattOates hang out here? 23:28
timotimo yeah, it's either ulti or util 23:29
ZoffixWin Ulti, Util, we should add RAKUDO_ERROR_COLOR=0 to this line: github.com/prasmussen/glot-code-ru...rl6.go#L10
skink ZoffixWin, The other day I saw someone simply cd .. outside of the containers that site uses :D
ZoffixWin Ulti, as asked in #go-lang and apparently simply adding that before `perl6` in that code won't pass it to the process. Perhaps you know better how to do it. 23:30
skink Wait, nvm, that was actually a clone of glot.io, not glot.io 23:31
ZoffixWin skink, well, you can do this: glot.io/snippets/eedngbebun 23:32
Not sure if that's the "container" or not
timotimo hopefully it is. it'd be weird if it weren't 23:33
23:33 cdg left 23:34 cdg joined
timotimo like, how do you even do that wrong? :P 23:35
skink Xliff_, re: the travis test for p6-audio-oggvorbis, I think you have to add v0 23:37
On Ubuntu I don't have libogg.so, but rather libogg.so.0 23:38
23:39 cdg left
skink I imagine it could be the same for Debian, which Travis uses 23:39
timotimo right, those are hidden away in the -dev packages
geekosaur ^
skink Nope, I have those installed
timotimo huh?! 23:40
skink Also his travis script explicitly installs them as well
timotimo i don't remember this is a thing ... o_O
geekosaur skink, the linker won't find them if the unversioned one doesn't exist
(it's how you specify which of possibly several incompatible APIs you want to link against) 23:41
skink Right, I understand, it's just that the unversioned one doesn't seem to exist in the first place on Ubuntu 14.04
geekosaur pyanfar «xmonad-contrib:nsp-loggers» Z$ dpkg -S /usr/lib/x86_64-linux-gnu/libogg.so 23:43
libogg-dev:amd64: /usr/lib/x86_64-linux-gnu/libogg.so
mint 17.2, based on ubuntu 14.04 23:45
skink Oh would you look at that 23:49
I'm blind :D
timotimo whew
skink I have just .so for x86_64 but not i386 23:50
got thrown off between that and various runtimes 23:51
timotimo ah, understood