Camelia, the Perl 6 bug

IRC log for #perl6, 2012-01-03

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 thou nom: https://gist.github.com/1552700
00:00 p6eval nom ea0311: OUTPUT«Cannot assign to a readonly variable or a value␤  in submethod BUILD at /tmp/wd3O8dAXzG:9␤  in method BUILDALL at src/gen/CORE.setting:580␤  in method bless at src/gen/CORE.setting:570␤  in method new at src/gen/CORE.setting:555␤  in method dispatch:<.=> at src/gen/CO…
00:00 thou probably something simple, but S12 is short on exposition here.
00:01 benabik Cannot assign to a readonly variable?
00:03 thou right, but the only assignment I'm seeing is %words{$.word} = self; and I didn't think that's ro
00:03 benabik It might be the :$.word and :@.synonyms.
00:03 thou or is it a problem with the sub's signature (:$.word)?
00:03 benabik But oh, look at my wrist, I've got to go.
00:03 benabik afk &
00:04 thou bye
00:04 TimToady try :$!word instead
00:04 TimToady there's no virtual method till the BUILD is done
00:04 TimToady *BUILDALL
00:10 molaf_ joined #perl6
00:11 thou hmmm, that got me farther. now i'm hitting something with the our %words member not being initialized: Method 'at_key' not found for invocant of class 'Any' in method postcircumfix:<{ }>
00:12 thou if i try to initialize it like our %words = {}, I get:  Method 'STORE' not found for invocant of class 'Any'
00:13 thou hmmm, moved it out of the class definition and used my scoping and it got past that
00:13 thou now i think that nom isn't implementing method ^find syntax
00:13 thou but that's OK
00:18 thou nom: https://gist.github.com/1552700
00:18 p6eval nom ea0311: OUTPUT«Vocab BUILD(): Array.new()().hash␤Vocab.new(word => "car", synonyms => Array+{TypedArray}.new("auto", "vehicle"))␤»
00:19 drbean joined #perl6
00:23 packetknife joined #perl6
00:23 kshannon nom https://gist.github.com/1552773
00:24 kshannon nom: https://gist.github.com/1552773
00:24 p6eval nom ea0311: OUTPUT«Vocab BUILD(): Array.new()().hash␤Vocab.new(word => "car", synonyms => Array+{TypedArray}.new("auto", "vehicle"))␤»
00:28 raiph joined #perl6
00:28 cognominal I did not know that one could pass a gist to p6eval!
00:32 colomon cognominal: it's a new-ish feature
00:34 kshannon there's even a patch to allow passing a link to a github blob, but that's not yet running on p6eval
00:37 colomon nom: say 4 cmp 6
00:37 p6eval nom ea0311: OUTPUT«-1␤»
00:38 drbean joined #perl6
00:38 cognominal how to invite p6eval on a irc.perl.org channel. I think it will be soon time to prozelitise perl6 in #perlfr
00:39 cognominal or prozelitaze?  using Pavlovian methods
00:40 cognominal or taser takes a s.
00:41 cognominal probably the zap world induced the mistake.
00:45 sorear cognominal: taser = Thomas A. Smith's Electric Rifle
00:45 sorear it's not a normal word, so it's not useful as a guideline
00:45 colomon sorear: I've got patches for sort and infix:<cmp> in testing here.
00:45 sorear my dictionary lists "proselyti[zs]e"
00:46 sorear colomon: do they dup e6a9ddc?
00:46 colomon hmm... is that last British versus American?
00:47 kshannon perl6: my $key = "key"; my $val = "val"; say ":$key\($name)"
00:47 p6eval niecza v13-51-gd921607: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $name is not predeclared at /tmp/UurKfjBIMd line 1:â�¤------> [32my = "key"; my $val = "val"; say ":$key\([33mâ��[31m$name)"[0mâ�¤â�¤Potential difficulties:â�¤  $val is declared but not used at /tmp/UurKfjBIMd line 1:â�¤---…
00:47 p6eval ..rakudo ea0311: OUTPUT«===SORRY!===␤Variable $name is not predeclared at line 1, near ")\""␤»
00:47 p6eval ..pugs b927740: OUTPUT«*** Undeclared variable: ("$name",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0x7ff14adfd5b9>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0x7ff14adffc89>}),("@_",PELexical {pe_type = (mkType "Array"), pe_pro…
00:47 kshannon perl6: my $key = "key"; my $val = "val"; say ":$key\($val)"
00:47 p6eval pugs b927740, niecza v13-51-gd921607: OUTPUT«:key(val)␤»
00:47 p6eval ..rakudo ea0311: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Str'␤  in <anon> at src/gen/Metamodel.pm:3363␤  in block <anon> at /tmp/vVadFaiq6I:1␤  in <anon> at /tmp/vVadFaiq6I:1␤»
00:48 kshannon rakudo-- :(
00:48 colomon sorear: what's e6a9ddc?  (sorry, github going very slow for me...)
00:49 sorear colomon: fixes sort to actually sort lists of numbers
00:50 colomon ah, I see.  it does not dup e6a9ddc, it's on top of it
00:51 dalek niecza: 2700e66 | (Solomon Foster)++ | lib/CORE.setting:
00:51 dalek niecza: Don't go through the hassle of sorting properly only to throw away those results with a second, improper sort.
00:51 dalek niecza: review: https://github.com/sorear/niecza/commit/2700e66220
00:51 dalek niecza: ec38c2f | (Solomon Foster)++ | lib/CORE.setting:
00:51 dalek niecza: Make infix:<cmp> honor +-Inf compared with non-Numeric.
00:51 dalek niecza: review: https://github.com/sorear/niecza/commit/ec38c2ff36
00:52 sorear &sort could be simplified a bit with if @values && @values[0] ~~ Callable {
00:53 vlkv joined #perl6
01:04 colomon indeed
01:04 colomon shall I?
01:11 drbean joined #perl6
01:15 raiph would #perl6 be willing to mentor me in (looking at) enabling P6 grammars to be plugged in to https://github.com/github/markup?
01:18 jferrero joined #perl6
01:20 colomon sorear: spectesting your suggested cleanup
01:26 raiph github markup scripts are mostly ruby, but they are open to scripts in other langs
01:27 raiph would require persuading github to install a P6 compiler
01:30 colomon raiph: probably people here would be willing to help... but I'm guessing most people who know how are asleep at the moment.  :)
01:30 raiph colomon: gotcha.
01:32 raiph so, step1 i'm hoping for is to get a P6 engine onto the github servers, and at least one markup
01:33 sorear I'm awake but not really willing to help
01:33 raiph sorear: understood.
01:34 sorear (because I think it would be a bad idea)
01:34 sorear colomon: how did the spectest go?
01:35 colomon great.  guess I forgot to push and went straight to the "unfudging tests that now pass" mode.
01:35 colomon errr... forgot to commit locally, too
01:36 dalek niecza: e27d9b7 | (Solomon Foster)++ | lib/CORE.setting:
01:36 dalek niecza: Clean up sub sort as per sorear++.
01:36 dalek niecza: review: https://github.com/sorear/niecza/commit/e27d9b738a
01:39 dalek roast: 5f4bc5d | (Solomon Foster)++ | S32-hash/kv.t:
01:39 dalek roast: Unfudge tests which now work.
01:39 dalek roast: review: https://github.com/perl6/roast/commit/5f4bc5d1b4
01:40 * geekosaur does wonder if a language that's *that* hard to do semantic markup for (e.g. syntax coloring) is all that good an idea
01:42 geekosaur (that reads oddly.  mixing levels, wheee)
01:42 raiph sorear: bad idea P6 engine on github? (bugs->bad pr?) or P6 markups? (slow->bad pr?) spend time trying? (too early?) spend time mentoring me? (i'm slow) something else?
01:46 dalek roast: 06f52cf | (Solomon Foster)++ | / (2 files):
01:46 dalek roast: Unfudge tests which now work.
01:46 dalek roast: review: https://github.com/perl6/roast/commit/06f52cf9e4
01:46 raiph geekosaur: P6?
01:48 geekosaur raiph, yes, p6 is very difficult to do syntax coloring for, is the core problem.  the only reliable syntax colorers are apparently quite slow
01:49 sorear raiph: I think it would be a major drain on resources -> bad pr, yes
01:49 sorear I suppose it's not such a big deal since there are so few p6 projects
01:49 geekosaur so either it's really slow or really crappy --> not a good thing on e.g. github.  although I'd argue lack of syntax coloring is equally not an advertisement
01:51 colomon perl6: say 42.sort
01:51 p6eval pugs b927740, rakudo ea0311, niecza v13-53-gec38c2f: OUTPUT«42␤»
01:53 colomon perl6: say 42.sort.perl
01:53 p6eval pugs b927740, rakudo ea0311: OUTPUT«(42,)␤»
01:53 p6eval ..niecza v13-53-gec38c2f: OUTPUT«(42, ).list␤»
01:57 dalek roast: 48814de | (Solomon Foster)++ | S32-list/sort.t:
01:57 dalek roast: Fix tests to match pmichaud's comment, not to mention the behavior of every major compiler.  Also fudge for niecza.
01:57 dalek roast: review: https://github.com/perl6/roast/commit/48814de7b7
01:58 raiph can you imagine a plausible scenario where P6 markup scripts run OK on github? imagine means you can project a couple years into the future, etc. plausible means no miracles required.
01:58 dalek niecza: c001b3f | (Solomon Foster)++ | t/spectest.data:
01:58 dalek niecza: Turn on S32-list/sort.t.
01:58 dalek niecza: review: https://github.com/sorear/niecza/commit/c001b3f655
01:59 dalek niecza: 6fe85ab | coke++ | t/fudgeandrun:
01:59 dalek niecza: Allow "t/fudgeandrun <section>/<file>.t"
01:59 dalek niecza:
01:59 dalek niecza: We refer to spec tests a lot without the full path of "t/spec/..." -
01:59 dalek niecza: allow fudgeandrun to run a test either with the full path, or the
01:59 dalek niecza: relative path from the top of the spec dir.
01:59 dalek niecza: review: https://github.com/sorear/niecza/commit/6fe85abd6b
02:03 shinobicl_ joined #perl6
02:11 dalek roast: 7d6f8d4 | (Solomon Foster)++ | S02-types/array_ref.t:
02:11 dalek roast: Fudge for niecza.
02:11 dalek roast: review: https://github.com/perl6/roast/commit/7d6f8d4f69
02:14 dalek niecza: f5100f5 | (Solomon Foster)++ | t/spectest.data:
02:14 dalek niecza: Turn on S02-types/array_ref.t.
02:14 dalek niecza: review: https://github.com/sorear/niecza/commit/f5100f5301
02:18 dalek roast: ba1504f | (Solomon Foster)++ | S03-operators/identity.t:
02:18 dalek roast: Fudge for niecza.
02:18 dalek roast: review: https://github.com/perl6/roast/commit/ba1504f3fc
02:18 dalek niecza: 6323692 | (Solomon Foster)++ | t/spectest.data:
02:18 dalek niecza: Turn on S03-operators/identity.t.
02:18 dalek niecza: review: https://github.com/sorear/niecza/commit/6323692fdf
02:22 raiph (I have no money or server expertise, but...) what about a P6 server? Job 1. Host a "production quality" P6. Job 2. Host and execute P6 markups (which, eg. a github markup could use, reaching across the net). Job 3. Github subset (eg only open) w/ P6 flavor. Job 4. P6 equivalent of gollum. Job 5. Make itself redundant because it's ready to be ported back to Github.
02:23 raiph by "production quality" i mean whatever gets put up. either it will work (execute the markups) or not. if it does, it's production quality. if it doesn't, fix either the markup or compiler.
02:24 raiph assume more than one compiler is on the server. each script version identifies which compiler version it uses.
02:29 tokuhirom joined #perl6
02:33 shinobicl_ left #perl6
02:46 am0c joined #perl6
02:49 dalek Heuristic branch merge: pushed 140 commits to rakudo/str-numeric by japhb
02:49 [Coke] sorear, colomon: t/fudgeandrun integration/advent2009-day14.t # this works now.
02:50 japhb dalek++ # Recognizing a branch merge
02:50 japhb dalek-- # Not recognizing what branch was merged
02:52 sorear japhb: it works by detecting pushes of more than 15 commits at once, and suppressing the food
02:53 [Coke] japhb: https://github.com/sorear/dalek-​poller/blob/master/push.psgi#L44
02:54 [Coke] (that's the place to try to make it smarter)
02:56 japhb sorear, [Coke]: Ah, I see.  Fair enough.
03:01 japhb Which quotes are recognized without a Q variant by default?  Just "", '', <>, <<>>, and «» ?  Or am I missing something?
03:05 sorear maybe also //, depending on definitions
03:05 sorear (officially it's not a quote, but it's parsed by quote:sym</ />)
03:06 JimmyZ joined #perl6
03:06 japhb sorear, Ah, yes, I understand your point, but that indeed was not what I meant.
03:06 sorear do you count quasi { } ?
03:06 japhb No, because that has an introducer.
03:07 sorear #`( ) ?
03:07 japhb (But you're right, quasi !~ Q)
03:07 japhb Oooh, that one I'd forgotten.
03:22 dalek roast: b18f125 | (Solomon Foster)++ | integration/99problems-11-to-20.t:
03:22 dalek roast: Fudge for niecza, clean up file a bit.
03:22 dalek roast: review: https://github.com/perl6/roast/commit/b18f1252c4
03:24 dalek niecza: 45a95ed | (Solomon Foster)++ | t/spectest.data:
03:24 dalek niecza: Turn on integration/99problems-11-to-20.t.
03:24 dalek niecza: review: https://github.com/sorear/niecza/commit/45a95edd58
03:29 somep6user joined #perl6
03:30 colomon sorear, japhb: ping/
03:30 colomon ?
03:30 japhb pong
03:31 colomon just looking for a quick sanity check
03:32 colomon I'm looking at this code in roast:
03:32 colomon https://gist.github.com/1553342
03:32 [Coke] https://gist.github.com/1476841 - niecza up to 87.41% against rakudo.
03:32 colomon [Coke]++
03:33 colomon japhb: I totally agree with niecza here: I don't see how mirror(Mu, Mu) matches any of the given mirror multis.
03:34 colomon japhb: am I crazy?
03:35 colomon perl6: multi sub mirror(Any:U $a, Any:U $b) { say "boo"; }; mirror(Mu, Mu)
03:35 p6eval pugs b927740: OUTPUT«*** No such subroutine: "&Mu"␤    at /tmp/6LJQrnO9QE line 1, column 61-63␤»
03:35 p6eval ..rakudo ea0311: OUTPUT«No applicable candidates found to dispatch to for 'mirror'. Available candidates are:␤:(Any $a, Any $b)␤␤  in block <anon> at /tmp/fdnx7sH1tZ:1␤  in <anon> at /tmp/fdnx7sH1tZ:1␤»
03:35 p6eval ..niecza v13-56-g6fe85ab: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/XpnTQbdZrk line 1:â�¤------> [32mmulti sub mirror(Any:U [33mâ��[31m$a, Any:U $b) { say "boo"; }; mirror(Mu,[0mâ�¤  $b is declared but not used at /tmp/XpnTQbdZrk line 1:â�¤------> [32mmulti sub mir…
03:35 japhb If I understand you, I don't think you're crazy.
03:36 japhb Unless there is another multi somewhere else, (Mu, Mu) shouldn't dispatch
03:36 tokuhirom joined #perl6
03:36 colomon japhb++: thanks for the second opinion.
03:36 japhb And it looks like neither Rakudo or Niecza tries to ... so I'm assuming the point is that the test is wrong?
03:36 colomon that's what I'm thinking
03:36 japhb yeah
03:37 japhb Apropos of which, I was wishing earlier to have a spec-accurate visual map of all of the specced classes and roles.
03:38 colomon changing the Anys to Mus makes it work just fine
03:38 colomon +1 # map
03:38 Psyche^ joined #perl6
03:39 japhb Oh bother, I think I need to go AFK for a bit now.  Dangit, I was just getting a hacking groove on, too.
03:42 achromic joined #perl6
03:43 dalek roast: 9d281d5 | (Solomon Foster)++ | integration/99problems-51-to-60.t:
03:43 dalek roast: A few changes to match current spec, plus fudging for Niecza.
03:43 dalek roast: review: https://github.com/perl6/roast/commit/9d281d52d2
03:44 colomon [Coke]: how many tests to hit 90%?  ;)
03:45 dalek niecza: a658ef8 | (Solomon Foster)++ | t/spectest.data:
03:45 dalek niecza: Turn on integration/99problems-51-to-60.t.
03:45 dalek niecza: review: https://github.com/sorear/niecza/commit/a658ef8e10
03:46 orafu joined #perl6
03:51 [Coke] colomon: assuming no advance by rakudo: 477 more tests.
03:53 [Coke] which doesn't include a658ef8
03:53 [Coke] Once jnthn++ comes back, this is going to get harder. ;)
04:00 orafu joined #perl6
04:02 colomon Seems like about 20 more .t files and we'll hit 90%...
04:27 pat_js joined #perl6
04:51 lestrrat joined #perl6
04:51 dalek roast: 3e05f29 | kshannon++ | integration/99problems-51-to-60.t:
04:51 dalek roast: Another change to match current spec
04:51 dalek roast: review: https://github.com/perl6/roast/commit/3e05f29b35
05:10 kshannon Hmmm.  rakudo nom is currently skipping 1932 tests in roast...
05:11 thou joined #perl6
05:11 kshannon plus 59 test files
05:38 replore joined #perl6
06:01 kaleem joined #perl6
07:02 kaleem joined #perl6
07:20 achromic left #perl6
07:20 Timbus so i just made this
07:20 wtw joined #perl6
07:20 Timbus http://pastebin.com/h7estxrt
07:20 Timbus im not even sure how
07:25 sorear Timbus: add it to http://rosettacode.org/wiki/S​orting_algorithms/Sleep_sort
07:26 Timbus yeah i got told about sleep sort a few minutes ago showing someone else
07:26 Timbus does it count though?
07:27 Timbus i was just messing with coro to see if the scheduler was cyclic and then i was like 'heeey..'
07:29 geekosaur o.O
07:32 masak morning, #perl6
07:33 masak Timbus++ # crazy
07:33 Timbus thanks :>
07:34 Timbus my rube goldberg sorting device
07:39 sorear good mornign masak!
07:41 masak morgordign sorear!
07:45 frettled dingding?  Morningding.
08:00 * masak .oO( after a while, even the thought patterns of Pavlov's dog changed for the worse )
08:04 masak huh, interesting coincidence -- cognominal mentions Pavlov in the backlog.
08:05 masak maybe I happened to pick up some latent mental traces of it from the channel...
08:08 baest joined #perl6
08:08 jakky joined #perl6
08:13 jakky left #perl6
08:14 masak or maybe some external stimulus made us all think about Pavlov ;)
08:15 * geekosaur decides not to chime in :p
08:16 masak heh :)
08:16 geekosaur (the real question is whose keyboards got wet)
08:20 icwiener joined #perl6
08:29 icwiener joined #perl6
08:33 mj41 joined #perl6
08:34 fhelmberger joined #perl6
08:48 owlEyes joined #perl6
08:58 tokuhirom joined #perl6
09:06 gfldex joined #perl6
09:10 Mowah joined #perl6
09:14 masak hah!
09:14 masak found the Niecza hang I suffered from last week :)
09:15 masak niecza: say 3..*; die 3..*; say "alive"
09:15 p6eval niecza v13-56-g6fe85ab: OUTPUT«(timeout)3..Inf␤»
09:15 masak niecza: say "these are not the droids you are looking for"; die 3..*; say "alive"
09:15 p6eval niecza v13-56-g6fe85ab: OUTPUT«(timeout)these are not the droids you are looking for␤»
09:15 masak seems it hangs trying to output the range in the die message.
09:16 * masak submits nieczabug
09:24 SHODAN joined #perl6
09:25 cognominal joined #perl6
09:29 sayu joined #perl6
09:34 masak ...and yay, all tests pass again!
09:34 masak (in my application)
09:37 tadzik good morning #perl6
09:37 masak ding!
09:37 masak I mean, um, good morning :)
09:42 daxim joined #perl6
09:51 Trashlord joined #perl6
10:52 nwc10 joined #perl6
10:56 vlkv joined #perl6
11:00 am0c joined #perl6
11:05 mj41 joined #perl6
11:21 MayDaniel joined #perl6
11:22 MayDaniel joined #perl6
12:03 Chillance joined #perl6
12:08 masak quiet day here today.
12:09 colomon o/
12:10 geekosaur everyone's slobbered out?
12:12 masak on a Tuesday?
12:13 colomon there were a lot of college football bowl games yesterday....
12:13 * colomon suspects he might be the only one on the channel who actually watched them.  ;)
12:14 meraxes_ joined #perl6
12:17 arnsholt Us Europeans usually don't follow American hand-egg =)
12:20 masak some of us don't follow football of any sort. :)
12:20 daxim is it worldcup yet?
12:26 colomon surely Array.delete is no longer supposed to take negative arguments?  (looking at S32-array/delete.t)
12:26 geekosaur qualifying already in full swing hereabouts (mostly because CONCACAF has 100+ tiny island nations)
12:27 * geekosaur pays little attention to gridball
12:29 snearch joined #perl6
12:29 colomon b: my @a = 1..10; @a.delete(3); say @a.perl
12:29 p6eval b 1b7dd1: OUTPUT«[1, 2, 3, Any, 5, 6, 7, 8, 9, 10]␤»
12:29 han_ joined #perl6
12:29 colomon nom: my @a = 1..10; @a.delete(3); say @a.perl
12:29 p6eval nom ea0311: OUTPUT«Method 'delete' not found for invocant of class 'Array'␤  in block <anon> at /tmp/Xn65giN9s_:1␤  in <anon> at /tmp/Xn65giN9s_:1␤»
12:31 han_ :)
12:31 nwc10 left #perl6
12:31 masak han_: \o
12:31 bluescreen10 joined #perl6
12:31 LlamaRider joined #perl6
12:32 masak nice summary of Perl 5 activity during 2010: http://onionstand.blogspot.co​m/2012/01/perls-of-2011.html
12:32 masak Perl 5 is certainly alive and well.
12:32 masak I wonder what was its low point, in terms of commit activity and general interest.
12:33 LlamaRider waiting for Perl 6 probably :)
12:33 masak possibly.
12:33 masak but when was that? 2001? 2002?
12:33 masak or maybe even that is a myth, and Perl 5 never had a low point in practice.
12:34 masak colomon: shall I submit that as a rakudobug?
12:34 colomon masak: missing delete?  sure
12:34 colomon I'm going to fix the tests to use *-1 instead of -1 (etc)
12:35 LlamaRider is there a shorthand for "defined $a && &a == $b" ?
12:35 LlamaRider i guess " $a //&& $b" is too ugly already
12:35 * masak submits rakudobug
12:36 masak colomon++
12:38 LlamaRider and yet again, pls disregard my question
12:41 masak :)
12:48 colomon btw, github++ -- made it really easy to go back to the ng branch and find the old source code for delete.
12:48 colomon perl6: my @a = 1, 2, Any, 3; say @a
12:48 p6eval pugs b927740: OUTPUT«12Any3␤»
12:48 p6eval ..niecza v13-56-g6fe85ab: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 807 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 171 (Mu.Str @ 10) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting…
12:48 p6eval ..rakudo ea0311: OUTPUT«use of uninitialized value of type Any in string context␤1 2  3␤»
12:54 masak yeah, github++
12:54 masak git makes software development a breeze. github makes it even better.
12:55 colomon kind of strange to be debugging the code and the tests at the same time.  :)
12:57 alim joined #perl6
12:57 LlamaRider rakudo: sub pp {$^a++; say $^a;}; my $a = [0,1]; pp($a[0]);
12:57 p6eval rakudo ea0311: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub postfix:<++> at src/gen/CORE.setting:2472␤  in sub pp at /tmp/IohzfjraL6:1␤  in block <anon> at /tmp/IohzfjraL6:1␤  in <anon> at /tmp/IohzfjraL6:1␤»
12:58 LlamaRider how do I pass by value, so that i can $a++ ?
13:02 dalek roast: 6afbdbc | (Solomon Foster)++ | S32-array/delete.t:
13:02 dalek roast: Rewrite tests to use *-N instead of -N and not rely on the default the stringification of Any.  Fudge for Niecza.
13:02 dalek roast: review: https://github.com/perl6/roast/commit/6afbdbce7b
13:02 masak rakudo: sub pp($a is copy) { $a++; say $a }; pp(42)
13:02 p6eval rakudo ea0311: OUTPUT«43␤»
13:03 masak LlamaRider: like that.
13:03 LlamaRider is copy! awesome
13:03 masak :)
13:03 masak it makes a copy of the value, and puts it into your very own container.
13:04 LlamaRider exactly what i wanted, thanks. I'm a bit ashamed i didn't find it in S06 when looking.
13:08 masak it's in there, but so is a lot of other stuff ;)
13:09 masak LlamaRider: so, which task are you currently working on? ;)
13:10 LlamaRider i was refactoring t2, but that was done some time back, today i'm trying to finish t3 :)
13:10 LlamaRider going slowly and trying to learn what is behind the phrase "idiomatic perl6" :)
13:11 masak \o/
13:12 masak it may be a good idea to go through last year's submissions, and the comments on those: http://strangelyconsistent.org/p6cc2010/
13:12 dalek niecza: 5fd7180 | (Solomon Foster)++ | lib/CORE.setting:
13:12 dalek niecza: Add Array.delete.
13:12 dalek niecza: review: https://github.com/sorear/niecza/commit/5fd7180983
13:12 dalek niecza: 4161dec | (Solomon Foster)++ | t/spectest.data:
13:12 dalek niecza: Turn on S32-array/delete.t.
13:12 dalek niecza: review: https://github.com/sorear/niecza/commit/4161dec073
13:12 LlamaRider woah, secret knowledge :)
13:12 masak there are a bunch of hints there about what is considered "idiomatic Perl 6".
13:12 masak yah, open secret knowledge :)
13:13 LlamaRider thanks, will give it a read
13:16 mtk joined #perl6
13:25 masak niecza: sub foo { LEAVE say "yay, LEAVE works!" }; foo
13:25 p6eval niecza v13-56-g6fe85ab: OUTPUT«yay, LEAVE works!␤»
13:25 masak yay!
13:27 masak niecza: class Resource { method acquire { say "Resource acquired"; self.new }; method discard { say "Resource discarded" } }; sub foo { my Resource $r .= acquire; LEAVE $r.discard; say "some distracting, intermediate stuff" }; foo
13:27 p6eval niecza v13-56-g6fe85ab: OUTPUT«Resource acquired␤some distracting, intermediate stuff␤Resource discarded␤»
13:27 masak \o/
13:27 kaleem joined #perl6
13:28 * [Coke] yawns, first day back at work in 11 days.
13:28 masak niecza: class Resource { method acquire { say "Resource acquired"; self.new }; method discard { say "Resource discarded" } }; sub foo { my Resource $r will leave { .discard } .= acquire; say "some distracting, intermediate stuff" }; foo
13:28 p6eval niecza v13-56-g6fe85ab: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Trait leave not available on variables at /tmp/_elzGkaHZP line 1:â�¤------> [32m my Resource $r will leave { .discard } [33mâ��[31m.= acquire; say "some distracting, inter[0mâ�¤â�¤Potential difficulties:â�¤  $r is declared but not…
13:28 masak aww :)
13:29 masak still. Niecza has LEAVE. wootness.
13:29 masak it is *good* to be living in 2012 :)
13:31 [Coke] that sudoku ticket appears to at least chew all the memory.
13:31 proller joined #perl6
13:37 Timbus does perl 6 have the moose 'trigger'
13:39 Timbus as in, a method you can add to an attribute that will be triggered when the attribute is changed
13:40 masak there's .STORE
13:41 Timbus hmmm
13:41 masak I guess you could also write your own attribute metaobject.
13:42 kshannon or if you're talking about public access,  just wrap the accessor method (or write your own)
13:43 masak aye.
13:43 masak nom: class C { has $.a = 42; method a { "custom accessor" } }; say C.new.a
13:44 masak p6eval?
13:44 * Timbus taps monitor
13:45 Timbus oh, no the internets haven't paused :v
13:45 p6eval nom ea0311: OUTPUT«custom accessor␤»
13:45 Timbus building suspense i see
13:45 Timbus i guess that works as a trigger
13:46 benabik Although if you want to catch changes, you have to return a proxy object don't you?
13:46 masak nom: class C { has $.a = 42; method a is rw { $!a } }; my C $c .= new; $c.a = 5; say $c.a
13:46 p6eval nom ea0311: OUTPUT«5␤»
13:46 masak benabik: correct. I was just getting to that.
13:47 benabik masak: Sorry for jumping the gun.  :-)
13:47 masak no prob ;)
13:47 masak the method .a is just the thing that gives you access to the attribute somehow.
13:47 Timbus i guess its different in moose because it's a tad more limited
13:47 masak Moose has different ground rules to play with.
13:48 masak it has to stuff a lot of its magic into the attributes, because methods are just subs and classes are just packages.
13:50 Timbus at the moment I'm writing a sort of pluggable 'engine' in moose. so you can just extend a module and write as little code as possible. I'm using lazy attributes and triggers to a pretty extreme extent
13:50 Timbus like a little domino effect
13:51 Timbus so I'd hope perl6 can outdo it :3
13:51 masak Perl 6 is definitely lazier :)
13:52 masak I think we can make it triggereder, too :>
13:53 Timbus heh
13:55 geekosaur yeh, I was thinking metaobjects should make it easy.  or, well, "easy"
13:55 masak it's easy once you know how.
13:56 LlamaRider is it possible to type the key and value of a Pair argument?
13:58 sayu joined #perl6
14:00 masak nom: sub foo(Pair $p where { .key ~~ Str && .value ~~ Int }) { say "yay!" }; foo "bar" => 42; foo 42 => "bar"
14:00 p6eval nom ea0311: OUTPUT«yay!␤Constraint type check failed for parameter '$p'␤  in sub foo at /tmp/ZYBoq_y7XZ:1␤  in block <anon> at /tmp/ZYBoq_y7XZ:1␤  in <anon> at /tmp/ZYBoq_y7XZ:1␤»
14:05 LlamaRider thanks
14:05 LlamaRider but I take it this will not have any runtime advantages? I was thinking of adding types here and there to see if performance improves.
14:07 kshannon There's currently very little optimizing based on type going on.  That's more a future advantage...
14:07 masak yeah; think of typing as a safety rail for now, not as a performance booster.
14:07 geekosaur probably that would slow it because it needs to check the constraint at runtime.  but theoretically it could notice the constraint at compile time and choose an optimal representation or etc.
14:08 masak if you use native types, there's quite a performance win.
14:08 kshannon as long as you're not spending too much time boxing and unboxing.
14:08 LlamaRider understood, thanks
14:22 mkramer joined #perl6
14:25 xinming joined #perl6
14:27 mkramer joined #perl6
14:45 lateau_ joined #perl6
14:55 stepnem joined #perl6
15:06 PacoAir joined #perl6
15:08 zipf joined #perl6
15:09 jakky joined #perl6
15:10 jakky left #perl6
15:10 jakky joined #perl6
15:16 fsergot joined #perl6
15:26 jakky left #perl6
15:27 rsimoes joined #perl6
15:27 jakky joined #perl6
15:27 [Coke] \o/, my chinese coworker was able to understand a sentence I said. ;)
15:27 tadzik :)
15:28 [Coke] (which, since I learned it via pimsleur, I cannot actually write out for you here. :(
15:30 masak [Coke]: what's the translation of what you said?
15:34 awoodland joined #perl6
15:42 daxim https://encrypted.google.com/search?tbm=is​ch&amp;q=%22%E8%BF%98%E6%9C%89%E5%91%A2%22
15:46 Trashlord joined #perl6
15:58 masak 还有呢 -- "Hái yǒu ne"?
15:58 masak I take that as meaning something like "there's more, eh"
15:58 masak but my Mandarin is rusty :)
16:01 masak &
16:03 alim_ joined #perl6
16:13 fsergot joined #perl6
16:33 prammer joined #perl6
16:34 kaleem joined #perl6
16:49 tokuhirom joined #perl6
17:07 buubot_backup joined #perl6
17:08 [Coke] Wǒ kěyǐ shuō yīdiǎn pǔtōnghuà
17:09 [Coke] though those roman characters don't look like they sound in my head. ;)
17:11 mkramer joined #perl6
17:15 sorear good * #perl6
17:22 nnunley joined #perl6
17:23 LlamaRider joined #perl6
17:25 [Coke] sorear: hio.
17:27 [Coke] niecza: END {say "what?"};
17:27 p6eval niecza v13-62-g4161dec: OUTPUT«what?␤»
17:28 [Coke] niecza: use Test; END {is 3,4,"nope"};
17:28 p6eval niecza v13-62-g4161dec: OUTPUT«not ok 1 - nope␤# /tmp/MUG4JAkARV line 1␤#    Failed test␤#           got: 3␤#      expected: 4␤»
17:29 [Coke] niecza: use Test; my $var = 3; END {is $var,4,"nope"};
17:29 p6eval niecza v13-62-g4161dec: OUTPUT«not ok 1 - nope␤# /tmp/GulfZg8h2d line 1␤#    Failed test␤#           got: 3␤#      expected: 4␤»
17:29 kaleem joined #perl6
17:29 [Coke] (trying to figure out why S04-phasers/ascending-order.t isn't running the END tests.)
17:30 [Coke] niecza: use Test; my $var = 3; END {is $var,4,"nope"}; END {is $var,3,"yup"}
17:30 p6eval niecza v13-62-g4161dec: OUTPUT«ok 1 - yup␤not ok 2 - nope␤# /tmp/n2dVFzDthb line 1␤#    Failed test␤#           got: 3␤#      expected: 4␤»
17:30 [Coke] sorear, any clues for me?
17:31 [Coke] niecza: use Test; my $var = 3; END {is $var,4,"nope"}; END {is $var,3,"yup"}; exit(1)
17:31 p6eval niecza v13-62-g4161dec: OUTPUT«ok 1 - yup␤not ok 2 - nope␤# /tmp/Aqj8cKkz1_ line 1␤#    Failed test␤#           got: 3␤#      expected: 4␤»
17:31 [Coke] niecza: use Test; my $var = 3; END {is $var,4,"nope"}; END {is $var,3,"yup"}; say "#FUDGED"; exit(1)
17:31 p6eval niecza v13-62-g4161dec: OUTPUT«#FUDGED␤ok 1 - yup␤not ok 2 - nope␤# /tmp/gzRtW2VoZl line 1␤#    Failed test␤#           got: 3␤#      expected: 4␤»
17:32 * [Coke] apologizes for spamming the channel, whoops.
17:33 LlamaRider joined #perl6
17:34 [Coke] ah, I have a clue.
17:35 [Coke] sorear: if I add an END {} block at the end of that file, all the ENDs are fired.
17:35 thou joined #perl6
17:37 [Coke] .. ok, wtf. now that it worked once, even if I remove the change to ascending-order.t, it still works. O_o
17:37 [Coke] Clearly I was not running the code I thought I was.
17:38 MayDaniel joined #perl6
17:43 [Coke] ... very weird. now seeing the same failure mode on descending-order.t
17:45 [Coke] if I run the .t file with niecza, I get all 7 tests running (one of them fails because it's fudged); if I run with t/fudgeandrun, I don't get the tests that are run in the END block. O_o
17:45 cognominal joined #perl6
17:46 LlamaRider damn, looking at last year's contest solutions by moritz - respect
17:46 LlamaRider still lots to learn
17:51 dalek roast: 527ff7f | coke++ | integration/99problems-51-to-60.t:
17:51 dalek roast: unfudge for niecza
17:51 dalek roast: review: https://github.com/perl6/roast/commit/527ff7f580
17:51 sorear [Coke]: t/fudgeandrun t/spec/S04-phasers/{a,de}scending-order.t works for me
17:52 xinming joined #perl6
17:52 [Coke] O_o
17:53 [Coke] Those were the failures that were cropping up in the daily reports I was doing; ... and now I can no longer duplicate any of the failures. wtf.
17:56 x3nU magic.
17:56 x3nU :F
18:02 rsimoes joined #perl6
18:04 mkramer joined #perl6
18:07 [Coke] well, on the bright side, that's 5 more passing tests, with the unfudge I just committed.
18:15 mj41 joined #perl6
18:23 kaare_ joined #perl6
18:37 * TimToady woke up this morning thinking that media disks are OO-think while streaming is FP-think...
18:38 * [Coke] suggests not eating after 9pm. :P
18:39 spine_ joined #perl6
18:39 TimToady except the media industry is still OO, so is not in favor of memoization :)
18:39 spine_ left #perl6
18:39 sorear good morning TimToady!
18:39 spine_ joined #perl6
18:40 TimToady good morning
18:40 TimToady you in SD these days?
18:41 sorear yeah.
18:43 TimToady I suppose your holiday is ending about now
18:44 sorear classes restart on the 20th actually
18:44 pyrimidine joined #perl6
18:44 sorear +for me
18:45 TimToady we have to get quietfanatic back down to Westmont by Monday...
18:46 am0c joined #perl6
18:46 mkramer joined #perl6
18:47 sorear nod
18:48 spine_ anyone got an idea why "my $a; while (1) { $a++; }" leaks memory on current nom? Is the gc not working?
18:48 spine_ goes up to several GB of RAM very fast
18:48 tadzik hmm
18:49 tadzik indeed, it's like 80 MB/s here
18:49 TimToady missing write barrier maybe
18:49 x3nU memory leaks, again? :O
18:50 tadzik if it's a missing WB, I wonder if that's also causing these segfaults in Bailador
18:51 tadzik . o O ( you always have one more missing WB than you think you have! )
18:52 TimToady loop {} does it too, so not the while
18:55 TimToady -- also does it
18:55 TimToady doesn't matter whether you initialize
18:55 sorear nom: my $a; say (while ($a < 10) { $a++ })
18:55 p6eval nom ea0311: OUTPUT«use of uninitialized variable $a of type Any in numeric context␤Bool::False␤»
18:56 TimToady string increment also leaks
18:56 sorear there's an imo design flaw in Perl 6 loops which would cause the behavior you describe, but it doesn't seem to be implemented, so I wonder what else is going on
18:57 TimToady sink context is supposed to throw stuff away
18:57 spine_ actually I found that leak when trying to figure out why "my @c := (1..Inf).map({$_}); while (shift @c) {;}" leaks memory...
18:58 TimToady in that case I'd suspect that shift isn't really throwing anything away, just moving the pointer up
18:58 TimToady but that doesn't seem to apply to $a++
18:58 spine_ maybe, I don't know the internals. But it makes lazy lists pretty useless for me :(
19:00 wollmers joined #perl6
19:01 TimToady my $a = 1; loop { $a } # doesn't leak
19:01 TimToady but my $a = 1; loop { $a + 1 }  # does leak
19:03 TimToady doesn't help to put an explicit 'sink' on it
19:03 dalek niecza: 6d1b246 | sorear++ | lib/ (2 files):
19:03 dalek niecza: Use .gist to describe exceptions (fixes #98)
19:03 dalek niecza: review: https://github.com/sorear/niecza/commit/6d1b246684
19:03 sorear so who'se going to have the honor of niecza bug 100?
19:04 TimToady loop { 1 + 1 } leaks
19:05 TimToady and, in fact, leaks much faster
19:06 sorear shouldn't that be the same as loop { 2 }?  *ducks*
19:08 TimToady yes, but that doesn't leak!
19:08 TimToady loop { 1 * 1 }  # leaks
19:08 spine_ even loop {1++} , no idea why this is even allowed...
19:09 TimToady so the operation doesn't really matter
19:09 TimToady leaks at -O0
19:10 TimToady niecza: say +(1 .. '10')
19:10 p6eval niecza v13-63-g6d1b246: OUTPUT«10␤»
19:13 * [Coke] tests the result of an auto-unfudge run for niecza.
19:17 TimToady perl6: https://gist.github.com/1556435
19:17 p6eval niecza v13-63-g6d1b246: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 806 (warn @ 2) ␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 170 (Mu.Str @ 9) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/src/nie…
19:17 p6eval ..rakudo ea0311: OUTPUT«===SORRY!===␤Variable @primes is not predeclared at line 1, near " ... * > s"␤»
19:17 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected "@primes"␤    expecting "=", "::", context, ":" or "("␤    at /tmp/qJDqw8XGqq line 1, column 10␤»
19:18 TimToady that one blows up all three :)
19:19 TimToady sorear: you can't see it above, but it also dies with: Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.
19:20 PerlJam TimToady: loop { "a" ~ "a" }  # leaks, but far slower  than loop { 1 + 1 }
19:21 TimToady well, it's a slower operation, so doesn't do so many statements
19:22 TimToady loop { sink 1+1 } also leaks
19:24 carlin joined #perl6
19:28 TimToady sorear: anyway, that ^^ gist is my candidate for bug #100 :)
19:29 TimToady even if the program turns out to be incorrect some way, the error message doesn't give me a line number in my program
19:30 spine_ is the gc running at all? seems like everyting I can come up with is leaking. e.g. "my $a; while (++$a) {}", "for 1..Inf {}", ...
19:31 tadzik I wonder if analyzing pir may be any hint
19:32 * TimToady wonders if a dispatcher is leaking
19:33 tadzik spine_: do you remember any point in time in which this code wasn't leaking?
19:34 TimToady I think we'd have noticed this earlier
19:34 tadzik there were some find_method changes recently
19:34 tadzik I'm at RELEASE_3_11_0-2-g80e365d, it leaks
19:35 spine_ tadzik: no, just found this yesterday, never had a look at the memory before
19:35 tadzik I see
19:43 Psyche^ joined #perl6
19:50 wollmers niecza: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<Extend>>$/;
19:50 p6eval niecza v13-63-g6d1b246: OUTPUT«matches␤»
19:50 wollmers nom: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<Extend>>$/;
19:50 p6eval nom ea0311: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 1, near "<Extend>>$"␤»
19:51 wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<Extend>>$/;
19:51 p6eval std dc62e1d: OUTPUT«ok 00:01 124m␤»
19:52 sorear spine_: does it leak faster with -G inf (disables the GC) ?
19:52 sorear o/ wollmers
19:52 wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^\X$/;
19:52 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex backslash sequence at /tmp/qvzs6tHUFW line 1:�------> [32mes" if "\c[COMBINING DOT ABOVE]" ~~ m/^\[33m�[31mX$/;[0m�Check failed�FAILED 00:01 123m�»
19:53 [Coke] This test seems dodgy:
19:53 [Coke] ok @a.grep({$_}),  'Bool.roll(30) contains a True';
19:53 [Coke] ok @a.grep({!$_}), 'Bool.roll(30) contains a False';
19:53 sorear wollmers: <.> matches a single grapheme (not implemented by anyone yet)
19:53 wollmers niecza: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<EX>>$/;
19:53 p6eval niecza v13-63-g6d1b246: OUTPUT«matches␤»
19:53 * sorear wonders if wollmers is Helmut W.
19:54 sorear [Coke]: you mean the 2e-9 chance of spurious failure?
19:54 [Coke] niecza: my @a=Bool.roll(30); say @a;
19:54 p6eval niecza v13-63-g6d1b246: OUTPUT«Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any() Any()␤»
19:54 wollmers sorear: who else? I always use real name--full or 8 chars;-)
19:55 [Coke] sorear: aye. though I see it doesn't really matter for niecza atm. ;)
19:55 [Coke] nom: my @a=Bool.roll(30); say @a;
19:55 p6eval nom ea0311: OUTPUT«False False True False False True False True False False False True False False True False False False True True False True False False True False True False False False␤»
19:55 wollmers niecza seems complete with uniprops and aliases:-)
19:56 spine_ sorear: with "my $a; while (++$a) {}" -G inf does not change anything (Both leak at 40MB/s)
19:57 sorear TimToady: ah, the joy of unhandled exceptions from deep in the compiler
19:59 sorear TimToady: constant/subtype punning is NYI; changing it to explicitly subset One of Int where 1; and adding say @primes[^30] makes it work
20:00 sorear without the say, I get an internal error in exception dispatch
20:04 [Coke] sorear: we're passing 2 of the tests in the last block of t/spec/S13-type-casting/methods.t - is it ok to unfudge those and let them run? or do you want to kill those tests?
20:05 [Coke] (or, just leave it skipped for now and decide later.)
20:06 wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme-Cluster-Break<Extend>>$/;
20:06 p6eval std dc62e1d: OUTPUT«ok 00:01 124m␤»
20:06 wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme Cluster Break<Extend>>$/;
20:06 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse metachar at /tmp/7lwC3K763v line 1:�------> [32mhes" if "\c[COMBINING DOT ABOVE]" ~~ m/^[33m�[31m<:Grapheme Cluster Break<Extend>>$/;[0m�Couldn't find final '>'; gave up at /tmp/7lwC3K763v line 1:�------> [32m[COMBI…
20:20 * [Coke] leaves it skipped for now.
20:21 literal joined #perl6
20:23 TimToady wollmers: we'll appreciate any help you can give us in switching P6 over from codepoints to graphemes by default
20:24 Moukeddar joined #perl6
20:26 TimToady we'll need to come up with a syntax for when we want to distinguish the bits of a grapheme, but as a default I think maybe a grapheme matches if any of its codepoints matches a particular property
20:27 [Coke] sorear: if you add the word "unspecced" to any niecza fudge directives that are so, autounfudge won't touch those fudge directives.
20:27 * [Coke] wonders if tchrist has been keeping up on perl6 unicode.
20:27 wollmers TimToady: IMHO Graphems do not need codepoints. It should work with strings in NFC. The Grapheme rules are only needed in .graphs(), .split(), .comb(), matching with properties or char-classes.
20:28 TimToady um, I don't want a hybrid codepoints/graphemes approach
20:29 wollmers Maps Graphemes to temp integers confuses maybe (e.g. sort).
20:29 TimToady no, everything is sorted as if it's NFD by default, so NFG merely defers to the NFD there, I think
20:30 TimToady are you familiar with our notion of NFG?
20:30 wollmers Yes, I am familiar with it, but some pieces are still unspecced.
20:30 TimToady it's basically NFC extended to support unit chars that have no single codepoint
20:31 TimToady I'd like substr et al to also work with graphemes by default
20:31 wollmers What's the charname of a Grapheme?
20:31 TimToady can be composed of its parts as necessary
20:32 TimToady NFC names can be considered shortcuts for the NFD composition of names
20:32 sorear [Coke]: I don't like running tests that work "by accident"
20:32 wollmers I would like a list of charnames for roundtrip.
20:32 sorear [Coke]: the feature that is being tested doesn't exist, so I don't want it tested
20:32 az5112 joined #perl6
20:32 TimToady the NFG design does not promise round-tripping on all levels
20:33 TimToady just as the codepoints level trades away some round tripping of composition forms
20:34 TimToady as soon as you enforce NFC or NFD you've lost info
20:34 TimToady NFG just loses a little more
20:34 TimToady one can always drop to a lower level to get more round-tripping, with a drop in (easy) functionality
20:35 TimToady I don't mind if some things can recognize graphemes at the codepoints level, but I don't like that for the default for most users
20:35 sorear TimToady: I don't understand how level-dropping is to work.
20:35 wollmers The .charnames() are needed mostly for diagnosis.
20:36 TimToady well, all you need is a unique way to identify every NFG for that
20:36 TimToady since the NFC vs NFD is hidden in NFG mode
20:37 TimToady one could, I suppose make the NFG tables slightly larger and remember the original sequence if it is neither the NFC nor the NFD repr
20:38 TimToady then you could get round-tripping even out of NFG
20:38 wollmers IMHO NFD needs to be normalized to NFC before be used as NFG.
20:38 TimToady sure
20:38 TimToady NFG just takes NFC further
20:38 TimToady and temporarily defines more precomposed forms for you :)
20:38 TimToady this feels like a disruptive goodness to me
20:39 TimToady it also tends to shield the user from the problems NFC has with Unicode adding more precomposed forms over time
20:40 TimToady but it's sort of the opposite strategy from what tchrist++ is recommending for P5 in the new camel
20:40 TimToady he recommends always changing to NFD on the way in, and NFC on the way out
20:40 wollmers Unicode has a very restrictive policy *against* adding new precomposed forms.
20:41 TimToady we aren't adding them to Unicode :)
20:41 TimToady we're merely coming up with a unit representation for graphemes
20:41 TimToady but it merely is a set of pointers to the real codepoints
20:42 TimToady back to the NFD thing, we can use those tables to get sane NFD matching semantics without forcing a variable-width grapheme view on teh user
20:42 TimToady (sane matching is why tchrist recommends use of NFD internally)
20:42 wollmers This always changing to NFD of tchrist I do not understand (it's on my todo to discuss it with him)
20:43 TimToady I'm sure he can give you a great deal of examples on that subject :)
20:43 PerlJam TimToady: does tchrist have any other settings besides "trickle" and "firehose"?  :)
20:44 snearch joined #perl6
20:44 wollmers His examples are always very great and longish
20:44 TimToady in some sense, NFG can be viewed as an NFD representation with indirection; it's just that where Unicode gives us precomposed forms, we can use those instead of our own pointers to NFD sequences
20:45 TimToady the precomposed forms also give us fast character equality rejection when either or both of the graphemes in question are precomposed
20:46 TimToady it is only when both are "manufactured" that you have to consult the tables (and that only if the two strings do not share a decomposition table)
20:47 TimToady anyway, to avoid giving the Unicode Consortium heartburn about inventing new characters, it would be forbidden (or at least very difficult) to output temp characters without commiting to nfc/nfd translation
20:47 wollmers NFG (as defined by Unicode Extended Grapheme Cluster Boundaries) is independent of NFC versus NFD--it works in both.
20:47 TimToady for some operations
20:48 TimToady NFG is not about violating that ideal, but finding an efficient way to implement it without variable-length representation
20:48 vlkv joined #perl6
20:48 TimToady and it's about providing a sane default view to non-expert users
20:49 TimToady to a mere mortal, the NFG unit is a "character"
20:49 PerlJam TimToady++  I like sane defaults.
20:50 PerlJam (*especially* since I'm not an expert)
20:50 wollmers You also need the NFG-table for inheritance of properties from the Grapheme_Base character.
20:51 TimToady sure, there have to be sane defaults there too
20:52 TimToady but I think the NFG abstraction as the Unicode Consortium defines it will tend to be very leaky in most computer languages, and I think Perl 6's "killer app" would be involved with plugging that leakiness
20:52 shinobicl_ joined #perl6
20:52 mkramer joined #perl6
20:53 TimToady if we can do it with some degree of efficiency
20:54 TimToady which variable-width encodings tend to fight against
20:55 TimToady wollmers: do you think that only the base chars properties should match by default?  that is also a sane position (compared to matching any of the codepoints by default)
20:55 TimToady I could probably be argued into that position
20:55 TimToady esp if we have an easy notation for the other
20:55 wollmers If I think what's important for me in processing Unicode texts is: property-matching, matching, split/comb, eq. I rarely use substr or length (but I rarely do formatting).
20:56 * TimToady makes the looking-under-the-lamppost argument
20:56 [Coke] sorear; (by accident) aye, that's why I asked, because I wasn't sure if they were now passing by accident, or if you had intentionally made that work.
20:57 dalek roast: 6c7def2 | coke++ | S (20 files):
20:57 dalek roast: niecza (auto)unfudge
20:57 dalek roast: review: https://github.com/perl6/roast/commit/6c7def2ce3
20:58 mkramer joined #perl6
20:58 [Coke] sorear: that one should be safe, but probably could stand a quick sanity check, since it's the result of an auto-unfudge (with cleanups from me after the fact.)
20:59 wollmers TimToady: Sure, Unicode itself mentions property inheritence of compositions: from the Base-Character, with the exception of enclosing-combinings (e.g. exclamation mark + combing triangle)
20:59 TimToady okay, I can live with that
21:00 * TimToady needs to think about appropriate P6ish syntax for matching combining forms
21:00 TimToady suggestions welcome there
21:01 TimToady <:foo(1):bar(2)> and such is available, I think
21:01 az5112 $ cat m.pl  #!/usr/bin/perl   printf "%d\n", (9 % (-9));
21:01 wollmers Ähhhhhm.... we already have the syntax.
21:01 TimToady I doubt you have it in a form that P6 will be happy with
21:02 TimToady link?
21:02 sorear wollmers: Where does Unicode talk about property inheritance?
21:03 TimToady certainly if Unicode is going to define it using lists of exceptions, we can't hope to predict what exceptions they will make in the future
21:04 wollmers Why? Everything should be normalized to NFG, charclasses too. So the problem maybe is to keep combinings as single chars in the enum of a charclass.
21:04 * [Coke] wonders how many of niecza's warnings about unused variables in 'make spectest' could lead to ripping out code in roast.
21:05 masak good evening, #perl6
21:05 TimToady defining a class of exceptions like encosing-combining only gets you so far, if they decide they need a new class of exceptions in Unicode 9.0
21:05 colomon [Coke]: for sure roast's code can be pretty gnarly
21:05 sorear [Coke]: your commit seems to have added fudge _output_
21:05 masak [Coke] Wǒ kěyǐ shuō yīdiǎn pǔtōnghuà
21:05 sorear +say "# FUDGED!"; from the diff
21:06 masak heh, yeah, I've said that a few times as well ;)
21:06 [Coke] crap. that's probably a leftover from my -order.t madness. thanks.
21:06 TimToady [Coke]: niecza honors the #OK to suppress those, and rakudo won't mind
21:08 [Coke] wtf. I'm looking at the changes to those 2 files, and I autounfudge should not have made them, and I don't recall making them either.
21:09 [Coke] (aside from the "say fudged" line, which was just some debug output.)
21:09 az5112 printf "%d\n", (9 % (-9)) produces -9 in rakudo -- is this a bug?
21:11 masak az5112: was just going to eval that :)
21:11 masak az5112: welcome ;)
21:11 masak nom: say 9 % -9
21:11 p6eval nom ea0311: OUTPUT«0␤»
21:12 masak nom: say (9 % (-9))
21:12 p6eval nom ea0311: OUTPUT«-9␤»
21:12 masak hm.
21:12 cognominal_ joined #perl6
21:12 masak why do those two even differ?
21:12 benabik nom say 9 % (-9)
21:12 benabik nom: say 9 % (-9)
21:12 p6eval nom ea0311: OUTPUT«-9␤»
21:13 benabik nom: say (0 % -9)
21:13 p6eval nom ea0311: OUTPUT«0␤»
21:13 masak nom: say 9 %- 9
21:13 benabik nom: say (9 % -9)
21:13 p6eval nom ea0311: OUTPUT«0␤»
21:13 p6eval nom ea0311: OUTPUT«0␤»
21:13 masak aha.
21:13 benabik infix:<%-> ?
21:13 masak std: say 9 %- 9
21:13 p6eval std dc62e1d: OUTPUT«ok 00:01 121m␤»
21:14 masak oh, TimToooady? :>
21:15 mkramer joined #perl6
21:16 TimToady I don't think so
21:17 dalek roast: 192c48c | coke++ | S04-phasers/descending-order.t:
21:17 dalek roast: revert accidental change to this file
21:17 TimToady that's still just a prefix:<->
21:17 dalek roast: review: https://github.com/perl6/roast/commit/192c48c03b
21:17 TimToady (in std)
21:17 masak exactly.
21:17 masak so the result should still be 0, right?
21:17 [Coke] sorear++ # catching that mixup
21:17 sorear TimToady: can you elaborate on how dropping the Unicode level could work?
21:18 [Coke] niecza: say 16362/18417 # approximate niecza vs. rakudo today.
21:18 p6eval niecza v13-63-g6d1b246: OUTPUT«0.88841830917087472␤»
21:19 [Coke] niecza say 18417*.9-16362 # for colomon to get us to 90%
21:19 TimToady masak: sure, looks like a nom bug to me
21:19 [Coke] niecza: say 18417*.9-16362 # for colomon to get us to 90%
21:19 p6eval niecza v13-63-g6d1b246: OUTPUT«213.3␤»
21:19 * masak submits rakudobug
21:19 TimToady nom: say 0 % (-9)
21:19 p6eval nom ea0311: OUTPUT«-9␤»
21:19 masak b: say 9 % -9; say 9 % (-9)
21:19 p6eval b 1b7dd1: OUTPUT«0␤0␤»
21:19 masak yep. definitely a bug.
21:19 masak az5112++
21:20 masak az5112: I'm always very happy when p6cc contestants catch bugs for us :)
21:20 TimToady sorear: I always flinch when you ask a question of the form "Can you elaborate..."
21:21 cognominal joined #perl6
21:21 colomon sorear++
21:21 TimToady it's like you want me to ask your particular questions for you :)
21:21 TimToady and I'm not that smart...
21:22 az5112 masak: It'd better be fixed by the end of that contest :D
21:22 sorear ah, I'll try to work it out more on my own :)
21:22 [Coke] colomon: can you get us another 215 tests? ;)
21:22 masak az5112: I'll get right on it.
21:22 colomon [Coke]: by the end of the week?  sure.  :)
21:22 TimToady if you're asking whether the P6 design still requires allomorphic strings wrt Unicode level, that's not so important if we can get NFG
21:23 masak allomorphic!
21:23 TimToady NFG also decreases the need for StrPos somewhat, assuming we don't try to translate positions between levels
21:23 masak that was the word I was looking for the other day!
21:24 sorear TimToady: you said something like 'if the user doesn't want to lose NFC/NFD distinctions, they should use codepoint strings;
21:24 sorear s/;/'/
21:24 masak moritz: you used the word "polymorphic" in a spec bug report on github, wrt int and Int, but I think the word you wanted was "allomorphic".
21:24 sorear I'm wondering what a codepoint string looks like
21:24 TimToady codepoint strings are what we have today
21:24 TimToady in the long run, they should probably not even be considered type Str
21:25 TimToady if we reserve Str for NFG strings
21:25 sorear So once Str becomes NFG, you want an extra type sitting in the void between Str and Buf?
21:26 TimToady yes...in some sense these are all Buf role types instantiated with different abstract characters
21:26 TimToady except we should probably reserve Buf for constant width entities
21:26 colomon errr... does m:P5/Undeclared/  really do something different from just m/Undeclared/
21:27 TimToady so maybe it's Str as Stringy(Graph) and Cod (?) as Stringy(Codes)
21:28 sorear colomon: yes.  Work on pugs.
21:28 sorear old-pugs used either pcre or Perl (I forget which) for regex support, so supported *only* :P5
21:28 TimToady or whatever the types turn out to be
21:29 TimToady and to the extend a Buf pretends to be a string, Stringy(Byte) or so
21:29 TimToady *extent
21:29 arlinius joined #perl6
21:30 TimToady and Stringy basically represents any sequence of Int with some impied stringish operations
21:30 TimToady where some of those imply Unicode semantics to one extent or another, while others don't
21:30 TimToady *implied
21:31 sorear Graph is Int?
21:31 packetkn_ joined #perl6
21:31 TimToady under the NFG view, yes, but some of the Ints are distinguished as outside the Unicode range
21:31 dalek niecza: 0d40d16 | sorear++ | lib/Kernel.cs:
21:31 dalek niecza: Fix overzealous sanity check in Unwind
21:31 dalek niecza: review: https://github.com/sorear/niecza/commit/0d40d16da6
21:32 TimToady we've been thinking of using negatives for synthetic precompositions
21:33 TimToady esp since negatives give you room in both directions from 0, which is useful if we store in things like U16
21:33 masak nom: my $a = 0; my $b = -9; say nqp::p6box_n(nqp::mod_n($a, $b))
21:33 p6eval nom ea0311: OUTPUT«0␤»
21:33 masak well, that works, at least.
21:34 masak wow, since when did --target=PIR get totally unreadable?
21:34 TimToady nom: my $a = 0; my $b = (-9); say nqp::p6box_n(nqp::mod_n($a, $b))
21:34 p6eval nom ea0311: OUTPUT«0␤»
21:35 TimToady nom: my $a = 0; my $b := (-9); say nqp::p6box_n(nqp::mod_n($a, $b))
21:35 p6eval nom ea0311: OUTPUT«0␤»
21:35 TimToady nom: my $a = 0; my \$b ::= (-9); say nqp::p6box_n(nqp::mod_n($a, $b))
21:35 p6eval nom ea0311: OUTPUT«===SORRY!===␤Malformed my at line 1, near "\\$b ::= (-"␤»
21:35 masak now the interesting question is -- since this is how infix:<%> is *defined* -- why does the above work, but not infix:<%>?
21:35 TimToady nom: my $a = 0; my (\$b) ::= (-9); say nqp::p6box_n(nqp::mod_n($a, $b))
21:36 p6eval nom ea0311: OUTPUT«===SORRY!===␤Cannot use bind operator with this LHS at line 1, near " (-9); say"␤»
21:36 masak nom: say (-9).WHAT
21:36 p6eval nom ea0311: OUTPUT«Int()␤»
21:36 masak nom: say 0 % (-9)
21:36 p6eval nom ea0311: OUTPUT«-9␤»
21:36 masak oh!
21:36 sorear masak: nom
21:36 TimToady nom: say 0 % ("foo")
21:37 p6eval nom ea0311: OUTPUT«0␤»
21:37 masak there's one for ints, as well.
21:37 masak nom: say nqp::mod_I(0, -9)
21:37 p6eval nom ea0311: OUTPUT«-9␤»
21:37 masak \o/
21:37 TimToady \o/
21:37 masak busted!
21:37 * masak heads over to #parrot
21:37 [Coke] colomon: I can get 83 more "obvious" passes by fudging tests that are currently unrun but do pass at least one test now.
21:39 colomon really?  I don't know if that's worthwhile in and of itself, but it might be good to have a handy list of such files!
21:40 masak where is nqp::mod_I defined?
21:40 TimToady sorear: and negatives are immune to problems when U16 promotes to U32 or such
21:40 [Coke] colomon: see rakudo's tools/update_passing_test_data.pl
21:40 [Coke] here's a run against HEAD in niecza.
21:40 TimToady sorear: eek, s:g/U/I/
21:41 [Coke] https://feather.perl6.nl/~coke/colomon.txt
21:41 TimToady I mean I16 and I32
21:41 colomon [Coke]++
21:41 [Coke] feel free to hack at that as I am at work. ;)
21:41 TimToady even I8 would work for ASCII with one weird char
21:42 PerlJam masak: ack says src/PAST/NQP.pir line 455
21:42 [Coke] (and those are just the ones that OK with no fudging. presumable the total number is higher as we fudge and can then run more tests in the file.)
21:42 benabik mask src/PAST/NQP.pir:455
21:42 [Coke] "parse ASCII with this one weird tip!"
21:42 TimToady hmm, if ord($char) returns the NFG code, then we need baseord($char) or some such too
21:43 masak both #parrot and I conclude that the error comes from libtomath.
21:43 kboga joined #perl6
21:43 PerlJam masak: seems like
21:43 masak :(
21:43 TimToady don't we keep our own doctored version of that anyway?
21:44 TimToady or am I hallucinating?
21:44 benabik I think it's imported into NQP, but I don't think it's particularly doctored.
21:44 * TimToady always doctored P5's imports :)
21:44 TimToady the patch program workes pretty well for that...
21:44 TimToady *works even
21:45 wollmers joined #perl6
21:45 TimToady 'course, probably better to push the bug report upstream
21:47 wollmers TimToady: NFG cannot be used for everything. We still need NFD, NFC, NFKD, NFKC, NF<unknown> *and* bytes for catching errors and diagnosis.
21:48 TimToady certainly, NFG is only the default in my mind
21:48 * sorear gets back to TimToady's failing gist...
21:49 wollmers And parsers cannot work under NFG. Think ">\c[COMBINING DOT ABOVE]" which will not match '>' in NFG.
21:49 TimToady you have failure of imagination here
21:49 sorear It *shouldn't* match >, that's half the point of NFG
21:49 TimToady that's why I said there had to be a notation for that
21:50 TimToady but certainly parsers can work under NFG with appropriate notation
21:50 TimToady remember, we're designing the language here, so we don't have to follow the limitations of other poeple's language designs :)
21:51 TimToady I still reserve the right to ignore the Unicode Consortium where they're wrong :)
21:52 TimToady even where some of that wrongness is borrowed from Perl 5 :)
21:53 sorear seems that your definition of @primes doesn't quite work
21:53 wollmers sorear: The other way. Think XML "<keyboard><key>\c[COMBINING DOT ABOVE]</key><keyboard>"
21:54 sorear xml is defined using codepoint semantics, so the parser has to "use codes"
21:55 sorear I wonder why this works: say @primes[^30]
21:55 sorear and this doesn't: for @primes { say $_ } # fails after 2 lines output
21:57 * sorear is half-tempted to write a working version of @primes and stick it in the setting
21:57 sorear working, efficient
21:57 sorear sieve of atkin or something
21:57 wollmers Under NFG ">\c[COMBINING DOT ABOVE]" is *one* Grapheme. If the Graphemes are mapped to codepoints or not is irrelevant. It's the Grapheme view (:graphs modifier) that hides the pure '>'.
21:59 sorear wollmers: don't use :graphs if you want to match > and U+0307 as separate units.
22:01 tokuhirom joined #perl6
22:01 TimToady wollmers: you are confusing notation with semantics; if the Unicode Consortium requires that syntax for representing a grapheme, it is interfering in the work of language designers who may choose other ways of representing the same information
22:02 TimToady (not that we won't necessarily support that notation, but you should not assume that the consortium should have authority there)
22:04 TimToady one of the design principles of Perl 6 is to avoid using juxtaposition as an operator, and that might apply here too on some level
22:05 TimToady or it might not, of course, but that's the language designers decision
22:05 sorear TimToady: I think that is besides the point
22:06 TimToady which point?
22:06 [Coke] COMBINING POINT ABOVE! *duck*
22:06 sorear TimToady: suppose an XML file contains bytes which represent the sequence of code points U+003E U+0307
22:07 sorear TimToady: when this is converted into NFG by slurp(), those two codepoints would become a single grapheme "> with dot above"
22:07 wollmers sorear: exactly that's what I wanted to show.
22:07 TimToady yes, is there a problem?
22:07 sorear TimToady: this is no good for an XML parser, which needs to treat > as a code point
22:08 TimToady then an XML should 'use codepoints;' or some such
22:08 * [Coke] imagines you wouldn't slurp in XML in NFG mode.
22:09 aindilis joined #perl6
22:10 TimToady maybe our codepoint strings should normally be NFC or NFD when that is known
22:10 TimToady *string types
22:11 wooden joined #perl6
22:11 wooden joined #perl6
22:13 TimToady but it's the same case with XML as with Unicode; we can do whatever we like internally as long as we give the appearance of following the standards on the program boundaries
22:13 TimToady (and in any APIs that require it)
22:15 TimToady our top job is to give the programmer the mental model they want, and only secondarily to allow communication with other realms that try to inflict other mental models on the programmer.
22:15 molaf_ joined #perl6
22:17 masak 'night, #perl6
22:17 TimToady o/
22:18 sorear o/
22:18 TimToady sorry I'm so cranky today; coming down with something respiratory now, sigh...
22:18 gfldex joined #perl6
22:19 fhelmberger joined #perl6
22:21 PacoAir_ joined #perl6
22:23 diakopter .
22:23 Lothar joined #perl6
22:28 Lothbot joined #perl6
22:32 unobe joined #perl6
22:50 TimToady for the record, I'm fine with string literals figuring out if a \c is a continuing character or not; it's primarily matching notation that is up for grabs, since >\c[] should only match a single grapheme, we need ways of wildcarding within a grapheme
22:50 TimToady that mainly what I'm trying to say, poorly
22:50 TimToady *that's
22:51 TimToady nap &
23:09 packetknife joined #perl6
23:10 datums_nb joined #perl6
23:17 haci joined #perl6
23:18 haci left #perl6
23:23 cooper joined #perl6
23:34 dalek niecza: eb19fc8 | sorear++ | lib/ (2 files):
23:34 dalek niecza: Make circular-dependency detection more reliable, e.g. constant @x = gather { @x[0] }; say @x[0]
23:34 dalek niecza: review: https://github.com/sorear/niecza/commit/eb19fc8784
23:35 fk_ joined #perl6
23:38 colomon errr... what happened to the test_summary scripts?
23:50 sivoais joined #perl6
23:52 whiteknight joined #perl6
23:55 fk_ joined #perl6
23:57 fk_ left #perl6
23:59 fk_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs