Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-01-04

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:00 fk_ left #perl6
00:07 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 japhb I'm afraid I've got brainlock at the moment
00:10 flussence 1 while gen-func().defined; might work, there's probably a better way of saying it though
00:11 japhb ... I should have specified: I actually want the values obtained during the exhaustion.  :-)
00:12 sorear japhb: take (gen-func() // last) while 1;  maybe
00:12 flussence oh whoops, ignore that then :)
00:13 japhb sorear, hmmm, interesting
00:13 japhb At least it avoids the $_ blech
00:13 sorear there's also while gen-func -> $x { take $x }
00:14 sorear which is not quite the same
00:14 japhb Yeah, I really need to gracefully handle gen-func producing false-but-defined
00:24 molaf_ joined #perl6
00:38 bonsaikitten joined #perl6
00:44 wknight8111 joined #perl6
00:56 dalek roast: 3a17c6e | (Solomon Foster)++ | S (2 files):
00:56 dalek roast: Fudge for niecza.
00:56 dalek roast: review: https://github.com/perl6/roast/commit/3a17c6e370
01:16 dalek niecza: eda2e78 | sorear++ | lib/ (3 files):
01:16 dalek niecza: Less horrible string comparisons on STable type
01:16 dalek niecza: review: https://github.com/sorear/niecza/commit/eda2e78860
01:25 araujo joined #perl6
01:25 araujo joined #perl6
01:33 dalek niecza: ab45767 | (Solomon Foster)++ | lib/CORE.setting:
01:33 dalek niecza: Add $limit to lines, :r and :rw to trying to open a file.
01:33 dalek niecza: review: https://github.com/sorear/niecza/commit/ab4576789a
01:33 dalek niecza: 9df3e9a | (Solomon Foster)++ | t/spectest.data:
01:33 dalek niecza: Turn on S16-filehandles/io.t.
01:33 dalek niecza: review: https://github.com/sorear/niecza/commit/9df3e9a450
01:33 dalek niecza: eb4c919 | (Solomon Foster)++ | lib/CORE.setting:
01:33 dalek niecza: Allow comb to handle Whatever argument.
01:33 dalek niecza: review: https://github.com/sorear/niecza/commit/eb4c91925f
01:42 thou_ joined #perl6
01:44 LlamaRider joined #perl6
01:51 sorear o/ thou_, LlamaRider
01:51 LlamaRider hi :)
01:52 sorear colomon: FWIW, I'm not entirely sold on open returning IO
01:53 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
01:53 sorear and I really think that pathnames and file handles are not the same thing
01:54 sorear even if there is the old stat/fstat dualism
01:54 colomon it does smack of the kitchen sink
01:55 * geekosaur remembers it being specced, didn't really understand it then either despite peripheral involvement
01:56 geekosaur (grew out of fun encountered while trying to add filetests to pugs)
02:00 am0c joined #perl6
02:02 awoodland joined #perl6
02:03 datums_nb joined #perl6
02:06 LlamaRider joined #perl6
02:06 shinobicl__ joined #perl6
02:07 shinobicl___ joined #perl6
02:08 shinobicl___ rakudo: try { warn "Ooops"; CONTROL { say "got something" }}
02:08 p6eval rakudo ea0311: OUTPUT«got something␤Ooops␤»
02:08 shinobicl___ rakudo: try { warn "Ooops"; CATCH { say "got something" }}
02:08 p6eval rakudo ea0311: OUTPUT«Ooops␤»
02:09 datums_nb joined #perl6
02:09 shinobicl___ mmm, "warn" used to trigger CATCH... what should i use now instead? "die"?
02:09 sorear yes, CATCH only catches die
02:10 shinobicl___ ok, thanks sorear..
02:11 dalek roast: 0792989 | (Solomon Foster)++ | S10-packages/basic.t:
02:11 dalek roast: Fudge for niecza.
02:11 dalek roast: review: https://github.com/perl6/roast/commit/079298936f
02:12 dalek niecza: 211db3b | (Solomon Foster)++ | t/spectest.data:
02:12 dalek niecza: Turn on S10-packages/basic.t.
02:12 dalek niecza: review: https://github.com/sorear/niecza/commit/211db3b192
02:18 colomon $/ = Any;  # ???
02:19 colomon perl6: $/ = Any;
02:19 p6eval pugs b927740, rakudo ea0311:  ( no output )
02:19 p6eval ..niecza v13-69-geb4c919: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/ttXdFAqHJU line 1:â�¤------> [32m$/[33mâ��[31m = Any;[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
02:20 colomon std: $/ = Any;
02:20 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/D6C9y7WL8z line 1:�------> [32m$/[33m�[31m = Any;[0m�Parse failed�FAILED 00:01 119m�»
02:24 colomon I'm deleting all the $/ = Any from this test file, since it seems unneeded and is definitely illegal p6.
02:25 preflex_ joined #perl6
02:26 dalek niecza: e71efc9 | sorear++ | lib/ObjModel.cs:
02:26 dalek niecza: Add a new CurriedRole type, not yet used
02:26 dalek niecza: review: https://github.com/sorear/niecza/commit/e71efc94ca
02:26 dalek niecza: 2d87a9b | sorear++ | lib/ (2 files):
02:26 dalek niecza: Remove role memoization hack
02:26 dalek niecza: review: https://github.com/sorear/niecza/commit/2d87a9b0e6
02:28 dalek roast: 3d83f03 | (Solomon Foster)++ | S05-modifier/pos.t:
02:28 dalek roast: Remove illegal $/ = Any lines.  Additional fudging for niecza.
02:28 dalek roast: review: https://github.com/perl6/roast/commit/3d83f032c9
02:28 packetknife joined #perl6
02:32 colomon sorear: working on roles?
02:32 sorear colomon: yes
02:32 colomon how is it coming?
02:33 sorear according to plan
02:34 * colomon most be patient.  ;)
02:34 colomon *must
02:36 [Coke] niecza: 'theXbigXbang'.split(/X/, -1).say
02:36 p6eval niecza v13-69-geb4c919: OUTPUT«theXbigXbang␤»
02:37 [Coke] niecza: 'theXbigXbang'.split(/X/, 0).say
02:37 p6eval niecza v13-69-geb4c919: OUTPUT«theXbigXbang␤»
02:39 colomon that -1 should probably be an error
02:39 colomon sorear and I were talking about the split tests the other day.
02:39 colomon 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
02:39 sorear who are you talking to?
02:40 colomon sorear: [Coke]
02:40 colomon [Coke] is trying tests from the split test files.
02:40 colomon in p6eval, I mean.
02:41 LlamaRider_ joined #perl6
02:41 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:42 [Coke] niecza: ''.split('').say
02:42 p6eval niecza v13-69-geb4c919: OUTPUT« ␤»
02:42 [Coke] niecza: ''.split('').WHAT.say
02:42 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…
02:42 [Coke] niecza: ''.split('').elems.say
02:42 p6eval niecza v13-69-geb4c919: OUTPUT«2␤»
02:44 [Coke] niecza: say 'abcdefg'.split('', 3)
02:44 p6eval niecza v13-69-geb4c919: OUTPUT« a bcdefg␤»
02:45 [Coke] colomon: well, clearly it would tip the scale. ;)
02:46 dalek roast: a59f0c2 | coke++ | S32-str/split-simple.t:
02:46 dalek roast: niecza fudge
02:46 dalek roast: review: https://github.com/perl6/roast/commit/a59f0c2270
02:46 dalek niecza: 71b660d | coke++ | t/spectest.data:
02:47 dalek niecza: run S32-str/split-simple.t
02:47 dalek niecza: review: https://github.com/sorear/niecza/commit/71b660d7f2
02:49 [Coke] niecza: say sleep 3;
02:49 p6eval niecza v13-69-geb4c919: OUTPUT«Nil␤»
02:49 [Coke] nom: say sleep 3;
02:49 p6eval nom ea0311: OUTPUT«3␤»
02:50 [Coke] niecza: say time
02:50 p6eval niecza v13-69-geb4c919: OUTPUT«1325643009.296046␤»
02:52 [Coke] sorear: mind if I add that?
02:53 colomon ok !eval('module MY; 1'), 'MY is an out of scope name';
02:53 colomon shouldn't that be eval_dies_ok or something like that?
02:55 wolfman2000 joined #perl6
03:00 [Coke] colomon: IANAC# programmer: do you see anything wrong with https://gist.github.com/1558253
03:00 [Coke] ?
03:01 [Coke] (swapping that in, the build dies. Trying to figure out where.)
03:02 [Coke] ah, at the rnull, I bet.
03:05 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?
03:05 [Coke] lib/CORE.setting //sleep
03:05 colomon let me look
03:06 colomon I think you just delete the rnull
03:06 colomon { Q:CgOp { (sleep (obj_getnum {$x})) } }
03:06 colomon try that
03:07 colomon oh, but you've got to fix the return value for sleep
03:07 colomon return MakeFloat(stopwatch.Elapsed.TotalSeconds);
03:08 colomon that's assuming it's a double
03:08 [Coke] trying...
03:10 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
03:10 [Coke] 4.0004932
03:10 [Coke] spec says it returns a num. good enough?
03:12 am0c joined #perl6
03:12 * [Coke] thinks so.
03:12 colomon +1
03:13 colomon do the spectests pass?  :)
03:13 [Coke] gets us the one failing sleep spectest, yes.
03:13 dalek niecza: 0586ec1 | coke++ | lib/ (2 files):
03:14 dalek niecza: Add return value for sleep
03:14 dalek niecza:
03:14 dalek niecza: colomon++ for some C# glue!
03:14 dalek niecza: review: https://github.com/sorear/niecza/commit/0586ec15f4
03:14 dalek niecza: fb83a49 | coke++ | t/spectest.data:
03:14 dalek niecza: run S29-context/sleep.t
03:14 dalek niecza: review: https://github.com/sorear/niecza/commit/fb83a495b8
03:16 colomon niecza: my $a; say ($a++).defined
03:16 p6eval niecza v13-73-g71b660d: OUTPUT«Bool::True␤»
03:16 colomon niecza: my $a; say ($a).defined
03:16 p6eval niecza v13-73-g71b660d: OUTPUT«Bool::False␤»
03:19 dalek roast: a3ff1ef | (Solomon Foster)++ | S02-names-vars/variables-and-packages.t:
03:19 dalek roast: Fudge for niecza.
03:19 dalek roast: review: https://github.com/perl6/roast/commit/a3ff1efb73
03:21 dalek niecza: 53a454d | (Solomon Foster)++ | / (3 files):
03:21 dalek niecza: Merge branch 'master' of github.com:sorear/niecza
03:21 dalek niecza: review: https://github.com/sorear/niecza/commit/53a454dc5d
03:21 dalek niecza: 36232b7 | (Solomon Foster)++ | t/spectest.data:
03:21 dalek niecza: Turn on S02-names-vars/variables-and-packages.t.
03:21 dalek niecza: review: https://github.com/sorear/niecza/commit/36232b7eb0
03:26 dalek roast: 6c6952b | coke++ | S02-literals/fmt-interpolation.t:
03:26 dalek roast: niecza fudge
03:26 dalek roast: review: https://github.com/perl6/roast/commit/6c6952befe
03:27 ruoso does niecza implements the equivalent of 6model?
03:28 dalek niecza: 9614045 | coke++ | t/spectest.data:
03:28 dalek niecza: run S02-literals/fmt-interpolation.t
03:28 dalek niecza: review: https://github.com/sorear/niecza/commit/961404523b
03:28 * [Coke] points ruoso at colomon,sorear.
03:28 colomon ?
03:29 colomon oh, I see the question
03:29 colomon I believe the correct answer is "not yet"
03:30 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
03:30 ruoso oh... ok...
03:31 ruoso I am considering prototyping some of the threading things...
03:31 ruoso (in special the blocking-buffered-stream thingy)
03:32 ruoso and maybe niecza might be easier to do that prototyping than rakudo... considering VM support for threads
03:33 colomon sounds reasonable to me.
03:33 [Coke] colomon: I'm going to do another test summary run. should I wait?
03:33 ruoso is there some documentation of the internals of how niecza is implemented? (runtime-wise)?
03:33 colomon [Coke]: yeah, give me a minute
03:34 colomon ruoso: maybe https://github.com/sorear/niecz​a/blob/master/docs/compiler.pod
03:35 sorear niecza's 6model implementation is not as good as Rakudo's
03:36 sorear but I would call it a 6model implementation
03:37 sorear niecza: foo; sub foo() { }
03:37 p6eval niecza v13-73-g71b660d:  ( no output )
03:37 dalek roast: 535c5e1 | (Solomon Foster)++ | S12-methods/indirect_notation.t:
03:37 dalek roast: Fudge for niecza.
03:37 dalek roast: review: https://github.com/perl6/roast/commit/535c5e1634
03:37 dalek roast: 7adcee8 | (Solomon Foster)++ | S02-literals/fmt-interpolation.t:
03:37 dalek roast: Merge branch 'master' of github.com:perl6/roast
03:37 dalek roast: review: https://github.com/perl6/roast/commit/7adcee8ddc
03:37 sorear niecza: { foo; sub foo() { } }
03:37 p6eval niecza v13-73-g71b660d:  ( no output )
03:37 Psyche^ joined #perl6
03:39 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 niecza: 9c97d31 | (Solomon Foster)++ | t/spectest.data:
03:39 dalek niecza: Turn on S12-methods/indirect_notation.t.
03:39 dalek niecza: review: https://github.com/sorear/niecza/commit/9c97d315b1
03:39 colomon [Coke]: okay, pull and go.  :)
03:40 sorear ruoso: niecza has a thin wrapper over CLR threading already
03:40 sorear ruoso: the runtime has mostly been designed to be thread-safe
03:40 sorear (iirc, the biggest remaining trouble spots are LTM and callbacks into the compiler)
03:41 ruoso is there any reading pointer for what that thin wrapper does?
03:42 sorear ruoso: lib/Threading.pm6
03:43 ruoso sorear: ah... you already have the blocking-buffered-streaming-thingy
03:49 colomon niecza: say 4 R[+] 5
03:49 p6eval niecza v13-73-g71b660d: OUTPUT«9␤»
03:50 sorear perl6: say 4 R[+] 5
03:50 p6eval rakudo ea0311, niecza v13-73-g71b660d: OUTPUT«9␤»
03:50 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected "R"␤    expecting operator, ":" or ","␤    at /tmp/Q58Mg1ziMZ line 1, column 7␤»
03:50 colomon ooo, broken test
03:51 dalek niecza: 719cbf1 | sorear++ | lib/ (3 files):
03:51 dalek niecza: Foo[Bar] produces a CurriedRole which is only instantiated when actually used
03:51 dalek niecza: review: https://github.com/sorear/niecza/commit/719cbf1b1c
03:52 [Coke] colomon: running now.
03:52 colomon [Coke]: about to check in another 22 passes.  ;)
03:53 dalek roast: 8401b62 | (Solomon Foster)++ | S03-operators/nesting.t:
03:53 dalek roast: Fudge for niecza.
03:53 dalek roast: review: https://github.com/perl6/roast/commit/8401b62f03
03:53 [Coke] ok, rerunning. ;)
03:54 [Coke] ... as soon as you add that file to spectestdata...
03:54 dalek niecza: 05da5bd | (Solomon Foster)++ | t/spectest.data:
03:54 dalek niecza: Turn on S03-operators/nesting.t.
03:54 dalek niecza: review: https://github.com/sorear/niecza/commit/05da5bdb19
03:54 colomon there.  :)
03:54 [Coke] ok, running now, will try to remember to commit it before zzz
03:55 orafu joined #perl6
03:56 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␤»
03:56 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;
03:56 p6eval niecza v13-73-g71b660d: OUTPUT«Potential difficulties:â�¤  $i is declared but not used at /tmp/SoX2kTsOpC line 1:â�¤------> [32mw(); Threads::Thread.new({ for 1..10 -> [33mâ��[31m$i { $a.put(time); Threads::Thread.sleep[0mâ�¤â�¤1​325646966.205935â�¤â�¤Unhandled Exception: System.InvalidCastExcepti…
03:56 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;
03:57 p6eval niecza v13-73-g71b660d: OUTPUT«(timeout)Potential difficulties:â�¤  $i is declared but not used at /tmp/CPGlvF2N8o line 1:â�¤------> [32mw(); Threads::Thread.new({ for 1..10 -> [33mâ��[31m$i { $a.put(time); Threads::Thread.sleep[0mâ�¤â�¤1325646977.432318â​�¤1325646978.4434741â�¤1325646979.4443009â�¤â€¦
03:58 ruoso that's awesome... so the primitives I need for my prototyping are there...
03:59 dalek niecza: 3e68017 | sorear++ | lib/Threads.pm6:
03:59 dalek niecza: Remove old/broken Threads.pm6 &sleep, ruoso++
03:59 dalek niecza: review: https://github.com/sorear/niecza/commit/3e68017eaf
03:59 sorear there's a sleep in the setting that will work better, but it was being shadowed by the old/broken one
03:59 sorear note that the setting's sleep is a prefix operator, not a normal function
04:00 sorear so you have to call it sleep 0.2 or sleep (0.2)
04:00 sorear sleep(0.2) won't work
04:00 ruoso the sleep was not the thing I wanted to test anyway :)
04:00 ruoso but rather the blocking wait
04:01 sorear ruoso, if you need any help with grammar/actions modifications, I'd be happy
04:01 dalek roast: 5fd22f2 | (Solomon Foster)++ | S03-sequence/arity-2-or-more.t:
04:01 dalek roast: Fudge for niecza.
04:01 dalek roast: review: https://github.com/perl6/roast/commit/5fd22f26fa
04:01 ruoso sorear: I guess my starting point would be the Feed operator
04:02 ruoso basically, the feed operator would return a Lazy list that would be built from a ObjectPipe
04:02 dalek niecza: 4a19356 | (Solomon Foster)++ | t/spectest.data:
04:02 dalek niecza: Turn on S03-sequence/arity-2-or-more.t.
04:02 dalek niecza: review: https://github.com/sorear/niecza/commit/4a1935621e
04:05 ruoso sorear: the ObjectPipe does need a "max buffer size"
04:07 ruoso sorear: I am having a build failure.... I'm using the mono from Debian stable
04:07 ruoso error CS0040: Unexpected debug information initialization error `The assembly for default symbol writer cannot be loaded'
04:08 sorear either finish installing Mono, or remove --debug from the Makefile
04:09 ruoso what else do I need installed?
04:09 ruoso (removing debug did seem to work, anyway)
04:11 satyavvd joined #perl6
04:11 sorear libmono2.0-cil
04:11 sorear I recommend mono-complete though
04:11 * ruoso installing mono-complete
04:16 ruoso and the sudoku solver runs in a pretty decent speed
04:17 sorear it works without modification on niecza?
04:18 ruoso I only had to remove the "eager"
04:18 ruoso (which was only there because of rakudo quirks
04:20 ruoso and it solves it in 3.5s
04:20 odoacre joined #perl6
04:20 ruoso hah... and it actually parallelized
04:20 ruoso real0m3.555s
04:20 ruoso user0m4.636s
04:20 ruoso sys0m0.084s
04:21 ruoso thanks to the junctions
04:21 ruoso (i think)
04:21 sorear I assure you there is no code in Niecza to distribute junction work across threads
04:21 sorear My best guess is parallel GC in Mono
04:22 ruoso ah.. ok..
04:24 dalek niecza: 32a629c | sorear++ | lib/Kernel.cs:
04:24 dalek niecza: Allow 0-arg composing of a parametrized role without first currying it
04:24 dalek niecza: review: https://github.com/sorear/niecza/commit/32a629ca65
04:25 ruoso sorear: is there any support for exporting compiled bytecode?
04:27 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
04:27 ruoso I was considering more like a "statically linked executable"
04:30 sorear I suppose you're talking about the way run/Niecza.exe is created
04:31 ruoso not specifically... I'm more like considering the runtime requirements in the mono side when you distribute a niecza-compiled executable
04:36 dalek roast: 9f0ffaf | (Solomon Foster)++ | S02-literals/char-by-name.t:
04:36 dalek roast: Fudge for niecza.
04:36 dalek roast: review: https://github.com/perl6/roast/commit/9f0ffafabb
04:37 dalek niecza: 54b7729 | (Solomon Foster)++ | t/spectest.data:
04:37 dalek niecza: Turn on S02-literals/char-by-name.t.
04:37 dalek niecza: review: https://github.com/sorear/niecza/commit/54b7729994
04:38 dalek niecza: 477af89 | sorear++ | / (2 files):
04:38 dalek niecza: All roles are parametric, with an implied first argument of $?CLASS
04:38 dalek niecza: review: https://github.com/sorear/niecza/commit/477af89239
04:43 am0c joined #perl6
04:48 colomon niecza: say Any.gist
04:48 p6eval niecza v13-84-g4a19356: OUTPUT«Any()␤»
04:49 ruoso sorear: https://github.com/ruoso/niecza/commit/1​2586253928222409f9acfda736dac5fe92c3d1f
04:54 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 #perl6
04:57 sorear done
04:58 dalek niecza: 27499a6 | (Daniel Ruoso)++ | / (2 files):
04:58 dalek niecza: Add a max_buffer_size to the ObjectPipe
04:58 dalek niecza:
04:58 dalek niecza: The blocking aspect should work both ways, not only the reader should block on the writer
04:58 dalek niecza: but it is also important that the writer blocks on the reader so that we only advance a
04:58 dalek niecza: reasonable set of data prior to any consumption. Just like unix pipes.
04:58 dalek niecza:
04:58 dalek niecza: Added an example code that demonstrates that.
04:58 dalek niecza: review: https://github.com/sorear/niecza/commit/27499a695a
04:59 ruoso night &
05:06 kaleem joined #perl6
05:12 colomon 'night, all
05:22 Chillance joined #perl6
05:23 sorear bye
05:25 sorear 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/…
05:25 sorear rakudo: role Foo[$x,$y] { }; Foo[2]
05:25 p6eval rakudo ea0311:  ( no output )
05:25 sorear excellent
05:26 mkramer joined #perl6
05:42 sorear niecza: role Foo { }; class Bar does Foo { }
05:42 p6eval niecza v13-88-g27499a6: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method trait_mod:does not yet implemented at /tmp/qGKS_5xxXb line 1:�------> [32mrole Foo { }; class Bar does Foo [33m�[31m{ }[0m��Unhandled trait 0 for this context at /tmp/qGKS_5xxXb line 1:�------> [32mrole Fo…
05:55 thou joined #perl6
06:08 dalek niecza: 747cda8 | sorear++ | / (4 files):
06:08 dalek niecza: Add trait_mod:<does> syntax
06:08 dalek niecza: review: https://github.com/sorear/niecza/commit/747cda8fd2
06:09 kaleem joined #perl6
06:10 achromic joined #perl6
06:12 overrosy joined #perl6
06:24 dalek niecza: 0ebf512 | sorear++ | lib/ (2 files):
06:24 dalek niecza: Factor out RoleToClass application; class Bar does Foo works in most basic cases
06:24 dalek niecza: review: https://github.com/sorear/niecza/commit/0ebf512b33
06:33 dalek niecza: 84eb8f9 | sorear++ | src/ (2 files):
06:33 dalek niecza: Detect stubbing of methods
06:33 dalek niecza: review: https://github.com/sorear/niecza/commit/84eb8f9ecf
06:46 icwiener joined #perl6
06:55 mkramer left #perl6
06:56 wtw joined #perl6
07:01 dayangkun joined #perl6
07:10 diggins joined #perl6
07:11 moritz \o
07:15 datums_nb joined #perl6
07:17 diggins can somebody tell me what i'm doing wrong here: http://pastebin.com/A2p7diir
07:17 sorear o/ moritz
07:18 sorear diggins: try using &!x instead of &x, consistantly
07:18 sorear iirc the twigil-less form is not really implemente
07:19 moritz diggins: BUILD gets named arguments, not positional arguments
07:19 moritz diggins: and the seond problem is that the constructor only automatically initializes public attributes, not private ones
07:20 moritz since they are *private*, the user shouldn't automatically be allowed to provide a value for them
07:20 diggins ok
07:20 moritz are sure you don't want them public?
07:20 diggins yes
07:20 diggins they are implementation specific
07:21 diggins instead of using BUILD, can i use new?
07:21 moritz you can
07:21 moritz diggins: but if you want to allow setting them in .new, they look like part of the API
07:21 diggins when i tried, i got the error listed in my paste
07:22 moritz well, depends on how you made your new
07:22 diggins similar to BUILD
07:22 moritz you need to call self.bless in method new to create a new instance
07:22 icwiener joined #perl6
07:23 diggins i followed what i saw here: http://perlgeek.de/blog-en/perl-6/objec​t-construction-and-initialization.html
07:23 diggins are there any examples around using private attributes?
07:24 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
07:24 moritz diggins: no, I should add one
07:24 moritz (re private attribute example)
07:25 diggins moritz: cool :)
07:25 moritz diggins: no, you're not using sort right
07:25 moritz diggins: the block is supposed to return -1, 0 or 1, depending on wheter the elements compare as "smaller", "same" or "equal"
07:26 moritz $a <=> $b
07:26 diggins doh!
07:26 moritz or $str1 leg $str2
07:26 moritz (leg = lesser, equal, greater)
07:26 diggins thanks, i was focusing too much on the object stuff that simple fact eluded me
07:32 icwiener joined #perl6
07:40 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␤»
07:41 moritz diggins: see, if you say   submethod BUILD(:&!func) { }   you call .new(func => { some code here } )
07:46 diggins moritz: yeah, sombody mentioned that earlier. i was hoping to accept only a single optional positional argument
07:46 diggins somebody == you :)
07:50 moritz well, then you can do something like this:
07:50 moritz nom: class A { has $!x; method new($x) { self.bless(*, :$x) }; submethod BUILD(:$!x) { }; method mx { $!x } }; say A.new(3).mx
07:50 p6eval nom ea0311: OUTPUT«3␤»
07:51 diggins cool, i'll give that a try
08:02 baest joined #perl6
08:10 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…
08:11 achromic hmm, works in rakudo star
08:14 moritz hm
08:14 moritz nom: say so { "foo" }
08:15 p6eval nom ea0311: OUTPUT«Bool::True␤»
08:15 sorear nom: say so Callable
08:15 p6eval nom ea0311: OUTPUT«Bool::False␤»
08:16 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␤»
08:16 moritz prettier, and works. Still the other one should work too
08:16 moritz nom: role Foo { }; say so Foo.new
08:16 p6eval nom ea0311: OUTPUT«Bool::True␤»
08:17 moritz hm, if get_bool isn't implemented, somhow and object leaks through that doesn't inherit from Mu
08:17 moritz nom: role Foo { }; say Foo.new ~~ Any
08:17 p6eval nom ea0311: OUTPUT«Bool::True␤»
08:25 dalek niecza: d6f6384 | sorear++ | lib/ (3 files):
08:25 dalek niecza: Implement more cases, including classes that consume multiple roles, drunken gymnasts, and requirements
08:25 dalek niecza: review: https://github.com/sorear/niecza/commit/d6f63840c0
08:43 mj41 joined #perl6
08:46 alim_ joined #perl6
08:46 alim_ joined #perl6
08:47 overrosy joined #perl6
08:55 mkramer joined #perl6
09:03 overrosy joined #perl6
09:08 mkramer left #perl6
09:12 icwiener joined #perl6
09:13 dalek niecza: 6e115d3 | sorear++ | lib/ (5 files):
09:13 dalek niecza: Implement type checking for roles, .^does
09:13 dalek niecza: review: https://github.com/sorear/niecza/commit/6e115d3ebe
09:13 * sorear -> sleep
09:15 Mowah joined #perl6
09:16 overrosy joined #perl6
09:43 overrosy joined #perl6
09:45 daxim joined #perl6
09:49 masak morning, #perl6
09:53 mkramer joined #perl6
09:59 masak the number of p6cc contestants just hit 30. \o/
10:05 moritz \o/
10:23 PacoAir joined #perl6
10:30 shinobicl___ joined #perl6
10:33 * moritz tests the pull requests by kshannon++
10:41 Mowah joined #perl6
10:41 huf joined #perl6
10:49 icwiener joined #perl6
10:49 dalek rakudo/nom: 2046b9d | (Kris Shannon)++ | src/Perl6/Grammar.pm:
10:49 dalek rakudo/nom: No unspace or backslashes allowed during interpolation
10:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2046b9d7a1
10:49 dalek rakudo/nom: da49502 | (Kris Shannon)++ | src/core/Parameter.pm:
10:49 dalek rakudo/nom: Visually optimize Paramter.perl() for named parameters
10:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/da49502222
10:49 dalek rakudo/nom: 1c74c72 | moritz++ | src/core/Parameter.pm:
10:49 dalek rakudo/nom: Merge remote branch 'kshannon/signature-printing' into nom
10:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c74c72b40
10:51 achromic left #perl6
10:52 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 moritz *hate
10:52 wolverian http://www.google.com/search?client=safari&am​p;rls=en&amp;q=rong&amp;ie=UTF-8&amp;oe=UTF-8 :)
10:52 kshannon while your looking at my stuff,  what do you think of the change I suggest in https://rt.perl.org/rt3/Ticket/Di​splay.html?id=107270#txn-1047782
10:53 wolverian Funnily enough, the second Google hit for "rong" is "ESL - English as a Second Language"
10:53 * moritz takes a look
10:54 moritz kshannon: I'm not familiar with that code, and so can't comment. We'll have to wait for jnthn++
10:55 kshannon Ok :)
10:55 kshannon It does pass roast,  but it just feels like a hack to me :(
10:56 kshannon This memory leak is driving me crazy...
11:01 moritz what leaks?
11:01 moritz 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 #perl6
11:02 moritz s/'#'/\'/
11:06 mkramer joined #perl6
11:08 shinobicl___ left #perl6
11:08 proller joined #perl6
11:09 jakky left #perl6
11:11 unobe joined #perl6
11:14 baest joined #perl6
11:17 preflex_ joined #perl6
11:18 bacek joined #perl6
11:28 kshannon moritz:  loop { 1 } # runs forever in constant memory
11:28 kshannon loop { 1 + 1 } # leaks like crazy
11:30 satyavvd joined #perl6
11:33 kshannon after doing a quick sed to account for the sub_id and sc handles changing, the pir diff between them is:
11:33 kshannon .sub "_block1011"  :anon :subid("11_1325676614.96814") :outer("10_1325676614.96814")
11:33 kshannon .annotate 'line', 1
11:33 kshannon +    perl6_box_int $P101, $I1
11:33 kshannon .lex "$_", $P1013
11:34 kshannon -    nqp_get_sc_object $P101, "CFE9BCF376D601B46E2B5AD308A8F13912868805", 8
11:34 kshannon +    add $I101, 1, 1
11:37 kshannon joined #perl6
11:45 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:47 alim joined #perl6
11:47 muixirt joined #perl6
11:47 flussence and the difference is about 0.5KB per int!
11:48 muixirt kshannon: nice catch, something for my collection :-)
11:53 muixirt boxing an int costs 0.5KB?
11:56 flussence seems like it... the numbers still correlate if I use a 100000 loop
11:57 kshannon That's from earlier today,  http://irclog.perlgeek.de/​perl6/2012-01-03#i_4923663
12:09 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:11 kshannon 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
12:13 kshannon Yeah, but then it gets boxed any for no apparent reason and thrown away... :(
12:13 moritz :(
12:14 kshannon It inlines the > 300_000,  then it perl6_booleanize's it, decontainerize's that, and then uses that for the if.
12:15 kshannon Reading that PIR is just depressing.
12:21 hundskatt joined #perl6
12:23 [Coke] colomon, niecza: yesterday's runs -  https://gist.github.com/1476841 ... put us at 89.98% ... and I'm pretty sure I saw some commits go by since then.
12:45 moritz perl6: say 9 % (-9)
12:45 p6eval rakudo 1c74c7: OUTPUT«-9␤»
12:45 p6eval ..pugs b927740, niecza v13-93-g6e115d3: OUTPUT«0␤»
12:46 moritz perl6: say 8 % (-9)
12:46 p6eval niecza v13-93-g6e115d3: OUTPUT«17␤»
12:46 p6eval ..pugs b927740, rakudo 1c74c7: OUTPUT«-1␤»
12:46 moritz niecza's output is quite creative
12:46 overrosy joined #perl6
12:51 * masak submits nieczabug
12:53 colomon mnbnhhnj
12:53 flussence keyboard cat!
12:54 colomon keyboard 3-year-old playing Casey Jones
12:54 colomon at least, I think that's what he's doing.
12:56 colomon maybe he's playing wells fargo wagon?
12:56 bluescreen10 joined #perl6
12:58 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␤»
12:58 masak nom: my %scores = b => 3, h => 8, j => 8, m => 3, n => 1; say [+] %scores{ 'mnbnhhnj'.comb }
12:58 p6eval nom 1c74c7: OUTPUT«33␤»
12:59 twinshadow joined #perl6
12:59 masak that's excluding any double or triple word scores.
12:59 shinobicl__ joined #perl6
13:00 sivoais joined #perl6
13:02 masak I'm very tempted to blog about infix:<%>, its varous possible semantics, and its various current bugs in different implementations.
13:03 colomon masak: you should probably wait a bit -- I'm currently staring at the guts of niecza, wondering how to fix infix:<%>
13:04 geekosaur that implies you've figured out what it's doing.  (17?!)
13:06 colomon 8 % (-9)  ==> 8 - -9 * red
13:06 colomon red must be -1
13:06 masak "I don't have time to figure out how it works, I just want to fix it!"
13:07 masak colomon: don't worry, I definitely won't have time to blog before tonight anyway.
13:08 spine_ joined #perl6
13:21 [Coke] colomon++
13:21 [Coke] So, when niecza passes more spec tests than rakudo, do we throw a party or something? ;)
13:25 masak that's when the real arms race begins :)
13:27 [Coke] niecza: say 18417-16571
13:27 p6eval niecza v13-93-g6e115d3: OUTPUT«1846␤»
13:29 moritz then we start talking about what the *important* spectests are :-)
13:32 * masak wants to make a nice big SVG map over all the spectests, and color it in with b/nom/Niecza coverage
13:33 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"␤»
13:33 shinobicl__ ahh sorry about that
13:33 shinobicl__ i meant: is there a way
13:33 shinobicl__ +to overload an operator to work on certain roles only?
13:33 moritz sure
13:33 moritz multi sub infix:<+>(yourrole $a, yourrole $b) { ... }
13:41 shinobicl__ does this mean something? : multi sub infix:<+>(Str $v1 where yourrole, $Str $s2 where yourrole) { ... }
13:42 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
13:42 p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Circularity detected in multi sub types.␤»
13:42 masak o.O
13:43 masak 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
13:43 shinobicl__ i mean, <->
13:46 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.␤»
13:50 [Coke] colomon: updated http://feather.perl6.nl/~coke/colomon.txt
13:51 [Coke] 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:53 colomon niecza> say 8 % (-9)
13:53 colomon -1
13:53 colomon niecza> 9 % (-9)
13:53 colomon 0
13:53 [Coke] ... though it appears I forgot to do a make at some point, so those numbers are very slightly suspect.
14:04 Mowah joined #perl6
14:07 [Coke] niecza: say 16596 / 18417
14:07 p6eval niecza v13-93-g6e115d3: OUTPUT«0.90112396155725694␤»
14:08 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"␤»
14:08 moritz nom: multi sub infix:<+>(Str $a where 'foo', Str $b where 'bar) { $a ~ $b }; say 'foo' + 'bar'
14:08 p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Malformed block at line 1, near "(Str $a wh"␤»
14:08 moritz nom: multi sub infix:<+>(Str $a where 'foo', Str $b where 'bar') { $a ~ $b }; say 'foo' + 'bar'
14:08 p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Circularity detected in multi sub types.␤»
14:09 moritz no Awesome necessary to create the error message
14:09 masak "Perl 6: Awesome not required"
14:10 masak 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'
14:10 p6eval nom 1c74c7: OUTPUT«foobar␤»
14:10 masak I don't think the spec mentions anything like that.
14:10 * 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
14:10 moritz well, the multi dispatcher needs to do a topologic sort
14:10 geekosaur (that is, autogenerate ($b, $a) given ($a, $b)
14:11 masak it's from src/binder/multidispatch.c
14:11 moritz and that sort does a narrowness comparison
14:11 moritz and if it detects a cycle, then it gives that error
14:11 mkramer joined #perl6
14:12 masak logically, the cycle must've been *introduced* by the above-declared multis.
14:12 devel joined #perl6
14:12 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
14:12 moritz and I don't see which one it could be
14:12 ggoebel joined #perl6
14:12 moritz hm, maybe it treats str an epsilon tighter than Str?
14:13 masak maybe.
14:13 moritz but there's no (str, str) multi for +
14:13 moritz maybe it's a bug in the candidate sorter, or in the narrowness analysis
14:14 moritz 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«[31m===[0mSORRY![31m===[0m��Action method post_constraint not yet implemented at /tmp/3GbOzhWXZw line 1:�------> [32mmulti sub infix:<+>(Str $a where 'foo'[33m�[31m, Str $b where 'bar') { $a ~ $b }; say '[0m��Unhandled exception: Unable to resolve …
14:15 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"␤»
14:15 devel +Something; say $s1 - $s2;
14:16 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)␤»
14:16 masak devel: try "but", not "does"
14:16 mdxi joined #perl6
14:16 masak "does" really doesn't make sense on value objects.
14:17 overrosy joined #perl6
14:17 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 …
14:17 moritz nom: say ('foo' but Positional) ~~ Str
14:17 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␤»
14:18 moritz I can understand the first one (Numeric isn't yet a role in rakudo)
14:18 moritz but the second one seems really weird
14:18 flussence nom: multi sub a(Numeric $) { say 'num' }; multi sub a(Bool $) { say 'bool' }; a(0 but True);
14:18 p6eval nom 1c74c7: OUTPUT«num␤»
14:18 masak I wouldn't mind if the first error message were "Can't use 'but' with a class"
14:18 [Coke] colomon: any idea why S32-str/split.t dies with "Autoloading NYI" ?
14:18 moritz masak: that would be much more awesome
14:19 masak wow, nothing wrong with the activity here today. :)
14:19 colomon [Coke]: probably a :p5 somewhere in there
14:19 [Coke] ahhh.
14:21 dalek niecza: 93ec2ef | (Solomon Foster)++ | lib/Builtins.cs:
14:21 dalek niecza: 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 dalek niecza: review: https://github.com/sorear/niecza/commit/93ec2ef31a
14:22 dalek roast: 7383aad | (Solomon Foster)++ | S03-operators/ (2 files):
14:22 dalek roast: Unfudge tests now working in niecza, add four more tests.
14:22 dalek roast: review: https://github.com/perl6/roast/commit/7383aad6ce
14:23 [Coke] niecza: split("", "forty-two").say
14:23 overrosy joined #perl6
14:23 p6eval niecza v13-93-g6e115d3: OUTPUT« f o r t y - t w o ␤»
14:23 masak colomon++ # modulo
14:28 dalek roast: ddfbc57 | coke++ | S32-str/split.t:
14:28 dalek roast: niecza fudge
14:28 dalek roast: review: https://github.com/perl6/roast/commit/ddfbc570df
14:28 dalek niecza: 4220132 | coke++ | t/spectest.data:
14:28 dalek niecza: run S32-str/split.t
14:28 dalek niecza: review: https://github.com/sorear/niecza/commit/42201323d8
14:31 moritz nom: my Int $x = 9; my Int $y = -9; say $x % $y;
14:31 p6eval nom 1c74c7: OUTPUT«-9␤»
14:32 moritz nom: my Int $x = 9 * 2 ** 40; my Int $y = -9 * 2 ** 40; say $x % $y;
14:32 p6eval nom 1c74c7: OUTPUT«-9895604649984␤»
14:33 PerlJam nom: 5 % 0
14:33 p6eval nom 1c74c7:  ( no output )
14:33 PerlJam nom: say 5 % 0
14:33 p6eval nom 1c74c7: OUTPUT«5␤»
14:34 PerlJam % 0 seems ... odd.
14:34 masak should arguably be an error.
14:34 masak there's a division by 0 in there.
14:35 PerlJam exactly
14:35 PerlJam nom: say 5 / 0;
14:35 p6eval nom 1c74c7: OUTPUT«Inf␤»
14:35 masak well, maybe not an "error", but an erroneous condition of some kind.
14:35 PerlJam certainly not 5 in this case
14:37 masak right.
14:42 kaleem joined #perl6
14:46 * PerlJam idly wonders if Perl 6 should grow a remainder operator to go with modulus :)
14:48 daxim spec's not large enough yet!
14:49 masak PerlJam: just use infix:<%> in list context, and extract the second return value :P
14:54 mkramer joined #perl6
14:55 [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␤»
14:55 p6eval ..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…
14:55 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&Order::Increase"␤    at /tmp/SMnMfWwcfU line 1, column 5 - line 2, column 1␤»
14:56 colomon perl6: say Inf * 0
14:56 p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
14:57 estrabd joined #perl6
14:57 lateau_ joined #perl6
14:59 lateau_ left #perl6
14:59 masak perl6: say 1 ** Inf
14:59 p6eval pugs b927740, rakudo 1c74c7: OUTPUT«1␤»
14:59 p6eval ..niecza v13-93-g6e115d3: OUTPUT«NaN␤»
15:00 masak perl6: say 0 ** Inf
15:00 p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«0␤»
15:00 masak perl6: say 0 ** 0
15:00 p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«1␤»
15:03 mkramer joined #perl6
15:03 ggoebel joined #perl6
15:03 masak perl6: say Inf - Inf
15:03 p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
15:03 masak perl6: say Inf / Inf
15:03 p6eval pugs b927740, rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
15:03 masak perl6: say Inf % Inf
15:03 p6eval rakudo 1c74c7, niecza v13-93-g6e115d3: OUTPUT«NaN␤»
15:03 p6eval ..pugs b927740: OUTPUT«Inf␤»
15:04 masak oh pugs, you so crazy.
15:04 masak pugs: say Inf % -Inf
15:04 p6eval pugs b927740: OUTPUT«NaN␤»
15:04 PerlJam I was just taking heart at how well they were agreeing ...
15:07 masak :)
15:08 M_o_C joined #perl6
15:10 icwiener joined #perl6
15:12 cosimo joined #perl6
15:15 cosimo joined #perl6
15:18 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
15:19 kshannon e.g.
15:21 [Coke] I think kshannon is probably aware of it. ;)
15:22 thou_ joined #perl6
15:22 masak good, good :)
15:25 * [Coke] is getting dangerously close to having to implement features to pass more tests. This is horrible! ;)
15:29 masak [Coke]: you could always get out of it by leaving them as LHF TODO tickets.
15:30 colomon [Coke]: which features?  :)
15:30 * colomon is not above implementing new features in a pinch.  ;)
15:32 [Coke] some of the builtin types would get us some test files. (like... Subset)
15:32 masak colomon++
15:33 [Coke] .methods
15:33 masak huh? Subset is a type?
15:33 colomon .methods?
15:36 raiph joined #perl6
15:37 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:40 [Coke] masak: sorry, "subsets", not the type Subset.
15:40 masak oh phew
15:40 [Coke] t/spec/S02-types/subset.t
15:41 [Coke] t/spec/S12-introspection/methods.t
15:41 [Coke] (for colomon)
15:41 * [Coke] thinks it'll be easier for him to hack on the S32- stuff for already-implemented types.
15:43 krakan joined #perl6
16:01 Lilpid joined #perl6
16:01 flussence joined #perl6
16:03 arlinius joined #perl6
16:07 sromanov joined #perl6
16:08 tokuhirom joined #perl6
16:17 masak Go interfaces have much of the feel of Perl 6 subtypes.
16:17 packetknife joined #perl6
16:36 am0c joined #perl6
16:44 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:52 Trashlord joined #perl6
16:53 thou joined #perl6
16:56 * masak decommutes
17:03 TimToady perl6: say "aa" leg "ac"
17:03 p6eval niecza v13-95-g4220132: OUTPUT«-2␤»
17:03 p6eval ..pugs b927740, rakudo 1c74c7: OUTPUT«-1␤»
17:03 TimToady perl6: say ("aa" leg "ac").WHAT
17:03 p6eval niecza v13-95-g4220132: OUTPUT«Num()␤»
17:03 p6eval ..pugs b927740: OUTPUT«Int␤»
17:03 p6eval ..rakudo 1c74c7: OUTPUT«Int()␤»
17:04 TimToady nobody has it right, but niecza is wronger
17:05 * TimToady will be losing electricity in half hour or so (transformer replacement), so lurkage on #phasers is doubtful
17:07 kaleem joined #perl6
17:20 sorear good * #perl6
17:20 sorear #phasers in 10?
17:23 TimToady colomon: see ^^^
17:25 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…
17:26 colomon TimToady: it should be Order(ing?), right?
17:26 colomon #phasers in 4
17:27 TimToady yes, see S03:1198
17:30 colomon TimToady: they don't stringify to -1, 0, or +1, do they?
17:30 sorear no Order in Niecza but it's LHF
17:30 TimToady perl6: say False
17:30 p6eval rakudo 1c74c7, niecza v13-95-g4220132: OUTPUT«Bool::False␤»
17:30 p6eval ..pugs b927740: OUTPUT«␤»
17:31 TimToady perl6: say ~False
17:31 p6eval rakudo 1c74c7, niecza v13-95-g4220132: OUTPUT«False␤»
17:31 p6eval ..pugs b927740: OUTPUT«␤»
17:31 TimToady that :)
17:31 TimToady probably losing power soon... so o/ in advance
17:31 packetknife joined #perl6
17:46 colomon sorear: any idea what this means?
17:46 colomon Compile time expression is insufficiently trivial CallSub at /Users/colomon/tools/niecza/lib/CORE.setting line 2178:
17:46 colomon ------>  (:Increase(-1), :Same(0), :Decrease(1))⏏;
17:46 colomon Enum may not contain both Int and Str values at /Users/colomon/tools/niecza/lib/CORE.setting line 2178:
17:46 colomon ------>  (:Increase(-1), :Same(0), :Decrease(1))⏏;
17:46 TimToady niecza: say BEGIN -1
17:46 p6eval niecza v13-95-g4220132: OUTPUT«-1␤»
17:47 TimToady niecza: enum Order (:Increase(BEGIN -1), :Same(0), :Decrease(1))
17:47 p6eval niecza v13-95-g4220132: OUTPUT«[31m===[0mSORRY![31m===[0m��Compile time expression is insufficiently trivial ConstantDecl at /tmp/7XIBNycvrH line 1 (EOF):�------> [32mrease(BEGIN -1), :Same(0), :Decrease(1))[33m�[31m<EOL>[0m��Enum may not contain both Int and Str values at /tmp/…
17:48 TimToady niecza: say (:Increase(-1), :Same(0), :Decrease(1)).perl
17:48 p6eval niecza v13-95-g4220132: OUTPUT«("Increase" => -1, "Same" => 0, "Decrease" => 1)␤»
17:48 TimToady looks like some kind of revrot
17:49 TimToady niecza: enum Order (:Increase(0), :Same(1), :Decrease(2))
17:49 p6eval niecza v13-95-g4220132:  ( no output )
17:49 TimToady seems to not like the negative
17:49 colomon TimToady++
17:51 TimToady which is odd, since BEGIN doesn't mind it
17:51 TimToady niecza: enum Order (BEGIN :Increase(-1), :Same(0), :Decrease(1))
17:51 p6eval niecza v13-95-g4220132: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Compile time expression is insufficiently trivial ConstantDecl at /tmp/clM55dBWWY line 1 (EOF):â�¤------> [32mN :Increase(-1), :Same(0), :Decrease(1))[33mâ��[31m<EOL>[0mâ�¤â�¤No matchâ�¤  at /home/p6eval/niecza/lib/CORE.setting li…
17:52 TimToady I'd guess it's too hardwired to the exact syntax for normal enums
17:54 TimToady niecza: say BEGIN :Increase(-1)
17:54 p6eval niecza v13-95-g4220132: OUTPUT«"Increase" => -1␤»
17:55 fsergot joined #perl6
17:55 fsergot o/ :0
17:55 fsergot :)
17:55 packetknife joined #perl6
17:58 pyrimidine when does #phasers start?
17:58 sorear pyrimidine: -28
17:58 TimToady 'bout half hour ago
17:58 PacoAir joined #perl6
17:58 pyrimidine ah.  was wondering. it's a bit quiet
17:58 TimToady most of the usual suspects are wandering
17:59 fridim_ joined #perl6
18:00 fsergot joined #perl6
18:01 colomon aha!
18:01 colomon the -1 triggers the Compile time expression is insufficiently trivial message, then it returns "XXX", which triggers the Int and Str message
18:02 TimToady funny that BEGIN doesn't mind the -1 though
18:02 TimToady enum should probably just use BEGIN and interpret the results
18:10 packetkn_ joined #perl6
18:11 sorear TimToady: that would be ideal
18:12 sorear the problem is that the BEGIN will produce the runtime versions of Pair, Str, Int, Parcel
18:12 sorear and I'm not sure how best to map that back to something the compiler can understand
18:13 TimToady gee, if the compiler were written in Perl 6, it'd be easy...  :P
18:14 TimToady still have electricity; maybe I should walk around the block and see if there are any PG&E trucks...
18:15 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
18:16 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
18:17 moritz perl6: enum Foo (a => -1); say Foo::a
18:17 mj41 joined #perl6
18:17 p6eval pugs b927740: OUTPUT«*** No such subroutine: "&enum"␤    at /tmp/PywYVxehI2 line 1, column 1-19␤»
18:17 p6eval ..rakudo 1c74c7: OUTPUT«===SORRY!===␤Enumeration values must be known at compile time at line 1, near "; say Foo:"␤»
18:17 p6eval ..niecza v13-95-g4220132: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Compile time expression is insufficiently trivial CallSub at /tmp/Qk_f8hs6ja line 1:â�¤------> [32menum Foo (a => -1)[33mâ��[31m; say Foo::a[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setti…
18:17 colomon ah, so rakudo has the same problem
18:18 moritz indeed
18:18 colomon -1 is not a literal
18:18 MayDaniel joined #perl6
18:18 moritz right; it needs constant folding
18:18 moritz and that happens at CHECK time in rakudo
18:20 * 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:21 colomon afk # nap
18:22 [Coke] sorear: the subset test failed horribly. I'll try to remember to tease out why this evening.
18:22 [Coke] (order) that's about 40 tests, \o/ ;)
18:54 hundskatt joined #perl6
18:55 kaare_ joined #perl6
19:10 fsergot nom: my %hash; say 1 if %hash;
19:10 p6eval nom 1c74c7:  ( no output )
19:10 fsergot nom: my %hash = 'a' => 'a'; say 1 if %hash;
19:10 p6eval nom 1c74c7: OUTPUT«1␤»
19:15 xinming joined #perl6
19:19 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…
19:20 fsergot nom: True;
19:20 p6eval nom 1c74c7:  ( no output )
19:20 fsergot nom: False;
19:20 p6eval nom 1c74c7:  ( no output )
19:20 fsergot nom: say False;
19:20 p6eval nom 1c74c7: OUTPUT«Bool::False␤»
19:21 xinming joined #perl6
19:24 masak TimToady: I was curious to see how well S06 vibed with https://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:25 masak 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 masak sorear once said that was his interpretation of it.
19:26 masak 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:34 dalek niecza: 6b3fb14 | (Solomon Foster)++ | lib/CORE.setting:
19:34 dalek niecza: 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 dalek niecza: review: https://github.com/sorear/niecza/commit/6b3fb14e4c
19:34 colomon Crap, wrong push.  I haven't spectested that change yet.
19:34 dalek roast: fa413e2 | (Solomon Foster)++ | S03-operators/comparison.t:
19:34 dalek roast: Change the "Blue" tests to use an Int instead of a Complex, reflecting the latest thinking on Complex comparisons.  Fudge for niecza.
19:34 dalek roast: review: https://github.com/perl6/roast/commit/fa413e2844
19:35 wolfman2000 joined #perl6
19:36 masak the "blue" tests?
19:38 colomon masak: look at the diff.  ;)
19:42 colomon hmmm.
19:44 colomon small flaw in that patch
19:44 Trashlord joined #perl6
19:45 masak ah. it's a class, arbitrarily named "Blue" :)
19:45 Trashlord joined #perl6
19:48 proller joined #perl6
19:50 masak nom: say (class Foo {}).^is_composed
19:50 p6eval nom 1c74c7: OUTPUT«1␤»
19:50 masak nom: class Foo { BEGIN say Foo.^is_composed }
19:50 p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Method 'dispatch:<.^>' not found for invocant of class 'Foo'␤»
19:50 masak aww :)
19:51 masak 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'␤»
19:51 masak aww!
19:51 masak nom: class Foo { BEGIN say Foo.new }
19:51 p6eval nom 1c74c7: OUTPUT«===SORRY!===␤Method 'new' not found for invocant of class 'Foo'␤»
19:51 masak reasonable. :)
19:52 dalek niecza: 5e9d335 | (Solomon Foster)++ | t/spectest.data:
19:52 dalek niecza: Turn on S03-operators/comparison.t.
19:52 dalek niecza: review: https://github.com/sorear/niecza/commit/5e9d33581f
19:52 dalek niecza: 88c4694 | (Solomon Foster)++ | lib/CORE.setting:
19:52 dalek niecza: In infix:<cmp>, change all instances of Numeric to Real, as that is what was meant.
19:52 dalek niecza: review: https://github.com/sorear/niecza/commit/88c4694a4e
19:52 colomon There, that does it.
19:54 proller joined #perl6
20:07 fglock joined #perl6
20:07 fglock o/
20:11 skyheights joined #perl6
20:21 az5112 joined #perl6
20:32 overrosy joined #perl6
20:34 Trashlord joined #perl6
20:35 masak we should get a milestone to look forward to. like we had with the first Rakudo Star release.
20:38 bacek joined #perl6
20:39 sorear o/ masak
20:40 sorear o/ bacek
20:42 sromanov joined #perl6
20:44 masak sorear: \o
20:50 sorear niecza: say Order::Increase.WHAT # colomon
20:50 p6eval niecza v13-98-g88c4694: OUTPUT«Int()␤»
20:50 colomon sorear: yearh, I know
20:51 colomon it works okay as a first approximation, but it's definitely wrong
20:51 colomon any suggestions how to fix it?
20:51 * masak .oO( implement enums )
20:52 sromanov joined #perl6
20:53 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
20:53 masak we should get a sorear clone for Rakudo, too ;)
20:54 [Coke] jnthn will be back shortly, calm down.
20:56 sorear colomon: once $_enums is set up correctly, you can use Order.(-1), etc to get at the actual enum values
20:57 colomon sorear: will that work for the constant values?
20:57 sorear yes, if you can get the ordering right
20:57 sorear $_enums needs to be set up before the constants are declared
20:57 sorear which probably means that Order needs to be moved after EnumMap
20:58 sorear which might require a package stub at the top, and/or using ::Order::Increase syntax
20:58 colomon Order is after EnumMap
21:00 masak niecza: my $r = 3..*; say "This still hangs: $r"; say "alive"
21:00 masak sorear: ^^
21:00 p6eval niecza v13-98-g88c4694: OUTPUT«(timeout)»
21:00 sorear that's by design
21:00 benabik nom: my $r = 3..*; say "Does this hang? $r"; say 'alive'
21:00 p6eval nom 1c74c7: OUTPUT«Does this hang? ...␤alive␤»
21:01 masak sorear: because it listifies?
21:01 sorear yes
21:01 sorear you're interpolating an infinite list
21:01 masak does the spec say that stringifying a range interpolates it as a list?
21:01 benabik '3..*' stringifies to '...' in nom?
21:02 masak I would be more happy with it simply stringifying to "3..*", to be honest.
21:02 [Coke] +1
21:02 sorear not sure, I think co* added that
21:02 masak if I wanted a list, I'd have used an array :)
21:02 snearch joined #perl6
21:02 masak yes, it's a recent change.
21:03 [Coke] nom: my $a = "this\nis\fun".indent(20).say
21:03 masak ranges used to stringify to "$from..$to" in Niecza.
21:03 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␤»
21:03 [Coke] argh, guess I can't just copy rakudo's version :P
21:03 colomon sorear: did you mean Order.from-index(-1) instead of Order.(-1)?
21:03 benabik nom: my $w = *; say "$w" # curious
21:03 p6eval nom 1c74c7: OUTPUT«Whatever<3637376436775806753>␤»
21:03 sorear colomon: no
21:03 masak b: my $a = "this\nis\fun".indent(20).say
21:04 p6eval b 1b7dd1: OUTPUT«                    this␤                    is                    un␤»
21:04 masak o.O
21:04 colomon sorear: postcircumfix:<( )> ($key)  # not value
21:04 sorear colomon: if you wanted to use .from-index, it would work, but you'd need to use (0)
21:05 sorear colomon: _lookup: %!by-key{$w} // %!by-value{$w} // die
21:06 [Coke] masak: ah, just need to steal from the right place!
21:08 masak 'xactly
21:08 colomon sorear: this is what I've got now, and the error it gives me: https://gist.github.com/1562148
21:08 masak b still packs a punch... but it'll never have macros ;)
21:09 [Coke] in git, b== ng?
21:09 snearch joined #perl6
21:10 colomon [Coke]: yes
21:11 snearch joined #perl6
21:11 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? :)
21:12 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?
21:12 sorear I think you could even go so far as to replace the our-var with another constant
21:13 colomon which is an EnumMap?
21:13 sorear yes
21:13 sorear nom: say Increase
21:13 p6eval nom 1c74c7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Increase' called (line 1)␤»
21:14 masak sorear: Rakudo doesn't have Order:: yet
21:14 sorear oh
21:14 colomon my constant $_enums = EnumMap.new("Increase" => -1, "Same" => 0, "Decrease" => 1);
21:14 colomon gets me the same error.  :(
21:14 sorear do you think Increase should be visible without Order::?
21:15 colomon sorear: my first instinct is no, Increase and Decrease sound like potential function names to me.
21:18 sorear colomon: my next guess is that Order.() fails because Order's MRO isn't configured before the }
21:18 sorear perhaps our constant Order::Increase = ... outside the block would work better
21:19 colomon Malformed constant at /Users/colomon/tools/niecza/lib/CORE.setting line 2184:
21:19 colomon ------> our constant Order⏏::Increase = Order.("Increase");
21:21 sorear ... bah
21:21 sorear "I'll just have to do it correctly then"
21:21 sorear (I mean, fixing enum to properly use BEGIN)
21:22 colomon sorear++
21:28 masak sorear: yes, they should. by the same token that True and False are visible outside of Bool.
21:28 masak sorear: however, they are subject to the same rules as other enum values.
21:29 masak i.e. two enum values "poison" the slot; a subroutine always hides any enum values.
21:29 masak (see S12)
21:32 colomon H
21:32 colomon *ah
21:34 masak the poisoning semantics hasn't been implemented anywhere yet. will be interesting to see how it works out in practice.
21:34 masak it has a bit of that "cute today" feel :)
21:44 [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…
21:51 [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:59 colomon [Coke]: fixing that one right now.
22:00 [Coke] ah, nice. will make it easier to copy rakudo b's indent code.
22:02 colomon where are those tests?
22:02 colomon the [min] [max] ones, I mean
22:03 donaldh joined #perl6
22:03 silug joined #perl6
22:03 colomon niecza> say [min] (10,12,13)
22:03 colomon 10
22:04 [Coke] colomon: Iunno; I was testing it because I got an error compiling the cribbed "indent"
22:05 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.
22:06 colomon minmax.t
22:09 colomon spectesting...
22:12 [Coke] nom: 3.fmt("%s").say
22:12 p6eval nom 1c74c7: OUTPUT«3␤»
22:12 [Coke] niecza: 3.fmt("%s").say
22:12 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…
22:12 [Coke] niecza: "2".fmt("%s").say
22:12 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…
22:14 [Coke] (missing Int.fmt is 32 tests of S32-str/indent.t)
22:17 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…
22:21 dalek roast: 17c6249 | (Solomon Foster)++ | S (2 files):
22:21 dalek roast: Refudge for niecza.
22:21 dalek roast: review: https://github.com/perl6/roast/commit/17c6249eb4
22:21 dalek niecza: e093be5 | (Solomon Foster)++ | lib/CORE.setting:
22:21 dalek niecza: Allow infix:<max> and infix<min> to handle any number of arguments.
22:21 dalek niecza: review: https://github.com/sorear/niecza/commit/e093be5941
22:22 masak nom: say 4..7
22:22 p6eval nom 1c74c7: OUTPUT«4..7␤»
22:22 colomon [Coke]: we lost one dodgy min/max test, and gained 10 or so that didn't use to work
22:23 [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"? :)
22:23 [Coke] given that we were running that, I'm sure sorear would rather it was not fudged/hidden.
22:23 [Coke] er, "however, given..."
22:23 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.
22:25 colomon [Coke], sorear: The test we lost was isnt @a min 4, 1, 'NYS'; where NYS is "not yes spec'd"
22:27 sorear masak: yes, I was saying someone else implemented it
22:29 [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?
22:30 [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 [Coke] (ignore everything after the :)
22:30 [Coke] http://feather.perl6.nl/~coke/niecza.txt
22:31 [Coke] Any general issues with the patch?
22:32 [Coke] (that's 26 more tests.)
22:32 [Coke] (more if we get Int.fmt)
22:32 [Coke] er, 25.
22:33 [Coke] 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.
22:34 masak sorear: sounds good to me.
22:34 masak I'm going to bed now, otherwise I'd ask how to run the spectests on Neicza :)
22:34 sorear "make spectest"
22:34 pjcj joined #perl6
22:35 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 masak I'm just arguing that Rakudo gets it right in this case.
22:35 masak I'd be happy to dispute any spectests that claim otherwise ;)
22:35 masak 'night, #perl6
22:35 sorear niecza: { say CALLER::<$?TABSTOP> // 8 }
22:35 p6eval niecza v13-98-g88c4694: OUTPUT«8␤»
22:35 sorear 'night
22:35 sorear niecza: sub foo() { say CALLER::<$?TABSTOP> // 8 }; constant $?TABSTOP = 5; say foo
22:36 p6eval niecza v13-98-g88c4694: OUTPUT«5␤Bool::True␤»
22:36 sorear [Coke]: ^^^
22:36 [Coke] fixing...
22:37 sorear [Coke]: otherwise I don't see anything bad
22:37 sorear maybe a # TODO: use a multi once 'where' is working
22:37 [Coke] sorear: Roger.
22:38 [Coke] diff updated.
22:39 [Coke] running a spectest now.
22:39 [Coke] rakudo++
22:39 sorear niecza: say EnumMap.new(:Increase(-1), :Same(0), :Decrease(1)).hash.perl
22:39 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 …
22:39 sorear niecza: say EnumMap.new((:Increase(-1), :Same(0), :Decrease(1))).hash.perl
22:39 p6eval niecza v13-98-g88c4694: OUTPUT«{"Decrease" => 2, "Increase" => 0, "Same" => 1}.hash␤»
22:39 colomon [Coke]:  looking at .fmt now
22:39 [Coke] I assume this is all cool from a licensing/copyright perspective, yes?
22:40 sorear yes, rakudo and niecza both use the Artistic-2.0 license
22:41 sorear I think "git blame" is good enough for tracking attributions, mention Rakudo in the commit message
22:41 [Coke] \o/
22:41 [Coke] Aye.
22:42 hundskatt joined #perl6
22:42 az5112 joined #perl6
22:43 Trashlord joined #perl6
22:51 colomon niecza: say (1, 2, 3).WHAT
22:51 p6eval niecza v13-98-g88c4694: OUTPUT«Parcel()␤»
22:57 colomon niecza: say "%s:%d"
22:58 p6eval niecza v13-98-g88c4694: OUTPUT«%s:%d␤»
22:59 colomon nom: say (a => 5).fmt("%s:%d")
22:59 p6eval nom 1c74c7: OUTPUT«a:5␤»
23:07 colomon [Coke]: it's going to be a bit, lots of little .fmt functions all around, and dinner / childcare interfering
23:08 * geekosaur imagines .fmt functions in diapers running around the place
23:19 dalek niecza: 21988b3 | sorear++ | lib/ (5 files):
23:19 dalek niecza: Implement role autopunning, role ACCEPTS/defined special cases, foo ~~ A works now
23:19 dalek niecza: review: https://github.com/sorear/niecza/commit/21988b363f
23:33 sorear rakudo: say Parcel.^roles
23:33 p6eval rakudo 1c74c7: OUTPUT«Positional()␤»
23:33 sorear rakudo: say Nil.^roles
23:33 p6eval rakudo 1c74c7: OUTPUT«␤»
23:33 sorear rakudo: say Nil.^roles(:all)
23:34 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
23:34 p6eval rakudo 1c74c7: OUTPUT«Iterator() Iterable() Cool() Any() Mu()␤»
23:36 sorear rakudo: say Range.^roles
23:36 p6eval rakudo 1c74c7: OUTPUT«Positional()␤»
23:41 spine joined #perl6
23:47 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 #perl6

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

Perl 6 | Reference Documentation | Rakudo