»ö« 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.
00:00 fk_ left 00:04 Guest69853 left
japhb Is there a shorter or more idiomatic way to exhaust a finite generator than 'my @a = gather { take $_ while ($_ = gen-func()).defined };' ? 00:07
I'm afraid I've got brainlock at the moment
flussence 1 while gen-func().defined; might work, there's probably a better way of saying it though 00:10
japhb ... I should have specified: I actually want the values obtained during the exhaustion. :-) 00:11
sorear japhb: take (gen-func() // last) while 1; maybe 00:12
flussence oh whoops, ignore that then :)
00:12 molaf_ left
japhb sorear, hmmm, interesting 00:13
At least it avoids the $_ blech
sorear there's also while gen-func -> $x { take $x }
which is not quite the same 00:14
japhb Yeah, I really need to gracefully handle gen-func producing false-but-defined 00:15
00:24 molaf_ joined 00:36 thou left 00:38 bonsaikitten joined 00:44 spine_ left, wknight8111 joined
dalek ast: 3a17c6e | (Solomon Foster)++ | S (2 files):
Fudge for niecza.
00:56
00:58 packetknife left 01:15 datums_nb left
dalek ecza: eda2e78 | sorear++ | lib/ (3 files):
Less horrible string comparisons on STable type
01:16
01:19 araujo left 01:25 araujo joined, araujo left, araujo joined
dalek ecza: ab45767 | (Solomon Foster)++ | lib/CORE.setting:
Add $limit to lines, :r and :rw to trying to open a file.
01:33
ecza: 9df3e9a | (Solomon Foster)++ | t/spectest.data:
Turn on S16-filehandles/io.t.
ecza: eb4c919 | (Solomon Foster)++ | lib/CORE.setting:
Allow comb to handle Whatever argument.
01:42 thou_ joined 01:44 LlamaRider joined
sorear o/ thou_, LlamaRider 01:51
LlamaRider hi :)
sorear colomon: FWIW, I'm not entirely sold on open returning IO 01:52
colomon me neither 01:53
sorear colomon: "/path".IO is used to produce magic pathname objects for filetests; by S13(?), .IO ought to return an IO object
and I really think that pathnames and file handles are not the same thing
even if there is the old stat/fstat dualism 01:54
colomon it does smack of the kitchen sink
geekosaur remembers it being specced, didn't really understand it then either despite peripheral involvement 01:55
(grew out of fun encountered while trying to add filetests to pugs) 01:56
01:58 LlamaRider left 02:00 am0c joined 02:02 awoodland joined 02:03 datums_nb joined 02:06 LlamaRider joined, shinobicl__ joined, datums_nb left 02:07 shinobicl___ joined
shinobicl___ rakudo: try { warn "Ooops"; CONTROL { say "got something" }} 02:08
02:08 gv left
p6eval rakudo ea0311: OUTPUT«got something␤Ooops␤» 02:08
shinobicl___ rakudo: try { warn "Ooops"; CATCH { say "got something" }}
p6eval rakudo ea0311: OUTPUT«Ooops␤»
02:09 datums_nb joined
shinobicl___ mmm, "warn" used to trigger CATCH... what should i use now instead? "die"? 02:09
sorear yes, CATCH only catches die
shinobicl___ ok, thanks sorear.. 02:10
02:10 shinobicl__ left
dalek ast: 0792989 | (Solomon Foster)++ | S10-packages/basic.t:
Fudge for niecza.
02:11
ecza: 211db3b | (Solomon Foster)++ | t/spectest.data:
Turn on S10-packages/basic.t.
02:12
colomon $/ = Any; # ??? 02:18
perl6: $/ = Any; 02:19
p6eval pugs b927740, rakudo ea0311: ( no output )
..niecza v13-69-geb4c919: OUTPUT«===SORRY!===␤␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/ttXdFAqHJU line 1:␤------> $/⏏ = Any;␤␤Parse failed␤␤»
colomon std: $/ = Any; 02:20
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/D6C9y7WL8z line 1:␤------> $/⏏ = Any;␤Parse failed␤FAILED 00:01 119m␤»
colomon I'm deleting all the $/ = Any from this test file, since it seems unneeded and is definitely illegal p6. 02:24
02:25 preflex left, preflex_ joined 02:26 preflex_ is now known as preflex
dalek ecza: e71efc9 | sorear++ | lib/ObjModel.cs:
Add a new CurriedRole type, not yet used
02:26
ecza: 2d87a9b | sorear++ | lib/ (2 files):
Remove role memoization hack
ast: 3d83f03 | (Solomon Foster)++ | S05-modifier/pos.t:
Remove illegal $/ = Any lines. Additional fudging for niecza.
02:28
02:28 packetknife joined 02:32 am0c left
colomon sorear: working on roles? 02:32
sorear colomon: yes
colomon how is it coming?
sorear according to plan 02:33
colomon most be patient. ;) 02:34
*must
[Coke] niecza: 'theXbigXbang'.split(/X/, -1).say 02:36
p6eval niecza v13-69-geb4c919: OUTPUT«theXbigXbang␤»
[Coke] niecza: 'theXbigXbang'.split(/X/, 0).say 02:37
p6eval niecza v13-69-geb4c919: OUTPUT«theXbigXbang␤»
colomon that -1 should probably be an error 02:39
sorear and I were talking about the split tests the other day.
there is a school of thought (sorear, and masak and I are at least strongly leaning that way) that niecza is right and the tests are wrong
sorear who are you talking to?
colomon sorear: [Coke] 02:40
02:40 shinobicl___ left
colomon [Coke] is trying tests from the split test files. 02:40
in p6eval, I mean.
02:41 LlamaRider_ joined
colomon in fact, I was just wondering what it would do to the tests passing ratio if we fixed the test files -- since rakudo would suddenly be failing a bunch of the tests. 02:41
[Coke] niecza: ''.split('').say 02:42
p6eval niecza v13-69-geb4c919: OUTPUT« ␤»
[Coke] niecza: ''.split('').WHAT.say
p6eval niecza v13-69-geb4c919: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 808 (warn @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 172 (Mu.Str @ 10) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting…
[Coke] niecza: ''.split('').elems.say
p6eval niecza v13-69-geb4c919: OUTPUT«2␤»
02:44 LlamaRider left
[Coke] niecza: say 'abcdefg'.split('', 3) 02:44
p6eval niecza v13-69-geb4c919: OUTPUT« a bcdefg␤»
[Coke] colomon: well, clearly it would tip the scale. ;) 02:45
dalek ast: a59f0c2 | coke++ | S32-str/split-simple.t:
niecza fudge
02:46
ecza: 71b660d | coke++ | t/spectest.data:
run S32-str/split-simple.t
02:47
[Coke] niecza: say sleep 3; 02:49
p6eval niecza v13-69-geb4c919: OUTPUT«Nil␤»
[Coke] nom: say sleep 3;
p6eval nom ea0311: OUTPUT«3␤»
[Coke] niecza: say time 02:50
p6eval niecza v13-69-geb4c919: OUTPUT«1325643009.296046␤»
[Coke] sorear: mind if I add that? 02:52
02:53 wknight8111 left
colomon ok !eval('module MY; 1'), 'MY is an out of scope name'; 02:53
shouldn't that be eval_dies_ok or something like that?
02:55 wolfman2000 joined 02:58 thou_ left
[Coke] colomon: IANAC# programmer: do you see anything wrong with gist.github.com/1558253 03:00
? 03:01
(swapping that in, the build dies. Trying to figure out where.)
ah, at the rnull, I bet. 03:02
colomon yeah, the code there looks okay as far as I can tell. but you can't call it with an rnull, if that's what you're doing 03:05
[Coke] I have no idea how to update the setting to allow for a return value for sleep. any pointers?
lib/CORE.setting //sleep
colomon let me look
I think you just delete the rnull 03:06
{ Q:CgOp { (sleep (obj_getnum {$x})) } }
try that
oh, but you've got to fix the return value for sleep 03:07
return MakeFloat(stopwatch.Elapsed.TotalSeconds);
that's assuming it's a double 03:08
[Coke] trying...
colomon sorear: S02-names-vars/variables-and-packages.t line 100 or so, get variable not yet declared using a sub (1): does this test look right to you? 03:10
[Coke] niecza> say sleep 4
4.0004932
spec says it returns a num. good enough?
03:12 am0c joined
[Coke] thinks so. 03:12
colomon +1
do the spectests pass? :) 03:13
[Coke] gets us the one failing sleep spectest, yes.
dalek ecza: 0586ec1 | coke++ | lib/ (2 files):
Add return value for sleep

  colomon++ for some C# glue!
