Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-17

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:15 diakopter std: sub my { my &my }; my();
00:15 p6eval std 28804: OUTPUT«ok 00:02 128m␤»
00:18 Confield left #perl6
00:18 Confield joined #perl6
00:21 tann rakudo: caller(); # :)
00:21 p6eval rakudo d5a2ee: OUTPUT«caller() is not yet implemented in Rakudo, sorry␤in sub caller (file src/gen_setting.pm, line 2360)␤called from Main (file /tmp/efpqVsPwTY, line 0)␤»
00:21 diakopter :)
00:21 frew joined #perl6
00:22 diakopter rakudo: Main
00:22 p6eval rakudo d5a2ee: OUTPUT«Could not find non-existent sub Main␤in Main (file src/gen_setting.pm, line 206)␤»
00:23 diakopter rakudo: non-existent
00:23 p6eval rakudo d5a2ee: OUTPUT«Could not find non-existent sub non-existent␤in Main (file src/gen_setting.pm, line 206)␤»
00:32 diakopter rakudo: my &say := ¨ say 6; # not a "re-declaration"?
00:32 p6eval rakudo d5a2ee: OUTPUT«6␤in Main (file /tmp/euHlSByODN, line 0)␤»
00:38 lumi joined #perl6
00:49 brunov joined #perl6
00:57 agentzh joined #perl6
01:14 Raugturi joined #perl6
01:19 lumi joined #perl6
01:22 hercynium joined #perl6
01:26 Raugturi joined #perl6
01:27 kst joined #perl6
01:28 Raugturi joined #perl6
01:30 Raugturi joined #perl6
01:34 Raugturi joined #perl6
01:35 rgrau joined #perl6
01:36 orafu joined #perl6
01:37 kst joined #perl6
01:53 TiMBuS joined #perl6
01:54 colomon rakudo: sub infix:<T+>($a, $b) { $a + $b; }; say [T+](1, 2, 3);
01:54 p6eval rakudo d5a2ee: OUTPUT«6␤»
01:57 pugs_svn r28805 | colomon++ | [t/spec] Test [+] and [T+], the later of which triggers the Texas "non-dwimmy hyperoperator" bug.
01:59 lumi joined #perl6
02:00 diakopter rakudo: say 4 R+ 5;
02:00 p6eval rakudo d5a2ee: OUTPUT«9␤»
02:03 colomon Oooo, R!  I forgot about that.  Another set of tests to add...
02:04 colomon rakudo: sub infix:<T+>($a, $b) { $a + $b; }; say 4 RT+ 5;
02:04 p6eval rakudo d5a2ee: OUTPUT«9␤»
02:04 colomon wow, I didn't expect that to actually work...
02:05 eternaleye joined #perl6
02:06 * araujo wonders if some perl6 peep is already google waving here
02:07 pmichaud fair warning:  dalek flood imminent
02:09 dalek joined #perl6
02:18 lumi joined #perl6
02:21 nbrown joined #perl6
02:32 xenoterracide joined #perl6
02:33 envi^home joined #perl6
02:53 nbrown joined #perl6
02:59 lumi joined #perl6
03:17 kst joined #perl6
03:27 tak11 joined #perl6
03:50 sparc joined #perl6
03:57 rhr joined #perl6
04:09 rhr__ joined #perl6
04:14 lumi joined #perl6
04:25 justatheory joined #perl6
04:59 kst joined #perl6
05:05 lumi joined #perl6
05:21 hudnix joined #perl6
05:29 eternaleye rakudo: class A { Str $name; method iAm() { say $name ~ " is class " ~ self.WHAT ~ " software!"; }; }; my $vm = A.new( name => "Rakudo" ); $vm.iAm();
05:29 p6eval rakudo d5a2ee: OUTPUT«Confused at line 2, near "$name; met"␤in Main (file <unknown>, line <unknown>)␤»
05:30 carlin rakudo: class A { has Str $name; method iAm() { say $name ~ " is class " ~ self.WHAT ~ " software!"; }; }; my $vm = A.new( name => "Rakudo" ); $vm.iAm();
05:30 p6eval rakudo d5a2ee: OUTPUT«Rakudo is class A() software!␤»
05:32 carlin rakudo: class A { has Str $name; method iAm() { say $name ~ " is class " ~ self.WHAT.perl ~ " software!"; }; }; my $vm = A.new( name => "Rakudo" ); $vm.iAm(); # fix A() ;-)
05:32 p6eval rakudo d5a2ee: OUTPUT«Rakudo is class A software!␤»
05:35 eternaleye carlin: Thanks
05:38 lumi joined #perl6
05:49 ShaneC joined #perl6
06:01 zamolxes joined #perl6
06:05 awwaiid joined #perl6
06:11 infrared joined #perl6
06:12 quietfanatic rakudo: ::int32 := ::Int; say int32.WHAT
06:12 p6eval rakudo d5a2ee: OUTPUT«Int()␤»
06:12 quietfanatic rakudo: subset int32 of Int; say int32.WHAT
06:12 p6eval rakudo d5a2ee: OUTPUT«()␤»
06:12 quietfanatic rakudo: subset int32 of Int; say int32.perl
06:12 p6eval rakudo d5a2ee: OUTPUT«␤»
06:12 quietfanatic rakudo: subset int32 of Int; say int32.WHAT.perl
06:12 p6eval rakudo d5a2ee: OUTPUT«␤»
06:12 quietfanatic rakudo: subset int32 of Int; .say for int32.^methods
06:12 p6eval rakudo d5a2ee: OUTPUT«!SUBTYPE_ACCEPTS␤!SUBTYPE_PROTOOVERRIDES␤»
06:13 quietfanatic rakudo: subset int32 of Int where {2**$_; say int32.WHAT
06:13 p6eval rakudo d5a2ee: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""␤in Main (file <unknown>, line <unknown>)␤»
06:13 quietfanatic oops
06:13 quietfanatic rakudo: subset int32 of Int where {-(2**16) <= $_ < 2**16}; say int32.WHAT
06:13 p6eval rakudo d5a2ee: OUTPUT«()␤»
06:14 quietfanatic rakudo: subset int32 of Int where {-(2**16) <= $_ < 2**16}; say int32!SUBTYPE_ACCEPTS
06:14 p6eval rakudo d5a2ee: OUTPUT«Method '!SUBTYPE_ACCEPTS' not found for invocant of class ''␤in Main (file src/gen_setting.pm, line 206)␤»
06:14 quietfanatic rakudo: subset int32 of Int where {-(2**16) <= $_ < 2**16}; say int32.'!SUBTYPE_ACCEPTS'
06:14 p6eval rakudo d5a2ee: OUTPUT«Method '!SUBTYPE_ACCEPTS' not found for invocant of class ''␤in Main (file src/gen_setting.pm, line 206)␤»
06:15 quietfanatic rakudo: class int32 is Int {}; say int32.WHAT
06:15 p6eval rakudo d5a2ee: OUTPUT«int32()␤»
06:15 quietfanatic rakudo: class int32 is Int {}; my int32 $x = 42; say $x.WHAT
06:15 p6eval rakudo d5a2ee: OUTPUT«Assignment type check failed; expected int32, but got Int␤in Main (file <unknown>, line <unknown>)␤»
06:17 infrared joined #perl6
06:18 kst joined #perl6
06:20 am0c joined #perl6
06:23 lumi joined #perl6
06:24 infrared joined #perl6
06:44 desertm4x joined #perl6
06:55 schemer999iphone joined #perl6
07:03 infrared joined #perl6
07:12 schemer999iphone left #perl6
07:34 yves joined #perl6
07:38 iblechbot joined #perl6
08:06 Su-Shee joined #perl6
08:06 Su-Shee good morning. :)
08:07 lumi joined #perl6
08:08 rblasch joined #perl6
08:13 Bzek joined #perl6
08:14 dr_df0 joined #perl6
08:23 icwiener joined #perl6
08:24 rblasch_ joined #perl6
08:43 pugs_svn r28806 | colomon++ | [t/spec] Add tests for R (reversed) versions of basic overloaded operatiors.
08:44 dr_df0 left #perl6
08:51 eMaX joined #perl6
08:52 zamolxes joined #perl6
09:02 * carlin wishes "Method 'foo' not found for invocant of class 'bar'"-type errors gave a file/line number ...
09:17 Khisanth joined #perl6
09:18 masak joined #perl6
09:18 masak aloha, Perl 6 people.
09:18 masak again, The Weekend has arrived.
09:22 dalek nqp-rx: 9e137f5 | pmichaud++ | build/ (4 files):
09:22 dalek nqp-rx: A few final bootstrap pieces.
09:22 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/9​e137f5e86939c16f5809e386b338c646d8f017e
09:22 dalek nqp-rx: 8439afd | pmichaud++ |  (8 files):
09:22 dalek nqp-rx: Complete parse bootstrapping of P6Regex library -- PGE is no
09:22 dalek nqp-rx: longer needed by nqp-rx.
09:22 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/8​439afdf04b1a79638f12c5b2658c2703383131b
09:22 dalek nqp-rx: d561f7f | pmichaud++ |  (4 files):
09:22 dalek nqp-rx: More build cleanups -- remove references to PGE libraries and code.
09:22 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d​561f7fd8353257939ebbb08e52dac6c39eb6974
09:22 dalek nqp-rx: ddf1fa8 | pmichaud++ | src/stage0/P6 (2 files):
09:22 dalek nqp-rx: Update the stage0 compiler files.
09:22 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d​df1fa8c8ff68ccbcf433eaa9d3377ada564898c
09:22 dalek nqp-rx: 1e495f8 | pmichaud++ | src/cheats/PGE.pir:
09:22 dalek nqp-rx: Remove no-longer-needed cheats for PGE.
09:22 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/1​e495f83eda39ba18f8ef346f98f702dad1c41b8
09:23 masak pmichaud++
09:23 carlin pmichaud++ # Making dalek work for his living
09:24 lumi joined #perl6
09:32 NorwayGeek joined #perl6
10:00 kst joined #perl6
10:02 houghton joined #perl6
10:13 zloyrusskiy joined #perl6
10:14 masak perl6: my @a = { foo => "one" }, { foo => "zwei" }, { foo => "trois" }; say (@a>>.<foo>).perl
10:14 p6eval elf 28806: OUTPUT«Not a HASH reference at ./elf_h line 260.␤ at ./elf_h line 5881␤»
10:14 p6eval ..pugs: OUTPUT«undef␤»
10:14 p6eval ..rakudo d5a2ee: OUTPUT«["one", "zwei", "trois"]␤»
10:14 masak rakudo++
10:20 desertm4x_ joined #perl6
10:30 avar so rakudo is better than pugs now?:)
10:31 masak please be more specific :)
10:34 eMaX joined #perl6
10:34 lichtkind joined #perl6
10:34 TiMBuS|Away joined #perl6
10:34 lichtkind jnthn:  hai
10:39 bpetering joined #perl6
11:09 araujo joined #perl6
11:14 muixirt joined #perl6
11:14 muixirt hi
11:15 muixirt perl6: $i=0; say $i
11:15 p6eval rakudo d5a2ee: OUTPUT«Symbol '$i' not predeclared in <anonymous> (/tmp/uRMVUhH32E:2)␤in Main (file <unknown>, line <unknown>)␤»
11:15 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "="␤    expecting "::"␤    Variable "$i" requires predeclaration or explicit package name␤    at /tmp/0ioj60svE2 line 1, column 3␤»
11:15 p6eval ..elf 28806: OUTPUT«Global symbol "$i" requires explicit package name at (eval 122) line 3.␤Global symbol "$i" requires explicit package name at (eval 122) line 4.␤ at ./elf_h line 5881␤»
11:16 muixirt declaring variables is a must in Rakudo?
11:16 muixirt will that change?
11:17 carlin Strict mode is enabled by default
11:17 carlin I think there are plans to disable it on the command-line but it will still be default for scripts
11:18 * muixirt looks at http://en.wikibooks.org/wiki/Perl_6_Progra​mming/Types_and_Context#Lexical_Variables
11:19 maschla joined #perl6
11:25 muixirt the spec says:
11:25 muixirt When "strict" is in effect (which is the default except for one-liners), non-qualified variables (such as $x and @y) are only looked up from lexical scopes, but never from package scopes.
11:25 muixirt what does that mean?
11:26 masak it means you have to use 'my'.
11:26 masak or some other declarator.
11:27 muixirt perl6: {$i=0; say $i}
11:27 p6eval rakudo d5a2ee: OUTPUT«Symbol '$i' not predeclared in <anonymous> (/tmp/zwkeE2OaMT:2)␤in Main (file <unknown>, line <unknown>)␤»
11:27 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "="␤    expecting "::"␤    Variable "$i" requires predeclaration or explicit package name␤    at /tmp/3ClDIMvspC line 1, column 4␤»
11:27 p6eval ..elf 28806: OUTPUT«Global symbol "$i" requires explicit package name at (eval 122) line 3.␤Global symbol "$i" requires explicit package name at (eval 122) line 4.␤ at ./elf_h line 5881␤»
11:27 masak muixirt: the outer {} are unnecessary in this case.
11:28 bpetering muixirt: you can probably get by with just 'rakudo: ' to avoid polluting the channel :)
11:28 muixirt rakudo: sub a {$i=0; say $i}; a()
11:29 p6eval rakudo d5a2ee: OUTPUT«Symbol '$i' not predeclared in a (/tmp/r4JdRYzFKU:2)␤in Main (file <unknown>, line <unknown>)␤»
11:29 masak bpetering! \o/
11:29 bpetering hi masakbot :O)
11:29 * masak hovers happily in the air
11:30 muixirt so if non-qualified variables are only looked up from lexical scopes, so what is a lexical scope then?
11:30 * muixirt is sorry about dumb questions but ...
11:30 masak muixirt: a lexical scope is anything within a pair of {}. questions are completely OK here.
11:31 masak rakudo: my $a = 2; if True { my $a = 5; say $a }; say $a
11:31 p6eval rakudo d5a2ee: OUTPUT«5␤2␤»
11:31 muixirt so my example with that sub a should work in strict mode?
11:31 Whiteknight joined #perl6
11:31 masak muixirt: there are two lexical scopes in there. one outside the if block, and one inside.
11:31 masak muixirt: do you mean non-strict mode?
11:32 muixirt masak: please look at http://en.wikibooks.org/wiki/Perl_6_Progra​mming/Types_and_Context#Lexical_Variables
11:32 masak Ok, I'm looking.
11:34 muixirt so a "non-qualified variables" is a variable without being declared with my?
11:34 masak "Variables don't need to be declared beforehand, but Perl 6 gives you the flexibility to do it if you want." -- This is only true in non-strict mode, which is off everywhere by default except in -e programs.
11:34 masak muixirt: aye.
11:36 muixirt but rakudo fails with ./perl6 -e '$i=0; say $i'
11:36 masak correct.
11:37 muixirt but is this coreect behaviour
11:37 * muixirt confused
11:37 masak muixirt: as carlin said, it's not implemented yet.
11:37 muixirt oh, i forgot
11:37 masak remember, Rakudo isn't Perl 6, but it tries to be, little by litte.
11:39 bpetering Think of Perl 6 as the Platonic Ideal and Rakudo as...
11:40 masak ...shadows on the wall of a cave. :)
11:41 bpetering Tag-team explanations FTW
11:41 lumi joined #perl6
11:43 bpetering Laziness FTW. Thanks masakbot :)
11:45 masak any time, citizen.
11:47 bpetering SPQR - Same Perl, Quite Reworked?
11:48 carlin rakudo: my %h = foo => 'bar'; say %h<quux>.defined; say %h.perl
11:48 jnthn oh hai
11:48 p6eval rakudo d5a2ee: OUTPUT«0␤{"foo" => "bar", "quux" => undef}␤»
11:48 masak \o/
11:48 jnthn oooh...somebody mentioned me...or wanted me.
11:48 * jnthn backlogs to find out
11:48 masak jnthn: I think it was lichtkind who said hai.
11:49 lichtkind jnthn: masak: yes
11:49 jnthn lichtkind: oh hai
11:49 jnthn lichtkind: ako sa mas? :-)
11:50 * jnthn caught up on sleep
11:50 lichtkind jnthn: ujde, vipada to na hadku
11:51 fridim_ joined #perl6
11:51 masak the LTA error message I love the least right now: on UnknownType.new(), Rakudo emits "invoke() not implemented in class 'Undef'", with a line number and file in gen_setting. finding the offending line of code (and what went wrong) is left as an exercise to the programmer. whoppee.
11:52 jnthn std: UnknownType.new()
11:52 p6eval std 28806: OUTPUT«Undeclared name:␤      UnknownType used at line 1␤ok 00:01 104m␤»
11:52 jnthn std je ovela lepsie
11:52 jnthn oh, gah
11:52 jnthn STD is a lot better.
11:52 jnthn Not enough coffee to do multiple languages in one IRC channel yet today. :-)
11:53 * jnthn goes to fill up the coffee machine with raw materials
11:54 bpetering jnthn: coffee for effect or are you an afficionado?
11:56 jnthn bpetering: Coffee seems to give my brain a kick start in a morning.
11:56 jnthn bpetering: I actually only drink coffee in the morning though. If I drink coffee on an evening, I can't sleep.
11:57 jnthn Well, "morning"
11:57 jnthn ;-)
11:57 bpetering I'm the same with evenings. I stay up all night thinking... usually nonsense
11:59 * bpetering thinks of Voltaire
12:01 bpetering is this morning for you jnthn?
12:02 jnthn bpetering: Well, it's still "the couple of hours after I got out of bed".
12:02 jnthn So it's morning in that sense. ;-)
12:03 jnthn Though in my timezone morning ended a while ago.
12:03 * jnthn was debugging resig until 1:30am-ish, and then needed some time to wind down before attempting to sleep
12:04 bpetering Heh, my mornings finish about 4pm that way :)
12:11 carlin "Method 'postcircumfix:{ }' not found for invocant of class 'Failure' in Main (file src/gen_setting.pm, line 206)"
12:11 carlin :(
12:11 masak carlin: let me guess, you're overriging postcircumfix:<{ }>?
12:12 masak s/overriging/overriding/
12:12 masak oh, or maybe just doing $foo<bar><baz> where $foo<bar> doesn't exist...
12:12 jnthn Aye, it may be an auto-viv fail.
12:13 carlin masak: It'll be the second one. But finding where it is will be fun
12:13 jnthn rakudo: my %foo; say %foo<bar><bar>
12:13 p6eval rakudo d5a2ee: OUTPUT«Method 'postcircumfix:{ }' not found for invocant of class 'Failure'␤in Main (file src/gen_setting.pm, line 206)␤»
12:14 jnthn rakudo: class Failure is also { method postcircumfix:<{ }>(*@slice) { die "oh noes" } }; my %foo; say %foo<bar><bar>
12:14 p6eval rakudo d5a2ee: OUTPUT«oh noes␤in method Failure::postcircumfix:{ } (file /tmp/NufSpXpr6k, line 2)␤called from Main (file /tmp/NufSpXpr6k, line 0)␤»
12:15 jnthn What's supposed to happen when you index into a failure object, anyway?
12:15 jnthn Because somebody with enough fu to add something to the setting can possibly improve current situation. :-)
12:15 masak that'd be very nice.
12:17 jnthn heh, some days the BBC really does win on "insightful"
12:17 jnthn I mean, "6% of the worlds languages are spoken by 94% of the world's population" is just fine.
12:17 jnthn However, the following bullet point being "The remaining 94% of languages are spoken by only 6% of the population" is, erm, kinda redundant. :-)
12:20 masak very reassuring, though. :)
12:23 * jnthn readies himself to dig into a couple of awkward changes
12:24 * Su-Shee bakes a cake due to c++ frustration. can I have a native webkit in perl6 now, please?
12:25 jnthn oh wow, pmichaud++ has bootstrapped NQP!
12:26 masak aye. pmichaud++!
12:26 jnthn rofl
12:26 lumi joined #perl6
12:27 * jnthn didn't read README yet, but he just found IGNOREME and read that.
12:27 carlin (reverse psychology)++
12:28 Chillance joined #perl6
12:28 * jnthn ponders which ouch-task to do first.
12:54 muixirt 'Buf' doesn't work in Rakudo right now?
12:54 masak only very little.
12:54 masak it's undertested in the spectests, too.
12:55 muixirt rakudo: my Buf @a; say @a.WHAT
12:55 p6eval rakudo d5a2ee: OUTPUT«Array()␤»
12:55 masak rakudo: my $x = Buf.new; say $x.WHAT
12:55 p6eval rakudo d5a2ee: OUTPUT«Buf()␤»
12:55 masak muixirt: when you put a type before '@a', you do not give the type of @a, but of its elements.
12:56 muixirt rakudo: my $x=Buf.new; $x=1,2,3,4;
12:56 p6eval rakudo d5a2ee:  ( no output )
12:57 muixirt masak: thanks
12:58 muixirt rakudo: my $x=Buf.new; $x=1,2,3,4; say $x
12:58 p6eval rakudo d5a2ee: OUTPUT«1 2 3 4␤»
12:58 jnthn rakudo: sub foo($a, $b = $a, $c = $b) { say "$a,$b,$c" }; foo(1)
12:58 p6eval rakudo d5a2ee: OUTPUT«1,1,1␤»
12:58 masak muixirt: you just replaced the Buf with [1,2,3,4].
12:58 jnthn Ah, current Rakudo gets that right too.
12:58 jnthn (resig just started to...)
12:59 muixirt rakudo: my $x=Buf.new; $x=1,2,3,4; say $x.WHAT
12:59 p6eval rakudo d5a2ee: OUTPUT«Array()␤»
12:59 muixirt rakudo: my $x=Buf.new; $x=[1,2,3,4]; say $x.WHAT
12:59 p6eval rakudo d5a2ee: OUTPUT«Array()␤»
12:59 masak weird; t/spec/S02-builtin_data_types/buf.t does not contain a single test pertaining to Bufs.
12:59 muixirt so how do I put stuff in a Buf?
13:00 masak rakudo: my $buf = 'ab'.encode('ASCII'); say $buf.list.perl
13:00 p6eval rakudo d5a2ee: OUTPUT«[97, 98]␤»
13:03 masak rakudo: my $buf = Buf.new(97, 98); say $buf.decode
13:03 p6eval rakudo d5a2ee: OUTPUT«␤»
13:03 masak hmpf. that didn't work.
13:03 muixirt is Buf suitable for binary data?
13:04 masak yes, I'd say it is.
13:05 icwiener_ joined #perl6
13:05 jnthn masak: Would you not have to give Buf an encoding too?
13:06 masak rakudo: my $buf = Buf.new(97, 98); say $buf.decode('ASCII')
13:06 p6eval rakudo d5a2ee: OUTPUT«␤»
13:06 jnthn Aww.
13:06 masak jnthn: it should default to some encoding.
13:07 jnthn rakudo: my $buf = 'ab'.encode('ASCII'); say $buf.decode('ASCII');
13:07 p6eval rakudo d5a2ee: OUTPUT«␤»
13:07 jnthn fail
13:12 dr_df0 joined #perl6
13:14 jnthn rakudo: sub foo($a, $b where { $b > $a }) { say "ok" }; foo(1,2); foo(1,1)
13:14 p6eval rakudo d5a2ee: OUTPUT«ok␤Parameter type check failed; expected Any, but got Int for $b in call to foo␤in sub foo (file <unknown>, line <unknown>)␤called from Main (file /tmp/t9TzYFprfK, line 0)␤»
13:15 jnthn std: sub foo($a, $b where { $b > $a }) { say "ok" }; foo(1,2); foo(1,1)
13:15 p6eval std 28806: OUTPUT«ok 00:02 115m␤»
13:15 jnthn You know, there's one interesting thing about this.
13:15 jnthn We actually have to bind $b before we can finish checking whether we can bind $b.
13:16 jnthn It took me all of 30 seconds to re-order to code and make this work, now I've fixed the tougher cookie of the lexical capture stuff.
13:16 jnthn But it had never really occured to me before.
13:18 masak why do we actually have to bind $b?
13:18 jnthn masak: Look at the constraint block.
13:18 masak yes. I see now.
13:19 masak we do.
13:19 jnthn masak: It needs to find the lexical $b.
13:19 masak aye.
13:19 jnthn We were sorta getting it by accident before.
13:19 masak :)
13:19 jnthn Because we had a two-pass bind and then check thingy.
13:19 masak std: sub foo($a where ( $b > $a }, $b) {}
13:19 p6eval std 28806: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse parenthesized expression; couldn't find final ')' at /tmp/Cg8NpYeOVi line 1:␤------> [32msub foo($a where ( $b > $a [33m⏏[31m}, $b) {}[0m␤    expecting any of:␤    standard stopper␤ statement modifier loop␤  terminator␤FAILED
13:19 p6eval ..00:02 113…
13:20 masak opos.
13:20 masak std: sub foo($a where { $b > $a }, $b) {}
13:20 p6eval std 28806: OUTPUT«ok 00:01 108m␤»
13:20 masak jnthn: I don't think STD.pm is really 100% correct here.
13:20 jnthn Hmm. That one *is* going to fail.
13:20 jnthn masak: Me either.
13:20 masak so we shouldn't rule out that your example might be erroneous too.
13:21 masak maybe $b simply isn't bound at that point.
13:21 jnthn masak: That is also quite possible.
13:21 masak TimToady: ^
13:21 jnthn If it's the case, I expect we'll have some spectets to fix.
13:22 masak it is an interesting question.
13:22 lumi joined #perl6
13:22 Bzek_ joined #perl6
13:22 jnthn I guess the counter-point is, "I wrote it after the parameter name so I'd expect reading along the line of code it's already introduced"
13:23 jnthn std: my $a = $a++
13:23 p6eval std 28806: OUTPUT«ok 00:01 106m␤»
13:23 jnthn See, you can do that. And immediately after the "my $a", $a refes to that $a.
13:24 jnthn It's, more practically, what we expect in my Dog $x .= new(name => 'Fido')
13:24 jnthn So if we consider the presence of a parameter name in a signature as a kind of "declaration"...
13:25 jnthn But then, I'm not really sure it is. Signatures themselves don't declare things, they just suggest to the thingy they're attached to - if any - what it might like to declare.
13:29 masak nod.
13:29 masak in other words, we don't really know.
13:30 bpetering just trying to follow this discussion - "my $a = $a++" refers to an old P5 trick to get the value of an outer lexical, no?
13:30 jnthn bpetering: Not in Perl 6.
13:30 jnthn rakudo: my $a = $a++; say $a;
13:30 p6eval rakudo d5a2ee: OUTPUT«Use of uninitialized value␤␤»
13:30 masak bpetering: though the contrast is illustrative.
13:30 jnthn oh heh
13:31 masak rakudo: my $a = ++$a; say $a
13:31 p6eval rakudo d5a2ee: OUTPUT«1␤»
13:31 jnthn oh, masak++
13:31 masak ++masak
13:31 jnthn rakudo++ # beats me :-)
13:31 bpetering jnthn: I know, just making sure my understanding of the semantics is correct and is likely to lead to overall comprehension. :)
13:31 dr_df0 :)
13:32 bpetering s/semantics/Perl 6 semantics/
13:35 bpetering sorry to derail... please continue. :)
13:36 jnthn bpetering: It's OK, I think I've already said all I was going to. :-)
13:40 jnthn Well, one of two tricky fixes done.
13:42 carlin rakudo: my @a=1..5; @a[10].defined; say @a.perl
13:42 p6eval rakudo d5a2ee: OUTPUT«[1, 2, 3, 4, 5, undef, undef, undef, undef, undef, undef]␤»
13:42 carlin Is that supposed to do that?
13:44 jnthn carlin: I *think* that's an auto-vivification bug.
13:45 masak it is.
13:46 jnthn ooh, for once I think I've found a test fail that's going to be easy to fix...
13:46 carlin rakudo: my @a = 1..5; say @a.exists(3); say @a.exists(6);
13:46 p6eval rakudo d5a2ee: OUTPUT«1␤0␤»
13:47 jnthn carlin: exists is probably fine, I think the problem is in postcircumfix:<[ ]>
13:47 carlin rakudo: my @a=1..5; @a.exists(10); say @a.perl
13:47 p6eval rakudo d5a2ee: OUTPUT«[1, 2, 3, 4, 5]␤»
13:48 carlin Yip
13:48 carlin Easy to work around then
14:07 Psyche^ joined #perl6
14:13 lumi joined #perl6
14:13 masak wow, this feels just like the summer of 2008. my codebase is now so big that I'm running into Parrot complexity limitations.
14:15 bpetering g'night all... masak, i'm working, not shirking off Text::CSV tests :)
14:16 jnthn Hmm. Does anyone have trouble building master Rakudo against latest Parrot?
14:16 masak what's the difference? :P
14:16 masak jnthn: yes. for three days now.
14:16 bpetering masak: one brings me food.
14:16 jnthn ah shit.
14:16 jnthn masak: It looks like:
14:16 jnthn Null PMC access in find_method()
14:16 jnthn current instr.: 'perl6;Perl6;Grammar;Actions;_block13'
14:16 jnthn For you too?
14:16 masak yeah, something like that.
14:16 jnthn Shit.
14:16 masak let me try again, and I'll check.
14:16 jnthn Just what I need.
14:16 jnthn parrot--
14:16 fridim_ joined #perl6
14:19 masak If I'm the little bird you bring down in a mine to check that the oxygen doesn't run out, then people have more or less been ignoring that little bird in the last few days. :)
14:20 masak I think the most attention I've gotten for this is "you should probably try to build with PARROT_REVISION, not bleeding Parrot"
14:20 masak (but that didn't work, either)
14:20 jnthn Trouble is, I need to bump to latest.
14:21 masak yup, that's the exact error message I'm getting.
14:22 masak good hunting!
14:25 Limbic_Region joined #perl6
14:26 masak jnthn: I'll see if I can bisect while you're having lunch.
14:26 jnthn masak: Thanks!
14:26 jnthn masak: kid51 suggests trying at 41833
14:26 masak yeah, I saw.
14:26 masak I'll try that.
14:29 jnthn Thanks.
14:29 * jnthn makes niva sandwich
14:36 xinming_ joined #perl6
14:43 vapace joined #perl6
14:43 pmichaud good morning, #perl6
14:44 jnthn pmichaud: oh hai
14:45 jnthn pmichaud: I fear one of your recent NQP/PAST changes may have borken the Rakudo build...not sure yet though.
14:45 masak pmichaud: o/ -- nqp-rx straps boots, cool!
14:45 jnthn pmichaud: Nice work on the bootstrap though ;-)
14:45 masak jnthn: so far I have 41833 builds, 41897 doesn't.
14:46 jnthn masak: OK. 41871 would be a good one to check.
14:46 japhb masak, "straps boots" makes me think of "knocks boots", and I fear such interaction with a parrot may be illegal in some jurisdictions ...
14:46 masak jnthn: gotcha.
14:47 * jnthn googles knocks boots out of curiosity
14:47 jnthn japhb: oh my...
14:47 colomon rakudo: say [R+] (1, 2, 3);
14:48 p6eval rakudo d5a2ee: OUTPUT«6␤»
14:48 colomon rakudo: say (<a b c> <<R~>> <1 2 3>).perl;
14:48 p6eval rakudo d5a2ee: OUTPUT«Bool::False␤»
14:49 colomon errr... what?
14:49 japhb rakudo: say (<a b c> >>R~<< <1 2 3>).perl;
14:49 p6eval rakudo d5a2ee: OUTPUT«Confused at line 2, near ">>R~<< <1 "␤in Main (file <unknown>, line <unknown>)␤»
14:49 pmichaud jnthn: afaik, my NQP/PAST changes have been pretty innocuous,  but it's possible they've  broken something.  Should be an easy-ish fix if that's the case.
14:50 pmichaud nqp-rx is bootstrapping the parser, yes; next step is to bootstrap all of nqp
14:50 jnthn pmichaud: I'm hoping so, because that's much preferable to horrible Parrot guts bug that I first expected
14:50 colomon std: say (<a b c> <<R~>> <1 2 3>).perl;
14:50 p6eval std 28806: OUTPUT«ok 00:01 111m␤»
14:50 jnthn pmichaud: It appears to crash really, really early on in gen_actions.pir
14:50 jnthn pmichaud: Here:
14:50 jnthn get_hll_global $P15, "P6metaclass"
14:50 jnthn $P15."new_class"("Perl6::Grammar::Actions")
14:50 jnthn It looks like $P15 ends up null.
14:50 colomon rakudo: say (<a b c> >>R~<< <1 2 3>).perl;
14:50 p6eval rakudo d5a2ee: OUTPUT«Confused at line 2, near ">>R~<< <1 "␤in Main (file <unknown>, line <unknown>)␤»
14:50 colomon std: say (<a b c> >>R~<< <1 2 3>).perl;
14:50 p6eval std 28806: OUTPUT«ok 00:02 109m␤»
14:51 pmichaud oh, yes, that'd be a fail.
14:51 pmichaud checking.
14:51 jnthn pmichaud: Thanks.
14:51 arthur-_ joined #perl6
14:51 * jnthn just bumped Parrot to latest and was a tad...irked...by this. ;-)
14:52 * jnthn feels better now he's eaten
14:53 jnthn japhb: The worst bit is that the second hit on Google for it lets you order a mug with the phrase and definition on it...
14:53 * jnthn adds to list of things NOT to buy mum for Christmas.
14:54 masak jnthn: 41865 builds, 41871 doesn't.
14:54 infrared_ joined #perl6
14:54 jnthn pmichaud: Probably issue was in patch "[nqp]:  Add simple class inheritance to NQP."
14:54 pmichaud it is.
14:54 pmichaud I changed a get_root_global to a get_hll_global
14:54 jnthn Oops.
14:54 pmichaud and that doesn't work in non-parrot hll namespaces.
14:56 lumi joined #perl6
14:56 jnthn OK. At least seems something quickly fixable. :-)
14:57 pmichaud It is, fixing now.
14:57 japhb jnthn, Gosh, I can't imagine why you wouldn't want to send those mugs to your whole family!
14:57 japhb left #perl6
14:57 japhb joined #perl6
14:57 japhb grrr
14:58 japhb Apparently I don't have X focus set to follow mental focus yet.
15:02 masak yup. 41870 builds fine. so the badness starts at 41871.
15:02 diakopter #perl6: g'morning
15:03 pmichaud I've fixed the badness locally -- testing parrot and then will commit.
15:03 pmichaud oops, not fixed yet.  (sigh)
15:05 pmichaud okay, now fixed.  testing.
15:06 pmichaud I guess this trunk fail mars the celebration of nqp-rx progress, eh?  ;-)
15:07 pmichaud this morning I've been idly wondering how hard it would be to port NQP to smop.
15:08 pmichaud (er, nqp-rx)
15:08 jnthn pmichaud: eh, shit happens. :-)
15:08 pmichaud one of the features of nqp-rx is that it no longer requires Parrot coroutines.
15:08 pmichaud or continuations (yet), for that matter.
15:08 * jnthn would be interested to port to .Net CLR.
15:09 pmichaud r41901 should fix the nqp problem.
15:09 pmichaud (just committed)
15:09 jnthn pmichaud: ok, thanks, checking
15:13 * colomon just read the section on hyper operators properly for the first time, wow.
15:14 pmichaud okay, time for me to head to a meeting; bbiaw
15:15 colomon say -<< (1, 2, 3);
15:17 colomon rakudo: say -<< (1, 2, 3);
15:17 p6eval rakudo d5a2ee: OUTPUT«say requires an argument at line 2, near " -<< (1, 2"␤in Main (file src/gen_setting.pm, line 2545)␤»
15:17 jnthn colomon: Note that Rakudo doesn't parse all hyperoperators yet.
15:17 colomon rakudo: say -« (1, 2, 3);
15:17 p6eval rakudo d5a2ee: OUTPUT«say requires an argument at line 2, near " -\x{ab} (1, 2,"␤in Main (file src/gen_setting.pm, line 2545)␤»
15:17 jnthn Including unary ones.
15:17 colomon Yes, the coolness of that example is somewhat reduced by it not working.
15:18 jnthn colomon: I expect the switch to a more std-like grammar will fix that up.
15:18 colomon sure, sure.
15:18 justatheory joined #perl6
15:20 jnthn pmichaud: It helped, thanks!
15:20 colomon I'm still just trying to add tests to S06-operator-overloading/workout.t, and never realized before today that prefix operators could be hypered.
15:21 colomon do you guys know -- is it intended that something like >>R-<< should work?
15:21 colomon spec seems vague here...
15:21 colomon or R>>-<< for that matter?
15:22 masak now getting "Class Signature already registered!" when compiling perl6_s1.pbc...
15:23 jnthn masak: Ah, ouch
15:23 jnthn I just fixed that in my branch.
15:23 jnthn masak: And forgot it would affect master too.
15:23 masak glad you're on it, then.
15:23 lichtkind_ joined #perl6
15:24 jnthn masak: in src/parser/signature.pir, try this:
15:24 jnthn -class Perl6::Compiler::Signature;
15:24 jnthn +module Perl6::Compiler::Signature;
15:24 jnthn (evil but seems to work)
15:26 jnthn masak: oh, sorry
15:26 jnthn s/pir/pm/
15:26 masak nod.
15:26 masak jnthn: aye, works.
15:26 jnthn \o/
15:26 jnthn masak: Feel free to push.
15:26 masak will do.
15:27 jnthn Not sure what'll happen come merge time, giving I've also done it.
15:27 jnthn Hopefully git will just be like "lol identical win!" and not care. :-)
15:27 masak git is wise and wondrous.
15:29 masak oops, I accidentally formatted my commit like a bug report. ;)
15:31 jnthn Habbits. :-P
15:31 jnthn Aww.
15:32 jnthn I tried to subclass Parrot's Sub PMC to give us our own P6Sub PMC so it could manage signature cloning without us having to keep doing isa checks all over the place, and missing them.
15:32 masak and with the new freshly-built Rakudo, I'm not getting those pesky Parrot stacktraces any more. \o/
15:32 jnthn But...segv. :-|
15:32 dalek rakudo: 24ebf39 | masak++ | src/parser/signature.pm:
15:32 dalek rakudo: [src/parser/signature.pm] fixed class collision
15:32 dalek rakudo: <masak> now getting "Class Signature already registered!" when compiling
15:32 dalek rakudo:         perl6_s1.pbc...
15:32 dalek rakudo: <jnthn> masak: Ah, ouch
15:32 dalek rakudo: <jnthn> masak: in src/parser/signature.pm, try this:
15:32 dalek rakudo: <jnthn> -class Perl6::Compiler::Signature;
15:32 dalek rakudo: <jnthn> +module Perl6::Compiler::Signature;
15:32 dalek rakudo: <jnthn> (evil but seems to work)
15:32 dalek rakudo: <masak> jnthn: aye, works.
15:32 dalek rakudo: <jnthn> \o/
15:32 dalek rakudo: <jnthn> masak: Feel free to push.
15:32 dalek rakudo: <masak> will do.
15:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​4ebf398b8139e7dbb69786ced40d638d433ff9a
15:33 masak :/
15:33 lumi joined #perl6
15:40 colomon Unexpected.  My refactoring / improvements to workout.t have earned me a Null PMC access. I haven't gotten one of those with this file yet...
15:41 colomon on a test that used to work....
15:42 colomon Ah, it was an accidentally doubled semicolon.
15:42 jnthn Doubled semicolon = segv?!
15:42 masak sometimes, yes.
15:42 colomon rakudo: sub A($a) { $a * $a;; };  say A(10) + 2;
15:43 p6eval rakudo d5a2ee: OUTPUT«Null PMC access in can()␤in Main (file src/gen_setting.pm, line 206)␤»
15:43 masak at the end of blocks, for exa... yeah.
15:43 colomon just like that, pretty much.
15:43 masak there's a ticket about it.
15:43 colomon that one's been reporte... masak++
15:44 colomon I'm assuming that isn't supposed to work, right?
15:45 masak please be more specific.
15:45 FOAD_ joined #perl6
15:46 colomon $a * $a;; should return null rather than $a * $a, right?
15:47 colomon s/null/undef/
15:48 colomon Ack, switching to non-Texas operators internally in the basic operator definitions really broke workout.t.
15:48 * colomon is wondering if it would be faster to fix the dang Rakudobug than it would be to add all the skips to workout.t...
15:52 jnthn :-/
15:55 jnthn Ah, that's 2 more spectets won back.
16:02 justatheory joined #perl6
16:04 markmont joined #perl6
16:04 tak11 joined #perl6
16:04 rdice joined #perl6
16:06 NorwayGeek_ joined #perl6
16:07 pmurias joined #perl6
16:08 pmurias hi
16:09 masak o/
16:09 rblasch__ joined #perl6
16:19 am0c joined #perl6
16:23 masak question: what would put Perl 6 on Slashdot before April?
16:23 masak s/Slashdot/Whatever tech reporting site/
16:24 pmurias masak: why do you ask?
16:24 masak pmurias: because I figure the answer might lead to new ways of thinking.
16:26 xinming joined #perl6
16:27 Su-Shee masak: a cool application based on perl 6. some well-known important developer suddenly participiating.
16:27 masak aye.
16:27 masak it'd have to be a pretty cool application.
16:28 Su-Shee I don't think so, people are already waiting for something six-ish; something real and tangible will probably reported.
16:33 masak we already have real and tangible things. they haven't made frontpages so far. :)
16:33 mberends joined #perl6
16:33 jnthn mberends! \o/
16:34 mberends oh hai jnthn!
16:34 jnthn masak: Well, yeah, but we probably didn't shout about them either. ;-)
16:34 masak mberends!
16:34 mberends :D
16:34 jnthn mberends: How goes things?
16:34 masak just when I was about to defect and make dinner...
16:34 nihiliad joined #perl6
16:35 jnthn Oh wow, placeholders were very broken in resig. Those probably count for some of the fails...
16:36 mberends jnthn: fine. had very little time for coding lately, but have almost managed to keep up with backlogs offline :) The progress on the new binder and regex engine are amazing!
16:37 jnthn mberends: New binder is being hard work.
16:37 jnthn mberends: More than I might have first guessed.
16:38 jnthn But, getting there.
16:38 jnthn The regex engine stuff from pmichaud++ is awesome progress, though we've yet to plug it into Rakudo and start using it for real.
16:39 mberends jnthn: yes, it must be a gut-wrench for Rakudo, but there is so much that will $profit from this refactor.
16:39 jnthn I think after the merge we immediately will win 100s of tests.
16:39 jnthn By being able to bind nameds to positionals.
16:41 mberends masak, sprixel testing is sliding down my todo list, due to multiple internal organ replacement surgery, and proto is now top of the pile :)
16:41 * mberends gets head down into proto
16:41 masak hugme: hug mberends
16:41 * hugme hugs mberends and blushes
16:42 masak mberends: just so you know, people have been asking about the installed-modules branch.
16:42 * mberends blushes and grins :D
16:42 diakopter internal organs and exoskeleton
16:42 mberends diakopter: would you call this your 5th generation?
16:43 diakopter heh
16:44 diakopter close to that..., counting the versions in JS, and then the versions in C#, and now the versions in JS
16:44 mberends diakopter, do you have any (non working) code to show? I'm dead curious how it looks...
16:45 diakopter I keep 'discovering' more efficient interpreter model techniques and they each require total refactorings :D
16:45 diakopter sure I'll commit it now )o(
16:45 mberends :D diakopter++
16:46 diakopter heh
16:46 diakopter you say that now...
16:48 diakopter yesterday on the plane back from Shwartzifornia I got args and subroutines working again... this time declared/installed from the Perl 6 setting instead of JS.  'cept just about all they can do is run the jseval 'jscode'  form.... but that's sufficient for bootlevitation
16:49 masak mmm... bootlevitation...
16:52 diakopter (running the jseval 'jscode' form is their sole functionality b/c nothing else is built-in.  Oh, and class declaration/constructors and 'type objects'.  I guess that's something.
16:52 diakopter )
16:54 mberends ) ;)
16:54 masak is that a levitating banana?
16:54 kst joined #perl6
16:54 diakopter mberends: e.g., there's an Int.pm under setting/ a la rakudo's
16:55 masak mberends: I might do some Temporal Flux hacking tonight, if I'm not caught up in other coding. either way, I'll be here tomorrow.
16:56 * jnthn finally makes the cup of tea he's been repeatedly boiling the kettle for the last hour to make, but kept forgetting.
16:56 mberends diakopter: so will there be a sprixel specific set of setting/ modules?
16:56 colomon http://www.lostechies.com/blogs/dahlbyk/archive/20​09/10/17/is-functional-abstraction-too-clever.aspx
16:56 diakopter mberends: sprixel-specific as opposed to what
16:58 jnthn masak: btw, in the next couple of days it may be good to set some Real Code onto the new signature binder.
16:58 mberends diakopter: er, I thought rakudo's setting modules were implementation independent, apart from the few containing Q:PIR code.
16:58 pmurias pmichaud: re porting nqp to smop, the hard part would be writing the runtime
16:58 diakopter mberends: not really... b/c they're "is also"
16:59 masak jnthn: I figured as much. when you think it's ready, I'll build November, Druid and proto against the branch.
16:59 diakopter colomon: C#?  yay!
16:59 masak colomon: is functional abstraction too clever? no.
17:01 pmurias lets just use goto! ;)
17:02 masak need to make food. see you people around. o/
17:02 jnthn I suspect quite a few C# folks have a "OO is the one true way" and are still clinging to that rather than embracing functional programming.
17:02 jnthn Certainly that was the sense I got when reading comments from some folks about the introduction of anonymous methods, then lambdas.
17:03 diakopter jnthn: :) but "we know how to make optimizers for OO"
17:03 * pmurias hates having a broken t on the keyboard :(
17:04 diakopter pmurias: pong from days ago
17:05 pmurias i don't remember why i ponged you then
17:05 pugs_svn r28807 | diakopter++ | [sprixel] much regression. <- an understatement
17:05 jnthn Hmm...we have a test case like this:
17:05 pmurias s/ponged/pinged/
17:05 jnthn my $topic = 'topic unchanged';
17:05 jnthn my @topic_array = <topic array unchanged>;
17:05 jnthn my $c = { $topic = $_; @topic_array = @_ };
17:05 jnthn $c( 2, 3, 4, 5 );
17:06 jnthn The test expects that $_ gets 2 bound to it, and @_ gets (2,3,4,5)
17:06 jnthn Which is kinda...huh?
17:06 Whiteknight joined #perl6
17:06 jnthn I mean, @_ is a slurpy array here, no?
17:06 pmurias diakopter: might have been thinking about unifing sprixel's and mildew-js runtimes
17:07 diakopter pmurias: oh.. :) cool idea to think about
17:07 jnthn So either $_ should get a value, and @_ gets the rest, or $_ gets nothing and @_ gets the lot, but not the same value getting bound to $_ *and* into the slurpy, surely...
17:07 diakopter jnthn: sorry to noisify your question/musings
17:07 colomon Sorry, guys, didn't mean to imply I agreed with the article.  (I blame infant interruptions for my disjointed irc'ing.)  Just thought it was an interesting code example, and wondered about how to approach it in p6.
17:08 pmurias &
17:09 jnthn ah, here we are, from S06.
17:09 jnthn Note also that if the sub's block contains placeholder variables
17:09 jnthn (such as C<$^foo> or C<$:bar>), those are considered to be formal
17:09 jnthn parameters already, so in that case C<@_> or C<%_> fill the role of
17:09 jnthn sopping up unmatched arguments.
17:10 jnthn So @_ should not get things that are bound to other parmaeters.
17:10 jnthn That reduces the question to whether $_ is considered a parameter on that block.
17:12 lumi joined #perl6
17:12 diakopter pmichaud: I switched sprixel to operate on state objects, each linked to a node in the original ast instead of cloning the nodes in the ast.  Each operation/opcode can still hang cached stuff on the original ast, though.
17:13 diakopter pmichaud: oh wait, you're not pmurias; where'd he go
17:13 diakopter pm<tab><tab>
17:14 mberends heh: sprixel/setting/Int.pm: this.invoker.invoker.invoker.i​nvoker.invoker.class_obj.ctor = ...
17:14 diakopter :)
17:14 mberends diakopter: do you think you're still sane?
17:14 zloyrusskiy joined #perl6
17:16 diakopter hey, what kind of question is that
17:16 diakopter :P
17:16 diakopter I suspect it takes a lot to get an insane person to recognize/admit they're insane......?
17:17 jnthn lol
17:18 mberends diakopter: that was the double meaning of my question ;)
17:19 colomon diakopter: for what it's worth, neither Rat.pm nor Complex.pm uses "is also".  though there are a couple of PIR functions in Complex...
17:20 pugs_svn r28808 | jnthn++ | [t/spec] Correct a test that I'm pretty sure expects the wrong thing (and if that's the right thing, it's a silly right thing anyway. ;-))
17:20 colomon rakudo: my $n = 10; my $m = 20; (^($n - 1)).map({^$m}.pick}).say
17:20 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "({^$m}.pic"␤in Main (file <unknown>, line <unknown>)␤»
17:21 colomon rakudo: my $n = 10; my $m = 20; (^($n - 1)).map({(^$m).pick}).say
17:21 p6eval rakudo 24ebf3: OUTPUT«52110700513␤»
17:21 diakopter colomon: oh... I just meant they're not directly useful without a little munging
17:21 justatheory joined #perl6
17:21 diakopter I mean, they can't be used directly/drop-in
17:21 jnthn diakopter: We'll probably stop using "is also" in a little while.
17:21 jnthn But yes, for now a little munge required.
17:22 colomon rakudo: my $n = 10; my $m = 20; (^($n - 1)).map({(^$m).pick}).perl.say
17:22 p6eval rakudo 24ebf3: OUTPUT«[3, 10, 2, 6, 13, 12, 5, 8, 18]␤»
17:22 colomon rakudo: my $n = 10; my $m = 20; (^($n - 1)).map({(^$m).pick}).sort.perl.say
17:22 p6eval rakudo 24ebf3: OUTPUT«[0, 1, 2, 4, 5, 6, 10, 14, 19]␤»
17:23 diakopter more to the point though, every implementation's circularity saw slices itself in different [numbers of] dimensions, so much of the functionality that works in rakudo's setting would have to be built up incrementally in sprixel
17:27 diakopter actually, I guess not *too* incrementally, since most of the tree's branches are deferred..
17:27 diakopter mberends: Act.js is the new interp.js
17:28 diakopter Act[ivation]
17:28 diakopter builtin.js goes away as well
17:28 diakopter builtins.js I meant
17:29 meppl joined #perl6
17:30 diakopter separate files for each "opcode" are nice...
17:31 mikehh joined #perl6
17:33 * mberends suddenly has a lot of code surveying to do. nice :)
17:33 mikehh rakudo (24ebf39) builds on parrot r41901 - make test PASS / make spectest_smolder (up to r28807 -> #29130) FAIL - Ubuntu 9.10 (beta) amd64
17:33 mikehh rakudo - t/spec/S06-signature/optional.rakudo - Failed test:  12
17:33 mikehh rakudo - 35,259 ok, 1 failed, 519 todo, 6,880 skipped and 0 unexpectedly succeeded
17:35 mikehh that's 27859 passing tests - 79%+
17:38 lumi joined #perl6
17:39 zloyrusskiy joined #perl6
17:40 pugs_svn r28809 | diakopter++ | [sprixel] workaround my File::Find ignorance
17:42 muixirt is there a working archive of the perl6 mailing lists?
17:44 pmichaud dev.perl.org/perl6/lists
17:45 pmichaud see also http://perl6.org/community/
17:45 diakopter mberends: also, this refactor will allow sprixel to stop faking the setting for STD, and just use the real sprixelCORE.setting
17:47 muixirt perl.org seems to be down. ?
17:47 colomon rakudo: my $n = 10; my $m = 2; my @a = (^($n - 1)).map({(^$m).pick}).sort; ((@a, $m) >>-<< (0, @a)).perl.say
17:47 p6eval rakudo 24ebf3: OUTPUT«[0, 0, 0, 1, 0, 0, 0, 0, 0, 1]␤»
17:47 pmichaud yes, perl.org seems downish
17:47 muixirt pmichaud: ok, thanks
17:47 pmichaud I also sometimes use google groups -- e.g. http://groups.google.com/grou​p/perl.perl6.language/topics
17:47 pmichaud but I often find it frustrating to search/use.
17:48 colomon rakudo: my $n = 10; my $m = 2; my @a = (^($n - 1)).map({(^$m).pick}).sort; @a.perl.say; ((@a, $m) >>-<< (0, @a)).perl.say
17:48 p6eval rakudo 24ebf3: OUTPUT«[0, 0, 0, 0, 1, 1, 1, 1, 1]␤[0, 0, 0, 0, 1, 0, 0, 0, 0, 1]␤»
17:49 colomon rakudo: my $n = 10; my $m = 20;  my @a = (^($n - 1)).map({(1..($m-1)).pick}).sort; @a.perl.say; ((@a, $m) >>-<< (0, @a)).perl.say
17:49 p6eval rakudo 24ebf3: OUTPUT«[8, 10, 10, 10, 10, 16, 17, 19, 19]␤[8, 2, 0, 0, 0, 6, 1, 2, 0, 1]␤»
17:50 mberends diakopter: it's terrific! You's bin workin' hard! It looks like you might be making some other radical changes before sprixel settles down, so thanks for the early commit.
17:52 diakopter mberends: I figure it's better to get the runtime's internals/opcodes stable and fully capable earlier than later... not a glamorous route though.
17:53 mberends diakopter: quite right. It's no fun changing the foundation when the walls are busy going up.
17:54 diakopter :) or working on the walls while the foundation is converted from slab to pier-and-beam (or skyhooks).
17:57 diakopter or, working on the walls and roof, and then discovering the foundation is atop a landfill or former gasoline tanks or toxic waste dump, and realizing the whole building needs lifted and [trans-]ported to another foundation on an entirely different property.
17:58 diakopter or atop a cemetery of Indigenous Persons
18:00 jnthn Even changing one part of the foundations is an epic pain when a lot is built on top of it.
18:02 * diakopter wants a foundation made of skyhooks
18:02 lisppaste3 colomon pasted "My implementation of the "Is Functional Abstraction Too Clever?" code" at http://paste.lisp.org/display/88801
18:04 shinobi-cl joined #perl6
18:06 shinobi-cl rakudo: class AClass; my Str $!name; method A (Str $!name) {...}; method show_name { say $!name }; my AClass Test .= new; Test.A('somename'); Test.show_name;
18:06 p6eval rakudo 24ebf3: OUTPUT«Malformed declaration at line 2, near "AClass Tes"␤in Main (file <unknown>, line <unknown>)␤»
18:07 shinobi-cl rakudo: class AClass; my Str $!name; method A (Str $!name) {...}; method show_name { say $!name }; my AClass $Test .= new; $Test.A('somename'); $Test.show_name;
18:07 p6eval rakudo 24ebf3: OUTPUT«No such attribute '$!name'␤in Main (file src/gen_setting.pm, line 206)␤»
18:07 jnthn shinobi-cl: has Str $!name
18:07 shinobi-cl oh, yes i forgot
18:08 shinobi-cl rakudo: class AClass; has Str $!name; method A (Str $!name) {...}; method show_name { say $!name }; my AClass $Test .= new; $Test.A('somename'); $Test.show_name;
18:08 p6eval rakudo 24ebf3: OUTPUT«Str()␤»
18:08 shinobi-cl rakudo: class AClass; has Str $!name; method A (Str $!name) {...}; method show_name { say $!name }; my AClass $Test .= new; &Test.A('somename'); &Test.show_name;
18:08 p6eval rakudo 24ebf3: OUTPUT«Method 'A' not found for invocant of class 'Failure'␤in Main (file src/gen_setting.pm, line 206)␤»
18:10 diakopter oops; forgot a dir
18:10 payload joined #perl6
18:11 shinobi-cl rakudo: class AClass; has Str $!name; method A (Str $a_name) { $!name = $a_name }; method show_name { say $!name }; my AClass $Test .= new; $Test.A('somename'); $Test.show_name;
18:11 p6eval rakudo 24ebf3: OUTPUT«somename␤»
18:13 lumi joined #perl6
18:14 shinobi-cl rakudo: say qx[ls -l];
18:14 p6eval rakudo 24ebf3: OUTPUT«operation not permitted in safe mode␤in Main (file /home/p6eval//p1/lib/parrot/1.6.0-​devel/languages/perl6/lib/Safe.pm, line 24)␤»
18:15 shinobi-cl rakudo: say readdir;
18:15 p6eval rakudo 24ebf3: OUTPUT«Could not find non-existent sub readdir␤in Main (file src/gen_setting.pm, line 206)␤»
18:18 justatheory joined #perl6
18:21 pmurias joined #perl6
18:23 diakopter pmurias: see backlog above... mis-sent to pmichaud
18:24 pmurias seen
18:25 pmurias diakopter: what we would need to share runtime would be to unify the way methods are called
18:26 diakopter Perl 6 methods or runtime object methods?
18:27 pmurias same thing
18:27 pmurias what do you mean by runtime object methods?
18:27 diakopter what do you mean by "same thing"? :)
18:28 diakopter I meant underlying js objects and ast operations/expressions.
18:28 jnthn oh phew...fixing all of the parameterized roles tests that were failing just needed a well-placed one-line code addition. :-)
18:29 * pmurias would love to hear of a way to remap caps lock to t
18:29 pmurias (on x windows)
18:30 lumi joined #perl6
18:30 pmurias diakopter: what do you mean by underlyin js objects
18:30 pmurias ?
18:31 diakopter probably it would be better if you explain first what you meant by unifying the way methods are called... (Perl 6 methods)
18:31 pmurias ok :)
18:32 pmurias in mildew a method call is compiled to object.DISPAtCH(interpreter,identifier,capture)
18:33 Ptn joined #perl6
18:33 pmurias and returns stuff by calling setr
18:33 diakopter ok, sounds good. what does the interpreter object store?
18:34 pmurias the current continuation
18:34 diakopter oh
18:34 pmurias i'll jus? use ? ins?ead of t as pas?ing i? is slow
18:34 diakopter ok :)
18:35 pmurias ?he in?erpre?er could be made a globall
18:35 lambdabot help <command>. Ask for help for <command>. Try 'list' for all commands
18:35 __ash__ joined #perl6
18:35 diakop hrm ?ha? didn'? work
18:36 * pmurias suspec?s he annoys people grea?ly wi?h using ?
18:36 diakopter how about _ instead; it's a little easier on the eyes
18:37 pmurias ok
18:37 pmurias _ does'_ look like an enocoding epic fail
18:37 __ash__ can you make pointers in perl6?
18:38 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; $lang_list.substr ('<LANG>', 'mydir'); say $lang_list;
18:38 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "('<LANG>',"␤in Main (file <unknown>, line <unknown>)␤»
18:38 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; $lang_list.subst ('<LANG>', 'mydir'); say $lang_list;
18:38 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "('<LANG>',"␤in Main (file <unknown>, line <unknown>)␤»
18:39 diakopter the in_erpre_er doesn'_ need to be a global; the current continuation is the 'this' object in sprixel's opcode function bodies
18:40 * pmurias looks at sprixel
18:40 diakopter I was just about to write the (single-dispatch only for now, of course) .DISPATCH method, but I wasn't going to make that routine a JS member of the JS objects representing Perl 6 objects.
18:41 diakopter pmurias: disregard interp.js and builtins.js; they're the old new thing
18:41 quietfanatic joined #perl6
18:41 pmurias diakopter: so wha_ should i look a_?
18:41 quietfanatic pmurias: xmodmap -e 'keysym Caps_Lock = t'
18:41 quietfanatic oh wait
18:42 quietfanatic that has an unexpected side effect
18:43 diakopter Act.js, Context.js (just committing now), setting/Int.pm, control_flow/*.js (forgot to commit earlier), misc/*.js
18:43 pmurias quietfanatic: didn'_ work
18:43 quietfanatic huh, weird
18:43 quietfanatic well, when I do it IT make it LOOK LIKE This.
18:44 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; say $lang_list.subst('<LANG>', 'mydir');
18:44 p6eval rakudo 24ebf3: OUTPUT« ls -1 mydir | tr [:upper:] [:lower:] ␤»
18:44 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; $lang_list.= subst ('<LANG>', 'mydir'); say $lang_list;
18:44 p6eval rakudo 24ebf3: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
18:44 diakopter pmurias: one minute for me to commit
18:45 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; $lang_list .= subst ('<LANG>', 'mydir'); say $lang_list;
18:45 p6eval rakudo 24ebf3: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
18:46 pugs_svn r28810 | diakopter++ | [sprixel] stuff I forgot earlier. mberends: see this ci too
18:47 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; given $lang_list { subst ('<LANG>', 'mydir'); say}
18:48 p6eval rakudo 24ebf3: OUTPUT«say requires an argument at line 2, near "}"␤in Main (file src/gen_setting.pm, line 2545)␤»
18:48 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; given $lang_list { subst ('<LANG>', 'mydir'); say $_}
18:48 p6eval rakudo 24ebf3: OUTPUT«Could not find non-existent sub subst␤in Main (file src/gen_setting.pm, line 206)␤»
18:49 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; given $lang_list { $_=$_.subst ('<LANG>', 'mydir'); say $_}
18:49 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "('<LANG>',"␤in Main (file <unknown>, line <unknown>)␤»
18:49 shinobi-cl rakudo:  my $lang_list = ' ls -1 <LANG> | tr [:upper:] [:lower:] '; given $lang_list { $_ = $_.subst ('<LANG>', 'mydir'); say $_}
18:49 justatheory joined #perl6
18:49 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "('<LANG>',"␤in Main (file <unknown>, line <unknown>)␤»
18:51 shinobi-cl i dont know what im doing wrong, how do i do a subst in one sentence?
18:52 NorwayGeek joined #perl6
18:52 shinobi-cl alas s///;
18:52 shinobi-cl and using <op>=
18:53 shinobi-cl this, $A .= subst('X', 'Y'); should be the same as $A = $A.subst('X','Y')?
18:54 diakopter pmurias: (committed)
18:54 Ptn Does anyone have a spare 5 minutes to help a nub with some issues building the latest rakudo/parrot release?
18:55 pmurias &
18:55 jnthn Ptn: Sure
18:55 jnthn Ptn: I'm kinda cooking dinner too, so I'll be back and forth a bit. :-)
18:55 shinobi-cl http://rakudo.org/how-to-get-rakudo   <- this works flawlessly to me
18:56 jnthn But ask away.
18:56 Ptn Been breaking for me shinobi-cl, probably something daft oO
18:56 Ptn Okies, jnthn ta.
18:57 shinobi-cl so, you have git , icu library and perl installed?
18:57 Ptn Using the tarball, and yes to the others.
18:57 pugs_svn r28811 | diakopter++ | [sprixel] delete extraneous file
18:58 Ptn It's falling over building parrot I believe.
18:58 Ptn Using Mingw
18:58 PZt joined #perl6
18:58 jnthn Ptn: It fails during "perl Configure.pl --gen-parrot"?
18:58 Ptn aye, looks like it has issues withsome of the files it grabs for the parrot isntall
18:59 Ptn Complains about missing operands files like parrot.h and similar errors in a few files.
19:01 jnthn Oh, that's...odd
19:01 jnthn Can you no-paste the output?
19:01 Ptn It's entirely likely Eeem, how much of it?
19:01 jnthn I wonder if you somehow got an incomplete Parrot checkout?
19:02 jnthn Ptn: Well, the last lines.
19:02 Ptn Rgr, one sec
19:02 jnthn http://gist.github.com/ is a good way to paste it :-)
19:04 colomon joined #perl6
19:04 * diakopter never got parrot to build in mingw
19:05 Ptn Eep
19:07 lumi joined #perl6
19:07 * jnthn wipes the tears from his eyes so he can see IRC again
19:07 diakopter I got it to build in cygwin/gcc and in cmd.exe/msvc, but not mingw
19:07 diakopter tears
19:07 diakopter ?
19:08 jnthn she left^W^Wchopping apparently super-super-strength onions
19:08 jnthn I think they rate as one of my favorite veg to eat and least favorite to chop. :-)
19:08 Ptn Nasty
19:09 jnthn It's OK, they're in the pan and cooking now.
19:09 jnthn Frying even.
19:09 jnthn hotdogs++
19:09 diakopter jnthn: do you know whether anyone's built it on mingw lately? a few months ago I hadn't heard of anyone doing that
19:09 diakopter (ever)
19:09 jnthn Well...I'd say "oh, Parrot on mingw is probably broken", but...
19:10 jnthn ...I thought that wsa what fperrad who makes the Windows binaries each month of Parrot and Rakudo builds on.
19:10 Ptn Binaries you say?
19:10 jnthn ah, this could be an easy solution for you ;-)
19:10 Ptn To shreds you say?
19:10 jnthn second, I'll fidn 'em
19:11 jnthn http://parrotwin32.sourceforge.net/
19:11 jnthn There you go.
19:11 Ptn I did have a hunt, but I came up empty handed.
19:11 Ptn Well, there you go =D
19:11 jnthn Ptn: I think iirc you need to download two things - first the Parrot 1.6.0 and then the Rakudo add-on.
19:12 Ptn I'll try this "setup-parrot-1.6.0-rakudo-21.exe" file, see what if anything explodes.
19:14 jnthn Ptn: Oh, I think that may actually be both bundled into one.
19:14 jnthn If so, fperrad++
19:14 jnthn BTW, if anyone here has rakudo.org wiki edit privs, we maybe should link to these binaries on that page.
19:14 Ptn There is a perl6 present ^crosses fingers*
19:14 jnthn (I can do it later to...)
19:15 Ptn Ooer "unable to find dynops and dnpmcs library"
19:16 __ash__ hmmm are captures like pointers?
19:19 jnthn Ptn: Hmm. Did the directory where the binary went get added to your PATH?
19:19 Ptn To the paths!
19:20 Ptn Seems to have, unless I'm looking for somethig else oO
19:22 Ptn Hmm, I'll do some poking around (ooer missus) after dinner.
19:22 Ptn Thanks for your help gents.
19:24 jnthn __ash__: You could perhaps see them as a kind of "fat reference".
19:24 __ash__ how would one make a linked list? with captures then?
19:26 lumi joined #perl6
19:28 jnthn __ash__: You don't really need to, since you objects are reference types by default anyway.
19:28 * jnthn eating - bbiab
19:28 dr_df0 joined #perl6
19:28 dr_df0 hi all
19:29 mberends hi dr_df0
19:29 dr_df0 is it possible, that slurp does not work in rakudo in a list context?
19:29 mberends true, slurping a file returns a string, I think
19:29 dr_df0 when I do: my @l=slurp "file_with_four_lines"; say @l[0];
19:30 dr_df0 it returns whole file
19:30 dr_df0 I thought, that the behavior is similar to Perl::Slurp module
19:30 mberends suggestion: split the string using "\n" as delimiter
19:31 dr_df0 that was implementing perl6 built-in :)
19:31 mberends there is the lines() function, definitely returns an array
19:32 Su-Shee dr_df0: @foo = fh.lines
19:32 Su-Shee aeh, $fh.lines, sorry
19:32 mberends and also: @foo = lines( "file_name" );
19:33 Su-Shee mberends: I don't have to open it?
19:33 mberends lines opens ( and closes ;)
19:33 dr_df0 ok, thanks
19:33 Su-Shee another line less.. :)
19:34 Su-Shee one day - in perl 7 - I just can say "hey, computer - do!" ;)
19:34 dr_df0 I'll check two options ... the problem with splitting is that the file I have i 40k+ lines :)
19:34 mberends only if the argument is a name, not a $handle
19:35 Su-Shee probably something like for $fh.lines works..
19:36 mberends rakudo: my @a = lines("/etc/passwd"); say @a[0];
19:36 p6eval rakudo 24ebf3: OUTPUT«root:x:0:0:root:/root:/bin/bash␤»
19:39 dr_df0 doing slurp on a BIG file, and splitting it causes "segmentation fault"
19:40 dr_df0 yesterday I reported a bug with sigsegv on reding that file line by line and splitting it line by line into records ... :)
19:40 mikehh joined #perl6
19:41 mberends rakudo: for lines("/etc/passwd") -> $a { say $a if $a ~~ /^r/;} # for dr_df0 and Su-Shee
19:41 p6eval rakudo 24ebf3: OUTPUT«root:x:0:0:root:/root:/bin/bash␤»
19:42 dr_df0 thnx
19:45 Su-Shee for lines "/etc/passwd" { } works as well.
19:48 mberends Su-Shee: you didn't tell us you were into golf as well ;)
19:49 kst joined #perl6
19:49 Su-Shee mberends: I totally love the natural language flow of perl.
19:50 Su-Shee wow :)
19:50 Su-Shee say $_ for lines "/etc/passwd"; works :)
19:51 mberends Su-Shee: .say for lines "/etc/passwd"
19:54 * jnthn back
19:54 dr_df0 guys
19:54 Su-Shee mberends: also nice. :)
19:55 dr_df0 for lines("big_filename") -> $i { .... } # tries to read the whole file into memory before any operations in the block
19:55 mberends Su-Shee: lines("/etc/passwd")>>.say # seen before  on #perl6
19:55 dr_df0 it should be "big_file"
19:56 dr_df0 so, on my 2GB machine I'm starting to swap
19:56 dr_df0 is there any lazy version of lines?
19:57 mberends $handle.get is one line at a time
19:57 dr_df0 Yes, but that's not lazy :)
19:57 dr_df0 in a sense that Haskell executes ...
19:58 payload joined #perl6
19:59 shinobi-cl rakudo: class AClass; submethod BUILD { say 'BUILD here!' } method new { say 'new here!' } my AClass $x .= new;
19:59 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "method new"␤in Main (file <unknown>, line <unknown>)␤»
20:00 shinobi-cl rakudo: class AClass; submethod BUILD { say 'BUILD here!' }; method new { say 'new here!' }; my AClass $x .= new;
20:00 p6eval rakudo 24ebf3: OUTPUT«new here!␤Assignment type check failed; expected AClass, but got Bool␤in Main (file <unknown>, line <unknown>)␤»
20:00 Su-Shee dr_df0: shouldn't this work line by line and not reading the entire file first?
20:01 shinobi-cl rakudo: class AClass; submethod BUILD { say 'BUILD here!' }; my AClass $x .= new;
20:01 p6eval rakudo 24ebf3: OUTPUT«BUILD here!␤»
20:01 shinobi-cl rakudo: class AClass { submethod BUILD { say 'BUILD here!' }; method new { say 'new here!' }; }; my AClass $x .= new;
20:01 p6eval rakudo 24ebf3: OUTPUT«new here!␤Assignment type check failed; expected AClass, but got Bool␤in Main (file <unknown>, line <unknown>)␤»
20:02 shinobi-cl this should call 'new', and 'BUILD' later?
20:02 dr_df0 Su-Shee: I'm trying to find a workaround for the problem I reported yesterday in perl#69840 bug
20:03 dr_df0 Su-Shee: rakudo is segfaulting when reading the file line by line, splitting it and pushing second field into array
20:03 jnthn dr_df0: .lines is specified as lazy.
20:03 jnthn dr_df0: Rakudo doesn't implement lazy lists yet, so we currently have to handle it as eager.
20:04 dr_df0 jnthn: Hi, it's krzys from yesterday :)
20:04 jnthn dr_df0: This probably isn't useful to you now, since you have a 2GB file now, but in the future uses of .lines will "auto-upgrade" to lazy semantics once Rakudo knows about that.
20:04 jnthn dr_df0: oh hai :-)
20:04 dr_df0 jnthn: no, the file is actually 1.7MB
20:05 dr_df0 jnthn: but reading it with lines fills up my 2GB of memory :(
20:06 mberends dr_df0: I had a similar experience with a Perl 6 Pod translator a few months ago. At that time rakudo consumed 15000 bytes of RAM for every byte in the file being read :/
20:06 dr_df0 Su-Shee: working with lines looked promissing, since it was processing the file much farther, but i run out of memory
20:07 Su-Shee dr_df0: sorry, I didn't know about your bug, I was plainly assuming that .lines will work smart and only line by line.
20:07 lumi joined #perl6
20:08 jnthn Su-Shee: Yeah. Will do. Not yet. ;-)
20:08 jnthn mberends: That sounds...awful.
20:08 jnthn mberends: I'd really like to get to the bottom of that one, if you are able to consdense it to a small example, btw.
20:09 mberends dr_df0: the memory consumption seems to come from using heap memory where other languages use (and re-use) the same stack space repeatedly
20:10 __ash__ rakudo: role Node is rw { has $.right; has $.left; }; my $a = 5; $a does Node; $a.right = $a; $a.left = $a; say $a.right; say $a.right.right; say $a.right.right.right;
20:10 p6eval rakudo 24ebf3: OUTPUT«5␤␤Method 'right' not found for invocant of class 'Undef'␤in Main (file src/gen_setting.pm, line 206)␤»
20:10 jnthn mberends: Yes, but we shouldn't leak said heap memory ;-)
20:10 mberends jnthn: I am suspicious of GC having problems that are seldom triggered because short programs run out of work before they run out of heap.
20:10 jnthn mberends: I am suspicious of GC having problems.
20:10 jnthn ;-)
20:11 mberends jnthn: I'll try to write a condensed example, later :)
20:11 jnthn mberends: I think one big issue that *should* have now gone away is that we used to leak contexts (and thus register frames) like mad.
20:11 crythias joined #perl6
20:12 jnthn OK - news on resig.
20:12 jnthn Latest spectest results show only 7 tests that would seem to need attention.
20:12 jnthn This is a rather large improvement on 70.
20:12 mberends jnthn++
20:12 shinobi-cl when defining a BUILD submethod and a new method for a class, which runs first when an object is instantiated?
20:13 jnthn Here's details.
20:13 jnthn t\spec\S02-builtin_data_types\capture - one failure, don't understand the test anyway, may just regress
20:13 jnthn t\spec\S04-closure-traits\start - couple of failures, probably same issue as test below
20:13 jnthn t\spec\S04-declarations\state - couple of failures
20:13 jnthn t\spec\S06-advanced_subroutine_features\wrap - epic, epic fail
20:13 jnthn t\spec\S12-methods\instance - one failure, didn't investigate yet
20:13 jnthn t\spec\S32-num\rat - fails, but I think I just need to rebase to get a fix in master
20:13 jnthn t\spec\integration\packages - epic, epic fail
20:13 jnthn shinobi-cl: new is what gets called immediately, e.g. it's an override of the constructor.
20:14 jnthn shinobi-cl: BUILD is called by BUILDALL which is called by bless which is called by new (either the default one, or yours).
20:14 shinobi-cl rakudo: class AClass; submethod BUILD { say 'BUILD here!' }; method new { say 'new here!'; }; my AClass $x .= new;
20:14 p6eval rakudo 24ebf3: OUTPUT«new here!␤Assignment type check failed; expected AClass, but got Bool␤in Main (file <unknown>, line <unknown>)␤»
20:15 __ash__ jnthn: this is the reference thing i was referring to, its not working the way I thought it would if all assignments are reference assignments
20:15 jnthn shinobi-cl: Your new method actually has to create an object. ;-)
20:15 shinobi-cl rakudo: class AClass; submethod BUILD { say 'BUILD here!' }; method new { say 'new here!'; BUILD(self); }; my AClass $x .= new;
20:15 p6eval rakudo 24ebf3: OUTPUT«new here!␤BUILD here!␤Assignment type check failed; expected AClass, but got Bool␤in Main (file <unknown>, line <unknown>)␤»
20:15 __ash__ rakudo: role Node is rw { has $.right; has $.left; }; my $a = 5; $a does Node; $a.right = $a; $a.left = $a; say $a.right; say $a.right.right; say $a.right.right.right;
20:15 p6eval rakudo 24ebf3: OUTPUT«5␤␤Method 'right' not found for invocant of class 'Undef'␤in Main (file src/gen_setting.pm, line 206)␤»
20:16 jnthn __ash__: Int has value assignment semantics, that's why. :-)
20:16 jnthn __ash__: I said objects by default, not all objects. :-)
20:17 __ash__ oh, okay, hmmm
20:17 jnthn Int is an object that chooses to have value semantics instead.
20:17 jnthn Well, a class, whose objects...
20:19 shinobi-cl rakudo: class AClass; has $!name; submethod BUILD { say $!name~'BUILD here!' }; my AClass $x .= new($name => 'hai');
20:19 p6eval rakudo 24ebf3: OUTPUT«Symbol '$name' not predeclared in <anonymous> (/tmp/8l7IFqN9Pc:2)␤in Main (file <unknown>, line <unknown>)␤»
20:20 shinobi-cl rakudo: class AClass; has $!name; submethod BUILD { say $!name~'BUILD here!' }; my AClass $x .= new('name' => 'hai');
20:20 p6eval rakudo 24ebf3: OUTPUT«Use of uninitialized value␤BUILD here!␤»
20:20 shinobi-cl rakudo: class AClass; has $.name; submethod BUILD { say $.name~'BUILD here!' }; my AClass $x .= new('name' => 'hai');
20:20 p6eval rakudo 24ebf3: OUTPUT«Use of uninitialized value␤BUILD here!␤»
20:20 shinobi-cl rakudo: class AClass; has $.name; submethod BUILD { say $.name~'BUILD here!' }; my AClass $x .= new($name => 'hai');
20:21 p6eval rakudo 24ebf3: OUTPUT«Symbol '$name' not predeclared in <anonymous> (/tmp/J4qoCrQ7ne:2)␤in Main (file <unknown>, line <unknown>)␤»
20:30 pugs_svn r28812 | lwall++ | [STD] tell constraints they're not declarative, masak++
20:31 * jnthn wonders which way around that was called
20:31 jnthn Hmm. So if I'm in a branch and I want to get the latest things in master, I just "git rebase master", yes?
20:32 jnthn oh, I rather suspect it didn't do what I expected 'cus I forgot to git pull while in master.
20:34 jnthn oh *sigh* wtf has it done...
20:37 shinobi-cl rakudo: class AClass; has $.name; submethod BUILD { say $.name~'BUILD here!' }; init (Str $a_name) {$.name = $a_name}; my AClass $x .= new('hai'); $x.$.name;
20:37 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "$a_name) {"␤in Main (file <unknown>, line <unknown>)␤»
20:37 shinobi-cl rakudo: class AClass; has $.name; submethod BUILD { say $.name~'BUILD here!' }; init (Str $a_name) {$.name = $a_name}; my AClass $x .= new('hai'); say $x.$.name;
20:37 p6eval rakudo 24ebf3: OUTPUT«Confused at line 2, near "$a_name) {"␤in Main (file <unknown>, line <unknown>)␤»
20:38 mberends jnthn: git pull is a kinda macro for git fetch && get merge, fwiw
20:39 shinobi-cl left #perl6
20:39 jnthn mberends: And what should git rebase master have done?
20:40 jnthn I thought it would sync my current branch with master, and apply all of my patches on top of that.
20:41 jnthn Instead, somehow after pushing this (git push origin resig), instead I now see every single patch since I started the branch appear a second time.
20:41 jnthn And I'm still missing the latest changes from master.
20:41 FullMetalHarlot joined #perl6
20:41 shinobi-cl joined #perl6
20:42 rblasch_ joined #perl6
20:42 mberends jnthn: iana(git expert), but it should have done something similar to removing (stashing) your changes, fast forward others' changes, then re-apply your edits.
20:43 jnthn mberends: Heh, that was my expectation too.
20:43 mberends jnthn: that git push was probably too soon.
20:43 jnthn "too soon"?
20:43 jnthn I'd finished the rebase, what else was I meant to do?
20:44 mberends jnthn: you may have rebased other peoples' resig changes, not master changes.
20:45 jnthn mberends: afaik, nobody else has commited anything to resig though.
20:46 mberends jnthn: i know that, you know that, but git may not have thought you meant that ;)
20:46 jnthn Thing is, now it also wants to duplicately apply all of my patches, so an attempt to rebase again is going to be a huge problem.
20:47 lumi joined #perl6
20:47 jnthn This is about the point where I create resig2, and copy-paste the source tree and commit the lot as one change. *sigh*
20:47 mberends jnthn: resig is all your work, of course. I humbly suggest you may have asked git to do the wrong thing.
20:47 jnthn mberends: I'm sure I have.
20:47 jnthn mberends: I'd just love to know what.
20:47 mberends jnthn: the git-heads always say it's no problem, everything is logged
20:47 rblasch joined #perl6
20:47 mberends jnthn: you just have to know how to fish the needle out of the haystack
20:48 jnthn meh. I'll do whatever works, and if somebody wants to complain about me having made history imprecise, they can fix it themselves.
20:48 mberends :)
20:48 pmichaud "precise history" is generally a myth anyway.  :)
20:48 pmichaud history often depends on the perspective of the viewer.
20:48 jnthn ;-)
20:48 pmichaud or, put another way, I'll absolve you of any history imperfects :)
20:48 pmichaud *imperfections :)
20:49 jnthn And to think that I only did this now because I wanted to get form 7 fails to 6.
20:49 jnthn :-|
20:49 pmichaud (and yes, if someone doesn't like it, they can fix the history themselves)
20:49 mberends history will say you took a long way round, and still reached the goal
20:50 pmichaud I've decided that PAST needs to become a bit smarter about constants generation... including constant structures.
20:51 pmichaud Otherwise operator precedence parsing in nqp-rx is going to become (1) cumbersome, or (2) very slow, or (3) both.
20:52 mberends no! please no!
20:53 jnthn I guess this will have benefits beyond nqp-rx too
20:53 pmichaud sure
20:53 pmichaud essentially I'm thinking that I'll cache a constant once it's been computed the first time (i.e., lazy constants)
20:53 pmichaud subsequent requests for the constant will reuse the cached value
20:54 pmichaud thus:    for 1..20 {  say <the quick brown fox>; }    will build "the quick brown fox" list only once
20:55 jnthn ooh, nice.
20:55 pmichaud I was thinking about building all of the constants at load time, but that increases startup cost
20:55 jnthn Yes
20:56 pmichaud we can also try building them at compile time (e.g., via :immediate), but that might lead to a few other issues
20:56 jnthn Our startup cost is already kinda high.
20:56 jnthn Yes
20:56 jnthn It's something to work towards, but probably not something we can do yet.
20:56 pmichaud well, I particularly want to be able to create hash constants (for operator precedence tables)
20:57 pmichaud i.e., I want    { %additive, :pirop<add> }    to produce a constant hash  (assuming %additive is also a constant hash)
20:57 jnthn ah, ok
20:57 pmichaud I don't want to be computing a new hash like that every time an infix:<+> is encountered in the source :)
20:58 jnthn No, you sure don't. :-)
20:58 jnthn We need to be faster, not just slow in a different way. ;-)
20:58 pmichaud first, another bugfix for PAST
20:58 pmichaud currently we generate subid's using a timestamp to avoid conflicts
20:59 pmichaud apparently 1-second resolution isn't sufficient :-|
20:59 pmichaud I sometimes run into places during the nqp-rx build where I end up with identically-identified subs from separate compilation requests
20:59 jnthn oh
20:59 jnthn eww.
20:59 jnthn Yes, that's bad.
21:00 pmichaud otoh, it's a good sign that our compilation speed is fast enough that 1-second resolution is insufficient :)
21:00 jnthn Well, there is that way of looking at it. :-)
21:01 * jnthn finally may have a branch with the things that he wants in it.
21:01 mberends .oO( compile code... wait for next clock tick for unique id... compile code... )
21:02 pmichaud mberends: I thought of that :-)
21:02 pmichaud really I'd prefer a nicer uuid generator than timestamps :-)
21:02 pmichaud this does in a pinch, though :)
21:02 jnthn ./nqp foo.pm && sleep 1
21:02 jnthn ;-)
21:04 jnthn Well, that's rat.t crossed off my list.
21:04 jnthn Sheesh, that was more work than fixing all of the S14 failures. :-/
21:05 pmichaud .oO(  pmurias:  when your 't' key goes ou+ again, +ry using +he '+' key ins+ead.  :-)
21:05 jnthn I+ look lee+.
21:05 pmichaud exac+ly
21:06 pmichaud I once had the 'p' key go out on my keyboard, so I re.laced all of the occurrences with .eriods.
21:06 pmichaud that worked out .retty well also
21:06 pmichaud and the dot is easy to ty.e
21:06 jnthn That's an interesting method.
21:07 pmichaud (and in regexes dot matches any character, although this occurred long before .erl existed)  :-)
21:07 justatheory joined #perl6
21:07 jnthn pmichaud: I'm srsly pondering regressing on one test.
21:07 pmichaud which test?
21:08 jnthn S02-builtin_data_types/capture.rakudo, test 16
21:08 * pmichaud looks.
21:08 jnthn I don't really understand what it's after.
21:08 pmichaud do you know the line number in capture.t, off hand?
21:08 jnthn Nor why we got it right before, or why we get it wrong now.
21:08 pmichaud or the description of the test?
21:09 jnthn not ok 16 - unflattened captures can be passed to subs
21:09 pmichaud I have no problem with regressing that test.
21:09 jnthn Does it look correct to you?
21:09 pmichaud Nor am I certain that the test is correct.
21:09 jnthn That is, a valid test?
21:09 jnthn Yeah, I was like, "huh".
21:10 pmichaud and it may all be moot after the parcel changes anyway.
21:10 jnthn I've stared at it 3 times already and not really got the point of what it wants.
21:10 pmichaud I think it wants captures to act exactly like references somehow.
21:11 jnthn I guess we can review it in amongst the parcel/capture changes later on.
21:11 pmichaud anyway, I know why we passed it previously (because our \(...) captures do act like references at the moment)
21:12 jnthn I'm not sure why we don't pass it now...
21:12 pmichaud but that test isn't important enough to be a blocker.
21:12 jnthn Which does bother me a little.
21:12 jnthn But since all of the passing arrays/hashes/sclars/etc tests pass...
21:12 pmichaud I'd say we review it among parcel/capture changes.
21:12 pmichaud anyway, it's perfectly okay with me for us to regress that test.
21:12 jnthn OK, sounds good.
21:13 jnthn At the moment, I think the other 5 test files I'm left with should all be fixed.
21:13 jnthn I think two of them are the same underlying issue anyway.
21:14 jnthn One of them points to a deep issue (the need to split up package blocks into declarative and non-declarative bits.)
21:14 jnthn And two I'm not sure about how hard they are to deal with yet.
21:15 Su-Shee left #perl6
21:15 am0c joined #perl6
21:28 shinobi-cl left #perl6
21:29 tkr joined #perl6
21:33 shinobi-cl joined #perl6
21:33 shinobi-cl left #perl6
22:11 lichtkind_ good night
22:11 mberends good night lichtkind_
22:11 lichtkind_ thanks
22:16 lumi joined #perl6
22:27 jnthn We're down to 3 test files as far as I'm aware that need attention.
22:27 jnthn Before resig2 is ready.
22:28 jnthn I've tried to deal with the wrap.t fails tonight, but it's...something odd.
22:28 jnthn (not sure what yet)
22:28 jnthn Anyway, enough for today. Tomorrow I'll try and work on book a bit.
22:32 mberends jnthn: well done, good night
22:48 kst joined #perl6
22:51 TiMBuS joined #perl6
23:14 tak11 joined #perl6
23:32 lumi joined #perl6
23:42 quietfanatic joined #perl6
23:57 colomon joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo