»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
Kristien But that shouldn't really be a problem, since structs tend to have very low amount of fields and there are very few structs. 00:00
dalek ecs: 5a4a8f7 | TimToady++ | S32-setting-library/Numeric.pod:
document polymod
Kristien it's here: coliru.stacked-crooked.com/a/4408f5375893d6c5 I don't know how to calculate its complexity though
ruoso is there a way to disable the jit from the command line? or maybe even from the build? I have a segfault in Moar and I'd like having to debug jit-genrated assembly if possible 00:36
s/having/to avoid having/
raydiak ruoso: moar --help mentions an env var MVM_JIT_DISABLE 00:38
timotimo indeed 00:38
Mouq It also looks like you can set --jit=0 in the MoarVM build, if you want :P
timotimo i think it'd have to be --no-jit 00:39
or maybe --disable-jit
but disabling the jit via env var should work well, too
ruoso thanks, I'll give it a try 00:40
dalek kudo-star-daily: c25c2d2 | coke++ | log/ (14 files):
today (automated commit)
rl6-roast-data: f327f9a | coke++ | / (5 files):
today (automated commit)
ruoso yeah, the env var does work... 00:43
it doesn't make the debugging easier, however 00:44
since I only have 6 frames... since it's a trampoline function
ruoso will try running on valgrind instead 00:45
[Coke] moritz++: yes, hack.p6c.org/ looks great, thanks. 00:46
cxreg the decision to suspend parrot comes almost exactly 2 years following modernperlbooks.com/mt/2013/02/good...arrot.html 00:52
masak cxreg: and whiteknight wrote another postmortem recently. 00:53
dalek c: 5d6fbec | Mouq++ | htmlify.p6:
Improve &find-definitions documentation a bit
00:56
c: d0e49b2 | Mouq++ | lib/Language/about.pod:
Add a basic about page (mostly about contributing)

