»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
ab5tract semicolons? 00:00
TimToady m: say ( < 4 23 33 21 22 21 >; <12 23 22 41 2>; <5 7 2>)
camelia rakudo-moar 012450: OUTPUT«4 23 33 21 22 21 12 23 22 41 2 5 7 2␤»
TimToady m: say ( < 4 23 33 21 22 21 >; <12 23 22 41 2>; <5 7 2>).perl
camelia rakudo-moar 012450: OUTPUT«("4", "23", "33", "21", "22", "21"; "12", "23", "22", "41", "2"; "5", "7", "2")␤»
TimToady hmm
that's supposed to LoL now
m: say ( < 4 23 33 21 22 21 >; <12 23 22 41 2>; <5 7 2>).WHAT 00:01
camelia rakudo-moar 012450: OUTPUT«(LoL)␤»
BenGoldberg At least the semicolons are there in the output
TimToady oh, you're right, they are
m: say ( < 4 23 33 21 22 21 >; <12 23 22 41 2>; <5 7 2>)[1]
camelia rakudo-moar 012450: OUTPUT«12 23 22 41 2␤»
00:02 woosley left
TimToady m: say ( < 4 23 33 21 22 21 >; 1,1,*+*...* ; <5 7 2>)[1][100] 00:02
camelia rakudo-moar 012450: OUTPUT«573147844013817084101␤»
00:02 woosley joined
TimToady m: say zip( < 4 23 33 21 22 21 >; 1,1,*+*...* ; <5 7 2>) 00:04
camelia rakudo-moar 012450: OUTPUT«4 1 5 23 1 7 33 2 2␤»
grondilu TimToady: looking at rosettacode.org/wiki/Iterated_digit...ng#Perl_6, I notice that at some point the division of two integers is computed with infix:<div>, and then the remainder is computed. Shouldn't there be a version of the integer division that returns both the dividend and the remainder? 00:06
00:07 cognome left
grondilu (because I thought normally when you do the euclidean division you get both for the same price) 00:07
00:08 cognome joined
grondilu I'm not sure that would improve performance a lot but still it was nagging me a bit. 00:08
00:08 cognome left 00:09 cognome joined
TimToady we've discussed that here, but it really depends on how smart the optimizer is whether it makes sense to provide a combined op 00:11
a smart optimizer will notice the common code and move it out front, and leave the register returns where they need to be
00:11 dayangkun joined
TimToady we don't do that yet though 00:11
that being said, I could see a kind of listy divmod for repeated extraction of lower parts, such as for extracting seconds and minutes from time values 00:13
but that would be more for user convenience
00:14 cognome left
grondilu ok 00:14
TimToady so you could say something like $time divmod (60,60,24)
00:14 Jerry joined
TimToady or express getting all the digits out with $integer divmod 10 xx * 00:15
grondilu ^ that'd be coold. In RC I often struggle a bit to get the base decomp of an integer 00:16
TimToady but maybe since it returns the mod before the div, it should be called "moddiv", or "mods" or some such 00:17
grondilu wonders if there's an even smarter way to do this with a triangular reduction 00:18
TimToady well, you'd have to bake the modulus into the operator 00:19
and it's sort of inside out from a normal list->scalar notion 00:20
grondilu yeah that would not fly
TimToady [\op] $num, 10 xx * or some such
zacts ok, I will read this when I get the time this weekend, but does Perl6 allow you to use Perl5 modules within Perl6 code? 00:21
TimToady trouble is the partial product is a list in the 2nd iteration
maybe it's not triangular
BenGoldberg @whatever = $integer remainders 10; 00:22
TimToady well, the problem is that it has to return two different things
grondilu so if I want to get say the 256-based decomposition of an integer in perl6, what's the best way to do it?
TimToady m: say 123456789.base(256) # won't work 00:23
camelia rakudo-moar 012450: OUTPUT«base must be between 2 and 36, got 256␤ in method gist at src/gen/m-CORE.setting:13262␤ in sub say at src/gen/m-CORE.setting:14195␤ in block <unit> at /tmp/7bdg_NrYNi:1␤␤»
TimToady m: say :256[1,2,3,4] 00:24
camelia rakudo-moar 012450: OUTPUT«16909060␤»
BenGoldberg sub infix:<divmod>($numer, $denom) { $numer div $denom, $numer %% $denom }; say 1234567 divmod 256 xx *;
TimToady we allow that direction though
BenGoldberg m: sub infix:<divmod>($numer, $denom) { $numer div $denom, $numer %% $denom }; say 1234567 divmod 256 xx *;
camelia rakudo-moar 012450: OUTPUT«(timeout)»
grondilu in RC I often have to do: gather while $n > 0 { take $n % $base; $n div= $base } # not the most elegant 00:25
TimToady BenGoldberg: we were thinking of the precedence as 1234567 divmod (256 xx *)
but you're defining it the other way there
BenGoldberg m: sub infix:<divmod>($numer, $denom) { $numer div $denom, $numer %% $denom }; say 1234567 divmod (256 xx *);
camelia rakudo-moar 012450: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b --> int)␤ in sub infix:<divmod> at /tmp/YzgQFrgekW:1␤ in block <unit> at /tmp/YzgQFrgekW:1␤␤»
grondilu couldn't we get a Int.base($n where $n > 36) candidate? 00:26
TimToady p6 is not going to intuit list processing for you
grondilu: probably, since :256 works
grondilu or a :$numeric! 00:27
TimToady no, that syntax is taken
grondilu oh?
no I mean:
hang on
TimToady m: my $numeric = 42; say (:$numeric)
camelia rakudo-moar 012450: OUTPUT«"numeric" => 42␤»
grondilu say 8.base(2, :numeric); # would return [1, 0, 0, 0] instead of "1000" 00:28
ab5tract TimToady, #perl6: thanks for the discussion! have a good night
TimToady o/
00:29 ab5tract left
TimToady grondilu: yes, that seems reasonable-ish, and it's just mandatory for >36 00:29
grondilu or say 8.base(2, :list)
TimToady m: sub infix:<divmod>($numer, @denom) { gather for @denom, 999999999999999999999999 -> $denom { take $numer % $denom; $numer div= $denom } }; say 1234567 divmod (256 xx *) 00:31
camelia rakudo-moar 012450: OUTPUT«===SORRY!===␤Cannot assign to a readonly variable or a value␤» 00:32
TimToady m: sub infix:<divmod>($numer is copy, @denom) { gather for @denom, 999999999999999999999999 -> $denom { take $numer % $denom; $numer div= $denom } }; say 1234567 divmod (256 xx *)
camelia rakudo-moar 012450: OUTPUT«(timeout)»
TimToady m: sub infix:<divmod>($numer is copy, @denom) { gather for @denom -> $denom { take $numer % $denom; $numer div= $denom } }; say 1234567 divmod (256 xx *)
camelia rakudo-moar 012450: OUTPUT«(timeout)»
TimToady oh, duh
m: sub infix:<divmod>($numer is copy, @denom) { gather for @denom -> $denom { take $numer % $denom; $numer div= $denom || last } }; say 1234567 divmod (256 xx *) 00:33
camelia rakudo-moar 012450: OUTPUT«(timeout)»
TimToady m: sub infix:<divmod>($numer is copy, @denom) { gather for @denom -> $denom { take $numer % $denom; $numer div= $denom or last } }; say 1234567 divmod (256 xx *)
camelia rakudo-moar 012450: OUTPUT«135 214 18␤»
grondilu m: say (-> $n, $b { $n < $b ?? $b !! ($n % $b, &?ROUTINE($n div $b, $b))(8, 2) 00:34
camelia rakudo-moar 012450: OUTPUT«===SORRY!=== Error while compiling /tmp/r0jPkZAtiD␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/r0jPkZAtiD:1␤------> $n % $b, &?ROUTINE($n div $b, $b))(8, 2)⏏<EOL>␤ expecting any of…»
grondilu m: say (-> $n, $b { $n < $b ?? $b !! ($n % $b, &?ROUTINE($n div $b, $b)) })(8, 2)
camelia rakudo-moar 012450: OUTPUT«===SORRY!=== Error while compiling /tmp/ArdprDSibu␤Undeclared routine:␤ &?ROUTINE used at line 1␤␤»
00:34 cognome joined
TimToady m: sub infix:<divmod>($numer is copy, @denom) { gather for @denom -> $denom { take $numer % $denom; $numer div= $denom or last } }; say 1234567 divmod (10 xx *) 00:34
camelia rakudo-moar 012450: OUTPUT«7 6 5 4 3 2 1␤»
grondilu always forgot the name for the anonymous recursion
TimToady -> isn't a routine 00:35
grondilu m: say (-> $n, $b { $n < $b ?? $b !! ($n % $b, &?BLOC($n div $b, $b)) })(8, 2)
camelia rakudo-moar 012450: OUTPUT«===SORRY!=== Error while compiling /tmp/Bz_phZDVYh␤Undeclared routine:␤ &?BLOC used at line 1␤␤»
TimToady try sub ($a, $b)
grondilu m: say (sub ($n, $b) { $n < $b ?? $b !! ($n % $b, &?ROUTINE($n div $b, $b)) })(8, 2)
camelia rakudo-moar 012450: OUTPUT«0 0 0 2␤»
grondilu m: say (sub ($n, $b) { $n < $b ?? $n !! ($n % $b, &?ROUTINE($n div $b, $b)) })(8, 2) 00:36
camelia rakudo-moar 012450: OUTPUT«0 0 0 1␤»
grondilu m: say (sub ($n, $b) { $n < $b ?? $n !! ($n % $b, &?ROUTINE($n div $b, $b)) })(1234567, 10) 00:37
camelia rakudo-moar 012450: OUTPUT«7 6 5 4 3 2 1␤»
TimToady that's gotta be pretty slow, but then, so is gather/take 00:38
we don't do tail recursion optimization 00:39
grondilu isn't that a pity?
I remember I've already been explained, but still...
TimToady it's an unnatural act for computers, even if mathematicians like it :)
grondilu would it be possible to allow it when explicitely requested? Like: "use tail-recursion;" 00:40
TimToady probably
grondilu ok. Maybe long term, then. 00:41
TimToady the hardest bit is not the tail recursion itself, but managing everything else around it, like return value construction, and stack frame maintenance if you want your introspection to pretend it really did make N new frames 00:43
another problem is that you're really constructing (7, (6, (5, (4, (3, (2, (1, (0)))))))) there in terms of Parcels, and you're assuming it's all just going to flatten 00:47
m: say (7, (6, (5, (4, (3, (2, (1, (0)))))))).perl
camelia rakudo-moar 012450: OUTPUT«(7, (6, (5, (4, (3, (2, (1, 0)))))))␤»
TimToady m: say (7, (6, (5, (4, (3, (2, (1, (0)))))))).flat.perl 00:48
camelia rakudo-moar 012450: OUTPUT«(7, 6, 5, 4, 3, 2, 1, 0).list␤»
TimToady m: say (7, (6, (5, (4, (3, (2, (1, (0)))))))).tree.perl
camelia rakudo-moar 012450: OUTPUT«(7; 6, (5; 4, (3; 2, (1; 0).item).item).item).item␤»
TimToady hah, that's funny
it lols every other layer
might have to tune that a bit 00:49
m: say (7, (6, (5, (4, (3, (2, (1, (0))))))))[1;1;1;0] 00:50
camelia rakudo-moar 012450: OUTPUT«␤»
TimToady m: say (7, (6, (5, (4, (3, (2, (1, (0))))))))[0]
camelia rakudo-moar 012450: OUTPUT«7␤»
TimToady m: say (7, (6, (5, (4, (3, (2, (1, (0))))))))[1][0] 00:51
camelia rakudo-moar 012450: OUTPUT«6␤»
TimToady m: say (7, (6, (5, (4, (3, (2, (1, (0))))))))[1;0]
camelia rakudo-moar 012450: OUTPUT«␤»
TimToady something wrongish there
00:51 xinming_ joined
TimToady m: say (7, (6, (5, (4, (3, (2, (1, (0)))))))).tree[1;0] 00:51
camelia rakudo-moar 012450: OUTPUT«6␤»
TimToady I guess [1;0] doesn't work on parcels yet
00:51 xinming left
TimToady m: say (7, (6, (5, (4, (3, (2, (1, (0)))))))).tree[1;1;1;0] 00:51
camelia rakudo-moar 012450: OUTPUT«4␤» 00:52
grondilu m: say (sub ($n, $b) { $n < $b ?? $n !! ($n % $b, &?ROUTINE($n div $b, $b)) })(1234567, 10).tree 00:56
camelia rakudo-moar 012450: OUTPUT«7 6 5 4 3 2 1␤»
grondilu m: say (sub ($n, $b) { $n < $b ?? $n !! ($n % $b, &?ROUTINE($n div $b, $b)) })(1234567, 10).perl
camelia rakudo-moar 012450: OUTPUT«(7, (6, (5, (4, (3, (2, 1))))))␤»
grondilu m: say (sub ($n, $b) { $n < $b ?? $n !! ($n % $b, @&?ROUTINE($n div $b, $b)) })(1234567, 10).perl 00:57
camelia rakudo-moar 012450: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤ in sub at /tmp/7FNp1XSdtL:1␤ in block <unit> at /tmp/7FNp1XSdtL:1␤␤»
grondilu m: say (sub ($n, $b) { $n < $b ?? $n !! ($n % $b, @(&?ROUTINE($n div $b, $b))) })(1234567, 10).perl
camelia rakudo-moar 012450: OUTPUT«(7, (6, 5, 4, 3, 2, 1).list)␤»
grondilu hum
m: say (sub ($n, $b) { $n < $b ?? $n !! @($n % $b, @(&?ROUTINE($n div $b, $b))) })(1234567, 10).perl
camelia rakudo-moar 012450: OUTPUT«(7, 6, 5, 4, 3, 2, 1).list␤»
01:05 jack_rabbit_ left 01:12 hagiri joined
TimToady m: say @(1,2).WHAT 01:12
camelia rakudo-moar 012450: OUTPUT«(List)␤»
01:14 FROGGS_ joined
hagiri hi all 01:15
;P
01:17 FROGGS left
timotimo o/ 01:18
i just ruined my first 3d print %)
01:20 kyun joined
timotimo about to ruin my second :) 01:22
TimToady forgot to put a formfeed in there, did you? :P 01:23
kyun Have anybody use perl6 on Windows? 01:25
I compile it faild 01:26
hagiri kyun, ye, download rakudo man
=)
[Coke] blogs.perl.org/users/ovid/2014/08/t...rency.html
01:26 kurahaupo left
[Coke] ovid++ 01:26
hagiri for win no have mystery kyun 01:28
TimToady curtispoe++ in here
hagiri :)
TimToady -> drums &
kyun I followed it but...
[Coke] our primary developer is on windows, so we know it works there for someone. 01:33
What did you download? how did you try to build it? what was the failure?
kyun I use Rakudo, followed the man 01:36
I think that it lack something, 01:37
01:41 kurahaupo joined
zacts wow, you guys have been doing lots of stuff 01:47
01:49 mberends left
[Coke] which rakudo. 01:50
what url did you download from?
what commands did you run?
kyun And rakudo stopped in 2014.04?
[Coke] what output did they generate? (you can use a service like gist.github.com to write down the answers and paste in the commands & output 01:51
kyun: I am guessing that you are referring to the windows MSI?
kyun I want the newest perl6, so I try to build it. 01:52
[Coke] and also that you are refering to Rakudo *, not the compiler-only release.
kyun: please be specific about what you're trying to do.
01:53 hagiri left
kyun Coke: OK 01:53
Follow the rakudo.org/how-to-get-rakudo/ 01:54
[Coke] there hasn't been a rakudo * release in a few months, but we have done monthly compiler-only releases every month.
01:55 firefish5000 left
kyun Now I try to compile rakudo-2014.08 on Windows 01:55
[Coke] you skipped a step.
I assume you clicked on rakudo.org/downloads/star/. ? 01:56
zacts also, is there a Perl6 social semi-offtopic channel?
[Coke] whoops.
kyun No No
[Coke] ok, you went to rakudo.org/downloads/rakudo/
kyun Yes, I have download it 01:57
[Coke] ok. so you grabed the latest release, what command did you try to use to configure/build rakudo?
kyun perl Configure.pl --gen-moar --gen-nqp --backends=jvm,moar 01:58
[Coke] ok. seems reasonable so far. What error did you get during the build? (I assume there's a lot of build output, if you could paste it into gist.github.com and share the URL, that'd help. 02:02
kyun OK, I try to build it again, thank you.
Oh, it need git, and I download 02:05
[Coke] Yes, the compiler doesn't bundle Moar or NQP, and you'll need a command line git available. 02:14
Rakudo * bundles snapshots of everything
Apologies, there are a lot of moving parts the first time you build.
I may drop off soon, but I'm sure someone else will be aroudn to help you if you get stuck again. 02:15
02:16 kaleem joined
kyun Thanks for your help 02:23
02:30 telex left 02:32 telex joined 02:36 noganex_ joined 02:39 noganex left 03:04 ren1us2 left 03:09 BenGoldberg left 03:24 rindolf joined 03:26 akaseki joined 03:52 [Sno] left 03:53 raiph left 04:11 Jerry left 04:16 Jerry joined 04:20 Jerry left 04:47 kaare_ joined 04:53 kaare_ left 04:57 Jerry joined 05:07 ecocode_ joined 05:13 [Sno] joined
kyun gist.github.com/anonymous/9a948de54103acd211b9 Failed while build perl6 05:19
05:26 SamuraiJack joined
TimToady the git clone seems to have failed 05:27
try running the same command again
it acts like your network connection went down in the middle
dalek kudo/nom: 5f583ed | (Rob Hoelz)++ | src/core/Mu.pm:
Include the offending variable name in uninitialized warning
05:34
kudo/nom: 72852f1 | (Rob Hoelz)++ | src/Perl6/ (2 files):
Change =begin END to =begin finish

In accordance with S26
TimToady but in English we say "the beginning of the end", not "the beginning of the finish" :/ 05:36
why did it get changed to "finish"? 05:37
hoelzro TimToady: This commit also renames =END to =finish, because =end would clash 05:39
with the end marker of delimited blocks.
that's masak's excuse from three years ago =)
dalek ast: 7d859d6 | (Rob Hoelz)++ | S0 (3 files):
Rename =begin END to =begin finish
05:42
TimToady but END doesn't clash with end...
and it was to remind people of __END__
05:44 Mrsmoo joined
hoelzro TimToady: I can always revert the changes to nom/roast if you want to change the spec back 05:45
ecocode_ so I played with ovid's post... 05:46
to better understand what happens I added a "say $_", which gives weird results
perl6 -e 'await do for 1 .. 100 { start { say $_; rand.sleep } }'
sometimes I get 2 numbers to be 'glued' together:
47
48
49
50
5152
53
54
51 and 52 are glued 05:47
there's an empty line after 5152, meaning part of say $_ , namely printing \n is done after another promise got finished ?
then after running it few times more I got this error mess:
TimToady the IO isn't always serialized correctly, and there's some kind of race condition between the string and the \n that allows other threads to say something in between 05:48
ecocode_ pastebin.com/hQdqfWNJ
TimToady: is that expected behavior ? 05:49
TimToady I've seen it before; it was supposedly fixed, but isn't right yet
ecocode_ ok 05:50
what about the fatal error (see pastebin)
it happened only once... but it happened 05:51
TimToady dunno, I can't make any sense of it, offhand, because there's no .count at that location in the setting 05:54
05:55 kaare_ joined 05:57 gfldex joined
ecocode_ in that particular case the numbers 1 and 2 where glued together. Might be unrelated to the exception, but I'd say chances are high it is related 05:57
hoelzro TimToady: should we wait until European morning and wait for masak to weigh in about that =finish vs =END thing?
TimToady hoelzro: sure, I'm in no rush, after all, I didn't notice the change for 3 years... 05:58
hoelzro alright, I'll mention it in the morning
05:59 Mrsmoo left
TimToady and =finish makes a little more sense than =begin finish does 05:59
05:59 mrsmoo joined
ecocode_ hmmm... nope not related: pastebin.com/7eRw2Mkg 05:59
TimToady but =coda and =begin coda might make more sense
or some such
and I still think it's special enough to be capitalized, whatever word we end up with, since it's an exception to requiring an =end 06:00
ecocode_ should I file a bug report ? if yes, any link to the perl6 bug tracker ? 06:01
06:01 mrsmoo left
TimToady you can just email to [email@hidden.address] I believe 06:01
masak++ usually just copies in the relevant irc lines 06:02
dalek c: e067745 | (Rob Hoelz)++ | lib/Perl6/TypeGraph/Viz.pm:
Fail hard if we fail to run dot
06:04
grondilu ecocode_: wouldn't it make more sense to add say $_ *after* rand.sleep? 06:07
hoelzro m: my $foo; say "foo = $foo"; 06:09
camelia rakudo-moar 012450: OUTPUT«use of uninitialized value of type Any in string context in block <unit> at /tmp/a5Ke7WSi6t:1␤␤foo = ␤»
hoelzro hmm, it hasn't landed yet 06:10
ecocode_ grondilu: well I wanted to know when the task was started... I could add a message at the end also... 06:11
hoelzro well, I'll check in the US morning
sleep &
TimToady o/
ecocode_ like this: perl6 -e 'await do for 1 .. 20 { start { say "$_.."; rand.sleep; say "$_..done" } }' 06:13
which still glues stuff 06:14
2..done
20..done11..done
14..done
seems that narrows down the exception...
It seems the exception happens when I have >16 concurrent tasks 06:15
TimToady oh, maybe someone hardcode a limit somewhere...
ecocode_ as in pastebin.com/nB5NcmTW
06:15 _thou joined
ecocode_ TimToady: yep, can be 06:16
grondilu concurrent access to IO is a source of troubles anyway. If you want to get start time you could write start { my $start = now; rand.sleep; $start } 06:18
ecocode_ TimToady: seems to be rand related too 06:19
TimToady but there's no way to keep separate say commands from interleaving
ecocode_ this works: perl6 -e 'await do for 1 .. 20 { start { say "$_.."; 3.sleep; say "$_..done" } }'
TimToady oh, maybe something is not threadsafe in rand 06:20
06:20 _thou left
ecocode_ although there's a hang after the 16th process 06:20
06:21 kaleem left
ecocode_ pastebin.com/UaKuYPnY 06:21
grondilu my @rand = rand xx 20; await do for 1 .. 20 { start { say "$_.."; @rand[$_].sleep; say "$_ is done" } } # maybe try this then
06:21 gfldex left
grondilu or rather: 06:22
my @rand = rand xx 20; await do for ^20 { start { say "$_.."; @rand[$_].sleep; say "$_ is done" } }
ecocode_ grondilu: same error when 16 tasks are running concurrently 06:24
otherwise ok
oh gosh :( 06:25
grondilu look at line 16 in src/core/ThreadPoolScheduler.pm
ecocode_ pastebin.com/Gpa4MpSW
grondilu Int :$!max_threads = (%*ENV<RAKUDO_MAX_THREADS> // 16).Int
ecocode_ worse
grondilu ^here's a 16 magic number
so try setting the env variable RAKUDO_MAX_THREADS to say 100 06:26
export RAKUDO_MAX_THREADS=100 on bash for instance
ecocode_ yep, I'll try 06:27
but I was figuring why your code failed that badly after 10 threads
even 9 now
and still, why does it hang when using rand and not when using a fixed number ? 06:28
grondilu has no idea
ecocode_ uhoh ! got the exception with a fixed number now !
pastebin.com/p1MV67GR
so the exception ALWAYS happens after 16 threads, but >16 threads not always gives the exception 06:29
and 'export RAKUDO_MAX_THREADS=100' has no effect 06:30
grondilu what's your shell? 06:31
06:31 kurahaupo left
grondilu (assuming your on unix/linux that is) 06:32
ecocode_ macosx bash
the max concurrent threads stays on 16, but I have no exceptions anymore (for the moment)
oops... got one :) 06:33
so RAKUDO_MAX_THREADS has no effect at all
06:33 anaeem1 joined
grondilu it may be taken into account only while compiling CORE.setting. Not sure. 06:34
I mean (%*ENV<RAKUDO_MAX_THREADS> // 16).Int is the default value for a parameter argument. Does that get frozen after compilation? 06:35
06:35 _sri joined
grondilu suspects it does 06:36
so you may have to recompile with RAKUDO_MAX_THREADS set to a bigger value. But that'd be weird. 06:37
ecocode_ indeed...
also that would only bring the limit higher before getting the exception
that doesn't help
grondilu yeah but at least we'd get closer to understanding the issue 06:38
06:40 awwaiid left
ecocode_ also, if the exception occurs, it occurs after the 16th task. once it passed that one it won't occur even with 06:40
perl6 -e 'await do for 1 .. 1000 { start { say "$_.."; 1.sleep; say "$_..done" } }'
06:41 awwaiid joined
ecocode_ building perl6 with RAKUDO_MAX_THREADS=1000 06:42
ayé 06:44
pastebin.com/vha6QyiV
even fails with 100 06:50
only compiles when RAKUDO_MAX_THREADS is not set
06:51 Jerry left
lizmat ecocode_ grondilu o/ 06:51
sergot hi o/
lizmat I found this problem already months ago, and there is actually a skipped test in roast for this 06:52
from what I remember discussing this with jnthn++ , is that there is some type of memory corruption going on when the crash occurs 06:53
which seems to be hard to track
ecocode_ which problem ? failing to build with RAKUDO_MAX_THREADS=100 or the random exception when reaching 16 threads
lizmat random exception
ecocode_ ok
lizmat it's still on jnthn's radar 06:54
ecocode_ is that only on moar ? or also jvm ?
lizmat but there are other, more pressing issues that would probably need to be fixed first
afaik, this is only on Moar
ecocode_ ok, I'll switch to jvm then 06:55
lizmat fwiw, this *could* be a problem in the underlying libuv, for all we know
ecocode_ RAKUDO_MAX_THREADS=20 also fails build moar
lizmat not sure what you mean there 06:56
ecocode_ rakudobrew build moar fails when environment var is set to 20 06:58
pastebin.com/vha6QyiV
without setting RAKUDO_MAX_THREADS it builds ok 06:59
TimToady maybe there's a reason it was set to 16 07:00
but surely you can have more start blocks than worker threads... 07:02
lizmat indeed...
BTW, confirm that segfault on make install on OS X is gone !
ecocode_ yep saw that :) 07:03
and rakudobrew++ !
07:04 rindolf left
ecocode_ the glue-stuff mentioned above apso happens on jvm backend 07:04
07:04 rindolf joined
ecocode_ but it seems the exception doesn't happen 07:05
lizmat afk for a bit& 07:07
07:11 kjs_ joined
ecocode_ seems RAKUDO_MAX_THREADS has no impact on compilation for jvm 07:12
kyun probing whether your compiler thinks that it is gcc Can't compile simple gc 07:13
c probe, so something is badly wrong at build/probe.pm line 92.
ecocode_ hmmm got an exception on jvm 07:14
perl6 -e 'await do for 1 .. 200 { start { say "$_.."; 2.sleep; say "$_..done" } }'
pastebin.com/jVytVLFW 07:15
is there any way to keep track of how many start blocks are running ? 07:16
(in Perl6) 07:17
07:19 Ovid joined 07:20 Ovid is now known as Guest34380, curtispoe left 07:21 zakharyas joined 07:25 FROGGS_ is now known as FROGGS
FROGGS morning 07:25
nwc10 agree!
07:29 kaleem joined 07:35 rindolf left, rindolf joined
lizmat so, it might be easier for him to just take a train to e.g. Bremen, and then take the ICE down to Munich 07:43
or something like that
nwc10 wrong window! :-) 07:44
lizmat oops
hehe
nwc10 if you've going to leak stuff, please leak *interesting* stuff :-)
ecocode_ how come perl6 can have more start blocks running than threads ?
07:44 brrt joined
brrt o/ 07:44
lizmat hehe hi brrt
ecocode_ perl6 -e 'my $runners=0;await do for 1 .. 2000 { start { $runners++; (0.2).sleep; $runners--; say "running: $runners finished: $_" } }'
brrt uhm, TimToady here? or anyone who can answer questions wrt to the correct behavior of integer-division-by-zero? 07:45
lizmat ecocode_: that code has race conditions
07:45 darutoko joined
ecocode_ uh ? 07:45
brrt also, i'm all pro divmod 07:46
ecocode_ any doc explaining that ?
lizmat if you're trying to update a scalar from multiple threads
especially ++
brrt except i want the round-towards-negative-infinity thingy specced out
lizmat or --
ecocode_ ok. so how should that be done ?
lizmat since ++ and -- are not atomic (yet anyway, they might be for natives in the future) 07:47
ecocode_ is there some locking on scallars ?
lizmat you may miss an update
no, there is no locking
ecocode_ so how can I keep track of runners ? 07:48
lizmat you are encouraged to use the other primitives that S17 provides for your "shared" variable updates
ecocode_ S17 ?
lizmat S17:01
synopsebot Link: perlcabal.org/syn/S17.html#line_01
ecocode_ ok thanks ! some reading required :) 07:49
lizmat you could e.g. start a supply that has an .act on it that either does the ++ or the --
the .act will make sure that there is only one thread doing any update at a time 07:50
brrt m: nqp::div_i(4, 0); 07:54
camelia rakudo-moar 72852f: OUTPUT«Division by zero␤ in block <unit> at /tmp/F2WTyA89WL:1␤␤»
brrt p6: nqp::div_i(4, 0)
r: nqp::div_i(4,0)
camelia rakudo-jvm 72852f: OUTPUT«(timeout)»
..rakudo-moar 72852f: OUTPUT«Division by zero␤ in block <unit> at /tmp/tmpfile:1␤␤»
..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤ at /tmp/tmpfile line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CO…»
..rakudo-parrot 72852f: OUTPUT«(signal )»
rakudo-moar 72852f: OUTPUT«Division by zero␤ in block <unit> at /tmp/tmpfile:1␤␤»
..rakudo-parrot 72852f: OUTPUT«(signal )»
..rakudo-jvm 72852f: OUTPUT«java.lang.ArithmeticException: / by zero␤ in block <unit> at /tmp/tmpfile:1␤␤»
grondilu brrt: division by zero is normalized in en.wikipedia.org/wiki/IEEE_754
lizmat ecocode_: for instance: 07:55
m: my $r=0; my $s=Supply.new; $s.act: { $_ ?? $r++ !! $r--; say "r = $r" }; await do for ^10 { start { $s.more(1); rand.sleep; say "j = $_"; $s.more(0) } }
camelia rakudo-moar 72852f: OUTPUT«r = 1␤r = 2␤r = 3␤r = 4␤r = 5␤r = 6␤r = 7␤r = 8␤r = 9␤r = 10␤j = 8␤r = 9␤j = 7␤r = 8␤j = 3␤r = 7␤j = 4␤j = 2␤r = 6␤r = 5␤j = 5␤r = 4␤j = 0␤r = 3␤j = 9␤r = 2␤j = 6␤r = 1␤j = 1␤r = 0␤»
brrt grondilu: is that valid for integer division as well? 07:56
lizmat ecocode_: if I run the above code with ^1000, it does *not* crash 07:57
brrt not really in a great position to lead long documentation since $dayjob :-(
lizmat which implies to me that somehow the simple act of $r++ not being atomic, is what's causing the segv 07:58
jnthn: ^^^
07:58 rindolf left, rindolf joined 07:59 grondilu left 08:00 grondilu joined
ecocode_ lizmat: this just hanged 08:01
perl6 -e 'my $r=0; my $s=Supply.new; $s.act: { $_ ?? $r++ !! $r--; say "# running = $r" }; await do for ^1000 { start { say "started $_"; $s.more(1); rand.sleep; say "finished $_"; $s.more(0) } }'
Unhandled exception: When invoking more, Provided outer frame 0x7f8104c36d80 (MVMStaticFrame tappers) does not match expected static frame type 0x7f8104c35dc0 (MVMStaticFrame )
lizmat aha... intriguing...
I'm going to run it a few more times to see if it breaks for me as well 08:02
ecocode_ well I got no #running output for a while and still start blocks launched
08:03 _thou joined
lizmat do you have jit enabled? 08:04
08:04 kjs_ left
ecocode_ this might help : pastebin.com/13jqpQuJ 08:05
on moar
jit enabled ? how should I do that ?
just rakudobrew moar-vm
lizmat hmmm... not sure with rakudobrew 08:06
the extra parameter for the config should be: --moar-option=--enable-jit
FROGGS does the behaviour change when you run it under MVM_JIT_DISABLE=1? 08:07
or MVM_SPESH_DISABLE=1 or MVM_SPESH_INLINE_DISABLE=1
I hope I wrote it correctly
also: MVM_SPESH_OSR_DISABLE=1 08:08
ecocode_ well, I cannot reproduce it even without it
08:08 _thou left
FROGGS hmmmm :/ 08:08
brrt thinks we need to fix a few more bugs before we'll enable jit by default 08:09
although when we'd get more in-the-wild testing, that'd be great
ecocode_ aaah got it again !
brrt that sounds racy
or garbage-collector-problemy
although the latter have been pretty reliable for me, when i've had them 08:10
FROGGS brrt: I also think that we should enable risky features for HEAD, but not for a releases...
brrt yeah... but at some point you have to bite the bullet or not? 08:11
ecocode_ seems that it doesn't occur with MVM_JIT_DISABLE=1
brrt \o/
great
please report a bug :-) 08:12
ecocode_ maybe that should be disabled in rakudobrew
brrt hmm
if you did that, i could never find the bugs
lizmat hmmm.. pretty sure that rakudobrew doesn't enable JIT
by default
brrt ecocode_: can you set something like MVM_JIT_LOG=a-file.txt and run it again
if a-file.txt actually contains text, you have JIT, otherwise, not 08:13
but that's the tradeoff between convenience / safety / reliablitly for users and for convenience / test coverage for developers
i.e. it be ideal for me if everybody just booted directly into moarvm-with-jit on startup (since that would catch the greatest amount of usage) but that's not particularly ideal for users 08:14
grondilu perl6 --version should tell whether or not JIT is enable
(imho) 08:15
ecocode_ hmmm I don't have jit then
and pretty awkward I cannot produce the exception again
grondilu I have been configuring with --moar-option=--enable-jit and yet I have the feeling there's no JIT 08:16
(because I don't see much performance improvement whatsoever)
ecocode_ This is perl6 version 2014.08-128-g72852f1 built on MoarVM version 2014.08-36-g7938703 08:17
brrt uhm, that should say 'on MoarVM version .... with JIT enabled' i think 08:18
although i wasn't involved with that
ecocode_ oh .. segfault !
perl6: line 2: 52428 Segmentation fault: 11 /Users/ec/.rakudobrew/moar-HEAD/install/bin/perl6 "$@"
camelia niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Invocant handling is NYI at /tmp/tmpfile line 1:␤------> line 2: 52428 ⏏Segmentation fault: 11 /Users/ec/.rakud␤␤Confused at /tmp/tmpfile line 1:␤------> line 2: 52428 ⏏[31…»
..rakudo-{parrot,jvm,moar} 72852f: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> line 2⏏: 52428 Segmentation fault: 11 /Users/e␤ expecting any of:␤ postfix␤ infix…»
brrt lol 08:19
lizmat $ perl6 --version
This is perl6 version 2014.08-128-g72852f1 built on MoarVM version 2014.08-36-g7938703
ecocode_ \o/
08:19 mr-foobar left
brrt hmmm 08:19
lizmat: you do have JIT don't you?
lizmat I *do* have jit, as checked with MVM_JIT_LOG
08:19 mr-foobar joined
nwc10 $ ./perl6-m --version 08:19
This is perl6 version 2014.08-128-g72852f1 built on MoarVM version 2014.08-44-g5b574f8
$ /home/nicholas/Sandpit/moar-san-jit/bin/moar --version
This is MoarVM version 2014.08-44-g5b574f8 built with JIT support
ecocode_ happened on this:
perl6 -e 'my $r=0; my $s=Supply.new; $s.act: { $_ ?? $r++ !! $r--; say "# running = $r" }; await do for ^200 { start { say "started $_"; $s.more(1); (.1).sleep; say "finished $_"; $s.more(0) } }' 08:20
nwc10 so, currently, perl6-m --version doesn't say anything about JIT
lizmat nwc10: are you on --gen-moar=master ?
brrt we should fix that, though
ecocode_ that line generates exceptions allmost all of the time 08:21
nwc10 no, I'm building MoarVM separately
perl Configure.pl --backends=moar --prefix=/home/nicholas/Sandpit/moar-san-jit
lizmat ecocode_: haven't seen a single crash yet :-( 08:22
ecocode_ even on jvm 08:23
brrt nwc10: does the --asan flag work for you today?
ecocode_ lizmat: pffff :/
nwc10 it seems to
ecocode_ why O why does it happen only to me ?
lizmat what does perl6 --version say for you? 08:24
ecocode_ on jvm: pastebin.com/mYnfi96Q
lizmat: same as yours on moar
and this for jvm: This is perl6 version 2014.08-128-g72852f1 built on JVM 08:25
I'm doomed
lizmat ok, that paste may be useful for jnthn, please keep it around for a bit
I'll be away for the next ~2 hours...
hope someone else will be able to pick this up 08:26
ecocode_ well, it's on pastebin :)
08:27 rindolf left 08:28 rindolf joined
lizmat finally got one to crash, without any sleep at all 08:28
Unhandled exception: When invoking is_bindable, Provided outer frame 0x7fd54a27eae0 (MVMStaticFrame bind_one_param) does not match expected static frame type 0x7fd54a27e8a0 (MVMStaticFrame )
afk& 08:29
08:30 anaeem1 left 08:31 anaeem1_ joined, kjs_ joined, kurahaupo joined, dakkar joined 08:36 brrt left
grondilu cleaned his nqp/MoarVM and now recompiles with --enable-jit 08:38
08:41 JimmyZ joined, brrt joined 08:44 molaf__ left 08:54 xinming joined
brrt where are the arithmetic operations specced? 08:54
08:55 molaf joined, integral joined, integral left, integral joined
JimmyZ brrt: github.com/perl6/specs/blob/ed80b3...rators.pod 08:56
08:56 xinming_ left, donaldh joined
brrt tnx 08:57
08:57 mrf_ joined 08:59 rindolf left, fhelmberger joined, rindolf joined
nine zacts: yes, we started on that: github.com/niner/Inline-Perl5 But mind that it is just a couple of days old right now. 09:03
09:05 molaf left
nine ecocode_: WRT your glueing problem with threads: I really can't see anything wrong with that. That's exactly the kind of behaviour you have to expect with threads. To prevent that you'd have to synchronize your output. 09:05
09:08 SamuraiJack left
ecocode_ lizmat: yep, jvm crashed without sleep also 09:18
09:19 salv0 joined
ecocode_ nine: well, if this is expected behavior, is there a way to mark a block inside a start block as "unbrakable" ? 09:20
lizmat: on moar the error is not always the same 09:21
I got this now: Unhandled exception: When invoking bind... 09:22
then this: Unhandled exception: When invoking infinite
and even a Segmentation fault
09:25 pecastro joined
nine ecocode_: I'm not really familiar with Perl 6's concurrency primitives yet. I'd guess you want to use a Supply or Channel for serializing your output. 09:26
09:26 JimmyZ_ joined 09:28 JimmyZ left, JimmyZ_ is now known as JimmyZ 09:29 pecastro left, pecastro joined 09:32 JimmyZ left 09:33 molaf joined 09:37 rindolf left, rindolf joined 09:40 zakharyas left
Timbus ecocode_, the 'simple', dumb way to do it is to use a lock, i guess. 09:42
donaldh Perl6 concurrency is all about avoiding locks in user code though. 09:44
brrt i'd argue that fixing-concurrency-bug is also high-priority for next hackathons :-) 09:45
09:52 _thou joined 09:56 _thou left 09:57 kjs_ left
ecocode_ I guess I can circumvent lock for my app... just use print "..\n" instead of say "..." solves the issue :) 10:00
10:01 kjs_ joined 10:06 c1sung joined 10:14 rindolf left, rindolf joined 10:20 kyun left 10:21 anaeem1_ left 10:22 kjs_ left 10:23 anaeem1_ joined 10:24 zakharyas joined 10:34 mrf_ left
Ulti ecocode_ you could create a channel and have a promise consume and print from that channel and everything else write to that channel 10:37
that way only one thread is doing the IO safely
jnthn notes that Moar and JVM take care to lock while messing with handles down at the VM level, so that shouldn't be a source of issues. 10:39
The easiest way to shove work somewhere asynchronously and make sure the worker is only doing one thing at a time ain't a Channel, it's a Supply
my $output = Supply.new; $output.act(-> $value { ...do whatever thing you need with $value... }); # and pass $output where needed 10:40
And act ensures only one thread is ever in tha tblock
*that
Ulti when would you use a channel over a supply? 10:41
jnthn This solution also performs better (thanks to greatly better thread affinity) than Channel will.
Ulti: When you actually want a thread to efficiently block waiting for something.
Ulti: Most common example is a set of stages with queues between them. 10:42
ecocode_ so the block in act can only run on a specific thread, even in different calls ? 10:43
jnthn ecocode_: It can run on any thread, but only one at a time.
10:43 salv0 left
jnthn ecocode_: That is, you can never have two different threads in the block passed to act at the same time. 10:44
ecocode_ got it ! thx
10:47 rindolf left, rindolf joined 10:50 kjs_ joined 10:51 salv0 joined
Ulti I'll have to play with my implementation which is currently using a channel then ;P 10:51
10:54 nbrown_ joined, beastd joined
timotimo oh my. 10:57
perl6 --version won't say "built with jit"
moar --version will, however
masak re `=begin finish`, I made the commit but not the decision. this happened in a discussion between tadzik, TheDamian, me, and possibly more people as part of YAPC::EU 2011 (I think it was). 11:00
I don't remember what went into the decision at this point. though I do remember both END and end being considered as alternatives.
timotimo we might want to point out rakudobrew on rakudo.org's "how to get rakudo" page 11:01
masak +1 11:04
no consensus on *..* yet? 11:15
I still vote for allowing it, by the way. I haven't found good reasons to disallow *..* but allow *..0 and -Inf..Inf. 11:16
timotimo something i would really like to have pointed out to people who look at our benchmarks:
lizmat masak: +1
timotimo our Rat classes are implemented in Perl 6 itself and they are *still* outperforming perl5's FatRat implementation by a large margin
so even if they were offered as some kind of module through CPAN, they'd have fantastic performance 11:17
lizmat timotimo: that's mostly because FatRat in P5 uses tie()
timotimo is that a correct assumption?
lizmat and tie() is notoriously slow on P5
timotimo oh
why is that necessary?
masak colomon: I saw your reasoning at irclog.perlgeek.de/perl6/2014-08-27#i_9250329 much later than you posted it -- sorry about that.
lizmat timotimo: otherwise you would not be able to use them as "normal" variables 11:18
11:18 rindolf left
timotimo oh my. 11:18
masak colomon: I disagree with points 3 and 3.1 -- there's no confusion at all, *especially* when you consider that some ranges might be created programmatically rather than being literals.
lizmat the same performance issue exists with shared variables in ithreads
11:18 rindolf joined
timotimo they automatically get locks created for them? 11:18
lizmat in ithreads, shared variables are simply tied to some logic that will read/write the values in a hidden thread 11:19
masak colomon: I disagree with 3.2 as well. provided we stick to our guns with Inf being polytypic, then *..* has no less problems than -Inf..Inf in that regard.
lizmat there's *nothing* shared about shared variables in Perl 5
timotimo ah
lizmat timotimo: yes
masak the argument "you can still pass -Inf..Inf" speaks in favor of allowing *..* (with the same meaning) rather than disallowing it, IMO. 11:20
timotimo ok, not quite "locks created for them", more like "accesses are serialized to a single thread"
lizmat masak: +1
brrt cannot find any reference to rounding to negative infinity
lizmat timotimo: as are the updates :-)
brrt wrt integer division
masak would still like to hear opinions of TimToady or pmichaud about *..*
brrt which means integer division can be cheaper
timotimo lizmat: right, both read and write accesses 11:21
lizmat still think we need some sugar for the my $s=Supply.new; $s.act( { ...} ) pattern for serializing access 11:22
timotimo lizmat: every single thing i hear about ithread sounds like you can't get happy with ithreads 11:23
lizmat indeed, that's why I wrote forks.pm :-)
timotimo did anybody already step up to write sporks.pm? :)
lizmat e.g. if you load Moose in P5, starting a thread will suddently cost you .5 second, instead of the 0.05 second without 11:24
why? Because starting an ithread means copying over *all* P5 data structures to the new thread
timotimo right
lizmat and Moose and its dependencies have quite a few
the irony of forks.pm was 11:25
that the ithreads implementation of P5 uses code that was originally written to emulate fork() on Windows
timotimo ah, yeah, forking on windows
jnthn lizmat: Please stop trying to put sugar for everything into the core language.
lizmat: We should have *primitives* there. 11:26
Otherwise we get a 50,000 line CORE.setting.
timotimo what is that a reference to?
jnthn Seeing my talk and wanting to stick some throttling scheme into the core, when it bbelongs in a module, for one... 11:27
timotimo ah, yes, that's module space
jnthn And "still think we need some sugar for the my $s=Supply.new; $s.act( { ...} ) pattern"
That's called an Actors module. :)
timotimo mhm 11:28
(my Supply $s .= new).act: { ... }
sugary enough for me
jnthn The idea of what's in core is to make sure we have common mechanisms so different modules can do their concurrency in a composable way. 11:29
lizmat jnthn: if you're really that worried about the size of the core setting
why don't we get rid of Sets/Bags/Mixes?
masak m: sub nth { $^n ~ (<. st nd rd>[$n] // "th") }; for <. 220 153 128 268 273 147 172 190>.kv -> $m, $c { next unless $m; say "$c Rakudo commits in the {nth $m} month", (Date.today.month == $m ?? " (so far)" !! "") }
camelia rakudo-moar 72852f: OUTPUT«220 Rakudo commits in the 1st month␤153 Rakudo commits in the 2nd month␤128 Rakudo commits in the 3rd month␤268 Rakudo commits in the 4th month␤273 Rakudo commits in the 5th month␤147 Rakudo commits in the 6th month␤172 Rakudo commits in the 7t…»
lizmat they're not used in the core, and could live without *any* problem in a Set module
masak dang, it cut off at July. 11:30
m: sub nth { $^n ~ (<. st nd rd>[$n] // "th") }; for <. 220 153 128 268 273 147 172 190>.kv -> $m, $c { next unless $m; say "$c commits in the {nth $m} month", (Date.today.month == $m ?? " (so far)" !! "") }
camelia rakudo-moar 72852f: OUTPUT«220 commits in the 1st month␤153 commits in the 2nd month␤128 commits in the 3rd month␤268 commits in the 4th month␤273 commits in the 5th month␤147 commits in the 6th month␤172 commits in the 7th month␤190 commits in the 8th month (so far)␤»
jnthn lizmat: I just think these things belong more in module space, not in CORE.
lizmat If Sets had been out of the core, we would have had the empty set symbol months ago already 11:31
29 occurrences of "sugar" in the specs
masak sweet spec.
m: sub nth { $^n ~ (<. st nd rd>[$n] // "th") }; for <. 220 153 128 268 273 147 172 190>.kv -> $m, $c { next unless $m; say "$c Rakudo commits in the {nth $m} month", ~(" (so far)" if Date.today.month == $m) } 11:32
camelia rakudo-moar 72852f: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/RMubO7wmwP:1␤␤220 Rakudo commits in the 1st month␤use of uninitialized value of type Nil in string context in block <unit> at /tmp/RMubO7wmwP:1␤␤153 Rakudo commits…»
masak huh, I don't get that warning locally.
lizmat jnthn: I disagree with you on S17 sugaring
brrt is just going to bug TimToady about the spec change :-) 11:33
lizmat it's going to be hard enough to prevent people from creating race conditions (like ecocode_ did earlier today)
and we're going to need all the sugar we can get to make it easy for people to program asynchronously
11:33 Possum left
jnthn lizmat: Sets could be argued to be a core data structure that there's little desire to implement differently. Not to mention that we've got a good understanding today of what sets are and plenty of successful implementations to look at. 11:33
lizmat if size of setting is really the issue, then I would vote to expel Set/Bag/Mixes out of the core 11:34
jnthn lizmat: The concurrency space is still evolving *fast*.
lizmat: We should be extremely careful what we pick to put in CORE, 'cus once it's in there it will be a nightmare to get it out again in the long run.
lizmat I'm familiar with the concept :-) 11:35
jnthn lizmat: Also there will be common areas where the async problems look fairly similar.
lizmat fortunately, we're a little better positioned to deprecate stuff
jnthn lizmat: And I think those can be dealt with by domain specific modules better than with generic sugar.
brrt what is a Mix?
lizmat it's a Bag of floats 11:36
brrt why is that different?
masak brrt: "Unordered collection of values with weights"
brrt right
masak "Bag of floats" sounds like it's the keys that are floats.
jnthn lizmat: I'm open to looking at concrete suggetions, but I'd rather we encourage prototyping of sugar for conc stuff in module space first.
lizmat Bags only have natural values 11:37
arnsholt masak: Also known as a probability distribution?
lizmat so my proposal for :max and :id for start {} is a no go, as far as you're concerned ?
11:37 Possum joined
lizmat specs 6989f5a79880e37851d0a7a6178e9ba2902c51cc 11:38
jnthn lizmat: I think I could be persuaded we want some kind of throttling functionality in CORE, but I do think Promise.start is the wrong hook.
masak arnsholt: well, except there's no ∑=1 restriction, I guess.
jnthn lizmat: Notice that it fails to handle my second scenario, with processes...
lizmat looks again
jnthn lizmat: Some kind of scheduler wrapper is likely better 11:39
lizmat: Since it's a scheduling problem rather than a Promise-specific one...
Or start-specific.
Time for dinner :)
bbl
brrt nom well
my 2c: i can argue for having throttling 'supported' out of the box, it's easy to get wrong 11:40
11:40 _thou joined
brrt and... it seems very important to have, too 11:40
11:44 Jerry__ joined
dalek ecs: b8eaa8a | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Revert "Add :max :id to start { }"

This reverts commit 6989f5a79880e37851d0a7a6178e9ba2902c51cc.
11:44
11:44 _thou left 11:48 Jerry__ left
lizmat errands& 11:48
11:48 Jerry__ joined 12:02 spider-mario joined 12:13 breinbaas joined 12:16 kjs_ left 12:24 kjs_ joined 12:25 rindolf left, rindolf joined 12:31 brrt left
hoelzro morning #perl6 12:35
colomon \o
hoelzro I found a fun behavior last night: 12:41
m: 'pod' ~~ /'pod' $*/
camelia rakudo-moar 72852f: OUTPUT«(signal )»
hoelzro this is essentially what causes '=begin title' to never finish parsing 12:42
12:43 SamuraiJack joined 12:48 telex left
hoelzro also, what determines which roast tests make it into t/spectest.data? I noticed t/spec/S04-phasers/exit-in-check.t is failing, and isn't being run 12:48
timotimo right, we're missing a few sadly
and i don't know why
12:50 telex joined 13:01 clkao left
colomon generally, they're not in there if they seriously didn't work at some point. or perhaps if the test itself is considered questionable due to spec changes / underspeccing / whatever. 13:05
though I suppose it's possible that one was disabled during one of the complete Rakudo overhauls and no one ever thought to add it back in. 13:06
13:10 Alina-malina left
timotimo .o( 100 TODOs marked "nom regression" ) 13:11
13:13 Alina-malina joined
hoelzro o_O 13:15
commute &
13:16 isBEKaml joined 13:17 isBEKaml left 13:18 brrt joined 13:19 kaare_ left 13:23 guru joined, guru is now known as Guest19296 13:24 Guest19296 is now known as ajr_ 13:29 _thou joined 13:33 _thou left 13:40 raiph joined, MilkmanDan left 13:44 MilkmanDan joined 13:47 kaleem left
Ulti what is the disadvantage of something not being in CORE? 13:51
13:52 kjs_ left 13:53 kjs_ joined, Woodi joined
tadzik people have to install it themselves 13:53
Ulti but its part of the language spec that primitives like Bag and Set exist... 13:55
lizmat but they're completely implemented in Perl 6, *and* they're not referenced inside the core itself afaik 14:00
so they *can* be expelled quite easily
14:00 _thou joined
lizmat and needing to do a 'use Set' would not hurt much, I would think 14:01
I mean, we do the same for 'use Test'
and that is *also* part of the standard distribution, although not part of the core setting
colomon I think TimToady's idea has been to err on the side of including things in the core. So that the core langauge has a very rich set of tools available.
brrt uhm, it seems that moving from core to standard module is sane enough
however, python does have set() as a core type 14:02
perl5 doesn't exactly have the kitchen sink in it's core functions and that works out quite well
ecocode_ lizmat: do you mean the code which also failed @ your system has a race condition ? or are you referring to my first trials which indeed had a race condition ? 14:03
lizmat colomon: that's not the vibe I've been getting recently
ecocode_: it also failed when I didn't put any sleep in it 14:04
colomon lizmat: yes, well, you have to stop somewhere. ;)
14:05 SamuraiJack left
ecocode_ lizmat: yep I've read that. and it also crashes on jvm without the sleep 14:05
lizmat away again&
Ulti lizmat I dunno, I've been using bags a lot but if I needed to use one in full flow I would write my %bag; @list.map({%bag{$_}++}) than include use Bag and then put my %bag = bag @list I guess if I wanted the additional functionality I would bother >:3 14:12
maybe I am being baggist and should maybe use them a little less anyway 14:13
but for calculating stats they are really useful
Ulti job is mostly counting beans 14:14
timotimo java beans?
donaldh literally?
Ulti genomic beans
protein domains really, but they are just a special kind of magic bean that needs counting 14:15
brrt Ulti is Baggins
colomon I've been using Set and Bag quite a lot in my code, too.
though just earlier this week I discovered what a nice performance gain I could get in one script by rewriting one beautiful line of set operations into 10+ ugly lines of hash manipulation in loops. 14:16
Ulti yeah :(
timotimo :(
i don't think we have any benchmarks for set operations
colomon: do you still have the pre-rewrite code? 14:17
colomon timotimo: sure
colomon believes strongly in version control
timotimo it might be very interesting to see the --profile and have a stab at benchmarkifying it
Ulti I have been more of the opinion of keeping things how I want them and feeling entitled to have that be fast eventually ;) 14:18
colomon timotimo: ($model.keys (-) $current.keys, $current.keys (-) $model.keys, $current.keys (&) $model.keys)
is the key line.
timotimo and the .keys are probably returning lists, right?
colomon actually, I left it in as a comment so I'd know what the heck the sub was actually doing
Ulti that is so much nicer to look at than tonnes of loops and hash playing
colomon timotimo: yes, $model and $current are hashes
Ulti colomon yeah once you are using actual code as the comment to other code... ;___; 14:19
timotimo right. so we're doing hash -> list -> set three times for $model and $current
colomon timotimo: yes
timotimo have you tried building the sets only once up front instead? 14:20
colomon timotimo: though I suspect (possibly wrongly) that the actual set operations are what's slow there.
Ulti colomon: yeah my code thats slow spends all its time initialising lists endlessly
colomon timotimo: … I can't tackle this right this instant, but I'll see what I can do to do a full set of profiles later this morning. 14:21
timotimo that's fine, no hurry :)
Ulti now there is a profiler! jnthn++
timotimo quite sadly, "common sub-expression elimination" would probably not have enough info to move the set constructions up front 14:22
Ulti does .keys not cache the result? 14:23
timotimo maybe we can do a better job at hash.keys.Set by mixing in a custom .Set into the list returned by keys that gets invalidated as soon as you change the list
jnthn pulls latest stuff and sees if he can get a patch in before sleeping... 14:24
Ulti though I guess having something thread safe that understands if something mutable became tainted between you doing set operations becomes scary complex quickly 14:26
timotimo yes, i'm scared of that, too 14:27
Ulti plus thats the whole point of immutable types being in the language o___O
timotimo aye
so ... hash.keys.Set will end up calling Set.new-fp(self.list) on the .keys 14:28
that's not too, too bad
new-fp will do a given/when to determine if something is a Pair or not before pushing the things in 14:29
lizmat just looked at the Set.pm code and realised it doesn't make much sense to cache pairs for Sets 14:30
timotimo that ought to be efficient
lizmat is now rewriting it to have .keys cached instead
timotimo that doesn't sound bad 14:31
i mean ... the proposed fix
the (-) operator already helpfully uses the "view" adverb on the set and bag coercers 14:34
as does (&)
lizmat yeah, I tried to do some optimizations already 14:35
timotimo lizmat++ 14:36
14:38 woolfy joined, avs_ left
hoelzro m: my $foo; say "foo = $foo" 14:39
camelia rakudo-moar 72852f: OUTPUT«use of uninitialized value $foo of type Any in string context in block <unit> at /tmp/8KTp_JBvSb:1␤␤foo = ␤»
hoelzro awesome, that patch is in the evalbot now 14:40
timotimo very cute
lizmat hoelzro++
so, how do I put a list of values into an array and make them read-only
hoelzro that drove me nuts comings from Perl 5, not knowing *what* was uninitialized
14:41 ecocode_ left
timotimo use an array rather than a list, so it won't have containers? 14:41
or a parcel
14:43 SamuraiJack joined
hoelzro what's the difference between Stringy and Str? 14:44
masak m: say //
camelia rakudo-moar 72852f: OUTPUT«===SORRY!=== Error while compiling /tmp/7MnfDZp6XV␤Null regex not allowed␤at /tmp/7MnfDZp6XV:1␤------> say //⏏<EOL>␤»
14:44 treehug88 joined
masak m: my $foo = ""; say / <$foo> / 14:44
camelia rakudo-moar 72852f: OUTPUT«␤»
masak shouldn't the latter one also error with "Null regex not allowed"?
hoelzro: all(Str, Cat) ~~ Stringy 14:45
timotimo Blob or Buf or something is Stringy, too, no?
m: say Blob ~~ Stringy
camelia rakudo-moar 72852f: OUTPUT«True␤»
timotimo m: say Buf ~~ Stringy
hoelzro so .Stringy creates a Stringy, and .Str creates a Str, then
camelia rakudo-moar 72852f: OUTPUT«True␤»
masak hoelzro: there are no Stringy instances, so it tries to coerce to a type which does Stringy.
m: say "foo".Stringy.^name 14:46
camelia rakudo-moar 72852f: OUTPUT«Str␤»
masak m: say 42.Stringy.^name
camelia rakudo-moar 72852f: OUTPUT«Str␤»
hoelzro ah ha
timotimo do we still have the sillyness that Buf (or Blob?) will infinitely loop .Stringy on itself when we try to ~ it to something? 14:48
14:48 Jerry__ left
psch S05:2729 14:49
synopsebot Link: perlcabal.org/syn/S05.html#line_2729
psch masak: ^^^
psch goes back to packing
14:49 raiph left
hoelzro I ask because code that wants to override behavior for stringification of uninit'd values will no longer be able to just override .Str =/ 14:49
due to my patch
14:50 rindolf left
hoelzro it would also be nice to get my change working for "self = {self}", but I don't know if self is a container or not 14:50
14:50 rindolf joined
timotimo you can't nqp::iscont in that case? 14:51
i think self is always decont'd for you
hoelzro that would make sense 14:52
I don't know if my Rakudo fu .oO( Ra-fu-do? ) is strong enough to pull that off
but it's a start
timotimo what happens if you annotate the invocant parameter of a method with "is rw"?
hoelzro hmm 14:53
hoelzro tries
timotimo m: class Test { method doit($foo is rw:) { say nqp::iscont(self); say nqp::iscont($foo) } }; Foo.new.doit;
camelia rakudo-moar 72852f: OUTPUT«===SORRY!=== Error while compiling /tmp/8LPpAFEAo_␤Undeclared name:␤ Foo used at line 1␤␤»
timotimo m: class Test { method doit($foo is rw:) { say nqp::iscont(self); say nqp::iscont($foo) } }; Test.new.doit;
camelia rakudo-moar 72852f: OUTPUT«0␤0␤»
timotimo apparently not
hoelzro =/
masak psch: my first instinct was to disagree, as the example doesn't seem to be about that kind of case. 14:54
timotimo m: class Test { method doit($foo is rw:) { say nqp::iscont(self); say nqp::iscont($foo) } }; my $foo = Test.new; $foo.doit;
camelia rakudo-moar 72852f: OUTPUT«0␤1␤»
timotimo aha!
of course it's not in a container if you don't put it into one 14:55
masak psch: but I think you're right. forbidding null patterns is mostly a syntactic thing, and when the null pattern is not syntactic, there's no sense in forbidding it.
psch++
timotimo hoelzro: did you see that? 14:56
lizmat afk again& 15:01
15:03 JimmyZ joined
hoelzro timotimo: I did 15:09
since self itself isn't containerized, it makes what I want trickier =/
15:16 JimmyZ left
jnthn hoelzro: You can write something that keeps a containerized invocant around if you need it 15:20
method foo(\SELF:) { ... }
Gives you SELF with its container, if it had one
15:21 mj41 joined
hoelzro ah ha 15:22
well, I'm thinking of your average Joe Perl 6 programmer
who just writes something like method foo { "self = {self}" }
it would be nice if he (or she, if it's average Jane) saw "use of uninitialized value self of type Something in string context" 15:23
15:23 guru joined
jnthn ah 15:23
15:23 ajr_ left
jnthn Not sure how to make that one happen... 15:23
hoelzro it's probably infrequent enough not to matter, but I thought it might be nice 15:24
15:24 guru is now known as Guest82144, Guest82144 is now known as ajr_, brrt left
hoelzro heck, "value = {$obj.method()}" do something special would be nice, but I think that would take deeper and darker wizardry than I'd care to add to Rakudo 15:24
jnthn: on an unrelated note, did you see that bug I found regarding an infinite loop in the regex engine? 15:25
m: 'pod' ~~ /'pod' $*/
camelia rakudo-moar 72852f: OUTPUT«(signal )»
jnthn ...uh, which signal is that? :) 15:26
You quantified a zero-width thing. Tht's kinda asking for it.
Though in this case we could statically detect it and whine.
TimToady most regex compilers will specifically forbid quantifying something of known zero width
PerlJam hoelzro: is it really like that in the code? or does $* come from some indirection somehow?
jnthn std: 'pod' ~~ /'pod' $*/ # curious
camelia std ee1ef48: OUTPUT«===SORRY!===␤Unsupported use of $* variable; in Perl 6 please use ^^ and $$ at /tmp/QwSfYuB3md line 1:␤------> 'pod' ~~ /'pod' $*⏏/ # curious␤Parse failed␤FAILED 00:01 126m␤»
hoelzro PerlJam: it's through indirection
jnthn heh :) 15:27
hoelzro I just golfed it down
jnthn std: 'pod' ~~ /^* 'pod'/ # curious
camelia std ee1ef48: OUTPUT«ok 00:01 125m␤»
hoelzro jnthn, PerlJam: it happens during POD processing
jnthn Darn, can't crib from STD
hoelzro ex:
m: =begin title
camelia rakudo-moar 72852f: OUTPUT«(timeout)» 15:28
hoelzro I think it's pod_whitespace or something that has a $ in it, and we try matching <pod_whitespace>*
15:29 raiph joined, zakharyas left
dalek kudo/nom: 1e89800 | jonathan++ | src/Perl6/Actions.nqp:
Don't sink binds to array/hash/dynvar.
15:30
kudo/nom: 034cbdb | jonathan++ | src/core/Temporal.pm:
Only calcuate $*TZ the first time we need it.

This calculation used to be 7.19% of the time spent loading setting on my box; on others where rel2abs isn't so terribly expensive it probably counted for more.
TimToady that's kinda like saying <.ws>*
whitespace rules should do their own quantification, usually 15:31
jnthn I'm not sure what we decided on whether to try and detect non-progressing quantification.
It will make the code generated for every single quantifier bigger...
hoelzro pod_newline
TimToady obviously we decided not to try yet :)
hoelzro that's the offending rule
jnthn TimToady: Yes, will, I'm generally not in a hurry to put in things that will slow us down and that the spec doesn't mandate ;) 15:32
s/will/well/
hoelzro granted, that's the offending rule after I removed the pod_configuration parsing
TimToady where there's a well there's a way
hoelzro it could be that the fix is to change the rule in the grammar, rather than "fix" the regex engine 15:33
PerlJam hoelzro: technically, it's whatever calls <pod_newline>* that offends :)
hoelzro PerlJam: true
I just found it shocking when curtispoe came across this behavior 15:34
PerlJam though ... why is $ in pod_newline?
15:35 rindolf left, rindolf joined
hoelzro that's a good point 15:37
TimToady "Why do we even have that lever?"
hoelzro PerlJam++ # thinking things through
donaldh jnthn: I still have NQPMatch objects getting serialized on JVM. 15:38
TimToady I think the (at least temporary) decision was that we don't try to detect infinite loops or deadlock in other parts of the language, so why here?
donaldh jnthn: definitely no derived grammars on rakudo latest
FROGGS good evening 15:39
donaldh jnthn: any suggestions for how to debug?
15:39 chenryn joined
FROGGS donaldh: I think I'm used to debug these things... what exactly is your problem? 15:39
PerlJam
.oO( perl6 --FROGGS problem_script )
15:40
donaldh FROGGS: the CORE.setting text is getting added to the CORE.setting.jar because Match objects are getting serialized.
From what I can tell, 5 NQPMatch objects are getting serialized as part of the CORE.setting 15:41
FROGGS ahh
donaldh: is that still about add_categorical or what it is called? 15:42
15:42 awwaiid left
FROGGS and does that only happen on jvm? 15:42
donaldh I don't think so because I was tracing calls to add_categorical and there are none left.
FROGGS k
let's think.... Labels and macros pass a match into the setting me thinks... 15:43
donaldh It might only happen on JVM. jnthn++ declared victory for it in github.com/rakudo/rakudo/commit/8a...63579dc5f8 15:44
Yeah, I was guessing it might be labels but they appear to deliberately avoid keeping the Match. The label code extracts info from the match and stores that instead. 15:45
FROGGS k...
how do I check for these five NQPMatch objects?
15:46 akaseki is now known as CrashNBurn, CrashNBurn is now known as Salai
donaldh Best I've managed to debug is NQPArray -> QAST::Want+{QAST::SpecialArg} -> NQPMatch is getting serialized. 15:46
But I'm kind of working backwards so it's impractical to find where the NQPArray comes from :-) 15:47
dalek kudo/nom: c0ac56f | jonathan++ | src/core/Instant.pm:
Cheapen $*INITTIME handling.

