»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
diakopter rakudo: gist.github.com/839726 00:17
p6eval rakudo 10d86d: OUTPUT«(timeout)» 00:18
diakopter timeout on 1690? 00:18
diakopter (1691 I mean) 00:18
Tene phenny: ask jnthn if I should expect to need to write my own repr for cardinal, or if I should be able to get by on P6opaque at first. 00:21
phenny Tene: I'll pass that on when jnthn is around.
Tene phenny: thanks; you're very helpful
donri p6opaque mo?
Tene donri: The Perl 6 specification includes representation polymorphism. You should be able to use objects mostly without caring about how they're actually represented in memory, and various ways in which you should be able to indicate what sort of memory representation you want. P6opaque is the primary representation used for objects in the nom refactor of rakudo. 00:27
donri: The traditional example of representation polymorphism is packing of native types. If you have "my int @foo[10];", where the lowercase "int" indicates a native type instead of the Perl 6 class Int, you should be able to represent the storage of that array with a contiguous hunk of memory the length of 10 native ints 00:29
Tene Instead of having a separate container, attributes, separate storage, etc. for each int object 00:29
donri: Similarly, P6object should be able to inline attributes of native types in arbitrary classes. 00:30
donri: Does that sufficiently satisfy your curiosity? 00:32
donri: I'm trying to use 6model (the object model being developed for the nom refactor of rakudo) for Cardinal, the Ruby compiler that treed and I have worked on. 00:33
donri but do you get an int or an Int?
Tene donri: I'm sorry? I need more context for that question.
donri my int @foo
Tene Right, but what about it? That's an array that stores ints. 00:34
donri i guess that's what you meant with the "use without caring about repr"
that you can use these ints as Ints 00:35
but why would Int need more storage than ints?
diakopter b/c the runtime needs to know the type of scalars that are boxed 00:37
Tene donri: a few things... Int is unsized, and can hold arbitrarily-large values, etc.
donri ah 00:38
Tene Using int as a type annotation tells Perl 6 that it can do optimization to hold only that much, and that it's a value type, so the details can all be optimized out, etc. 00:38
perlcabal.org/syn/S09.html#Compact_structs 00:39
diakopter perlcabal.org/syn/S09.html#Compact_arrays especially
Tene rakudo: class ColorInt is Int { has $.color is rw }; my Int $x = ColorInt.new(); 00:41
p6eval rakudo 10d86d: ( no output )
Tene rakudo: class ColorInt is Int { has $.color is rw }; my Int $x = ColorInt.new(:color("cyan")); say $x.color 00:42
p6eval rakudo 10d86d: OUTPUT«cyan␤»
Tene donri: I'm not sure if I actually answered your question there. 00:44
diakopter my answer holds at a most basic level...
donri rakudo: my int $x = 5; say $x.WHAT 00:45
p6eval rakudo 10d86d: OUTPUT«===SORRY!===␤Malformed my at line 22, near "int $x = 5"␤»
diakopter not yet implemented
donri ah :)
diakopter perlesque: my int $x = 5; say $x.GetType
p6eval perlesque: OUTPUT«System.Int32␤»
Tene nqp: my int $x := 5;
p6eval nqp: ( no output )
Tene nqp: my int $x := 5; say $x.WHAT; 00:46
p6eval nqp: OUTPUT«Confused at line 1, near "say $x.WHA"␤current instr.: 'parrot;HLL;Grammar;panic' pc 17541 (gen/hllgrammar-grammar.pir:4828)␤»
Tene nqp: my int $x := 5; say($x.WHAT());
p6eval nqp: OUTPUT«invoke() not implemented in class 'Integer'␤current instr.: '_block11' pc 41 (EVAL_1:30198797)␤»
Tene nqp: my int $x := 5; say($x.WHAT);
p6eval nqp: OUTPUT«Can only use get_what on a RakudoObject␤current instr.: '_block11' pc 0 (EVAL_1:8)␤»
Tene There are still some issues, as you can see. :)
diakopter perlesque has int (but not Int) 00:47
(but it does have BigInteger, as I showed there today in the hamming example)
perlesque: gist.github.com/839752 00:48
Tene nqp: my int @foo[10]; @foo[0] := 1;
p6eval perlesque: OUTPUT«First 20 Hamming numbers: ␤1␤2␤3␤4␤5␤6␤8␤9␤10␤12␤15␤16␤18␤20␤24␤25␤27␤30␤32␤36␤1691st Hamming number: 2125764000␤One millionth Hamming number: 519312780448388736089589843750000000000000000000000000000000000000000000000000000000␤Elapsed: 00:00:10.2479716␤»
nqp: ( no output )
Tene nqp: my int @foo[10]; @foo[0] := 1; my $x := @foo[0]; say($x.WHAT);
p6eval nqp: OUTPUT«Can only use get_what on a RakudoObject␤current instr.: '_block11' pc 0 (EVAL_1:15104808)␤»
Tene although, that was binding and not assignment
So, reasonable that it's an int and not an Int 00:49
donri rakudo: say int.^methods
p6eval rakudo 10d86d: OUTPUT«Could not find sub &int␤ in main program body at line 22:/tmp/fSMIb0G4Kd␤»
diakopter by "not yet implemented", I meant "not yet implemented *at all*, as in all native types"
donri yea :) 00:50
bedtime, thanks
diakopter l8r
Tene nqp: say(int.HOW.methods(int)); 00:51
p6eval nqp: OUTPUT«Method 'methods' not found for invocant of class 'RakudoObject'␤current instr.: '_block11' pc 38 (EVAL_1:18)␤»
diakopter nqpclr: say(int.HOW.methods(int));
that's odd 00:52
nqpclr: say(int.HOW.methods(int));
someone killed p6eval for the first time in a long time 00:53
diakopter ok whatevs 00:56
I guess someone removed/renamed the nqpclr target
sorear good * #perl6 02:05
diakopter sorear: hi 02:10
lue hello world! o/ 02:42
sorear HI! 02:44
colomon \o 02:48
takadonet1 hey all 02:57
colomon \o 02:58
sorear hello takadonet1 03:00
takadonet1 sorear: how are you sir?>
diakopter odd; dalek didn't report my commit/push to S05 03:05
sorear takadonet1: busy 03:06
diakopter ... and ... I'm getting angry pink unicorns from github web ui
sorear diakopter: I'll check it out 03:07
oh
takadonet1 just hit refresh and it works in time
sorear diakopter: 502 spam from dalek's request log
diakopter (but the push occurred sucessfuly)
502 spam?
sorear HTTP 502 Bad Gateway errors while polling github 03:08
it looks like dalek hasn't received any pushes since 13 minutes ago 03:09
the last one was dukeleto on a #parrot-reported project
diakopter oh well; github outage-ish; I'm sure it'll resolve itself 03:10
sorear *cough* decentralized version control *cough*
diakopter HUB
dukeleto yeah, github timed out on an ssh push a few mins ago, but seems to be catching up
dalek ecs: 0296008 | diakopter++ | S05-regex.pod:
--nits
sorear if github ever stayed down for more than 6 hours I'd set up a git-daemon on appflux
it's just... it never does that 03:11
diakopter oh, there it is
dalek p-rx: 43c77a0 | dukeleto++ | / (14 files):
Remove remnants of svn
sorear or maybe feather
dalek ecza: 755eb94 | sorear++ | docs/announce.v3:
Add draft of v3 announcement
03:48
qiyong does perl6 have use? 03:56
takadonet1 yes
rakudo: use Test; 03:57
p6eval rakudo 10d86d: ( no output )
takadonet1 std: use Test;
p6eval std 4608239: OUTPUT«Compiled lib/Test.pm6␤ok 00:01 119m␤»
colomon rakudo: my @a := 1..*; @a.unshift(101); say ~@a[^10] 03:59
p6eval rakudo 10d86d: OUTPUT«Method 'unshift' not found for invocant of class 'Range'␤ in main program body at line 22:/tmp/0G2hzMycM4␤»
colomon rakudo: my @a := 1...*; @a.unshift(101); say ~@a[^10]
p6eval rakudo 10d86d: OUTPUT«101 1 2 3 4 5 6 7 8 9␤»
colomon aha!
crude but effective.
takadonet1 night all 04:11
colomon phenny: tell masak Have sort of better Hamming. Tried to use lazy lists, but it doesn't. Wacky. Not happy with it. gist.github.com/840013 04:18
phenny colomon: I'll pass that on when masak is around.
diakopter rakudo: gist.github.com/840013 04:20
p6eval rakudo 10d86d: OUTPUT«(timeout) 1 2␤1␤@hamming: 2 3 5␤2␤@hamming: 3 4 5 6 10␤3␤@hamming: 4 5 6 9 10 15␤4␤@hamming: 5 6 8 9 10 12 15 20␤5␤@hamming: 6 8 9 10 12 15 20 25␤6␤@hamming: 8 9 10 12 15 18 20 25 30␤8␤@hamming: 9 10 12 15 16 18 20 24 25 30 40␤9␤@hamming: 10 12 15 16 18 20 24 25 27 30 40
..45␤10␤@ham…
diakopter oh, heh
colomon It doesn't have an end yet. 04:22
it does work, I think.
diakopter input 1691 ? 04:23
colomon rakudo: gist.github.com/840013
p6eval rakudo 10d86d: 04:24
..OUTPUT«(timeout)␤6␤8␤9␤10␤12␤15␤16␤18␤20␤24␤25␤27␤30␤32␤36␤40␤45␤48␤50␤54␤60␤64␤72␤75␤80␤81␤90␤96␤100␤108␤120␤125␤128␤135␤144␤150␤160␤162␤180␤192␤200␤216␤225␤240␤243␤250␤256␤270␤288␤300␤320␤324␤360␤375␤384␤400␤405␤432␤450␤480␤486␤500␤512␤540␤576␤600␤625␤640␤648␤675␤720␤729␤750􏿽xE2􏿽x90
colomon I did all this work to have the sorted-merge use lazy lists, then didn't ever call it with a lazy list. :) 04:25
It's not really the elegant solution I hoped for. 04:26
diakopter i'm curious whether you looked at the port I did
(from the Java example)
colomon I only looked at the rosetta code version.
diakopter the Java one you mean? 04:27
colomon no, the perl 6 one. 04:27
diakopter oh..
colomon rosettacode.org/wiki/Hamming_numbers#Perl_6
diakopter yes, I ported one to perlesque 04:28
colomon bed time. 04:28
diakopter perlesque: gist.github.com/839752
p6eval perlesque: OUTPUT«First 20 Hamming numbers: ␤1␤2␤3␤4␤5␤6␤8␤9␤10␤12␤15␤16␤18␤20␤24␤25␤27␤30␤32␤36␤1691st Hamming number: 2125764000␤One millionth Hamming number: 519312780448388736089589843750000000000000000000000000000000000000000000000000000000␤Elapsed: 00:00:10.3346182␤»
dalek rixel: 82a2db5 | diakopter++ | sprixel/src/ (4 files):
grammar, parsing progress
04:31
sorear rakudo: .say for grep * %% any (2,3,5), ^*; # the most elegant Hamming in Perl 6. Doesn't work in Niecza yet. 05:15
p6eval rakudo 10d86d: ( no output )
sorear I guess it doesn't work in Rakudo either
oh
rakudo: .say for grep * %% any(2,3,5), ^*; # the most elegant Hamming in Perl 6. Doesn't work in Niecza yet.
p6eval rakudo 10d86d: OUTPUT«Can't take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1462:CORE.setting␤ in 'prefix:<^>' at line 7467:CORE.setting␤ in main program body at line 22:/tmp/zW1UmjCRcQ␤» 05:16
sorear rakudo: .say for grep { $_ %% any(2,3,5) }, ^*;
p6eval rakudo 10d86d: OUTPUT«Can't take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1462:CORE.setting␤ in 'prefix:<^>' at line 7467:CORE.setting␤ in main program body at line 22:/tmp/D4wBzjNTAF␤»
sorear rakudo: .say for grep * %% any(2,3,5), ^Inf; 05:16
p6eval rakudo 10d86d:
..OUTPUT«(timeout)␤6␤8␤9␤10␤12␤14␤15␤16␤18␤20␤21␤22␤24␤25␤26␤27␤28␤30␤32␤33␤34␤35␤36␤38␤39␤40␤42␤44␤45␤46␤48␤50␤51␤52␤54␤55␤56␤57␤58␤60␤62␤63␤64␤65␤66␤68␤69␤70␤72␤74␤75␤76␤78␤80␤81␤82␤84␤85␤86␤87␤88␤90␤92␤93␤94␤95␤96␤98␤99␤100␤102␤104␤105␤106␤108␤110␤111␤112␤114␤115􏿽xE2
sorear ... why isn't 1, 2, 3, 4, 5 in that 05:17
dalek ast: f8f23b9 | jimmy++ | S04-statements/try.t:
added test for RT #68728
05:29
dalek ast: 96654ce | jimmy++ | S0 (2 files):
s/tab/space/ for tests
05:51
sorear Where are the spectests for m//? 06:14
JimmyZ grep -r 'm/' S* 06:19
dalek ecza: 2a38770 | sorear++ | / (3 files):
Fudge m// to return Match object (moritz)
06:33
dalek ecza: 7016f56 | diakopter++ | docs/announce.v3:
slight tweaks to docs/announce.v3
07:24
moritz_ good morning 07:52
tadzik good morning 08:05
donri BEGIN { another-day } 08:08
tadzik yay, list of NLPW talks! 08:11
and they said it'll be all Dutch, hehe
moritz_ where's the list? 08:15
donri So I have a binding to a lazy @primes, '.say for @primes' dies with "Cannot resume dead coroutine." 08:28
@primes[^100] works but does nothing until all are computed
bug, feature or wrong idiom? 08:29
dalek ast: 5e3e35d | moritz++ | S02-builtin_data_types/array (2 files):
move array shape tests to a separate file
08:32
ast: ba7e504 | moritz++ | S04-statements/try.t:
[try.t] update test plan
08:34
JimmyZ moritz_: S32-str/split-simple2.t can be removed? 08:35
moritz_ JimmyZ: why should it? 08:36
JimmyZ moritz_: there was a comment in spectest.data.
S32-str/split-simple2.t # CHEAT! simplified version of split-simple.t
moritz_ well, if all the tests in split-simple2.t are also in split-simple.t, and all implementations (ie rakudo and niecza) run both files successfully, then yes 08:37
JimmyZ moritz_: yes . 08:40
dalek ast: 13da501 | jimmy++ | S32-str/split-simple2.t:
removed S32-str/split-simple2.t
08:42
ast: dd8b0e0 | jimmy++ | S0 (3 files):
Merge branch 'master' of github.com:perl6/roast
JimmyZ moritz_: github.com/rakudo/rakudo/pull/12 08:50
dalek tpfwiki: (Hongwen Qiu)++ | www.perlfoundation.org/perl6/index....le_project 08:53
qiyong does perl6 use cpan too? 09:09
donri qiyong: modules.perl6.org/ 09:10
dalek kudo: 58e40e0 | zhuomingliang++ | t/spectest.data:
removed unneeded S32-str/split-simple2.t