03:14
ecza: fb83a49 | coke++ | t/spectest.data:
run S29-context/sleep.t
colomon niecza: my $a; say ($a++).defined 03:16
p6eval niecza v13-73-g71b660d: OUTPUT«Bool::True␤»
colomon niecza: my $a; say ($a).defined
p6eval niecza v13-73-g71b660d: OUTPUT«Bool::False␤»
dalek ast: a3ff1ef | (Solomon Foster)++ | S02-names-vars/variables-and-packages.t:
Fudge for niecza.
03:19
ecza: 53a454d | (Solomon Foster)++ | / (3 files):
Merge branch 'master' of github.com:sorear/niecza
03:21
ecza: 36232b7 | (Solomon Foster)++ | t/spectest.data:
Turn on S02-names-vars/variables-and-packages.t.
ast: 6c6952b | coke++ | S02-literals/fmt-interpolation.t:
niecza fudge
03:26
ruoso does niecza implements the equivalent of 6model? 03:27
dalek ecza: 9614045 | coke++ | t/spectest.data:
run S02-literals/fmt-interpolation.t
03:28
[Coke] points ruoso at colomon,sorear.
colomon ?
oh, I see the question 03:29
I believe the correct answer is "not yet"
ruoso in the sense that it somewhat does? or in the sense that it's in the plan? 03:30
colomon I'm pretty sure it doesn't have anything like it now, but sorear's been studying it carefully
ruoso oh... ok...
I am considering prototyping some of the threading things... 03:31
(in special the blocking-buffered-stream thingy)
and maybe niecza might be easier to do that prototyping than rakudo... considering VM support for threads 03:32
colomon sounds reasonable to me. 03:33
[Coke] colomon: I'm going to do another test summary run. should I wait?
ruoso is there some documentation of the internals of how niecza is implemented? (runtime-wise)?
colomon [Coke]: yeah, give me a minute
ruoso: maybe github.com/sorear/niecza/blob/mast...mpiler.pod 03:34
sorear niecza's 6model implementation is not as good as Rakudo's 03:35
but I would call it a 6model implementation 03:36
niecza: foo; sub foo() { } 03:37
p6eval niecza v13-73-g71b660d: ( no output )
dalek ast: 535c5e1 | (Solomon Foster)++ | S12-methods/indirect_notation.t:
Fudge for niecza.
ast: 7adcee8 | (Solomon Foster)++ | S02-literals/fmt-interpolation.t:
Merge branch 'master' of github.com:perl6/roast
sorear niecza: { foo; sub foo() { } }
p6eval niecza v13-73-g71b660d: ( no output )
03:37 Psyche^ joined
ruoso sorear: so... if niecza just feeds the clr... I presume it could as well just use the threading primitives from CLR, right? 03:39
dalek ecza: 9c97d31 | (Solomon Foster)++ | t/spectest.data:
Turn on S12-methods/indirect_notation.t.
colomon [Coke]: okay, pull and go. :)
sorear ruoso: niecza has a thin wrapper over CLR threading already 03:40
ruoso: the runtime has mostly been designed to be thread-safe
(iirc, the biggest remaining trouble spots are LTM and callbacks into the compiler)
ruoso is there any reading pointer for what that thin wrapper does? 03:41
03:41 Patterner left, Psyche^ is now known as Patterner
sorear ruoso: lib/Threading.pm6 03:42
03:43 am0c left
ruoso sorear: ah... you already have the blocking-buffered-streaming-thingy 03:43
colomon niecza: say 4 R[+] 5 03:49
p6eval niecza v13-73-g71b660d: OUTPUT«9␤»
03:50 awoodland left
sorear perl6: say 4 R[+] 5 03:50
p6eval rakudo ea0311, niecza v13-73-g71b660d: OUTPUT«9␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "R"␤ expecting operator, ":" or ","␤ at /tmp/Q58Mg1ziMZ line 1, column 7␤»
colomon ooo, broken test
dalek ecza: 719cbf1 | sorear++ | lib/ (3 files):
Foo[Bar] produces a CurriedRole which is only instantiated when actually used
03:51
[Coke] colomon: running now. 03:52
colomon [Coke]: about to check in another 22 passes. ;) 03:53
dalek ast: 8401b62 | (Solomon Foster)++ | S03-operators/nesting.t:
Fudge for niecza.
[Coke] ok, rerunning. ;)
... as soon as you add that file to spectestdata... 03:54
dalek ecza: 05da5bd | (Solomon Foster)++ | t/spectest.data:
Turn on S03-operators/nesting.t.
colomon there. :)
[Coke] ok, running now, will try to remember to commit it before zzz
03:55 orafu left, orafu joined
ruoso niecza: use Threads; my $a = Threads::ObjectPipe.new(); Threads::Thread.new({ for 1..10 -> $i { $a.put($i); Threads::Thread.sleep(0.04e0) } }); say $a.get() for 1..10; 03:56
p6eval niecza v13-73-g71b660d: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
ruoso niecza: use Threads; my $a = Threads::ObjectPipe.new(); Threads::Thread.new({ for 1..10 -> $i { $a.put(time); Threads::Thread.sleep(1) } }); say $a.get() for 1..10;
p6eval niecza v13-73-g71b660d: OUTPUT«Potential difficulties:␤ $i is declared but not used at /tmp/SoX2kTsOpC line 1:␤------> w(); Threads::Thread.new({ for 1..10 -> ⏏$i { $a.put(time); Threads::Thread.sleep␤␤1325646966.205935␤␤Unhandled Exception: System.InvalidCastExcepti…
ruoso niecza: use Threads; my $a = Threads::ObjectPipe.new(); Threads::Thread.new({ for 1..10 -> $i { $a.put(time); Threads::Thread.sleep(1e0) } }); say $a.get() for 1..10;
p6eval niecza v13-73-g71b660d: OUTPUT«(timeout)Potential difficulties:␤ $i is declared but not used at /tmp/CPGlvF2N8o line 1:␤------> w(); Threads::Thread.new({ for 1..10 -> ⏏$i { $a.put(time); Threads::Thread.sleep␤␤1325646977.432318␤1325646978.4434741␤1325646979.4443009␤… 03:57
ruoso that's awesome... so the primitives I need for my prototyping are there... 03:58
dalek ecza: 3e68017 | sorear++ | lib/Threads.pm6:
Remove old/broken Threads.pm6 &sleep, ruoso++
03:59
sorear there's a sleep in the setting that will work better, but it was being shadowed by the old/broken one
note that the setting's sleep is a prefix operator, not a normal function
so you have to call it sleep 0.2 or sleep (0.2) 04:00
sleep(0.2) won't work
ruoso the sleep was not the thing I wanted to test anyway :)
but rather the blocking wait
sorear ruoso, if you need any help with grammar/actions modifications, I'd be happy 04:01
dalek ast: 5fd22f2 | (Solomon Foster)++ | S03-sequence/arity-2-or-more.t:
Fudge for niecza.
ruoso sorear: I guess my starting point would be the Feed operator
basically, the feed operator would return a Lazy list that would be built from a ObjectPipe 04:02
dalek ecza: 4a19356 | (Solomon Foster)++ | t/spectest.data:
Turn on S03-sequence/arity-2-or-more.t.
ruoso sorear: the ObjectPipe does need a "max buffer size" 04:05
sorear: I am having a build failure.... I'm using the mono from Debian stable 04:07
error CS0040: Unexpected debug information initialization error `The assembly for default symbol writer cannot be loaded'
sorear either finish installing Mono, or remove --debug from the Makefile 04:08
ruoso what else do I need installed? 04:09
(removing debug did seem to work, anyway)
04:11 satyavvd joined
sorear libmono2.0-cil 04:11
I recommend mono-complete though
ruoso installing mono-complete
and the sudoku solver runs in a pretty decent speed 04:16
sorear it works without modification on niecza? 04:17
ruoso I only had to remove the "eager" 04:18
(which was only there because of rakudo quirks
and it solves it in 3.5s 04:20
04:20 odoacre joined
ruoso hah... and it actually parallelized 04:20
real0m3.555s
user0m4.636s
sys0m0.084s
thanks to the junctions 04:21
(i think)
sorear I assure you there is no code in Niecza to distribute junction work across threads
My best guess is parallel GC in Mono
ruoso ah.. ok.. 04:22
dalek ecza: 32a629c | sorear++ | lib/Kernel.cs:
Allow 0-arg composing of a parametrized role without first currying it
04:24
ruoso sorear: is there any support for exporting compiled bytecode? 04:25
sorear You can save the bytecode, but there's no way (yet) to make a polished .dll out of a P6 library 04:27
ruoso I would think that to be harder in any case
I was considering more like a "statically linked executable"
sorear I suppose you're talking about the way run/Niecza.exe is created 04:30
ruoso not specifically... I'm more like considering the runtime requirements in the mono side when you distribute a niecza-compiled executable 04:31
dalek ast: 9f0ffaf | (Solomon Foster)++ | S02-literals/char-by-name.t:
Fudge for niecza.
04:36
ecza: 54b7729 | (Solomon Foster)++ | t/spectest.data:
Turn on S02-literals/char-by-name.t.
04:37
ecza: 477af89 | sorear++ | / (2 files):
All roles are parametric, with an implied first argument of $?CLASS
04:38
04:43 am0c joined
colomon niecza: say Any.gist 04:48
p6eval niecza v13-84-g4a19356: OUTPUT«Any()␤»
ruoso sorear: github.com/ruoso/niecza/commit/125...5fe92c3d1f 04:49
04:49 mkramer left, proller left
sorear ruoso: I approve. Do you mind if I just give you a commit bit? 04:54
ruoso not at all
04:55 alc joined
sorear done 04:57
dalek ecza: 27499a6 | (Daniel Ruoso)++ | / (2 files):
Add a max_buffer_size to the ObjectPipe

The blocking aspect should work both ways, not only the reader should block on the writer but it is also important that the writer blocks on the reader so that we only advance a reasonable set of data prior to any consumption. Just like unix pipes.
Added an example code that demonstrates that.
04:58
ruoso night & 04:59
05:00 shinobicl_ left 05:06 kaleem joined
colomon 'night, all 05:12
05:22 Chillance joined
sorear bye 05:23
rakudo: role Foo[$x,$y] { }; Any but Foo[2] 05:25
p6eval rakudo ea0311: OUTPUT«No applicable candidates found to dispatch to for '_block1394'. Available candidates are:␤:(Mu, Mu $x, Mu $y)␤␤ in sub <anon> at src/gen/Metamodel.pm:3414␤ in specialize at src/gen/Metamodel.pm:1788␤ in specialize at src/gen/Metamodel.pm:1473␤ in <anon> at src/…
sorear rakudo: role Foo[$x,$y] { }; Foo[2]
p6eval rakudo ea0311: ( no output )
sorear excellent
05:26 mkramer joined 05:36 pochi left
sorear niecza: role Foo { }; class Bar does Foo { } 05:42
p6eval niecza v13-88-g27499a6: OUTPUT«===SORRY!===␤␤Action method trait_mod:does not yet implemented at /tmp/qGKS_5xxXb line 1:␤------> role Foo { }; class Bar does Foo ⏏{ }␤␤Unhandled trait 0 for this context at /tmp/qGKS_5xxXb line 1:␤------> role Fo…
05:55 thou joined 05:56 kaleem left
dalek ecza: 747cda8 | sorear++ | / (4 files):
Add trait_mod:<does> syntax
06:08
06:09 kaleem joined 06:10 achromic joined, overrosy left 06:12 overrosy joined
dalek ecza: 0ebf512 | sorear++ | lib/ (2 files):
Factor out RoleToClass application; class Bar does Foo works in most basic cases
06:24
ecza: 84eb8f9 | sorear++ | src/ (2 files):
Detect stubbing of methods
06:33
06:43 datums_nb left 06:46 icwiener joined 06:55 mkramer left 06:56 wtw joined 07:01 dayangkun joined 07:10 diggins joined
moritz \o 07:11
07:15 datums_nb joined
diggins can somebody tell me what i'm doing wrong here: pastebin.com/A2p7diir 07:17
sorear o/ moritz
diggins: try using &!x instead of &x, consistantly 07:18
iirc the twigil-less form is not really implemente
moritz diggins: BUILD gets named arguments, not positional arguments 07:19
07:19 icwiener left
moritz diggins: and the seond problem is that the constructor only automatically initializes public attributes, not private ones 07:19
since they are *private*, the user shouldn't automatically be allowed to provide a value for them 07:20
diggins ok
moritz are sure you don't want them public?
diggins yes
they are implementation specific
instead of using BUILD, can i use new? 07:21
moritz you can
diggins: but if you want to allow setting them in .new, they look like part of the API
diggins when i tried, i got the error listed in my paste
moritz well, depends on how you made your new 07:22
diggins similar to BUILD
moritz you need to call self.bless in method new to create a new instance
07:22 icwiener joined
diggins i followed what i saw here: perlgeek.de/blog-en/perl-6/object-c...ation.html 07:23
are there any examples around using private attributes?
sorear *hah* well if you wanted help with something on perlgeek.de you came at exactly the right time :D 07:24
diggins oh, also am i using sort right? it doesn't look like it's actually fully sorting the list
moritz diggins: no, I should add one
(re private attribute example)
diggins moritz: cool :) 07:25
moritz diggins: no, you're not using sort right
diggins: the block is supposed to return -1, 0 or 1, depending on wheter the elements compare as "smaller", "same" or "equal"
$a <=> $b 07:26
diggins doh!
moritz or $str1 leg $str2
(leg = lesser, equal, greater)
diggins thanks, i was focusing too much on the object stuff that simple fact eluded me
07:27 risou_awy is now known as risou, icwiener left 07:32 icwiener joined
moritz nom: class A { has $!x; submethod BUILD(:$!x) { }; method mx { $!x } }; say A.new(x => 3).mx 07:40
p6eval nom ea0311: OUTPUT«3␤»
moritz diggins: see, if you say submethod BUILD(:&!func) { } you call .new(func => { some code here } ) 07:41
07:43 thou left
diggins moritz: yeah, sombody mentioned that earlier. i was hoping to accept only a single optional positional argument 07:46
somebody == you :)
moritz well, then you can do something like this: 07:50
nom: class A { has $!x; method new($x) { self.bless(*, :$x) }; submethod BUILD(:$!x) { }; method mx { $!x } }; say A.new(3).mx
p6eval nom ea0311: OUTPUT«3␤»
diggins cool, i'll give that a try 07:51
07:59 dayangkun left 08:02 baest joined
achromic nom: class A { has &!func; multi method new(&func?) { self.bless(*, :&func) }; submethod BUILD(:&!func) { &!func ||= { say "did DEFAULT func" }}; method dofunc { &!func.() } }; A.new({say "did func"}).dofunc; A.new(); 08:10
p6eval nom ea0311: OUTPUT«did func␤get_bool() not implemented in class 'Callable'␤ in sub infix:<||> at src/gen/CORE.setting:1962␤ in submethod BUILD at /tmp/JZwmmoZ43P:1␤ in method BUILDALL at src/gen/CORE.setting:580␤ in method bless at src/gen/CORE.setting:570␤ in method new at /tmp/JZ…
achromic hmm, works in rakudo star 08:11
moritz hm 08:14
nom: say so { "foo" }
p6eval nom ea0311: OUTPUT«Bool::True␤» 08:15
sorear nom: say so Callable
p6eval nom ea0311: OUTPUT«Bool::False␤»
moritz nom: class A { has &!func = { say "DEFAULT" }; multi method new(&func?) { self.bless(*, :&func) }; submethod BUILD(:&!func) { }; method dofunc { &!func.() } }; A.new({say "did func"}).dofunc; A.new(); 08:16
p6eval nom ea0311: OUTPUT«did func␤»
moritz prettier, and works. Still the other one should work too
nom: role Foo { }; say so Foo.new
p6eval nom ea0311: OUTPUT«Bool::True␤»
moritz hm, if get_bool isn't implemented, somhow and object leaks through that doesn't inherit from Mu 08:17
nom: role Foo { }; say Foo.new ~~ Any
p6eval nom ea0311: OUTPUT«Bool::True␤»
dalek ecza: d6f6384 | sorear++ | lib/ (3 files):
Implement more cases, including classes that consume multiple roles, drunken gymnasts, and requirements
08:25
08:34 risou is now known as risou_awy 08:43 mj41 joined 08:45 overrosy left 08:46 alim_ joined, alim_ left, alim_ joined 08:47 overrosy joined 08:48 diggins left 08:55 mkramer joined 09:01 overrosy left 09:03 overrosy joined 09:07 icwiener left 09:08 mkramer left 09:09 unobe left 09:12 icwiener joined
dalek ecza: 6e115d3 | sorear++ | lib/ (5 files):
Implement type checking for roles, .^does
09:13
sorear -> sleep
09:14 overrosy left 09:15 Mowah joined 09:16 overrosy joined 09:40 overrosy left 09:43 overrosy joined 09:45 daxim joined
masak morning, #perl6 09:49
09:53 mkramer joined 09:55 LlamaRider_ left
masak the number of p6cc contestants just hit 30. \o/ 09:59
09:59 risou_awy is now known as risou
moritz \o/ 10:05
10:21 huf left, datums_nb left 10:23 PacoAir joined 10:24 mkramer left 10:26 icwiener left 10:30 shinobicl___ joined
moritz tests the pull requests by kshannon++ 10:33
10:33 baest left 10:36 Mowah left 10:41 Mowah joined, huf joined 10:49 icwiener joined
dalek kudo/nom: 2046b9d | (Kris Shannon)++ | src/Perl6/Grammar.pm:
No unspace or backslashes allowed during interpolation
10:49
kudo/nom: da49502 | (Kris Shannon)++ | src/core/Parameter.pm:
Visually optimize Paramter.perl() for named parameters
kudo/nom: 1c74c72 | moritz++ | src/core/Parameter.pm:
Merge remote branch 'kshannon/signature-printing' into nom
10:51 achromic left
moritz one things I hape about Parameter.perl (both old and new) is that it turns '@a' into 'Positional @a', which is RONG 10:52
*hate
wolverian www.google.com/search?client=safari...p;oe=UTF-8 :)
kshannon while your looking at my stuff, what do you think of the change I suggest in rt.perl.org/rt3/Ticket/Display.htm...xn-1047782
wolverian Funnily enough, the second Google hit for "rong" is "ESL - English as a Second Language" 10:53
moritz takes a look
kshannon: I'm not familiar with that code, and so can't comment. We'll have to wait for jnthn++ 10:54
kshannon Ok :) 10:55
It does pass roast, but it just feels like a hack to me :(
This memory leak is driving me crazy... 10:56
moritz what leaks? 11:01
there#s currently a problem that for-loops need to retain all return values, because we don't detect sink context yet
11:01 proller joined
moritz s/'#'/\'/ 11:02
11:06 mkramer joined, proller left 11:08 shinobicl___ left, proller joined 11:09 jakky left 11:11 unobe joined 11:14 baest joined 11:17 preflex_ joined 11:18 bacek joined, preflex left, preflex_ is now known as preflex 11:20 alim_ left 11:22 satyavvd left
kshannon moritz: loop { 1 } # runs forever in constant memory 11:28
loop { 1 + 1 } # leaks like crazy
11:30 satyavvd joined
kshannon after doing a quick sed to account for the sub_id and sc handles changing, the pir diff between them is: 11:33
.sub "_block1011" :anon :subid("11_1325676614.96814") :outer("10_1325676614.96814")
.annotate 'line', 1
+ perl6_box_int $P101, $I1
.lex "$_", $P1013
- nqp_get_sc_object $P101, "CFE9BCF376D601B46E2B5AD308A8F13912868805", 8 11:34
+ add $I101, 1, 1
11:35 kshannon left 11:37 kshannon joined
flussence huh. I just ran `command time perl6 -e 'my int $x = 0; loop { $x = $x + 1; last if $x > 300_000 }'`, and again with s/int/Int/, and the native int version leaked *more* memory. 11:45
11:47 alim joined, muixirt joined
flussence and the difference is about 0.5KB per int! 11:47
muixirt kshannon: nice catch, something for my collection :-) 11:48
boxing an int costs 0.5KB? 11:53
flussence seems like it... the numbers still correlate if I use a 100000 loop 11:56
11:57 alc left
kshannon That's from earlier today, irclog.perlgeek.de/perl6/2012-01-03#i_4923663 11:57
12:08 Mowah left
kshannon comparing the code generated for the two loops above, there's quite a bit of difference. I think it's definitely more than one boxed int difference. 12:09
My calculations are boxing an int takes about 80 bytes. 12:11
moritz well, I'd expect the native ints to inline the infix:<+> call
kshannon Yeah, but then it gets boxed any for no apparent reason and thrown away... :( 12:13
moritz :(
kshannon It inlines the > 300_000, then it perl6_booleanize's it, decontainerize's that, and then uses that for the if. 12:14
Reading that PIR is just depressing. 12:15
12:20 hundskatt left 12:21 hundskatt joined
[Coke] colomon, niecza: yesterday's runs - gist.github.com/1476841 ... put us at 89.98% ... and I'm pretty sure I saw some commits go by since then. 12:23
12:44 overrosy left
moritz perl6: say 9 % (-9) 12:45
p6eval rakudo 1c74c7: OUTPUT«-9␤»
..pugs b927740, niecza v13-93-g6e115d3: OUTPUT«0␤»
moritz perl6: say 8 % (-9) 12:46
p6eval niecza v13-93-g6e115d3: OUTPUT«17␤»
..pugs b927740, rakudo 1c74c7: OUTPUT«-1␤»
moritz niecza's output is quite creative
12:46 overrosy joined 12:50 satyavvd left
masak submits nieczabug 12:51
colomon mnbnhhnj 12:53
flussence keyboard cat!
colomon keyboard 3-year-old playing Casey Jones 12:54
at least, I think that's what he's doing.
maybe he's playing wells fargo wagon? 12:56
12:56 bluescreen10 joined
masak nom: my %scores = b => 3, h => 8, j => 8, m => 3, n => 1; say [+] (%scores{$_} for 'mnbnhhnj'.comb) 12:58
p6eval nom 1c74c7: OUTPUT«33␤»
masak nom: my %scores = b => 3, h => 8, j => 8, m => 3, n => 1; say [+] %scores{ 'mnbnhhnj'.comb }
p6eval nom 1c74c7: OUTPUT«33␤»
12:59 twinshadow joined, raiph left
masak that's excluding any double or triple word scores. 12:59
12:59 shinobicl__ joined, sivoais left 13:00 sivoais joined
masak I'm very tempted to blog about infix:<%>, its varous possible semantics, and its various current bugs in different implementations. 13:02
13:02 kaleem left
colomon masak: you should probably wait a bit -- I'm currently staring at the guts of niecza, wondering how to fix infix:<%> 13:03
geekosaur that implies you've figured out what it's doing. (17?!) 13:04
colomon 8 % (-9) ==> 8 - -9 * red 13:06
red must be -1
masak "I don't have time to figure out how it works, I just want to fix it!"
colomon: don't worry, I definitely won't have time to blog before tonight anyway. 13:07
13:08 spine_ joined 13:13 mkramer left
[Coke] colomon++ 13:21
So, when niecza passes more spec tests than rakudo, do we throw a party or something? ;)
masak that's when the real arms race begins :) 13:25
[Coke] niecza: say 18417-16571 13:27
p6eval niecza v13-93-g6e115d3: OUTPUT«1846␤»
moritz then we start talking about what the *important* spectests are :-) 13:29
masak wants to make a nice big SVG map over all the spectests, and color it in with b/nom/Niecza coverage 13:32
shinobicl__ rakudo: role numstr is Str { has $.value; method value(given lc($.value) is there a way to overload an operator to work on certain roles only? 13:33
p6eval rakudo 1c74c7: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 1, near " lc($.valu"␤»
shinobicl__ ahh sorry about that
i meant: is there a way
+to overload an operator to work on certain roles only?
moritz sure
multi sub infix:<+>(yourrole $a, yourrole $b) { ... }
13:35 xinming left
shinobicl__ does this mean something? : multi sub infix:<+>(Str $v1 where yourrole, $Str $s2 where yourrole) { ... } 13:41
moritz yes 13:42
masak nom: role Awesome {}; my $s = "OH HAI" but Awesome; multi sub infix:<+>(Str $v1 where Awesome, Str $v2 where Awesome) { $v1 ~ $v2 }; say $s + $s
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Circularity detected in multi sub types.␤»
masak o.O
never had that error message before! 13:43
shinobicl__ i have the same error when tryong to define a <- for a role based on Str
i mean, <->
moritz nom: role Awesome {}; my $s = "OH HAI" but Awesome; multi sub infix:<+>(Str $v1 where { $_ ~~ Awesome }, Str $v2 where { $_ ~~ Awesome }) { $v1 ~ $v2 }; say $s + $s 13:46
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Circularity detected in multi sub types.␤»
[Coke] colomon: updated feather.perl6.nl/~coke/colomon.txt 13:50
only 35 passes left to take advantage of, and most of them are probably just super basic tests for a feature that isn't yet implemented, unfortunately. 13:51
colomon niecza> say 8 % (-9) 13:53
-1
niecza> 9 % (-9)
0
[Coke] ... though it appears I forgot to do a make at some point, so those numbers are very slightly suspect.
13:57 mdxi left 13:58 ggoebel left 13:59 Trashlord left 14:04 am0c left, Mowah joined
[Coke] niecza: say 16596 / 18417 14:07
p6eval niecza v13-93-g6e115d3: OUTPUT«0.90112396155725694␤»
moritz nom: multi sub infix:<+>(Str $a where 'foo', Str $a where 'bar) { $a ~ $b }; say 'foo' + 'bar' 14:08
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Redeclaration of symbol $a at line 1, near " where 'ba"␤»
moritz nom: multi sub infix:<+>(Str $a where 'foo', Str $b where 'bar) { $a ~ $b }; say 'foo' + 'bar'
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Malformed block at line 1, near "(Str $a wh"␤»
moritz nom: multi sub infix:<+>(Str $a where 'foo', Str $b where 'bar') { $a ~ $b }; say 'foo' + 'bar'
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Circularity detected in multi sub types.␤»
moritz no Awesome necessary to create the error message 14:09
masak "Perl 6: Awesome not required"
I wonder what exactly a "circularity in multi sub types" is. 14:10
moritz nom: multi sub infix:<+>(Str $a, Str $b) { $a ~ $b }; say 'foo' + 'bar'
p6eval nom 1c74c7: OUTPUT«foobar␤»
masak I don't think the spec mentions anything like that.
geekosaur wonders: is that an overzealous type checker, or something believing that infix:<+> should be commutative and that the where clauses mean it needs to declare the commutative version --- because its not catching that they are the same
moritz well, the multi dispatcher needs to do a topologic sort
geekosaur (that is, autogenerate ($b, $a) given ($a, $b)
masak it's from src/binder/multidispatch.c 14:11
moritz and that sort does a narrowness comparison
and if it detects a cycle, then it gives that error
14:11 shinobicl__ left, mkramer joined
masak logically, the cycle must've been *introduced* by the above-declared multis. 14:12
14:12 devel joined
masak but I can't say I see what the circularity would be. 14:12
moritz things is, if that candidate generates a cycle, there needs to be one candidate that's more specific than the new one
and I don't see which one it could be
14:12 ggoebel joined
moritz hm, maybe it treats str an epsilon tighter than Str? 14:12
masak maybe. 14:13
moritz but there's no (str, str) multi for +
maybe it's a bug in the candidate sorter, or in the narrowness analysis
niecza: multi sub infix:<+>(Str $a where 'foo', Str $b where 'bar') { $a ~ $b }; say 'foo' + 'bar' 14:14
p6eval niecza v13-93-g6e115d3: OUTPUT«===SORRY!===␤␤Action method post_constraint not yet implemented at /tmp/3GbOzhWXZw line 1:␤------> multi sub infix:<+>(Str $a where 'foo'⏏, Str $b where 'bar') { $a ~ $b }; say '␤␤Unhandled exception: Unable to resolve …
devel nom: role Something {}; my sub infix:<->(Something $s1, Something $s2) { say "$s1 minus $s2" }; my Str $s1 = "HI" does Something; my Str $s2 = "BYE" does 14:15
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Confused at line 1, near "my Str $s2"␤»
devel +Something; say $s1 - $s2;
14:15 overrosy left
devel nom: role Something {}; my sub infix:<->(Something $s1, Something $s2) { say "$s1 minus $s2" }; my Str $s1 = "HI" does Something; my Str $s2 = "BYE" does Something; say $s1 - $s2; 14:16
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'infix:<->' will never work with argument types (Str, Str) (line 1)␤ Expected: :(Something $s1, Something $s2)␤»
masak devel: try "but", not "does"
14:16 mdxi joined
masak "does" really doesn't make sense on value objects. 14:16
14:17 overrosy joined
moritz nom: say ('foo' but Numeric) ~~ Str 14:17
p6eval nom 1c74c7: OUTPUT«Method 'specialize' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤ in <anon> at src/gen/Metamodel.pm:2042␤ in <anon> at src/gen/Metamodel.pm:2038␤ in compose at src/gen/Metamodel.pm:2036␤ in mixin at src/gen/Metamodel.pm:927␤ in sub infix:<but> at …
moritz nom: say ('foo' but Positional) ~~ Str
p6eval nom 1c74c7: OUTPUT«Method 'FLATTENABLE_LIST' not found for invocant of class 'Positional'␤ in <anon> at src/gen/Metamodel.pm:1140␤ in sub infix:<but> at src/gen/CORE.setting:8381␤ in block <anon> at /tmp/7SzvkE7et1:1␤ in <anon> at /tmp/7SzvkE7et1:1␤»
moritz I can understand the first one (Numeric isn't yet a role in rakudo) 14:18
but the second one seems really weird
flussence nom: multi sub a(Numeric $) { say 'num' }; multi sub a(Bool $) { say 'bool' }; a(0 but True);
p6eval nom 1c74c7: OUTPUT«num␤»
masak I wouldn't mind if the first error message were "Can't use 'but' with a class"
[Coke] colomon: any idea why S32-str/split.t dies with "Autoloading NYI" ?
moritz masak: that would be much more awesome
masak wow, nothing wrong with the activity here today. :) 14:19
colomon [Coke]: probably a :p5 somewhere in there
[Coke] ahhh.
14:21 overrosy left
dalek ecza: 93ec2ef | (Solomon Foster)++ | lib/Builtins.cs:
Niecza was systematically correcting in the wrong direction in the modulo / integer division algorithms when the divisor was negative and the remainder was positive. I have corrected this but not folded the now apparently redundant cases together, because I am uncertain what the original thinking was, and I'm not clear on the most elegant way of combining the tests.
14:21
ast: 7383aad | (Solomon Foster)++ | S03-operators/ (2 files):
Unfudge tests now working in niecza, add four more tests.
14:22
[Coke] niecza: split("", "forty-two").say 14:23
14:23 overrosy joined
p6eval niecza v13-93-g6e115d3: OUTPUT« f o r t y - t w o ␤» 14:23
masak colomon++ # modulo
dalek ast: ddfbc57 | coke++ | S32-str/split.t:
niecza fudge
14:28
ecza: 4220132 | coke++ | t/spectest.data:
run S32-str/split.t
moritz nom: my Int $x = 9; my Int $y = -9; say $x % $y; 14:31
p6eval nom 1c74c7: OUTPUT«-9␤»
moritz nom: my Int $x = 9 * 2 ** 40; my Int $y = -9 * 2 ** 40; say $x % $y; 14:32
p6eval nom 1c74c7: OUTPUT«-9895604649984␤»
PerlJam nom: 5 % 0 14:33
p6eval nom 1c74c7: ( no output )
PerlJam nom: say 5 % 0
p6eval nom 1c74c7: OUTPUT«5␤»
14:34 devel is now known as shinobicl_
PerlJam % 0 seems ... odd. 14:34
masak should arguably be an error.
there's a division by 0 in there.
PerlJam exactly 14:35
nom: say 5 / 0;
p6eval nom 1c74c7: OUTPUT«Inf␤»
masak well, maybe not an "error", but an erroneous condition of some kind.
PerlJam certainly not 5 in this case
14:37 cosimo left
masak right. 14:37
14:42 kaleem joined
PerlJam idly wonders if Perl 6 should grow a remainder operator to go with modulus :) 14:46
daxim spec's not large enough yet! 14:48
masak PerlJam: just use infix:<%> in list context, and extract the second return value :P 14:50
14:52 mkramer left 14:54 mkramer joined
[Coke] perl6: say +Order::Increase 14:55
p6eval rakudo 1c74c7: OUTPUT«Could not find symbol 'Order::&Increase'␤ in block <anon> at /tmp/6V9Ce8pkQt:1␤ in <anon> at /tmp/6V9Ce8pkQt:1␤»
..niecza v13-93-g6e115d3: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/YsIJqpqjId line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2652 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2653 (module-CORE @ 61…
..pugs b927740: OUTPUT«*** No such subroutine: "&Order::Increase"␤ at /tmp/SMnMfWwcfU line 1, column 5 - line 2, column 1␤»
colomon perl6: say Inf * 0 14:56
p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
14:57 estrabd joined, lateau_ joined 14:58 ggoebel left 14:59 lateau_ left, mkramer left
masak perl6: say 1 ** Inf 14:59
p6eval pugs b927740, rakudo 1c74c7: OUTPUT«1␤»
..niecza v13-93-g6e115d3: OUTPUT«NaN␤»
masak perl6: say 0 ** Inf 15:00
p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«0␤»
masak perl6: say 0 ** 0
p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«1␤»
15:03 mkramer joined, mkramer left, ggoebel joined
masak perl6: say Inf - Inf 15:03
p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
masak perl6: say Inf / Inf
p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
masak perl6: say Inf % Inf
p6eval rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
..pugs b927740: OUTPUT«Inf␤»
masak oh pugs, you so crazy. 15:04
pugs: say Inf % -Inf
p6eval pugs b927740: OUTPUT«NaN␤»
PerlJam I was just taking heart at how well they were agreeing ...
masak :) 15:07
15:08 M_o_C joined 15:10 icwiener left, icwiener joined 15:12 cosimo joined 15:14 cosimo left 15:15 cosimo joined
kshannon It'd be nice if parrot --help-debug only showed the flags which actually did stuff... 15:18
masak kshannon: there's a #parrot channel over at irc.perl.org
kshannon e.g. 15:19
[Coke] I think kshannon is probably aware of it. ;) 15:21
15:22 thou_ joined
masak good, good :) 15:22
[Coke] is getting dangerously close to having to implement features to pass more tests. This is horrible! ;) 15:25
masak [Coke]: you could always get out of it by leaving them as LHF TODO tickets. 15:29
colomon [Coke]: which features? :) 15:30
colomon is not above implementing new features in a pinch. ;)
[Coke] some of the builtin types would get us some test files. (like... Subset) 15:32
masak colomon++
[Coke] .methods 15:33
masak huh? Subset is a type?
colomon .methods?
15:34 thou_ left 15:36 raiph joined
flussence
.oO( I've come across "interesting" behaviour in perl5: `perl -e 'print pack(q{n/(C C C a*)}, 1..3, q{abc})' | xxd` )
15:37
[Coke] masak: sorry, "subsets", not the type Subset. 15:40
masak oh phew
[Coke] t/spec/S02-types/subset.t
t/spec/S12-introspection/methods.t 15:41
(for colomon)
[Coke] thinks it'll be easier for him to hack on the S32- stuff for already-implemented types.
15:43 krakan left, krakan joined 15:50 arlinius left 15:52 packetknife left 16:01 Lilpid joined, flussence left, flussence joined 16:03 arlinius joined 16:04 wtw left 16:07 sromanov joined 16:08 tokuhirom joined 16:09 tokuhirom left, alim left, bacek left 16:13 sivoais left
masak Go interfaces have much of the feel of Perl 6 subtypes. 16:17
16:17 packetknife joined 16:33 kaleem left 16:35 shinobicl_ left 16:36 am0c joined 16:37 fsergot left
masak moritz: a hypothesis: the Rakudo error says "cycle found", but maybe it's more like "can't make a partial order out of this". 16:44
16:52 Trashlord joined 16:53 thou joined
masak decommutes 16:56
17:01 daemon is now known as daDouche, daDouche is now known as daemon
TimToady perl6: say "aa" leg "ac" 17:03
p6eval niecza v13-95-g4220132: OUTPUT«-2␤»
..pugs b927740, rakudo 1c74c7: OUTPUT«-1␤»
TimToady perl6: say ("aa" leg "ac").WHAT
p6eval niecza v13-95-g4220132: OUTPUT«Num()␤»
..pugs b927740: OUTPUT«Int␤»
..rakudo 1c74c7: OUTPUT«Int()␤»
TimToady nobody has it right, but niecza is wronger 17:04
TimToady will be losing electricity in half hour or so (transformer replacement), so lurkage on #phasers is doubtful 17:05
17:07 kaleem joined
sorear good * #perl6 17:20
#phasers in 10?
TimToady colomon: see ^^^ 17:23
sorear niecza: subset Pos of Int where * > 0; my Pos $x = 5; say $x; $x = -5; # [Coke] 17:25
p6eval niecza v13-95-g4220132: OUTPUT«5␤Unhandled exception: Nominal type check failed for scalar store; got Int, needed Pos or subtype␤ at /tmp/4utSN9wG4i line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2652 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 265…
colomon TimToady: it should be Order(ing?), right? 17:26
#phasers in 4
TimToady yes, see S03:1198 17:27
colomon TimToady: they don't stringify to -1, 0, or +1, do they? 17:30
sorear no Order in Niecza but it's LHF
TimToady perl6: say False
p6eval rakudo 1c74c7, niecza v13-95-g4220132: OUTPUT«Bool::False␤»
..pugs b927740: OUTPUT«␤»
TimToady perl6: say ~False 17:31
p6eval rakudo 1c74c7, niecza v13-95-g4220132: OUTPUT«False␤»
..pugs b927740: OUTPUT«␤»
TimToady that :)
17:31 packetknife left
TimToady probably losing power soon... so o/ in advance 17:31
17:31 packetknife joined 17:41 spine_ left
colomon sorear: any idea what this means? 17:46
Compile time expression is insufficiently trivial CallSub at /Users/colomon/tools/niecza/lib/CORE.setting line 2178:
------> (:Increase(-1), :Same(0), :Decrease(1))⏏;
Enum may not contain both Int and Str values at /Users/colomon/tools/niecza/lib/CORE.setting line 2178:
------> (:Increase(-1), :Same(0), :Decrease(1))⏏;
TimToady niecza: say BEGIN -1
p6eval niecza v13-95-g4220132: OUTPUT«-1␤»
TimToady niecza: enum Order (:Increase(BEGIN -1), :Same(0), :Decrease(1)) 17:47
p6eval niecza v13-95-g4220132: OUTPUT«===SORRY!===␤␤Compile time expression is insufficiently trivial ConstantDecl at /tmp/7XIBNycvrH line 1 (EOF):␤------> rease(BEGIN -1), :Same(0), :Decrease(1))⏏<EOL>␤␤Enum may not contain both Int and Str values at /tmp/…
TimToady niecza: say (:Increase(-1), :Same(0), :Decrease(1)).perl 17:48
p6eval niecza v13-95-g4220132: OUTPUT«("Increase" => -1, "Same" => 0, "Decrease" => 1)␤»
TimToady looks like some kind of revrot
niecza: enum Order (:Increase(0), :Same(1), :Decrease(2)) 17:49
p6eval niecza v13-95-g4220132: ( no output )
17:49 baest left
TimToady seems to not like the negative 17:49
colomon TimToady++
TimToady which is odd, since BEGIN doesn't mind it 17:51
niecza: enum Order (BEGIN :Increase(-1), :Same(0), :Decrease(1))
p6eval niecza v13-95-g4220132: OUTPUT«===SORRY!===␤␤Compile time expression is insufficiently trivial ConstantDecl at /tmp/clM55dBWWY line 1 (EOF):␤------> N :Increase(-1), :Same(0), :Decrease(1))⏏<EOL>␤␤No match␤ at /home/p6eval/niecza/lib/CORE.setting li… 17:52
17:52 risou is now known as risou_awy
TimToady I'd guess it's too hardwired to the exact syntax for normal enums 17:52
niecza: say BEGIN :Increase(-1) 17:54
p6eval niecza v13-95-g4220132: OUTPUT«"Increase" => -1␤»
17:55 fsergot joined, packetknife left
fsergot o/ :0 17:55
:)
17:55 packetknife joined, mj41 left 17:56 wolfman2000 left 17:57 PacoAir left
pyrimidine when does #phasers start? 17:58
sorear pyrimidine: -28
TimToady 'bout half hour ago
17:58 PacoAir joined
pyrimidine ah. was wondering. it's a bit quiet 17:58
TimToady most of the usual suspects are wandering
17:59 fridim_ joined, fsergot left 18:00 fsergot joined, raiph left
colomon aha! 18:01
the -1 triggers the Compile time expression is insufficiently trivial message, then it returns "XXX", which triggers the Int and Str message
TimToady funny that BEGIN doesn't mind the -1 though 18:02
enum should probably just use BEGIN and interpret the results
18:03 PacoAir left 18:07 M_o_C left 18:10 packetkn_ joined
sorear TimToady: that would be ideal 18:12
18:12 packetknife left
sorear the problem is that the BEGIN will produce the runtime versions of Pair, Str, Int, Parcel 18:12
and I'm not sure how best to map that back to something the compiler can understand
TimToady gee, if the compiler were written in Perl 6, it'd be easy... :P 18:13
still have electricity; maybe I should walk around the block and see if there are any PG&E trucks... 18:14
colomon sorear: think it's worth trying to fix enum at the moment, or should I copy the hack for Bool for Order? 18:15
moritz rakudo too has problems with enums in the setting
colomon moritz: this is a problem with enums everywhere. apparently negative values are verboten. 18:16
moritz sometimes I wonder if another setting could to be used to fix that and other problems
perl6: enum Foo (a => -1); say Foo::a 18:17
18:17 mj41 joined
p6eval pugs b927740: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/PywYVxehI2 line 1, column 1-19␤» 18:17
..rakudo 1c74c7: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near "; say Foo:"␤»
..niecza v13-95-g4220132: OUTPUT«===SORRY!===␤␤Compile time expression is insufficiently trivial CallSub at /tmp/Qk_f8hs6ja line 1:␤------> enum Foo (a => -1)⏏; say Foo::a␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setti…
18:17 Chillance left
colomon ah, so rakudo has the same problem 18:17
moritz indeed 18:18
colomon -1 is not a literal
18:18 MayDaniel joined
moritz right; it needs constant folding 18:18
and that happens at CHECK time in rakudo
TimToady heard some guys discussing the transformer behind the house, so we'll certainly lose power today, assuming they actually have the new one to install 18:20
colomon afk # nap 18:21
[Coke] sorear: the subset test failed horribly. I'll try to remember to tease out why this evening. 18:22
(order) that's about 40 tests, \o/ ;)
18:23 fridim_ left 18:35 Trashlord left 18:42 hundskatt left 18:54 hundskatt joined 18:55 kaare_ joined
fsergot nom: my %hash; say 1 if %hash; 19:10
p6eval nom 1c74c7: ( no output )
fsergot nom: my %hash = 'a' => 'a'; say 1 if %hash;
p6eval nom 1c74c7: OUTPUT«1␤»
19:15 xinming joined
colomon niecza: say 3 + 5i < 5 19:19
p6eval niecza v13-95-g4220132: OUTPUT«Unhandled exception: Complex numbers are not arithmetically ordered; use cmp if you want an arbitrary order␤ at /tmp/17MioN8zkh line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2652 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.settin…
fsergot nom: True; 19:20
p6eval nom 1c74c7: ( no output )
fsergot nom: False;
p6eval nom 1c74c7: ( no output )
fsergot nom: say False;
p6eval nom 1c74c7: OUTPUT«Bool::False␤»
19:20 xinming left 19:21 xinming joined
masak TimToady: I was curious to see how well S06 vibed with gist.github.com/1548053 so I went and re-read the former. the part with 'my $COMPILING::new_variable;' will be problematic, I think. 19:24
actually, the question I went in to try to answer was "does S06 think that macro-inserted code always have a Block around it?" 19:25
sorear once said that was his interpretation of it.
and indeed, S06 talks a lot about hygiene and stuff, all of which would be facilitated by having a block around everything... except for the part about being able to un-hygienically declare variables. 19:26
dalek ecza: 6b3fb14 | (Solomon Foster)++ | lib/CORE.setting:
Make sure cmp and leg are returning -1, 0, or +1. First stab at an Order type, which is probably completely wrong, but works well enough to pass comparison.t.
19:34
colomon Crap, wrong push. I haven't spectested that change yet.
dalek ast: fa413e2 | (Solomon Foster)++ | S03-operators/comparison.t:
Change the "Blue" tests to use an Int instead of a Complex, reflecting the latest thinking on Complex comparisons. Fudge for niecza.
19:35 wolfman2000 joined
masak the "blue" tests? 19:36
colomon masak: look at the diff. ;) 19:38
19:38 daxim left 19:39 am0c left
colomon hmmm. 19:42
small flaw in that patch 19:44
19:44 Trashlord joined 19:45 Trashlord is now known as Guest87333, proller left
masak ah. it's a class, arbitrarily named "Blue" :) 19:45
19:45 Guest87333 is now known as Trashlord, Trashlord left, Trashlord joined 19:48 proller joined
masak nom: say (class Foo {}).^is_composed 19:50
p6eval nom 1c74c7: OUTPUT«1␤»
masak nom: class Foo { BEGIN say Foo.^is_composed }
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Method 'dispatch:<.^>' not found for invocant of class 'Foo'␤»
masak aww :)
nom: class Foo { BEGIN say Foo.HOW.is_composed(Foo) } 19:51
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Method 'gist' not found for invocant of class 'Undef'␤»
masak aww!
nom: class Foo { BEGIN say Foo.new }
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Method 'new' not found for invocant of class 'Foo'␤»
masak reasonable. :)
dalek ecza: 5e9d335 | (Solomon Foster)++ | t/spectest.data:
Turn on S03-operators/comparison.t.
19:52
ecza: 88c4694 | (Solomon Foster)++ | lib/CORE.setting:
In infix:<cmp>, change all instances of Numeric to Real, as that is what was meant.
colomon There, that does it.
19:53 proller left 19:54 proller joined 20:07 fglock joined
fglock o/ 20:07
20:11 skyheights joined 20:21 MayDaniel left, az5112 joined 20:25 fglock left 20:27 icwiener left 20:30 overrosy left 20:32 overrosy joined, Trashlord left 20:34 Trashlord joined
masak we should get a milestone to look forward to. like we had with the first Rakudo Star release. 20:35
20:38 sromanov left, bacek joined
sorear o/ masak 20:39
o/ bacek 20:40
20:42 sromanov joined, az5112 left
masak sorear: \o 20:44
sorear niecza: say Order::Increase.WHAT # colomon 20:50
p6eval niecza v13-98-g88c4694: OUTPUT«Int()␤»
colomon sorear: yearh, I know
it works okay as a first approximation, but it's definitely wrong 20:51
any suggestions how to fix it?
masak .oO( implement enums )
20:52 sromanov left, sromanov joined, skyheights left
masak Niecza is still growing at such speed. it's impressive. 20:53
sorear colomon: note that the definition of Bool is split partly to line 1453 because of circularity pains
masak we should get a sorear clone for Rakudo, too ;)
[Coke] jnthn will be back shortly, calm down. 20:54
sorear colomon: once $_enums is set up correctly, you can use Order.(-1), etc to get at the actual enum values 20:56
colomon sorear: will that work for the constant values? 20:57
sorear yes, if you can get the ordering right
$_enums needs to be set up before the constants are declared
which probably means that Order needs to be moved after EnumMap
which might require a package stub at the top, and/or using ::Order::Increase syntax 20:58
colomon Order is after EnumMap
masak niecza: my $r = 3..*; say "This still hangs: $r"; say "alive" 21:00
sorear: ^^
p6eval niecza v13-98-g88c4694: OUTPUT«(timeout)»
sorear that's by design
benabik nom: my $r = 3..*; say "Does this hang? $r"; say 'alive'
p6eval nom 1c74c7: OUTPUT«Does this hang? ...␤alive␤»
masak sorear: because it listifies? 21:01
sorear yes
you're interpolating an infinite list
masak does the spec say that stringifying a range interpolates it as a list?
benabik '3..*' stringifies to '...' in nom?
masak I would be more happy with it simply stringifying to "3..*", to be honest. 21:02
[Coke] +1
sorear not sure, I think co* added that
masak if I wanted a list, I'd have used an array :)
21:02 snearch joined
masak yes, it's a recent change. 21:02
[Coke] nom: my $a = "this\nis\fun".indent(20).say 21:03
masak ranges used to stringify to "$from..$to" in Niecza.
p6eval nom 1c74c7: OUTPUT«Method 'indent' not found for invocant of class 'Str'␤ in block <anon> at /tmp/N_dTZghyPE:1␤ in <anon> at /tmp/N_dTZghyPE:1␤»
[Coke] argh, guess I can't just copy rakudo's version :P
colomon sorear: did you mean Order.from-index(-1) instead of Order.(-1)?
21:03 proller left
benabik nom: my $w = *; say "$w" # curious 21:03
p6eval nom 1c74c7: OUTPUT«Whatever<3637376436775806753>␤»
sorear colomon: no
masak b: my $a = "this\nis\fun".indent(20).say
p6eval b 1b7dd1: OUTPUT« this␤ is un␤» 21:04
masak o.O
colomon sorear: postcircumfix:<( )> ($key) # not value
sorear colomon: if you wanted to use .from-index, it would work, but you'd need to use (0)
colomon: _lookup: %!by-key{$w} // %!by-value{$w} // die 21:05
21:06 kaleem left
[Coke] masak: ah, just need to steal from the right place! 21:06
21:08 kaare_ left
masak 'xactly 21:08
colomon sorear: this is what I've got now, and the error it gives me: gist.github.com/1562148
masak b still packs a punch... but it'll never have macros ;)
21:08 sromanov left 21:09 snearch left
[Coke] in git, b== ng? 21:09
21:09 snearch joined
colomon [Coke]: yes 21:10
21:10 snearch left 21:11 snearch joined
sorear colomon: you need to initialize $_enums *before* trying to use it 21:11
masak [Coke]: the name with "new" in it got old, who'd'a thought? :)
sorear colomon: constants are evaluated at parse time 21:12
colomon sorear: yeah, I was starting to think that. but how? can I move the BEGIN into the class definition?
sorear I think you could even go so far as to replace the our-var with another constant
colomon which is an EnumMap? 21:13
sorear yes
nom: say Increase
p6eval nom 1c74c7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Increase' called (line 1)␤»
masak sorear: Rakudo doesn't have Order:: yet 21:14
sorear oh
colomon my constant $_enums = EnumMap.new("Increase" => -1, "Same" => 0, "Decrease" => 1);
gets me the same error. :(
sorear do you think Increase should be visible without Order::?
colomon sorear: my first instinct is no, Increase and Decrease sound like potential function names to me. 21:15
sorear colomon: my next guess is that Order.() fails because Order's MRO isn't configured before the } 21:18
perhaps our constant Order::Increase = ... outside the block would work better
colomon Malformed constant at /Users/colomon/tools/niecza/lib/CORE.setting line 2184: 21:19
------> our constant Order⏏::Increase = Order.("Increase");
sorear ... bah 21:21
"I'll just have to do it correctly then"
(I mean, fixing enum to properly use BEGIN)
colomon sorear++ 21:22
masak sorear: yes, they should. by the same token that True and False are visible outside of Bool. 21:28
sorear: however, they are subject to the same rules as other enum values.
i.e. two enum values "poison" the slot; a subroutine always hides any enum values. 21:29
(see S12)
colomon H 21:32
*ah
21:33 bluescreen10 left
masak the poisoning semantics hasn't been implemented anywhere yet. will be interesting to see how it works out in practice. 21:34
it has a bit of that "cute today" feel :)
[Coke] niecza: say $?TABSTOP//8 21:44
p6eval niecza v13-98-g88c4694: OUTPUT«Unhandled exception: System.Exception: Unable to find lexical $?TABSTOP in mainline␤ at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0 ␤ at Niecza.CLRBack…
[Coke] niecza: say [min] (10,12,13) 21:51
p6eval niecza v13-98-g88c4694: OUTPUT«Unhandled exception: Excess arguments to infix:<min>, used 2 of 3 positionals␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (infix:<min> @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1618 (reduceop @ 9) ␤ at /tmp/qu4ce_HVMx line 1 (mainline @ 2)…
21:52 silug left
colomon [Coke]: fixing that one right now. 21:59
22:00 Trashlord left
[Coke] ah, nice. will make it easier to copy rakudo b's indent code. 22:00
colomon where are those tests? 22:02
the [min] [max] ones, I mean 22:03
22:03 donaldh joined, silug joined
colomon niecza> say [min] (10,12,13) 22:03
10
[Coke] colomon: Iunno; I was testing it because I got an error compiling the cribbed "indent" 22:04
colomon I'll try ack 22:05
[Coke] ugh, we have to skip a lot of the indent file for reasons not related to indent.
colomon minmax.t 22:06
spectesting... 22:09
[Coke] nom: 3.fmt("%s").say 22:12
p6eval nom 1c74c7: OUTPUT«3␤»
[Coke] niecza: 3.fmt("%s").say
p6eval niecza v13-98-g88c4694: OUTPUT«Unhandled exception: Unable to resolve method fmt in class Int␤ at /tmp/97EaLGxili line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2662 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2663 (module-CORE @ 62) ␤ at /home/p6…
[Coke] niecza: "2".fmt("%s").say
p6eval niecza v13-98-g88c4694: OUTPUT«Unhandled exception: Unable to resolve method fmt in class Str␤ at /tmp/4mlYCGYdBP line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2662 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2663 (module-CORE @ 62) ␤ at /home/p6…
[Coke] (missing Int.fmt is 32 tests of S32-str/indent.t) 22:14
22:16 hundskatt left
colomon niecza: say 4e0.fmt("%s") 22:17
p6eval niecza v13-98-g88c4694: OUTPUT«Unhandled exception: Unable to resolve method fmt in class Num␤ at /tmp/2_oQ0qzrO0 line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2662 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2663 (module-CORE @ 62) ␤ at /home/p6…
dalek ast: 17c6249 | (Solomon Foster)++ | S (2 files):
Refudge for niecza.
22:21
ecza: e093be5 | (Solomon Foster)++ | lib/CORE.setting:
Allow infix:<max> and infix<min> to handle any number of arguments.
masak nom: say 4..7 22:22
p6eval nom 1c74c7: OUTPUT«4..7␤»
colomon [Coke]: we lost one dodgy min/max test, and gained 10 or so that didn't use to work
[Coke] colomon: seems like a fair trade. 22:23
masak sorear: I didn't quite get your answer to the question "why do ranges listify in string context?" -- was the answer "someone else implemented that"? :)
[Coke] given that we were running that, I'm sure sorear would rather it was not fudged/hidden.
er, "however, given..."
masak sorear: thing is, I like nom's way better, and I had code that depended on that semantics which now hangs because an infinite range in a string listifies.
colomon [Coke], sorear: The test we lost was isnt @a min 4, 1, 'NYS'; where NYS is "not yes spec'd" 22:25
22:27 wolfman2000 left
sorear masak: yes, I was saying someone else implemented it 22:27
[Coke] colomon: +1, then. 22:29
masak sorear: do you plan to implement it the way Rakudo does it, which I would prefer -- rather than saying "it's by design" -- or should I just go back and rewrite my code?
[Coke] sorear, colomon: this is cribbed from rakudo:b, with some mods to get it working under niecza: so we have to .comb explicitly instea 22:30
(ignore everything after the :)
feather.perl6.nl/~coke/niecza.txt
Any general issues with the patch? 22:31
(that's 26 more tests.) 22:32
(more if we get Int.fmt)
er, 25.
ah, I can undo the [min] TODO. 22:33
sorear masak: I'll happily change to the Rakudo implementation if it doesn't break spectests. Since I didn't implement it, I don't know which spectests those are.
masak sorear: sounds good to me. 22:34
I'm going to bed now, otherwise I'd ask how to run the spectests on Neicza :)
sorear "make spectest"
22:34 pjcj joined
masak figuring out which types coerce to what values in different contexts is a fine balance in Perl 6. much of the strength of the language comes from getting that right. 22:35
I'm just arguing that Rakudo gets it right in this case.
I'd be happy to dispute any spectests that claim otherwise ;)
'night, #perl6
sorear niecza: { say CALLER::<$?TABSTOP> // 8 }
p6eval niecza v13-98-g88c4694: OUTPUT«8␤»
sorear 'night
niecza: sub foo() { say CALLER::<$?TABSTOP> // 8 }; constant $?TABSTOP = 5; say foo
p6eval niecza v13-98-g88c4694: OUTPUT«5␤Bool::True␤» 22:36
sorear [Coke]: ^^^
[Coke] fixing...
sorear [Coke]: otherwise I don't see anything bad 22:37
maybe a # TODO: use a multi once 'where' is working
[Coke] sorear: Roger.
diff updated. 22:38
running a spectest now. 22:39
rakudo++
sorear niecza: say EnumMap.new(:Increase(-1), :Same(0), :Decrease(1)).hash.perl
p6eval niecza v13-98-g88c4694: OUTPUT«Unhandled exception: Excess arguments to EnumMap.new, unused named Increase, Same, Decrease␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (EnumMap.new @ 1) ␤ at /tmp/ebqcBnB65H line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2662 …
sorear niecza: say EnumMap.new((:Increase(-1), :Same(0), :Decrease(1))).hash.perl
p6eval niecza v13-98-g88c4694: OUTPUT«{"Decrease" => 2, "Increase" => 0, "Same" => 1}.hash␤»
colomon [Coke]: looking at .fmt now
[Coke] I assume this is all cool from a licensing/copyright perspective, yes?
sorear yes, rakudo and niecza both use the Artistic-2.0 license 22:40
I think "git blame" is good enough for tracking attributions, mention Rakudo in the commit message 22:41
[Coke] \o/
Aye.
22:42 hundskatt joined, az5112 joined 22:43 Trashlord joined
colomon niecza: say (1, 2, 3).WHAT 22:51
p6eval niecza v13-98-g88c4694: OUTPUT«Parcel()␤»
22:55 donaldh left
colomon niecza: say "%s:%d" 22:57
p6eval niecza v13-98-g88c4694: OUTPUT«%s:%d␤» 22:58
colomon nom: say (a => 5).fmt("%s:%d") 22:59
p6eval nom 1c74c7: OUTPUT«a:5␤»
23:06 Mowah left, packetkn_ left
colomon [Coke]: it's going to be a bit, lots of little .fmt functions all around, and dinner / childcare interfering 23:07
geekosaur imagines .fmt functions in diapers running around the place 23:08
dalek ecza: 21988b3 | sorear++ | lib/ (5 files):
Implement role autopunning, role ACCEPTS/defined special cases, foo ~~ A works now
23:19
23:27 fsergot left 23:29 az5112 left
sorear rakudo: say Parcel.^roles 23:33
p6eval rakudo 1c74c7: OUTPUT«Positional()␤»
sorear rakudo: say Nil.^roles
p6eval rakudo 1c74c7: OUTPUT«␤»
sorear rakudo: say Nil.^roles(:all)
p6eval rakudo 1c74c7: OUTPUT«too many named arguments: 1 passed, 0 used␤ in roles at src/gen/Metamodel.pm:2078␤ in method dispatch:<.^> at src/gen/CORE.setting:772␤ in block <anon> at /tmp/2ka1AfAoJs:1␤ in <anon> at /tmp/2ka1AfAoJs:1␤» 23:34
sorear rakudo: say Nil.^parents
p6eval rakudo 1c74c7: OUTPUT«Iterator() Iterable() Cool() Any() Mu()␤»
sorear rakudo: say Range.^roles 23:36
p6eval rakudo 1c74c7: OUTPUT«Positional()␤»
23:37 mj41 left 23:41 spine joined
sorear niecza: say "foo".^can('chars'); say "foo".^can('xyzzy') 23:47
p6eval niecza v13-99-ge093be5: OUTPUT«Bool::True␤Bool::False␤»
23:53 whiteknight joined, whiteknight is now known as Guest85555