Capture the value as a num at startup and stash it away. Use it to lazily construct an Instant from it there first time we are asked. This was 4% of the time in setting loading.
15:48
15:49 kaleem joined
jnthn donaldh: Look up add_inline_info or so in Actions.nqp and see if not calling that helps. 15:49
donaldh: It's meant to strip out match objects, but maybe it leaks osmehow. 15:50
*somehow
FROGGS donaldh: do you look at the --target=ast of the setting compilation to see that?
donaldh FROGGS: yes, big AST, no Matches iirc 15:51
jnthn: add_inlining_info_if_possible ?
jnthn donaldh: Yes, that one.
Called from routine_def iirc
donaldh yep
FROGGS donaldh: I still don't know how you check that the setting contains NQPMatches and the CORE.setting text 15:52
donaldh oh, planeteria.org domain has just expired - planeteria.org/perl6/ 15:53
timotimo oh, d'oh
15:54 mj41 left
donaldh FROGGS: I extract the setting .class from CORE.setting.jar then I run javap -v on the .class file. Shows all the constant strings in the classfile. 15:54
Also all the bytecode, linenumber info, etc.
jnthn Time for some sleep & 15:55
FROGGS gnight jnthn
timotimo have a good rest, jnthn! 15:56
donaldh jnthn++ (that might be it)
Yep, it's coming from add_inlining_info_if_possible 15:59
japhb .ask jnthn When you're awake again, can you look at gist.github.com/japhb/a452a0a8dd7bd5682e1c ? I'm concerned by *both* the weird NPE when threading, but also the fact that having threads <= items causes apparent lockup. I would think the tasks would just share threads in the pool in the normal fashion, making for slow results, but no lock. 16:00
yoleaux japhb: I'll pass your message to jnthn.
donaldh .class file down to 7.7M from 9.1M
FROGGS I see that CORE.setting.moarvm contains the core_prologue.pm, perhaps more
it is possible that it is truncated in the --dump
japhb donaldh: Nice savings! 16:01
donaldh jar down to 2.3M from 2.6M
Just need to find out how matches are leaking through add_inlining_info_if_possible 16:02
japhb donaldh: Do you know the threading code on r-j, or is that just jnthn?
donaldh may just be jnthn. I've worked with bits of it for the async IO 16:03
FROGGS CORE.setting.moarvm before: 12443832 - after: 10542224 16:04
16:05 dayangkun left
donaldh japhb: what bits? 16:06
16:06 rindolf left 16:07 rindolf joined, Rotwang joined
japhb I was mostly wondering if anyone else would be able to contemplate what's going wrong with my gist from 15 minutes ago. 16:15
donaldh japhb: I might get a chance to take a look late this evening. I'm not hugely familiar with the promise implementation but can poke into it. 16:20
donaldh decommute&
16:20 donaldh left
japhb OK, thanks, donaldh 16:21
16:22 anaeem1_ left 16:25 Ven joined 16:29 fhelmberger left 16:35 isBEKaml joined
tadzik oh, ingy :P "IO::All - I Owe All to Larry Wall!" 16:40
Timbus m: "asdf" ~~ /../; say $/ 16:49
camelia rakudo-moar c0ac56: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/CYZAdpCp6q:1␤␤「as」␤␤»
Timbus ?
16:51 kaare_ joined
Timbus oh ok, its just something in .gist 16:52
16:55 rindolf left, mberends joined, rindolf joined 16:57 dakkar left 16:59 ajr_ left 17:06 tgt joined 17:09 kaleem left 17:17 pecastro left 17:22 Ven left 17:23 rindolf left, MilkmanDan left, rindolf joined 17:24 tgt left 17:26 MilkmanDan joined 17:28 rindolf left 17:29 rindolf joined 17:34 numberone joined
dalek kudo-star-daily: 162b1f3 | coke++ | log/ (14 files):
today (automated commit)
17:35
rl6-roast-data: d5f13ff | coke++ | / (6 files):
today (automated commit)
17:36 Guest34380 left
numberone perl6: say 1..7; 17:36
camelia rakudo-jvm c0ac56: OUTPUT«(timeout)»
..niecza v24-109-g48a8de3: OUTPUT«1..7␤»
..rakudo-{parrot,moar} c0ac56: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/tmpfile:1␤␤use of uninitialized value of type Nil in string context in block <unit> at /tmp/tmpfile:1␤␤1..7␤»
[Coke] m: say ~1..7 17:38
camelia rakudo-moar c0ac56: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/vmtEftIgTt:1␤␤use of uninitialized value of type Nil in string context in block <unit> at /tmp/vmtEftIgTt:1␤␤"1"..7␤»
[Coke] m: say ~(1..7) 17:39
camelia rakudo-moar c0ac56: OUTPUT«1 2 3 4 5 6 7␤»
[Coke] gist--
isBEKaml m: (1..7).perl.say; (1..7).gist.say; 17:40
camelia rakudo-moar c0ac56: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/6UDqvwfPx2:1␤␤use of uninitialized value of type Nil in string context in block <unit> at /tmp/6UDqvwfPx2:1␤␤1..7␤use of uninitialized value of type Nil in string …»
17:40 kjs_ left
isBEKaml r: (1..7).perl.say; (1..7).gist.say; 17:40
camelia rakudo-{parrot,jvm,moar} c0ac56: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/tmpfile:1␤␤use of uninitialized value of type Nil in string context in block <unit> at /tmp/tmpfile:1␤␤1..7␤use of uninitialized value of type Nil in …» 17:41
isBEKaml Nil in string context?
17:44 Rotwang left, ecocode_ joined 17:45 [Sno] left 17:51 numberone left, rindolf left, rindolf joined 17:52 Ven joined 17:55 rindolf left, rindolf joined 17:57 Rotwang joined
spider-mario www.reddit.com/r/programming/commen...?context=3 18:02
is that true?
(the “from the beginning” part)
colomon I dunno about promised, but no one expected it to take very long at the start. 18:03
Ven spider-mario: err, I think the beta was supposed to be "18 months away"
colomon and the Perl 6 book that came out in 2003 is hilariously wrong. 18:04
nine At least Perl 6.0 will be released. Unlike PHP 6. And at least it will be useful to the users of the previous version. Unlike Python 3. 18:05
PerlJam colomon: it was updated in 2004 ;)
TimToady the bizarrest thing: trying to recompile STD, and the bootstrap parser fails to parse some random op=, but it varies from run to run
spider-mario the same redditor also says “they promise [Perl 5 compatibility] every summer after some hackathon and every year the proof of concept gets abandoned in a couple of months.”
Ven the same redditor also says a lot of crap, tbh. 18:06
nine: python 2->3 took, what, 12 years, for around 4 changes in the behavior. Worth it!
spider-mario I was suspecting that
Ven (now they want gradual types :P)
colomon spider-mario: I don't think that's true, I only recall one perl 5 compatibility promise since I started working on p6 in 2009 or so, and that v5 project is still ongoing.
spider-mario yeah, print not a function, and except: syntax slightly different. :p 18:07
hm, ok
thanks
Ven: there are even changes that I find negative
for example, no destructuring in function signatures anymore
nine Technically Inline::Perl5 did not start at a hackathon either. And I never meant for it to be just a proof of concept :)
Ven spider-mario: IIRC, perl5 was in from the start, but I very much doubt "getting it working" was something they promised every year back then
colomon actually, I guess there were two different promises last year, now that I think on it -- v5 and an idea for gluing p5 directly to Moar. Dunno the status of the latter.
spider-mario so lambdas that take tuples are less readable in python3 18:08
yeah, I’m hopeful about your project, nine :)
thanks, btw
18:09 molaf_ joined
nine is just glad to finally be able to contribute something 18:09
PerlJam nine++
spider-mario nine++
hoelzro ten
er, nine++
18:12 molaf left
nine I wonder why the Python 3 guys never tried having a Python 2 interpreter running in a separate process to allow a smooth upgrade. Doesn't sound that difficult to me. 18:12
18:13 ecocode_ left
spider-mario it would certainly have sped up its adoption 18:13
timotimo with pypy, you could have two python interpreters with different versions in one process, afaict
Ven oh, could you :)?
spider-mario seeing as the main reason why people kept using python2 was the libraries
18:13 ecocode_ joined
Ven brb: making nqp being able to run all languages at the same time& 18:13
timotimo i think their code doesn't have globals that'd prevent that
nine But pypy is not compatible to CPython either
isBEKaml timotimo: one process? :O
spider-mario but pypy only recently added support for Python 3
Ven twitter.com/codemiller/status/4955...4349491200 18:14
isBEKaml nine: because making any interpreter compatible with something that has no spec of its own is masochism. :) 18:15
18:17 ecocode_ left
nine isBEKaml: but Python does have a somewhat reasonable spec. I wrote a compiler that compiles Python expressions to Perl for my master's thesis and I just took the grammar from the python documentation and it worked. 18:18
18:18 virtualsue joined
isBEKaml nine: I was referring to CPython. I'm aware Python does have a spec. 18:18
ingy tadzik: :) actually I coined that circa 2012 18:19
isBEKaml nine: actually, I take that back. I searched and can only find the grammar specification - nothing else apart from that other than the language reference. 18:25
nine: This SO page says python doesn't have a full specification, per se. stackoverflow.com/q/1094961 [2009] 18:27
18:28 rindolf left, kurahaupo left, rindolf joined 18:31 gfldex joined 18:34 isBEKaml left
lizmat m: ~("b" if 0) # golfed down problem that numberone saw 18:35
camelia rakudo-moar c0ac56: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/YNUtimzGI4:1␤␤»
lizmat I'm pretty sure that is a recent change 18:37
hoelzro lizmat: I wondre if that's from my change
FROGGS star-m: ~("b" if 0) 18:38
camelia ( no output )
lizmat star: say ~("b" if 0)
camelia star-{m,p} 2014.04: OUTPUT«␤»
FROGGS m: say ("b" if 0).perl 18:39
camelia rakudo-moar c0ac56: OUTPUT«Nil␤»
lizmat this pattern is used all over the place in the setting
18:39 SamuraiJack left
TimToady Nil isn't supposed to turn into () anymore 18:39
18:39 [Tux] joined
lizmat so anywhere we do postfix if in a stringification, we would need to turn it into a ternary ? 18:40
[Tux] rakudobrew should detect where it is installed and not blindly assume it is in ~/.rakudobrew
hoelzro yeah, I think that's my fault
Nil needs to override Stringy as well as Str
lizmat well, maybe you changed it according to spec 18:41
hoelzro either that, or I have to devise a good way to not warn twice when invoking Str from Stringy
on accident? =P
lizmat if I understand TimToady correctly
TimToady "b" if 0 should prbably be returning () these days
not Nil
I've been working on removing the list semantics from Nil, but it's a tough one
FROGGS how do we return () here? github.com/rakudo/rakudo/blob/nom/...s.nqp#L866 18:43
timotimo just call to infix:<,>?
without arguments?
FROGGS hmmm 18:44
this could work
18:45 ren1us joined 18:47 rindolf left
flussence tmux a 18:47
18:47 rindolf joined
flussence WHOOPS 18:49
ww.
(jeez, ww, and capslock in a row...)
we don't have a websockets module yet, do we? I'm looking for something to code during travel downtime... 18:50
18:53 guru joined 18:54 guru is now known as Guest59688, Guest59688 is now known as ajr_
hoelzro is there a way to check if a dynamic variable exists? 18:59
I basically want to do if $*SOMETHING, defaulting to False for $*SOMETHING's value if it's not found
TimToady defined is the best you've got 19:00
hoelzro TimToady: that should work, thanks
19:01 rindolf left 19:02 rindolf joined 19:03 Rotwang left
PerlJam Seems like $*SOMETHING // False is what's wanted from here. 19:06
19:09 Ven left 19:10 chenryn left
lizmat is looking at the rel2abs issue 19:10
nwc10 cool
thanks for digging into that
19:11 [Sno] joined
lizmat fwiw, with moarVM, *all* calls to rel2abs are redundant at startup, as all paths *are* already absolute 19:12
PerlJam [Coke]: btw, Happy Anniversary! It'll be my 19th in 3 days :)
colomon PerlJam: that's a lot of anniversaries to have in just 3 days! 19:13
lizmat furthermore, each path has 2 rel2abs calls
nwc10 to be sure to be sure :-/ 19:14
lizmat indeed... :-( 19:15
labster uh oh, sounds like I did something stupid
colomon labster!
labster good *, everyone
PerlJam hey labster! LTNS 19:16
19:17 ecocode_ joined, rindolf left
labster rel2abs sounds like my handiwork. Or at least it was at one time. 19:17
timotimo oh, labster is back :)
19:17 rindolf joined
lizmat fg 19:17
labster Hey, I've been in channel, just occupied with other things. I'm going to claim $dayjob things, but launching a wiki was in there too. 19:18
19:18 darutoko left
colomon labster: whatever, just glad to see you back! :) 19:19
timotimo aye
19:22 Ven joined
labster I've been looking at the module smoke testing... can anyone (maybe [Coke]) tell me what caused File::Spec::Case to fail? 19:22
itz are there any yapcasia perl6 streams likely? 19:23
[Coke] did yapc:eu streams get saved somewhere? 19:26
itz I'd hope they might be available in the promised week or two
19:26 Ven_ joined 19:27 Ven left
tadzik nine | At least Perl 6.0 will be released. Unlike PHP 6. 19:28
nine: well, how can you know either? :)
19:28 kurahaupo joined
tadzik I'm around for about 4 years I think, and I don't recall at any point anyone being sure on what Perl 6.0 will even be 19:29
(sorry for being a slowpoke)
labster! \o/
PerlJam [Coke], itz: I have a link, but I don't know how "public" it is or should be. 19:30
Ven_ tadzik: 'cause they're jumping to php7
so, no php6.
dalek kudo/nom: 5ba59f4 | (Elizabeth Mattijsen)++ | src/core/IO/Spec/Unix.pm:
Make Unix is-absolute test cheaper
tadzik Ven_: ahahaha, seriously? :D
Ven_ tadzik: yeeep.
tadzik this reminds me of a few things... 19:31
labster tadzik! o/
FROGGS tadzik: you can read about php6/7 in their wiki
in short: "6" is equivalent to failure
labster I thought we all agreed that Perl 6 will be awesome. 19:32
nwc10 lizmat: would be nice if an optimiser could figure out the change in 5ba59f4592
but that's a bug for another day
FROGGS labster: I think it is awesome, aye
PerlJam labster: *IS* awsome
er, aweseom
er, blah!
labster lizmat++
FROGGS *is* blah!
nine tadzik: PHP 6 has been officially cancelled. The next one will be 7. And believing that Perl 6 is going to be released is as close as I can become to being religious ;) 19:34
flussence they had a good reason for skipping php6... they'd proclaimed all the "hard" unicode fixing work would be deferred to that version. 19:35
Ven_ the beta is awesome :P
flussence so by skipping it entirely, they never had to do any work!
nine tadzik: also I can somewhat influence a relase of Perl 6 by contributing ;)
FROGGS well, it might not be close fsdo close
dalek kudo/nom: 70e9be5 | (Elizabeth Mattijsen)++ | src/core/IO/Spec/Unix.pm:
Reduce the number of $*CWD lookups in rel2abs

Was at least one, even when not needed.
Ven_ nine: I didn't want to "believe" anything -- that's lame 19:36
so I just started using it in prod.
FROGGS I'd need at least libxml bindings plus a port of XML::Compile me thinks 19:37
PerlJam Ven_: I'm finally over that hurdle myself. A coworker asked me the other day if I'd use Perl 6 in production and not only did I say "yes", but I'd already used it in a couple of small projects.
tadzik I see; true; but what I meant to bring up is that everytime sometimes comes here and asks "when will 6.0 be released?" we all go "but... but you can use it today!!1" 19:38
Ven_ PerlJam: well, I don't have any million-lines project in it. It's just that releasing, versioning managing, history management (+ generating log file), processing some files, etc.
tadzik while it's true, I don't think that anyone has a goal in mind when they think Perl 6.0
neither the late-adopters, neither the contributors, such as us
Ven_ tadzik: "a goal in mind"? 19:39
tadzik and if the developers themselves don't know what Perl 6.0 is actually going to be, it's hard for me to imagine a Release
FROGGS tadzik: NFG + shaped Arrays... maybe the list refactor, that is it I think
tadzik FROGGS: I think it'd be a wise move, even if it's just a marketing move, to say "we're <this> far from Perl 6.0, look how close we are" 19:40
FROGGS tadzik: true
tadzik if <this> is NFG + shaped Arrays + the list refactor, it's fine by me
PerlJam I don't think so.
Ven_ it's hard to judge how many percents
I think lizmat said 80%, but I think a lot more
PerlJam I think the best marketing now will be: Here's an "official" Perl 6 compiler release!
FROGGS Ven_: don't talk about percent and don't say how long it will take
Ven_ well, I only know from RFCs and not from implem-PoV :)
FROGGS just say that there is knowledge about what is missing 19:41
flussence I still kinda want p6regex-on-Bufs to work as specced...
lizmat we also need native array support and jitted 19:42
FROGGS lizmat: we do not need a JIT to comply to a spec
lizmat true
tadzik I think JIT is the "nice to have" thing
Ven_ well, the spec does say "jit" now :)
tadzik oh :)
doesn't it say "should be jittable"? 19:43
Ven_ tadzik: you got me :P
tadzik at least today's patch
lizmat ok, just native arrays then :-)
Ven_ well, it still has "jit" in it :-)
flussence seems like we've eased off on the "torturing implementors for the benefit of users" mantra :)
19:43 rindolf left 19:44 rindolf joined
FROGGS also, we need to work on HTTP::UserAgent cross-platformability to be able to use that as a base for the connection to CPAN 19:44
colomon flussence: I'm sure the turning point was when pmichaud++ talked TimToady++ into rewriting the sequence operator so it could be sanely implemented. ;)
Ven_ colomon: when was that :P? 19:45
colomon Ven_: round about YAPC::NA 2010, maybe? The one in Columbus.
Ven_ it indeed seems pmichaud++ has less time these days 19:46
FROGGS Ven_: well, it seems to change since two weeks or so :o)
colomon Ven_: yes
Ven_ FROGGS: he surfaced 2 weeks before, too :p 19:47
FROGGS but he was there like three days in a row *g*
colomon Ven_: with luck that's changing now, but his time has been very precious the last few years
FROGGS that must mean something *g*
flussence r: my uint16 $FOO = 0; my uint16 \BAR = 1;
camelia rakudo-{parrot,jvm} c0ac56: OUTPUT«Type check failed in binding; expected 'uint16' but got 'Int'␤ in block <unit> at /tmp/tmpfile:1␤␤»
..rakudo-moar c0ac56: OUTPUT«Type check failed in binding; expected 'uint16' but got 'Int'␤ in any bind_error at src/vm/moar/Perl6/Ops.nqp:221␤ in block <unit> at /tmp/tmpfile:1␤␤»
flussence r: my uint16 $FOO = 0 19:48
camelia ( no output )
flussence that only breaks for sigilless, and I'm not sure why...
(also, writing «my uint16 \FOO := 0;␤» in the REPL perma-breaks everything) 19:51
lizmat there are tests for this in roast that are being skipped because of this 19:52
so it's a known NYI issue
19:52 hagiri joined
flussence oh, okay 19:52
19:54 FROGGS left, telex left, hagiri left
dalek kudo/nom: 69add21 | (Elizabeth Mattijsen)++ | src/core/CompUnit (2 files):
Paths for compunits need to be absolute now