Currently stored in lib/Language, but perhaps should be special-cased at some point.
Kristien time to sleep, bye! 01:00
dalek c: 170ae16 | Mouq++ | lib/Language/unicode_entry.pod:
[unicode_entry] Condense title and add an elided sigil
01:06
c: 9e6656a | Mouq++ | lib/Language/unicode_entry.pod:
[unicode_entry] swap entering and inputting so it sounds better
01:08
pippo o/ #perl6 01:12
TimToady m: say 1000000.polymod(60,60,24) 01:45
camelia rakudo-moar 0e6127: OUTPUT«40 46 13 11␤»
TimToady m: say 1000000.polymod(3 xx *) 01:46
camelia rakudo-moar 0e6127: OUTPUT«1 0 0 2 0 2 0 1 2 2 1 2 1 0␤»
TimToady maybe shouldn't return that last 0
colomon polymod? 01:48
timotimo it's like "base", but having different bases for different digits 01:49
colomon on the one hand, Nice! on the other hand, we’ve got that in core? 01:49
is there an inverse function for it? 01:50
timotimo Z* 01:51
well, more or less
with a [\*] added in there for good measure
bbl 01:52
timotimo actually, bedtime 01:52
masak colomon: it being in core makes more sense if you have an APL background. 01:54
(not being funny or sarcastic; it does) 01:55
colomon masak: wouldn’t it be a Unicode operator, then? ;)
colomon probably shouldn’t encourage TimToady++ that way
TimToady I heard that
no, actually, it needs to be dehuffmanized 01:56
it's really just a divmod that knows how to do it more than once
in fact, divmod is just a degenerate case
colomon putting it in a module is the ultimate dehuffmanization. ;)
TimToady has wanted it too many time already 01:57
colomon too, actually. but never knew it until now.
TimToady has talked about it on various occasions, but only named it today
probably wants a polymul to go the other way 01:58
dalek kudo/nom: df5b31e | Mouq++ | src/Perl6/Actions.nqp:
Implement #74850 "has Array $.x .= new(1, 2, 3);"
01:59
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=74850
masak in fact, APL holds some kind of prize for generalizing scalar ops to vector and N-dimensional matrix ops, and still having the reader go "huh, yeah. that makes sense."
'night, #perl6
colomon o/, masak
TimToady o/
dalek ast: 3be9a84 | Mouq++ | S12-class/attributes.t:
Unfudge test for #74850
02:05
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=74850
ruoso The sudoku solve I wrote a while back actually runs pretty fast now... added a few optimizations github.com/ruoso/perl6-sudoku/blob.../sudoku.pl 02:06
TimToady ruoso: how does it compare with rosettacode.org/wiki/Sudoku#Perl_6 ? 02:07
ruoso It is more complex, because it tries to do a smarter solution instead of brute-forcing it 02:08
TimToady feel free to add it as an additional solution to RC 02:09
ruoso I probably need to clean it up a lot 02:11
Mouq m: my @A = < 5 3 0 0 2 4 7 0 0 0 0 2 0 0 0 8 0 0 >; say @A.rotor(3,0).rotor(3,0).map(*.join(" ")).join("\n")
camelia rakudo-moar 0e6127: OUTPUT«5 3 0 0 2 4 7 0 0␤0 0 2 0 0 0 8 0 0␤»
ruoso specifically, it does three things.. 1) cleanup impossible values from the whole grid in a separate pass. 2) try solving the cells that are the easiest first. and 3) tries guessing the numbers that are the most unique in the candidates 02:14
for some medium-level sudokus, this results in incredibly efficient guessing.. if the puzzle is not too hard, this will lead to a faster search path for the solution 02:15
ruoso I then tried to make it parallel, but moarvm segfaults in non-consistent ways... I tried debugging, but every run breaks at a different point... 02:18
TimToady yeah, there's still a bit of instability to hunt down there 02:23
ninjazach Hello, I'm interested in experimenting with perl 6 and am wondering if Rakudo was the recommended implementation? 02:27
s/was/is 02:28
Mouq ninjazach: It definitely is :) 02:30
ninjazach: Rakudo built on MoarVM, in particular 02:31
ninjazach Thank you :)
ninjazach begins casually reading some documentation 02:32
TimToady ninjazach: and feel free to ask questions here, like you already did :) 02:52
though many of the implementors are asleep at the moment 'cause they're sun runs faster than ours 02:54
*their
dalek kudo/nom: 0411dd3 | TimToady++ | src/core/ (2 files):
don't include final 0 in infinite polymod
02:56
bcode ooh, polymod looks really nice 02:57
dalek kudo/nom: 0b48529 | Mouq++ | src/ (2 files):
Port error message from STD.pm6 for #123834
03:14
kudo/nom: 6245cfb | Mouq++ | src/ (2 files):
Try to awesomify error for #123834
kudo/nom: 0759eba | Mouq++ | src/core/ (2 files):
Merge branch 'nom' of github.com/rakudo/rakudo into nom
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123834
ast: afbce9b | Mouq++ | S32-exceptions/misc.t:
Add test for #123834
03:20
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123834
dalek ast: 928ad9b | Mouq++ | S32-exceptions/misc.t:
Typo, s/RE/RT
03:23
jdv79 since when does it need to be 18F out? 04:22
skids No wind chill and only 3" powder to shovel. Gonna count my blessings. 04:38
geekosaur 18F? heat wave 04:40
geekosaur it's 1°F and still dropping, expected low around -10°F with winds gusting to 40mph 04:41
jdv79 i think its only gotten to -7F here this year and that's abnormally low i feel. 04:42
normally the teens is about the lowest
a heat wave was thursday in the city when the high was 38F. i almost felt like taking a walk at lunch. 04:44
flussence I've yet to see below 0°C this year :( 04:53
TimToady wonders if anyone will ever use the ℃ and ℉ characters 05:00
jdv79 i just see 2 boxes that look identical 05:01
TimToady m: say uniprop '℉', 'age' 05:12
camelia rakudo-moar 0759eb: OUTPUT«1.1␤»
TimToady these characters have only been in Unicode for a century or two by now... :P 05:13
TimToady well, okay, it's only been 22 years now, but that's Even Longer Than We've Been Working On Perl 6!!! 05:17
those characters were added when Perl 5 first came out 05:18
No More Excuses!!! 05:20
</soapbox> 05:21
(and by first came out, I mean 5.000alpha1, not 5.000) 05:22
jdv79 maybe cause they probably aren't on any keyboard. i know i never use a char that's not on my keyboard. 05:31
TimToady there is no ctrl-C key on your keyboard 05:34
so that argument is specious
jdv79 there is a ctrl and a c
TimToady there is a compose key on many keyboards too
and the people who typed ° probably did it with compose o o 05:35
all those keys are on my keyboard :)
skids Yeah but the default mapping is pretty sparse. Most letter combos don't do anything. 05:36
TimToady and on mine, I can type any char using ctrl-shift u plus the hex code, if I know it 05:37
so ␤ is one that I already know, 2424
jdv79 had you not pointed it out i would have never guessed there were "degrees (C|F)" glyphs in unicode
TimToady (an easy one to remember, but it'd be nice if there were a compose n l for that
skids Yeah, the letter combos are much easier to remember though. And so many missed opportunities for obvious ones.
TimToady jdv79: you might've guessed if you had a decent font, but that's a different issue 05:38
flussence notices ␤ is rendering from a different font today... bah, I liked the old one I had. 05:39
jdv79 i thought i had a clean utf-8 setup too...
TimToady do you get cjk characters like 木? 05:40
jdv79 yes 05:40
TimToady if you get a single box for that, then your utf-8 is probably fine, it's just a font issue
if you get multiple boxes, you're not utf-8 clean
so just a font thing 05:41
jdv79 no, i get a cross with 2 extra diagonal legs
TimToady lol 05:42
TimToady m: say 123456789.polymod(10 xx *) 05:43
camelia rakudo-moar 0759eb: OUTPUT«9 8 7 6 5 4 3 2 1␤»
flussence m: say ('0'..'9','A'..'Z','a'..'z','-','_')[4294967296.polymod(64 xx *)] 05:46
camelia rakudo-moar 0759eb: OUTPUT«0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 _␤»
flussence bah, not quite what I was going for...
m: say ('0'..'9','A'..'Z','a'..'z','-','_').flat.list.[4294967296.polymod(64 xx *)]
camelia rakudo-moar 0759eb: OUTPUT«0 0 0 0 0 4␤»
flussence m: say 4294967296.polymod(64 xx *) 05:47
camelia rakudo-moar 0759eb: OUTPUT«0 0 0 0 0 4␤»
TimToady a power of 2 is gonna come out boring there 05:50
flussence yep... probably should've picked a more interesting one :) 05:51
m: say ('0'..'9','A'..'Z','a'..'z','-','_').flat.list.[2718281828.polymod(64 xx *)] 05:52
camelia rakudo-moar 0759eb: OUTPUT«a 1 R 1 Y 2␤»
TimToady surely .flat already returns a list?
flussence that's just me being paranoid 05:53
skids Now we just need shorter $a - $a mod $b and ($a + $b - 1) div $b 05:54
flussence m: say 14 divmod 5
camelia rakudo-moar 0759eb: OUTPUT«===SORRY!=== Error while compiling /tmp/oabhKLpB1A␤Two terms in a row␤at /tmp/oabhKLpB1A:1␤------> say 14 ⏏divmod 5␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ postfix…»
flussence aw
TimToady m: say 14.polymod(5)
camelia rakudo-moar 0759eb: OUTPUT«4 2␤»
TimToady works fine for that
just returns it in the reverse of the usual order 05:55
flussence (am I hallucinating divmod? could've sworn it was a thing...)
TimToady python maybe 05:56
only it's divmod(n,m) there
or you might be thinking of expmod
but that's a method 05:57
flussence I plead temporary insanity for that then
TimToady polymod could certainly be an infix, but it doesn't seem quite to rise to the level of necessity 05:58
flussence (I have to admit, polymod is one of the cleverer things I've seen in any language... :) 05:59
TimToady and there are various possible optimizations too 06:00
10 xx * is notationally convenient, but actually doing it that way when it's a constant divisor is kinda silly 06:01
plus if the number fits into a native int, once could do all the operations at a low level 06:02
the current implementation attempts none of those
Mouq TimToady: 123456789.polymod(10, *) ? 06:05
dalek c: 69b1eb8 | Mouq++ | / (3 files):
Let =TITLE set names of type docs; stub nativeInt.pod as example

Although really, I'm thinking that it's more likely that the int and uint classes are going to end up being defined in a Language/natives.pod file or such along with str and num.
06:11
Mouq .ask moritz What do you think of github.com/perl6/doc/commit/69b1eb8c32 as a direction? 06:12
yoleaux Mouq: I'll pass your message to moritz.
moritz Mouq: not bad. The idea I pondered the last two days was to have a lib/NativeType/int.pod instead 06:19
yoleaux 06:12Z <Mouq> moritz: What do you think of github.com/perl6/doc/commit/69b1eb8c32 as a direction?
Mouq moritz: I'm not attached to the way I put forward in the commit; htmlify should've been working that way in the first place :P 06:20
TimToady Mouq: that might be easier for the optimizer to recognize from its bits, but semantically it's more special-casey than 10 xx *
Mouq moritz: I think it would be pretty easy to add a new dir though… 06:21
moritz: Something like this: gist.github.com/Mouq/a61a6912a745d3f2227c 06:24
Err, oops. That link was just updated :P
moritz Mouq: I'm not attached to my way either 06:34
Mouq: but now the search for int gives class: int which goes to /type/nativeint which is a 404 06:35
Mouq Curious 06:40
Is that better or worse than /type/int ?
(Obviously it's better for it to point to the right place; but is the search box wrong here or the generator that puts the file /type/int.html) 06:42
moritz that's debatable again :-) 06:49
it's a more consistent URL scheme
otoh people on macosx or windows won't be able to generate the HTML files correctly
but for now I see htmlify specifically as a tool to create doc.perl6.org contents, so I'm fine with it not being portable 06:50
moritz wonders if we have some kind of tool to detect case insensitive file systems
TimToady m: printf "%064b\n", -1234 06:52
camelia rakudo-moar 0759eb: OUTPUT«0000000000000000000000000000000000000000000000000000-10011010010␤»
TimToady there's a bug
Mouq moritz: I don't think we should limit perl6/doc to that. Almost everything it does is abstract manipulation of "documentables", and then it throws them all at Pod::To::HTML and tells it to make them pretty. 07:04
moritz: I'm still thinking we should generate database of some sort, and then things like p6doc can use that, with the full richness of search that'd be available to the online version. Potentially there are other applications as well. I just don't have a lot of database experience and haven't gotten around to setting it up 07:06
moritz: But then, storing these in a DB, we don't have to worry about generated filenames, or canonicalizing things 07:09
like infix:</>
Mouq -> bed
TimToady m: multi sub infix:«+>»(Int:D $a, Int:D $b, :$rotate!) { :2[$a.polymod(2 xx 64).rotate($b)] }; say 7 +> 2 :rotate; 07:13
camelia rakudo-moar 0759eb: OUTPUT«Unexpected named parameter 'rotate' passed␤ in sub infix:<+>> at src/gen/m-CORE.setting:5227␤ in block <unit> at /tmp/8oG7QtqdEA:1␤␤»
TimToady why doesn't rakudo add my candidate to the list? 07:14
TimToady jnthn: ^^ 07:15
TimToady m: multi sub infix:«+>»(Int:D \a, Int:D \b, :$rotate!) { :2[a.polymod(2 xx 64).rotate(b)] }; say 7 +> 2 :rotate; 07:16
camelia rakudo-moar 0759eb: OUTPUT«Unexpected named parameter 'rotate' passed␤ in sub infix:<+>> at src/gen/m-CORE.setting:5227␤ in block <unit> at /tmp/Om7eVlI9fJ:1␤␤»
moritz TimToady: probably the infix:«+>» has a proto without the named 07:17
TimToady hmm, that seems likely
but if so, maybe autogenerated 07:18
nop, in core/Numeric.pm 07:19
*nope
next question is whether it's better to add a different operator than to add flags to shifts
raydiak well, it's neither pretty nor fast, but here's one way to make * work in .assuming: gist.github.com/raydiak/1ecf3131e1fa4157e625 07:24
raydiak I'm fading, off to bed...anyone feel free to suggest a more sensible way of accomplishing that; o/ 07:35
moritz raydiak: you can simplify the first grep to curried.list.grep(Whatever) 07:38
grondilu say grep Whatever, 1, *, 3 07:55
m: say grep Whatever, 1, *, 3
camelia rakudo-moar 0759eb: OUTPUT«*␤»
grondilu expected that not to work
m: say grep Int, 1, 2, pi, 4
camelia rakudo-moar 0759eb: OUTPUT«1 2 4␤»
grondilu that used not to work, I'm glad it does now though 07:56
dalek c: 6c33473 | moritz++ | htmlify.p6:
htmlify.p6: un-obscure code a bit
08:03
c: 8323f56 | moritz++ | lib/Type/Cool.pod:
Document Cool.IO
TimToady rosettacode.org/wiki/Bitwise_operations#Perl_6 <- unicode has some great rotate ops :) 08:24
TimToady mind you, that's a grotesque way to actually implement them... 08:25
zzz & 08:27
grondilu m: say .WHAT given (my uint $ = 1) +< 2; 08:42
camelia rakudo-moar 0759eb: OUTPUT«(Int)␤»
grondilu m: say .WHAT given (my uint $ = 1);
camelia rakudo-moar 0759eb: OUTPUT«(Int)␤»
grondilu m: say (my uint $) ~~ uint; 08:44
camelia rakudo-moar 0759eb: OUTPUT«False␤»
dalek kudo/newio: 949b809 | moritz++ | src/core/Proc/Async.pm:
Give all X::Proc::Async exceptions a common role

and make the Proc::Async object that threw it available as an attribute in the common role
10:50
lizmat sorry dalek 10:50
dalek ecs/newio: 16df181 | lizmat++ | S16-io.pod:
Clarify second positional on tmpdir/homedir
10:59
Ven o/, #perl6 11:02
dalek kudo/newio: 430e150 | lizmat++ | src/core/io_operators.pm:
tmpdir/homedir return their setting, not Bool
11:03
pmurias hi 11:06
lizmat Ven pmurias o/ 11:07
dalek kudo/longer: 874caf6 | TimToady++ | src/core/ (2 files):
implementation of polymod method to play with
12:26
kudo/longer: 0e61279 | TimToady++ | src/core/ (2 files):
polymod yields 1 more result than args unless inf
kudo/longer: df5b31e | Mouq++ | src/Perl6/Actions.nqp:
Implement #74850 "has Array $.x .= new(1, 2, 3);"
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=74850
dalek kudo/longer: 0b48529 | Mouq++ | src/ (2 files):
Port error message from STD.pm6 for #123834
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123834
kudo/longer: 0411dd3 | TimToady++ | src/core/ (2 files):
don't include final 0 in infinite polymod
kudo/longer: 6245cfb | Mouq++ | src/ (2 files):
Try to awesomify error for #123834
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123834
kudo/longer: 0759eba | Mouq++ | src/core/ (2 files):
Merge branch 'nom' of github.com/rakudo/rakudo into nom
kudo/longer: a25f366 | FROGGS++ | src/ (5 files):
Merge branch 'nom' of github.com:rakudo/rakudo into longer
12:27
Ven Haskell's new website certainly looks good :) 12:30
literal m: my token foo { \# <[A..z]>+ } 12:31
camelia rakudo-moar 0759eb: OUTPUT«===SORRY!===␤Regex not terminated.␤at /tmp/3zVlE6sPh8:1␤------> my token foo { \# <[A..z]>+ }⏏<EOL>␤Regex not terminated.␤at /tmp/3zVlE6sPh8:1␤------> my token foo { \# <[A..z]>+ }⏏<EOL>[…»
literal do I need to use <[#]> to match a '#' ?
FROGGS_ m: my token foo { '#' <[A..z]>+ } 12:32
camelia ( no output )
literal oh
FROGGS_ literal: \# is unspace I think
literal I see
FROGGS_ m: my token foo { \#`(that's a comment) <[A..z]>+ }
camelia ( no output )
FROGGS_ m: my token foo { \#`(that's a comment) <[A..z]>+ }; say "foobarbaz" ~~ foo
camelia rakudo-moar 0759eb: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in regex foo at /tmp/mYOKqt65FJ:1␤ in block <unit> at /tmp/mYOKqt65FJ:1␤␤»
FROGGS_ m: my token foo { \#`(that's a comment) <[A..z]>+ }; say "foobarbaz" ~~ /<foo>/ 12:33
camelia rakudo-moar 0759eb: OUTPUT«「foobarbaz」␤ foo => 「foobarbaz」␤»
FROGGS_ seems so
m: my token foo { #`(that's a comment) <[A..z]>+ }; say "foobarbaz" ~~ /<foo>/
camelia rakudo-moar 0759eb: OUTPUT«「foobarbaz」␤ foo => 「foobarbaz」␤»
FROGGS_ hmmmm
FROGGS_ is not so sure anymore 12:34
[ptc] m: use Test; ok(True); skip_rest "skip"; ok(False); is(1, 1); done; 12:39
camelia rakudo-moar 0759eb: OUTPUT«ok 1 - ␤use of uninitialized value of type Any in numeric context in sub skip_rest at lib/Test.pm:189␤␤not ok 2 - ␤␤# Failed test at /tmp/MKvHKgkNLn line 1␤ok 3 - ␤1..3␤# Looks like you failed 1 tests of 3␤»
[ptc] is that a bug?? ^^^^^ 12:40
[ptc] or am I not understanding how to use skip_rest? 12:40
no, I think I worked it out, I was using it incorrectly 12:42
FROGGS_ m: use Test; plan 42; ok(True); skip_rest "skip"; ok(False); is(1, 1); done; 12:43
camelia rakudo-moar 0759eb: OUTPUT«1..42␤ok 1 - ␤ok 2 - # SKIP skip␤ok 3 - # SKIP skip␤ok 4 - # SKIP skip␤ok 5 - # SKIP skip␤ok 6 - # SKIP skip␤ok 7 - # SKIP skip␤ok 8 - # SKIP skip␤ok 9 - # SKIP skip␤ok 10 - # SKIP skip␤ok 11 - # SKIP skip␤ok 12 - # SKIP skip␤ok 1…»
[ptc] I believe skip_rest has to be used conditionally, i.e. unless $some-condition { skip_rest; exit; } 12:45
FROGGS_ hmmm, I am unable to built perl6-j on a 32bit system...
[ptc] m: use Test; plan 2; ok(True); if True { skip_rest; exit } ok(False); 12:49
camelia rakudo-moar 0759eb: OUTPUT«===SORRY!=== Error while compiling /tmp/FZFMZvV5xd␤Missing semicolon.␤at /tmp/FZFMZvV5xd:1␤------> ; ok(True); if True { skip_rest; exit } ⏏ok(False);␤»
[ptc] m: use Test; plan 2; ok(True); if True { skip_rest; exit }; ok(False);
camelia rakudo-moar 0759eb: OUTPUT«1..2␤ok 1 - ␤ok 2 - # SKIP <unknown>␤»
[ptc] m: use Test; plan 2; ok(True); if True { skip_rest; exit; }; ok(False);
camelia rakudo-moar 0759eb: OUTPUT«1..2␤ok 1 - ␤ok 2 - # SKIP <unknown>␤»
[ptc] m: use Test; plan 2; ok(True); if True { skip_rest "skip rest"; exit; }; ok(False); 12:50
camelia rakudo-moar 0759eb: OUTPUT«1..2␤ok 1 - ␤ok 2 - # SKIP skip rest␤»
[ptc] m: use Test; ok(True); if True { skip_rest "skip rest"; exit; }; ok(False); done 12:51
camelia rakudo-moar 0759eb: OUTPUT«ok 1 - ␤use of uninitialized value of type Any in numeric context in sub skip_rest at lib/Test.pm:189␤␤»
[ptc] it looks like skip_rest needs a plan...
FROGGS_ aye
which might be an error
but, it is good to have a plan
[ptc] true 12:52
when developing a test suite it is common to just use C<done> and no C<plan> 12:53
thus one can't use C<skip_rest> in this use case 12:54
FROGGS_ [ptc]: perhaps we should die here instead of assuming a plan? github.com/rakudo/rakudo/blob/nom/...st.pm#L189 12:57
\o/ 12:59
[ptc] FROGGS_: dunno. I must admit to being confused about getting "use of uninitialized value of type Any in numeric context"
FROGGS_ -Xss1m seems to let me built perl6-j on my 32bit ubuntu!
[ptc] yay!
FROGGS_ [ptc]: the number of planned tests is not set, so it is (Any)
and there you have your uninitialized value in the computation of how many tests need to be skipped 13:00
psch: ping
psch FROGGS_: what's up? 13:01
FROGGS_ psch: since you are a Java professional... would it hurt somebody when we'd add -Xss1m to the nqp runner? 13:02
psch i don't think so, afaik -Xss is starting stack size. 1m might be low, if anything 13:03
FROGGS_ ohh, in our Makefile-JVM for rakudo we have: 13:04
J_RUN_PERL6 = $(JAVA) -Xss1m -Xms500m -Xmx2000m -Xbootclasspath/a:.@cpsep@$(NQP_JARS)@cpsep@rakudo-runtime.jar@cpsep@perl6.jar -cp @nqp_classpath@ perl6
so, I might as well use that in nqp
[ptc] FROGGS_: I know; but should the user of the test suite know the internals like that? 13:05
*Test module internals
FROGGS_ [ptc]: that's why I propose we die there... 'calling "skip_rest" requires setting a plan first' or so
that#s nothing internal then 13:06
psch fwiw, on my 32bit vm i used to have to change -Xmx in perl6-eval-server for running roast - 4gb of total ram hardly allow for 3gb of continuous memory
FROGGS_ psch: and I cannot build rakudo with 2G it seems... I'm trying 3G now
[ptc] FROGGS_: I think die-ing is a good idea. 13:07
FROGGS_ psch: and according to stackoverflow the default stack size is only 512k
[ptc]: do you make a pull request?
[ptc] FROGGS_: I'm not really experienced enough to make that call
FROGGS_ :/
[ptc] FROGGS_: yeah, I can make a PR for it
FROGGS_ [ptc]++ # thank you 13:08
[ptc] FROGGS_: thought it might change some behaviour which someone would think necessary/helpful (or something) 13:08
dalek p/longer: 3804a84 | FROGGS++ | tools/build/install-jvm-runner.pl:
set initial stack size to 1M for nqp-j runner

This let us build rakudo on a 32bit machine.
13:11
dalek c: b4545ec | paultcochrane++ | lib/Pod/Convenience.pm6:
Add vim coda to Pod::Convenience
13:27
c: cbc53e7 | paultcochrane++ | lib/Language/testing.pod:
Start documenting the Text module
[ptc] FROGGS_: do I need to recompile rakudo after I've changed Test.pm? 13:32
FROGGS_ [ptc]: just do: make install 13:33
[ptc] k
FROGGS_: do I need to reboostrap panda afterwards? 13:34
FROGGS_ no
[ptc] ok, thanks :-) 13:34
FROGGS_ :o)
[ptc] btw: when is it necessary to rebootstrap panda? 13:35
I know that sometimes caches change and stuff, but it'd be nice to note down somewhere when this is necessary
FROGGS_ when you rebuild rakudo for example
FROGGS_ recompiling rakudo invalidates all precompiled modules 13:36
[ptc] ok, so that's not something a user would normally have to worry about 13:37
I'm thinking of the case where a user has done "aptitude install rakudo"...
[ptc] thus, recompiling the modules would only be necessary after a rakudo upgrade (similarly to how python recompiles its modules, for example) 13:38
FROGGS_ aye 13:38
[ptc] I'd done a fetch and merge on nom, thus 'make install' wouldn't work
now I'm getting this: Unhandled exception: While looking for 'ModuleLoader.moarvm': no such file or directory
any ideas?
btw, I've done a make realclean beforehand 13:39
FROGGS_ hmmm, perhaps you have to 'make install' in nqp? 13:42
[ptc] FROGGS_: that gave me the same error 13:44
FROGGS_ :/
[ptc] I'd just run Configure.pl and that was the error that turned up as part of the build
FROGGS_ did you already reconfigure?
ahh
[ptc] am testing now on a new clone
FROGGS_ removing the install dir should do too 13:45
because that forces the build of the backends and nqp
[ptc] ok, I'll give that a try as well
dalek p/js: 1c09d0e | (Pawel Murias)++ | src/vm/js/bin/run_tests:
Add passing test 94 to run tests.
13:46
[ptc] FROGGS_: removing install dir worked, ta! :-) 13:49
FROGGS_ pheew :o)
FROGGS_ okay, I finally got to the point where I have a perl6-j on a 32bit machine and reproduce the 32bit with NativeCall there too 13:50
dalek p/js: d2b4c10 | (Pawel Murias)++ | tools/missing-js-tests:
Add a script that prints the missing js tests.
13:51
gfldex tries to find the exit of masak++'s blog post 14:23
pmqs Hey folks. Is this a bug in tell or me being stupid? 14:27
$f = open("x", :w); $f.print("abc"); say $f.tell
0
geekosaur or tell operating on the actual file vs. buffered abstraction 14:30
gfldex pmqs: that's a bug by the compare-with-perl5-rule 14:31
pmqs geekosaur: so how to do tell on buffered abstraction? 14:32
pmqs gfldex: that's what I assumed, but still getting my head around p6. 14:34
gfldex pmqs: github.com/rakudo/rakudo/blob/nom/...le.pm#L434 14:35
pmqs gfldex: the plot thickens. seek seems to make tell work 14:36
$f = open("x", :w); $f.print("abc"); $f.seek(2,0); say $f.tell
2
Ven pmurias: I did that "missing scripts" thing in one line of Perl6. :P 14:40
masak good afternoon, #perl6 14:41
gfldex: ;) 14:43
Ven \o, masak
pmqs gfldex: tell in perl5 equivalent looks fine 14:45
perl -e ' open $f, ">xyz" or die; print $f "bc"; print tell($f) . "\n" '
3
gfldex pmqs: i can tell you that i just filed a rakudobug 14:46
pmqs gfldex: you beat me to it :-)
gfldex m: my $a = 'x' x 2**32;
camelia rakudo-moar 0759eb: OUTPUT«repeat count > 1073741824 arbitrarily unsupported...␤ in sub infix:<x> at src/gen/m-CORE.setting:8020␤ in block <unit> at /tmp/hQQygjKVRk:1␤␤»
lizmat pmqs gfldex will look at it for the newio branch
gfldex lizmat++ for fixing things faster then we can report it :) 14:47
lizmat didn't say anything about fixing :-)
pmqs lizmat: newio? Is that what it sounds like? 14:47
gfldex it's a very shiny io 14:48
lizmat more like the same old wine in a new bottle, really 14:48
pmqs does it change to what's in S32?
lizmat but hopefully a shiny bottle :-) 14:49
generally, no
with some exceptions
pmqs :-)
lizmat there's a newio branch in "specs", in case you're interested
pmqs lizmat: Aaaah, didn't know that. I didn't see any tests for tell in roast. Is that the correct place to look? 14:50
lizmat there's a newio branch in roast as well
although there's quite a lot of breakage in there atm
gfldex pmqs: [perl #123838] is the ticket 14:51
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123838
pmqs gfldex: ta
pmqs lizmat: thanks 14:55
geekosaur right, I wasn't saying not a bug, I was suggesting a (common) cause of it. 15:02
and there are enough levels of IO abstraction in the stack that I'm not even going to try to guess at what level it's breaking :)
pmqs geekosaur: ok. Still feeling my way with p6, so not fully sure how things should work. 15:05
dalek p/js: 76e8376 | (Pawel Murias)++ | src/vm/js/bin/run_tests:
Add passing test 79 to run_tests.
15:18
p/js: 3220398 | (Pawel Murias)++ | tools/missing-js-tests:
Remove pointless dependency from tools/missing-js-tests.
masak Haskell's new web page is gorgeous. www.haskell.org/?new 15:24
masak favorite bit: they make absolutely no big deal out of the fact that there's a little fully functional REPL directly under the fold. 15:25
we should have this.
gfldex font-size: 13px; :( 15:27
RusAlex wow very croud here 15:29
lizmat welcome RusAlex 15:29
Ven masak: you're late, I said that earlier :P 15:39
masak: also, it's really bad that the REPL is as broken as ghci 15:40
(people try a = x * y first, and boom!)
pmqs lizmat: hacked a very simple test harness for "tell". reading & seek seem ok. write seems to be the broken part 15:43
Kristien is implementing a compacting GC 15:51
geekosaur well, seek should flush so I'd expect it to be correct after that 15:52
pmqs lizmat: attached test harness to [perl #123838] 15:57
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123838
lizmat pmqs: thanks!
masak vendethiel: I'm just happy we arrived at the same conclusion, even though I was late :)
lizmat afk for the rest of the day & 16:08
[ptc] FROGGS_: just did a dodgy git push --force on the skip_rest PR, hope it's still mergeable 16:15
FROGGS_ [ptc]: you dont need to do that usually, pushing another commit to your branch also makes it visible to the PR 16:17
dalek kudo/nom: db560a0 | paultcochrane++ | lib/Test.pm:
Die in skip_rest if no plan is set

Current behaviour dies with "use of uninitialized value of type Any in numeric context", which is confusing to the user of the Test module. This change tells the user what is required in order to use skip_rest correctly.
kudo/nom: 5ba2c86 | FROGGS++ | lib/Test.pm:
Merge pull request #363 from paultcochrane/pr/skip_test_dies_without_plan

Die in skip_rest if no plan is set
FROGGS_ [ptc]++
Ven [ptc]++ 16:18
[ptc] FROGGS_: yeah, I thought so. Thought it might be easier to merge than having to cherry pick one commit
Actually, I noticed that like() and unlike() etc aren't yet implemented, however turn up in the spec test, are they yet to be implemented? 16:19
FROGGS_: btw: I'm not usually that brutal with my git branches :-) I usually try to avoid --force at all costs 16:22
timotimo facebook is getting an "unlike" button?
FROGGS_ [ptc]: I'm not sure about like/unlike... 16:26
pmurias why use bindpos of @foo[0] := ...?
s/of/instead of/
dalek p/js: f973217 | (Pawel Murias)++ | TODO:
Update TODO.
16:27
liztormato FWIW: I was just about to commit a patch that would make .trans about 20x as fast
For the simplest case 16:28
Need to fix one boumdary condition but had no time 16:29
Will do so in about 8 hours
FROGGS_ ++ liztormato 16:32
[ptc]: but I think like/unlike might be useful
Ven liztormato++ 16:33
FROGGS_ [ptc]: will it just smartmatch against the $expected?
[ptc]: or does it also take a comparator?
dalek c: bb626e4 | paultcochrane++ | lib/Language/testing.pod:
Complete documentation for Test module
16:36
[ptc] FROGGS_: don't know exactly. I saw tests within the spectest suite (which aren't being run currently) and wondered why like/unlike were missing from Test.pm 16:37
FROGGS_: like/unlike don't turn up in the spec docs about testing though
pmurias hoelzro: I got the random test 14 failure on my machine too 16:38
[ptc] FROGGS_: maybe like is really something along the lines of ok($obtained ~~ $expected) 16:38
[ptc] and thus like isn't really necessary 16:38
dalek p/js: dc4ae0d | (Pawel Murias)++ | t/nqp/70-invokespec.t:
Fix test plan.
16:39
p/js: cc16234 | (Pawel Murias)++ | / (3 files):
Implement nqp::bindpos.
FROGGS_ well, when the testing sub gets the $expected and the $got it can print a helpful message on mismatch
pmurias nqp-p: say(nqp::istype(NQPMu, nqp::null())); 16:43
camelia nqp-parrot: OUTPUT«0␤»
moritz_ FROGGS_, [ptc]: since our regexes don't stringify so well, like() often couldn't produce good diagnostics messages 16:49
(with regexes at least)
FROGGS_ ahh, true 16:50
[ptc] I just implemented a first-cut at like(); is it still worthwhile adding? 16:51
[ptc] moritz_: so like/unlike were removed? 16:52
dalek osystem: e8a9be6 | (Andrew Egeler)++ | META.list:
Add UUID
16:53
moritz_ [ptc]: I don't think they were removed; but we certainly pondered them before
raydiak moritz_: wrt gist.github.com/raydiak/1ecf3131e1fa4157e625 thanks for looking! .list would induce premature flattening; also I need the indices not the values, so it'd have to use .pairs too 17:06
if it looks like something that might not be too horrendous to include in core in some form, I'll open a PR 17:07
ruoso So, I refactored the code in my sudoku solver, it's much more legible now, I'm considering adding it to Rosetta Code... feedback is appreciated: github.com/ruoso/perl6-sudoku/blob.../sudoku.pl 17:13
the solver is surprisingly good at avoiding backtracks.... 17:15
colomon smoke.perl6.org/report 17:19
timotimo my lord, this looks bad 17:22
timotimo i'd still like having the build output in the smoke reports 17:23
what's the domain for panda testers again? 17:24
ah, testers.
just takes a tiny while to come up
FROGGS_: we need to get some more performance out of testers :) 17:25
raydiak yeah noticed last night that Inline is failing tests...that's why zlib and png::portable are failing at least 17:28
moritz but shouldn't they show a "P" then? 17:29
raydiak yes, that would be expected behavior 17:31
Ven_ wow, realize it's now been more than a year on this channel \o 17:42
r: for lines() -> $_ is copy { s:g/men/boys/; .say } 17:43
camelia rakudo-{parrot,moar} 5ba2c8: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin g…»
geekosaur that changed too :p 17:45
Ven_ m: sub second-to-last(@ [*@, $value, $]) { $value }; # that didn't change :P 17:51
camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!=== Error while compiling /tmp/5R0cTW9glf␤Cannot put required parameter $value after variadic parameters␤at /tmp/5R0cTW9glf:1␤------> sub second-to-last(@ [*@, $value⏏, $]) { $value }; # that didn't change …» 17:52
masak Ven_: I can see why that's disallowed. 18:03
Ven_ masak: I can't :) 18:04
masak it kinds goes against the rule the later things shouldn't affect earlier things.
Ven_ I'm sorry?
masak at least declaration-y things.
also, it's consistent with how slurpies work in Perl 5.
mst Ven_: allowing a required parameter after a variadic is a TERRIBLE idea and will bring you only inconsistency and pain
flussence m: sub second-to-last(*@ [@, $value, $]) { $value }; say second-to-last(|1..10); 18:05
camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!=== Error while compiling /tmp/Vgp9XNQ8Pk␤Variable '&prefix:<|>' is not declared␤at /tmp/Vgp9XNQ8Pk:1␤------> lue, $]) { $value }; say second-to-last(⏏|1..10);␤»
Ven_ mst: thanks, but that's not what I'm doing here.
flussence m: sub second-to-last(*@ [@, $value, $]) { $value }; say second-to-last(|(1..10));
camelia rakudo-moar 5ba2c8: OUTPUT«cannot stringify this␤ in sub second-to-last at /tmp/WEkVUbZVxR:1␤ in block <unit> at /tmp/WEkVUbZVxR:1␤␤»
masak Ven_: it kinds is, though.
flussence um, wat
Ven_ I really isn't...
mst Ven_: that's what the error appears to be saying
Ven_ It*
mst it might be what you *wanted* to do, but it's certainly what the compiler thinks you're doing :)
Ven_ mst: it's not a *parameter*
It's an array deconstruction. That's not the same as an argument list, in my book 18:06
(sorry, BooK )
mst oh, right, I see where you're going
Ven_ m: sub foo(@a){}; my @a = 1..*, <this is okay here>; foo(|(1..*)); # this isn't 18:07
camelia rakudo-moar 5ba2c8: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in sub foo at /tmp/LAyn7Zhy54:1␤ in block <unit> at /tmp/LAyn7Zhy54:1␤␤»
flussence m: sub a(*@ [$value]) { $value }; say a(1..10) 18:08
camelia rakudo-moar 5ba2c8: OUTPUT«Too many positionals passed; expected 1 argument but got 10 in sub-signature␤ in sub a at /tmp/3gzmy2m2lz:1␤ in block <unit> at /tmp/3gzmy2m2lz:1␤␤»
flussence m: sub b(*@ [$value, *@]) { $value }; say b(1..10) 18:08
camelia rakudo-moar 5ba2c8: OUTPUT«1␤»
flussence m: sub c(*@ [$value, @]) { $value }; say c(1..10) 18:09
camelia rakudo-moar 5ba2c8: OUTPUT«cannot stringify this␤ in sub c at /tmp/dVGIrrNhc3:1␤ in block <unit> at /tmp/dVGIrrNhc3:1␤␤»
Kristien How does Perl 6 resolve the problem of the dreaded diamond of death? 18:10
flussence C3, same as Perl 5.
Juerd Kristien: It lets you use roles instead of classes, which can't be composed into something that it clashes with. 18:11
(Assuming that's the diamond you're referring to. If it's some other diamond, I don't know.) 18:12
Kristien Well especially with data members. 18:15
E.g. class A { has $!x; }; class B is A { }; class C is A { }; class D is B is C { /* how many $!x members are there? } 18:16
masak one.
Kristien Ah, so B and C share the same base members. 18:17
masak but you shouldn't care so much, since $!x is private to A.
Kristien yeah but A may expose it in some way
masak then A is doing a bad job hiding its private stuffs. 18:18
Kristien In C++ there'd be two unless you inherit with virtual keyword.
Ven_ (oooh, virtual inheritances... well) 18:19
nine_ masak++ # just finished reading the fascinating maze blog post 18:20
masak so it was readable. nice \o/
raiph "PL design is like a box of tradeoffs" (news.ycombinator.com/item?id=9052239) 18:22
japhb And there is some kind of design that isn't? 18:24
geekosaur ^ see "pick any two" 18:25
Kristien And in the diamond case how is it prevented that the constructor of A is called twice? 18:26
Mouq m: class A { has $!x; }; class B is A { }; class C is A { }; class D is B is C { }; say D.^mro 18:27
camelia rakudo-moar 5ba2c8: OUTPUT«(D) (B) (C) (A) (Any) (Mu)␤»
Mouq Kristien: The mro works least-derived to most-derived. AFAICT, the constructor for B knows how to build B and then gets the build instructions for A; BUILDALL relies purely on the mro, so it pulls the plans from each element, rather than the instructions for parents being embedded in the instructions for the child 18:42
Or at least, I think that's how it works, based on the code I've looked at
flussence `perldoc mro` explains it properly ;) 18:42
Mouq Someone else might be able to put that better/more accurately
Mouq flussence++ 18:43
flussence don't ++ me! I only pointed to TFM, not wrote it :) 18:44
(and I was wrong about p5 using it anyway, it's not the default [unless you use Moose, or something]) 18:45
Kristien Now I understand why it's called nextsame and not super. 18:51
Kristien Perl 6 is very nice. 19:06
masak .oO( Perl 6: unifying concepts, for your pleasure ) 19:11
FROGGS_ timotimo: aye, I'm almost done with generating static html pages that an apache can server 19:14
serve* 19:15
Kristien Are INITs called in an order similar to C3, or depth-first? 19:15
moritz uhm
INITs aren't called in any OO order, I suppose
but rather in the order of use statements 19:16
Kristien well replacing inheritance with use
moritz depth first
Kristien OK
Makes sense.
dalek c: fd08a18 | moritz++ | lib/Type/Metamodel/C3MRO.pod:
More explanations for method resolution order; add example
19:17
moritz why does skip_rest require a plan? 19:19
FROGGS_ moritz: because it will just emit a certain number of 'XX - SKIP' 19:20
masak moritz: could be argued if there's no plan, you can just do `done` instead
moritz FROGGS_: from a user's perspective, that answer isn't satisfactory at all :- 19:21
)
masak++ # that I can relate to
dalek c: b1abbbc | moritz++ | lib/Language/testing.pod:
testing: mention &done as an alternative to skip_rest

  ... when no plan was made. masak++
19:22
FROGGS_ moritz: hmmm, we eventually can emit a 'XX - SKIP' for every call to ok/nok/pass/etc in that case then 19:23
moritz FROGGS_: except that we don't have that information 19:23
timotimo FROGGS_: cool! :) 19:24
FROGGS_ moritz: what information?
moritz: ahh, it does not make much sense to run the code after a skip_rest, ehh? 19:25
moritz FROGGS_: correct
it's not todo_rest
FROGGS_ well, then there is no way to avoid a plan 19:26
ahh, it could be a noop perhaps?
flussence I'm having trouble finding an actual description for META.info (if one even exists). Following links from modules.perl6.org gets me to S11, which only has a dead link for "META6.json" (which I haven't heard of before). Up until now I've been cargo-culting other people's stuff... 19:39
FROGGS_ flussence: yes, META.info is in theory deprecated 19:40
but it is still the one that works with panda
moritz FROGGS_: what is the not-deprecated alternative? 19:43
FROGGS_ META6.json
which, panda only knows about in a dev branch
dalek p/longer: 984d8c0 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6 (2 files):
handle C types when composing P6int and P6num on the jvm
19:46
c: df9a2f3 | moritz++ | lib/Language/testing.pod:
testing: be more explicit about contexts; example for is_deeply
19:47
raydiak FROGGS_: are you aware of the Inline::C test failure? 19:51
FROGGS_ raydiak: yes, it is caused by NativeCall<->Rakudo version mismatch 19:56
I am working on that indirectly 19:57
raydiak FROGGS_++
FROGGS_ I've got a tiny problem on parrot though... 19:58
moritz has a solution for that 19:59
pippo o/ #perl6 19:59
raydiak \o pippo 20:00
pippo use Form; print form('{]]]}','0')
m: use Form; print form('{]]]}','0')
camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!===␤Could not find Form in any of: /home/camelia/rakudo-inst-1/languages/perl6/lib, /home/camelia/rakudo-inst-1/languages/perl6␤»
timotimo aye, Form is NYI
FROGGS_ what's Form?
pippo it is in the p6 modules!
FROGGS_ pippo: camelia here does not have (all) modules installed 20:01
timotimo oh, we have a module for that?
pippo FROGGS_: thanks.
timotimo: yes
FROGGS_ there is a 'star-m' command that has the modules of the star distribution, but that's all
timotimo "A Perl 6 implementation of Perl 6-style text formatting" ... um ..?!
moritz in fact, 'm:' in camelia only gives you those modules that a bare rakudo gives you 20:01
FROGGS_ ahh, Form is like P5's formats 20:02
pippo star-m: use Form; print form('{]]]}','0')
camelia star-m 2015.01: OUTPUT«===SORRY!===␤Could not find Form in any of: /home/camelia/rakudo-star-2015.01/install/languages/perl6/lib, /home/camelia/rakudo-star-2015.01/install/languages/perl6, /home/camelia/rakudo-star-2015.01/install/languages/perl6/site␤»
pippo :-(
FROGGS_ pippo: well, install it locally
pippo Anyway does anybody used that module? It hates the 0 and do not want to print it. 20:03
Do not know why.
FROGGS_ did not use it
raydiak hasn't been worked on for 3 years except for a "fix the obvious errors and warnings" commit by retupmoca++ last summer 20:05
Mouq moritz: perl6 htmlify.p6 1312.50s user 336.63s system 89% cpu 30:40.88 total GAH 20:06
Mouq moritz: We could probably trim a good bit of that by doing partial HTMLifying of Pod and saving that, since there's a lot of reuse between pages we're not taking care of. I don't think I have time to mess with that today 20:07
moritz: Also, I'm guessing we could probably have a module that has a direct interface to pygments. I'm guessing shelling out to a new process of it over and over isn't exactly ideal 20:11
Oh, okay; without hilighting it's only: perl6 htmlify.p6 --no-highlight 364.04s user 3.76s system 95% cpu 6:26.71 total 20:13
Mouq still wants to cut that :P
Mouq afk
timotimo hm, how do we do the highlighting? something must be very bad about that part for it to be that slow 20:26
raydiak timotimo: it's a recent addition, uses Pygments 20:32
timotimo i know 20:32
but why does it add such a ridiculous amount of time to the process?
raydiak appears to write the code block out to a temp file for passing to pygmentize.../me would guess it's that part if it's not pygmentize itself 20:37
dalek p/longer: f18a667 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java:
use NativeLong for arguments and return types instead of Long

This fixes the last problems with NativeCall on a 32bit machine on the jvm.
20:40
moritz pygmentize on a typical code block is about 0.1s
Mouq: one problem is that processing a file doesn't just htmlify it, but also uses the data to bulid the search index and disambiguation files 20:42
FROGGS_ p: say nqp::objprimspec 42
camelia rakudo-parrot 5ba2c8: OUTPUT«0␤»
FROGGS_ p: say nqp::objprimspec(my int $a = 42)
camelia rakudo-parrot 5ba2c8: OUTPUT«0␤»
nwc10 FROGGS_: I build longer (but not that most recent NQP change for the JVM), an valgrind spots no errors with the zavolaj tests. 20:46
FROGGS_ \o/ 20:47
nwc10: I love to hear that :o)
nwc10 I hope you trip to the zoo was good. We got up not-particularly-early to go to www.bauen-energie.at/
and donate the children to the grandparents for the morning) 20:48
it was big (but useful for what we needed)
FROGGS_ nwc10: it was a very nice sunny day, and so we walked around with friends... (= five kids in total)
though, carrying my middle child on my shoulders payed me back the afternoon and evening :/ 20:49
I'd enjoyed that too if I would not live in a flat :o) 20:50
moritz wonders if there's a need for an async DB interface 20:51
and who would write that :-)
FROGGS_ ain't no time for that 20:53
FROGGS_ has a feeling that he solved his problem with parrot (in a unmoritzish way) 20:55
an*
nwc10 FROGGS_: we are currently in a flat. We were going there for details needed to help craft our escape plan.
FROGGS_ ahh
dalek p/longer: 126fe20 | FROGGS++ | src/vm/parrot/6model/reprs/P6 (4 files):
port native C type handling to parrot
21:09
kudo/longer: 470a5cb | FROGGS++ | src/Perl6/Metamodel/NativeHOW.nqp:
check for int-ness in NativeHOW.compose

We get away with that in theory on moar and jvm but not on parrot. And it is certainly more correct this way.
21:12
moritz raydiak, Mouq: I just did some timings, and htmlify.p6 spends about 45s writing those temp files, and 677s running pygmentize 21:15
is 45s too long for writing 374521 character in total in 6863 spurt() calls? 21:16
I'd say so :-)
but it's not the bottleneck here 21:17
jdv79 is train_mod a routine?
jdv79 dead link for that on doc.perl6.org/language/about 21:18
moritz oh, trait_mod
FROGGS_ 404, aye: doc.perl6.org/routine/trait_mod 21:19
moritz well, not quite
jdv79 link for graphviz is also dead - s/com/org/
same page
raydiak thanks moritz, useful info...almost makes me wonder if we shouldn't cache the highlighted blocks for subsequent runs
moritz raydiak: we should 21:20
raydiak: and I'd like to use sha1 as the cache key, but not the nqp::sha1 opcode
can't we spec Str.sha1hex or so? :-)
jdv79 oh, whoa. train. sorry. i should probably find some contact lenses. i was trying to avoid them today:(
dalek c: 74326f7 | moritz++ | lib/Language/about.pod:
Fix link, jdv79++
21:22
raydiak moritz: there's the Digest module 21:23
well, modules 21:24
moritz pure perl implementations 21:25
but I wanted to speed up the thing :/ 21:26
dalek p/js: 5272c6b | (Pawel Murias)++ | / (2 files):
Make nqp::istype work on nqp::null().
raydiak moritz: erm, right
grondilu what's wrong with nqp::sha1?
moritz grondilu: it's rakudo specific 21:27
grondilu: and not part of the public API
grondilu ok
there is always rosettacode.org/wiki/SHA1#Perl_6. Maybe it could be made faster with native types or something. 21:29
moritz ok, I think we're approaching this wrong :-)
what I *really* want is a cache
raydiak what if the digest module used nqp::sha1 where available, falling back to PP if some poor soul tries htmlify on niecza or whatever?
moritz the sha1 is just an implementation detail of that
raydiak: +1
raydiak cuz regardless of algorithm, idk if we currently have any fast portable hashing of any sort 21:31
grondilu that'd be unfortunate imho 21:32
pmurias we will need a way to check if nqp is supported on a given implementation 21:33
moritz ok, TBH I haven't benchmarked Digest::*
moritz maybe I should before calling it slow :-) 21:33
masak today's mini-challenge: write a program that finds all the solutions to 1/p + 1/q + 1/r = 1/2, 0 < p <= q <= r being integers. (hint: there are 10 such solutions.)
dalek p/js: c501739 | (Pawel Murias)++ | / (4 files):
Implement and test nqp::sha1.
21:34
raydiak as far as checking for nqp, "try { require nqp }" might work 21:37
grondilu m: P: for 3 .. * -> $p { for $p .. * -> q { for q .. * -> \r { say
camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!=== Error while compiling /tmp/kw4CnitO2g␤Couldn't find terminator }␤at /tmp/kw4CnitO2g:1␤------> or $p .. * -> q { for q .. * -> \r { say⏏<EOL>␤»
grondilu pressed enter accidentally, as you probably guessed 21:40
FROGGS_ could be a very intelligent keyboard cat also :o)
masak let me know where such cats can be found 21:41
grondilu wonders if there is a more elegant way to enumerate increasing integers.
masak would recommend not iterating towards a solution on #perl6 camelia ;) 21:42
grondilu
.oO( 1/p + 1/q == 1/2 - 1/r <=> (p + q)/(pq) = (r - 2)/(2r) and then using a trinome maybe ?)
21:46
Kristien Tank you for this perl of wisdom. 21:48
masak ok, I have a program that prints all the solutions. it's 16 LoC. 21:49
I also may have discovered a bug.
m: Q: for 1..3 { next Q if $_ == 2; say $_ } 21:50
camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!=== Error while compiling /tmp/yril2FnfqN␤Alphanumeric character is not allowed as a delimiter␤at /tmp/yril2FnfqN:1␤------> Q: for 1..3 { next Q ⏏if $_ == 2; say $_ }␤»
masak std: Q: for 1..3 { next Q if $_ == 2; say $_ }
camelia std f9b7f55: OUTPUT«===SORRY!===␤Alphanumeric character is not allowed as delimiter at /tmp/V78_cOoOhH line 1:␤------> Q: for 1..3 { next Q ⏏if $_ == 2; say $_ }␤Parse failed␤FAILED 00:00 138m␤»
masak ah; maybe not, then.
raydiak heh /me just ran into the exact same one
masak pro tip: don't name your things Q something :P
m: Q: for 1..3 { next "Q" if $_ == 2; say $_ } 21:51
camelia rakudo-moar 5ba2c8: OUTPUT«1␤3␤»
masak can always do that, I guess.
raydiak yeah Qs break things...especially solar systems and space ships
raydiak breaks down and opens vim instead of writing it as a one-liner on the command line 21:53
s/writing/debugging/
masak :)
and although the pursuit of knowledge is itself enough, you can also look at the pretty pictures at en.wikipedia.org/wiki/Tiling_by_reg...t_a_vertex 21:54
(I found that one via math.ucr.edu/home/baez/42.html ) 21:55
grondilu m: say (^2 X ^2).perl 22:00
camelia rakudo-moar 5ba2c8: OUTPUT«(0, 0, 0, 1, 1, 0, 1, 1).list␤»
masak m: say (^2 X ^2).tree
camelia rakudo-moar 5ba2c8: OUTPUT«0 0 0 1 1 0 1 1␤»
masak m: say (^2 X ^2).tree.perl
camelia rakudo-moar 5ba2c8: OUTPUT«(0; 0; 0; 1; 1; 0; 1; 1).item␤»
grondilu that's not good, is it?
masak m: say (^2 X ^2).lol.perl
camelia rakudo-moar 5ba2c8: OUTPUT«(0; 0; 0; 1; 1; 0; 1; 1)␤»
masak shrugs
looks wrong to me, but...
...I never had a working intuition about flattening, trees, and lols. 22:01
masak I just generally avoid contact with them, to be honest :) 22:01
grondilu I found this when trying to brute-force your problem
grondilu I wanted to write somthing like: for 3..* X 3..* X 3..* { next unless [<=] @$_; ... } 22:02
but that did not work out
masak quick workaround is to add `-> $p, $q, $r` 22:03
grondilu that does work indeed 22:04
vendethiel masak: definitely looks wrong to me...
but again, flattening certainly isn't my favorite p6 feature
vendethiel I often find it's a think I constantly have to keep track of in my code. It's not automatic. I'm definitely missing some use of it, though... 22:04
grondilu this kind of behavior will have to be learnt again after the GLR, I suppose, so it does not matter much right? 22:06
masak .oO( the bug was not submitted, because nobody was all that fond of flattening ) 22:08
raydiak
.oO( [BUG] implicit flattening )
22:12
vendethiel
.oO( [BUG] implicit )
22:13
raydiak masak: I have a solution, but it's kinda brain-dead and utilizes not only your hint of 10 answers, but also an arbitrarily-chosen upper bound of 100 for each var 22:23
masak raydiak: ok. I'm still interested in seeing it.
raydiak: I'll post mine if you'll post yours.
vendethiel m: 'a'->2
camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!=== Error while compiling /tmp/9tOrR4EV5a␤Unsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy block␤at /tmp/9tOrR4EV5a:1␤------> 'a'->⏏2…»
raydiak masak: gist.github.com/raydiak/a9063c068f93a162ca2e 22:25
masak raydiak: gist.github.com/masak/a26d1b2b7417b0db7a28 22:26
ok, I see. 22:27
raydiak masak: your bailout tests are what I was missing
masak I don't need the artificial upper bound because I have those tests.
raydiak yep
masak think of what we're iterating through as a simplex in some 3-space. the extra tests build the necessary walls, kind of. 22:27
raydiak ah, I see 22:29
raydiak I considered something similar to those tests, but couldn't get it into mental focus so just used the bound...after that, also considered a version which incrementally expands the bound until 10 solutions are found 22:37
dalek ast: 2e94c20 | (David Warring [email@hidden.address] | integration/weird-errors.t:
Revert "Unfudge passing test"

This reverts commit 4954d43df4525130f0fb27cc3cf48f7d4e10325e. RT #123686 Seems to be back.
22:43
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123686
avuserow_ moritz: re pygments being slow, have you compared shelling out versus Inline::Python? 22:44
pippo o/ #perl6 22:47
Kristien hello pippo 22:47
masak bye pippo 22:48
dalek p: bb5a1c1 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
add constants for C data types
22:49
nqp: f82ceb0 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
nqp: add constant for C type long
dalek kudo/nom: 7d49693 | FROGGS++ | src/Perl6/Metamodel/NativeHOW.nqp:
handle C type names in "is nativesize" trait
22:50
kudo/nom: e4811fe | FROGGS++ | / (9 files):
Merge branch 'nom' of github.com:rakudo/rakudo into longer
kudo/nom: 12bab2b | FROGGS++ | src/ (2 files):
move C type handling into traing "is ctype"
kudo/nom: a25f366 | FROGGS++ | src/ (5 files):
Merge branch 'nom' of github.com:rakudo/rakudo into longer
kudo/nom: 470a5cb | FROGGS++ | src/Perl6/Metamodel/NativeHOW.nqp:
check for int-ness in NativeHOW.compose

We get away with that in theory on moar and jvm but not on parrot. And it is certainly more correct this way.
kudo/nom: 493d73e | FROGGS++ | src/ (2 files):
Merge branch 'longer' of github.com:rakudo/rakudo into nom
kudo/nom: 127c99e | FROGGS++ | tools/build/NQP_REVISION:
get nqp with C type improvements
22:51
volaj: b6c78ed | FROGGS++ | / (8 files):
s/int/long/ and use long and int32 correctly
volaj: 6dc894e | FROGGS++ | lib/NativeCall.pm6:
use new trait "is ctype"
FROGGS I'll move NativeCall to the rakudo repo tomorrow if nobody beats me to it (I'm tired) 22:52
Mouq masak: Just saw the challenge, do p, q, and r have to be different numbers or are they any numbers of Z+ ?
masak Mouq: they can be equal.
cf. the '<=' conditions in the initial statement. :) 22:53
Mouq Oh, okay :)
Kristien reminds me of the guy who asked what kind of reverse lambda <= was in C# (lambda is (x, y) => x + y) because he didn't realise it was smaller than or equal to 22:59
masak in some BASIC variants I've used, `=>` would mean the same as `>=`. 23:00
Kristien Erlang has => and it's horrible. :(
masak it took me until C and similar languages to realize that the order between those two symbols even mattered :)
Kristien Erlang also has "and then" and "or else" to be short circuiting and "and" and "or" are strict. :P 23:03
Kristien goodbye 23:10
grondilu stumbbled upon 1+2+3+... = -1/12 again while wandering on Wikipedia. Felt like watch the relevant numberphile video again: youtube.com/watch?v=w-I6XTVZXww 23:26
maybe we should have [+] 1 .. * return -1/12 :)
masak sounds like a good job for a module :) 23:29
was it Ramanujan who first proposed that -1/12 be the answer? 23:30
Juerd I actually like the idea of hard coding that. A lot of people will probably try that one, and it'd be a great easter egg. 23:32
m: say [+] 1...
camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!=== Error while compiling /tmp/YyqTqWHOvV␤Missing semicolon.␤at /tmp/YyqTqWHOvV:1␤------> say [+] 1...⏏<EOL>␤»
Juerd Semicolon? :(
m: say [+] 1..*
camelia rakudo-moar 5ba2c8: OUTPUT«(timeout)» 23:33
Juerd -1/12 is obviously better than that.
grondilu masak: not sure Ramanujan was the first but he did discover it by himself. 23:34
colomon argh, not that -1/12 nonsense again 23:36
masak colomon: hey, nonsense? I don't think you fully appreciate the sense -1/12 is making here. 23:44
colomon blogs.scientificamerican.com/roots-...-negative/
masak colomon: interesting post. I skimmed it. 23:46
yes, of course the series doesn't converge, and it's potentially misleading to say that the sum actually is -1/12. 23:47
colomon it’s 100% misleading
masak (Evelyn Lamb)++ 23:48
'night, #perl6
grondilu colomon: what about 1 - 1 + 1 - 1 ... = 1/2? What do you think about this one? 23:51
colomon grondilu: also nonsense
grondilu well, tbh I don't quite understand why it could not be zero, since I could write it: (1 - 1) + (1 - 1) + ... = 0 + 0 + 0 + ... 23:53
colomon if you’re willing to ignore the fact it has no sum and pretend it does have one, you can do all sorts of remarkable things. ;) 23:55
grondilu what do you mean by "it has no sum"?
raydiak doesn't that violate order of operations? 23:56
grondilu raydiak: addition is associative, I can put parenthesis whereever I want.
raydiak well then I can write 1-(1+1)-(1+1)-(1+1)... L) 23:57
*:)
grondilu you can
colomon grondilu: to be precise, the series 1 - 1 + 1 - 1 + 1 … does not converge
Here’s a much more detailed explaination. 23:58
skullsinthestars.com/2014/01/18/inf...would-say/
grondilu colomon: then you're using a particular conception of what is an infinite sum. The whole point is that there might be other conceptions.
colomon “We say a series converges only if, on adding more and more terms to the sum, we find that the total gets closer and closer to a single value.”
grondilu before mathematical definitions are written down, someone had to imagine them and they did it from an idea that they have in mind. They can always refine this idea and write other definitions. 23:59
colomon Sure, if you define “sum” to mean “not a sum”, you can make it work