»ö« 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. |
|||
00:00
atta joined,
sunnavy joined,
rurban joined
00:03
FROGGS joined
00:04
Vlavv` joined
|
|||
[Coke] | rt.perl.org/Ticket/Display.html?id=120413 | 00:06 | |
TimToady | * doesn't mean "infinite", it means "arbitrarily large" | ||
which in this case, as in the case of subscripts, is naturally limited | 00:07 | ||
00:08
jnap1 left
|
|||
TimToady | you probably aren't going to read an infinite number of elements from xx * either; it will generally be limited some other way :) | 00:08 | |
00:12
Psyche^ joined
|
|||
[Coke] | S02-types/mix.t has some dubious tests. | 00:13 | |
github.com/perl6/roast/blob/master...mix.t#L262 | 00:14 | ||
unless roll is guaranteeing the spread of returned values. | |||
00:15
colomon joined
|
|||
timotimo | i'm pretty sure there's a way to properly test such things | 00:15 | |
00:16
Psyche^_ left
|
|||
[Coke] | github.com/perl6/roast/blob/master...mix.t#L277 - those 2 tests fail on rj. | 00:17 | |
00:18
rurban left
|
|||
timotimo | huh, so negative values? | 00:19 | |
r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; my @a = $m.roll: 100; say +@a.grep(* eq 'a'); say +@a.grep(* eq 'b'); | 00:20 | ||
camelia | rakudo-jvm 882e33: OUTPUT«0100» | ||
..rakudo-parrot c27c7d: OUTPUT«1000» | |||
timotimo | wait what | ||
r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; my @a = $m.roll: 25; say @a.grep(* eq 'a').join("") | |||
camelia | rakudo-parrot c27c7d: OUTPUT«aaaaaaaaaaaaaaaaaaaaaaaaa» | ||
..rakudo-jvm 882e33: OUTPUT«» | |||
timotimo | r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; say $m.total | 00:21 | |
camelia | rakudo-parrot c27c7d, rakudo-jvm 882e33: OUTPUT«1» | ||
timotimo | r: say 1.rand | 00:22 | |
camelia | rakudo-parrot c27c7d: OUTPUT«0.730592795272486» | ||
..rakudo-jvm 882e33: OUTPUT«0.5370525054723231» | |||
[Coke] | timotimo: once you've golfed it, please open an RT. ;) | ||
timotimo | the thick plottens | ||
[Coke] | looks like mixhash might have the same issue | 00:23 | |
timotimo | they derive the same method from Mixy | ||
r: my @pairs = (hello => 100, goodbye => -100); my $rand = 5.rand; my $seen = 0; my $roll; for @pairs -> $pair { next if ( $seen += $pair.value ) <= $rand; $roll = $pair.key; last; }; say $rand; say $roll; | 00:24 | ||
camelia | rakudo-parrot c27c7d: OUTPUT«2.63166102625959hello» | ||
..rakudo-jvm 882e33: OUTPUT«2.481465557745795hello» | |||
timotimo | r: my @pairs = (hello => -100, goodbye => 100); my $rand = 5.rand; my $seen = 0; my $roll; for @pairs -> $pair { next if ( $seen += $pair.value ) <= $rand; $roll = $pair.key; last; }; say $rand; say $roll; | ||
camelia | rakudo-parrot c27c7d: OUTPUT«1.59497233502165(Any)» | ||
..rakudo-jvm 882e33: OUTPUT«4.354170603807108(Any)» | 00:25 | ||
timotimo | r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; my @a = $m.roll: 25; say @a.join("") | ||
camelia | rakudo-jvm 882e33: OUTPUT«bbbbbbbbbbbbbbbbbbbbbbbbb» | ||
..rakudo-parrot c27c7d: OUTPUT«aaaaaaaaaaaaaaaaaaaaaaaaa» | |||
timotimo | ... huh | ||
[Coke] | r: my $ascii-chars = [~] chr(0)..chr(0xFF); say $ascii-chars.comb(/<:Punctuation>/).join | ||
camelia | rakudo-parrot c27c7d, rakudo-jvm 882e33: OUTPUT«!"#%&'()*,-./:;?@[\]_{}¡«·»¿» | 00:26 | |
timotimo | r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; say $m.pairs.perl; | ||
camelia | rakudo-parrot c27c7d: OUTPUT«("a" => 100000000000, "b" => 1, "c" => -100000000000).list» | ||
..rakudo-jvm 882e33: OUTPUT«("b" => 1, "a" => 100000000000, "c" => -100000000000).list» | |||
timotimo | oh, there's a b in the middle, didn't even see that | ||
[Coke] | ^^ that fails for me locally and on roast. | ||
timotimo | [Coke]: mumble mumble something something lue changed the test to fix the expectation | ||
[Coke] | er, s/fails/doesn't pass the spectest/ | 00:27 | |
timotimo | i'm not aware how negative values are supposed to work, to be honest | 00:28 | |
lue | I will valiantly hold that ¶ and § *are* punctuation characters. (They surround the « ) | ||
[Coke] | dammit, I just amex commercial email: "① Join ② Write a review ③ Get $5 credit" | ||
timotimo | the specs don't say anything about mixes and negative quantities, at least nothing that i found directly | 00:29 | |
lue | (They surround the « in the test's generated list, I should say) | ||
timotimo | if negative values mean "never gets rolled" ... | 00:30 | |
[Coke] | timotimo: spec or not, wierd that rj & rp disagree | ||
timotimo | then the negative values should be culled from the roll. and they should not contribute to the total that's used to figure out what number to roll | ||
well, here's what happens: | |||
the total is the sum of the values, which is 1 | |||
it rolls a number between 0 and the total, then looks through the list of pairs | 00:31 | ||
the first one, summing up all seen values, that's bigger than the random number gets taken | |||
00:31
rurban joined
|
|||
[Coke] | ¯\_(ツ)_/¯ | 00:31 | |
00:31
benabik joined
|
|||
timotimo | but since the number is, wrongly, between 0 and 1 instead of -1000000000000000 and 1000000000000000000001, it will just take the first low number | 00:31 | |
... er | 00:32 | ||
well, i know that's not quite accurate, but you could add and subtract ones and multiply by -1 in different places in my description and eventually you'll find the truth | |||
[Coke] | lue: should emacs git skips go in teh project, or in your local git file? (I vote the latter, but not vehemently) | ||
timotimo | point is: the algorithm behaves erratically if negative values are in the mix. | 00:33 | |
[Coke] | timotimo: but why? is there any parrot specific code anywhere? | ||
it's not failing on parrot, and is repeatably failing on the jvm. | |||
timotimo | i guess it's the hash that's used to store the data | ||
[Coke] | timotimo: ah, fair enough. | ||
timotimo | r: my $m = {a => 100000000000, b => 1, c => -100000000000}.Mix; say $m.pairs.perl; | ||
camelia | rakudo-parrot c27c7d: OUTPUT«("a" => 100000000000, "b" => 1, "c" => -100000000000).list» | ||
..rakudo-jvm 882e33: OUTPUT«("b" => 1, "a" => 100000000000, "c" => -100000000000).list» | |||
dalek | kudo/nom: e455e82 | jonathan++ | src/vm/jvm/core/Threading.pm: Flesh out Thread a little more; add $*THREAD. This provides support for giving threads names, getting a thread ID, provides a sensible stringification and enables $*THREAD as a way to get a Thread instance for the currently executing thread (including making it work on the initial thread, so that isn't a special case). |
||
timotimo | this is the trigger, the error stems from not having specced mixes well enough :P | 00:34 | |
dalek | ast: 362acca | jonathan++ | S17-concurrency/thread.t: Some initial tests for the Thread class. |
||
lue | [Coke]: I always just put them in the project I'm working on. I *could* define it globally, but I haven't :) . | ||
timotimo | huh. we could totally have a sub "isn't" rather than "isnt" | 00:36 | |
[Coke] | so save yourself the trouble for next time and put them in your file. :) | ||
jnthn | timotimo: I actually type isn't when first writing the tests :P | ||
[Coke] | r: sub isn't() { say "is so"}; isn't; | ||
jnthn | *typed | ||
camelia | rakudo-parrot c27c7d, rakudo-jvm 882e33: OUTPUT«is so» | ||
[Coke] wanders off | 00:37 | ||
dalek | kudo/nom: 78e4c21 | jonathan++ | src/vm/jvm/core/Threading.pm: Explain code's funkyness. |
00:39 | |
00:40
mattp_ joined
|
|||
jnthn | 'night, #perl6 | 00:47 | |
timotimo | r: my @foo = <foo bar baz>; my $rex = @foo.keys.map({ qq/ ["\@foo[$^idx]" || \{ die "\@foo[$^idx] is missing" }] / }).join(".*?"); say "foo meep bar meep baz" ~~ /<$rex>/ | 00:48 | |
camelia | rakudo-jvm 882e33: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match::(\SELF, int $pos):(\SELF, int $pos, Mu \$BIND):(\SELF, int $pos, :delete(:$delete)!, *%other):(\SELF, int $pos, :exists(:$exists)!, *%other):(\SELF, int $pos, :kv(:$kv)!, *%ot…» | ||
..rakudo-parrot c27c7d: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match::(\SELF, int $pos):(\SELF, int $pos, Mu \$BIND):(\SELF, int $pos, :delete(:$delete)!, *%other):(\SELF, int $pos, :exists(:$exists)!, *%other):(\SELF, int $pos, :kv(:$kv)!, *…» | |||
timotimo | r: my $foo = "hi"; my $pat = '$foo'; "hi" ~~ /<$pat>/ | 00:50 | |
camelia | rakudo-parrot c27c7d: OUTPUT«Nominal type check failed for parameter '$var'; expected Any but got NQPMu instead in method INTERPOLATE at gen/parrot/CORE.setting:12135 in regex at eval_0:1 in method ACCEPTS at gen/parrot/CORE.setting:12307 in method ACCEPTS at gen/pa…» | ||
..rakudo-jvm 882e33: OUTPUT«Nominal type check failed for parameter '$var' in method ACCEPTS at gen/jvm/CORE.setting:12277 in block at gen/jvm/CORE.setting:12175 in block at gen/jvm/CORE.setting:7216 in block at gen/jvm/CORE.setting:7080 in method gimme at gen/j…» | |||
timotimo | well, that blew up in a different way the last time i tried it ... | ||
diakopter | timotimo: isn't it, like, early morning there? :) | 01:23 | |
timotimo | errr, i should go | 01:24 | |
01:24
raiph joined
|
|||
diakopter | timotimo: eh? | 01:25 | |
01:26
risou_awy is now known as risou
01:28
ggoebel13 joined
01:29
nofks joined
01:33
ssutch joined
01:41
grondilu joined
|
|||
grondilu | rn: constant %h = <foo bar>; say %h<foo>; | 01:42 | |
camelia | niecza v24-98-g473bd20: OUTPUT«bar» | ||
..rakudo-jvm 882e33: OUTPUT«postcircumfix:<{ }> not defined for type Parcel in block at /tmp/77bOoURBF_:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196 in any …» | |||
..rakudo-parrot 78e4c2: OUTPUT«postcircumfix:<{ }> not defined for type Parcel in method gist at gen/parrot/CORE.setting:11956 in method gist at gen/parrot/CORE.setting:1014 in sub say at gen/parrot/CORE.setting:12856 in block at /tmp/EkvCe1k94M:1 in any at /tmp/…» | |||
01:42
risou is now known as risou_awy
|
|||
grondilu | rn: constant %h = hash <foo bar>; say %h<foo>; | 01:42 | |
camelia | rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«bar» | ||
grondilu | I thought the conversion was implicit, same as with: | ||
rn: my %h = <foo bar>; say %h<foo>; | 01:43 | ||
camelia | rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«bar» | ||
grondilu | see? no need to use 'hash' here | ||
BenGoldberg | rn: constant h = hash <a b>; say h<a>; | 01:44 | |
camelia | rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«b» | ||
BenGoldberg | rn: constant !h = hash <a b>; say !h<a>; | 01:45 | |
camelia | rakudo-parrot 78e4c2: OUTPUT«===SORRY!=== Error while compiling /tmp/8OPpioJVBlMissing initializer on constant declarationat /tmp/8OPpioJVBl:1------> constant ⏏!h = hash <a b>; say !h<a>; expecting any of: statement lis…» | ||
..rakudo-jvm 882e33: OUTPUT«===SORRY!=== Error while compiling /tmp/IcCIcSQjrZMissing initializer on constant declarationat /tmp/IcCIcSQjrZ:1------> constant ⏏!h = hash <a b>; say !h<a>; expecting any of: statement list…» | |||
..niecza v24-98-g473bd20: OUTPUT«===SORRY!===Missing initializer on constant declaration at /tmp/dwmeiy39wu line 1:------> constant ⏏!h = hash <a b>; say !h<a>;Negation metaoperator not followed by valid infix at /tmp/dwmeiy39wu li…» | |||
BenGoldberg | rn: constant @h = hash <a b>; say @h<a>; | ||
camelia | rakudo-parrot 78e4c2, rakudo-jvm 882e33: OUTPUT«b» | 01:46 | |
..niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Cannot use hash access on an object of type List at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.setting line 359 (Any.at_key @ 9)  at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/AF2Gh9gT4N li…» | |||
BenGoldberg | rn: my \h = hash <a b>; say h<a>; | ||
camelia | rakudo-parrot 78e4c2, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«b» | ||
01:52
bluescreen100 left
02:05
rurban left
02:09
colomon left
|
|||
Mouq | rn: my term:<!h> = hash <a b>; say !h<a>; | 02:11 | |
rn: my \term:<!h> = hash <a b>; say !h<a>; | |||
camelia | niecza v24-98-g473bd20: OUTPUT«===SORRY!===Malformed my at /tmp/pZZxUL91cQ line 1:------> my⏏ term:<!h> = hash <a b>; say !h<a>;Parse failed» | ||
..rakudo-parrot 78e4c2: OUTPUT«===SORRY!===Type 'term:<!h>' is not declaredat /tmp/Ac5r0hplvp:1------> my term:<!h>⏏ = hash <a b>; say !h<a>;Malformed myat /tmp/Ac5r0hplvp:1------> my term:<!⏏h> = hash <a b>; sa…» | |||
..rakudo-jvm 882e33: OUTPUT«===SORRY!===Type 'term:<!h>' is not declaredat /tmp/p2jtM_YEqr:1------> my term:<!h>⏏ = hash <a b>; say !h<a>;Malformed myat /tmp/p2jtM_YEqr:1------> my term:<!⏏h> = hash <a b>; say !…» | |||
niecza v24-98-g473bd20: OUTPUT«b» | 02:12 | ||
..rakudo-parrot 78e4c2, rakudo-jvm 882e33: OUTPUT«===SORRY!===No such method 'ast' for invocant of type 'NQPMu'» | |||
Mouq | :( That used to work on rakudo | ||
r: my \term:<º> = {say 'alive'}; º() | |||
camelia | rakudo-parrot 78e4c2, rakudo-jvm 882e33: OUTPUT«===SORRY!===No such method 'ast' for invocant of type 'NQPMu'» | 02:13 | |
02:14
grondilu left
02:31
GlitchMr left,
araujo left
02:32
araujo joined
02:33
johnny5_ left
02:34
johnny5_ joined
02:37
GlitchMr joined
|
|||
retupmoca | github.com/perl6/nqp/pull/147 <-- makes it easier for me to write my git-tracking gentoo ebuilds | 02:39 | |
02:41
PacoAir left
02:42
PacoAir joined
02:47
dayangkun left
02:56
raiph left
02:57
colomon joined
03:02
rurban joined
03:03
benabik left
03:06
vael left
03:07
rurban left
03:09
colomon left
03:13
araujo left
03:14
araujo joined
03:18
colomon joined
03:26
risou_awy is now known as risou
03:29
colomon left
03:33
nofks left
03:35
johnny5_ left
03:36
johnny5_ joined
03:42
johnny5_ left
03:43
risou is now known as risou_awy,
colomon joined,
johnny5_ joined
04:03
rurban joined
04:08
rurban left
04:19
Mouq left
04:20
jeffreykegler joined
04:27
jeffreykegler left
04:46
GlitchMr left
04:47
GlitchMr joined
04:48
logie joined
04:52
logie left
|
|||
TimToady | n: r: my \term:<º> = {say 'alive'}; º() | 04:53 | |
camelia | niecza v24-98-g473bd20: OUTPUT«===SORRY!===Undeclared routine: 'º' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_uni…» | ||
TimToady | nr: my \term:<º> = {say 'alive'}; (º)() | 04:54 | |
camelia | niecza v24-98-g473bd20: OUTPUT«alive» | ||
..rakudo-parrot 78e4c2: OUTPUT«===SORRY!===No such method 'ast' for invocant of type 'NQPMu'» | |||
..rakudo-jvm 882e33: OUTPUT«java.lang.OutOfMemoryError: Java heap space in (gen/jvm/CORE.setting) in (gen/jvm/ModuleLoader.nqp:349) in load_setting (gen/jvm/ModuleLoader.nqp:340) in (src/Perl6/World.nqp:304) in load_setting (src/Perl6/World.nqp:300) in (src…» | |||
TimToady | nr: say 'º' ~~ /\w/; # why º() doesn't work | ||
camelia | rakudo-parrot 78e4c2, niecza v24-98-g473bd20: OUTPUT«「º」» | 04:55 | |
..rakudo-jvm 882e33: OUTPUT«java.lang.OutOfMemoryError: Java heap space in (gen/jvm/CORE.setting) in (gen/jvm/ModuleLoader.nqp:349) in load_setting (gen/jvm/ModuleLoader.nqp:340) in (src/Perl6/World.nqp:304) in load_setting (src/Perl6/World.nqp:300) in (src…» | |||
TimToady | (other than the bug) | ||
04:55
preflex_ joined,
ChanServ sets mode: +v preflex_
|
|||
TimToady | nr: my \term:<°> = {say 'alive'}; °(); # this should work because ° is not \w | 04:57 | |
diakopter | hee | ||
camelia | niecza v24-98-g473bd20: OUTPUT«alive» | ||
..rakudo-parrot 78e4c2: OUTPUT«===SORRY!===No such method 'ast' for invocant of type 'NQPMu'» | |||
..rakudo-jvm 882e33: OUTPUT«java.lang.OutOfMemoryError: Java heap space in (gen/jvm/CORE.setting) in (gen/jvm/ModuleLoader.nqp:349) in load_setting (gen/jvm/ModuleLoader.nqp:340) in (src/Perl6/World.nqp:304) in load_setting (src/Perl6/World.nqp:300) in (src…» | |||
04:57
preflex left
|
|||
TimToady | (other than the bug :) | 04:57 | |
04:57
preflex_ is now known as preflex
|
|||
TimToady | (the reason º() can't work is that 'º(' is a longer token than 'º' is | 05:04 | |
) | |||
05:04
rurban joined
05:06
rurban1 joined
05:09
rurban left
05:10
rurban1 left
05:11
rurban joined
05:13
johnny5_ left
05:14
johnny5_ joined,
BenGoldberg left
05:18
SamuraiJack_ joined
05:23
johnny5_ left
05:24
johnny5_ joined
05:27
risou_awy is now known as risou
05:40
Vendethi_ joined
05:43
risou is now known as risou_awy
05:47
johnny5_ left
05:48
johnny5_ joined
|
|||
dalek | kudo/nom: 8e9470c | moritz++ | src/Perl6/Grammar.nqp: revert accidentally commited work towards no-strict, Mouq++ |
06:02 | |
06:08
rindolf joined
06:09
rurban left
06:17
rindolf left,
darutoko joined
06:33
daniel-s__ joined
06:39
rurban joined
06:41
FROGGS left
06:42
xenoterracide left
06:44
rurban left
06:49
pecastro left
06:53
FROGGS joined
06:57
xenoterracide joined,
dansamo joined
07:09
kaleem joined
07:15
ssutch left
07:19
ssutch joined
07:24
ssutch left
07:28
risou_awy is now known as risou
07:33
arnsholt_ is now known as arnsholt
07:40
rurban joined
07:45
risou is now known as risou_awy,
rurban left
|
|||
dalek | p: f81e259 | (Andrew Egeler)++ | tools/build/ (5 files): Add DESTDIR support for JVM/Moar install-jvm-runner and install-moar-runner were previously not aware of DESTDIR. DESTDIR was also loaded into PREFIX instead of being used directly in *-install. |
07:55 | |
p: 1168608 | moritz++ | tools/build/ (5 files): Merge pull request #147 from retupmoca/master Add DESTDIR support for JVM/Moar |
|||
07:59
FROGGS[mobile] left
08:04
baest_ is now known as baest,
zakharyas joined
08:13
lizmat joined
08:26
Vendethi_ left
|
|||
masak | good moarning, #perl6 | 08:28 | |
FROGGS | morning | 08:31 | |
08:35
iSlug joined
08:36
dansamo left
08:41
rurban joined
|
|||
lizmat | good *, #perl6 | 08:43 | |
trying to wake up after AmsterdamX meeting + barring afterwards | 08:44 | ||
08:44
Vendethi_ joined
|
|||
masak | wow, .pm meeting *and* gymnastics! | 08:44 | |
:P | |||
lizmat | mostly of the wrist :-) | 08:45 | |
08:46
rurban left
|
|||
masak | very important muscles in that area | 08:46 | |
can also be used for calligraphy | |||
lizmat | or darts: www.youtube.com/watch?v=sHnBppccI0o | ||
masak | or employee slapping | 08:49 | |
FROGGS | hehe | 08:51 | |
masak | www.satirewire.com/news/032700/sati...appy.shtml | 08:52 | |
FROGGS | I need some lunch ideas for tomorrow, any suggestions? :o) | 08:55 | |
masak | FROGGS: fry some vegetables in yummy sauces. | 08:56 | |
FROGGS | hmm, vegetables doesn't work that for my kids... except potatoes of course | 08:57 | |
I'd like it though | |||
08:58
markov joined
|
|||
FROGGS | ahh, but I remember that I wanted to make a carrot+apple salad | 08:58 | |
08:59
wbill left
|
|||
FROGGS | I think I do mashed potatoes and sausages to that | 09:00 | |
lizmat | sounds like "stamppot" to me :-) | ||
or "stoemp" as they would say in Belgium | |||
FROGGS | no, not quite | ||
lizmat: more like that: www.seelenfarben.de/lb201305/kocht130530.htm | 09:01 | ||
masak .oO( is "stamppot" at all related to "adapot"? ) | |||
FROGGS | but just that the mashed potatoes actually look tasty | 09:02 | |
masak: I have to think about the old Tripod movie when I hear adapot | 09:03 | ||
(... which was pretty scary when I was a kid) | |||
uhh www.youtube.com/watch?v=kMirslevFmw | 09:04 | ||
lizmat | FROGGS: indeed, not at all like stamppot :-) | 09:07 | |
FROGGS | well, without other vegetables, you see *g* | ||
09:08
jaffa4 joined
|
|||
jaffa4 | hi all | 09:08 | |
masak | hi jaffa4 | ||
jaffa4 | I tried to compile rakudo star. it crashes badly | ||
masak | :/ | ||
jaffa4 | when I execute perl Configure.pl --gen-parrot | 09:09 | |
masak | huh. | ||
that early? | |||
FROGGS | jaffa4: no-paste/gist the output? | ||
moritz | jaffa4: how did it crash? | ||
jaffa4 | .Can't spawn ".\test_2328.exe": Inappropriate I/O control operation at lib/Parrot/Configure/Utils.p | ||
exception code 0000005 | |||
exception code c0000005 | 09:10 | ||
fault Module Name :StackHash_0a9e | |||
FROGGS | okay | ||
jaffa4 | :\standalone\rakudo-star-2013.10\rakudo-star-2013.10\parrot\test_2328.exe<<<<< | 09:11 | |
FROGGS | jaffa4: do you have ActivePerl or strawberryperl installed? | ||
(Perl 5 that is) | |||
jaffa4 | I have everything, perl 16_2 activeperl is active now in the path | 09:12 | |
FROGGS | jaffa4: if you have another one, can you switch to it and test again? | 09:13 | |
I don't know what else to suggest | |||
I installed a parrot 5.9.0 yesterday without problems (on a win7 x64) | 09:14 | ||
JimmyZ_ | I guess you should shutdown the antivir | ||
antivirus | 09:15 | ||
test_2328.exe may be consider as virus if you didn't shutdown it | 09:16 | ||
FROGGS | true | ||
jaffa4: but also, what linenumber follows: .Can't spawn ".\test_2328.exe": Inappropriate I/O control operation at lib/Parrot/Configure/Utils.p | |||
JimmyZ_ | It may be blocked by the anti-virus | 09:18 | |
jaffa4 | it works withj Straberry | ||
at lib/Parrot/Configure/Utils.pm line 88. | |||
what is the state of Perl6 new implementation> | 09:20 | ||
FROGGS | jaffa4: please rephrase the question | 09:21 | |
jaffa4 | There is new virtual machine to be made | ||
for rakudo. | |||
FROGGS | jaffa4: ahh, yes, MoarVM | ||
moritz | nqp is bootstrapped on moarvm | ||
rakudo doesn't yet build on moarvm | |||
but it's being worked on | |||
FROGGS | it is not a new Perl6 implementation, because rakudo is the implementation, which is left almost untouched | 09:22 | |
jaffa4 | new backend | ||
JimmyZ_ | new World | ||
FROGGS | rakudo compiles a few things of itself already though on MoarVM | ||
moritz | new world order | ||
jaffa4 | What is going to be better? | ||
FROGGS | jaffa4: for what task? | 09:23 | |
jaffa4 | in the virtula mechine? | ||
FROGGS | jaffa4: what do you want to achieve? | ||
if you need to execute Perl6 of a coffee maker you want JVM backend | |||
JimmyZ_ | Everything. | 09:24 | |
FROGGS | but in my dreams MoarVM will beat all other backend, but, well, dreams | ||
jaffa4 | on a coffee maker? | ||
FROGGS | JVM runs everywhere | ||
moritz doubts that most coffee makers will have enough RAM to run rakudo | |||
FROGGS | and if you want to run perl6 in your browser, you want to wait for the JavaScript backend | ||
JimmyZ_ | buy new RAM :P | 09:25 | |
FROGGS | jaffa4: it really depends on the task | ||
jaffa4 | running an IDE? | ||
moritz | I guess the JVM will beat any other backend for long running programs in the short and mid term | ||
jaffa4 | or command line tool? | ||
FROGGS | atm parrot might be better for short scripts or one-liners | 09:26 | |
jaffa4 | for distribution? | ||
..\..\..\..\3rdparty\dyncall\dyncallback\libdyncallback_s.a(dyncall_callback.o)(.text+0x333):dyncall_callback.c: undefined reference to `dcCallbackThunkEntry' | |||
FROGGS | for long running daemons the JVM is better | ||
JimmyZ_ | FROGGS: btw: #define add_entry missing MVMROOT | ||
FROGGS | JimmyZ_: in config.c.in? ohh... | 09:27 | |
jaffa4 | I cannot compile again... see my last paste | ||
JimmyZ_ | FROGGS: yeah | ||
root temp push will be better | |||
FROGGS | jaffa4: what windows version is that? and what C compiler? | ||
JimmyZ_: patch it :o) | |||
jaffa4 | gcc (GCC) 3.4.5 (mingw-vista special r3), wiin 7 64bit | 09:28 | |
FROGGS | somebody else uses gcc on windows? | ||
09:29
risou_awy is now known as risou
|
|||
FROGGS | damn it, must go now... | 09:29 | |
bbi1h | |||
09:30
FROGGS[mobile] joined,
[particle]1 left
09:34
frdmn joined
09:38
Vendethi_ left
09:39
Vendethi_ joined
09:42
rurban joined
09:44
dakkar joined,
Vendethi_ left
09:45
risou is now known as risou_awy
09:47
rurban left
10:12
k1lldash9 left
10:20
Vendethi_ joined
10:34
daxim joined
10:37
colomon left
10:38
colomon joined
|
|||
xenoterracide | outside of source code reading is there a way to get a list of what I can do with the metaobject? e.g. something like Obj.^.^methods | 10:39 | |
masak | r: class A { method foo {} }; say A.^methods | 10:42 | |
camelia | rakudo-jvm 882e33: OUTPUT«(timeout)» | ||
..rakudo-parrot 8e9470: OUTPUT«foo» | |||
10:43
rurban joined
|
|||
masak | p: class A { method foo {} }; say A.HOW.^methods | 10:43 | |
camelia | rakudo-parrot 8e9470: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine' in method gist at gen/parrot/CORE.setting:6730 in method gist at gen/parrot/CORE.setting:1014 in sub say at gen/parrot/CORE.setting:12856 in block at /tmp/hvdqRGiKrd:1 in any a…» | ||
masak | p: class A { method foo {} }; say .Str for A.HOW.^methods | ||
camelia | rakudo-parrot 8e9470: OUTPUT«No such method 'Str' for invocant of type 'NQPRoutine' in block at /tmp/zwDsfq7m1O:1 in any at /tmp/zwDsfq7m1O:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 in any evalfiles at gen/p…» | ||
masak | p: class A { method foo {} }; say .name for A.HOW.^methods | ||
camelia | rakudo-parrot 8e9470: OUTPUT«archetypesnewnew_typeparameterizeadd_fallbackcomposerolesrole_typecheck_listconcretizationis_composedcansetup_junction_fallbackfind_method_fallbackhas_fallbacksset_namenameset_docsdocsverauthset…» | ||
masak | xenoterracide: like that? | ||
10:44
rurban1 joined
10:46
spider-mario joined
10:47
rurban left
10:48
rindolf joined
10:49
rurban1 left
10:52
pdurbin left
|
|||
lizmat | p: class A { method foo {} }; say A.HOW.^methods>>.name | 11:04 | |
camelia | rakudo-parrot 8e9470: OUTPUT«archetypes new new_type parameterize add_fallback compose roles role_typecheck_list concretization is_composed can setup_junction_fallback find_method_fallback has_fallbacks set_name name set_docs docs ver auth set_ver set_auth set_stash_type add_stash a…» | 11:05 | |
11:05
Ulti left
|
|||
xenoterracide | masak: yeah | 11:06 | |
lizmat | mostly offline while on route to Salzburg& | 11:07 | |
11:07
lizmat left
|
|||
masak | lizmat: is Salzburg the result of two neighbor cities Säureburg and Baseburg that got too close together? :P | 11:14 | |
11:17
woolfy left
11:21
Vendethi_ left
11:30
risou_awy is now known as risou
|
|||
masak | moritz: I'm doing some very intense iterative TDD development right now at $dayjob. I find 'git commit -a' to be very suitable for that. | 11:36 | |
(because I keep editing the same test file and implementation file, and it's kind of a closed system where no other files change) | 11:37 | ||
11:37
panchiniak left
11:38
fhelmberger joined
11:42
fhelmberger left
11:45
fhelmberger joined,
rurban joined
11:48
risou is now known as risou_awy
|
|||
dalek | kudo/nom: 1255967 | jonathan++ | src/vm/jvm/core/Threading.pm: Fix outstanding bug in scheduler. |
11:48 | |
kudo/nom: d9e79fb | jonathan++ | src/vm/jvm/core/Threading.pm: Add Scheduler role; provide uncaught error model. Previously, unhandled exceptions in scheduled items could just vanish. Now they will not, and there is an API for setting a per-item handler as well as the default global fallback one. Since much of this can be done independent of an individual scheduler, this is mostly pulled out into a role. |
|||
ast: c4a73f6 | jonathan++ | S17-concurrency/scheduler.t: Add some initial scheduler tests. |
11:49 | ||
11:49
rurban left
11:52
dansamo joined
11:58
Vendethi_ joined
12:01
telex left
12:02
telex joined
12:07
xinming left
12:09
pernatiy left
12:11
xinming joined
12:15
tipdbmp left
12:19
tipdbmp joined
12:30
skromnica joined,
skromnica left
12:34
kaleem left
12:38
FROGGS left
12:40
FROGGS joined
|
|||
FROGGS | jnthn: you are giving a talk about concurrency? | 12:41 | |
12:46
rurban joined
|
|||
[Coke] | masak,moritz: I almost -always- use git commit -a when I'm working. very very occasionally I'll use -p if I want to skip whitespace or debug changes. | 12:49 | |
FROGGS++ (observing jnthn's tuits are sometimes talk shaped) | 12:50 | ||
12:50
rurban left
|
|||
nwc10 | FROGGS: act.useperl.at/apw2013/talk/5183 | 12:51 | |
[Coke] heads off to a day in the ColdFusion/SQL/XHTML mines. | 12:54 | ||
13:01
FROGGS left,
FROGGS joined
|
|||
masak | [Coke]: I don't really like -a, and most of my workflows stay clear of it. | 13:01 | |
13:06
kaleem joined
13:07
ajr joined,
ajr is now known as Guest87010
13:08
Guest87010 is now known as ajr_
|
|||
arnsholt | My use of commit -a varies | 13:08 | |
Sometimes I've been focussed on one thing, in which case I'll often use -a | 13:09 | ||
But if I've been hacking on various things and need to partition stuff into several commits, I don't (obviously) | |||
13:10
panchiniak joined
13:12
SamuraiJack_ left
|
|||
masak | right. | 13:16 | |
arnsholt | In the latter case add -p tends to crop up a fair bit as well =) | 13:17 | |
masak | my threshold for "need to make sure I know what I'm committing" is probably much lower than other people's. | ||
arnsholt | Could be | ||
I usually do that with diff | 13:18 | ||
13:20
pernatiy joined
|
|||
masak | right, me too. | 13:23 | |
I usually do status + diff + 'git commit dir1 dir2 ...' | |||
hoelzro | git-add -p all the way! | 13:24 | |
masak | :) | ||
13:28
jnap joined
13:31
risou_awy is now known as risou
13:32
pernatiy_ joined
|
|||
arnsholt | Yeah, that's pretty similar to my workflow as well | 13:34 | |
13:35
pernatiy left
13:39
btyler joined
13:41
benabik joined
13:47
risou is now known as risou_awy,
[particle] joined
13:50
Vendethi_ left
13:54
bluescreen10 joined
14:03
rurban joined
14:05
Vendethi_ joined
|
|||
jnthn | FROGGS: How'd you guess... :) | 14:14 | |
14:22
pernatiy joined
14:23
pernatiy_ left
14:32
Vendethi_ left
|
|||
FROGGS[mobile] | jnthn: I am Trelawny's best boy :o) | 14:33 | |
14:38
Tom_____ joined
14:39
Tom_____ is now known as tgt
|
|||
masak | FROGGS[mobile]: that's a seriously scary notion... :) | 14:40 | |
14:40
zakharyas left
|
|||
FROGGS[mobile] | masak: that is unintended I'd say | 14:40 | |
14:42
JTAA6C59 joined
14:46
zakharyas joined
14:54
xinming left
14:56
xinming joined
15:01
xinming left,
xinming joined
15:11
pernatiy_ joined
15:12
denis_boyun joined
15:14
denis_boyun left,
pernatiy left
15:16
Vendethi_ joined
15:18
denis_boyun joined
15:22
rindolf left
15:36
denis_boyun left
15:43
denis_boyun joined
15:44
wbill joined,
Vendethi_ left
15:45
minimus joined
15:59
kaare_ joined
16:02
pernatiy joined
16:03
kaleem left
16:05
pernatiy_ left
|
|||
masak | mjd++ # perl.plover.com/yak/Moonpig/ | 16:06 | |
diakopter | rjbs++ # MoonPig | 16:10 | |
rjbs | mjd++ moonpig++ | 16:12 | |
We're actually just discussing Moonpig in IM, mjd and I. | 16:13 | ||
16:14
logie joined
|
|||
masak | I'm glad to note that many of the hard-won lessons of those slides are also themes of our courses at $dayjob. :) | 16:15 | |
the "heartbeat" design is interesting. | 16:16 | ||
16:18
tobyink joined
|
|||
rjbs | I forget whether, in those slides, heartbeat explosion is covered. | 16:18 | |
16:19
logie left
|
|||
rjbs | A ledger gets heartbeaten. It sends it to all its components in turn. Some of them (consumers) produce synthetic heartbeats across date ranges to catch up. | 16:19 | |
(Hm. Did we end up with heartbeats for those, or distinct sub-events? I don't recall.) | |||
tobyink | Are attributive parameters (S06) actually useful for much, other than initializers? | 16:22 | |
jnthn | tobyink: That's where I typically use them. They're pretty nice there :) | 16:23 | |
tobyink | I've ported most of the Perl 6 method signatures stuff to Perl 5 in metacpan.org/release/Kavorka but attributive parameters seem more effort than they're worth. I think in Moose/Mouse/Moo people tend to just rely on the default initialization. | 16:25 | |
16:26
fhelmberger left,
fhelmberger joined
|
|||
jnthn | Yeah, they kinda make the object model and parameter handling intersect, and while in Perl 6 we have both under control at the language level, I guess in Perl 5 that's a more open-ended problem... | 16:28 | |
tobyink | If you restrict it to working only in Moose classes, it's not technically a big problem. You just tie a scalar variable to the Moose::Meta::Attribute's get_value/set_value methods. A twigil can theoretically be handled (rafl has a module on github), but I'd probably stick with the "$" sigil. | 16:31 | |
16:34
nnunley joined
|
|||
TimToady | well, we've gotten burned before on things that are more ambiguous in p5 than in p6, like smartmatch vs types | 16:35 | |
if someone uses $attr in a signature, what do they really mean? with the twigil the intent is clearer | 16:36 | ||
tobyink | I was thinking along the lines of ($self: $attr is attribute) | 16:37 | |
TimToady | ah...well, that is almost longer than what it is replacing | ||
16:38
nnunley left
|
|||
tobyink | And/or allowing ($self: $.attr) in the signature, but establishing a plain $attr variable in the scope of the sub. | 16:38 | |
16:38
nnunley joined,
[Sno] left
|
|||
TimToady | but then do you auto-assign or not? | 16:38 | |
16:39
fhelmberger_ joined
16:41
[Sno] joined
|
|||
tobyink | I don't know. I think the use cases for it in p5 are minimal, and the issues make it more effort than it's worth. My time is probably better spent on implementing return types or somesuch. | 16:41 | |
16:41
SamuraiJack_ joined
16:43
fhelmberger left
16:44
fhelmberger_ left
|
|||
TimToady probably agrees :) | 16:45 | ||
dalek | p: f72fb2b | (Tobias Leich)++ | src/vm/moar/QAST/QASTCompilerMAST.nqp: handle custom_args case by allowing any number of args |
16:46 | |
tobyink | Which brings me to another question. How do return types work in list context? | ||
moritz | tobyink: t | ||
sorry | 16:47 | ||
tobyink: Lists are also objects in Perl 6 | |||
tobyink: so if a subroutine returns a list of things, its return type should better be List | |||
16:47
pernatiy_ joined
|
|||
moritz | ♪ what a wonderful world ♫ | 16:48 | |
tobyink | So the return type would be something like List<Int>? | ||
timotimo | it's spelled List[Int] here, or List of Int, but probably you want Positional[Int] instead, so it will accept parcels, arrays and lists? | 16:49 | |
16:50
pernatiy left
|
|||
diakopter | r: my Positional[Positional] @b; @b := []; | 16:52 | |
camelia | rakudo-jvm 882e33: OUTPUT«Type check failed in binding; expected 'Positional[Positional[Positional]]' but got 'Array' in block at /tmp/J7YWQfpFku:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval a…» | ||
..rakudo-parrot d9e79f: OUTPUT«Type check failed in binding; expected 'Positional[Positional[Positional]]' but got 'Array' in block at /tmp/B8yDFzFRcr:1 in any at /tmp/B8yDFzFRcr:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.n…» | |||
timotimo | hmm. even if we get filename sanitation for the comparator, we'll still get different line numbers for things due to the conditional compilation infrastructure we have | 16:53 | |
moritz | and what diakopter declares is an Array of Positional of Positional :-) | ||
tobyink | Hmmm... I'll think about how that would translate to p5. | ||
timotimo | i wonder if it makes sense to make that thing emit blank lines to match up line numbers between outputs? | ||
r: my Positional[Positional] $b; $b := []; | 16:54 | ||
moritz | tobyink: probably to either declare a List return type, or to not apply a return type at all | ||
camelia | rakudo-jvm 882e33: OUTPUT«Type check failed in binding; expected 'Positional[Positional]' but got 'Array' in block at /tmp/bNEx_IvsKY:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/st…» | ||
..rakudo-parrot d9e79f: OUTPUT«Type check failed in binding; expected 'Positional[Positional]' but got 'Array' in block at /tmp/oQ3yi9Ch1S:1 in any at /tmp/oQ3yi9Ch1S:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 …» | |||
timotimo | hm. well. our constants are never typed, right? | ||
moritz | they aren't | ||
arnsholt | Not yet, IIRC | 16:55 | |
timotimo | i'm wondering if and when i should start thinking about making that change ... there's stuff like turning <foo bar baz> into a Positional[Str] at compile time, but also there's the thing where <1/5> is supposed to be something like a RatStr | ||
moritz | rjbs: as someone who has to maintain the accounting & billing code at $work (mostly a single subroutine with 2.5k lines of tightly coupled Perl code), I really enjoy seing a sane design in that area | ||
arnsholt | Due to package variables not having containers or something along those lines | 16:56 | |
timotimo | oops. i didn't mean "our constants" in monospaced font | ||
i mean "the constants we create at compile time as a result of parsing" | |||
my bad. perl is too much like english to be embedded into english without some kind of quoting :P | |||
moritz | giving those narrower types looks very dangerous | 16:57 | |
my $x = [1, 2, 3]; $x.push: 'foo'; # BOOM! | |||
timotimo | ah, hm. | ||
16:57
kaleem joined
|
|||
rjbs | moritz: I feel your pain. | 16:57 | |
timotimo | so it should only happen for actual constants | ||
rjbs | moritz: We still have one legacy billing system in place, an old version of FreeSide. Pain. | 16:58 | |
timotimo | but that's hard to figure out. when is a <foo bar baz> just passed into a function and then introspected and when is it re-used to house some integers as well? | ||
i suppose i should drop it for the time being. | |||
ah, "allomorphic" is the word i was looking for for the other part of the questio | 16:59 | ||
moritz | timotimo: <foo bar baz> is a parcel (of non-containers), and thus immutable | ||
16:59
pernatiy_ left,
panchiniak left
|
|||
moritz | rjbs: but you are replacing it, I hope? | 17:00 | |
TimToady | tobyink: please note that the return model is very different in p6, since list context is lazily applied to the return value, not known (mostly) at compile time | ||
there's no wantarray in P6 | |||
rjbs | moritz: Hopefully. It is much less painful than the old system we replaced already, so there is not as much pressure. | 17:01 | |
TimToady | what's really returned is a parcel, which hasn't committed to list/scalar context yet | ||
rjbs | TimToady++ # no wantarray | ||
17:02
cbk1090 joined
|
|||
TimToady | that being said, if a return type is declared, it can supply context sooner than that | 17:02 | |
such as moritz++'s suggested List return | 17:03 | ||
cbk1090 | TimToady, do you have a bit of time to help me with you XML module....? or maybe can point me to some example code. | 17:04 | |
s/you/your | |||
TimToady | goodness, that's ancient history | ||
cbk1090 | TimToady, sorry I like it | 17:05 | |
is there something better? | |||
17:05
daxim left
|
|||
TimToady | well, depends on the application | 17:05 | |
cbk1090 | I'm using it for my database program I'm making | ||
TimToady | if you need to manage the whole tree, then my old module is okay; there are others like XML::Twig that just look for various subtrees to process | 17:06 | |
17:06
ajr_ left
|
|||
timotimo | S02:4590 says the user may want to write a list of numbers with angle brackets (and i agree that it's a nice way to do it), but then S02:4595 speaks about using + or ~ as the prefix to force interpretation as a number. does that mean the user should +<< < 1 2 3 4 > if they want a list of numbers rather than strings in this case? | 17:07 | |
synopsebot | Link: perlcabal.org/syn/S02.html#line_4590 | ||
TimToady would have to reread the docs to remember all the APIs though... | |||
timotimo | (the links were off by one paragraph >_>) | ||
17:07
ajr joined,
ajr is now known as Guest51379
|
|||
cbk1090 | I want to make a line like this: <record id="1" date="10/30/2013"><topic>some topic</topic><remarks>some text here</remarks></record> | 17:07 | |
TimToady | timotimo: yes, a hyper would be appropriate for that | 17:08 | |
17:08
Guest51379 is now known as ajr_,
rindolf joined
|
|||
timotimo installs chrome.google.com/webstore/detail/...e-ntp-icon to better use the synopses | 17:08 | ||
17:09
kaleem left
|
|||
timotimo | huh. that doesn't seem to work at all | 17:09 | |
TimToady | cbk1090: unfortunately, I switched to using YAML more than a decade ago for most such things, and don't remember much (or actively forgot it :) | ||
timotimo | hum. i don't think hypers can be compile-time evaluated yet | 17:11 | |
TimToady | well, they can be, but aren't | ||
cbk1090 | TimToady, ok no prob. I'll keep plugging away at it. Thanks for providing it as a Module. :-) | ||
TimToady | (Tim Bray)++ put me up to it | 17:12 | |
[Coke] | afternoon, sixers. | ||
TimToady | interestingly, doing XML and seeing the impedance mismatch between C structs and Perl hashes is part of what clued me into the need for representational polymorphism in P6 | 17:13 | |
cbk1090 | oh, well i just need it for a text based database. | 17:14 | |
TimToady | it's probably okay for that, if you don't push it on performance | ||
moritz recommends base64-dumps of sqlite for text based databases | |||
cbk1090 | nothing fancy just a place where i can store my passwords and keep track of fuel cost, ext... | 17:15 | |
17:15
sftp_ joined
|
|||
cbk1090 | also planning on using same database as a way to publish a simple blog. | 17:15 | |
17:15
ajr_ left
|
|||
cbk1090 | <topic>blog</blog><remarks>this would be like a blog entry record.</remarks> | 17:16 | |
17:16
sftp left
|
|||
cbk1090 | <topic>blog</topic><remarks>this would be like a blog entry record.</remarks> | 17:16 | |
thats right | |||
TimToady | plugging in the expat parser to a suitable repr might be a good show of how polyrep is a win in p6 | 17:18 | |
if someone is looking for a small project :) | 17:19 | ||
arnsholt | And it'll give us an XML parser, without having to wrap LibXML, which is kind of big | 17:20 | |
masak | +1 | ||
17:22
tobyink left
17:23
zakharyas left
|
|||
jaffa4 | when are you going to have Rakudo Star 10 for WIndows? | 17:26 | |
17:26
cbk1090 left
17:27
cbk1090 joined
|
|||
masak | whenever someone rolls an .msi, I guess. | 17:27 | |
moritz: did you know the trick described in this post? blog.plover.com/prog/intervals.html -- I didn't. | |||
PerlJam | "trick"? | 17:28 | |
weird. I just thought that's how you do it. (and that this was the first time MJD had run across the problem) | |||
17:28
sftp joined
17:29
cognominal left,
sftp_ left
|
|||
masak | PerlJam: if I hadn't read that post, I would have implemented it like mjd did the first time around (but with all three cases, including the smaller-in-larger case) | 17:31 | |
FROGGS | jaffa4: that is on my list for tonight/tomorrow | 17:32 | |
jaffa4 | FROGGS: I see, how are you going with perl5 on rakudo? | 17:33 | |
FROGGS | jaffa4: stalled a bit atm, because spectesting takes about 50 minutes... my hopes go into moarvm backend and therefore shorter test cycles | 17:34 | |
TimToady | well, you could fix things one test at a time, and then check for regressions when you go to bed :) | 17:36 | |
FROGGS | jaffa4: and when jnthn++ has some time for me, there are some minor issues that need to be fixed in order to make it a proper module | 17:37 | |
jaffa4 | FROGGS: what is its state anyway? | 17:38 | |
FROGGS | TimToady: the problem is that when I fix/implement one thing, the regressions pop up in very strange places... so I have to run a spectest almost every time | ||
jaffa4: it passes 4407 of around 40000 tests, so, it is already somewhat usable :o) | 17:39 | ||
jaffa4 | FROGGS: cannot you run them in parallel? | ||
FROGGS | one major problem is that it is missing the Perl5 ore modules | ||
core* | |||
jaffa4: I could, but this breaks some tests (just two or three) | 17:40 | ||
TimToady | it also kinda sounds like you've started to hit the point where the spec tests are forcing you to implement some of the insanity the same way p5 does it :) | ||
FROGGS | using four cores it takes about 20 minutes | ||
ingy | TimToady: ♥ | ||
FROGGS | TimToady: exactly | ||
jaffa4 | How about distributed testing? | 17:41 | |
FROGGS | did I mention that I *hate* indirect object syntax? | ||
jaffa4: I thought about it, but that's all | |||
diakopter | FROGGS: just lookahead a few.. :) | ||
ingy | TimToady: YAML*.pm is under heavy dev right now, so if you have any 10 years frustrations lemme know | 17:42 | |
TimToady | mostly having to guess about Unicode, and usually guessing wrong | 17:43 | |
17:51
jeffreykegler joined
|
|||
dalek | p: d7151b3 | (Tobias Leich)++ | / (2 files): mapped nqp::getpid |
17:51 | |
17:52
tobyink joined
17:55
SamuraiJack_ left
17:56
cbk1090 left
17:58
darutoko left
|
|||
timotimo | TimToady: do you have something to say about how negative values in a Mix should influence the selection of elements from the Mix? | 17:58 | |
TimToady | erroneous, maybe | 17:59 | |
only Mixy[Unum] supports .roll ? | 18:01 | ||
timotimo | well, the current way it works is b0rked indeed. there's a spectest that seems to suggest negative means "will not be picked, ever" | 18:02 | |
Mixy is currently non-parametric, though | 18:04 | ||
18:04
dakkar left
18:11
tobyink left
|
|||
TimToady | not that Unum exists either... | 18:13 | |
timotimo | right. should .roll die if there's a negative number in the pairs? should there be a test case to check that it doesn't live? | 18:14 | |
dalek | ast: aa0f747 | jonathan++ | S17-concurrency/promise.t: Some initial tests for Promise. |
18:15 | |
timotimo | questhub.io/realm/perl/quest/52714c...c02600004d - you can cheer me on if you want :P (implement eqat and get it into master) | 18:16 | |
(hum, maybe dalek could report quests being created with perl6 as the tag in the perl realm? would that be interesting?) | 18:17 | ||
masak | timotimo: we could try it. maybe as a one-liner. | 18:19 | |
also, "go go go timotimo! \o/" :) | 18:20 | ||
timotimo: something like <dalek> questhub: nqp: implement and use eqat op on all backends -- questhub.io/realm/perl/quest/52714c...c02600004d | |||
timotimo | the dalek information is in Mu, right? | 18:21 | |
how to set it up and stuff? | |||
moritz | speaking of which, the code generation for scanning regexes on the JVM still doesn't use index | 18:22 | |
18:22
tgt left
|
|||
moritz | timotimo: I don't think so | 18:23 | |
18:24
Tom_ joined
|
|||
moritz | timotimo: I know it involves git://github.com/Infinoid/dalek-plugins.git somehow | 18:25 | |
18:26
dansamo left
|
|||
timotimo | i was refering to the documentation of the webhooks thing we've got for the commits | 18:27 | |
something similar should be doable for questhub, no? | |||
retupmoca | timotimo: are you talking about this: github.com/perl6/mu/blob/master/mi...k-push.txt | 18:28 | |
ooh, nqp commit-bit | 18:32 | ||
it must only be rakudo that requires the paper signed? | 18:33 | ||
jnthn | retupmoca: Correct | 18:35 | |
rjbs wonders when we'll be able to port Marc L.'s modules to perl 6. | |||
lue | hello world o/ | 18:40 | |
18:41
FROGGS left,
FROGGS joined
18:42
wbill left
18:46
wbill joined
|
|||
TimToady doesn't classify modules by who wrote them, which is probably an autistic failure mode :) | 18:47 | ||
TimToady doesn't much track actors names either: "the guy who played Boromir in the LotR" | 18:49 | ||
rjbs | Normally, I have no reason to classify them as such. It's only when the person who wrote them has a personality that overshadows the code... | 18:50 | |
TimToady doesn't know anyone like that :) | 18:51 | ||
rjbs | Best line from the Washignton Post in a while: "Two engineers with close ties to Google exploded in profanity" | 18:54 | |
TimToady | I'd probably have heard any explosions from here, given how close I live to Google... | 18:55 | |
lue | how are the Profanity city PD dealing with it? | 18:56 | |
retupmoca | PCPD? | 18:58 | |
rjbs | I hate that fucking place. | ||
TimToady utters a string of confanity | |||
rjbs | Unicode 7 needs more grawlix. | ||
I think it's crazy that we have no "PLANET SATURN." | |||
TimToady | .u ♄ | 18:59 | |
FROGGS | ENOYOLEAUX | ||
rjbs | TimToady: Hey, buddy, you show me an Andy Capp where he said that while fighting and I'll drop my complaint. | ||
lue | .oO(I'm telling you, say "⚂".char-name would solve our problems.) |
||
TimToady | which reminds me, we need a consistent specced way to look up unicode props | 19:00 | |
geekosaur | preflex: seen yoleaux | 19:01 | |
preflex | yoleaux was last seen on #perl6 4 days, 23 hours, 39 minutes and 11 seconds ago, saying: 18:23Z <diakopter> Mouq: awesome work on stdsigspace Mouq++ | ||
geekosaur | :( | ||
lue | .oO(Mouq's gotten a lot of accidental karma from people seen-ing yoleaux :P) |
||
rjbs | TimToady: Have you discussed/tackled the problem, yet, of properties on trans-Unicode codepoints? | ||
19:02
dmol left
|
|||
TimToady | we're still having enough trouble with the cis-Unicode codepoints | 19:02 | |
rjbs | We just recently had a discussion about it. It'll definitely be something to consider. | 19:03 | |
19:04
dmol joined
|
|||
lue | TimToady: my first thought is either .uni-info(:propname, :prop2) or a Codepoint object that has properties as methods. "ABCD".comb».Codepoint».cclass | 19:04 | |
TimToady | we don't necessarily need another char type where integers will do | 19:06 | |
though methods do have their notational convenience, I'll admit | 19:07 | ||
lue | I was thinking the Codepoint object stores the unicode information (maybe even to has $.cclass visibility), but sub/methods on an integer (such as 0x2A03) would do just as fine. | ||
TimToady | methods might work better where hypers are wanted | 19:09 | |
lue almost doesn't like the idea of a bunch of methods (thus the Codepoint object to put them in one place), but reminds himself that the adverb route has just as many name definitions. | 19:11 | ||
19:13
mathw_ left
19:23
jeffreykegler left
19:28
fhelmberger joined
19:37
fhelmberger left
|
|||
moritz | masak: qandwhat.apps.runkite.com/i-failed-...interview/ 2D version of t4 asked in an interview :-) | 19:41 | |
masak | nice :) | 19:42 | |
skimming it, I don't think that solution generalizes to t4's 3D at all. | 19:44 | ||
still very interesting, of course :) | |||
19:47
fhelmberger joined
19:49
fhelmberger left
|
|||
moritz | agreed on both points | 19:49 | |
masak | today's mini-challenge: write a nice p6 solution that passes all of the test cases at gist.github.com/igor47/7228586 | 19:50 | |
I won't have time for it myself, but I wish I did. | |||
19:51
sqirrel joined
19:54
rindolf left,
fhelmberger joined
19:55
fhelmberger left
|
|||
japhb__ | jnthn: In designing a multi-level API (low-level operations, medium-level wrappers, high-level convenience), how do I structure the code so that I can make it as efficient as possible? Right now I'm assuming all the levels (except maybe the very top) should be in the same file/comp_unit, written as modules with exported subs, using last-expression-value returns rather than return statements. | 20:01 | |
Is that correct so far? Do I still need to add 'is pure' for purely functional routines, or can that be intuited if all the ops within are pure? | 20:02 | ||
masak | japhb__: how important is performance? | ||
japhb__ | masak: As fast as Rakudo can possibly go. | ||
20:02
tobyink joined
|
|||
lue | masak: please tell me this t4 doesn't have a "number of solvable boards" question to go along with it :) | 20:03 | |
japhb__ | masak: Let's just say hand-coded C++ versions of this code are a performance bottleneck | ||
masak | lue: nope :) | 20:04 | |
japhb__: then (my point is) it sounds like you have a vested interest to measure decisions like the above. | |||
lue: in fact, t4 is much less of a "hah! gotcha!" task this year than the previous two years. | 20:05 | ||
lue: but still pretty subtle. | |||
japhb__ | masak: I'm trying to prune the decision space. If jnthn knows from his optimizer work that a certain decision disables an entire class of optimizations, that prunes out a big chunk of a combinatorial space that would take me quite a while to explore if unpruned. | ||
moritz | japhb__: note that *only* constant folding considers 'is pure' right now | 20:06 | |
japhb__ | What is necessary to do or avoid for inlining to work? | ||
masak | japhb__: ooc, are we talking Rakudo on the JVM? | 20:08 | |
if we are, then you're likely to get a lot of JIT for free. | |||
japhb__ | masak: I'll take JVM. I'd love to be prepared for Moar. (Meaning, not have to redesign the API to deal with a different set of requirements for optimization.) | 20:09 | |
.oO( Write Once, Suck Less Everywhere ) |
|||
20:10
lowpro30 joined
|
|||
arnsholt | Inlining and other optimiser decisions sounds like a thing to add a pragma for | 20:11 | |
20:12
lizmat joined
|
|||
japhb__ | arnsholt: How does that help? I can certainly see a case for optionally turning them *off*, but generally you want the equivalent of -O2 to be the default, neh? | 20:13 | |
20:14
woolfy joined
|
|||
arnsholt | Not turning off, but tracing | 20:16 | |
I was a bit unclear about that | |||
But logging the decisions made, so that it actually tells you what gets inlined and what doesn't | |||
So that people don't have to guess about this kind of thing =) | 20:17 | ||
20:17
[particle] left
|
|||
FROGGS | jaffa4: you wanna test? froggs.de/perl6/rakudo-star-2013.10-RC0.msi | 20:17 | |
jaffa4 | FROGGS:ok | ||
FROGGS | jaffa4: but rename your C:\rakudo before installing it | 20:18 | |
jaffa4 | FROGGS: it does not let me choose directory | 20:19 | |
moritz | because parrot isn't relocatable | ||
japhb__ | arnsholt: Oh yes, that would be very helpful. | 20:20 | |
20:21
denis_boyun__ joined,
denis_boyun left
20:22
bluescreen10 left
|
|||
jaffa4 | Failed to create directory 'blib/lib\Path/' with mode '0o777': mkdir failed: The system cannot find the path specified. | 20:22 | |
I tried to use panda | 20:23 | ||
lue | r: say $_ for 5^...1; # :( | ||
camelia | ( no output ) | ||
FROGGS | ==> Successfully installed NativeCall | 20:24 | |
moritz | \o/ # empty range is empty | ||
FROGGS | jaffa4: it works on my box | ||
jaffa4 | FROGGS: I managed to nstall it but panda does not seem to work | ||
good for you? | |||
20:24
bluescreen10 joined
|
|||
lue | any idea why ^... doesn't work? | 20:25 | |
FROGGS | Failed to remove the directory '.work\1383164610_1\lib': rmdir failed: The directory is not empty. | 20:26 | |
-.- | |||
20:26
fhelmberger joined
|
|||
moritz | lue: because the range is empty | 20:26 | |
lue | but... | ||
moritz | oh, it's a series | ||
that's not good | |||
20:26
stevan_ left
|
|||
moritz | r: .say for 5...1 | 20:27 | |
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«54321» | ||
lue | It's kinda critical for a cool-ish looking version of the Python gist masak mentioned :) | ||
FROGGS | lue: btw, your 2013.10 tar.gz lacks modules/file-find and modules/shell-command | ||
jaffa4 | panda install Text::Markov | ||
Failed to create directory 'blib/lib\Text/' with mode '0o777': mkdir failed: The system cannot find the path specified. | |||
masak | waitwait, is ^... even an operator? | 20:28 | |
FROGGS | C:\rakudo>panda install Text::Markov | ||
==> Fetching Text::Markov | |||
==> Building Text::Markov | |||
masak | I know ...^ is, but... | ||
FROGGS | but I am on WinXP currently | ||
masak | std: 5^...1 | ||
camelia | std 8adbc60: OUTPUT«ok 00:01 122m» | ||
FROGGS | jaffa4: now I get the same error message like you | ||
lue | FROGGS: I have those two directories, so the makefile must've missed them :( | ||
masak | I'm wondering if that doesn't parse as 5 ^.. .1 | 20:29 | |
std: 5 ^... 1 | |||
FROGGS | lue: can you zip those two for me? I wonder if the mkdir errors come from outdated shell-command | ||
camelia | std 8adbc60: OUTPUT«===SORRY!===Bogus term at /tmp/0vx8OTR9RB line 1:------> 5 ^..⏏. 1Parse failedFAILED 00:01 122m» | ||
masak | lue: see? bogus. | ||
lue: serves you right for not using whitespace around your infix operators :) | 20:30 | ||
lue | masak: either give me a ^... or a ^.. that can do the apparently arcane magic of descending numbers. | ||
masak: I already tried whitespace and knew of the concat error. | |||
FROGGS: where would I upload the tarball? | |||
moritz | r: .say for [5...1][1..*] | ||
FROGGS | to a place of your choice | ||
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«4321» | 20:31 | |
timotimo | what's the current procedure to generate new bootstrap for parrot and jvm? | ||
moritz | lue: you can always use that :-) | ||
FROGGS | lue: or mail it to me :o) | ||
moritz | timotimo: aren't there make targets for that? | ||
lue | FROGGS: I don't have a good place to upload, so if you privmsg your email, that'd be good. | ||
timotimo | are there two now? | ||
FROGGS | timotimo: there are three | ||
make <[pmj]>-bootstrap-files | 20:32 | ||
timotimo | excellent | ||
moarvm already has eqat_s, so no need to regenerate the bootstrap files there | |||
20:33
woolfy left,
woolfy joined
20:34
Rotwang joined
|
|||
moritz | why does that even need a bootstrap update? | 20:34 | |
masak | lue: re "apparently arcane magic of descending numbers" -- you apparently have never felt the pain of a range that doesn't become empty when the endpoints are in the wrong order. | ||
lue: just do 4...1 and be done with it. | |||
moritz | the old bootstrap files that don't use eqat_s should still work, no? | 20:35 | |
lue | masak: that means an ugly (*ugly*) +@elems-1 that I really don't think I should have to do :/ (moritz's solutions seems good though) | ||
FROGGS | you only need to update bootstrap-files if you want to use eqat_s in nqp | 20:36 | |
masak | lue: I like to write reverse ranges like this: `reverse 1 ..^ 5` | ||
lue: very readable -- the word 'reverse' is even in there! | |||
20:36
sqirrel left
|
|||
masak | documentation as code. | 20:37 | |
FROGGS | For 1 To 5 Do ' documentation as code | ||
lue | I kinda wish 1 R..^ 5 or R(1..^5) or [R] 1..^5 DWIMmed. (If you can't tell, I'm trying to prefer cooler-looking constructs here! :P) | 20:38 | |
masak | lue: that's not what R means. | 20:39 | |
lue | I know :) (then why do I remember a use of R that flipped a list...?) | 20:40 | |
timotimo | moritz: yes, they should, but i'd like to use eqat in the nqp source code :) | ||
masak | but there's nothing to stop you from defining either of those crazy operators, I guess. | ||
LTM will do the rest. | |||
timotimo | (actually not called eqat_s) | ||
lue | I'll workaround of course, but I'm still miffed that, for example, 5..1 doesn't work. I've never been able to understand that one, actually. (I'm also now miffed by the curious non-existence of ^... but that's another thing) | 20:41 | |
masak | lue: until you understand that one, take it from people who have either felt the pain directly, or been able to extrapolate it from circumstantial evidence :) | 20:42 | |
20:42
cognominal joined
|
|||
masak | lue: you'll have to take up ^... with TimToady. I'm sure there's a very good reason. | 20:43 | |
timotimo | lue: last time i tried to understand, it seemed like ".. is not supposed to be smart enough for that" | ||
... will do it for you, though | |||
masak | indeed. | ||
20:43
fhelmberger left
|
|||
lue | Until I understand it, I will always say "die on 5..1" it's a bogus limitation :) | 20:43 | |
timotimo | :) | ||
lue | s/it's/is/ | ||
moritz | or you can just say 5 - 1 ... 1 | ||
masak | yeah, infix:<..> means "range *counting up*". note how we also ditched the :by(2) idea, sticking all of the magic in infix:<...> | 20:44 | |
lue | moritz: but -1 is for languages that don't have ^..^ ! :) | ||
masak | this is a *good thing*, and if you disagree, do try to keep your complainin' to a minimum. :) | ||
std: 5..1 | 20:45 | ||
camelia | std 8adbc60: OUTPUT«ok 00:01 122m» | ||
masak | could do with a compile-time warning on that one, I guess. | ||
japhb__ | r: say [R,] 1..^5 | ||
camelia | rakudo-parrot d9e79f: OUTPUT«Too many positional parameters passed; got 4 but expected 2 in block at gen/parrot/CORE.setting:16422 in sub at gen/parrot/CORE.setting:16529 in block at /tmp/MZz9SSn2al:1 in any at /tmp/MZz9SSn2al:1 in any at gen/parrot/stage2/N…» | ||
..rakudo-jvm 882e33: OUTPUT«Too many positional parameters passed; got 4 but expected 2 in block at /tmp/o_031j9iTU:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196…» | |||
japhb__ | awww | ||
lue | Well, at least I see how (apparently) descending simple lists is bad for .. , but I'll talk to TimToady tonight (if he'll be around) about ^... | ||
r: .say for 1...5 | |||
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«12345» | ||
lue | r: .say for 1...^5 | ||
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«1234» | ||
lue | r: .say for 1^...^5 | ||
camelia | rakudo-jvm 882e33: OUTPUT«===SORRY!=== Error while compiling /tmp/ixENlC94xYConfusedat /tmp/ixENlC94xY:1------> .say for 1^...^⏏5 expecting any of: dotty method or postfix» | ||
..rakudo-parrot d9e79f: OUTPUT«===SORRY!=== Error while compiling /tmp/SwcOzA_BuaConfusedat /tmp/SwcOzA_Bua:1------> .say for 1^...^⏏5 expecting any of: dotty method or postfix» | |||
masak | lue: ISTR mjd has a good comment about it in a blog post somewhere. | 20:46 | |
lue: but basically it's about programmer expectations. | 20:47 | ||
timotimo | i wonder how much faster nqp::eqat is than nqp::index(...) == 0 | ||
masak | lue: when a coder writes 1..$end in their code, she's *thinking* "from 1 *up to* $end" | ||
timotimo | for the cases it's used in, it probably doesn't change performance much | 20:48 | |
but it still seems cleaner to me :P | |||
masak | lue: she's not thinking "from 1 up to $end *or down to it if $end < 1*" | ||
lue: so it's a kind of conservative application of the DWIM principle, actually. | |||
lue would like to think he'll get bit by it someday, but it won't happen in Perl 6 ;) | |||
masak | or, more precisely, it's the Principle of Least Surprise. | 20:49 | |
as in the DWIM you're proposing is not worth the WAT it introduces. | |||
lue | What doesn't help is that I see .. and I think "generate a sequence of consecutive integers from LHS to RHS" | ||
FROGGS | jaffa4 / lue: that didn't help :( | ||
masak | lue: this is why language design is interesting. your idea seems reasonable *on the surface*, but applied in an actual programming language, it's crap. | 20:50 | |
lue | (and ... is for magical lists, like evens or %% 3) | ||
masak | lue: right. | ||
lue: TimToady happens to be really, really good at anticipating the way features can come back and bite users. or the way features will interact. | 20:51 | ||
20:51
ssutch joined
|
|||
masak | (and still, Perl 6 has changed quite a lot over the years due to things none of us could predict.) | 20:51 | |
lue | r: sub infix:<.>($lhs, $rhs) { try { return $lhs...$rhs } }; say $_ for 1.5; say $_ for 5.1; # :D | ||
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«1.55.1» | 20:52 | |
lue | *headdesk* | ||
timotimo | ERROR: Unknown flag --version. USAGE: moar / just an outdated moarvm? | ||
lue | *headdesk* x2 | ||
masak | lue: go back to square "how does term parsing work". | ||
lue | *headdesk* x3 | ||
r: sub infix:<.>($lhs, $rhs) { try { return $lhs...$rhs } }; say $_ for 1 . 5; say $_ for 5 . 1; # :D | |||
camelia | rakudo-jvm 882e33: OUTPUT«(timeout)» | ||
..rakudo-parrot d9e79f: OUTPUT«===SORRY!=== Error while compiling /tmp/2jO09VzhKaUnsupported use of . to concatenate strings; in Perl 6 please use ~at /tmp/2jO09VzhKa:1------> return $lhs...$rhs } }; say $_ for 1 . ⏏5; say $_ for 5 . 1; # :…» | |||
masak | :) | 20:53 | |
lue | (that try { } is a leftover) | ||
Bad Perl6! | |||
masak | well, obviously you're trying to concatenate strings, you bad p5 user. | ||
lue | r: supersede sub infix:<.>($lhs, $rhs) { try { return $lhs...$rhs } }; say $_ for 1 . 5; say $_ for 5 . 1; # :D | ||
camelia | rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space in (src/Perl6/Grammar.nqp) in (src/vm/jvm/ModuleLoader.nqp:62) in (src/vm/jvm/ModuleLoader.nqp:52) in load_module in » | 20:54 | |
..rakudo-parrot d9e79f: OUTPUT«===SORRY!=== Error while compiling /tmp/aNkEHGiyHPCannot use 'supersede' with sub declarationat /tmp/aNkEHGiyHP:1------> hs, $rhs) { try { return $lhs...$rhs } }⏏; say $_ for 1 . 5; say $_ for 5 . 1; #  …» | |||
FROGGS | timotimo: we have --version since 2013.10 | ||
timotimo | makes sense | ||
masak | lue: clearly tonight you are trying to be the unreasonable man on which progress depends. | 20:55 | |
lue | I'm sure TimToady will enlighten as to why my DWIMs and WATs on .. are inverted tonight :) | 20:56 | |
masak | I thought I explained it already. :) | ||
Tene | masak: I fail to imagine a case where I'd expect to rely on a range being zero when the end is lower than the start. | 20:57 | |
Any handy intuition pumps? | |||
jnthn | japhb__: for performance: native int over Int is usually a win as you'll get operators inlined as well as the ops just being cheaper. For inlining, subs and multi-subs that are compile-time determinable will cut it, though they need to be simple. Inlining will work between compilation units; has to or we could never inline things from the setting. If creating lots of objects, write a custom BUILD rather than relying on the default thing. | ||
20:57
BenGoldberg joined
|
|||
masak | Tene: I'll try to think of a real-enough-world case. | 20:58 | |
lue | masak: you did, but I still can't imagine a specific case where I'd go "gee, sure is handy .. can't create a list of descending integers" | ||
20:58
woolfy left
|
|||
jnthn | japhb__: Also try --optimize=3 but I know that it does at least one thing wrong that breaks spectests, even if compiling CORE.setting with it works out. | 20:58 | |
20:58
lizmat left
|
|||
masak | lue: the feature is not that can't deliberately create them, the feature is that you can't *accidentally* create them. | 20:59 | |
Tene | lue: you're not completely anomalous; I'm with you so far. | ||
lue | 5 .. 1 :yes-i-bloody-mean-it then :) | ||
Tene | :yes-i-bloody-mean-it is perhaps spelled . ;) | 21:00 | |
lue | 5 .. 1 . ? | ||
:) | 21:01 | ||
21:02
lizmat joined
|
|||
lue | (As a reminder, this discussion wouldn't've happened if ^... was a thing. It led to me wanting .. (and by extension ^..) to do what ... does and ^... should be doing) | 21:02 | |
masak | lue: what list do you expect '10, 9, 8 ^... 5' to result in? | 21:03 | |
lue | The same one ... generates, but without the 10. Clearly :P . | 21:04 | |
jaffa4 | FROGGS: what will happen? | ||
lue resorted to a ..^ list and then reversing the populated array, in any case. | |||
timotimo | i can kind of see wanting to leave out the starting value for some kinds of sequences | 21:05 | |
but i can't think of an example | |||
Util | masak: I gave some thought to that last week; 10, 9, 8 ^... 5 should produce 9,8,7,6,5; the 10 is just extra info fed to the sequence predictor routine. | ||
masak | ok, so we should have the full set of ... ...^ ^... ^...^ ? | 21:06 | |
Util | Yes. Least suprise after one learns of .. ^.. ..^ ^..^ | ||
masak | Util: what about 1, 2, 3 ... 10, 20, 30 ^... 100 ? | 21:07 | |
FROGGS | jaffa4: well, one (like me) has to debug it | ||
Util | We have ^... now | ||
masak | no, we don't. | ||
Util | I mean ...^ - typo | ||
lue | masak: I want to say 1, 2, 3 ... 10, 20, 30 ^... 100 leaves out the 1 . But if ... does that kind of magic, we almost should have another operator that lets me do exclude-first descending numbers, without all the debug hell adding ... variants apparently would cause ;D | 21:08 | |
21:08
benabik left
|
|||
masak | r: .say for 1, 2, 3 ... 10, 20, 30 ... 100 | 21:09 | |
21:09
benabik joined
|
|||
camelia | rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space in (src/Perl6/Grammar.nqp) in (src/vm/jvm/ModuleLoader.nqp:62) in (src/vm/jvm/ModuleLoader.nqp:52) in load_module in » | 21:09 | |
..rakudo-parrot d9e79f: OUTPUT«Cannot call 'infix:<...>'; none of these signatures match::($a, Mu $b) in any at gen/parrot/BOOTSTRAP.nqp:1218 in any at gen/parrot/BOOTSTRAP.nqp:1209 in sub infix:<...> at gen/parrot/CORE.setting:16290 in block at /tmp/jMWIUYqdbt:1…» | |||
masak | huh. | ||
masak thought that was straight out of S03 | |||
lue | n: .say for 1, 2, 3 ... 10, 20, 30 ... 100 | 21:10 | |
camelia | niecza v24-98-g473bd20: OUTPUT«123456789102030405060708090100» | ||
lue | masak: niecza++ | ||
jnthn | masak: Precedence, maybe? | ||
masak | yeah. | ||
jnthn: but niecza gets it right. | 21:11 | ||
jnthn | yes, that's a little confusing :) | ||
masak submits rakudobug | |||
21:11
benabik left
|
|||
lue | my attempt: gist.github.com/lue/7240356 | 21:12 | |
Util | My full thought from last week was that the ... design is broken w.r.t. huffmanizing. When the sequence back-end derives a code block of { $_ + some_constant } or {$_ * some_constant} then it knows that the sequence is heading toward +Inf or -Inf. In that (most common) circumstance, 1, 3, 5 ... 12 should either stop at 11, or at 13, or warn, or die; *anything* but infinitely loop. | 21:13 | |
21:14
woolfy joined
|
|||
Util | if someone writes 1, 3, 5 ... 12 , then they *never* mean 1, 3, 5 ... * | 21:14 | |
Landmine | |||
21:14
jaffa4 left
|
|||
arnsholt | Oooh, looks like I've found a way to do CStr on JVM | 21:15 | |
timotimo | Util: i disagree. we should not just say "oh they probably mean * > 12" | ||
FROGGS | arnsholt: that sounds good, ehh? | ||
arnsholt | Yeah, it's about time I do some more hacking on the NativeCall stuff | 21:16 | |
Even though CStr is a part of the API I really can't wait to kill =) | |||
FROGGS | arnsholt: yeah, the fans wanna have it :o) | ||
masak | Util: I'm trying very hard not to trigger my "halting problem" reflex. of course we could catch the simple cases, yes. | 21:17 | |
FROGGS | (NativeCall, not CStr) | ||
lue | timotimo: but "they probably mean *" is also wrong, and worse IMO | ||
I would go with a die in that case, because at that point the programmer can't sequences right. | |||
timotimo | hm. if we have one of the simpler sequences, we can probably just analytically see if the endpoint is in the sequence and carp if not | 21:18 | |
Util | masak: the simple cases will be the most common, I am sure. | ||
FROGGS | well, you could eject the cd drive very hard and hope it hurts him/her | ||
masak | Util: agreed. | ||
timotimo | but only in the case where we have only numbers involved | ||
masak .oO( Warning: the sequence is infinite, due to Fermat's Last Theorem ) | 21:19 | ||
FROGGS | and again, X::Insulting would help | ||
lue | timotimo: die if $cur-gen-number > $endpoint | 21:20 | |
Util | Sometimes we want to code something like rosettacode.org/wiki/Hailstone_sequence , which jumps around, but most will be simple (and recognizable) "progres toward +-Inf" | ||
lue | .oO(Dying on unsatisfactory endpoints would make ... more consistent with .. anyhow.) |
21:21 | |
lue & | |||
timotimo | Util: i already implemented the hailstone sequence with the ... operator and it was beautiful | ||
masak | Tene: in Perl 5, `for my $index (0..$max) { send_nuclear_warhead($city[$index]) }` | ||
Tene: if 0..$max produces a non-empty range full of decreasing negative numbers, and $city[$index] indexes from the end, then... global thermonuclear war. | 21:22 | ||
Util | It does not even indicate critical user dumbness. 2, { $_ + $interval } ... $endpoint , where the two variables are defined much earlier, is easily vulnerable to maintanence programmer error. | 21:23 | |
masak | Tene: in Perl 6, the corresponding code dies at runtime -- unless your array is of a special (unimplemented) S09 type that allows index wraparound. but the point still stands -- when a reader sees 0..$max, the "static gestalt" (or whatever) of that expression is "0 upto $max" | 21:24 | |
Util | timotimo: Yes, quite beautiful, and the thing that shaped my mind *away* from the idea that all ... should be specced as ever-increasing-or-ever-decreasing for safety. I would hate to lose that Hailstone ability, but just changin the spec to say that trailing codeblock is manditory for non-simple cases gives us the best of both worlds. | 21:25 | |
timotimo | ... is not only for numbers | 21:26 | |
traverse a graph by following ".parent" pointers, for example | |||
Util | timotimo: Good point. | ||
timotimo | my @path = ($end, *.parent ... $beginning).reverse | ||
Util | FYI: p6g -e '.say for 1, 3, 5, 7 ... 12;' freezes with *no* output for me. | 21:27 | |
masak | Util: that's a problem with for loops, though. | ||
timotimo | right. use map instead and it will work | ||
Util | masak: noted. Thanks! | 21:28 | |
lue proposes the en dash (–) for index ranges and .. for what he wants :P | |||
timotimo | hah, with -j3 it seems the makefile will do all the steps like /usr/bin/perl -MExtUtils::Command -e cp gen/jvm/stage2/nqpmo.jar . | 21:30 | |
three times in a row | |||
<spam> | 21:32 | ||
dalek | p/eqat_op_rebased: 0b129b2 | (Timo Paulssen)++ | src/vm/ (4 files): add nqp::eqat to jvm and parrot. |
||
nqp/eqat_op_rebased: de1e094 | (Timo Paulssen)++ | src/vm/parrot/ops/nqp.ops: | |||
nqp/eqat_op_rebased: special case same-encoding strings, length-1 needles. | |||
timotimo | </spam> | ||
... didn't intend for it to be kicked :( | |||
21:33
dalek joined,
ChanServ sets mode: +v dalek
|
|||
timotimo | i'd like to merge that into master now, i consider it done. | 21:33 | |
am i missing something obvious? like, should i create tests? | |||
japhb__ | Tene: I'm backlogged, so not sure if anyone has mentioned this, but you want reversed ranges to become empty because of algorithms that involve pointer or index crossing. | ||
masak | japhb__: could you elaborate "pointer or index crossing"? | 21:34 | |
anyway, it sounds like my nuclear example. | |||
jnthn | japhb__: I'm robustering (hopefully) the concurrency stuff these days. Also adding tests. :) | 21:35 | |
japhb__: Promise is getting a fairly big refactor but it's largely "on the inside" so I'm hopefully it'll not regress anything you're doing. | 21:36 | ||
21:36
Lorn joined,
Lorn left
|
|||
japhb__ | masak: Any number of algorithms (of which quicksort is probably the most well known), that involve starting at opposite ends of an array or subarray, and moving the ends towards each other until the "right" one is to the left of the "left" one. | 21:36 | |
jnthn | Binary search is an even simpler example than quicksort, I guess... | 21:37 | |
japhb__ | jnthn: Very happy to hear that inlining works across comp units. That makes for way less ugly for me. | ||
jnthn | japhb__: I have dreams of making the optimizer have a mode where it explains what it did/didn't do to help us better understand these things. | ||
japhb__ | jnthn: Once you head to bed, I'll recompile rakudo-jvm and see if you broke my code. ;-) | ||
jnthn | OK. The earth-shattering Promise refactor may or may not land tonight. :) | 21:38 | |
japhb__ | jnthn: Yeah, arnsholt mentioned that idea earlier, and I'm all in favor. | ||
I'm using Promise pretty close to the way you used it in your talk. | |||
jnthn | I'm in favor, I'm just under-provisioned and over-assigned ;) | ||
japhb__: Are you mostly creating them with async { ... } | 21:39 | ||
japhb__: Are using Promise.new(...) explicitly? | |||
I think my talk uses were all async { ... } | |||
21:39
[particle] joined
|
|||
jnthn | s:2nd/Are/Or/ | 21:39 | |
japhb__ | My very first use was 'sub async_qx($cmd,...)' which runs a qx in a separate thread, returning promises. And then a program which needs to shell out to a lot of slow things turned into a sub make_promises() which returned a hash with all values being async_qx() calls ... and then just pulling out the results in the order I wanted. | 21:40 | |
jnthn | The main thing I'm doing is detangling the synchronization primtive nature of Promise from specific uses of them. | 21:41 | |
And also moving timing related stuff into the scheduler where it belongs | |||
21:41
woolfy left,
woolfy joined
21:42
mathw joined
|
|||
masak | japhb__: oh, lovely example. yes, my visual intuition is of little gauge arrows marking the ends of the range, and when they pass each other, the range blinks out of existence. | 21:42 | |
jnthn | The main thing that's changed is Promise.new(:code({ ... })) is gonna be gone. | ||
japhb__ | jnthn: I'm using the idiom: sub async_qx { ... my $p = Promise.new; ... async { ... $p.keep($result) ... }; $p } | ||
jnthn | japhb__: Oh, that's fine. | ||
lizmat wonders whether we wouldn't need some syntactic sugar for Promise.new | 21:43 | ||
jnthn | There will also be a way to get a "keeper" object from a Promise that lets you encapsulate the right to keep/break it, but it's optional | ||
21:43
wbill left
21:44
Timbus left
|
|||
lizmat | .oO( cold induced ramblings from the lobby of a hotel, somewhere in Germany ) |
21:44 | |
jnthn | lizmat: Maybe... :) | ||
lizmat: promise() # :P | |||
21:45
Timbus joined
|
|||
[Coke] | timotimo: please document the eqat op. | 21:45 | |
oh, I checked in the wrong branch. | 21:46 | ||
lizmat | jnthn: was more thinking something like <> | 21:47 | |
timotimo | the documentation is already there in that branch :) | ||
(you documented it, even) | |||
[Coke] | timotimo++ | ||
lue | .oO(If you used UInt ranges, you wouldn't need to worry about negative indices.) |
||
[Coke] | me-- | 21:48 | |
japhb__ | jnthn++ # Iterating an already pretty decent API because it wasn't good enough. | ||
[Coke] | lizmat: hio | ||
lizmat | [Coke] o/ | ||
timotimo | huh, something seems to give build trouble in rakudo/eqat_op (rebased) | ||
lizmat | .oO( there's nothing like PDD ) |
||
lue | masak: I'll talk with TimToady later today to get some insight on *why* descending range is designly bad (like you mentioned earlier), but until then I'll disagree with your (and most others') definition of the .. operator :) | 21:49 | |
dalek | ecs: 3150289 | (Elizabeth Mattijsen)++ | S99-glossary.pod: Add PDD |
21:50 | |
timotimo | Error while compiling op bind: Method 'type' not found for invocant of class 'NQPMu' - that error doesn't ring a bell to me | ||
BenGoldberg | rn: .say for 1, 3, 5, 7 ... * > 12 | 21:51 | |
camelia | rakudo-parrot d9e79f, niecza v24-98-g473bd20: OUTPUT«135791113» | ||
..rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space in (src/Perl6/Grammar.nqp) in (src/vm/jvm/ModuleLoader.nqp:62) in (src/vm/jvm/ModuleLoader.nqp:52) in load_module in » | |||
japhb__ | lue: Did you disagree with my example of ranges used to implement index-crossing algorithms? | ||
Gah, somebody hand that JVM some heap space. | 21:52 | ||
lizmat | .oO( heap heap hurray ) |
||
lue | Not really, but I don't think .. should be considered $rhs <= $lhs checker. Again, it's because I see .. as a "consecutive integer list generator", and nothing more. | 21:53 | |
BenGoldberg | .oO( heap... heap... heeaaaachooo! ) |
||
masak | lue: and you do that because you've never shot yourself in the foot with your proposed semantics. | ||
21:53
Tom_ left,
wbill_ joined
|
|||
masak | lue: and you haven't done that because Perl (and Python, and Ruby...) chose the sensible default. | 21:54 | |
lue | [ I certainly don't see it as just the "array range operator". – would evoke those sentiments from me. Not to mention, I think an array range operator should allow reverse traversal :) ] | ||
BenGoldberg | r: say 13, 11, 9 ... 1 | ||
camelia | rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space in (src/Perl6/Grammar.nqp) in (src/vm/jvm/ModuleLoader.nqp:62) in (src/vm/jvm/ModuleLoader.nqp:52) in load_module in » | 21:55 | |
..rakudo-parrot d9e79f: OUTPUT«13 11 9 7 5 3 1» | |||
21:55
woolfy left
|
|||
lue | masak: like I said, I won't ever find out how bad it is in Perl 6 because you won't let me :) . I'll have to turn to C++ for that stuff. (I could use ..., but it doesn't have the full set of variants .. offers, which in this case I needed one of.) | 21:55 | |
21:55
lowpro30 left
|
|||
timotimo | why does it err out in the *grammar*?! | 21:55 | |
FROGGS | timotimo: what if $needle is null here? github.com/perl6/nqp/commit/d8b49d...b29f1R2000 | ||
then nqp::istype might fail, right? | |||
timotimo | oh? | 21:56 | |
diakopter | well, that's fine | ||
timotimo | i haven't thought of that | ||
diakopter | nulls are ok | ||
21:56
xenoterracide left
|
|||
FROGGS | nqp-p: my $n := nqp::null(); say(nqp::istype($n, QAST::Block)) | 21:57 | |
camelia | nqp-parrot: OUTPUT«0» | ||
lue | masak: And I semi-agree with the idea that not all of the ..^ ^.. ^..^ forms make sense in ... . Which is why it's infuriating there's no Perl6y way to generate an exclude-first descending list of consecutive integers. | ||
FROGGS | nqp-p: my $n := nqp::null_s(); say(nqp::istype($n, QAST::Block)) | ||
camelia | nqp-parrot: OUTPUT«0» | ||
FROGGS | k | ||
timotimo | no commit i added in that range changed something with "type" in it | 21:58 | |
BenGoldberg | n: say 13, 11, 9 ... 13 | ||
camelia | niecza v24-98-g473bd20: OUTPUT«13» | ||
BenGoldberg | n: say 13, 11, 9 ... 11 | 21:59 | |
camelia | niecza v24-98-g473bd20: OUTPUT«13 11» | ||
BenGoldberg | Why exactly do you need an exclude-first descending list? Surely you can simply write the actual first element? | ||
TimToady | lue: what do you think $x ~~ $min .. $max should do if $min happens to be greater than $max? Null ranges are very useful | ||
timotimo | that's a good point i hadn't considered | 22:00 | |
TimToady | degenerate cases must degenerate, not guess a 50/50 WAT vs DWIM | ||
masak | TimToady++ | ||
yes, a very good point. | |||
lue suddenly remembers masak's words: <masak> lue: TimToady happens to be really, really good at anticipating the way features can come back and bite users. or the way features will interact. | |||
TimToady | as for ^... the problem is that the left side is a list, not a single value | 22:01 | |
the end is tested as a single value, but the initialize isn't | |||
what would 1,3,5 ^... 7 mean? | |||
lue | .oO(Apparently descending integers are one of those "hard things possible" things. Bah.) |
||
TimToady | also, you don't have to write +@elems-1, since @elems-1 means the same thing | ||
lue | TimToady: 1, 3, 5 ^... 7 becomes 3,5,7 obviously :) | 22:02 | |
masak | 'night, #perl6 | 22:03 | |
lue | r: sub infix:<–>($lhs, $rhs) { return $lhs...$rhs }; say $_ for 1–5 | ||
♞ masak o/ | |||
camelia | rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space in (src/Perl6/Grammar.nqp) in (src/vm/jvm/ModuleLoader.nqp:62) in (src/vm/jvm/ModuleLoader.nqp:52) in load_module in » | ||
..rakudo-parrot d9e79f: OUTPUT«12345» | |||
lizmat | night masak and #perl6 | ||
timotimo | r-j: say "what is going on?" | ||
22:03
xenoterracide joined
|
|||
camelia | rakudo-jvm 882e33: OUTPUT«Unhandled exception: java.lang.OutOfMemoryError: Java heap space in (src/Perl6/Grammar.nqp) in (src/vm/jvm/ModuleLoader.nqp:62) in (src/vm/jvm/ModuleLoader.nqp:52) in load_module in » | 22:03 | |
22:03
lizmat left
|
|||
lue | I suppose I'm just dumbfounded that the difficulty of list generation rises sharply between ascending consecutive integers and descending consecutive integers (with/without excluding the start/endpoint) | 22:04 | |
BenGoldberg | n: sub infix:<!> { $^a ... $^b }; .say for 1!5 | 22:05 | |
camelia | niecza v24-98-g473bd20: OUTPUT«===SORRY!===Negation metaoperator not followed by valid infix at /tmp/AsK4dQqZAX line 1:------> b infix:<!> { $^a ... $^b }; .say for 1!⏏5Parse failed» | ||
BenGoldberg | n: sub infix:<_> { $^a ... $^b }; .say for 1 _ 5 | ||
camelia | niecza v24-98-g473bd20: OUTPUT«12345» | ||
BenGoldberg | n: sub infix:<_> { $^a, $^a - 1 ... $^b }; say 1 _ 5 | ||
camelia | niecza v24-98-g473bd20: OUTPUT«(timeout)» | 22:06 | |
BenGoldberg | n: sub infix:<_> { $^a, $^a - 1 ... $^b }; say 5 _ 1 | ||
TimToady | I suppose we could define LIST ^... END to call (LIST ... END)[1..*] or so | ||
camelia | niecza v24-98-g473bd20: OUTPUT«5 4 3 2 1» | ||
timotimo | there's a unicode character with three dots going from the upper left to the lower right | ||
that sounds like the perfect character for a "descending integer list" operatotr | |||
lue | I realize there are (apparently) design decisions going against what I like to see, but I'll eternally disagree with it :) | ||
22:07
kaare_ left
|
|||
TimToady | um, I just agreed with you that ^... could work | 22:07 | |
diakopter | r-j: say 3 | ||
camelia | rakudo-jvm 882e33: OUTPUT«3» | ||
lue | TimToady: I know, I was talking more about .. than anything else. | ||
BenGoldberg | r-j: say 'alive?'; | ||
TimToady | that's not going to change, because .. is about intervals, not integers | ||
camelia | rakudo-jvm 882e33: OUTPUT«alive?» | ||
BenGoldberg | r: sub infix:<_> { $^a, $^a - 1 ... $^b }; say 5 _ 1 | 22:08 | |
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«5 4 3 2 1» | ||
lue | r: sub infix:<⋱>($lhs, $rhs) { return $lhs...$rhs }; say $_ for 5⋱1 # timotimo++ | ||
timotimo | oh, intervals. that explains the decision behind it perfectly actually | ||
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«54321» | ||
22:08
wbill_ left
|
|||
TimToady | timotimo: that's why I said it :) | 22:09 | |
BenGoldberg | sub infix:<^⋱>($lhs, $rhs) { return $lhs-1...$rhs }; say $_ for 5^⋱1 | ||
rn: sub infix:<^⋱>($lhs, $rhs) { return $lhs-1...$rhs }; say $_ for 5^⋱1 | |||
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33, niecza v24-98-g473bd20: OUTPUT«4321» | 22:10 | |
lue | TimToady: Yeah, it makes a lot more sense using the word "interval". (grumblegrumblereverseintervalsgrumblegrumble)^W :) | ||
Also, I want to think some would disagree with ^... ~~ (LIST)[1..*], but I don't see another as-sensible interpretation. | 22:11 | ||
TimToady | if I was hard-hearted, I wouldn't even let you use 1 .. 5 to mean 1 ... 5 :) | ||
22:12
Rotwang left
|
|||
TimToady | now I'm wondering how much we'll see ^... * abused to mean [1..*] | 22:12 | |
lue kinda wants to see ⋱/^⋱/⋱^/^⋱^ in Perl 6 now, if only to placate stubborn people like me :D | 22:13 | ||
TimToady | well, we'll have to get rid of ... then and replace it with ⋰ | 22:14 | |
timotimo | not quite, ... can do any direction | 22:15 | |
including zigzag | |||
which is totally a direction. | |||
22:15
denis_boyun__ left
|
|||
TimToady | then we'd have to decide what ⋮ means | 22:16 | |
not to mention ⋯ | |||
lue | Math uses all those crazy kinds of ellipses for a reason, why not the Champion of Unicode™? :) | 22:17 | |
TimToady read that as "Chameleon" | |||
lue | ... would be the only ASCII equivalent to whatever unicode ellipsis takes the role of current ... (iow, exactly the same) | 22:18 | |
TimToady | howsomever, those character aren't used to mean that in math, which is a strike against them :) | ||
lue | Just because we don't have a reason to use ⋱ for matrices, doesn't mean we can't use them at all :) | ||
TimToady | anyway, you should be happy with ^... and agree with me that the others are module-worthy bloat :) | 22:19 | |
TimToady dangles a watch in front of lue pendulously and says "You're getting sleepy...sleepy...sleepy..." | |||
lue | TimToady: I was thinking the unicode ellipses should be in a (R* supplied) module anyway :) | 22:20 | |
TimToady | or was that sleep^...sleepy^...sleepy^... | ||
lue | →⌚← | ||
lue doesn't have curved arrow compose keys. He thinks. | 22:21 | ||
japhb__ | jnthn: re: "For inlining, subs and multi-subs that are compile-time determinable will cut it, though they need to be simple." , what does "compile-time determinable" mean in this context, and what are the limits of "simple"? | ||
Also, why is the default BUILD slow? Is it completely generic, not type-specialized? | 22:22 | ||
(I thought the generic part was BUILDALL, but it has been a *long* time since I looked at that stuff) | |||
timotimo | the default BUILD goes through a list of "operations" to perform | ||
jnthn | japhb__: Well, it is BUILDALL | 22:23 | |
japhb__: But if you have your own BUILD method the build plan is just "call that" | |||
japhb__: Not saying it'll be slower forever, just saing how it is now | |||
japhb__ | Oh, OK, I see. | ||
jnthn | Things should/can be faster thanks to the new/bless changes, though I dunno if anybody updated new yet to be more efficient | 22:24 | |
22:24
btyler left,
rurban left
|
|||
jnthn | About inlining, the rules are that it needs to determine that the types of the arguments being passed are going to always match the signature. | 22:24 | |
timotimo | multi method new(*%attrinit) { self.bless(|%attrinit); } | ||
jnthn | And it isn't yet especially smart. | 22:25 | |
timotimo: yeah, we can do better than that :) | |||
multi method new(|) { nqp::invokewithcapture(nqp::findmethod(self, 'bless'), nqp::usecapture()) } # or something like this | |||
timotimo doesn't know how. just duplicate bless? | |||
oh, mhm | |||
jnthn | uh, wait | 22:26 | |
*% instead of | | |||
Otherwise we permit positionals. | |||
japhb__ | So to guarantee that the inliner knows types of arguments will always match, I just need to explicitly type the arguments at the caller site compatibly with either Any (if the params of the callee are untyped) or the actual type of the param. And type my return values, for expressions involving nested calls. Right? | 22:29 | |
dalek | ast: d81e6df | jonathan++ | S17-concurrency/scheduler.t: Tests for timing related scheduler methods. |
22:30 | |
ast: 1f89cf1 | jonathan++ | S17-concurrency/promise.t: Test for Promise.sleep. |
|||
22:31
bluescreen10 left
|
|||
japhb__ | r: my int64 $native64 = 40; my int32 $native32 = 2; say $native64 + $native32; # Will this be able to inline using multi infix:<+>(int, int)? | 22:32 | |
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«42» | ||
dalek | kudo/nom: 17e9c13 | jonathan++ | src/vm/jvm/core/Threading.pm: Re-order to better convey dependencies. Note that due to $*SCHEDULER this isn't a hard dependency yet, but it could need to become one. |
||
kudo/nom: dcf8e14 | jonathan++ | src/vm/jvm/core/Threading.pm: Use schedule_with_catch in Promise. |
|||
kudo/nom: 91a1b0c | jonathan++ | src/vm/jvm/core/Threading.pm: Add schedule_in, schedule_every to scheduler. |
|||
jnthn | japhb__: Should do | ||
And yes, it looks at "returns" when making inlining decisoins too | 22:33 | ||
japhb__ | Is int defined to be platform-native, or int64, or something like the C "at least 64 bits, but maybe more" kind of thing? | ||
jnthn | Platform native, but on JVM you can rely on it being 64 | ||
japhb__ | And Moar too? | 22:34 | |
jnthn | yes | ||
japhb__ | Yay, I get to introduce headaches in my future self! | ||
diakopter | :) | 22:37 | |
timotimo | jnthn: i'm not sure why the code you pasted, the invokewithcapture stuff, is any better than the code rakudo generates for the self.bless(|%attrinit) case. could we easily do better automatically? | 22:41 | |
probably only if we can prove the hash hasn't been modified or something | |||
japhb__ | If inlining works across comp_units, does that mean that the QAST for a sub is never thrown away? | ||
jnthn | japhb__: Right. But note that the other side of this is that only some simple subs are inlinale too | 22:42 | |
timotimo | .o(is that why our ram usage is so big?) | ||
because some nodes have an $/ attached to them? | 22:43 | ||
jnthn | japhb__: The restrictions essentially mean that only relativley small subs get inlining data stored | ||
japhb__: Which is generally the right choice anyway | |||
timotimo: I think it goes to some effort to trip that out. | |||
*strip | |||
timotimo | OK | ||
where do i have to look to figure that out? | 22:44 | ||
dalek | ecs: 766f608 | larry++ | S03-operators.pod: Allow ^... form just for lue++ |
||
ecs: b2f2915 | larry++ | S03-operators.pod: Mention ^...^ too |
|||
lue | :D | ||
TimToady | who shall we get to implement it, hmm.... | 22:45 | |
diakopter throws it at LUE | 22:46 | ||
22:46
tobyink left
|
|||
lue | uh, I uh, need to sign the CLA first. We must maintain the integrity of TPF's copyright ownership on every single line of code! | 22:46 | |
japhb__ | jnthn: OK, fair enough. | 22:47 | |
timotimo | my CLA should be in the hands of the right person soon :3 | 22:49 | |
jnthn | ^...^ - the cat whose nose is exactly between its eyes | 22:50 | |
22:50
iSlug left
|
|||
timotimo | ah, i should have come up with a benchmark and measurements for object creation speed before building this | 22:51 | |
lue | jnthn: a happy person straining to keep his mouth shut (lest he shout joyous excitement for a quarter-hour). | ||
22:51
spider-mario left
|
|||
jnthn | nmake | 22:51 | |
um | |||
:) | |||
diakopter | hee | 22:52 | |
/NOLOGO | |||
timotimo | i'm getting some "no subtests run" in my spectests on jvm o_O | ||
timotimo tries again with only one TEST_JOB | |||
diakopter | I had to kill the java eval server on host07 | ||
japhb__ | Next question: How do I make a 'method at_pos() is rw' for a VMArray, so that I can write to a Buf? Is it something as simple as 'nqp::setelems(self, $i) unless nqp::existspos(self, $i); nqp::atpos(self, $i)'? | ||
Hmmm, I guess I have to nqp::decont(self) first ... | 22:53 | ||
Hmmm, I guess not -- the code in Buf.pm seems to only decont in some cases, not others. | 22:55 | ||
TimToady wonders how soon till someone asks for ^^... and ...^^ to exclude two values... | 22:59 | ||
Tene | timotimo: If you'd prefer to stop wondering, I could ask for it whenever you like. | ||
TimToady: | |||
TimToady | which would actualy work if ^ were a meta-operator :) | ||
timotimo | jnthn: do spectests still run for you on jvm? with current rakudo and some local changes i get "no subtests run" for all tests after 22 test files or so | 23:00 | |
could it be something like that "getting a bootinterop object will get us into trouble" thing again? | |||
TimToady | with a metaop, we could say 'foo' ^xx * to exclude the first 'foo' :) | 23:01 | |
or 'foo' xx^ * to exclude the last one | |||
diakopter | what would 'foo' ^xx^ 1 do | ||
TimToady | apply the infix-meta-circumfix:<^ ^> operator to xx | 23:02 | |
and XOR everthing in the list | |||
or was that the x^^x operator, I forget... | 23:03 | ||
lue | I like the sound of metaop ^ so far, but I suspect some nasty things around that syntax corner. | ||
23:04
minimus left
|
|||
TimToady | yes, like preventing ^ff^ from working, and confusing the parsing of ^^ | 23:04 | |
diakopter | lue: it's an event horizon in actuaity | ||
23:04
minimus joined
|
|||
lue | instead of ^^...^^ there could be ^...^ :downto(2) :upto(2) or something :) | 23:04 | |
23:05
minimus is now known as Guest19106
|
|||
lue | .oO(iffy, diffy, fiddly, excludy) |
23:05 | |
r: sub infix:<RR>($a, $b) { $a + $b }; say 2 RR 3 | 23:06 | ||
camelia | rakudo-parrot d9e79f, rakudo-jvm 882e33: OUTPUT«5» | ||
timotimo | hm, what kind of code would profit from the new .new method that's hopefully faster? | 23:07 | |
how many builtin objects have their own new method, i wonder | 23:08 | ||
jnthn | Any code with ojbects that uses the default constructor, I guess | 23:09 | |
diakopter | r: Mu.new | ||
camelia | ( no output ) | ||
japhb__ | timotimo: Did you figure out the jvm spectest problem? | ||
timotimo | no | 23:10 | |
jnthn | japhb__: The "make Buf writable" problem is the same as the "make native arrays work" and "make int $x is rw as a parameter work" problem... | ||
japhb__ | jnthn: Care to expand that just a bit? :-) | 23:11 | |
jnthn | japhb__: The problem, at its core, is that when you have an array of objects what you really have is Array of Scalar of Object. When we return the Scalar, it is thus assignable | 23:12 | |
japhb__: A Buf otoh is compact and just a load of integers | |||
japhb__: There's no container in sight | |||
timotimo | .o(create a new proxy instance for each access!) | ||
japhb__ wonders if I'm stuck doing all mutations on an Array, and then having a .serialize() method in my API that just does { Buf.new(@.array) } | |||
jnthn | timotimo: Well, it is another kind of container at least... | ||
japhb__: Well, the ugly workaround is to drop to nqp:: ops :) | 23:13 | ||
japhb__ | Hmmm, there is that. | ||
jnthn | nqp::bindpos_i(...) should work on a buf. | ||
japhb__ | Does bindpos autoextend, or do you need to setelems first? And does setelems preserve the elements that are at lower indices than the new elems and nuke those above? | 23:14 | |
timotimo | i think: autoextends, nukes elements above new element number | 23:15 | |
japhb__ | timotimo: I'm wondering about doing setelems(10), setelems(5), setelems(10): How many copies happened, and how many VMArrays are now garbage? | 23:16 | |
timotimo | well, calling Mu.new a few times doesn't see a dramatic improvement in performance | ||
at least on parrot, we never shrink arrays | 23:17 | ||
that's how qrpa is implemented | |||
jnthn | japhb__: auto-extend | ||
japhb__ | jnthn: Is adding *simple* types (just a single class name, no parametric roles or where clauses) ever a performance *loss*? | 23:19 | |
jnthn | japhb__: In what context? | 23:20 | |
japhb__: As in, are type constraints likely to slow you down? | |||
Most likely not, though. The type checks are done against Mu/Any anyways | |||
And you'll hit the type cache for simple types always. | 23:21 | ||
japhb__ | For sub params and returns on one end, and argument and result types on the other end. | ||
Ah, good. Then I feel better about more strictly typing things in the API. | |||
jnthn | Yeah, for sub params we're already looking for Any by default anyway | ||
Because we need that to know if we must auto-thread a junction. | |||
japhb__ | (Might get a win from the optimizer, but won't lose because I'm now missing a fast path) | 23:22 | |
jnthn | (which is implemented by noticing binding failed, and seeing a junction was to blame) | ||
japhb__ | Gotcha. | ||
jnthn | No, you *used* to get a loss way back | ||
Not since 6model/nom landed | |||
japhb__ | Thanks for taking the time for all these questions today. :-) | ||
jnthn | np :) | ||
japhb__ | Under what circumstances do int/Int and str/Str autocoerce? And what does that do to the optimizer? | 23:23 | |
(I note that we special case int/int for a lot of infix ops, so I assume it's a win to stop the autocoercer there.) | 23:24 | ||
timotimo | yeah, boxing wastes time :( | 23:25 | |
japhb__ | My mental model is that you can only avoid all boxing if the arg type is native and the param type is the same native, or the returns type is native and the result type is the same native. In any other combo, you'll box (and potentially unbox again on the other side) | 23:27 | |
timotimo is about to find out if the new new method improves performance | 23:29 | ||
hm, yes, a tiny bit in my probably totally rubbish benchmark | 23:30 | ||
time ./perl6 -e 'class Foo { has Int $.a; has Str $.b; }; for ^50000 { Foo.new(:a(1), :b<foo>) }' | |||
took 13.55 seconds before, takes 13.3 seconds after | |||
japhb__ | Is there any difference between (--> T) and () returns T ? | 23:31 | |
(Meaning, does the optimizer see those as different?) | |||
timotimo | no, they should be identical | ||
japhb__ | Good, because I like having the returns type in the signature. It's one of the things I actually liked about Haskell's syntax. | 23:33 | |
TimToady | I think --> accepts more things by spec right now, whereas returns only accepts a type | ||
but nobody implement --> Nil yet | 23:34 | ||
or --> True | |||
dalek | ast: 53799ac | jonathan++ | S17-concurrency/promise.t: Tests for Promise.then. |
||
TimToady | std: sub foo ($a --> True) { $a.foo } | ||
camelia | std 8adbc60: OUTPUT«ok 00:01 126m» | 23:35 | |
TimToady | std: sub foo ($a) returns True { $a.foo } | ||
camelia | std 8adbc60: OUTPUT«ok 00:01 126m» | ||
timotimo | should that check that $a.foo eq True? | ||
TimToady | std: my True sub foo ($a) { $a.foo } | ||
camelia | std 8adbc60: OUTPUT«ok 00:01 126m» | ||
timotimo | er, eqv or something | ||
TimToady | hmm | ||
no, it should just return True, and put the final statement into sink context | 23:36 | ||
timotimo | OK | ||
japhb__ | r: sub foo ($a --> Nil) { } | 23:37 | |
camelia | ( no output ) | ||
TimToady | S06:691 | ||
synopsebot | Link: perlcabal.org/syn/S06.html#line_691 | ||
japhb__ | r: sub foo ($a --> Nil) { 42; }; my \a := foo(); say a.WHAT; say a; | 23:38 | |
camelia | rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«===SORRY!===CHECK FAILED:Calling 'foo' requires arguments (line 1) Expected: :($a)» | ||
japhb__ | r: sub foo ($a --> Nil) { 42; }; my \a := foo(12); say a.WHAT; say a; | ||
camelia | rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Any' but got 'Int' in block at /tmp/nTMN2eXD6Z:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nqp…» | ||
..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Any' but got 'Int' in block at /tmp/44wJszXHBy:1 in any at /tmp/44wJszXHBy:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 in any evalfile…» | |||
japhb__ | So yeah, rakudobug still. | ||
TimToady | Nil is going to be confusing since it's currently implemented as (also) a type | ||
std: my 42 sub foo ($a) { $a.foo } | 23:39 | ||
camelia | std 8adbc60: OUTPUT«===SORRY!===Malformed my at /tmp/qCTaEuUIKa line 1:------> my ⏏42 sub foo ($a) { $a.foo } expecting any of: name scoped declaratorParse failedFAILED 00:01 120m» | ||
japhb__ | r: sub foo ($a --> True) { 42; }; my \a := foo(12); say a.WHAT; say a; | ||
TimToady | std: sub foo ($a --> 42) { $a.foo } | ||
camelia | rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Int' in block at /tmp/f3W2EdkXyg:1 in any at /tmp/f3W2EdkXyg:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 in any evalfil…» | ||
..rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Int' in block at /tmp/5s44lBDHAa:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nq…» | |||
std 8adbc60: OUTPUT«ok 00:01 126m» | |||
TimToady | std: sub foo ($a) returns 42 { $a.foo } | 23:40 | |
camelia | std 8adbc60: OUTPUT«===SORRY!===Invalid type name at /tmp/U9iGnY767E line 1:------> sub foo ($a) returns ⏏42 { $a.foo } expecting typenameParse failedFAILED 00:01 122m» | ||
TimToady | yes, --> is special for fixed return values | ||
japhb__ | r: sub foo ($a --> Nil) { }; my \a := foo(12); say a.WHAT; say a; | ||
camelia | rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«NilNil» | ||
japhb__ | r: sub foo ($a --> True) { }; my \a := foo(12); say a.WHAT; say a; | ||
camelia | rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any' in block at /tmp/u7i40ufUOE:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nq…» | ||
..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any' in sub foo at /tmp/T13MYdokYo:1 in block at /tmp/T13MYdokYo:1 in any at /tmp/T13MYdokYo:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage…» | |||
TimToady | Nil only *appears* to do the right thing | ||
japhb__ | r: sub foo ($a is copy --> Nil) { repeat while $a > 0 { $a--; } }; my \a := foo(12); say a.WHAT; say a; | 23:41 | |
camelia | rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Any' but got 'Bool' in block at /tmp/AotaN_hPf0:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nq…» | ||
..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Any' but got 'Bool' in sub foo at /tmp/Eki5_UCjlA:1 in block at /tmp/Eki5_UCjlA:1 in any at /tmp/Eki5_UCjlA:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage…» | |||
japhb__ | Yeah, clearly so. | 23:42 | |
TimToady | it should neither be expecting an Any nor getting a Bool | ||
that looks suspiciously like P5 semantics returning the result of > | 23:43 | ||
japhb__ | nodnod | 23:46 | |
23:48
stevan_ joined
23:50
benabik joined
|
|||
BenGoldberg | How odd: | 23:52 | |
r: sub foo ($a --> True) { True }; my \a := foo(12); say a.WHAT; say a; | |||
camelia | rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Bool' in block at /tmp/rCasMGmpyL:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.n…» | ||
..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Bool' in block at /tmp/5Sjmr3WHY4:1 in any at /tmp/5Sjmr3WHY4:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 in any evalfi…» | |||
BenGoldberg | Expected Bool but got Bool? | 23:53 | |
jnthn | Most likely it only knows how to cope with a type object there right now | 23:55 | |
japhb__ | r: my $buf = buf8.new(); nqp::bindpos_i($buf, 0, 42); say $buf[0]; | ||
camelia | rakudo-parrot 91a1b0: OUTPUT«42» | ||
..rakudo-jvm 882e33: OUTPUT«java.lang.RuntimeException: This type does not support positional operations in block at /tmp/SxLCjGJSC0:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage…» | |||
japhb__ | Damn you, JVM! :-/ | ||
BenGoldberg | r: sub foo ($a --> Bool) { True }; my \a := foo(12); say a.WHAT; say a; | 23:56 | |
camelia | rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«(Bool)True» | ||
BenGoldberg | r: sub foo ($a --> Bool) {}; my \a := foo(12); say a.WHAT; say a; | ||
jnthn | japhb__: Try my $buf := ... | ||
camelia | rakudo-jvm 882e33: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any' in block at /tmp/A9fl1IiEjp:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nq…» | ||
..rakudo-parrot 91a1b0: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Any' in sub foo at /tmp/vKsBYctYq0:1 in block at /tmp/vKsBYctYq0:1 in any at /tmp/vKsBYctYq0:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage…» | |||
japhb__ | r: my $buf := buf8.new(); nqp::bindpos_i($buf, 0, 42); say $buf[0]; | ||
camelia | rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«42» | ||
japhb__ | Wha...? | ||
r: nqp::bindpos_i(buf8.new(), 0, 42); say "alive"; | 23:57 | ||
camelia | rakudo-parrot 91a1b0, rakudo-jvm 882e33: OUTPUT«alive» | ||
BenGoldberg | r: my $buf := buf8.new(); say $buf[0]; | ||
camelia | rakudo-jvm 882e33: OUTPUT«(timeout)» | 23:58 | |
..rakudo-parrot 91a1b0: OUTPUT«VMArray: index out of bounds in method at_pos at gen/parrot/CORE.setting:5016 in method at_pos at gen/parrot/CORE.setting:1654 in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2322 in sub postcircumfix:<[ ]> at gen/parrot/CORE.settin…» | |||
jnthn | japhb__: Well, you get kinda used to Rakudo sneaking the deconts into the right places often enough for you that you don't notice how much they're needed ;) | ||
japhb__ | jnthn: So why does r-j want the binding, but r-p does not care? | ||
jnthn | japhb__: I guess r-p is doing a decont on that operation, and r-j isn't. | ||
And nothing in spectest actually hits it either way so far | |||
japhb__ | heh, gotcha. | ||
jnthn | And it's a grey area being an nqp:: op... | ||
japhb__ | sure | ||
dalek | ast: 4623a73 | jonathan++ | S17-concurrency/promise.t: Tests for Promise.allof and Promise.anyof. |
23:59 | |
BenGoldberg | r: my $buf := buf8.new(); ++$buf[0]; | ||
camelia | rakudo-jvm 882e33: OUTPUT«(timeout)» | ||
..rakudo-parrot 91a1b0: OUTPUT«VMArray: index out of bounds in method at_pos at gen/parrot/CORE.setting:5016 in method at_pos at gen/parrot/CORE.setting:1654 in sub postcircumfix:<[ ]> at gen/parrot/CORE.setting:2322 in sub postcircumfix:<[ ]> at gen/parrot/CORE.settin…» | |||
BenGoldberg | What does the jvm timeout? | ||
Err, Why? |