»ö« 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! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:26 kst left 00:27 kst joined 00:38 risou joined 00:44 meppl joined 01:05 Raynes left 01:09 Raynes joined
dalek rixel: 38b4366 | diakopter++ | sprixel/ (10 files):
massively cleaned up the codegen API. for sorear. See Program.cs
01:21
01:24 risou left 01:31 justatheory joined 01:34 awwaiid joined 01:38 molaf left 01:51 molaf joined 01:57 justatheory left 02:05 meppel joined 02:06 Schwern left 02:08 Chillance left, meppl left 02:14 Italian_Plumber left 02:26 alester joined
diakopter heh, DrudgeReport is apparently copyright 2011 02:35
oh, registered trademark. nm. 02:36
02:51 meppel left 02:52 meppl joined 02:56 nymacro joined 03:00 dukelet0 joined 03:08 timbunce left 03:11 sftp left 03:12 timbunce joined 03:19 cggoebel joined, ggoebel joined 03:32 alester left 03:43 meppel joined 03:47 meppl left 03:56 kljk joined 03:58 kljk left 04:03 satyavvd joined 04:09 mfollett joined 04:11 Helios left
mfollett I'm sure this question has been answered before and I'm hoping someone can give me a link to that answer. I understand what submethods are and what they do, but I'm not really sure when I would want to use one, could someone provide an example? 04:11
04:15 Helios joined 04:34 envi joined
sorear mfollett: submethods are really only useful together with WALK 04:36
a normal method call gets the topmost method of a given name 04:37
submethod + WALK allows you to attach a named piece of behavior to a class and all of its subclasses
this is how DESTROY and BUILD work
(both of which must, officially, be submethods)
diakopter blinks 04:38
mfollett sorear: What is WALK?
sorear I'm not sure submethod has any other use cases besides those two, tbh
mfollett: WALK =~ ^parents>>.can 04:39
find all methods of a given name, ignoring overriding
mfollett sorear: oh, gotcha
sorear: thanks
sorear it's got lots of options, see S12
diakopter: ?
diakopter I only barely remember those words from the irclogs/p6l of the past few yeras. 04:40
years.
WALK, DESTROY, BUILD, submethod.
sorear I use BUILD daily 04:41
the others, notsomuch
hmm, that was an impressive drop 04:43
I'm now running the call benchmark entirely without allocating 04:44
(by using a common pre-allocated instance for the null capture)
322 -> 259 ns for shaving off a 8 byte allocation? really?
diakopter interesting
what was the total time reduction
sorear from yesterday? 04:45
diakopter I mean for the whole run
I assume the ns number is after dividing from millions of iterations/recursions
sorear 8.4s 04:46
yes
2^27 of them
diakopter impressive..
most impressive.
sorear amusingly, the old 2.6 gc is slightly faster (239 ns) 04:47
diakopter heh. fewer deallocations.
sorear well, with no allocations and no gc runs, a generational gc is all write barrier and no savings
04:51 bluescreen left, rjbs joined 04:52 bluescreen joined 05:03 cggoebel left, ggoebel left
dalek rixel: 7612359 | diakopter++ | sprixel/ (7 files):
more porting of perlesque nested sub functionality. named locals tomorrow (or later tonight).
05:03
rixel: 9937504 | diakopter++ | sprixel/ (3 files):
obviate a couple of gmcs warnings
05:09
05:13 molaf left
sorear 168 ns for a 2^30 run with --llvm -O=all 05:15
05:15 cls_bsd left 05:16 cls_bsd joined 05:17 LaVolta joined 05:18 meraxes_ left 05:21 meraxes_ joined 05:22 nadim joined 05:31 meppel left
dalek ecza/master: ec30870 | sorear++ | / (3 files):
Provide two integer fields for the let system

The binder makes very good use of them, avoiding much boxing.
05:35
ecza/master: 680f033 | sorear++ | lib/Kernel.cs:
Remove comparison from hot trampoline loop
ecza/master: 7aef582 | sorear++ | / (4 files):
Use a shared preallocated null capture
05:44 masonkramer left, masonkramer joined 05:56 kaare joined 05:57 kaare is now known as Guest89638 06:01 Guest89638 is now known as kaare_ 06:11 wtw joined 06:16 mfollett left 06:18 bluescreen left 06:30 jferrero joined 06:33 ash_ left 06:34 pdcawley joined
pdcawley So, feeling dumb here, especially as I just accidentally asked this question in #moose, how do I join two arrays in rakudo*? I tried 'cat', but it doesn't seem to be there. 06:36
06:37 Trashlord left
sorear , 06:37
it's a full operator now, not just syntax
06:37 cxreg2 left
pdcawley That doesn't seem to destructure them... 06:37
06:37 cxreg joined 06:38 Trashlord joined
sorear rakudo: my @a1 = 1,2,3; my @a2 = 4,5,6; my @a3 = @a1, @a2; say @a3.elems 06:38
p6eval rakudo 7c74c0: OUTPUT«6␤»
sorear , doesn't destructure, but the context you put it in usually does 06:39
assignment to an array is what does it here
raw ( ).elems would too
flatwhatson rakudo: my @a = 1,2,3; my @b = 4,5,6; @a ,= @b; say @a.elems
sorear .perl is the odd one out
pdcawley Ah...
p6eval rakudo 7c74c0: OUTPUT«6␤»
pdcawley Context. Duh.
sorear there's a strong argument to be made for having .perl destructure
but then people would get really confused when they start using slices 06:40
06:41 phenny joined, ChanServ sets mode: +v phenny, pythonian4000afk joined
sorear (the 'cat' operator, fyi, is used to lazily join an infinite list of strings. For instance, (cat lines("/usr/share/dict/words")) ~~ /aardvark/ will return fairly quickly.) 06:41
pdcawley Ah. So, misreading the synopses then. 06:42
While I'm here... say I have 'class Symbol is Str {}', how do I construct a Symbol? 06:44
And yes, I realise that Symbols usually do more than that, but for the noddy lis.p6 port of Norvig's 'lis.py' that I'm mucking about with, it's enough.
sorear I don't think you can. 06:46
Str has no public constructor 06:47
at least, not a specced one
most of the immutable types can only be created using their own operators & &infix:<but>
pdcawley rakudo: class Symbol is Str { }; say ("Foo" but Symbol).isa(Symbol) 06:49
p6eval rakudo 7c74c0: OUTPUT«0␤» 06:50
pdcawley Hrrm.
sorear that should probably be an error
but applies to roles and enumerations
rakudo: role Symbol { }; say ("Foo" but Symbol).does(Symbol) 06:51
p6eval rakudo 7c74c0: OUTPUT«1␤»
pdcawley Hmm... that's probably good enough for my purposes.
07:05 baux joined 07:17 eternaleye left, wamba joined 07:31 cjk101010 joined
sorear doing nominal type checks on invocant parameters feels wasteful, but I don't see a good way out 07:45
07:56 mavrc joined 08:00 cosimo left 08:10 jest joined 08:15 cosimo joined 08:17 lucs left 08:19 dakkar joined 08:22 eternaleye joined 08:23 dukelet0 is now known as dukeleto 08:35 mavrc left, envi left 08:37 mavrc joined, nymacro left 08:52 timbunce left 08:55 timbunce joined, billgosh left
dalek ecza/master: 2fe5011 | sorear++ | src/ (2 files):
Unify private accessors and private methods

  $!foo is short for self!foo. This makes $!Foo::bar and $other!private
work, and will eventually make $!method(20) work with no ambiguity.
08:56
ecza/master: 94c51c8 | sorear++ | src/ (3 files):
Fix abstraction in private method codegen
09:01 billgosh joined 09:25 LaVolta left
sorear does not understand typed arrays 09:37
09:42 broquaint joined
mberends \o/ masak++ has arrived! 09:45
sorear masak++ 09:46
frettled mberends: yay?
sorear mberends: at some point I'd like to talk to you about C#/Java portability issues, for entirely selfish reasons
09:53 cogno joined
mberends sorear: ok, I'm getting a bit of experience there. In the meantime see github.com/jnthn/6model/blob/master...README.txt 09:54
sorear I thought you would be. 09:59
10:01 pdcawley left
sorear Wait, I thought Java had abstract classes and internal (aka default) visibility already 10:03
10:06 cogno left 10:12 Trashlord left 10:13 Trashlord joined 10:21 pdcawley joined 10:27 cogno joined 10:41 cogno left, envi joined 10:47 cogno joined 10:51 jest left 10:57 masak joined
masak \o/.nl 10:57
jnthn o/ masak 10:58
How many stroopwafels did you eat so far?
masak 0
but still very nice so far. 10:59
jnthn :0
masak jnthn: I've introspected mberends' fridge, and found something that you will like :)
Juerd masak: Oh hai. Will you be joining the Amsterdam Perl Mongers tomorrow? 11:00
masak aye.
Juerd Yay!
masak jnthn: mberends is now talking about visiting a live stroopwafel making.
jnthn !!
\o/
11:00 jest joined
jnthn eat! 11:00
masak nom!
colomon o/ 11:01
masak now the hacking can commence.
jnthn :-)
colomon hacking++
jnthn is doin' $dayjob
11:01 cogno left
colomon is trying to wake up 11:01
jnthn hands colomon coffee
colomon oh, hey, the sky has started to lighten a bit. 11:04
11:05 Italian_Plumber joined
colomon woah, our current temp is 32.1 F 11:06
jnthn That's almost freezing. :-)
colomon guess the frost advisory last night was serious. 11:07
11:09 jfried joined
colomon need to get a chimney sweep out here sometime soon. :) 11:11
masak rakudo: sub Good ($time) { say "Good $time #perl6." }; Good now # discovered by tylercurtis 11:15
p6eval rakudo 7c74c0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
masak std: sub Good ($time) { say "Good $time #perl6." }; Good now
p6eval std 237d266: OUTPUT«ok 00:01 119m␤»
masak submits rakudobug 11:16
I know what this is. it's the whitespace thingy inside the interpolator being too greedy/needy.
STD seems to get this right.
in Rakudo, the interpolator finds the ' #', thinks the rest of the line is a comment, and then dies. 11:17
we've had other similar cases of Rakudo doing run-on interpolation.
11:24 cogno joined 11:26 sjn left 11:30 sjn joined 11:36 cogno left 11:38 pythonian4000afk is now known as pythonian4000 11:42 pythonian4000 is now known as pythonian4000afk
colomon loliblogged: justrakudoit.wordpress.com/2010/10/...ng-a-rest/ 11:46
masak colomon++ 11:47
rakudo: class A { is $.foo }; say A.new 11:48
p6eval rakudo 7c74c0: OUTPUT«Null PMC access in find_method('foo')␤ in main program body at line 2:/tmp/fU0XFarW4n␤»
colomon masak++ for the golf
jnthn ew 11:49
masak submits rakudobug
jnthn what self is it finding? :S
Surprised it even gets to runtime :/
11:50 tadzik joined
jnthn colomon++# music pun blog post title 11:51
colomon part of the reason it took me so long to figure out was that the error happens when the class is used, not when it is defined. and they were in different files, so I assumed it had something to do with that.
masak rakudo: class A { $.foo }
p6eval rakudo 7c74c0: OUTPUT«Null PMC access in find_method('foo')␤ in main program body at line 2:/tmp/q6lguEgvit␤»
colomon woah
masak it doesn't even get to the 'is' call. 11:52
(which would fail unless you've loaded something like Test.pm)
colomon rakudo: class A { is $.foo };
p6eval rakudo 7c74c0: OUTPUT«Null PMC access in find_method('foo')␤ in main program body at line 2:/tmp/30Ss6nAcD7␤»
colomon huh. that compiled just fine, and maybe failed when it was "use"d. 11:53
masak colomon: learning which assumptions to question is what makes debugging a humbling experience. 11:54
colomon yes
masak colomon: yes, it would fail when use-d.
because that's when the class declaration code is executed.
colomon crazy 11:55
(I mean, it makes sense, but it makes for Null PMC at a distance, too!)
masak only because we haven't fixed this Null PMC Access bug :)
they're not supposed to be in there, you know :P 11:56
11:56 satyavvd left
tadzik "masak added github.com/ to web about 2 hours ago" 11:57
duh
masak I did? 11:58
rakudo: class A { self.foo }
p6eval rakudo 7c74c0: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
masak only the $.foo syntax causes a failure. interesting. 11:59
flussence rakudo: class A { has $.foo }; class B { it doesn't seem to care what I put in here $.bar };
p6eval rakudo 7c74c0: OUTPUT«Null PMC access in find_method('bar')␤ in main program body at line 22:/tmp/EwGOUlvy2m␤»
masak flussence: that's because expressions are evaluated from the inside out.
flussence: and because sub calls are late-bound. 12:00
flussence: STD does warn if you try to call a sub that's not in scope, though.
12:00 amkrankruleuen joined
masak so it is possible. but Rakudo doesn't, yet. 12:00
flussence just playing around, is this supposed to work? 12:04
rakudo: class A { say 'a'; }
p6eval rakudo 7c74c0: OUTPUT«a␤» 12:05
jnthn yes 12:07
masak flussence: bonus: also works the same in Perl 5. 12:12
mberends: sequel.rubyforge.org/rdoc/files/doc..._rdoc.html 12:18
12:19 ascent_ joined
[Coke] phenny: ask pmichaud if I can get a grant report. 12:24
phenny [Coke]: I'll pass that on when pmichaud is around.
12:24 MayDaniel joined
masak in the old blog post strangelyconsistent.org/blog/week-1...erver-live I recount how it was a problem that &slurp didn't have a :bin parameter... 12:25
&slurp still doesn't have a :bin parameter in Rakudo. :)
[Coke] (not that anyone is poking me, yet.)
masak [Coke]++ # following up 12:26
also from that post: "Taking stock of the current interest for Web.pm, it feels we're on track." -- ouch :/
12:29 cogno joined
[Coke] lacunaexpanse.com++ # awesome perl marketing. 12:34
12:35 ruoso joined 12:43 Aankhen`` joined 12:44 Aankhen`` left 12:45 cogno left 12:46 MayDaniel left, Kodi joined, cogno joined
Kodi my $x = 3; $x <<+=<< (1, 2, 3); # Is $x now [4, 5, 6]? 12:47
tadzik rakudo: my $x = 3; $x <<+=<< (1, 2, 3); say $x.perl 12:48
p6eval rakudo 7c74c0: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 205:CORE.setting␤ in 'hyper' at line 1␤ in 'hyper' at line 212:CORE.setting␤ in main program body at line 1␤»
masak Kodi: don't think so.
Kodi: $x is treated as one thing, not as a list of things.
Kodi masak: Then what ought $x to become? 12:49
tadzik rakudo: ((1,2,3) »+3).perl.say
p6eval rakudo 7c74c0: OUTPUT«===SORRY!===␤Missing « or » at line 22, near "3).perl.sa"␤»
tadzik rakudo: ((1,2,3) »+»3).perl.say
p6eval rakudo 7c74c0: OUTPUT«[4, 5, 6]␤»
12:50 cls_bsd left
masak Kodi: @$x, in ideal Perl 6. 12:50
12:51 cls_bsd joined
Kodi It does at least seem clear to me that 'my @x = 3; @x <<+=<< (1, 2, 3)' should make @x [4, 5, 6]. 12:51
12:53 amkrankruleuen left 12:55 takadonet joined
takadonet morning all 12:55
tadzik hi takadonet
13:03 wooden joined, wooden left, wooden joined, PZt left 13:04 awwaiid left 13:07 mfollett joined 13:09 wooden left, wooden joined 13:10 mfollett left, tadzik left 13:12 jferrero left 13:14 wooden left 13:15 Patterner left 13:18 orafu joined, wooden joined, wooden left, wooden joined 13:23 ab5tract joined, serk17 joined, serk17 left 13:29 PerlJam joined 13:30 Psyche^ joined, Psyche^ is now known as Patterner 13:34 nymacro joined 13:38 cogno left, kaare_ left 13:39 PZt joined 13:51 meppl joined 13:55 wooden left, wooden joined, wooden left, wooden joined 13:56 Mowah joined 13:57 Kodi left 14:01 wooden left, wooden joined 14:08 takadonet left 14:18 MayDaniel joined 14:20 patspam joined, molaf joined 14:22 PacoLinux left 14:23 molaf left 14:28 bluescreen joined 14:31 sftp joined 14:32 [Sec] joined, pdcawley left
[Sec] I want to convert "00:0b:fc:bb:80:38" to "000b.fcbb.8038", I cobbled together: $mac=join(".",(for $mac.split(":") -> $a,$b {"$a$b"})); 14:33
but is there a "nicer" way? :)
14:40 timbunce left
colomon rakudo: my $mac = "00:0b:fc:bb:80:38"; $mac.split(":").map(&[~]).join(".").say; 14:41
p6eval rakudo 7c74c0: OUTPUT«Method 'count' not found for invocant of class 'Perl6MultiSub'␤ in 'Any::join' at line 1␤ in main program body at line 22:/tmp/6JD0_re7yg␤»
colomon rakudo: my $mac = "00:0b:fc:bb:80:38"; $mac.split(":").map(* ~ *).join(".").say;
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
colomon rakudo: my $mac = "00:0b:fc:bb:80:38"; $mac .= split(":").map(* ~ *).join("."); say $mac
p6eval rakudo 7c74c0: OUTPUT«===SORRY!===␤Confused at line 22, near "$mac .= sp"␤»
colomon rakudo: my $mac = "00:0b:fc:bb:80:38"; $mac = $mac.split(":").map(* ~ *).join("."); say $mac 14:42
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
colomon exact same thing you did, but this is easier to read IMO.
[Sec] oh. so there is a multi-argument "map" :)
14:43 jest left
colomon for and map are basically just syntactic sugar for each other. :) 14:43
[Sec] I couldn't find out how to get map to take multiple arguments. 14:44
colomon you just pass it a closure that takes multiple arguments, and it automatically figures out what to do.
rakudo: my $mac = "00:0b:fc:bb:80:38"; $mac = $mac.split(":").map(-> $a,$b {"$a$b"}).join("."); say $mac 14:45
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
14:45 pdcawley joined
colomon (that's using the version you used, * ~ * does the same thing but is shorter.) 14:45
14:45 wtw left
jnthn Also .map("$^a$^b") is possible 14:45
er
[Sec] I think I have difficulties grasping the Whatever-star.
jnthn Also .map({"$^a$^b"}) is possible
flussence rakudo: my $mac = "00:0b:fc:bb:80:38"; $mac.comb(/<-[:]> ** 2/).join.comb(/. ** 4/).join('.').say
jnthn If the whatever star is too confusing. :-) 14:46
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
14:46 thepler joined
[Sec] rakudo: "00:0b:fc:bb:80:38".split(":").map(-> $a,$b {"$a$b"}).join(".").say 14:46
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
14:47 astinus joined
colomon rakudo: say "00:0b:fc:bb:80:38" ~~ /<hex>+/; 14:47
p6eval rakudo 7c74c0: OUTPUT«Method 'hex' not found for invocant of class 'Cursor'␤ in <anon> at line 22:/tmp/8qD4FxHyLb␤ in 'Cool::match' at line 2454:CORE.setting␤ in 'Regex::ACCEPTS' at line 5953:CORE.setting␤ in main program body at line 22:/tmp/8qD4FxHyLb␤» 14:48
[Sec] can I tell .fmt to eat two at a time?
masak not as such. 14:49
colomon afk
masak rakudo: say "00:0b:fc:bb:80:38".comb(/\d\d/).map({"$^a$^b"}).join(".") 14:50
p6eval rakudo 7c74c0: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in <anon> at line 22:/tmp/WAQkq7MYaa␤ in 'Any::join' at line 1␤ in main program body at line 22:/tmp/WAQkq7MYaa␤»
masak huh.
masak submits rakudobug
rakudo: say "00:0b:fc:bb:80:38".comb(/\d\d/).map({$^a, $^b; "$a$b"}).join(".") 14:51
p6eval rakudo 7c74c0: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in <anon> at line 22:/tmp/V5lkQ3tzpf␤ in 'Any::join' at line 1␤ in main program body at line 22:/tmp/V5lkQ3tzpf␤»
masak oh; maybe not a bug, then.
rakudo: say "00:0b:fc:bb:80:38".comb(/\d\d/).perl
p6eval rakudo 7c74c0: OUTPUT«("00", "80", "38")␤»
masak ahah.
rakudo: say "00:0b:fc:bb:80:38".comb(/[\d|<[a..f]>] ** 2/).perl
[Sec] you want /<xdigit>**2/ 14:52
p6eval rakudo 7c74c0: OUTPUT«("00", "0b", "fc", "bb", "80", "38")␤»
masak rakudo: say "00:0b:fc:bb:80:38".comb(/[\d|<[a..f]>] ** 2/).map({"$^a$^b"}).join(".")
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
14:52 PacoLinux joined
masak rakudo: say "00:0b:fc:bb:80:38".comb(/<xdigit>**2/).map({"$^a$^b"}).join(".") 14:52
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
[Sec] rakudo: "00:0b:fc:bb:80:38".comb(/<xdigit>**2/).map({$^a ~ $^b}).join(".").say;
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
[Sec] yes, thats exactly what I just tried :-) 14:53
masak rakudo: say "00:0b:fc:bb:80:38".comb(/<xdigit>**2/).map(*~*).join(".")
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
masak \o/
rakudo: say "00:0b:fc:bb:80:38".comb(/<xdigit>+/).map(*~*).join(".") 14:54
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤»
14:56 alester joined, wamba left
[Sec] thanks all :) 14:58
14:59 mfollett joined 15:01 patspam1 joined, ash_ joined
moritz_ good now, meta6ers 15:03
15:03 pmichaud joined
pmichaud good morning, #perl6 15:03
phenny pmichaud: 02 Oct 22:50Z <jnthn> tell pmichaud I've got to the point where my next blocker is PCT::HLLCompiler needing to be moved into the nqp-rx repo and (at lesat somewhat) nqp-ized.
pmichaud: 12:24Z <[Coke]> ask pmichaud if I can get a grant report.
jnthn phenny: I only sent that once. :P 15:04
o/ pmichaud
pmichaud but it's apparently important :-)
jnthn: okay, I'll work on getting HLLCompiler set up. Much of it is already nqp-ized (sorear++)
jnthn phenny++ # knowing what matters
15:04 patspam left
jnthn pmichaud: Nice :) 15:04
pmichaud My father is visiting today so it'll likely be tomorrow before I can really get to it -- will that be okay?
jnthn Yeah, I've gotta do $dayjob and slide prep and there's plenty of other bits I can be doing too. :-) 15:05
pmichaud okay, good
15:07 cjk101010 left
moritz_ pmichaud: have a few minutes for discussing regex adverbs? 15:08
(it's more about passing around data internally, actually)
(and not too urgent either) 15:09
masak and mberends are going biking for a bit
moritz_ hopes the weather in .nl is as fine as here in .de 15:10
pmichaud moritz_: only if it's really short 15:11
moritz_ pmichaud: then let's defer it
pmichaud I'll be around tomorrow (around #phasers), will have plenty of time and tuits for questions then 15:13
moritz_ maybe I'll just write a maili to explain the (perceived) problem, and we can discuss the solution on IRC
pmichaud wfm 15:14
15:14 timbunce joined, MayDaniel left 15:15 kst left, rbuels joined, MayDaniel joined 15:16 kst joined 15:18 PerlPilot joined 15:19 icwiener joined, PerlPilot left, icwiener left, icwiener joined
pmichaud afk for a while 15:20
bbl
15:21 wooden left, wooden joined 15:23 cdarroch joined, cdarroch left, cdarroch joined, PerlPilot joined, Ross joined, Ross left, Ross joined 15:27 orafu left, orafu joined
moritz_ nqp: 1.'foo'() 15:28
p6eval nqp: OUTPUT«Method 'foo' not found for invocant of class 'Integer'␤current instr.: '_block11' pc 33 (EVAL_1:12)␤»
15:41 timbunce_ joined 15:43 timbunce left, timbunce_ is now known as timbunce 15:44 spq1 joined, pyrimidine joined 15:45 ab5tract left 15:48 timbunce_ joined 15:51 timbunce left, timbunce_ is now known as timbunce 15:52 wooden left 15:54 jfried left, wooden joined, takadonet joined 15:55 cggoebel joined 15:56 ggoebel joined 16:05 Mowah left 16:06 ab5tract joined, nymacro left
TimToady rakudo: say "00:0b:fc:bb:80:38".subst(/':'/, '', :nth(1,3,5)) 16:07
phenny TimToady: 02 Oct 06:54Z <sorear> tell TimToady re. S12:1028, "multi subs with the same long name shadow", do 'multi sub foo($x where { $_ %% 2 })' and 'multi sub foo($x where { $_ % 2 == 0 })' have the same long name?
p6eval rakudo 7c74c0: OUTPUT«000b:fcbb:8038␤»
TimToady I would expect those to be considered different long names 16:08
16:08 Mowah joined
TimToady rakudo: say "00:0b:fc:bb:80:38".subst(/':'/, '', :nth(1,3...*)) 16:09
p6eval rakudo 7c74c0: OUTPUT«000b:fcbb:8038␤»
TimToady [Sec], masak: ^^^ 16:10
colomon TimToady++ 16:14
16:15 cogno joined 16:16 cls_bsd left 16:17 cls_bsd joined 16:19 patspam1 left
colomon rakudo: say "00:0b:fc:bb:80:38".subst(/':'/, '', :nth(1,3...*)).subst('.') 16:19
p6eval rakudo 7c74c0: OUTPUT«No applicable candidates found to dispatch to for 'subst'. Available candidates are:␤:(Mu : Any $matcher, Any $replacement, Any :samecase(:ii($samecase)), *%options)␤␤ in main program body at line 22:/tmp/ITXAaYEi9a␤»
colomon rakudo: say "00:0b:fc:bb:80:38".subst(/':'/, '', :nth(1,3...*)).subst(':', '.') 16:20
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb:8038␤»
colomon rakudo: say "00:0b:fc:bb:80:38".subst(/':'/, '', :nth(1,3...*)).subst(/':'/, '.')
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb:8038␤»
moritz_ rakudo: $_ = '00:0b:fc:bb:80:38'; s:nth(1, 3 ... *)/\://; s:g/\:/./; .say
p6eval rakudo 7c74c0: OUTPUT«000b.fcbb.8038␤» 16:21
colomon is very glad s:nth works, but has to admit he prefers .subst at this point. :)
16:22 cogno left
moritz_ bah, old school :-) 16:22
16:26 wooden left, wooden joined
moritz_ fwiw I think I have ms// now working 16:26
it's a bit hacky... need to get some code review/better ideas
16:26 timbunce left 16:27 Axius joined
colomon which is ms// ? 16:28
16:30 wooden left
PerlPilot is aware of ss/// and mm//, but not ms// 16:31
16:31 baux left
TimToady mm changed to ms some time ago for consistency 16:32
PerlPilot ah
16:32 wooden joined, wooden left, wooden joined
moritz_ m:s// 16:35
16:38 tadzik joined 16:41 wooden left
tadzik oh hai 16:41
dalek kudo: 2ee5db9 | moritz++ | src/Perl6/Grammar.pm:
implement ms// regex constructor