We're going to assume they are. This shaves ~ .02 seconds off of startup time.
19:54
colomon has parallel rakudo builds going on on two different accounts on his linux box. :) 19:55
dalek ast: 3f87fb4 | (Elizabeth Mattijsen)++ | S22-package-format/local.t:
Paths need to be absolute always
19:56 telex joined 19:57 Ovid joined 19:58 Ovid is now known as Guest39120 20:00 FROGGS joined 20:02 ren1us left 20:04 rindolf left, rindolf joined
nine I still think that declaring anything an official 6.0 release without any backwards compatability would be very unwise. Learn from Python 3's failure. 20:23
FROGGS nine: but that is the reason to have "6.0", to not be forced to be backwards compatible 20:25
of course, a migration path is very very important
PerlJam and a plan for forwards incompatibility would be nice too (learn from Perl 5 :)
FROGGS use experimental, use feature... I like it :o) 20:26
nine A migration path that does not involve rewriting CPAN (which is large) and proprietary code (which is probably much larger).
lizmat re core_epilogue source being in the setting: I suspect "Perl6::Metamodel::GrammarHOW.HOW.compose(Perl6::Metamodel::GrammarHOW);" 20:27
not sure how to fix
the rel2abs is being called for any filetest operation
FROGGS nine: a migration path for me means that there are adjustments needed to a codebase, that are of reasonable size
nine: it is not realistic that we just can run P5 code without any change at all 20:28
lizmat one solution would be to put an is-absolute test in each of the filetest operations
another solution could be candidates with the is-absolute test built in ?
in the MMD, I mean
FROGGS can't we cache the absolute path of a path? 20:29
lizmat sure we can, but these all operate on strings
nine FROGGS: well I think it is :)
FROGGS nine: if you run the codebase using the perl 5 interpreter... 20:30
lizmat take .e:
method e() {
nqp::p6bool(nqp::stat(nqp::unbox_s(IO::Spec.rel2abs(self.Str)),
nqp::const::STAT_EXISTS))
}
hmmm... I guess we could do an absolute path in there 20:31
ok, will look at that tomorrow...
for now, I'm tired and sleepy so good night #perl6!
FROGGS nine: but then there is no migration going on
gnight lizmat
20:32 kaare_ left
FROGGS nine: how do I rewrite a part of my large codebase when the rest that is using it is P5? 20:32
20:32 awwaiid joined, ecocode_ left 20:33 ecocode_ joined
flussence
.oO( crazy proposal: absolute/relative paths could be separated, like absolute/relative times )
20:33
FROGGS personally I would rewrite only these parts first that are ugly or need extensions... but what if these parts are used heavily by the codebase and not just use the codebase?
[Coke] nine: perhaps python three's issue was that they didn't change enough. 20:34
20:37 ecocode_ left, jdv79 left 20:39 rindolf left, rindolf joined 20:40 rindolf left 20:46 kurahaupo left
TimToady FROGGS: I suspect we're going to have to leave Nil with () semantics for now; everything I've tried has ended up stymied somewhere deep in the internals 20:46
colomon smoke test appears to be frozen in Test-ClientServer? 20:47
FROGGS TimToady: yeah, I was fearing that there is a rather large impact :/
flussence I think Python's mistake wasn't the amount of change, but that it was poorly distributed between the boring and fun parts.
20:47 beastd left
flussence colomon: Oh! That module's probably my fault. I don't know why it'd be stuck though... 20:47
20:47 mr-foobar left
TimToady I just remember when I first heard the proposed changes, I said to myself, "You're gonna break backward compatibility just for that?!?" 20:48
20:48 pippo joined
pippo o/ #perl6 20:48
I think I have found a regression:
m: my $now = now; my @a; for ^20_000 {@a.push: $(1...20)}; say now - $now;
flussence hm, that module's hanging in tests for me too. will look into it. 20:49
camelia rakudo-moar 69add2: OUTPUT«(timeout)»
pippo that takes almost 40 seconds on my box!
TimToady m: my $now = now; my @a; for ^20_000 {@a.push: $(1..20)}; say now - $now; 20:50
camelia rakudo-moar 69add2: OUTPUT«1.9166325␤»
TimToady ... is a fairly heavyweight operator 20:51
colomon flussence: thanks
TimToady though it really should know that 1...20 is constant foldable
flussence there's two problems - the test is hanging, and also the timeout code that's supposed to be a safety net for that isn't doing anything... 20:52
TimToady m: constant $range = 1..20; my $now = now; my @a; for ^20_000 {@a.push: $range}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«3.3303724␤»
TimToady heh, that's slower? 20:53
pippo m: my $now = now; my @a; for ^20_000 {@a.push: $('1,2,3,4,5,6,7'.split(',')}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«===SORRY!=== Error while compiling /tmp/aRGSRpNhAF␤Unable to parse expression in contextualizer; couldn't find final ')' ␤at /tmp/aRGSRpNhAF:1␤------> 0 {@a.push: $('1,2,3,4,5,6,7'.split(',')⏏}; say now - $now;…»
TimToady m: constant $range = eager 1..20; my $now = now; my @a; for ^20_000 {@a.push: $range}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«2.90769890␤»
pippo m: my $now = now; my @a; for ^20_000 {@a.push: $('1,2,3,4,5,6,7'.split(','))}; say now - $now;
TimToady m: constant $range = list 1..20; my $now = now; my @a; for ^20_000 {@a.push: $range}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«(timeout)» 20:54
rakudo-moar 69add2: OUTPUT«2.6700113␤»
TimToady m: constant $range = $(1..20); my $now = now; my @a; for ^20_000 {@a.push: $range}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«0.1451941␤»
TimToady oh wow
pippo TimToady: that is even slower. 75 secs
colomon TimToady: what does @a.push: $(1..20) push on @a?
TimToady pushes the range as an item
push will otherwise flatten
colomon that seems like an odd thing to time? 20:55
TimToady pippo: notice that last one of mine was more then 10 times faster than inlining $(1..20) 20:56
Ven_ colomon: push is slow, let's make it better :)
colomon Ven_: it's not the push, it's what is being pushed that strikes me as weird
TimToady m: constant $range = $(1..20); my $now = now; my @a = $range xx 20000; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«0.3903180␤»
TimToady m: constant range = $(1..20); my $now = now; my @a = range xx 20000; say now - $now; 20:58
camelia rakudo-moar 69add2: OUTPUT«0.0323894␤»
TimToady makes a big difference if you don't thunk the left side of xx
m: constant range = $(1..20); my $now = now; my @a; for ^20_000 {@a.push: range}; say now - $now; 20:59
pippo TimToady: I am parsing a CVS file and I am putting all lines on an array. so that for example @a[n] is a list of CVS's line n values.
camelia rakudo-moar 69add2: OUTPUT«0.14698392␤»
Ulti spider-mario the redditor you keep referring to is "carlosdelrey" previously "educatedpoo" and almost certainly a sock puppet account for a disgruntled core dev of *something* relating to Perl. No one else would care this much or be this negative.
pippo This is the reason I have used .split(',') 21:00
Ulti spider-mario: check all of the posts by carlosdelrey they are immediately after anything relating to Perl6 where he will just spread FUD against any announcement of progress even on /r/programming if he/they/it thinks it might be interesting enough to make it there
spider-mario hm, ok :| 21:01
thanks
Ulti the fact it is someone close is kind of both worse and good, at least a lot of the stuff is at least accurate when its not FUD
pippo TimToady: note that I can leave with it. I am only willing to report the regression for #perl6 information. :-) 21:03
TimToady in what sense has it regressed? wasn't it always slow?
Ven_ pippo: why'd you leave when it's so nice here?
TimToady s/leave/live/ I suspect 21:04
but I agree it would be nice to make it faster, for sure
FROGGS star-m: my $now = now; my @a; for ^20_000 {@a.push: $(1...20)}; say now - $now; 21:05
camelia star-m 2014.04: OUTPUT«7.47283248␤»
FROGGS star-m: my $now = now; my @a; for ^20_000 {@a.push: $(1...20)}; say now - $now;
pippo TimToady: It was fast. yes. I had a proggy that used to cmplete in 1m40s and now it takes 6m(inutes). I golfed the problem to this.
camelia star-m 2014.04: OUTPUT«7.4162025␤»
TimToady okay, that's a regression :)
pippo TimToady: :-) 21:06
star-m: my $now = now; my @a; for ^20_000 {@a.push: $('1,2,3,4,5,6,7'.split(','))}; say now - $now; 21:07
camelia star-m 2014.04: OUTPUT«8.5555218␤»
flussence anyone currently awake && familiar with S17 stuff? I can't figure out why this isn't hitting the timeout when it should: github.com/flussence/Test-ClientSe...ver.pm#L19
pippo Wow! This is fast! Why is it faster than m: ??
FROGGS: ?? 21:08
FROGGS pippo: because it is from april
pippo FROGGS: :-))
TimToady m: my $now = now; $('1,2,3,4,5,6,7'.split(',')) xx 20000; say now - $now; 21:09
camelia rakudo-moar 69add2: OUTPUT«8.9287004␤»
grondilu m: sleep 2; say now - BEGIN now # testing if this idiom still works
camelia rakudo-moar 69add2: OUTPUT«2.051403␤»
TimToady star-m: my $now = now; $('1,2,3,4,5,6,7'.split(',')) xx 20000; say now - $now;
camelia star-m 2014.04: OUTPUT«(timeout)»
TimToady star-m: my $now = now; $('1,2,3,4,5,6,7'.split(',')) xx 20000; say now - $now; 21:10
camelia star-m 2014.04: OUTPUT«(timeout)»
TimToady that part seems to be slower...
maybe it's sinking 21:11
star-m: my $now = now; my @a = $('1,2,3,4,5,6,7'.split(',')) xx 20000; say now - $now;
camelia star-m 2014.04: OUTPUT«(timeout)»
TimToady m: my $now = now; my @a = $('1,2,3,4,5,6,7'.split(',')) xx 20000; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«8.368638␤»
TimToady yeah, the split is faster than it was
pippo Indeed. 21:12
TimToady m: constant range = $(1..20); my $now = now; my @a; for ^20_000 {@a.push: range}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«0.24714300␤»
TimToady m: constant range = $(1..20); my $now = now; my @a; for ^20_000 {@a.push: range; 42}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«0.3108323␤» 21:13
FROGGS reported as RT #122641: speed regression when pushing a range to an array
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122641
TimToady I think there was a push with single argument "optimization" that may have come since star-m 21:14
possibly it's pessimal in this case
Ven_ there has, iirc 21:15
pippo star-m: my $now = now; my @a; for ^20_000 {@a.push: $(<a b c d e f g>)}; say now - $now;
camelia star-m 2014.04: OUTPUT«2.5859714␤» 21:16
cognome Hi. How can I refer to a rule in a grammar to pass it as an argument to some other rule in the same grammar?
pippo m: my $now = now; my @a; for ^20_000 {@a.push: $(<a b c d e f g>)}; say now - $now;
camelia rakudo-moar 69add2: OUTPUT«0.1564487␤»
pippo I am scratching my head :-))
TimToady m: my $now = now; my @a; for ^20_000 {@a.push: $('1,2,3,4,5,6,7'.split(','))}; say now - $now; 21:17
camelia rakudo-moar 69add2: OUTPUT«(timeout)»
TimToady m: my $now = now; my @a; for ^20_000 {@a.push: (), $('1,2,3,4,5,6,7'.split(','))}; say now - $now;
cognome ... short of using TheGramar.^find_method('rule-name')
camelia rakudo-moar 69add2: OUTPUT«6.8820434␤»
TimToady see, pushing two elements, even though one of them is empty, is much faster 21:18
21:18 virtualsue left, donaldh joined
grondilu m: grammar Foo { rule bar {} }; say &Foo::bar 21:18
camelia rakudo-moar 69add2: OUTPUT«===SORRY!=== Error while compiling /tmp/ZOR3LPSHU3␤Null regex not allowed␤at /tmp/ZOR3LPSHU3:1␤------> grammar Foo { rule bar {⏏} }; say &Foo::bar␤ expecting any of:␤ statement list␤ prefi…»
grondilu m: grammar Foo { rule bar { . } }; say &Foo::bar
camelia rakudo-moar 69add2: OUTPUT«(Any)␤»
pippo TimToady: Yes! I'll yuse this work around for now.
grondilu m: grammar Foo { rule bar { . } }; say /<Foo::bar>/
camelia rakudo-moar 69add2: OUTPUT«␤»
grondilu m: grammar Foo { rule bar { . } }; say rx/<Foo::bar>/
camelia rakudo-moar 69add2: OUTPUT«␤»
pippo TimToady: thank you. 21:19
nine FROGGS: use Inline::Perl6 to add new parts to your existing codebase. Use Inline::Perl5 to re-use existing code parts in new programs.
cognome grondilu++ 21:20
FROGGS nine: in both cases as strings that get evaled in the foreign language?
nine [Coke]: yes, Python 3 was certainly not appealing enough to abandon whole code bases... But has there ever been an example of a completely incompatible new version of any widely used programming language being successful? 21:21
grondilu (C++ in a way)
flussence does SQL count? :)
nine FROGGS: probably yes. Or even with better integration since Perl does allow much molding. But from my experience with Inline::Python I can tell you that eval'ed strings would make up just a tiny part of the code. Take the trivial example on github.com/niner/Inline-Perl5 21:22
$i.run() is the eval part. The rest looks like plain normal Perl 6 objects and method calls.
FROGGS nine: yes sure, that example is very nice :o) 21:23
donaldh Hmm, I don't think C++ has ever been completely incompatible with C or earlier C++es.
marginally incompatible, yes.
Ven_ donaldh: yeah, there deprecate or change very minor stuff sometimes 21:24
nine donaldh: it's compatible enough that you usually can start switiching by using a C++ compiler on your existing C codebase with just trivial modifications.
donaldh Yeah, name mangling is the first thing that bites and extern "C" fixes that. 21:25
donaldh is trying to think of completely incompatible new versions and is failing.
^^ successful ones 21:26
21:26 virtualsue joined, gcifuentes joined
dalek p: b598bd7 | (Donald Hunter)++ | src/vm/jvm/QAST/Compiler.nqp:
Remove bogus OperationsJAST.map_classlib_core_op calls that break nqp::sayfh
21:27
nine Does anyone want to bet Perl 6's success on it being the first to achieve this feat? Frankly I don't. Even though if any new version can do it, it's probably Perl 6. But I'd much rather play it safe by allowing a piecemeal migration.
donaldh Especially since a Perl 6 goal is seamless language interoperability. 21:28
Ven_ donaldh: well, there has been other stuff. function removed, default move constructor, and some "minor" stuff like that. 21:29
grondilu 'use v5;' will be Perl 6's 'extern "C"'
so P6 will be as incompatible with P5 as C++ is to C, imho 21:30
donaldh I think the really useful stuff will come via use ... :from<v5>; use ... :from<java> etc.
grondilu yeah, granted. 21:31
Ven_ The useful stuff will come from from ;)
nine I want all of them :)
Ven_
.oO( gotta use 'em all )
whhoops, only 30 min for me to finish my work. eh! 21:32
nine use Inline::Java via Inline::Perl5 ;)
cognome my question reminds me that I have this pull request for rakudo : github.com/rakudo/rakudo/pull/279
or should I revert the patch for the corressponding spec? 21:34
github.com/perl6/specs/commit/67579a1cf7
21:36 itz_ joined
FROGGS cognome: I think it makes sense 21:38
(to apply it, not to revert it)
21:38 itz left
dalek d: 53b3ca6 | TimToady++ | STD.pm6:
clean up misleading P5 special var warnings

Remove the tests for rare variables, especially those that will become syntax errors anyway, like $) and friends. This also allows us to parse bare sigils as rvalues, so we don't have to distinguish ($a,*,$c) = ... from my ($a,$,$c) = ... anymore. That is, if you use a bare $ as an rvalue, we'll simply declare an anonymous variable for you now. If we make the declarator default to 'state', it might even be useful as $++.
21:38
FROGGS ohh, nice 21:39
dalek kudo/nom: 3ce25ec | TimToady++ | src/core/List.pm:
remove single arg push as pessimal
21:40
TimToady pippo: ^^^
pippo TimToady: Trying...
21:40 btyler joined 21:41 ggoebel111118 joined, itz joined
Ven_ TimToady++ # annoying $) and friends :P 21:41
please no $++, though.
21:41 itz_ left 21:42 donaldh_ joined
TimToady well, at least you'll be able to say state $++ now 21:42
Ven_ and yay for that :-) 21:43
I mean, no `$++ for state $++`
sorry for not being very clear, I'm happy with state $++.
21:43 ggoebel111117 left
TimToady so you think it should default to my $ then? 21:44
that's probably the simplest, and still lets you say $++ for a non-state counter 21:45
21:45 donaldh left, kurahaupo joined, itz left, donaldh_ is now known as donaldh 21:46 itz joined
Ven_ TimToady: yes, please. 21:48
I know otherwise people will feel it's a corner-case.
Well, at least I know I'd ... 21:49
cognome I note some other of the pull-requests for rakudo can readily apply (but may be not correct) and have not received feedback from the core team (at least not thru the pull request comment mechanism). 21:52
grondilu TimToady++ default state declarator for anonymous variables
grondilu does not see any point to a (my $)++ 21:53
pippo TimToady++ fast now! Thank you!
kurahaupo r: my $r=0..*; $r.reverse.max.say; 21:54
Ven_ grondilu: just wait until I changed postfix ++ to be something else :P
camelia rakudo-jvm 69add2: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 69add2: OUTPUT«-Inf␤»
grondilu though I can see $++ as a synonymous for (state $)++ looks like slightly excessive magic. 21:56
it' kind of the relax mode use of anonymous variable 21:57
Ven_ ^
flussence found a small problem in perl6/doc: on doc.perl6.org/type/Exception the type graph is (as expected) enormous and (the problem) it disappears off the page without even a scrollbar. Also the PNG version is unreadably tiny. 21:58
grondilu so I would say it could be allowed only in relaxed mode, precisely. But I have the feeling nobody wants the relax mode anymore anyway...
I mean relax mode seems very, very low in the priority list :/
(awkward silence?) 22:00
TimToady well, I don't think of it as lax, I just think of it as the most reasonable thing to do with rvalue $, given how often we end up using (state $)++ currently inside lazy constants and ... sequences 22:05
cognome acks rakudo to see
TimToady and we don't really have a good story yet for mixing ... with sequences that depend on position 22:06
grondilu (state $)++ is a fairly common idiom indeed, but it's still a variable and in strict mode it has to be declared. Thus $++ would be a declaratorless var, which is supposed to be allowed only in lax mode. qed
TimToady m: (1, { $_ + ++(state $) } ... *)[^10].say 22:07
camelia rakudo-moar 69add2: OUTPUT«===SORRY!=== Error while compiling /tmp/weWmklG0Ld␤Unsupported use of $) variable; in Perl 6 please use $*EGID␤at /tmp/weWmklG0Ld:1␤------> (1, { $_ + ++(state $)⏏ } ... *)[^10].say␤»
TimToady m: (1, { $_ + ++state $ } ... *)[^10].say
camelia rakudo-moar 69add2: OUTPUT«1 2 4 7 11 16 22 29 37 46␤»
Ven_ TimToady: modifying STD isn't enough :p 22:08
TimToady spectesting
cognome The idiom in action for people to see : method keys(List:) { self.values.map: { (state $)++ } }
It makes sense to accept $(++ as well. 22:09
grondilu std: $(++$_) 22:10
camelia std ee1ef48: OUTPUT«ok 00:01 124m␤»
grondilu m: say $(++$_)
camelia rakudo-moar 69add2: OUTPUT«1␤»
22:11 avuserow joined
dalek kudo/nom: ce26312 | TimToady++ | src/Perl6/Grammar.nqp:
clean up misleading P5 special var warnings

Remove the tests for rare variables, especially those that will become syntax errors anyway, like $) and friends. This also allows us to parse bare sigils as rvalues, so we don't have to distinguish ($a,*,$c) = ... from my ($a,$,$c) = ... anymore. That is, if you use a bare $ as an rvalue, we'll simply declare an anonymous variable for you now. If we make the declarator default to 'state', it might even be useful as $++.
22:11
TimToady m: say $(;
camelia rakudo-moar 69add2: OUTPUT«===SORRY!=== Error while compiling /tmp/_19eoNFeMM␤Unable to parse expression in contextualizer; couldn't find final ')' ␤at /tmp/_19eoNFeMM:1␤------> say $(;⏏<EOL>␤ expecting any of:␤ sequence of …»
TimToady m: say $); 22:12
camelia rakudo-moar 69add2: OUTPUT«===SORRY!=== Error while compiling /tmp/rsGGF90qVR␤Unsupported use of $) variable; in Perl 6 please use $*EGID␤at /tmp/rsGGF90qVR:1␤------> say $)⏏;␤»
cognome And huffmanization has a way to be an exception to many laws. Concision at the price of regularity and more learning to do.
grondilu ok 22:13
TimToady yes, $++ and ++$ could be very useful in maps
the question is whether it's worth it, and whether the reader can guess what it means whether they quite understand how it works
"Anonymous rvalue sigits default to 'state'" is pretty easy, as rules go. 22:14
and if you use them as junk targets, it doesn't matter whether they are my or state
grondilu is there any risk of wasting memory? 22:15
TimToady arguable state targets don't have to be cloned so much in closures
don't think so
Ven_ TimToady: It still really feels like a corner case to me, just too magic
22:15 dolmen joined
grondilu well, I'm glad I was here tonight so I can learn about this new feat early, for I often write (state$ )++ on RC 22:16
TimToady unfortunately it's my task to figure out which of those people can get used to, and which they can't...
22:16 smls joined
dolmen The Perl 6 blog aggregator at planetsix.perl.org/ has disappeared :( It is a redirect to planetaria.org/perl6 but the planetaria.org domain expired... 22:17
smls TimToady: As far as golfing down «(state $)++» goes, I think «state++» would be a less obfuscated way to do that than «$++» 22:20
22:20 araujo left
grondilu state++ has no sigil so it's more difficult to identify it as a variable 22:20
22:21 araujo joined
smls it returns a value 22:21
just like other built-in terms (e.g. rand)
grondilu I don't know. Not easy to assess. 22:22
in any way I'm not sure state++ really is less obfuscated than $++
(frankly half of my mind keeps thinking $++ is the relaxed version of (state $)++ ) 22:24
22:26 treehug88 left
pippo good night #perl6! 22:26
22:26 pippo left 22:32 donaldh left
sjn Good * #perl6 :) 22:33
grondilu sorry to insist, but also: usually functions return a ro value, no a rw one. So we rarely write foo++. So rand is a bad example since rand++ is wrong. Thus state++ is not so much better than $++ 22:35
flussence I'm very, very confused. If I do «await Promise.anyof(@threads, Promise.in($short))», and in one of those threads call sleep($long) or Promise.in($long) (or anything long-running?), the anyof doesn't return for the Promise.in($short) but blocks on the entire thing...
m: await Promise.anyof(start { sleep 8; say 8 }, Promise.in(3).then({ say 3 })); 22:37
camelia rakudo-moar 3ce25e: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in sub start at src/gen/m-CORE.setting:18942␤ in block <unit> at /tmp/umzjH9Piwk:1␤␤»
flussence m: await Promise.anyof(start({ sleep 8; say 8 }), Promise.in(3).then({ say 3 }));
camelia rakudo-moar 3ce25e: OUTPUT«8␤3␤»
flussence j: await Promise.anyof(start({ sleep 8; say 8 }), Promise.in(3).then({ say 3 }));
camelia rakudo-jvm 3ce25e: OUTPUT«(timeout)»
flussence j: await Promise.anyof(start({ sleep 5; say 5 }), Promise.in(1).then({ say 1 }));
camelia rakudo-jvm 3ce25e: OUTPUT«5␤1␤» 22:38
flussence okay, so not a moarbug at least...
22:38 ajr_ left
arnsholt Perhaps the oddest thing I've put in my .gitignore file: .gitignore itself =D 22:44
22:44 smls left
flussence why'd you do that? 22:45
22:45 dwarring joined
arnsholt Because the repo I'm working with is actually an SVN repo =) 22:46
flussence .tell jnthn Is this a bug, or am I grossly misunderstanding how S17 works? irclog.perlgeek.de/perl6/2014-08-28#i_9260839
yoleaux flussence: I'll pass your message to jnthn.
arnsholt But since working with SVN makes me sad, I'm using git-svn instead 22:47
flussence ah, now it makes sense!
arnsholt But I don't want to rub my boss's nose in the fact that I'm not using his favourite version control system =)
Although I do hope he'll notice the timestamps on some commits at some point O=)
flussence (I tried using git-svn at work once and got caught because the nice, colourized git log stood out from a room away. Needless to say, I stopped working there...) 22:51
22:54 dolmen left
[Coke] (planeteria) I've pinged my technical contact. 22:55
arnsholt flussence: Yeah... 22:56
22:58 xragnar_ joined, xragnar is now known as Guest63690, Guest63690 left, xragnar_ is now known as xragnar 22:59 virtualsue left
colomon gist.github.com/colomon/8e89203b8dd97b88cf56 # the set operation, in four variations with times and links to profiles 23:06
timotimo: ^^^ 23:08
timotimo: sorry it took me so long.
23:09 raiph left 23:10 nbrown__ joined
colomon timotimo: I should probably mention the sub containing the code in question is called hash-set-split 23:11
23:13 nbrown_ left
timotimo oh! 23:14
neato :)
i'm glad we're getting pretty close to the hash-based solution with set operations 23:15
colomon yes, I was very surprised by that.
timotimo oh, you're not using jit 23:16
colomon but I probably shouldn't have been.
true
23:16 raiph joined
colomon tends to avoid features like jit he perceives as experimental, since he is actively using rakudo to Get Stuff Done. 23:16
timotimo ah 23:17
colomon If you think it would be interesting, I guess I can making a special jit build in rakudobrew… 23:26
timotimo you can just put MVM_DISABLE_JIT in your environment 23:29
with any value that is not empty
23:35 Ven_ left 23:52 spider-mario left
grondilu std: say [Before] map *.base(36), ^50; 23:57
camelia std 53b3ca6: OUTPUT«===SORRY!===␤Two terms in a row (preceding is not a valid reduce operator) at /tmp/SAKDSamDjP line 1:␤------> say [Before] ⏏map *.base(36), ^50;␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed…»
colomon m: say 34.base(36) 23:58
camelia rakudo-moar ce2631: OUTPUT«Y␤»
colomon m: say [before] map *.base(36), ^50;
camelia rakudo-moar ce2631: OUTPUT«False␤»
colomon m: say [min] map *.base(36), ^50; 23:59
camelia rakudo-moar ce2631: OUTPUT«0␤»