»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
thou nom: 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…
thou probably something simple, but S12 is short on exposition here.
benabik Cannot assign to a readonly variable? 00:01
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.
thou or is it a problem with the sub's signature (:$.word)?
benabik But oh, look at my wrist, I've got to go.
afk &
thou bye 00:04
TimToady try :$!word instead
there's no virtual method till the BUILD is done
*BUILDALL
00:10 molaf_ joined 00:11 drbean left
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:11
if i try to initialize it like our %words = {}, I get: Method 'STORE' not found for invocant of class 'Any' 00:12
hmmm, moved it out of the class definition and used my scoping and it got past that 00:13
00:13 molaf left
thou now i think that nom isn't implementing method ^find syntax 00:13
but that's OK 00:14
nom: 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 00:23 packetknife joined
kshannon nom gist.github.com/1552773 00:23
nom: 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
cognominal I did not know that one could pass a gist to p6eval! 00:28
00:31 drbean left
colomon cognominal: it's a new-ish feature 00:32
kshannon there's even a patch to allow passing a link to a github blob, but that's not yet running on p6eval 00:34
colomon nom: say 4 cmp 6 00:37
p6eval nom ea0311: OUTPUT«-1␤»
00:38 drbean joined
cognominal how to invite p6eval on a irc.perl.org channel. I think it will be soon time to prozelitise perl6 in #perlfr 00:38
or prozelitaze? using Pavlovian methods 00:39
or taser takes a s. 00:40
probably the zap world induced the mistake. 00:41
sorear cognominal: taser = Thomas A. Smith's Electric Rifle 00:45
it's not a normal word, so it's not useful as a guideline
colomon sorear: I've got patches for sort and infix:<cmp> in testing here.
sorear my dictionary lists "proselyti[zs]e"
colomon: do they dup e6a9ddc? 00:46
colomon hmm... is that last British versus American?
kshannon perl6: my $key = "key"; my $val = "val"; say ":$key\($name)" 00:47
p6eval niecza v13-51-gd921607: OUTPUT«===SORRY!===␤␤Variable $name is not predeclared at /tmp/UurKfjBIMd line 1:␤------> y = "key"; my $val = "val"; say ":$key\(⏏$name)"␤␤Potential difficulties:␤ $val is declared but not used at /tmp/UurKfjBIMd line 1:␤---…
..rakudo ea0311: OUTPUT«===SORRY!===␤Variable $name is not predeclared at line 1, near ")\""␤»
..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…
kshannon perl6: my $key = "key"; my $val = "val"; say ":$key\($val)"
p6eval pugs b927740, niecza v13-51-gd921607: OUTPUT«:key(val)␤»
..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␤»
kshannon rakudo-- :( 00:48
colomon sorear: what's e6a9ddc? (sorry, github going very slow for me...)
sorear colomon: fixes sort to actually sort lists of numbers 00:49
colomon ah, I see. it does not dup e6a9ddc, it's on top of it 00:50
dalek ecza: 2700e66 | (Solomon Foster)++ | lib/CORE.setting:
Don't go through the hassle of sorting properly only to throw away those results with a second, improper sort.
00:51
ecza: ec38c2f | (Solomon Foster)++ | lib/CORE.setting:
Make infix:<cmp> honor +-Inf compared with non-Numeric.
sorear &sort could be simplified a bit with if @values && @values[0] ~~ Callable { 00:52
00:53 vlkv joined
colomon indeed 01:04
shall I?
01:04 drbean left 01:11 drbean joined
raiph would #perl6 be willing to mentor me in (looking at) enabling P6 grammars to be plugged in to github.com/github/markup? 01:15
01:18 jferrero joined, bluescreen10 left 01:19 wooden left
colomon sorear: spectesting your suggested cleanup 01:20
01:22 thou left
raiph github markup scripts are mostly ruby, but they are open to scripts in other langs 01:26
would require persuading github to install a P6 compiler 01:27
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.
so, step1 i'm hoping for is to get a P6 engine onto the github servers, and at least one markup 01:32
sorear I'm awake but not really willing to help 01:33
raiph sorear: understood.
sorear (because I think it would be a bad idea) 01:34
colomon: how did the spectest go?
colomon great. guess I forgot to push and went straight to the "unfudging tests that now pass" mode. 01:35
errr... forgot to commit locally, too
dalek ecza: e27d9b7 | (Solomon Foster)++ | lib/CORE.setting:
Clean up sub sort as per sorear++.
01:36
ast: 5f4bc5d | (Solomon Foster)++ | S32-hash/kv.t:
Unfudge tests which now work.
01:39
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:40
(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:44 vlkv left
dalek ast: 06f52cf | (Solomon Foster)++ | / (2 files):
Unfudge tests which now work.
01:46
raiph geekosaur: P6?
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:48
sorear raiph: I think it would be a major drain on resources -> bad pr, yes 01:49
I suppose it's not such a big deal since there are so few p6 projects
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
colomon perl6: say 42.sort 01:51
p6eval pugs b927740, rakudo ea0311, niecza v13-53-gec38c2f: OUTPUT«42␤»
colomon perl6: say 42.sort.perl 01:53
p6eval pugs b927740, rakudo ea0311: OUTPUT«(42,)␤»
..niecza v13-53-gec38c2f: OUTPUT«(42, ).list␤»
dalek ast: 48814de | (Solomon Foster)++ | S32-list/sort.t:
Fix tests to match pmichaud's comment, not to mention the behavior of every major compiler. Also fudge for niecza.
01:57
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 ecza: c001b3f | (Solomon Foster)++ | t/spectest.data:
Turn on S32-list/sort.t.
ecza: 6fe85ab | coke++ | t/fudgeandrun:
Allow "t/fudgeandrun <section>/<file>.t"

We refer to spec tests a lot without the full path of "t/spec/..." - allow fudgeandrun to run a test either with the full path, or the relative path from the top of the spec dir.
01:59
02:03 shinobicl_ joined
dalek ast: 7d6f8d4 | (Solomon Foster)++ | S02-types/array_ref.t:
Fudge for niecza.
02:11
ecza: f5100f5 | (Solomon Foster)++ | t/spectest.data:
Turn on S02-types/array_ref.t.
02:14
ast: ba1504f | (Solomon Foster)++ | S03-operators/identity.t:
Fudge for niecza.
02:18
ecza: 6323692 | (Solomon Foster)++ | t/spectest.data:
Turn on S03-operators/identity.t.
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:22
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:23
assume more than one compiler is on the server. each script version identifies which compiler version it uses. 02:24
02:29 tokuhirom joined 02:32 rsimoes1 left 02:33 shinobicl_ left 02:37 Guest25455 left 02:46 am0c joined
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.
japhb dalek++ # Recognizing a branch merge 02:50
dalek-- # Not recognizing what branch was merged
sorear japhb: it works by detecting pushes of more than 15 commits at once, and suppressing the food 02:53
[Coke] japhb: github.com/sorear/dalek-poller/blo...h.psgi#L44
02:53 tokuhirom left
[Coke] (that's the place to try to make it smarter) 02:54
japhb sorear, [Coke]: Ah, I see. Fair enough. 02:56
Which quotes are recognized without a Q variant by default? Just "", '', <>, <<>>, and «» ? Or am I missing something? 03:01
sorear maybe also //, depending on definitions 03:05
(officially it's not a quote, but it's parsed by quote:sym</ />)
03:06 JimmyZ joined
japhb sorear, Ah, yes, I understand your point, but that indeed was not what I meant. 03:06
sorear do you count quasi { } ?
japhb No, because that has an introducer.
sorear #`( ) ? 03:07
japhb (But you're right, quasi !~ Q)
Oooh, that one I'd forgotten.
dalek ast: b18f125 | (Solomon Foster)++ | integration/99problems-11-to-20.t:
Fudge for niecza, clean up file a bit.
03:22
ecza: 45a95ed | (Solomon Foster)++ | t/spectest.data:
Turn on integration/99problems-11-to-20.t.
03:24
03:29 somep6user joined
colomon sorear, japhb: ping/ 03:30
?
japhb pong
colomon just looking for a quick sanity check 03:31
I'm looking at this code in roast: 03:32
gist.github.com/1553342
[Coke] gist.github.com/1476841 - niecza up to 87.41% against rakudo.
colomon [Coke]++
japhb: I totally agree with niecza here: I don't see how mirror(Mu, Mu) matches any of the given mirror multis. 03:33
japhb: am I crazy? 03:34
03:34 risou_awy is now known as risou
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␤»
..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␤»
..niecza v13-56-g6fe85ab: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/XpnTQbdZrk line 1:␤------> multi sub mirror(Any:U ⏏$a, Any:U $b) { say "boo"; }; mirror(Mu,␤ $b is declared but not used at /tmp/XpnTQbdZrk line 1:␤------> multi sub mir…
japhb If I understand you, I don't think you're crazy.
Unless there is another multi somewhere else, (Mu, Mu) shouldn't dispatch 03:36
03:36 tokuhirom joined
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?
colomon that's what I'm thinking
japhb yeah
Apropos of which, I was wishing earlier to have a spec-accurate visual map of all of the specced classes and roles. 03:37
colomon changing the Anys to Mus makes it work just fine 03:38
+1 # map
03:38 Psyche^ joined
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:39
03:40 Patterner left, Psyche^ is now known as Patterner 03:42 achromic joined
dalek ast: 9d281d5 | (Solomon Foster)++ | integration/99problems-51-to-60.t:
A few changes to match current spec, plus fudging for Niecza.
03:43
colomon [Coke]: how many tests to hit 90%? ;) 03:44
dalek ecza: a658ef8 | (Solomon Foster)++ | t/spectest.data:
Turn on integration/99problems-51-to-60.t.
03:45
03:46 orafu left, orafu joined
[Coke] colomon: assuming no advance by rakudo: 477 more tests. 03:51
which doesn't include a658ef8 03:53
Once jnthn++ comes back, this is going to get harder. ;)
03:55 tokuhirom left 03:58 orafu left 04:00 orafu joined
colomon Seems like about 20 more .t files and we'll hit 90%... 04:02
04:11 am0c left 04:18 somep6user left 04:27 pat_js joined 04:29 JimmyZ left 04:51 lestrrat joined
dalek ast: 3e05f29 | kshannon++ | integration/99problems-51-to-60.t:
Another change to match current spec
04:51
kshannon Hmmm. rakudo nom is currently skipping 1932 tests in roast... 05:10
05:11 thou joined
kshannon plus 59 test files 05:11
05:19 pat_js left 05:38 replore joined 06:01 kaleem joined 06:38 replore left 06:45 kaleem left 07:02 kaleem joined 07:20 achromic left
Timbus so i just made this 07:20
07:20 wtw joined
Timbus pastebin.com/h7estxrt 07:20
im not even sure how
sorear Timbus: add it to rosettacode.org/wiki/Sorting_algori...Sleep_sort 07:25
Timbus yeah i got told about sleep sort a few minutes ago showing someone else 07:26
does it count though?
i was just messing with coro to see if the scheduler was cyclic and then i was like 'heeey..' 07:27
geekosaur o.O 07:29
masak morning, #perl6 07:32
Timbus++ # crazy 07:33
Timbus thanks :>
my rube goldberg sorting device 07:34
sorear good mornign masak! 07:39
masak morgordign sorear! 07:41
frettled dingding? Morningding. 07:45
masak .oO( after a while, even the thought patterns of Pavlov's dog changed for the worse ) 08:00
huh, interesting coincidence -- cognominal mentions Pavlov in the backlog. 08:04
maybe I happened to pick up some latent mental traces of it from the channel... 08:05
08:08 baest joined, jakky joined 08:13 jakky left
masak or maybe some external stimulus made us all think about Pavlov ;) 08:14
geekosaur decides not to chime in :p 08:15
masak heh :) 08:16
geekosaur (the real question is whose keyboards got wet)
08:20 icwiener joined 08:24 fhelmberger left 08:29 icwiener left, icwiener joined 08:33 mj41 joined 08:34 fhelmberger joined, SHODAN left 08:48 owlEyes joined 08:58 tokuhirom joined 09:04 gfldex left 09:06 gfldex joined 09:10 Mowah joined
masak hah! 09:14
found the Niecza hang I suffered from last week :)
niecza: say 3..*; die 3..*; say "alive" 09:15
p6eval niecza v13-56-g6fe85ab: OUTPUT«(timeout)3..Inf␤»
masak niecza: say "these are not the droids you are looking for"; die 3..*; say "alive"
p6eval niecza v13-56-g6fe85ab: OUTPUT«(timeout)these are not the droids you are looking for␤»
masak seems it hangs trying to output the range in the die message.
masak submits nieczabug 09:16
09:24 SHODAN joined 09:25 cognominal left, cognominal joined 09:29 sayu joined
masak ...and yay, all tests pass again! 09:34
(in my application)
tadzik good morning #perl6 09:37
masak ding!
I mean, um, good morning :)
09:42 daxim joined 09:46 owlEyes left, thou left 09:51 Trashlord joined 09:52 sayu left 10:28 mj41 left 10:52 nwc10 joined 10:56 vlkv joined 11:00 am0c joined 11:05 mj41 joined 11:21 MayDaniel joined 11:22 MayDaniel left, MayDaniel joined, MayDaniel left 11:47 Chillance left 11:55 risou is now known as risou_awy, risou_awy is now known as risou 12:03 Chillance joined 12:07 meraxes_ left
masak quiet day here today. 12:08
colomon o/ 12:09
geekosaur everyone's slobbered out? 12:10
masak on a Tuesday? 12:12
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
arnsholt Us Europeans usually don't follow American hand-egg =) 12:17
masak some of us don't follow football of any sort. :) 12:20
daxim is it worldcup yet?
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)
geekosaur pays little attention to gridball 12:27
12:29 snearch joined
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
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␤»
han_ :) 12:31
12:31 nwc10 left
masak han_: \o 12:31
12:31 bluescreen10 joined, LlamaRider joined
masak nice summary of Perl 5 activity during 2010: onionstand.blogspot.com/2012/01/per...-2011.html 12:32
Perl 5 is certainly alive and well.
I wonder what was its low point, in terms of commit activity and general interest.
LlamaRider waiting for Perl 6 probably :) 12:33
masak possibly.
but when was that? 2001? 2002?
or maybe even that is a myth, and Perl 5 never had a low point in practice.
colomon: shall I submit that as a rakudobug? 12:34
colomon masak: missing delete? sure
I'm going to fix the tests to use *-1 instead of -1 (etc)
LlamaRider is there a shorthand for "defined $a && &a == $b" ? 12:35
i guess " $a //&& $b" is too ugly already
masak submits rakudobug
colomon++ 12:36
LlamaRider and yet again, pls disregard my question 12:38
masak :) 12:41
colomon btw, github++ -- made it really easy to go back to the ng branch and find the old source code for delete. 12:48
perl6: my @a = 1, 2, Any, 3; say @a
p6eval pugs b927740: OUTPUT«12Any3␤»
..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…
..rakudo ea0311: OUTPUT«use of uninitialized value of type Any in string context␤1 2 3␤»
12:49 bluescreen10 left
masak yeah, github++ 12:54
git makes software development a breeze. github makes it even better.
colomon kind of strange to be debugging the code and the tests at the same time. :) 12:55
12:57 alim joined
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:00 kaleem left 13:01 han_ left
dalek ast: 6afbdbc | (Solomon Foster)++ | S32-array/delete.t:
Rewrite tests to use *-N instead of -N and not rely on the default the stringification of Any. Fudge for Niecza.
13:02
masak rakudo: sub pp($a is copy) { $a++; say $a }; pp(42)
p6eval rakudo ea0311: OUTPUT«43␤»
masak LlamaRider: like that. 13:03
LlamaRider is copy! awesome
masak :)
it makes a copy of the value, and puts it into your very own container.
LlamaRider exactly what i wanted, thanks. I'm a bit ashamed i didn't find it in S06 when looking. 13:04
masak it's in there, but so is a lot of other stuff ;) 13:08
LlamaRider: so, which task are you currently working on? ;) 13:09
LlamaRider i was refactoring t2, but that was done some time back, today i'm trying to finish t3 :) 13:10
going slowly and trying to learn what is behind the phrase "idiomatic perl6" :)
masak \o/ 13:11
it may be a good idea to go through last year's submissions, and the comments on those: strangelyconsistent.org/p6cc2010/ 13:12
dalek ecza: 5fd7180 | (Solomon Foster)++ | lib/CORE.setting:
Add Array.delete.
ecza: 4161dec | (Solomon Foster)++ | t/spectest.data:
Turn on S32-array/delete.t.
LlamaRider woah, secret knowledge :)
masak there are a bunch of hints there about what is considered "idiomatic Perl 6".
yah, open secret knowledge :)
LlamaRider thanks, will give it a read 13:13
13:16 mtk joined
masak niecza: sub foo { LEAVE say "yay, LEAVE works!" }; foo 13:25
p6eval niecza v13-56-g6fe85ab: OUTPUT«yay, LEAVE works!␤»
masak yay!
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␤»
masak \o/
13:27 kaleem joined
[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
p6eval niecza v13-56-g6fe85ab: OUTPUT«===SORRY!===␤␤Trait leave not available on variables at /tmp/_elzGkaHZP line 1:␤------> my Resource $r will leave { .discard } ⏏.= acquire; say "some distracting, inter␤␤Potential difficulties:␤ $r is declared but not…
masak aww :)
still. Niecza has LEAVE. wootness. 13:29
it is *good* to be living in 2012 :)
[Coke] that sudoku ticket appears to at least chew all the memory. 13:31
13:31 proller joined
Timbus does perl 6 have the moose 'trigger' 13:37
as in, a method you can add to an attribute that will be triggered when the attribute is changed 13:39
masak there's .STORE 13:40
13:41 snearch left
Timbus hmmm 13:41
masak I guess you could also write your own attribute metaobject.
kshannon or if you're talking about public access, just wrap the accessor method (or write your own) 13:42
masak aye. 13:43
nom: class C { has $.a = 42; method a { "custom accessor" } }; say C.new.a
p6eval? 13:44
Timbus taps monitor
oh, no the internets haven't paused :v 13:45
p6eval nom ea0311: OUTPUT«custom accessor␤»
Timbus building suspense i see
i guess that works as a trigger
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
p6eval nom ea0311: OUTPUT«5␤»
masak benabik: correct. I was just getting to that.
benabik masak: Sorry for jumping the gun. :-) 13:47
masak no prob ;)
the method .a is just the thing that gives you access to the attribute somehow.
Timbus i guess its different in moose because it's a tad more limited
masak Moose has different ground rules to play with.
it has to stuff a lot of its magic into the attributes, because methods are just subs and classes are just packages. 13:48
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
like a little domino effect
so I'd hope perl6 can outdo it :3 13:51
masak Perl 6 is definitely lazier :) 13:52
I think we can make it triggereder, too :>
Timbus heh 13:53
geekosaur yeh, I was thinking metaobjects should make it easy. or, well, "easy" 13:55
masak it's easy once you know how.
LlamaRider is it possible to type the key and value of a Pair argument? 13:56
13:58 sayu joined
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␤»
LlamaRider thanks 14:05
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.
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.
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.
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.
LlamaRider understood, thanks
14:19 LlamaRider left 14:22 mkramer joined 14:25 xinming joined, mkramer left 14:27 mkramer joined 14:45 lateau_ joined 14:46 lateau_ left 14:55 fsergot left, stepnem joined, am0c left 15:06 PacoAir joined 15:08 buubot_backup left, zipf joined 15:09 jakky joined 15:10 jakky left 15:11 jakky joined 15:16 fsergot joined 15:26 rsimoes left, jakky left 15:27 rsimoes joined, jakky joined
[Coke] \o/, my chinese coworker was able to understand a sentence I said. ;) 15:27
tadzik :)
[Coke] (which, since I learned it via pimsleur, I cannot actually write out for you here. :( 15:28
15:28 wtw left 15:29 zipf left
masak [Coke]: what's the translation of what you said? 15:30
15:30 Trashlord left 15:34 awoodland joined
daxim encrypted.google.com/search?tbm=is...5%91%A2%22 15:42
15:46 Trashlord joined 15:48 fsergot left 15:50 vlkv is now known as gv 15:54 icwiener left
masak 还有呢 -- "Hái yǒu ne"? 15:58
I take that as meaning something like "there's more, eh"
but my Mandarin is rusty :)
& 16:01
16:02 baest left 16:03 alim_ joined, alim_ left 16:05 alim left 16:13 fsergot joined 16:33 prammer joined 16:34 kaleem left, kaleem joined 16:49 tokuhirom left, tokuhirom joined 16:53 tokuhirom left 17:07 buubot_backup joined
[Coke] Wǒ kěyǐ shuō yīdiǎn pǔtōnghuà 17:08
17:09 sayu left
[Coke] though those roman characters don't look like they sound in my head. ;) 17:09
17:10 mkramer left 17:11 mkramer joined
sorear good * #perl6 17:15
17:20 Mowah left 17:22 nnunley joined 17:23 LlamaRider joined
[Coke] sorear: hio. 17:25
niecza: END {say "what?"}; 17:27
p6eval niecza v13-62-g4161dec: OUTPUT«what?␤»
[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:28 kaleem left
[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
[Coke] (trying to figure out why S04-phasers/ascending-order.t isn't running the END tests.) 17:29
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␤»
[Coke] sorear, any clues for me?
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␤»
[Coke] niecza: use Test; my $var = 3; END {is $var,4,"nope"}; END {is $var,3,"yup"}; say "#FUDGED"; exit(1)
p6eval niecza v13-62-g4161dec: OUTPUT«#FUDGED␤ok 1 - yup␤not ok 2 - nope␤# /tmp/gzRtW2VoZl line 1␤# Failed test␤# got: 3␤# expected: 4␤»
[Coke] apologizes for spamming the channel, whoops. 17:32
17:32 LlamaRider left 17:33 LlamaRider joined
[Coke] ah, I have a clue. 17:34
sorear: if I add an END {} block at the end of that file, all the ENDs are fired. 17:35
17:35 thou joined
[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
Clearly I was not running the code I thought I was.
17:38 MayDaniel joined
[Coke] ... very weird. now seeing the same failure mode on descending-order.t 17:43
17:44 cognominal left
[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
17:45 mj41 left, cognominal joined
LlamaRider damn, looking at last year's contest solutions by moritz - respect 17:46
17:46 daxim left
LlamaRider still lots to learn 17:46
dalek ast: 527ff7f | coke++ | integration/99problems-51-to-60.t:
unfudge for niecza
17:51
17:51 xinming left
sorear [Coke]: t/fudgeandrun t/spec/S04-phasers/{a,de}scending-order.t works for me 17:51
17:52 xinming joined
[Coke] O_o 17:52
17:52 MayDaniel left
[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:53
x3nU magic. 17:56
:F
17:59 awoodland left 18:01 rsimoes left 18:02 rsimoes joined 18:04 mkramer left, mkramer joined
[Coke] well, on the bright side, that's 5 more passing tests, with the unfudge I just committed. 18:07
18:15 mj41 joined 18:23 kaare_ joined
TimToady woke up this morning thinking that media disks are OO-think while streaming is FP-think... 18:37
[Coke] suggests not eating after 9pm. :P 18:38
18:39 spine_ joined
TimToady except the media industry is still OO, so is not in favor of memoization :) 18:39
18:39 spine_ left
sorear good morning TimToady! 18:39
18:39 spine_ joined
TimToady good morning 18:40
you in SD these days?
sorear yeah. 18:41
TimToady I suppose your holiday is ending about now 18:43
sorear classes restart on the 20th actually 18:44
18:44 pyrimidine joined
sorear +for me 18:44
18:45 mkramer left
TimToady we have to get quietfanatic back down to Westmont by Monday... 18:45
18:46 am0c joined, mkramer joined
sorear nod 18:47
spine_ anyone got an idea why "my $a; while (1) { $a++; }" leaks memory on current nom? Is the gc not working? 18:48
goes up to several GB of RAM very fast
tadzik hmm
indeed, it's like 80 MB/s here 18:49
TimToady missing write barrier maybe
x3nU memory leaks, again? :O
tadzik if it's a missing WB, I wonder if that's also causing these segfaults in Bailador 18:50
. o O ( you always have one more missing WB than you think you have! ) 18:51
TimToady loop {} does it too, so not the while 18:52
-- also does it 18:55
doesn't matter whether you initialize
sorear nom: my $a; say (while ($a < 10) { $a++ })
p6eval nom ea0311: OUTPUT«use of uninitialized variable $a of type Any in numeric context␤Bool::False␤»
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
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...
TimToady in that case I'd suspect that shift isn't really throwing anything away, just moving the pointer up 18:58
but that doesn't seem to apply to $a++
spine_ maybe, I don't know the internals. But it makes lazy lists pretty useless for me :(
19:00 wollmers joined
TimToady my $a = 1; loop { $a } # doesn't leak 19:01
but my $a = 1; loop { $a + 1 } # does leak 19:02
doesn't help to put an explicit 'sink' on it 19:03
dalek ecza: 6d1b246 | sorear++ | lib/ (2 files):
Use .gist to describe exceptions (fixes #98)
sorear so who'se going to have the honor of niecza bug 100?
19:04 risou is now known as risou_awy
TimToady loop { 1 + 1 } leaks 19:04
and, in fact, leaks much faster 19:05
sorear shouldn't that be the same as loop { 2 }? *ducks* 19:06
TimToady yes, but that doesn't leak! 19:08
19:08 LlamaRider left
TimToady loop { 1 * 1 } # leaks 19:08
spine_ even loop {1++} , no idea why this is even allowed...
TimToady so the operation doesn't really matter 19:09
leaks at -O0
niecza: say +(1 .. '10') 19:10
p6eval niecza v13-63-g6d1b246: OUTPUT«10␤»
[Coke] tests the result of an auto-unfudge run for niecza. 19:13
TimToady perl6: 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…
..rakudo ea0311: OUTPUT«===SORRY!===␤Variable @primes is not predeclared at line 1, near " ... * > s"␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "@primes"␤ expecting "=", "::", context, ":" or "("␤ at /tmp/qJDqw8XGqq line 1, column 10␤»
TimToady that one blows up all three :) 19:18
19:19 am0c left
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:19
PerlJam TimToady: loop { "a" ~ "a" } # leaks, but far slower than loop { 1 + 1 } 19:20
TimToady well, it's a slower operation, so doesn't do so many statements 19:21
loop { sink 1+1 } also leaks 19:22
19:24 carlin joined
TimToady sorear: anyway, that ^^ gist is my candidate for bug #100 :) 19:28
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:29
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:30
tadzik I wonder if analyzing pir may be any hint 19:31
TimToady wonders if a dispatcher is leaking 19:32
tadzik spine_: do you remember any point in time in which this code wasn't leaking? 19:33
TimToady I think we'd have noticed this earlier 19:34
19:34 kaleem left
tadzik there were some find_method changes recently 19:34
I'm at RELEASE_3_11_0-2-g80e365d, it leaks
spine_ tadzik: no, just found this yesterday, never had a look at the memory before 19:35
tadzik I see
19:40 Patterner left 19:43 Psyche^ joined, Psyche^ is now known as Patterner
wollmers niecza: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<Extend>>$/; 19:50
p6eval niecza v13-63-g6d1b246: OUTPUT«matches␤»
wollmers nom: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<Extend>>$/;
p6eval nom ea0311: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 1, near "<Extend>>$"␤»
wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<Extend>>$/; 19:51
p6eval std dc62e1d: OUTPUT«ok 00:01 124m␤»
sorear spine_: does it leak faster with -G inf (disables the GC) ? 19:52
o/ wollmers
wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^\X$/;
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Unrecognized regex backslash sequence at /tmp/qvzs6tHUFW line 1:␤------> es" if "\c[COMBINING DOT ABOVE]" ~~ m/^\⏏X$/;␤Check failed␤FAILED 00:01 123m␤»
[Coke] This test seems dodgy: 19:53
ok @a.grep({$_}), 'Bool.roll(30) contains a True';
ok @a.grep({!$_}), 'Bool.roll(30) contains a False';
sorear wollmers: <.> matches a single grapheme (not implemented by anyone yet)
wollmers niecza: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme_Cluster_Break<EX>>$/;
p6eval niecza v13-63-g6d1b246: OUTPUT«matches␤»
sorear wonders if wollmers is Helmut W. 19:54
[Coke]: you mean the 2e-9 chance of spurious failure?
[Coke] niecza: my @a=Bool.roll(30); say @a;
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()␤»
wollmers sorear: who else? I always use real name--full or 8 chars;-)
[Coke] sorear: aye. though I see it doesn't really matter for niecza atm. ;) 19:55
nom: my @a=Bool.roll(30); say @a;
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␤»
wollmers niecza seems complete with uniprops and aliases:-)
spine_ sorear: with "my $a; while (++$a) {}" -G inf does not change anything (Both leak at 40MB/s) 19:56
sorear TimToady: ah, the joy of unhandled exceptions from deep in the compiler 19:57
TimToady: constant/subtype punning is NYI; changing it to explicitly subset One of Int where 1; and adding say @primes[^30] makes it work 19:59
without the say, I get an internal error in exception dispatch 20:00
[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:04
(or, just leave it skipped for now and decide later.) 20:05
wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme-Cluster-Break<Extend>>$/; 20:06
p6eval std dc62e1d: OUTPUT«ok 00:01 124m␤»
wollmers std: say "matches" if "\c[COMBINING DOT ABOVE]" ~~ m/^<:Grapheme Cluster Break<Extend>>$/;
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Unable to parse metachar at /tmp/7lwC3K763v line 1:␤------> hes" if "\c[COMBINING DOT ABOVE]" ~~ m/^⏏<:Grapheme Cluster Break<Extend>>$/;␤Couldn't find final '>'; gave up at /tmp/7lwC3K763v line 1:␤------> [COMBI…
[Coke] leaves it skipped for now. 20:20
20:21 literal joined
TimToady wollmers: we'll appreciate any help you can give us in switching P6 over from codepoints to graphemes by default 20:23
20:24 Moukeddar joined
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:26
[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.
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.
TimToady um, I don't want a hybrid codepoints/graphemes approach 20:28
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
are you familiar with our notion of NFG? 20:30
wollmers Yes, I am familiar with it, but some pieces are still unspecced.
TimToady it's basically NFC extended to support unit chars that have no single codepoint
I'd like substr et al to also work with graphemes by default 20:31
wollmers What's the charname of a Grapheme?
TimToady can be composed of its parts as necessary
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"
wollmers I would like a list of charnames for roundtrip.
sorear [Coke]: the feature that is being tested doesn't exist, so I don't want it tested
20:32 az5112 joined
TimToady the NFG design does not promise round-tripping on all levels 20:32
20:33 Chillance left
TimToady just as the codepoints level trades away some round tripping of composition forms 20:33
as soon as you enforce NFC or NFD you've lost info 20:34
NFG just loses a little more
one can always drop to a lower level to get more round-tripping, with a drop in (easy) functionality
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.
wollmers The .charnames() are needed mostly for diagnosis.
TimToady well, all you need is a unique way to identify every NFG for that 20:36
since the NFC vs NFD is hidden in NFG mode
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:37
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.
TimToady sure
NFG just takes NFC further
and temporarily defines more precomposed forms for you :)
this feels like a disruptive goodness to me
it also tends to shield the user from the problems NFC has with Unicode adding more precomposed forms over time 20:39
but it's sort of the opposite strategy from what tchrist++ is recommending for P5 in the new camel 20:40
he recommends always changing to NFD on the way in, and NFC on the way out
wollmers Unicode has a very restrictive policy *against* adding new precomposed forms.
TimToady we aren't adding them to Unicode :) 20:41
we're merely coming up with a unit representation for graphemes
but it merely is a set of pointers to the real codepoints
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
(sane matching is why tchrist recommends use of NFD internally)
wollmers This always changing to NFD of tchrist I do not understand (it's on my todo to discuss it with him)
20:43 Moukeddar left
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
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
the precomposed forms also give us fast character equality rejection when either or both of the graphemes in question are precomposed 20:45
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:46
20:47 gv left
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.
TimToady for some operations
NFG is not about violating that ideal, but finding an efficient way to implement it without variable-length representation 20:48
20:48 vlkv joined, vlkv is now known as gv
TimToady and it's about providing a sane default view to non-expert users 20:48
to a mere mortal, the NFG unit is a "character" 20:49
PerlJam TimToady++ I like sane defaults.
(*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:50 mkramer left
TimToady sure, there have to be sane defaults there too 20:51
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
20:52 shinobicl_ joined, mkramer joined
TimToady if we can do it with some degree of efficiency 20:53
which variable-width encodings tend to fight against 20:54
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
I could probably be argued into that position
esp if we have an easy notation for the other
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).
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.
dalek ast: 6c7def2 | coke++ | S (20 files):
niecza (auto)unfudge
20:57
20:57 mkramer left 20:58 mkramer joined
[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:58
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
TimToady needs to think about appropriate P6ish syntax for matching combining forms 21:00
suggestions welcome there
<:foo(1):bar(2)> and such is available, I think 21:01
az5112 $ cat m.pl #!/usr/bin/perl printf "%d\n", (9 % (-9));
wollmers Ähhhhhm.... we already have the syntax.
TimToady I doubt you have it in a form that P6 will be happy with
link? 21:02
sorear wollmers: Where does Unicode talk about property inheritance?
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:03
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.
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
colomon [Coke]: for sure roast's code can be pretty gnarly
sorear [Coke]: your commit seems to have added fudge _output_
masak [Coke] Wǒ kěyǐ shuō yīdiǎn pǔtōnghuà
sorear +say "# FUDGED!"; from the diff
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.
TimToady [Coke]: niecza honors the #OK to suppress those, and rakudo won't mind 21:07
[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:08
(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?
masak az5112: was just going to eval that :) 21:11
az5112: welcome ;)
nom: say 9 % -9
p6eval nom ea0311: OUTPUT«0␤»
masak nom: say (9 % (-9)) 21:12
p6eval nom ea0311: OUTPUT«-9␤»
masak hm.
21:12 mkramer left, cognominal_ joined
masak why do those two even differ? 21:12
benabik nom say 9 % (-9)
nom: say 9 % (-9)
p6eval nom ea0311: OUTPUT«-9␤»
benabik nom: say (0 % -9) 21:13
p6eval nom ea0311: OUTPUT«0␤»
masak nom: say 9 %- 9
benabik nom: say (9 % -9)
p6eval nom ea0311: OUTPUT«0␤»
masak aha.
benabik infix:<%-> ?
masak std: say 9 %- 9
p6eval std dc62e1d: OUTPUT«ok 00:01 121m␤»
masak oh, TimToooady? :> 21:14
21:15 mkramer joined, cognominal left
TimToady I don't think so 21:16
dalek ast: 192c48c | coke++ | S04-phasers/descending-order.t:
revert accidental change to this file
21:17
TimToady that's still just a prefix:<->
TimToady (in std)
masak exactly.
so the result should still be 0, right?
[Coke] sorear++ # catching that mixup
sorear TimToady: can you elaborate on how dropping the Unicode level could work?
[Coke] niecza: say 16362/18417 # approximate niecza vs. rakudo today. 21:18
p6eval niecza v13-63-g6d1b246: OUTPUT«0.88841830917087472␤»
[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
[Coke] niecza: say 18417*.9-16362 # for colomon to get us to 90%
p6eval niecza v13-63-g6d1b246: OUTPUT«213.3␤»
masak submits rakudobug
TimToady nom: say 0 % (-9)
p6eval nom ea0311: OUTPUT«-9␤»
masak b: say 9 % -9; say 9 % (-9)
p6eval b 1b7dd1: OUTPUT«0␤0␤»
masak yep. definitely a bug.
az5112++
21:20 cognominal_ left
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
colomon sorear++ 21:21
TimToady it's like you want me to ask your particular questions for you :)
and I'm not that smart...
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 :)
[Coke] colomon: can you get us another 215 tests? ;)
masak az5112: I'll get right on it.
colomon [Coke]: by the end of the week? sure. :)
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
masak allomorphic! 21:23
TimToady NFG also decreases the need for StrPos somewhat, assuming we don't try to translate positions between levels
masak that was the word I was looking for the other day!
sorear TimToady: you said something like 'if the user doesn't want to lose NFC/NFD distinctions, they should use codepoint strings; 21:24
s/;/'/
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".
sorear I'm wondering what a codepoint string looks like
TimToady codepoint strings are what we have today
in the long run, they should probably not even be considered type Str
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?
TimToady yes...in some sense these are all Buf role types instantiated with different abstract characters 21:26
except we should probably reserve Buf for constant width entities
colomon errr... does m:P5/Undeclared/ really do something different from just m/Undeclared/
TimToady so maybe it's Str as Stringy(Graph) and Cod (?) as Stringy(Codes) 21:27
sorear colomon: yes. Work on pugs. 21:28
old-pugs used either pcre or Perl (I forget which) for regex support, so supported *only* :P5
TimToady or whatever the types turn out to be
and to the extend a Buf pretends to be a string, Stringy(Byte) or so 21:29
*extent
21:29 arlinius joined
TimToady and Stringy basically represents any sequence of Int with some impied stringish operations 21:30
where some of those imply Unicode semantics to one extent or another, while others don't
*implied
sorear Graph is Int? 21:31
21:31 packetkn_ joined
TimToady under the NFG view, yes, but some of the Ints are distinguished as outside the Unicode range 21:31
dalek ecza: 0d40d16 | sorear++ | lib/Kernel.cs:
Fix overzealous sanity check in Unwind
TimToady we've been thinking of using negatives for synthetic precompositions 21:32
21:32 wollmers left
TimToady esp since negatives give you room in both directions from 0, which is useful if we store in things like U16 21:33
21:33 packetknife left
masak nom: my $a = 0; my $b = -9; say nqp::p6box_n(nqp::mod_n($a, $b)) 21:33
p6eval nom ea0311: OUTPUT«0␤»
masak well, that works, at least.
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))
p6eval nom ea0311: OUTPUT«0␤»
TimToady nom: my $a = 0; my $b := (-9); say nqp::p6box_n(nqp::mod_n($a, $b)) 21:35
p6eval nom ea0311: OUTPUT«0␤»
TimToady nom: my $a = 0; my \$b ::= (-9); say nqp::p6box_n(nqp::mod_n($a, $b))
p6eval nom ea0311: OUTPUT«===SORRY!===␤Malformed my at line 1, near "\\$b ::= (-"␤»
masak now the interesting question is -- since this is how infix:<%> is *defined* -- why does the above work, but not infix:<%>?
TimToady nom: my $a = 0; my (\$b) ::= (-9); say nqp::p6box_n(nqp::mod_n($a, $b))
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
p6eval nom ea0311: OUTPUT«Int()␤»
masak nom: say 0 % (-9)
p6eval nom ea0311: OUTPUT«-9␤»
masak oh!
sorear masak: nom
TimToady nom: say 0 % ("foo")
p6eval nom ea0311: OUTPUT«0␤» 21:37
masak there's one for ints, as well.
nom: say nqp::mod_I(0, -9)
p6eval nom ea0311: OUTPUT«-9␤»
masak \o/
TimToady \o/
masak busted!
masak heads over to #parrot
[Coke] colomon: I can get 83 more "obvious" passes by fudging tests that are currently unrun but do pass at least one test now.
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:39
masak where is nqp::mod_I defined? 21:40
TimToady sorear: and negatives are immune to problems when U16 promotes to U32 or such
[Coke] colomon: see rakudo's tools/update_passing_test_data.pl
here's a run against HEAD in niecza.
TimToady sorear: eek, s:g/U/I/
[Coke] feather.perl6.nl/~coke/colomon.txt 21:41
TimToady I mean I16 and I32
colomon [Coke]++
[Coke] feel free to hack at that as I am at work. ;)
TimToady even I8 would work for ASCII with one weird char
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.)
benabik mask src/PAST/NQP.pir:455
[Coke] "parse ASCII with this one weird tip!"
TimToady hmm, if ord($char) returns the NFG code, then we need baseord($char) or some such too
masak both #parrot and I conclude that the error comes from libtomath. 21:43
21:43 kboga joined
PerlJam masak: seems like 21:43
masak :(
TimToady don't we keep our own doctored version of that anyway?
or am I hallucinating? 21:44
benabik I think it's imported into NQP, but I don't think it's particularly doctored.
TimToady always doctored P5's imports :)
the patch program workes pretty well for that...
*works even
21:45 wollmers joined
TimToady 'course, probably better to push the bug report upstream 21:45
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:47
21:47 aindilis left
TimToady certainly, NFG is only the default in my mind 21:48
sorear gets back to TimToady's failing gist...
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
sorear It *shouldn't* match >, that's half the point of NFG
TimToady that's why I said there had to be a notation for that
but certainly parsers can work under NFG with appropriate notation 21:50
remember, we're designing the language here, so we don't have to follow the limitations of other poeple's language designs :)
I still reserve the right to ignore the Unicode Consortium where they're wrong :) 21:51
even where some of that wrongness is borrowed from Perl 5 :) 21:52
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>"
sorear xml is defined using codepoint semantics, so the parser has to "use codes" 21:54
I wonder why this works: say @primes[^30] 21:55
and this doesn't: for @primes { say $_ } # fails after 2 lines output
21:56 kboga left
sorear is half-tempted to write a working version of @primes and stick it in the setting 21:57
working, efficient
sieve of atkin or something
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 '>'.
sorear wollmers: don't use :graphs if you want to match > and U+0307 as separate units. 21:59
22:01 kaare_ left, tokuhirom joined
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:01
(not that we won't necessarily support that notation, but you should not assume that the consortium should have authority there) 22:02
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:04
or it might not, of course, but that's the language designers decision 22:05
sorear TimToady: I think that is besides the point
TimToady which point? 22:06
[Coke] COMBINING POINT ABOVE! *duck*
sorear TimToady: suppose an XML file contains bytes which represent the sequence of code points U+003E U+0307
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.
TimToady yes, is there a problem?
sorear TimToady: this is no good for an XML parser, which needs to treat > as a code point
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
TimToady maybe our codepoint strings should normally be NFC or NFD when that is known 22:10
*string types
22:11 wooden joined, wooden left, wooden joined
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
(and in any APIs that require it)
22:15 molaf_ left
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
22:15 molaf_ joined, fhelmberger left 22:16 Lothar left
masak 'night, #perl6 22:17
TimToady o/
sorear o/ 22:18
TimToady sorry I'm so cranky today; coming down with something respiratory now, sigh...
22:18 gfldex left, gfldex joined 22:19 fhelmberger joined 22:20 sivoais left 22:21 PacoAir_ joined, PacoAir left, PacoAir_ is now known as PacoAir
diakopter . 22:23
22:23 Lothar joined 22:25 wollmers left 22:28 Lothbot joined, Lothar left, PacoAir left 22:32 unobe joined
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
that mainly what I'm trying to say, poorly
*that's
nap & 22:51
22:51 az5112 left 22:56 snearch left 23:04 mj41 left 23:07 cooper left 23:09 packetkn_ left, packetknife joined 23:10 datums_nb joined 23:17 haci joined 23:18 haci left 23:23 cooper joined 23:32 wolfman2000 left
dalek ecza: eb19fc8 | sorear++ | lib/ (2 files):
Make circular-dependency detection more reliable, e.g. constant @x = gather { @x[0] }; say @x[0]
23:34
23:35 fk_ joined
colomon errr... what happened to the test_summary scripts? 23:38
23:42 tokuhirom left 23:45 fk_ left 23:50 sivoais joined 23:52 whiteknight joined, whiteknight is now known as Guest69853 23:56 fk_ joined 23:57 fk_ left 23:59 fk_ joined