Not sure if this is the best way, but all other ways I tried lead to a significant more complex action method.
16:41 wooden joined, wooden left, wooden joined 16:43 timbunce joined 16:44 Axius left
moritz_ phenny: tell pmichaud my adverb question turned into a call for review for 2ee5db94. We'll need to do the same for s///, so should I abstract that ugly code block into a sub or method or something? 16:44
phenny moritz_: I'll pass that on when pmichaud is around.
17:00 justatheory joined 17:02 tylerni7 joined, PerlPilot left 17:03 am0c^ left
TimToady someone with a mathematical bent might enjoy working on rosettacode.org/wiki/Thiele%27s_int...on_formula 17:06
dukeleto TimToady: you rang? 17:08
17:08 molaf joined
dukeleto TimToady: that looks like it could be a fun use of metaops 17:11
17:14 mikehh joined 17:17 alester left 17:20 bluescreen left, pdcawley left, bluescreen joined 17:24 timbunce left 17:34 Entonian joined 17:37 mikehh left 17:38 PerlJam left, PerlJam joined 17:40 ab5tract left 17:44 masonkramer left, masonkramer joined 17:49 mikehh joined 17:52 sjn left 17:54 sjn joined, wamba joined 17:57 molaf left 17:59 buu left, buu joined 18:00 orafu left 18:01 M_o_C joined 18:02 timbunce joined, molaf joined 18:04 timbunce left 18:14 molaf left
colomon dukeleto, TimToady: wow, maybe I'm wearing my dense hat today, but that Rosetta Code explanation makes no sense to me. 18:15
slavik colomon: which one?
colomon rosettacode.org/wiki/Thiele's_inter...on_formula
slavik that is clearly 100 IQ points above my level 18:16
shortcircuit Yeah, that task is still getting worked on. 18:17
The seed ALGOL68 version was only understood by its creator.
slavik shortcircuit: please tell us he's not dead
tadzik creator, or algol? 18:18
shortcircuit Dkf wasn't able to build a Tcl version until NevilleDNZ (the guy who wrote the task and ALGOL68 version) supplied a C version.
colomon it seems like the problem statement is missing half the explanation.
shortcircuit Please, leave a note in the task's talk page. I did what I could by pulling in the description of a reciprocal difference, but the Wikipedia page didn't have a very good treatment of Thiele's. 18:19
colomon and the wikipedia article appears to have even less information than the RC challenge. :(
shortcircuit You want to know the real WTF here? the WP page will probably eventually cite the RC page as a reference. 18:20
Between WP and RC, there's something of an odd echo chamber effect. 18:22
colomon afk 18:24
dukeleto from what I can gather: you build an interpolation function (just a collection of (x,y) pairs really) and then with that data, you can build up the inverse fuction i.e. (y,x) pairs 18:25
the description looks like it was put through google translate a few times by a sadistic monkey 18:26
shortcircuit Hehe
18:27 envi left
shortcircuit mathworld.wolfram.com/ThielesInterp...rmula.html has even less info than WP, but it's distilled, at least. 18:28
The RC task looks like more of an *application* of the formula, rather than simply an implementation of it. 18:29
Unfortunately, the implementation appears to get lost in the application.
masak TimToady++ # :nth(1,3...*) 18:37
what happens if the :nth thingy turns out to be a non-monotonic sequence? 18:38
moritz_ then the runtime is allowed to produce indetermined results 18:39
masak ok.
flussence rakudo: my $str = 'qwertyuiopasdfghjkl'; $str ~~ s:nth(4,2,1...0.125)/.//; 18:40
p6eval rakudo 7c74c0: ( no output )
flussence rakudo: my $str = 'qwertyuiopasdfghjkl'; $str ~~ s:nth(4,2,1...0.125)/.//; say $str;
p6eval rakudo 7c74c0: OUTPUT«qwetyuiopasdfghjkl␤»
jnthn
.oO( that's an interesting phrasing of, "no, you don't get a masakbug out of this one" ;-) )
jnthn tries to focus on his @slide 18:41
moritz_ rakudo: say 'ab cd' ~~ ms/<alpha>+ <alpha>/
p6eval rakudo 7c74c0: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'ab cd"␤»
flussence rakudo: my $str = 'abcdefghijklmnopqrst'; $str ~~ s:nth(1,3,6,3,1)/.//; say $str;
p6eval rakudo 7c74c0: OUTPUT«bdeghijklmnopqrst␤»
18:42 plainhao joined
flussence rakudo: my $str = 'abcdefghijklmnopqrst'; $str ~~ s:nth($str.chars * rand)/.//; say $str; 18:42
p6eval rakudo 7c74c0: OUTPUT«abcdefghijklmnopqrst␤»
flussence doesn't like non-Int numbers?
rakudo: my $str = 'abcdefghijklmnopqrst'; $str ~~ s:nth(4.3)/.//; say $str; 18:43
p6eval rakudo 7c74c0: OUTPUT«abcdefghijklmnopqrst␤»
flussence apparently not...
18:44 PerlPilot joined
masak jnthn: I wasn't fishing for bugs, I was just curious :) 18:46
jnthn ;-) 18:48
masak: How's .nl? 18:49
moritz_ masak: sure :-)
masak jnthn: so far, the food is above expectations. mberends++
moritz_: I'm being earnest, but I can see why you wouldn't believe me :) 18:50
jnthn :-) 18:51
masak: Sounds nice :-)
masak jnthn: yes; you'll like it here. 18:53
jnthn Of course, it's .nl. :-) 18:54
18:57 MayDaniel left
masak is so full of good nom :) 18:58
time to dig into some serious hacking!
jnthn \o/
What's on the hackmenu?
18:59 masak left, masak joined
masak jnthn: Web.pm, mostly. 18:59
sjohnson C:\hax0rtools\hack.exe --target=system --mode=raw 19:00
19:00 mfollett left 19:01 wooden left
masak sjohnson: I see you just had a lue moment. :) 19:01
19:01 wooden joined, wooden left, wooden joined
tadzik Web! \o/ 19:01
masak it's about time!
masak-- # unable to finish things 19:02
tadzik ++masak # motivation karma. „Karma” means food in Polish, especially food for animals 19:04
sjohnson whats a lue moment? is lue using the same hacker tools? :)
masak 'karma' means 'food' in Polish, and 'masak' means 'cooking' in Malay :P 19:05
tadzik :D
masak sjohnson: it just sounded like a thing lue might say :)
jnthn tadzik: Is "jest" the Polish verb "to eat", btw?
sjohnson masak: he tought me everything i know
tadzik jnthn: no, it's "is", "(he/she/it) is" to be precise 19:06
masak sjohnson: :)
jnthn Aww. :-)
masak jnthn: make sense too, though?
jnthn Yeah, I can see the Slovak-ish relation. :-)
tadzik jnthn: "I am => Ja jestem", "He is => On jest"
yep, we're all Slovians :) 19:07
seen jest
aloha jest was last seen in #perl6 7 hours 47 mins ago joining the channel.
tadzik when he leaves #perl.pl I like saying "Nie ma", which is sth like "There is none" 19:08
masak jnthn: and to Russian. if there had been a present-tense form "is", it'd totally be ест
tadzik not so funny when translated
masak tadzik: fwiw, I thought it was funny.
tadzik :)
masak but my brain can read some Polish.
tadzik "He isn't" sounds better 19:09
jnthn masak: есть is "to eat" :P
masak jnthn: I know, I know :)
jnthn Too bad
19:09 mfollett joined
tadzik jeść :) 19:09
jnthn I bet it'd be possible to make some great puns.
:-)
masak jnthn: I'm just asking you to imagine a full-featured "to be"-style verb in Russian. 19:10
what would it look like? fill in the blanks.
jnthn Probably various things starting with "е" :-) 19:11
masak go on...
jnthn The infinitive "to be" is just like in Slovak.
tadzik few times I was in Russian territory near Poland, I could usually talk with people speaking in Polish, they speak Russian and we undestand each other
jnthn The past forms of it are similar (vowel difference, 'tis all)
masak tadzik: I've seen that happen in places not near the Polish-Russian border as well. 19:12
jnthn masak: I'd look to what Ukrainian and Belorusian do but (a) I hardly know either, though I sometimes accidentally speak the former and (b) afaik they skip the present tense "to be" as well. 19:13
masak huh. 19:14
still, there's some intriguing research to be done there.
tadzik hmm, pardon my French, but I see "your colon is full of shit" on reddit. What's "colon" in this context?
jnthn :
masak tadzik: that's a pun.
tadzik hmm
I see no sense when colon means ":"
masak: hm?
jnthn
.oO( well, this puts a whole new slant on "Larry gets the colon..." )
masak tadzik: "colon" also means "big intestine"
tadzik ah 19:15
masak tadzik: en.wikipedia.org/wiki/Colon_(anatomy)
tadzik now it makes sense
jnthn masak: Yes, I'd be curious to know how it happened.
tadzik I was thinking around "colonel" for some reason
jnthn masak: I would guess it was there in Proto-slavic.
masak jnthn: I'd be curious to see to what extent it could actually be reconstructed in Russian. 19:16
jnthn Aye.
masak jnthn: and then we could go there and mess with people's heads by using the verb in sentences :P
jnthn lol
masak "wtf, that sounds right...!?" 19:17
jnthn At lesat Ukrainian has a verb "to have". :-)
tadzik something similar to „mieć”?
jnthn tadzik: mat' is the Slovak infinitive, and I think in Ukrainian it's the same too or close.
masak jnthn: Russian too. it's called "У-меня-есть" :P 19:18
jnthn iirc, "Я мою..." = "I have"
In Slovak it's "Ja mam"
masak just "mam" in Polish.
jnthn I searched for ages for a Slovak expression that sounded like "so fat"
masak 哈哈 19:19
jnthn Yes, in Slovak "mam" was normally sufficient too.
Unless emphasis was wanted in my possessiveness.
er
possession
tadzik "Ja mam" is specifically "I have", "Mam" is like "have", but there is no disambiguation, for "you have" is "ty masz", "he has" is "on ma", etc
jnthn ...I'm sure that has too many s's.
masak has passed the 1024 RT tickets mark o/ 19:21
tadzik yay :)
jnthn Whoa.
masak let me post all the latest numbers for you.
gist.github.com/610270 19:22
19:22 takadonet left
jnthn "1 ticket was submitted 5 times" 19:24
!!!
masak want me to find out which one?
jnthn Whoa...moritz++ for ticket closing
masak I'm a bit curious myself.
jnthn masak: I'm...curious. That ticket must have an interesting history. :-)
You'd think it'd be notorious. 19:25
masak suspects he did most of the redundant bug submittings on that one :P
19:25 timbunce joined
masak aaaah. 19:27
yes, quite an obvious one.
and, one could argue, well-deserved. 19:28
rt.perl.org/rt3/Ticket/Display.html?id=74078
it did actually have several different requestors.
jnthn omfg that one
19:29 alester joined
jnthn wait...is it still open? 19:29
rakudo: role Foo { method foo {say 666;}; }; class A does Foo {}; A.new.foo
p6eval rakudo 2ee5db: OUTPUT«666␤»
jnthn I fixed that. :P
Status: open
:/
masak I remember you fixing that. 19:30
clearly we don't have enough eyeballs on RT.
maybe there are too many tickets in there for people to be able to get an overview.
tadzik hmm. There is a Perl 5 module, Carp::Always::REPL or something, launching the REPL after some die(), so you can inspect variables and stuff. How does one achieve something like this in Perl 6?
masak someone should close a few tickets or something.
sjohnson open source faires will save us 19:31
jnthn I remember the early days, when dinasours roamed the earth and I could keep the whole queue in my head 'cus it was < 150 tickets. :-)
masak yah. sure spoiled that Eden-like state. 19:34
masak cackles
I remember when it was fun to try to raise the new/open ticket level, because jnthn + pmichaud would try to fight back :) 19:35
jnthn Turned out "try" was the operative word :P
moritz_ did close many tickets, but didn't fix many at all
tadzik TIL: Python has _ like Perl has $_. They just cut the '$' part 19:36
masak jnthn: to your credit, both you++ and pmichaud++ have closed a massive percentage of the bugs out there, either directly or indirectly through moritz_++
jnthn moritz_: You did help make sure they stayed fixed though :-)
masak tadzik: how often do they use it? 19:37
tadzik masak: no eye deer. I'm looking through the docs, and I find it stupid that they have round(Num, Int), but not Num.round(Int)
masak what's the Int do? 19:38
sorear good * #perl6
tadzik round(6.123141, 2) gives 6.12
hello sorear
masak ah. number of decimal places.
sorear! \o/
dalek ast: 0676d53 | moritz++ | S10-packages/basic.t:
mark a test for RT #73740
shortcircuit As oposed to significant digits? 19:39
19:39 plainhao left
shortcircuit ponders the utility of round(666000, 2) returning 667000. 19:39
er
670000 19:40
tadzik oh, funny
jnthn I actually *did* have a (real world) use case for rounding to a number of sig figs recently. 19:41
19:42 takadonet joined
colomon rakudo: 6.123131.round(2) 19:42
p6eval rakudo 2ee5db: ( no output )
colomon rakudo: say 6.123131.round(2)
p6eval rakudo 2ee5db: OUTPUT«6␤»
jnthn o.O
tadzik that's nothing
shortcircuit rakudo: say (6.123131).round(2)
p6eval rakudo 2ee5db: OUTPUT«6␤»
tadzik rakudo: 2.1241.round(3).say
check this out ↑ 19:43
p6eval rakudo 2ee5db: OUTPUT«3␤»
flussence rakudo: my $x = 6; say $x.123131;
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Confused at line 22, near "say $x.123"␤»
masak o.O
tadzik now, what is our round() doing?
masak checks spec
tadzik 1241.round(3) is 1242
dalek ast: e961941 | moritz++ | S10-packages/basic.t:
[S10] package Foo; indicates perl 5 code; RT #75458
19:44
masak oh!
its positional parameter is called $scale.
it's meant to be used thusly:
rakudo: say 123.456.round( 1/100 )
p6eval rakudo 2ee5db: OUTPUT«123.46␤»
tadzik mhm
rakudo: 123.4567.round(0.001).say 19:45
p6eval rakudo 2ee5db: OUTPUT«123.457␤»
tadzik rakudo: 12345.round(1000)
p6eval rakudo 2ee5db: ( no output )
tadzik rakudo: 12345.round(1000).say
p6eval rakudo 2ee5db: OUTPUT«12000␤»
tadzik good enough for me :)
masak I'm getting less and less happy with the .say method. 19:46
tadzik looks at the implementation
why so?
masak it feels wrong.
tadzik rakudo: 123.4567.round(0.001).note
p6eval rakudo 2ee5db: OUTPUT«123.457␤»
masak rakudo: .&say for <1 2 3>
p6eval rakudo 2ee5db: OUTPUT«1␤2␤3␤»
masak now that we have .&say, why should we cling on to .say?
and mess up the OO hierarchy in the process. 19:47
recall that IO.say does something completely different from Mu.say
ash_ rakudo: 1.&say;
p6eval rakudo 2ee5db: OUTPUT«1␤»
moritz_ rakudo: $*IN.say
ash_ what does .& do? pass self as to &whatever?
p6eval rakudo 2ee5db: ( no output )
masak rakudo: $*OUT.say("OH HAI") 19:48
p6eval rakudo 2ee5db: OUTPUT«OH HAI␤»
tadzik having sometimes .foo and sometimes .&foo would be hell confusing
moritz_ ash_: $thing.$codref is the same as $coderef($thing)
masak ash_: $obj.&fun($args) means &fun($obj, $args)
sorear jnthn: niecza doesn't even have a bug queue, so it's quite easy to remember :)
ash_ ah, kk, makes sense, i should of known that, i have used that sort of syntax before 19:49
we could always replace .say with .println # kidding... 19:51
tadzik hy
or .puts
ash_ rakudo: say ~Mu.^methods; 19:52
p6eval rakudo 2ee5db: OUTPUT«clone defined bless BUILD BUILDALL CREATE new PARROT WHENCE WHERE WHICH Bool item notdef note so not perl print say Capture WALK␤»
masak the way I see it, the big use case for '.say' was having something simple to correspond to Perl 5's `say for @things;` construct.
TimToady the whole point of anything being in Any or Cool is to mess up the OO hierarchy. we're not gonna change something beautiful to something ugly in order to stop having "linguistic" methods that are outside the normal OO hierarchy
masak TimToady: okay, okay. we've had this discussion before; I actually didn't expect to sway you. I'll go back to coding. :) 19:53
ash_ is .say on Mu or Any/Cool?
masak is there a way to ask a method "which class/role am I defined in?" 19:54
19:54 Italian_Plumber left
TimToady by method I presume you mean the function object in question? 19:55
masak right.
Juerd Where was I originally defined, when did I get redefined, what wraps around me and what am I wrapping, am I pure, what's the meaning of life? 19:56
TimToady well, certainly STD tracks where things are defined, but I don't know how to get such info out of rakudo
it's not specced that I recall
masak rakudo: say 42.can("say").signature.params[0].type 19:57
p6eval rakudo 2ee5db: OUTPUT«Mu()␤»
masak rakudo: say 42.can("round").signature.params[0].type
p6eval rakudo 2ee5db: OUTPUT«Real()␤» 19:58
19:58 mfollett left
ash_ well, that solves that problem :P 19:58
tadzik rakudo: say 42.can("say").signature.params[1].type
p6eval rakudo 2ee5db: OUTPUT«Mu()␤»
Grimnir_ is there a way to get the value of an attribute in a role or class? if I have class crap { $.snot = "barf"; $.eat = "me" } and my $c = crap.new(); - how can I get the attributes? I want to have a role that can enumerate the variables in the class.
masak Grimnir_: you need to work on your metasyntactic variables :P 19:59
19:59 takadonet left
diakopter is there a way to do .can("methodName") with args (or a list of argtypes) to resolve multimethods 19:59
ash_ .can('name').assuming ?
masak Grimnir_: check out .^attributes in S12. 20:00
sorear for $c.^attributes -> $attr { say $attr => $c."$attr" }
Grimnir_ masak: yes, I forgot "has", if that's what you mean :)
masak diakopter: you get a list of multimethods back, which I guess you can grep.
Grimnir_ sorear: yes! that's the one
masak Grimnir_: no, I meant the names you had instead of "x", "y", "foo" or "bar"... :)
sorear diakopter: .can returns entire sets of multimethods, which will be resolved when you call them
diakopter masak: right, but I mean one that actually runs the multimethod resolver.
Grimnir_ masak: aah, hehe :) 20:01
masak diakopter: actually, I'd like to see the multimethod resolver itself being more transparent and introspectable.
diakopter masak: that's what I'm asking
masak diakopter: then, me too.
Grimnir_ sorear: but it doesn't work
masak <aol />
Grimnir_ I'll look at S12
but I think I did look at S12 20:02
masak look again! :)
but feel free to bug us in the meantime.
20:02 mfollett joined
masak that's the MO of most of us regulars, anyway... 20:02
Grimnir_ oh yeah. how the hell did I miss that...
ash_ TimToady: for prototype-based inheritence, where you thinking of having a different keyword for declaring them? like instead of class? 20:03
TimToady what is the "declaration" of which you speak? :) 20:04
ash_ well, how do you tell p6 that a class is prototype based?
jnthn package_declarator:sym<thingummy>
TimToady I think of prototype inheritance as completely run-time
Grimnir_ masak: I like to bug you, but I sometimes think I'm too much of a noob and ignorant
masak Grimnir_: a lot of people have said approximately the same thing many times on this channel. including me. 20:05
ash_ so, it would use the same package_declarator (thanks jnthn++ i didn't remember about that) as normal classes?
TimToady why do you want to declare something? 20:06
masak Grimnir_: I guarantee though, that the best way to improve is to keep asking possibly noobish questions :)
TimToady you just need some way of attaching methods to the current object
ash_ TimToady: well, i figured prototype classes would have a different meta-model
Grimnir_ masak: great. that won't be a problem ;)
rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); for $c.^attributes -> $attr { say $c."$attr" }
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments at line 22, near " }"␤»
Grimnir_ rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); for $c.^attributes -> $attr { say ($c."$attr") } 20:07
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments at line 22, near ") }"␤»
Grimnir_ what's up with that?
jnthn $c."$attr"()
Grimnir_: I think that one is to catch oopsies by Perl 5 folks. :-)
TimToady ash_: in prototypes there is no class, only delegation 20:08
jnthn rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); for $c.^attributes -> $attr { say $c."$attr"() }
p6eval rakudo 2ee5db: OUTPUT«Method '$!snot' not found for invocant of class 'crap'␤ in <anon> at line 22:/tmp/3_1bwY7aGv␤ in main program body at line 1␤»
Grimnir_ rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); for $c.^attributes -> $attr { say $c."$attr"() }
p6eval rakudo 2ee5db: OUTPUT«Method '$!snot' not found for invocant of class 'crap'␤ in <anon> at line 22:/tmp/zg0CRXP0XG␤ in main program body at line 1␤»
Grimnir_ it's not a method 20:09
jnthn oh, needs stripping
rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); for $c.^attributes -> $attr { say $c."$attr.substr(2)"() }
p6eval rakudo 2ee5db: OUTPUT«Method 'substr' not found for invocant of class 'Attribute'␤ in <anon> at line 22:/tmp/GvC2hySFkn␤ in main program body at line 1␤»
jnthn tssk
rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); for $c.^attributes -> $attr { say $c."$attr.name.substr(2)"() }
p6eval rakudo 2ee5db: OUTPUT«barf␤me␤»
Grimnir_ it does that a lot. saying that Attribute doesn't have that method
jnthn ...eww.
Well, yeah
rakudo: say Attribute ~~ Any 20:10
p6eval rakudo 2ee5db: OUTPUT«1␤»
jnthn rakudo: say Attribute ~~ Cool
p6eval rakudo 2ee5db: OUTPUT«0␤»
masak submits rakudobug
jnthn Attributes aren't cool.
masak: huh.
tadzik :)
masak I'm assuming that they should be... :)
tadzik Perl 6. Attributes aren't Cool.
jnthn I'm not at all convinced meta-objects should be in Cool.
masak apparently it's bugging people that they're not.
ash_ Attribute.nqp says: class Atttribute is Any; 20:11
masak jnthn: is it the circularity that's bothering you?
jnthn masak: Yes.
I'd rather we're conservative on this for now.
We can move stuff deeper later maybe.
masak fair enuf.
jnthn I guess Cool doesn't have any attributes though.
masak bug retracted. for now.
jnthn So we probably get away with making it Cool 20:12
OOC
masak if I see this coming up again, I will submit a bug.
jnthn rakudo: say Method ~~ Cool
p6eval rakudo 2ee5db: OUTPUT«1␤»
masak \o/
jnthn oh, hm
OK, I guess I can argue consistency there.
masak submits anyway, then
jnthn rakudo: say ClassHOW ~~ Cool # no wei :-)
p6eval rakudo 2ee5db: OUTPUT«0␤»
masak that's different.
jnthn rakudo: say ClassHOW ~~ Any
p6eval rakudo 2ee5db: OUTPUT«0␤»
jnthn Aye 20:13
I'm not sure on whether it should be in Any.
If it's not we maybe make life harder than we want for the meta-programmer.
20:13 wooden left
masak I think it should. 20:13
jnthn The circularity gets a nuisance to resolve though.
Grimnir_ so if I want the contents of the second attribute, how do I do that?
masak but I'm not sure I have the whole picture.
jnthn masak: I'm not sure I do and I'm implementing this stuff. :P 20:14
ash_ Grimnir_: second of what?
sorear niecza has two classhows
ash_ [2] ?
sorear one of them is Any, the other is Moose::Object
ash_ or [1] rather, silly 0
sorear This is Not Idea.
l
20:14 wooden joined, wooden left, wooden joined
jnthn masak: I'm not sure if ClassHOW.HOW will end up being a KnowHOW or NQPClassHOW. 20:14
Grimnir_ rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); for $c.^attributes -> $attr { say $c."$attr.name.substr(2)"() } 20:15
p6eval rakudo 2ee5db: OUTPUT«barf␤me␤»
TimToady rakudo: say +Method
p6eval rakudo 2ee5db: OUTPUT«0␤»
TimToady that seems completely bogus to me
Grimnir_ it prints out the contents of both
jnthn ...no warning?
Grimnir_ oh, just a second
sorry
masak submits +Method rakudobug
jnthn TimToady: Should it warn or should Method not be Cool?
20:16 mikehh left
TimToady Cool is for emulating P5ish scalar semantics, not for anything that wants to be able to stringify 20:16
other types can stringify or numify without being in Cool
jnthn Trpp
gah
True.
TimToady but why would you ever want to numify Method?
Grimnir_ rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); my @contents; for $c.^attributes -> $attr { @contents = $c."$attr.name.substr(2)"() }; @contents[0].say 20:17
p6eval rakudo 2ee5db: OUTPUT«me␤»
jnthn TimToady: Once, thanks to Parrot, our multis numified to the number of candidates. ;-)
TimToady Cool is mostly to handle generic datums, for some very ordinary value-ish definition of datum
jnthn rakudo: multi foo() { }; multi foo($x) { }; say +&foo 20:18
Grimnir_ oh, stupid me
p6eval rakudo 2ee5db: OUTPUT«2␤»
jnthn ffs. :-)
jnthn dies a bit more inside.
ash_ +&method returns the number of multi's?
jnthn ash_: I'm pretty sure it's not meant to in Perl 6. :-)
ash_ it just does by chance? :p
masak not sure we have a ticket for this already. 20:19
jnthn ash_: Way back in the anals of history, somebody decided that the obvious thing MultiSub should inherit from is...ResizablePMCArray.
masak I'm creating one Justin Case.
tadzik . o O ( busak submits makudobug )
Grimnir_ rakudo: class crap { has $.snot = "barf"; has $.eat = "me" }; my $c = crap.new(); my $contents; my @contents = $c.^attributes; $c."@contents[0].name.substr(2)"().say
p6eval rakudo 2ee5db: OUTPUT«barf␤»
Grimnir_ ok, it's not that pretty, but it works
tadzik meh, I messed up
masak jnthn: that's... deplorable. :'(
tadzik should be: rasak
Grimnir_ I was trying to copy a Java generics example to learn how it works and learn how to do stuff in Perl6 and hopefully afterwards to do it in a much nicer way 20:20
jnthn masak: Yes, well, we'll have abandoned most of Parrot's built-in PMCs in a couple of months I expect.
TimToady testing for such accidental supersets of Perl 6 is going to be...hairy... 20:21
but if we don't, someone will start depending on it
jnthn TimToady: Yes.
TimToady: Worries me a bit too. 20:22
TimToady: Considering Rakudo in a multi-backend-y kinda way is making me think about quite a few things differently.
20:23 wooden left
jnthn TimToady: It seems to boil down to, I want to depend on as little specific to a given VM as is sane so as to reduce the surface area for incompatibilities/quirks. 20:23
TimToady otoh, the more you depend, the more you can optimize :/
jnthn Well, yeah.
20:23 wooden joined
jnthn Thus the "as is sane". :-) 20:23
(I consider being slow rather than pragmatic insane. :-)) 20:24
[Coke] apologizes for parrot defaults not being perl6 defaults in all cases. 20:25
jnthn [Coke]: No need to apologize at all.
[Coke] Oh, I'm apologizing to masak. :P
PerlJam once jnthn implements 6model and the parrot folks adopt 6model as parrot's object model, we'll be able to optimize by increasing dependencies :)
TimToady
.oO("Implementation is using is-a where it should be has-a at foo line 42" :)
jnthn PerlJam: :P 20:26
20:26 mfollett left, pythonian4000afk is now known as pythonian4000
TimToady nop & 20:27
jnthn PerlJam: I'm yet to be convinced that'll happen. 20:28
20:28 cls_bsd left, cls_bsd joined
masak [Coke]: no apology needed. and I was describing the leak in Rakudo as deplorable. 20:29
PerlJam jnthn: nor am I. But I am wearing my optimism hat on that subject for a while anyway.
masak zzz &
jnthn PerlJam: It's a mixed blessing. At the moment 6model can, at a whim, change.
20:29 masak left
PerlJam whims++ :) 20:30
actually ... (anything not subject to some deprecation policy)++
jnthn PerlJam: OTOH, the design is such that not much is in its core, so I guess it's less of a problem than with the current model if languages want to change things.
jnthn wonders what on earth he ate today to make his stomach feel so unhappy :-/ 20:31
tadzik has-a is so Rubyish 20:32
20:32 M_o_C left
gottreu has-a is so 1980's AI 20:32
20:32 wamba left
tadzik . o O ( obj.is_a?(Class) ) 20:33
ash_ obj ~~ Class?
tadzik nah, I'm speaking Ruby
not just .isa, and not even .is_a 20:34
jnthn The important thing is if the thingy that describes a class is an object. :-) 20:35
tadzik ermm, isn't it another way around? 20:36
like, class is the specification and object is an implementation? :)
jnthn Actually it's both ways around. :-) 20:38
A class is a kinda blue-print for instances of it, but another object (meta-object) describes the semantics of a class. 20:39
diakopter jnthn: the anals of history indeed. 20:42
jnthn ...I think I meant annals. :-) 20:43
PerlJam heh
jnthn Spelling. Sometimes it matters. :-)
dalek rixel: f964137 | diakopter++ | sprixel/ (4 files):
more cleanup & progress toward lexicals in closures
21:00 stkowski joined 21:03 billgosh left
tadzik stackoverflow.com/questions/3858790...ike-perl-6 21:08
nice. Python people missing things from Perl 6.
It has started! Soon they will want regexes and Grammars :)
21:09 GuHa joined
colomon :) 21:10
21:15 wooden left, wooden joined, wooden left, wooden joined 21:17 Ross left 21:21 bluescreen left
tadzik night.good 21:23
21:23 tadzik left 21:24 wooden left 21:25 wooden joined 21:32 Mowah left
hudnix rakudo: class A {method a { method b {say "42"}}}; A.new.b 21:34
p6eval rakudo 2ee5db: OUTPUT«42␤»
diakopter :)
hudnix weird -
sorear I can see how that happens
GuHa perl6: say 3; 21:35
p6eval pugs, rakudo 2ee5db: OUTPUT«3␤»
sorear there is an ad-hoc prohibition against it in niecza
PerlJam that doesn't seem weird to me.
It's the same things with subs in perl 5 today
sorear TimToady: Is there a subtype relationship between Array[Any] and Array[Int]? 21:38
jnthn sorear: S14 says yes.
21:38 pyrimidine left
jnthn sorear: In general, R[S] ~~ R[T] 21:39
If S ~~ T
sorear: I remember asking TimToady that one a year or two back in meatspace and then implementing the answer. :-)
PerlJam: It works very naturally imho because methods just lead to a .^add_method call on the meta-object, and it does that on the nearest package meta-object, which is probably a contextual or contextual-ish. 21:41
jnthn afk a little 21:42
21:42 spq1 left
sorear S14:558 seems to think Int is a subtype of Num 21:50
In general I'm not happy with Array and Hash being roles 21:52
Even less so uint
colomon S14 needs fixing, then.
21:55 ruoso left
sorear rakudo: subtype Foo of Int where *.defined; say Foo.WHAT, Foo.defined 22:01
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Confused at line 22, near "subtype Fo"␤»
22:03 wooden left, wooden joined 22:04 PerlPilo1 joined 22:05 dakkar left
jnthn Int as a subtype of Num is decidedly fossil 22:09
22:09 GuHa left
jnthn (Was likely still true when that bit of S14 was written) 22:09
s/subtype/subset/
s_mosher rakudo: my @a = 1,2; say @a[1..0];
p6eval rakudo 2ee5db: OUTPUT«␤» 22:10
s_mosher can I depend on that?
sorear yes 22:12
s_mosher marvellous
this makes a few math-y things much simpler than otherwise 22:15
22:26 aloha left, aloha joined 22:33 stkowski_ joined 22:36 stkowski left, stkowski_ is now known as stkowski 22:39 am0c^ joined 22:44 cls_bsd_ joined 22:45 cls_bsd left 22:47 xabbu42 joined, cdarroch left
ash_ rakudo: my @a = 1,2; say @a[1...0]; 22:52
p6eval rakudo 2ee5db: OUTPUT«21␤»
22:52 alester left 22:53 Entonian left
colomon rakudo: <1 2 3 -1>.min(&[<=>]).say 22:53
p6eval rakudo 2ee5db: OUTPUT«Method 'arity' not found for invocant of class 'Perl6MultiSub'␤ in 'Any::min' at line 1455:CORE.setting␤ in main program body at line 22:/tmp/SHH_OCefDC␤» 22:54
colomon seems like that worked at one point post-'alpha'? 22:55
TimToady rakudo: <1 2 3 -1>.min(* <=> *).say 22:59
p6eval rakudo 2ee5db: OUTPUT«-1␤»
TimToady the problem is &[<=>], not min 23:00
colomon TimToady: yes, I know.
but &[<=>] is supposed to work, yes?
and it definitely did, I've got it in some of my older code here. (which I'm trying to get to work again.)
ash_ rakudo: <1 2 3 -1>.min({ &[<=>]($^a, $^b) }).say 23:01
p6eval rakudo 2ee5db: OUTPUT«-1␤»
23:01 timbunce left
TimToady is supposed to work, though TheDamian suggests it's rather redundant with *op* now 23:02
colomon TheDamian++, as usual. :)
that's exactly what I've just changed my code to do.
TimToady otoh
rakudo: say 1.&[==](1)
p6eval rakudo 2ee5db: OUTPUT«Bool::True␤»
23:03 awwaiid joined
TimToady rakudo: say 1.&(* == *)(1) 23:04
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "&(* == *)("␤»
23:09 icwiener left, am0c^ left 23:12 mavrc left 23:14 ruoso joined 23:31 awwaiid left 23:32 xabbu42 left 23:46 hercynium joined 23:47 am0c^ joined
colomon ah, man, the Ovidian Order is slightly ahead of me. :( 23:48