Signed-off-by: Moritz Lenz [email@hidden.address]
09:15
dalek ast: a3ccf3d | jimmy++ | S04-statements/loop.t:
added test for RT #71466
09:53
tadzik moritz_: rt.perl.org/rt3/Public/Bug/Display.html?id=68728 can you close this? 09:55
moritz_ *done* 09:56
JimmyZ++
tadzik moritz_++ 09:57
moritz_ rakudo: my $x = "test"; given $x { say $_; m/(e.)/; say $/ 09:58
p6eval rakudo 10d86d: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
moritz_ rakudo: my $x = "test"; given $x { say $_; m/(e.)/; say $/ }
p6eval rakudo 10d86d: OUTPUT«test␤es␤»
dalek ast: 5ac6379 | moritz++ | S05-match/capturing-contexts.t:
correct and unfudge tests for RT #66252
09:59
donri colomon: paste.pocoo.org/show/343204 actually faster than yours now 10:00
moritz_ rakudo: say False.name 10:05
p6eval rakudo 10d86d: OUTPUT«Method 'name' not found for invocant of class 'Bool'␤ in main program body at line 22:/tmp/TWhiL7DijE␤»
moritz_ rakudo: for 1,2,3 -> $a, $b = $a { say $b } 10:06
p6eval rakudo 10d86d: OUTPUT«2␤3␤»
moritz_ rakudo: map -> $a, $b = $a { say $b }, 1, 2, 3
p6eval rakudo 10d86d: ( no output ) 10:07
moritz_ rakudo: sink map -> $a, $b = $a { say $b }, 1, 2, 3
p6eval rakudo 10d86d: OUTPUT«2␤3␤»
JimmyZ I think there are 3 tickets can be closed. 10:08
moritz_ which tickets? 10:10
rakudo: say (1..10).sort(&rand)
p6eval rakudo 10d86d: OUTPUT«too many arguments passed - 0 params expected␤ in 'rand' at line 2197:CORE.setting␤ in <anon> at line 2870:CORE.setting␤ in 'List::sort' at line 2857:CORE.setting␤ in 'Any::sort' at line 1516:CORE.setting␤ in main program body at line 22:/tmp/RviGAaOt65␤»
moritz_ rakudo: say (1..10).sort(-> { rand }) 10:11
p6eval rakudo 10d86d: OUTPUT«Too many positional parameters passed; got 2 but expected 0␤ in <anon> at line 2:/tmp/4X5volmbBZ␤ in <anon> at line 2870:CORE.setting␤ in 'List::sort' at line 2857:CORE.setting␤ in 'Any::sort' at line 1516:CORE.setting␤ in main program body at line 22:/tmp/4X5volmbBZ␤»
JimmyZ moritz_: RT #71466 and RT #77904 can be closed too. 10:12
moritz_ std: break
p6eval std 4608239: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'break' used at line 1␤Check failed␤FAILED 00:01 117m␤»
moritz_ std: succeed
p6eval std 4608239: OUTPUT«ok 00:01 117m␤»
moritz_ done. 10:13
rakudo: sub { say "hello" }.() 10:14
p6eval rakudo 10d86d: OUTPUT«===SORRY!===␤Confused at line 22, near "sub { say "␤»
moritz_ rakudo: say (1..10).sort(&rand)
p6eval rakudo 10d86d: OUTPUT«too many arguments passed - 0 params expected␤ in 'rand' at line 2197:CORE.setting␤ in <anon> at line 2870:CORE.setting␤ in 'List::sort' at line 2857:CORE.setting␤ in 'Any::sort' at line 1516:CORE.setting␤ in main program body at line 22:/tmp/AC7esk_qLX␤»
moritz_ rakudo: my $a = 1; repeat while $a< 10 { $^a.defined.say; }
p6eval rakudo 10d86d: OUTPUT«Null PMC access in type()␤ in main program body at line 2:/tmp/TEqYiRR4Wf␤»
JimmyZ rakudo: my @a = 1..10; say ~(@a>>.trans((1..26) => (14..26,1..13))) 10:18
p6eval rakudo 10d86d: OUTPUT«(timeout)»
moritz_ phenny: tell patrickas about rt.perl.org/rt3/Ticket/Display.html?id=71366 -- want to hack on MAIN again? :-) 10:22
phenny moritz_: I'll pass that on when patrickas is around.
moritz_ rakudo: say 1.+WHAT 10:28
p6eval rakudo 10d86d: OUTPUT«get_iter() not implemented in class 'Sub'␤ in main program body at line 22:/tmp/FLQf7UM_SH␤»
moritz_ rakudo: sub my() { }; my(my $b) 10:30
p6eval rakudo 10d86d: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in 'my' at line 1:/tmp/whlyIjxKyO␤ in main program body at line 22:/tmp/whlyIjxKyO␤»
arnsholt Nice =) 10:32
moritz_ rakudo: my @arr; @arr[42] = 's'; say (+@arr).WHAT 10:33
p6eval rakudo 10d86d: OUTPUT«Int()␤»
moritz_ rakudo: @_.=[3] 10:34
p6eval rakudo 10d86d: OUTPUT«===SORRY!===␤Can not use .= on a non-identifier method call at line 22, near ""␤»
moritz_ std: @_.=[3] 10:35
p6eval std 4608239: OUTPUT«===SORRY!===␤Placeholder variable @_ may not be used outside of a block at /tmp/OzwupoQ_zo line 1:␤------> @_⏏.=[3]␤Check failed␤FAILED 00:01 119m␤»
moritz_ std: sub f { @_.=[3] }
p6eval std 4608239: OUTPUT«ok 00:01 120m␤»
dalek ast: ff620eb | jimmy++ | S05-transliteration/trans.t:
added test for RT #83674
10:50
ast: c907b99 | jimmy++ | S05-match/capturing-contexts.t:
Merge branch 'master' of github.com:perl6/roast
Juerd agentzh: Your ~/public_html/a.html is a Twitter login page and we received phishing alerts so your account is now disabled
agentzh: Please let me know if you happen to know the cause; either way, please contact me and I can re-enable your account 10:51
agentzh Juerd: oh, that might be an accident.
Juerd: sorry about that. 10:52
Juerd Accident in which way? :)
agentzh Juerd: i might be using "curl twitter.com > a.html" under the ~/public_html/ directory.
Juerd I see
Don't do that :)
agentzh Juerd: i won't :) 10:53
Juerd I'll reenable everything if you're convinced your password and/or ssh key haven't leaked :)
JimmyZ rakudo: say 3 !+ 4 10:54
p6eval rakudo 58e40e: OUTPUT«===SORRY!===␤Can't negate + because it is not iffy enough at line 22, near " 4"␤»
agentzh Juerd: i think they haven't leaked :)
moritz_ std: for 0 { when ARRAY {} } 10:55
p6eval std 4608239: OUTPUT«===SORRY!===␤Function 'ARRAY' needs parens to avoid gobbling block at /tmp/jgnK5axnNL line 1:␤------> for 0 { when ARRAY⏏ {} }␤Missing block (apparently gobbled by 'ARRAY') at /tmp/jgnK5axnNL line 1:␤------> for 0 { when ARRAY
..{}⏏…
perplexa rakudo: exit 10:56
p6eval rakudo 58e40e: ( no output )
perplexa :p
Juerd agentzh: Account's re-enabled. I've moved ~/public_html/a.html to ~/public_html_a.html
agentzh Juerd: thanks :)
moritz_ rakudo: say 'a' ~~ /:i 'A'/ 11:01
p6eval rakudo 58e40e: OUTPUT«a␤»
dalek ast: 3e93462 | jimmy++ | S0 (2 files):
added tests for RT #73386
11:10
dalek ast: 9c2a090 | moritz++ | S05-modifier/ignorecase.t:
[ignorecase.t] :i should descend into quotes (RT #76750)
11:11
takadonet morning all 13:07
colomon \o 13:08
moritz_ o/ 13:11
donri yay haskell solved it in eight seconds 13:52
takadonet bah 13:54
moritz_ plus the two hours you need to convince your compiler that your types are correct :-)
donri when even my optimized perl 6 hadn't found a solution in 67 minutes I sorta gave up :(
moritz_: hahaha yea. more like 30 minutes but yea.
mathw well you have to give it some leeway 14:09
haskell compilers have actually had optmisation work done
JimmyZ rakudo: my %h = { has-b => 42 } 14:34
p6eval rakudo 58e40e: ( no output )
colomon rakudo: my %h = { has-b => 42 }; say :%h.perl 14:37
p6eval rakudo 58e40e: OUTPUT«"h" => {"has-b" => 42}␤»
moritz_ there was a ticket about that not working, for which I've added the 'testneeded' tag today :-) 14:38
colomon moritz_++ 14:40
dalek ast: 2633e61 | jimmy++ | S02-builtin_data_types/hash.t:
aadded test for RT #75694
ast: 08187ac | jimmy++ | S05-modifier/ignorecase.t:
Merge branch 'master' of github.com:perl6/roast
moritz_ JimmyZ: if you 'git pull --rebase' you can avoid those unneeded merge commits 14:41
JimmyZ moritz_: ok, thanks.
I hate it too.
benabik Rebasing is your friend. I use it _constantly_. Awesome for making your commits look perfect before anyone else see them. :-D 14:43
moritz_ aka "good cheating"
benabik You just have to remember not to rebase anything you've pushed out. That's not so friendly. 14:43
JimmyZ wonders why --rebase is not default.
donri mathw: not giving up on perl 6, i know rakudo and parrot haven't had much optimizations done and this is an expensive problem 14:44
mathw :)
benabik JimmyZ: Because rebasing is very evil for already pushed branches.
JimmyZ: Although you can make it default for you: 'git config --global branch.autosetuprebase true' 14:45
JimmyZ: (Leaving off --global will make it default only for the current repo.)
mathw Because git supports many many workflows, and some of them break horribly if you rebase in the wrong places
JimmyZ can't automatic rebase when it's needed? 14:46
benabik Git defaults to the safe option. Altering history is cheating and is not guaranteed to give you back exactly what you put in. 14:47
Also, if anyone has made commits on top of the ones you're rebasing, they can have a real problem syncing back up. 14:49
JimmyZ rakudo: @_.=[3]
p6eval rakudo 58e40e: OUTPUT«===SORRY!===␤Can not use .= on a non-identifier method call at line 22, near ""␤»
dalek : a79e6eb | moritz++ | misc/dalek-conf.json:
[dalek] remove repo that is covered by post commit hooks
moritz_ \o/ new MoR chapter! 15:05
dalek ast: d8455c9 | jimmy++ | S02-builtin_data_types/array.t:
added test for RT #75342
15:05
sorear good * #perl6 15:47
sorear donri: I can give you speed :> 15:50
donri Do it! 15:51
sorear well, you'll have to leave rakudo/parrot behind 15:52
tadzik and there's no coming back 15:54
moritz_ niecza is faster, it just has a horrible startup time
sorear and runs about 1/30 of the tests 15:55
tadzik how many does rakudo run? 15:55
sorear ~30,000
sorear nobody knows how many tests there are, so I was comparing to rakudo 15:55
JimmyZ ~33600 15:56
moritz_ JimmyZ: how did you get that number?
dalek ast: 58c1a6a | moritz++ | S02-builtin_data_types/array.t:
[array.t] explicit test plan again
sorear moritz_: mono --aot run/*.dll run/Niecza.exe helps a fair amount; I usually run that before spectests 15:57
JimmyZ do you mean the number of passing tests?
moritz_ Got a SIGABRT while executing native code. This usually indicates 15:58
a fatal error in the mono runtime or one of the native libraries
used by your application.
moritz_ sorear: that's what I get when I run the aot compilation :-/ 15:58
tadzik sorear: so niecza does run 30% of those 30_000?
sorear tadzik: no, it runs about 1_100
3%, 1/30
moritz_ I suspect that another 1k tests are only a few LHFs away from being run in niecza 15:59
or probably many more 16:00
sorear moritz_: the aot compiler stuff does seem a bit flaky still ... this is why I'm switching back to safe code, so I know who to blame 16:03
benabik moritz_: LHF? 16:04
moritz_ benabik: low-hanging fruit 16:05
benabik Ah.
sorear niecza: "foo" ~~ /<sym>/; 16:09
p6eval niecza v2-102-g7016f56: OUTPUT«Unhandled exception: Illegal undef in cgop str␤ at /home/p6eval/niecza/boot/lib/SAFE.setting line 377 (SAFE die @ 2)␤ at /home/p6eval/niecza/src/CgOp.pm6 line 8 (CgOp CgOp._cgop @ 5)␤ at /home/p6eval/niecza/src/CgOp.pm6 line 215 (CgOp CgOp.str @ 2)␤ at
../home/p6eval/niecza/src/C…
sorear not sure crashing is the best result there :)
moritz_ I'd expect "can't find method sym for invocant of type Cursor" or something 16:10
rakudo: say 1.notdef 16:11
p6eval rakudo 58e40e: OUTPUT«Bool::False␤»
moritz_ hm, I can't find notdef in the spec anymore
Date: Fri Jul 30 19:46:36 2010 +0000
[S02, S32] kill off .notdef
by masak++
JimmyZ there are many .notdef in spectests. 16:13
moritz_ then we should slowly kill it off 16:14
flussence what's the fix, s/notdef/defined.not/?
moritz_ !$thing.defined
flussence but that's harder to sed for :)
there should probably be a test file to check that removed features are actually gone 16:15
(it'd also be useful as a reference if someone's old code breaks as a result) 16:16
JimmyZ flussence: the spec is not freezed 16:17
donri sorear: would it run github.com/dag/euler/blob/master/Perl%206/3.pl ?
donri niecza: gist.github.com/840636 16:19
p6eval niecza v2-102-g7016f56: OUTPUT«===SORRY!===␤␤Unhandled trait copy at /tmp/26iDEzSiTE line 8:␤------> my @primes := 2, 3, -> $a is copy ⏏{␤␤Unhandled trait Any() at /tmp/26iDEzSiTE line 8:␤------> my @primes := 2, 3, -> $a is copy
..⏏{␤␤Undeclared routines:␤ '…
donri Guess not.
moritz_ you can rewrite it to not use 'is copy'
donri niecza: gist.github.com/840636
yea
p6eval niecza v2-102-g7016f56: OUTPUT«===SORRY!===␤␤Undeclared routines:␤ 'all' used at line Any()14␤ 'sqrt' used at line Any()13,22␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/SAFE.setting line 377 (SAFE die @ 2)␤ at /home/p6eval/niecza/src/STD.pm6 line
..1152 (STD P6.comp_un…
moritz_ guess it doesn't do junctions yet 16:20
sorear I recently added .notdef to make spectests happier
yeah no junctions.
dukeleto ~~
moritz_ sorear: so it goes... hope it wasn't too much effort :-) 16:21
sorear parse erorr
donri niecza: gist.github.com/840636
p6eval niecza v2-102-g7016f56: OUTPUT«===SORRY!===␤␤This macro cannot be used as a function at /tmp/NwBO1OWwJd line 14:␤------> } until [&&]⏏ @primes.map: {␤␤Undeclared routine:␤ 'sqrt' used at line Any()13,22␤␤Unhandled exception: Check failed␤␤ at
../home/p6eval/niecza/boot/lib…
dalek ast: b6cb10e | moritz++ | S (7 files):
niecza unfudges
donri niecza: gist.github.com/840636 16:22
p6eval niecza v2-102-g7016f56: OUTPUT«===SORRY!===␤␤This macro cannot be used as a function at /tmp/82W_JLJLxU line 14:␤------> } until [&&]⏏ @primes.map: {␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/SAFE.setting line 377 (SAFE die @ 2)␤
..at /home/p6ev…
donri ok i give up
moritz_ flussence: fwiw most occurrences in the test suite are of the form ok $thing.notdef, which can be easily changed to nok $thing.defined 16:23
sorear donri: no sequence operator, no Array.max, no sqrt
also [&&] doesn't actually make sense
donri no .sqrt either?
moritz_ sorear: it makes sense, it just doesn't short-circuit 16:24
sorear moritz_: are you saying [&&] should be silently dwimfudged to [?&] ? 16:25
daxim perl6:say82..1
moritz_ in the case of success [&&] returns the last value, not True as [?&] does
rakudo has a macro-ish and an a sub form of infix:<&&> 16:26
the latter only for use with meta operators
dalek ast: 08f1960 | moritz++ | S (7 files):
start to remove .notdef
16:52
sorear moritz++
moritz_ $ moritz@jacq:~/p6/rakudo/t/spec>ack -w notdef|wc -l 16:53
53
still way to go
but first I need to drive home
bbl&
dalek ecza: 39b83a2 | sorear++ | src/niecza:
Accept and ignore is unary etc on regexes
17:09
ecza: 891071d | sorear++ | src/ (2 files):
Implement a variant of viv's 'endsym' function
moritz_ news.perlfoundation.org/2011/02/hag...truct.html please leave your comment on that page 17:36
jdhore moritz_, i'm working on fixing some of the notdef's in roast 17:53
jdhore moritz_, pastebin.com/ANQvjnxC 18:06
jdhore Well...Or someone who has commit access to roast ^^ 18:07
colomon jdhore: noted, I'll try to give them a run later this afternoon. (want to make sure I've got an up-to-date working build and spectest first, which will take a bit!) 18:55
diakopter phenny: tell TimToady nm about the mark/accent; we fixed it 20:06
phenny diakopter: I'll pass that on when TimToady is around.
moritz_ jdhore: what's your github ID? 20:29
jdhore moritz_, jdhore 20:30
moritz_ hugme: add jdhore to perl6 20:30
hugme hugs jdhore. Welcome to the perl6 github organization
jdhore :D 20:31
moritz_ jdhore: you now have commit access yourself :-)
jdhore :)
moritz_ colomon++ could have done that too
jdhore how do you change what URL a git repo is using locally?
ah, .git/config 20:32
moritz_ right, the new URL should be [email@hidden.address] 20:33
jdhore Yep
dalek ast: 2544bcf | (JD Horelick)++ | S (24 files):
Remove most remaining .notdef's.
jdhore :D
jdhore hmm, i prolly should change my git username 20:34
dalek ast: 07b93fe | moritz++ | S02-builtin_data_types/array.t:
[array.t] fix plan, moritz--
20:35
moritz_ \o/ commits from two new committers in a few days 20:37
jdhore :) 20:43
Vim makes life so painless :) 20:44
masak hi zebras 20:49
phenny masak: 22 Feb 23:29Z <diakopter> ask masak take a look at the clog from here - hamming perlesque
masak: 22 Feb 23:30Z <diakopter> tell masak (blatantly ported from the Java solution)
masak: 04:18Z <colomon> tell masak Have sort of better Hamming. Tried to use lazy lists, but it doesn't. Wacky. Not happy with it. gist.github.com/840013
masak diakopter++
nice! people took up the mini-challenge :) 20:50
colomon++
tadzik question: Rakudo is written in Perl 6. What happens when we lose the first compiler? :) 20:53
masak we'll just use the second? 20:54
tadzik I mean, when we run out of the working compilers, what will we do?
masak the question seems to ignore that the compilers usually build themselves via bootstrapping from smaller languages such as nqp. 20:55
Tene Anyone know if there's a specific reason that the spec doesn't define some of the more-obvious unicode math ops, like ≠ ?
I mean, it's obviously not completely adverse to unicode, what with «» etc.
masak Tene: the spec doesn't define any ops outside of latin-1.
tadzik masak: so when Rakudo builds, it first builds some part of itself using nqp, and then builds the Rakudo-Rakudo? 20:56
masak yes.
similarly, nqp-rx bootstraps itself from PGE, which is written in PIR. 20:57
so it's something like Parrot -> PIR/IMCC -> PGE -> nqp/rx -> Rakudo -> Rakudo's setting. 20:58
hm, the first 'Rakudo' could say 'Rakudo grammar/actions' 20:59
[Coke] masak: It's all so simple!
masak [Coke]: :)
masak diakopter: huh. I didn't look at the Java solution before posting my challenge, but it's nice to see it (and your solution) corresponds to my idea. 21:02
nice premature optimization on the bitshift :P
Tene masak: these days, nqp bootstraps itself with nqp 21:04
Tene masak: there's a compiled-to-pir version of nqp that's built and shipped with parrot, the stage0 compiler 21:04
masak right. that's the one I was thinking of. 21:07
I'm actually not entirely sure what the role of the stage0 compiler is. I just assumed it was used to build nqp-rx the first time around. 21:08
I meant to start writing the p5 post tonight, but I'm too exhausted after $dayjob. hopefully tomorrow night. 21:09
colomon: your solution uses lazy lists, whereas the mini-challenge was to write a version without them. did I miss something? :) 21:12
colomon moritz_: (re roast commit bit for jdhore) I always forget I can do that!
masak: A) was ignoring your challenge
masak: B) actually, my core code does NOT use lazy lists.
jdhore :D
colomon The sorted-merge function takes care to allow lazy lists, but the hamming function never uses them. 21:13
masak colomon: oh, I saw gather/take and assumed it did. sorry 'bout that :)
colomon masak: no worries. :) 21:13
masak goes to sleep
'night, #perl6
colomon I'm profoundly unsatisfied with the code I wrote for that, actually. 21:14
'night!
Tene rakudo: say any(1 ... Inf) > 10; 21:17
Shame we don't have lazy junctions. That should be easy to implement.
p6eval rakudo 58e40e: OUTPUT«(timeout)»
colomon Tene++: well volunteered.
;)
Tene colomon: Not today, unfortunately. 21:18
colomon Tene: tomorrow would be plenty fast enough, I'm sure. ;) 21:18
Tene colomon: First I'd have to read the spec pretty thoroughly to make sure it's permitted. 21:20
Tene Our current impl explicitly calls .eager. 21:20
I don't know if there's a good reason to do that or not. 21:21
rakudo: say any(1 ... 30) > 10;
p6eval rakudo 58e40e: OUTPUT«any(Bool::False, Bool::True)␤»
colomon I wouldn't be surprised if it's not permitted, actually.
Tene Why? 21:22
moritz_ well, it can short-circuit as soon as the answer is determined
Tene Exactly why I expected it to work lazily, moritz
moritz_ ie at least one True for an any() junction, at least one false for a none() junction etc.
Tene colomon: additionally, it would be impolite for me to pick LHF like that, when it could be left for a new contributor to do. 21:25
colomon Tene: I'm sure you'd be forgiven. 21:29
moritz_ now Tene is trying wriggle his way out... :-) 21:30
donri rakudo: say [&&] ^Inf ... * > 10 22:50
p6eval rakudo 58e40e: OUTPUT«0␤»
donri no wait how did tene write that test 22:51
donri rakudo: say [&&] ^Inf 22:54
p6eval rakudo 58e40e: OUTPUT«(timeout)»
donri anyways tene figured out why my code was so slow: junctions not short-circuiting 22:56
Tene donri: what test?
donri Tene: you tested junctions here earlier
Tene 14:15 < Tene> rakudo: say any(1 ... Inf) > 10; 22:57
donri ah
rakudo: say [&&] True, False
p6eval rakudo 58e40e: OUTPUT«Bool::False␤»
donri rakudo: say [&&] (^Inf).map: ?* 22:58
p6eval rakudo 58e40e: OUTPUT«(timeout)»
donri not sure what i'm getting at anyway xD 22:59
donri tired
but [&&] is similar to all() and i'm wondering if it short-circuits
donaldh Does anyone know about argument captures? 23:00
donri rakudo: say \(1, 2, :foo).perl
p6eval rakudo 58e40e: OUTPUT«\(1, 2, "foo" => Bool::True)␤»
donaldh I'm trying to assign to a positional in a capture, but it's readonly 23:01
PerlJam donaldh: An introductory question usually goes no where. Just ask the question you really want to ask.
donaldh: show code. 23:02
donaldh rakudo: my $var; my $capture = \($var); for $capture.list.values -> \$x { $x = 'Hello' }; 23:03
p6eval rakudo 58e40e: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 22:/tmp/sU4kw4tJ17␤ in main program body at line 1␤»
donri rakudo: my $var; my $capture = \($var is rw); for $capture.list.values -> \$x { $x = 'Hello' }; 23:04
p6eval rakudo 58e40e: OUTPUT«===SORRY!===␤You can't backslash that at line 22, near "($var is r"␤»
donaldh donri: yup, I've tried that.
donri rakudo: my $var; my $capture = \($var); for $capture.list.values -> \$x is rw { $x = 'Hello' };
p6eval rakudo 58e40e: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 22:/tmp/JIBab7ZY3n␤ in main program body at line 1␤»
donaldh I've simplified the example. It was based on: sub sqlite3_open( Str $filename, OpaquePointer $ppDB is rw ) 23:05
I'm trying to extend Zavolaj to initialize out parameters, i.e. those marked is rw. 23:07
donri donaldh: can't you set a default or make optional? 23:09
donri but i'd think you'd usually write a wrapper api on top of the nativecalls 23:11
donaldh Currently I have to do this: my $db = pir::new__Ps('UnManagedStruct'); my $status = sqlite3_open( "test.db", $db ); 23:12
I want to avoid having to initialize $db by embedding that behaviour in Zavolaj. 23:13
donri: github.com/jnthn/zavolaj/
donri oh zavolaj *is* nativecall? 23:16
i thought it was sqlite3 via nativecall
donaldh Yes.
donri perl6advent.wordpress.com/2010/12/1...om-perl-6/ 23:16
suggests wrapper api
donaldh perhaps that's the only viable approach. 23:20
donri i think the whole point of the "is native" subs is to represent the functions in natural perl 23:21
it needs that information to even work, at least without .h files
donaldh Yes, that's right. "is native" is a multi trait that is implemented to do some high magic. 23:23
donaldh I have extended it to understand "is rw" parameters and generate the necessary NCI call signatures. 23:24
I would like it to 'autovivify' the "is rw" out parameters, but all I have to work with is an immutable capture. 23:26