»ö« 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.
lue rakudo: say "10.25".fmt("%x") 00:00
p6eval rakudo 922500: OUTPUT«a␤»
pmichaud rakudo: say 10.25.base(16) 00:01
p6eval rakudo 922500: OUTPUT«Method 'base' not found for invocant of class 'Rat'␤ in main program body at line 22:/tmp/jyzgSFkeRO␤»
pmichaud rakudo: say (10.25).Real.base(16) 00:02
p6eval rakudo 922500: OUTPUT«Method 'base' not found for invocant of class 'Rat'␤ in main program body at line 22:/tmp/ZOewWMkxdX␤»
pmichaud hmm.
S32 defines .base but apparently it's NYI in rakudo.
lue Sure I could create my own sub to do it myself, I just think P6 should be able to go both ways [I don't recall such a function ever existing]
pmichaud S32 says .base should work on any Real
lue looks at S32
pmichaud S32:243 00:03
benabik pmichaud: benabik (Complicated, I know. ;-)
pmichaud benabik: I always confirm rather than assume. :)
benabik pmichaud: Safer that way. :-)
[Coke]: pmichaud: (Sorry for slow responses, I'm away from home and trying to pack up to go back.) 00:04
pmichaud benabik: you now have commitbit to perl6 repos
benabik pmichaud: I will use it irresponsibly. 00:05
pmichaud +1
benabik s/ir//
pmichaud either way works :)
lue so &base is a method inside the Real role? I feel like implementing it [but first, other stuff to do :/] 00:08
pmichaud it could be a method in Num, and Real delegates to it.
benabik How do you throw something in nom? die?
pmichaud yes, die works. 00:10
lue Is Num above Real, like Mu is above Any?
pmichaud Real is a role
Num does Real
Int does Real
benabik And it does! > die 1; CATCH { say $! } # OUTPUT«1␤» 00:11
lue I just thought of putting &base in Real, because that's where S32::Num says it goes :) 00:12
pmichaud Real is good... we can move it if we want a different factoring 00:15
dalek atures: 9adc9b2 | Coke++ | template.html:
spec? vs. code* - put spec first.
00:16
lue afk --nom-time 00:22
00:24 CrazyPotato joined, benabik left 00:34 [particle]1 is now known as [particle]
[Coke] ZOMG it's [particle] 00:35
00:47 PacoLinux left 00:48 CrazyPotato left 00:51 PacoLinux joined 00:53 whiteknight left
steampunkey what's a .pod? 00:53
00:56 meteorjay left
TimToady Plain Old Documentatoin 01:00
*tion
lichtkind good night 01:02
o/
01:03 lichtkind left
jdhore TimToady, Did you create POD or did someone else? 01:03
crked just like a struct in C
TimToady I did the original 01:04
the new is mostly the work of @Damian 01:05
though I specced that =begin/=end had to work right
jdhore TimToady, Ah, nice. I had no idea if the original was you or if it came later.
01:11 tokuhirom left, tokuhirom joined 01:15 wolfman2000 left 01:16 tokuhirom left 01:31 fbass left 01:35 woosley joined 01:40 donri left 01:41 wolfman2000 joined 01:56 fbass joined 02:05 Reaganomicon left
crked Hi perl6, can I ask a question on perl5 ? 02:10
Someone else asked me and I really cannot figure out. It's about the perl -l usage with the here-doc structure 02:11
When I do perl -l <<EOF then $a = 1; then EOF. It seems the $a will be interpreted by bash first. 02:13
But when I do perl -l <<"EOF" the result is correct
I really don't know the difference between perl -l <<EOF and perl -l <<"EOF"
I am using perl 5.10
lue crked: I've never used Perl 5, but I know from using the Perl 6 commandline that using single quotes should keep bash from interfering with the variables. 02:17
Have you tried #perl ? That's a much better place to ask Perl 5 questions if you haven't tried that already.
crked Thanks, I will try there. 02:19
djanatyn Hey, has anyone here used YAML? 02:24
02:29 PacoLinux left 02:31 [particle]1 joined 02:33 [particle] left
djanatyn is going to write his static website generator, using YAML! :D 02:33
02:35 fbass left, fbass joined 02:40 am0c joined
djanatyn Also, *wow*. The Ratel library in the Web.pm module is really interesting. 02:48
How exactly would I install the Web module?
02:51 fbass left, fbass joined
dalek ast: 5e16d04 | lue++ | S32-num/base.t:
Added three non-integer tests to S32-num/base.t
02:57
Tene djanatyn: Thanks; I don't know if it's been worked on since I wrote the first draft a few years back (I think that was me...) 03:01
djanatyn Tene: did you see my first (well, kinda first) perl 6 code? 03:02
Tene no
djanatyn one second, let me edit out this bug
03:03 crked1 joined
djanatyn there we go! 03:03
03:03 crked left
djanatyn gist.github.com/1117266 <-- it's...somewhat messy. 03:03
also, forgot to implement that suggestion that masak had
03:03 steampunkey left
djanatyn But it runs, and uses a couple features from Perl 6 :) 03:04
crked1 slaps crked1 around a bit with a large trout
Tene nice
djanatyn ...that sounds...vaguely familiar. 03:05
Is that an irssi or mIRC plugin?
Or is crked1 an IRC bot? ;)
03:05 fbass left 03:11 envi joined 03:20 crked1 left 03:23 Su-Shee_ joined 03:25 jimmy1980 left 03:27 Su-Shee left 03:31 jimmy1980 joined 03:44 benabik joined 03:49 molaf joined 03:50 rdesfo left
sorear djanatyn: it's an old mIRC feature 03:52
djanatyn sorear: Ah. 03:56
03:57 soh_cah_toa joined
soh_cah_toa i saw on dev.perl.org that localtime() and gmtime() should be date() and utcdate() in p6. has this not been implemented yet in rakudo? i only see time() 04:00
04:03 molaf left 04:06 daniel-s joined 04:10 birdwindupbird joined 04:11 daniel-s left, daniel-s joined 04:13 satyavvd joined 04:15 daniel-s left 04:17 daniel-s joined
[Coke] OOC, where on dev.perl.org? 04:21
(you really want to look at perlcabal.org/syn/) - if you're looking at the old RFCs or apocolypses, those are out of date. 04:22
soh_cah_toa dev.perl.org/perl6/rfc/48.html
ok
[Coke] soh_cah_toa: try: perlcabal.org/syn/S32/Temporal.html 04:23
the rfcs were the communities initial proposals, btw, a lot of that didn't survive Larry.
"community's" *sigh*
soh_cah_toa yeah, i usually do look at perlcabal. just couldn't find anything about time functions. clearly, i didn't look hard enough :) 04:24
ah, looks like DateTime was what i need 04:25
[Coke]++
[Coke] is anyone from the channel working the dev.perl.org folks? If not, I can resurrect my old old thread with Robrt about the site and get some minor updates there. (like moving the SYN up to the top of the list.) 04:26
djanatyn Grr. :\
Is HTTP::Daemon a Perl 6 module, or a Perl 5 module?
[Coke] it is at least the latter. 04:28
soh_cah_toa djanatyn: perl 5
djanatyn ...oh.
So, Web.pm depends on a Perl 5 module.
*headdesk*
[Coke] I would ping masak about that, perhaps semi-obviously. 04:29
djanatyn yep :) 04:30
dalek atures: 1220ece | larry++ | features.json:
clarify "multi-dim params" means LoL arg/params
04:38
sorear does Web use HTTP::Daemon:from<perl5>?
djanatyn Dunno. I think so.
Is there a way to forcibly install a module using Panda? :) 04:48
04:50 soh_cah_toa left 04:51 flatwhatson joined 04:55 flatwhatson left
Tene djanatyn: there's a Perl 6 version of HTTP::Daemon 04:56
djanatyn: check out the web module on masak's github, iirc
djanatyn o_e; 04:59
That's what I'm trying to do.
I've downloaded the web module, I've tried to copy files over into my perl6 library directory
~/.perl6/lib
the web module on github has a folder, "lib" 05:01
Am I supposed to just copy the contents of that folder into ~/.perl6/lib/ ? 05:02
05:03 birdwindupbird left
sorear no, you're supposed to use panda or ufo or proto or neutro 05:04
djanatyn But using panda doesn't work :P 05:05
panda complains about not havinng HTTP::Daemon, and when I try to install that, it can't find it in the ecosystem.
the ecosystem appears to be a repo on github, apparently 05:06
I've been looking in there, but I can't really find any HTTP::Daemons either.
benabik Huh. CATCH seems to work in nom, but try { CATCH } doesn't.
Oh, wait... 05:08
nom: try { die "a" ; CATCH { say $_ } } 05:09
p6eval nom: OUTPUT«a␤»
benabik nom: try { die "a" ; CATCH { say $_.uc } }
p6eval nom: OUTPUT«(timeout)»
benabik That segfaults after a long wait here.
So try { CATCH } works, but CATCH { $_.uc } doesn't. 05:10
nom: CATCH { .say }; die 'a' 05:11
p6eval nom: OUTPUT«a␤»
benabik nom: CATCH { .uc.say }; die 'a'
p6eval nom: OUTPUT«(timeout)»
benabik nom: Exception.new 05:12
p6eval nom: ( no output )
benabik Yeah, it doesn't like that.
get_pmc_keyed_str() not implemented in class 'Mu' 05:13
Ah! 05:14
nom: die 'a'; CATCH { .bogus }
p6eval nom: OUTPUT«(timeout)»
benabik Unknown methods on Exception causes segfault instead of an error message. LTA.
Should I just use issues on github, or is there another place for rakudobugs? 05:16
Ah. No github issues...
benabik submits rakudobug. 05:18
05:18 birdwindupbird joined
benabik nom: Exception.new 05:24
p6eval nom: ( no output )
benabik The interactive prompt crashes from that.
nom: say Exception.new
p6eval nom: OUTPUT«get_pmc_keyed_str() not implemented in class 'Mu'␤current instr.: 'Str' pc 675508 (src/gen/CORE.setting.pir:184163) (src/gen/CORE.setting:4507)␤»
benabik Probably related to that, although the fact that interactive crashes after the error is LTA. 05:25
perl6: die 'a'; CATCH { say .does('uc') } 05:28
p6eval niecza v8-9-g2bbb19a: OUTPUT«===SORRY!===␤␤Action method statement_control:CATCH not yet implemented at /tmp/0KbxqvQ3K9 line 1 (EOF):␤------> die 'a'; CATCH { say .does('uc') }⏏<EOL>␤␤Unhandled exception: Unable to resolve method statement_level in c… 05:29
..pugs: OUTPUT«*** a␤ at /tmp/Ruimp54ae2 line 1, column 1-8␤»
..rakudo 922500: OUTPUT«0␤»
benabik Hm. perl6: doesn't run nom yet.
TimToady er, .does('uc') makes no sense 05:30
did you mean .can('uc') ?
benabik Uh, yes?
TimToady 'uc' isn't a type name, and .does requires a type
a role, in fact
benabik Yes. I mixed up does and can. 05:31
TimToady .does(Hamlet) but .can('stab') 05:32
benabik TimToady: Is exception supposed to be able to .can('uc')? It's used in the Rosetta Code example for Exceptions. 05:33
TimToady nom: say Cool.can('uc') 05:34
p6eval nom: OUTPUT«uc␤»
benabik nom: say Exception.does(Cool)
p6eval nom: OUTPUT«Bool::False␤»
TimToady it can if the Exception is Cool, but that's not guaranteed 05:35
benabik I'm thinking about removing the .uc from the RC example, but don't want to if it's correct and rakudo is wrong. :-D 05:36
TimToady which one?
benabik rosettacode.org/wiki/Exceptions#Perl_6
TimToady it's probably useful to be able to pattern match an exception as a string 05:37
PerlJam TimToady: can a single block have multiple ENTER phasers? 05:40
TimToady yes
PerlJam and they are executed in which order?
(I assume LEAVE phasers are analogous but opposite to ENTER phasers) 05:41
TimToady S04:1380 05:42
PerlJam that doesn't say anything about execution order :)
TimToady no, but it was originally stated in A4, iirc 05:43
entering stuff (ENTER, BEGIN, START) happen in order declared
exiting stuff happens in opposite order
PerlJam okay, that's what I figured. 05:44
05:46 drbean left
jnthn morning, #perl6 05:48
05:49 koban joined
dalek ecs: c493227 | larry++ | S04-control.pod:
define normal order for init vs final phasers
05:49
05:49 koban left
PerlJam jnthn: good morning. 05:49
jnthn: I was just puzzling out how to add ENTER and LEAVE phasers to nom. Got any advice?
jnthn PerlJam: LEAVE is really hard. 05:50
PerlJam well, it's good I'm looking at ENTER right now then :)
dalek atures: b813c7c | larry++ | features.json:
give lambdas and placeholders their own entries
atures: 67b5637 | larry++ | features.json:
more codes
PerlJam jnthn: LEAVE is hard because of stack unwinding? 05:51
jnthn ENTER is probably should an unshift onto the start of the PAST::Stmts for the block
PerlJam: Right.
TimToady it'd be a push if you execute them in order
LEAVE would unshift, methinks
oh, the standments, not the ENTER list 05:52
*state
PerlJam jnthn: the spec also says that they're available as a trait on the block. Not sure how to do that
jnthn hm
Is that true of phasers generally? 05:53
I guess can't be for BEGIN and CHECK...
benabik rakudo: die 'a'; CATCH { say .uc } 05:54
p6eval rakudo 922500: OUTPUT«A␤»
PerlJam I guess there's no trait_mod:<will> yet either 05:56
05:57 fhelmberger left
jnthn hm 05:57
There is
05:57 fhelmberger joined
jnthn I'm just curious what happens with multiple ENTERs. 05:57
See $*ST.apply_trait for examples of trait application in Actions.pm 05:58
TimToady pugs: ENTER { say "hi" }; ENTER { say "lo" }; LEAVE { say "HI" }; LEAVE { say "LO" } 05:59
p6eval pugs: OUTPUT«LO␤»
sorear hehehe
TimToady hmm
perl6: ENTER { say "hi" }; ENTER { say "lo" }; LEAVE { say "HI" }; LEAVE { say "LO" } 06:00
PerlJam last one wins?
p6eval pugs: OUTPUT«LO␤»
..niecza v8-9-g2bbb19a: OUTPUT«===SORRY!===␤␤Action method statement_prefix:ENTER not yet implemented at /tmp/FVl_SSeIqV line 1:␤------> ENTER { say "hi" }⏏; ENTER { say "lo" }; LEAVE { say "HI" }␤␤Action method statement_prefix:ENTER not yet implement…
..rakudo 922500: OUTPUT«===SORRY!===␤ENTER phaser not yet implemented at line 22, near "; ENTER { "␤»
TimToady should say hi lo LO HI
PerlJam pugs: ENTER { say "hi" }; ENTER { say "lo" }
p6eval pugs: OUTPUT«lo␤»
PerlJam pugs: ENTER { say "hi" }; LEAVE { say "what?" }; ENTER { say "lo" }
p6eval pugs: OUTPUT«lo␤»
jnthn (Mostly because will normally takes a block...)
PerlJam yep
sorear hasn't bothered to figure out how to implement LEAVE yet 06:01
jnthn omgz...commute time already!
&
sorear ENTER should be pretty easy though. I think niecza had ENTER pre-mm
PerlJam sorear: well, you can re-add it and update perl6.org/compilers/features and be ahead of rakudo in yet another area :) 06:05
benabik With control exceptions, I'd think that LEAVE would be something that catches return exceptions, calls the block, and rethrows. 06:07
PerlJam not just return exceptions though
TimToady you'd think, but that's not when LEAVE runs
benabik True. All exceptions, I guess.
TimToady it runs at stack unwind time
which is after any exception is handled 06:08
so it's only the stack unwinder that has to care
benabik P6 is specced as using stacks? Can't implement with CPS? 06:09
TimToady well, just do anything non-idempotent in a LEAVE :)
*don't
06:10 wtw joined
sorear benabik: cps is really a kind of stack if you squint right. A linked list stack. 06:11
TimToady so like, only close files in GC, not in LEAVE ;)
benabik sorear: So "stack unwind time" is "call continuation time"? LEAVE would wrap the caller continuation with a "call this block first" one? 06:12
PerlJam there's a GC phaser?!? ;-)
TimToady yeah, called DESTROY :)
sorear benabik: stack unwind time means when an exception has committed to not being resumable 06:13
benabik But LEAVE is called at both exception and return time, yes?
sorear: Well, then you're wrapping the "exception failed" continuation. ;-D
sorear benabik: exceptions are not built on continuations 06:14
unless they are
benabik If you're writing a compiler with CPS they should be.
TimToady in that case stack unwinding is also a form of GC, and you can't do it till the lower continuation is thrown away :) 06:15
basically, you shouldn't be mixing transactional commits with continuations that refuse to commit 06:16
maybe we should allow Shroedinger Files to be both open and closed at the same time :) 06:17
I note that Ruby is de-emphasizing continuations these days 06:19
continuations are problematic unless you can carry hypothetical universes along with them
benabik If I understand CPS correctly, then you should have a both a "commit" and a "abort" continuation for something that's supposed to be transaction like.
06:20 kjeldahlw joined
TimToady well, but in the case of a deep continuation, you need something more like "commit" vs "uncommit" 06:20
"Ha, ha, I didn't *really* close that file..." 06:21
06:22 drbean joined
benabik The real trick in CPS is passing around and wrapping the continuations properly. Whether things aren't saved until "commit" is called or things are undone when "abort" is called is really an implementation choice. 06:22
TimToady CPS doesn't really mix well with mutable state, and filehandles are mutable
all the mutable state must be inherent to the continuation for CPS to work well 06:23
06:23 Su-Shee_ is now known as Su-Shee
PerlJam needs some sleep before work (~6.5 hours from now) 06:23
I guess my ENTER adventure with nom will have to wait until later 06:24
PerlJam .zZZZ
TimToady much like we do with Cursors in perl6 grammars, where the mutable state is carried along with the current Cursor, and thrown away if you throw away the Cursor
night, PerlJam
benabik It's more that you need to ensure that any cleanup is called with all continuations. But you run into the same problem in any non-linear control flow. Early returns and exceptions do the same thing. 06:26
TimToady it almost makes you want to have an IO monad... :)
06:26 drbean left, drbean joined 06:27 drbean_ joined 06:28 drbean_ left 06:38 noganex_ is now known as noganex 06:44 mj41 joined 07:16 pernatiy left
mathw \o/ IO monad 07:16
sorear o/ mathw 07:17
mathw o/ sorear
07:17 pernatiy joined 07:19 wamba joined 07:20 pernatiy left 07:21 pernatiy joined, kjeldahlw left 07:25 lumi_ joined
moritz lue-- # not running the tests he commits 07:46
dalek ast: f450fca | moritz++ | S (4 files):
rakudo unfudges
07:47
ast: 9e531b5 | moritz++ | S32-num/base.t:
fix syntax error in base.t
shinobicl hi 07:59
sorear TimToady: consider class A { }; say $OUR::(A). Should this error because A !~~ Cool, or should it be treated like OUR::<$A()> ?
shinobicl: hi
shinobicl if i define an operator as part of a role
07:59 araujo left
sorear no 07:59
operators are subs, subs are lexically scoped
only visible in one brace-group unless exported from a module 08:00
...did I anticipate the wrong question? should have waited :( 08:01
shinobicl no, it is ok
08:01 kjeldahlw joined
shinobicl i had definen an operator inside a role. It didn't work 08:01
i guess i can oly use a class for that, then. Is just that the operator <-> is defined for a Date. 08:02
i would like to have a special <-> for Dates with certain role (role Workday) 08:03
sorear class versus role (should) make no difference
shinobicl role Workday { ...; method infix:<-> (Date $start, Date $target) { ... } } 08:04
my $d = Date.new does Workday; my $d2 = Date.new does Workday;
benabik role Workday {}; multi infix:<->(Workday $s, Workday $t) # Why not this? 08:05
shinobicl Workday is a role, not a class
benabik You should be able to use roles in multi signatures. 08:06
shinobicl say $d - $d2; # --- This should call my version of <->
sorear shinobicl: you don't write operators like that
shinobicl: infix:<-> *must* be a sub
not a method
shinobicl oh
sorear benabik models correct usage
08:11 mikehh left, kjeldahlw left 08:12 kjeldahlw joined 08:16 woosley1 joined
moritz note that operators are just subs, and subs are lexically scoped 08:16
08:17 kjeldahlw left
moritz shinobicl: so if you define an infix:<-> inside a role, it will only work inside that role by default 08:17
08:17 Coleoid_ left, kjeldahl joined, woosley left 08:19 daxim joined 08:21 espadrine` joined 08:29 shinobicl left
dalek ok: 920b6b4 | moritz++ | src/basics.pod:
avoid space in an identifer, qwebirc99822++
08:33
08:37 woosley1 left 08:46 stepnem left 08:51 noganex_ joined, stepnem joined, espadrine` left
dalek ecza: 77bc5f0 | sorear++ | src/ (2 files):
Name refactor part 4: basic names through <variable>
08:52
sorear out
08:54 noganex left
tadzik good morning #perl6 08:58
moritz good morning tadzik 08:59
moritz goes off to get some cake from a co-worker
tadzik o, a birthday? :) 09:00
09:07 noganex_ is now known as noganex 09:12 im2ee joined 09:20 eiro left 09:25 eiro joined 09:39 Reaganomicon joined
moritz tadzik: no, maternal leave 09:44
09:52 ab5tract joined 09:59 max joined, max is now known as Guest18070 10:00 Guest18070 left 10:08 pernatiy left 10:18 MayDaniel joined 10:22 kfo_ joined 10:23 Butterfly77 joined 10:24 Butterfly77 left 10:26 kfo left 10:30 frettled left 10:55 MayDaniel left, pernatiy joined 11:01 antonio_ joined, antonio_ is now known as odoacre 11:10 mls_ joined
mls_ hi perl6! 11:10
11:11 mls__ joined
mls__ jnthn: I made the last test in try.t work 11:12
patch: gist.github.com/1117955 11:14
11:15 mls_ left 11:20 araujo joined
mls__ One thing I noticed that should still be fixed is that the CATCH blocks appear *twice* in the genereated pir 11:22
same subid, same code, but different sub name 11:23
11:24 icwiener joined
mls__ afk, lunch... 11:25
11:36 jaldhar left 11:39 jaldhar joined
moritz nom: try { pir::throw__vP('foo'); CATCH { say $! } } 11:45
p6eval nom: OUTPUT«Not a throwable object␤»
moritz how do I make an object throwable? 11:47
11:49 gfldex joined
moritz lemme guess, one needs to actually create parrot Exception, and attach Perl 6 exception object as payload somehow 11:51
nqp: try { die("foo"); CATCH { say(pir::typeof($!) } }; 11:52
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:244)␤»
moritz std: try { die("foo"); CATCH { say(pir::typeof($!) } };
p6eval std 516268a: OUTPUT«===SORRY!===␤Unable to parse argument list at /tmp/LvMQeXrH4H line 1:␤------> try { die("foo"); CATCH { say⏏(pir::typeof($!) } };␤Couldn't find final ')'; gave up at /tmp/LvMQeXrH4H line 1:␤------> die("foo"); CATCH { say(pir…
moritz nqp: try { die("foo"); CATCH { say(pir::typeof($_) } }; 11:53
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:244)␤»
11:54 satyavvd left
moritz nqp: try { pir::die(pir::new__PS('Exception')); CATCH { say($_) } } 11:57
p6eval nqp: OUTPUT«␤»
moritz nqp: try { pir::die(pir::new__PS('Exception')); CATCH { say(pir::tyepof($_)) } }
p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P1017')␤ in file '(file unknown)' line 156␤error:imcc:syntax error ... somewhere␤ in file '(file unknown)' line 170␤syntax error ... somewhere␤»
moritz nqp: try { pir::die(pir::new__PS('Exception')); CATCH { say(pir::typeof($_)) } }
p6eval nqp: OUTPUT«Exception␤»
11:57 JimmyZ joined 11:58 Alias joined
mls__ back from lunch... 12:06
gfldex perl6: sub test(Str $s){ say $s; }; my Str multi a(){ return "stringling" }; my Int multi a(){ return 9000 }; test(a()); 12:11
p6eval pugs: OUTPUT«stringling␤»
..niecza v8-10-g77bc5f0: OUTPUT«Unhandled exception: Ambiguous dispatch for &a␤ at line 0 (&a @ 0) ␤ at /tmp/OFoV4rI2vm line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1933 (CORE C906_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1934 (CORE module…
..rakudo 922500: OUTPUT«Ambiguous dispatch to multi 'a'. Ambiguous candidates had signatures:␤:()␤:()␤␤ in main program body at line 22:/tmp/9nNq78jk5M␤»
gfldex nom: sub test(Str $s){ say $s; }; my Str multi a(){ return "stringling" }; my Int multi a(){ return 9000 }; test(a());
p6eval nom: OUTPUT«Ambiguous dispatch to multi 'a'. Ambiguous candidates had signatures:␤:()␤:()␤␤current instr.: 'a' pc 592 ((file unknown):36813071) (/tmp/YMeagp5Hfw:1)␤»
gfldex looks like pugs wins in this case 12:12
moritz return types don't participate in MMD
no, it conforms to an outdate spec
gfldex what is the reason for that spec change? 12:13
moritz yes, computability
what if test() was a multi with one Int and one Str candidate?
gfldex it would be ambiguous and should trigger a nice error message 12:14
moritz multis make it impossible to determine what context a routine is called in
gfldex that makes the return type of a multi pretty much useless 12:16
flussence std: multi a(Int $) { ... }; multi a(Str $) { ... }; my $x; .?a($x); # probably doesn't work, just curious whether it did 12:19
p6eval std 516268a: OUTPUT«ok 00:01 123m␤»
flussence oh.
12:19 f00li5h left
flussence rakudo: multi a(Int $) { ... }; multi a(Str $) { ... }; sub b { 'str' }; .?a(b()); 12:20
p6eval rakudo 922500: ( no output )
flussence rakudo: multi a(Int $) { say 'int' }; multi a(Str $) { say 'str' }; sub b { 'str' }; .?a(b());
p6eval rakudo 922500: ( no output )
flussence rakudo: multi a(Int $) { say 'int' }; multi a(Str $) { say 'str' }; sub b { 'str' }; .?a(b()); say 'alive'
p6eval rakudo 922500: OUTPUT«alive␤»
flussence rakudo: multi a(Int $) { say 'int' }; multi a(Str $) { say 'str' }; sub b { 1234 }; .*a(b()); 12:21
moritz that doesn't do what you probably think it does
p6eval rakudo 922500: ( no output )
flussence I can see that :)
I'm surprised it's not a syntax error though
moritz it tries to call a method named 'a' on $_, which is Any
but since you say .?a, it doesn't error out when it can't find that method
flussence oh, makes sense.
would main{something-goes-here}.*a() work there? 12:22
rakudo: multi a(Int $) { say 'int' }; multi a(Str $) { say 'str' }; sub b { 1234 }; main::.*a(b());
p6eval rakudo 922500: OUTPUT«Could not find sub &main␤ in main program body at line 22:/tmp/2i1emIcEC_␤»
moritz flussence: what do you try to achieve? 12:23
flussence wondering if the .? .+ .* syntax would work on normal subs
moritz well...
nom: multi f(Real $x) { 'real' }; multi f(Int $x) { 'int' }; say 1.+&f 12:24
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'f'. Available candidates are:␤:(Int $x)␤:(Real $x)␤␤current instr.: 'f' pc 476 ((file unknown):486) (/tmp/kkBgD0UTT7:1)␤»
moritz nom: multi f(Real $x) { 'real' }; multi f(Int $x) { 'int' }; say 1.&f
p6eval nom: OUTPUT«int␤»
moritz might be a bug that it doesn't work with .+
rakudo: multi f(Real $x) { 'real' }; multi f(Int $x) { 'int' }; say 1.&f 12:25
p6eval rakudo 922500: OUTPUT«int␤»
moritz rakudo: multi f(Real $x) { 'real' }; multi f(Int $x) { 'int' }; say 1.+&f
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Cannot use .+ on a non-identifier method call at line 22, near ""␤»
moritz niecza: multi f(Real $x) { 'real' }; multi f(Int $x) { 'int' }; say 1.+&f
p6eval niecza v8-10-g77bc5f0: OUTPUT«===SORRY!===␤␤Modified method calls can only be used with actual methods at /tmp/8LskGshEdk line 1 (EOF):␤------> }; multi f(Int $x) { 'int' }; say 1.+&f⏏<EOL>␤␤Potential difficulties:␤ $x is declared but not used at /…
flussence well, at least the error messages are descriptive...
mls__ jnthn: gist.github.com/1118036 different version of patch, creates one "set" opcode less but also works 12:27
12:35 wtw left 12:39 icwiener left
gfldex if i have a function as a parameter, can i specify a signature i want to have for that function? 12:41
flussence iirc, yes
moritz should be possible with nested signatures
gfldex where can i find that in the spec? 12:42
moritz S06 :-)
t/spec/S06-signature/closure-parameters.t has a few examples
12:42 wooden joined
moritz my sub testit (&testcode:(Int --> Bool)) {testcode(3)} 12:42
gfldex tyvm 12:43
i even understand why there is --> now :)
flussence
.oO( note to self: make sure you're not on the live DB before you issue a "TRUNCATE TABLE"... )
12:44
moritz note to flussence: don't be on the live DB.
[Coke] urk.
flussence (good thing everything at $dayjob is painfully out of date, because I got a syntax error :)
moritz :-)
jlaire I did that once to 10+ tables, but I restored it so quickly that nobody noticed :P 12:46
gfldex nom: my Str multi a(&c:(Str)){ &c("stringling") }; my Int multi a(&c:(Int)){ &c(9000) }; sub string_say(Str $s){ say $s }; sub int_say(Int $i){ say $i }; a(&string_printer); a(&int_say);
p6eval nom: OUTPUT«Method 'make_signature' not found for invocant of class 'Perl6::SymbolTable'␤current instr.: 'nqp;Perl6;Actions;fakesignature' pc 63565 (src/gen/perl6-actions.pir:22434) (src/Perl6/Actions.pm:1749)␤»
gfldex perl6: my Str multi a(&c:(Str)){ &c("stringling") }; my Int multi a(&c:(Int)){ &c(9000) }; sub string_say(Str $s){ say $s }; sub int_say(Int $i){ say $i }; a(&string_printer); a(&int_say);
p6eval rakudo 922500: OUTPUT«===SORRY!===␤traits specified as colon pairs not yet understood at line 22, near "){ &c(\"str"␤»
..pugs: OUTPUT«*** ␤ Unexpected "("␤ expecting space or ")"␤ at /tmp/OnvbrjPHx_ line 1, column 19␤»
..niecza v8-10-g77bc5f0: OUTPUT«Unhandled exception: Unable to resolve method ast in class Any␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 1894 (NieczaActions NieczaActions.parameter @ 149) ␤ at /home/p6eval/niecza/src/STD.pm6 line 2919 (STD P6.parameter @ 312) ␤ at /home/p6eval…
jlaire considered changing the terminal's background to red when it's ssh'd to a live server 12:47
moritz red, like the blood you spill if something goes wrong?
gfldex std: my Str multi a(&c:(Str)){ &c("stringling") }; my Int multi a(&c:(Int)){ &c(9000) }; sub string_say(Str $s){ say $s }; sub int_say(Int $i){ say $i }; a(&string_printer); a(&int_say);
p6eval std 516268a: OUTPUT«ok 00:01 128m␤»
gfldex now i have my return type of a multi taken into account without having a return type on that multi :) 12:49
12:50 jimmy1980 left 12:51 jimmy1980 joined
moritz jnthn: gist.github.com/1118066 a compilation error I don-t know how to handle 12:54
if taking the route via --target=pir, it produces perl6_decontainerize_return_value $P100,
(without a second argument) 12:55
jlaire rakudo: class C { our sub f() {} }; C.new::f
p6eval rakudo 922500: OUTPUT«Null PMC access in find_method('ACCEPTS')␤ in main program body at line 22:/tmp/OCGeQSEf3e␤»
jlaire nom: class C { our sub f() { say 42 } }; C.new::f 12:56
p6eval nom: OUTPUT«Could not find symbol 'new'␤current instr.: 'die' pc 576872 (src/gen/CORE.setting.pir:135292) (src/gen/CORE.setting:290)␤»
moritz nom: class C { our sub f() { say 42 } }; C::f
p6eval nom: OUTPUT«42␤»
jlaire can I access C<f> through an instance of C<C>?
gfldex rakudo: class C { our sub f() {} }; C.new.f 12:57
p6eval rakudo 922500: OUTPUT«Method 'f' not found for invocant of class 'C'␤ in main program body at line 22:/tmp/2GpDszCcFG␤»
moritz nom: class C { our sub f() { say 42 } }; C.new.WHO<&f>.()
p6eval nom: OUTPUT«42␤»
jlaire hmm, thanks
moritz but it's not really "through the instance"
because it just looks up the symbol table that belongs to the class that belongs to the instance 12:58
mls__ moritz: just put a "1;" at the end of my-die 13:01
moritz mls__: thanks 13:02
jlaire taking a step back, how do I make a static method
moritz jlaire: just make a method that doesn't use an attribute
perl6: class A { method foo() { say "I'm static" } }; A.foo() 13:03
p6eval pugs, rakudo 922500, niecza v8-10-g77bc5f0: OUTPUT«I'm static␤»
13:03 frettled joined
jlaire rakudo: class A { method foo() { say "foo" } }; A.new.foo; A.foo 13:04
p6eval rakudo 922500: OUTPUT«foo␤foo␤»
jlaire moritz++ # ty
rakudo: role IntPredicate { method apply(Int $x) returns Bool { ... } }; class Even does IntPredicate { method apply(Int $x) returns Bool { $x %% 2 } }; sub f(IntPredicate $intPredicate) { grep { $intPredicate.apply($_) }, 1 .. 10 }; say f(Even.new) 13:08
p6eval rakudo 922500: OUTPUT«246810␤»
jlaire Perl 6, enterprise edition ;) 13:09
moritz jlaire: next up: method ACCEPTS($topic)
so that you can write
my @numbers = grep IntPredicate, 1..10 13:10
13:10 [particle]1 is now known as [particle]
moritz erm 13:10
my @numbers = grep Even, 1..10
jlaire moritz: Java can't do that, so it must be evil 13:11
13:11 Holy_Cow joined
gfldex std: class Foo does Callable { multi sub postcircumfix:<( )> (Str $s) { say "string"; } mutli sub postcircumfix:<( )> (Int $i) { say "int"; } } 13:11
13:11 Holy_Cow left
p6eval std 516268a: OUTPUT«===SORRY!===␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/s_xzDeYiAI line 1:␤------> rcumfix:<( )> (Str $s) { say "string"; }⏏ mutli sub postcircumfix:<( )> (Int $i) ␤ expecting any of:␤ brackete… 13:11
jlaire gfldex: "mutli"
gfldex thanks :) 13:12
moritz and need ; after a } (unless there's a newline after it)
gfldex nom: class Foo does Callable { multi method postcircumfix:<( )> (Str $s) { say "string"; }; multi method postcircumfix:<( )> (Int $i) { say "int"; }; my $f = Foo.new; $f("asd"); 13:14
p6eval nom: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:244)␤»
gfldex nom: class Foo does Callable { multi method postcircumfix:<( )> (Str $s) { say "string"; }; multi method postcircumfix:<( )> (Int $i) { say "int"; }; } my $f = Foo.new; $f("asd"); 13:15
p6eval nom: OUTPUT«Confused at line 1, near "class Foo "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
moritz missing another ; after }
gfldex nom: class Foo does Callable { multi method postcircumfix:<( )> (Str $s) { say "string"; }; multi method postcircumfix:<( )> (Int $i) { say "int"; }; }; my $f = Foo.new; $f("asd");
p6eval nom: OUTPUT«invoke() not implemented in class 'Foo'␤current instr.: '_block1002' pc 123 ((file unknown):39573564) (/tmp/z8z7km1t7u:1)␤»
moritz so maybe nom is missing a vtable_invoke override 13:16
or it's not yet wired up correctly
gfldex rakudo: class Foo does Callable { multi method postcircumfix:<( )> (Str $s) { say "string"; }; multi method postcircumfix:<( )> (Int $i) { say "int"; }; }; my $f = Foo.new; $f("asd");
p6eval rakudo 922500: OUTPUT«No candidates found to invoke for method 'postcircumfix:<( )>' on object of type 'Foo'; available candidates have signatures:␤:(Mu : Str $s;; *%_)␤:(Mu : Int $i;; *%_)␤␤ in main program body at line 22:/tmp/9AW6V8wG7f␤»
13:16 araujo left 13:17 araujo joined 13:31 molaf joined 13:34 wtw joined
sili where is qr// in p6? 13:35
moritz rx//
sili thanks.
moritz: are you familiar with the rakudo source? 13:36
moritz sili: enough to add small features
PerlJam sili: we're all familiar enough with rakudo source to break things ;)
sili I was just curious to see where split was implemented. Any ideas where I might look?
moritz sili: in master, src/core/Cool-str.pm 13:37
in nom, src/core/Str.pm
sili what's Cool?
moritz a common superclass of scalar-type built-in types
(and users can inherit from Cool if they want their types to act like a built-in)
sili self.lc.split(/\w+/, :all).map({ .Str.ucfirst }).join(''); # that's so evil 13:38
moritz rakudo: say 312.index(1)
p6eval rakudo 922500: OUTPUT«1␤»
moritz that only works because Int ~~ Cool, and .index is a method in Cool 13:39
it kinda emulates the type coercions that happen in Perl 5 land
sili fancy. 13:40
moritz sili: yep, evil and clever
PerlJam every time I see split(), I knee-jerk-think that they really want comb() these days.
sili and terribly slow
time to learn PIR and implement it there
moritz sili: if so, please do it in nom branch, where most development happens these days 13:41
a simple Perl level loop might still be much faster than a regex 13:42
sili moritz: what editor are you using for your perl6?
moritz sili: vim
sili 7.3?
moritz whatever ships with Debian
7.2 iirc
sili anything special for p6 highlighting? 13:43
moritz github.com/petdance/vim-perl
might be included in the newest upstream vim 13:44
flussence yep, but the github one's slightly newer
sili 7.3 does have p6 support
flussence the syntax file does have one flaw atm: it's about as fast as rakudo itself :) 13:45
moritz sili: the is_cclass and find_cclass and find_not_cclass ops might be very helpful if you want to implement .capitalize 13:47
sili: also it's much faster to prototype it in a separate file, to avoid the slow core compilation
sili I'll keep that in mind 13:48
PerlJam nom doesn't grok augment yet does it? 13:52
moritz nom
but there's a useful technique for prototyping... just a sec...
sili perl6 is written in perl6 13:53
tadzik yes (: 13:54
moritz PerlJam, sili: gist.github.com/1118159
*shrug* most C compilers are written in C
tadzik nowadays they're even written in C++ :P 13:55
sili return `perl5 -e 'print uc $foo'`
jlaire GHC is written in Haskell and many common lisp compilers are written in common lisp, etc. etc.
moritz sili: have fun inheriting from SV in perl 5 :-) 13:56
sili hah. I haven't done XS in years
mls__ jnthn: This patch makes the bogus code duplication go away: gist.github.com/1118161 13:57
doesn't seem to break anything, but please review ;)
moritz sili: I know my paste is a very verbose way to write a call to uc(), but it is helpful for prototyping built-in methods
without the need to recompile src/core/* for every change 13:58
sili Good thing I brought my quad core
moritz that part of the compilation isn't parallelized :( 13:59
13:59 drbean left 14:01 araujo left
flussence
.oO( parrot really could use a ccache-equivalent )
14:03
moritz ... except that the slow part is actually rakudo compiling the setting, not parrot compiling something
flussence oh, that bit's rakudo being slow? I never realised... 14:05
moritz in master the stage1 compiler
14:05 araujo joined
moritz in nqp the perl6 executable 14:05
jlaire sorear: ooc, what did you mean when you said you learned J in 4 days? did you write anything non-trivial in tacit style? 14:09
pmichaud good morning, #perl6 14:11
tadzik good morning pmichaud
moritz good am, pm 14:12
PerlJam pmichaud: greetings
moritz rakudo's exception handling turns the excptions inside out, right? 14:13
so Exception has a parrot exception, which is thrown, and try/CATCH then construct a new Exception and set the parrot exception as an attribute
right?
mls__ sounds correct 14:14
moritz for my attempts to implement the X:: classes I need to modify that a bit 14:15
have parrot exception whose payload attribute is the Perl 6 exception 14:16
otherwise you can only have a single type of exception
sili PMCs are neat. 14:18
moritz gist.github.com/1118213 # exceptions with payload 14:23
mls__ It's proably easy to change the exception handler so that the object is "reused" if it's of type Exception 14:26
But note that the stack backtrace must go somewhere, so the Exception object must be either changed or cloned 14:27
sili there's an upcase() opcode
op.
moritz mls__: right
mls__: ... unless the backtrace is created before throwing 14:28
mls__ it still must be stored in the Exception object
moritz as a bit of context, I think Exception will go away completely 14:29
and replaced by various X:: classes or roles, which allow us to distinguish errors by type
those need to handle backtraces somehow, yes
my early prototypes with X::Base automatically created backtraces before the throw occured 14:30
mls__ Wouldn't the X:: classes have Exception as base class?
moritz X::Base is the base class currently
but that's just terminology
mls__ So you propose a rename of Exception.pm to X/Base.pm? ;) 14:32
moritz not really
I already have a start of X::Base in Exceptions.pm (note the 's' :-)
it's more likely that I'll extend it to do all the stuff that Exception does, and eventually switch over 14:33
mls__ you probably need to store the parrot exception in $!ex, like in Exception.pm 14:36
moritz aye, for rethrowing
mls__ and change sub EXCEPTION to reuse the payload if it is ~~ X::Base 14:38
sili $PO is not a valid register name. duh. 14:40
moritz: my uppercase change appeared to work 14:43
\o/
moritz sili: \o/ I want a pull request!
sili no, nevermind. I fucked it up and have no idea what I'm doing. back to the drawing board 14:45
lol. time for sleep. thanks for the help
moritz good night. Hope to see you back tomorrow :-) 14:46
mls__ (Btw, about that INSTALL -> INSTALLME rename: how about README.install?)
tadzik INSTALLME is a bit like "please install this file" :)
mls__ is that an "INSTALLME should stay", or a "please change the name"? 14:48
pmichaud INSTALL.txt
mls__ wfm
tadzik or just INSTALL 14:49
pmichaud can't be just INSTALL
conflicts with the install/ subdir
moritz tadzik: that breaks on windows
mls__ just install didn't work
tadzik oh
I didn't even know there's an install/ subdir :)
moritz that's the new name for parrot_install
tadzik oh, ok 14:50
does Q:PIR work in nom? 14:52
moritz yes 14:53
tadzik hmm, ok
moritz but you need to be careful with what you return
sili What does pir::upcase__SS mean? particularly the __SS
moritz for example don't return an $S0 register
sili: it's a kind of signature 14:54
returns an string (not a PMC), takes one string
tadzik moritz: what do you mean?
moritz tadzik: for example don't return native strings or ints, box them
tadzik I'm trying to restore MAIN.pm 14:55
sili moritz: oh, it's just the sig of the opcode
14:56 donri joined
moritz sili: yes 14:56
tadzik that Q:PIR there returns either lexpad:&MAIN or get_hll_global 'Any'
dalek kudo/nom: 6e1cfd4 | moritz++ | / (3 files):
rename INSTALLME to INSTALL.txt
moritz tadzik: get_hll_global is almost certainly wrong in nom
14:56 rdesfo joined
tadzik oopsie 14:56
moritz you can find_lex 'Any' 14:57
tadzik will do that
moritz nom: say pir::find_lex__PS('Any').perl
p6eval nom: OUTPUT«Any␤»
tadzik otoh, it could also be 'box 0' in this case, I think 14:58
it's only unless'ed later
pmichaud I'm thinking the Q:PIR shouldn't be needed at all.
tadzik how do we nomify this? 14:59
moritz 'box 0' should never escape to Perl 6 land
rather nqp::p6box_i(0)
tadzik: which block?
tadzik mhm
moritz: the first one, for now 15:00
moritz which file? :-)
tadzik src/core/MAIN.pm, in master
moritz tadzik: a pir::find_caller_lex__Ps should work wonders :-) 15:01
tadzik: see src/core/operators.pm for a usage example
tadzik niice 15:02
pmichaud note that find_caller_lex looks in a lot of places for stuff.
mls__ (but don't you need the "outmost" MAIN?)
tadzik yes, we do
moritz mls__: the call to MAIN_HELPER is (hopefully) only emitted in the "right" scope
pmichaud indeed, the way find_caller_lex is being used in operators.pm is almost certainly wrong. 15:03
15:03 dual left
tadzik are there spectests for MAIN? 15:03
moritz care to explain?
rdesfo does perl6 have a curses module or something like it that would allow some one to open a file in terminal?
moritz tadzik: of course :-)
pmichaud find_caller_lex searches the lexical scopes of all of the callers
tadzik okay :)
pmichaud not just the immediate caller. 15:04
moritz pmichaud: oops
tadzik rdesfo: Parrot has a curses library, you may be able to use that
moritz ... but the parrot curses example was broken last we looked at it
rdesfo is there any docs on how to use Parrot modules in a perl6 script?
moritz rdesfo: I fear not 15:05
pmichaud any chance we could get callframe() to work? Then it would be callframe(1).my<&MAIN>
or something like that
15:05 molaf left
moritz should be a straight-forward-ish port from master 15:06
but notice that that's not correct Perl 6, strictly speaking
callframe.my should only expose 'is context' vars
15:07 dual joined
pmichaud true. 15:07
actually, S06 says .my can be used to look up ordinary lexical variables 15:08
S06:2592
moritz oh
so it was CALLER:: that was limited... my bad 15:09
15:13 mkramer joined 15:18 jimmy1980 left
tadzik arg, a MAIN_HELPER { say "I'm main"; 0 } dies with Can only use get_who on a SixModelObject somewhere 15:24
15:25 jimmy1980 joined 15:26 kaare_ joined 15:28 noganex_ joined, noganex left
moritz the code in Actions.pm might need updating :/ 15:29
pmichaud very likely, yes. 15:30
tadzik nom: say $MAIN.perl 15:32
p6eval nom: OUTPUT«Method 'perl' not found for invocant of class 'Integer'␤current instr.: '_block1002' pc 78 ((file unknown):12086934) (/tmp/5y33cVRpqt:1)␤»
tadzik yeah... 15:33
pmichaud $MAIN?
moritz that's what that weird code does
tadzik MAIN is set to 0 when there's no MAIN
that's what Actions.pm look like
pmichaud Ick.
moritz my $mainparam := PAST::Var.new(:name('$MAIN'), :scope('parameter'),
:viviself( PAST::Val.new( :value(0) ) ) );
tadzik don't know what's that for, really 15:34
moritz neither
just don't emit the MAIN_HELPER, right?
15:34 jferrero left
tadzik looks like not only; 15:34
else {
183 $unit.push($mainparam);
else as in "if there's no &MAIN"
pmichaud I think we can get rid of that. 15:35
tadzik there's no $MAIN is S06
pmichaud I don't see anything in master that makes use of '$MAIN'.
mls__ our sub MAIN_HELPER($retval, $MAIN?) {
pmichaud that's not the same MAIN :-)
mls__ in the old MAIN.pm
pmichaud I suspect it's a fossil. 15:36
15:36 lumi_ left, jferrero joined
mls__ I think the code in Actions.pm just wants to pass 0 to $MAIN 15:37
(to the $MAIN parameter)
moritz plus.google.com/108097168863179836...xotL4v2nfN au++
15:37 PacoLinux joined
tadzik which is not used in MAIN_HELPER 15:38
fossil, aye
15:39 Su-Shee_ joined
mls__ pm: your commit b0cd2b8f323 added $MAIN 15:40
tadzik I suspect we may also want to make it PAST::Stmts(call-main-helper, $mainline), rather than Past::Op::Call('&MAIN_HELPER', $mainline)
jnthn evening, #perl6
mls__ Hi jnthn! 15:41
I've got two patches for you to review
tadzik hello jnt... evening? Oh gosh
jnthn Oh, nice! :) Today was one of those $dayjob days where I couldn't hover on #perl6 :)
mls__ jnthn: gist.github.com/1118036 and gist.github.com/1118161 15:42
15:43 jferrero left, Su-Shee left
TimToady sorear: ::(A) should complain in the same way that ~A should, since type objects now only stringify nicely under .gist 15:43
mikemol I noticed the compiler's features page by way of RC's analytics data. 15:44
TimToady mikemol: o/
tadzik ...maybe the setting just isn't sub-friendly? :)
mikemol I also notice there are a bunch of rows on that page which don't have relevant code links.
Is that because there aren't useful or relevant tasks on RC? 15:45
TimToady: How'd the snapshot work out?
pmichaud mls__: (b0cd2b8f323, adding $MAIN) Huh, interesting. I suspect I was trying to clean up the init process somehow. Anyway, I agree it can (should) be removed.
TimToady it's mostly because we don't put RC entries up for non-working features :)
mikemol "Private methods", "Basic multi dispatch" should both be working. :)
TimToady mikemol: it seemed to be fine, though turned out I had network access
mikemol Good.
moritz pmichaud: I think back then MAIN_HELPER was emitted far too often, because it predates the check for the presence of a MAIN sub 15:46
pmichaud moritz: very likely.
moritz mikemol: note that sometimes people add lines to the feature table without checking RC, which leads to lines without code examples
as happened for private methods and submethods 15:47
mikemol k.
TimToady it's a little hard to grep RC for a particular language's entries 15:48
moritz TimToady: there's a page for that...
mikemol In any case, if there aren't suitable tasks for demonstrating language features, feel free to create them.
TimToady: Yeah, it's a real pain. I wish we had the semantic page generation stuff working.
pmichaud there's also nothing that says that the "code" links are restricted to RC pages :) 15:49
could use some links to the perl6advent pages, I suspect.
moritz rosettacode.org/wiki/Category:Perl_6 has all the tasks that are implemented inp6
mikemol Though, if you can get a page's contents into a DOM, you should be able to look for an <a> with an id of 'Perl 6'
TimToady moritz: but that doesn't show you the *code* 15:50
moritz TimToady: right
TimToady I've just been clicking through all those entries by hand
15:50 birdwindupbird left
moritz ... instead of writing a script. Shame on you :-) 15:50
15:50 mjreed joined
mikemol Any Perl 6 code should be inside a div with the CSS classes 'perl6' and 'highlighted_source', if that helps. 15:51
pmichaud looks like it's in a <pre>
mikemol Whups. Yup, it's 'pre'
TimToady the highlighted code is not very readable...
(in HTML) 15:52
mikemol Hm. That's true. 15:53
I can make a modification to the highlight extension to allow GeSHi processing to be disabled, given a GET parameter like "?highlight=none". 15:54
Not right now, though. >.>
Anyway, always looking for ways to make RC more attractive. :) 15:55
[Coke] o/ pmichaud++
TimToady mikemol++
mikemol I just wish more language communities got as involved as you guys tend to. :)
TimToady well, one of the things RC is exemplifying is which communities actually care :) 15:57
PerlJam or perhaps just which ones thing RC is just cool.
s/thing/think/ 15:58
15:59 Su-Shee_ is now known as Su-Shee
TimToady or the communities that think they'll come off better in a comparison 16:00
or maybe the communities that just don't have real work to do :)
TimToady suspects you have to be a bit neotenous to like certainly kinds of language play 16:01
moritz TimToady: moritz.faui2k3.org/tmp/rc-scrape.txt make sure to cache the result, since it's pretty heavy on the server :-) 16:04
it seems to strip some of the newlines... maybe _sri++ could do something about that :-)
TimToady thanks 16:06
16:06 thou joined
jnthn mls__: Sorry, had phone call... 16:07
16:07 tokuhir__ joined
jnthn mls__: What are these two patches aimed at doing? :) 16:07
16:07 mkramer left
jnthn ($*ST.cur_lexpad())[0].pop; # looks a little fragile... 16:08
moritz jnthn: see irclog.perlgeek.de/perl6/2011-08-01#i_4201703
it fixes the double-emitting of CATCH blocks, it seems
mls__ The first one fixes the crash in the last test of try.t 16:11
16:11 phenny left, sbp left
mls__ jnthn: that's why I wanted you to review ;) 16:12
jnthn mls__: First one being the one that adds $/ decl? OK, that seems reasonable.
16:12 sbp joined, phenny joined
mls__ finishpad isn't called for the handler, so $/ is lost 16:13
(I guess)
16:14 nsh joined
jnthn ah, those aren't meant to be per block any more anyways, but I fix that separately. 16:14
moritz I thought that's fixed already?
jnthn moritz: oh, hm
mls__ Maybe you also want a $handler.symbol('$/', :scope('lexical_6model'))
moritz nom: do { 'a' ~~ /./ }; say $/
p6eval nom: OUTPUT«a␤»
moritz that doesn't look too much like 'per block' 16:15
jnthn oh hm.
mls__ (but it seems to work without it. It just needs the .lex "$/")
16:15 PacoLinux left
moritz but maybe there's something else going on here 16:15
moritz -> afk
16:15 jdv79 left
mls__ Without the .lex, $/ ends up as NULLPMC later on -> segfault in binder 16:16
jnthn eek 16:17
OK :)
mls__ (A more robust binder would be nice ;) )
(It segfaults in Rakudo_cont_decontainerize, called from Rakudo_binding_bind_one_param) 16:18
jnthn I'm aware
It's very likely to get fixed in the next day or so, as a side-effect of another fix I need to do.
On the other patch, any idea why we get the double CATCH block emission in the first place? 16:19
It feels like the patch compensates for another bug rather than solving the root issue. 16:20
mls__ It seems to be because the block is pushed to ($*ST.cur_lexpad())[0]
probably for the caputer_lex at the start of the block 16:21
capture_lex
I think it gets pushed in make_simple_code_object 16:22
sorear good * #perl6 16:23
mls__ If I comment out the "push_block_hander" line and the handle_types_except line in statement_control:sym<CATCH>, the pir will still contain the blocks, with just the capture_lex reference
16:23 pernatiy left
dalek atures: 89ea658 | pmichaud++ | features.json:
Add some links to perl6advent entries.
16:24
16:25 jimmy1980 left
sorear jlaire: tacit is easy, it's just like Whatever currying. [+6*] means * + 6 * * 16:26
it probably would have taken me longer if I hadn't made that connection
jlaire sorear: ok 16:27
dalek ast: b71e28f | jonathan++ | S04-statements/try.t:
Unskip a test in try.t (mls++).
16:28 MayDaniel joined
dalek kudo/nom: 9d067ac | jonathan++ | src/Perl6/SymbolTable.pm:
Fix a nasty bug where symbol lookup could eat the name of the symbol being looked up, making future lookups fail.
16:28
kudo/nom: 3554996 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Tentatively make metamodel classes available in userspace.
kudo/nom: eb3e306 | jonathan++ | src/Perl6/Grammar.pm:
Decontainerize custom meta-objects as be import them.
kudo/nom: ba16941 | jonathan++ | src/binder/types.c:
Marshall NULL PMC to Mu when perl6izing.
kudo/nom: 9f9a704 | jonathan++ | src/Perl6/Actions.pm:
Fix mentions of $/ in a CATCH of CONTROL block. Patch courtesy of mls++. Unbusts a test in try.t.
atures: 9b7b4cd | pmichaud++ | features.json:
Remove extraneous colon.
16:31 JimmyZ left, shinobicl joined
jnthn mls__: Digging. :) 16:31
16:31 masak joined
masak \o/ #perl6 16:31
jnthn lolitsmasak!
16:32 ab5tract left
Tene ohaimasak 16:33
jnthn mls__: Trying a different patch. Guess it'll either work or explode :)
16:34 jimmy1980 joined
shinobicl hi again :) How do you create a multiline string in perl6? like perl5's "q" and "qq"? 16:34
tadzik jnthn: could you take a look at gist.github.com/1118463 in some spare time?
pmichaud shinobicl: q and qq 16:35
tadzik shinobicl: both are fine I suppose
"" is fine too
pmichaud nom: say q{hello world};
p6eval nom: OUTPUT«hello world␤»
jlaire perl6: my $x = 'ohai'; $x++ for 1 .. 5*26**3; say $x
pmichaud nom: my $hello = 'hello'; say qq{$hello world};
p6eval rakudo 922500: OUTPUT«(timeout)»
..pugs, niecza v8-10-g77bc5f0: OUTPUT«thai␤»
nom: OUTPUT«hello world␤»
shinobicl rakudo: say q( hello world #comment); 16:36
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
pmichaud shinobicl: parens always make a function call in Perl 6.
shinobicl rakudo: say q{ hello world #comment };
p6eval rakudo 922500: OUTPUT« hello world #comment ␤»
shinobicl oh... that was my error.. i was using ( for opening and closing q 16:37
sorear o/ masak 16:38
tadzik oh hai masak :)
16:40 sidnima joined
jnthn mls__: Seems I have a working patch that just makes us never emit the dupe in the first place. Giving it a good spectest before I push. :) 16:40
sidnima hi
jnthn hi sidnima 16:41
[Coke] jnthn++
sidnima hi jnthn can u tell if perl6 integrate spidermonkey or not 16:42
TimToady std: say q( hello world #comment);
p6eval std 516268a: OUTPUT«===SORRY!===␤Unable to parse argument list at /tmp/CXoiGcq9kk line 1:␤------> say q⏏( hello world #comment);␤Couldn't find final ')'; gave up at /tmp/CXoiGcq9kk line 1 (EOF):␤------> say q( hello world #comment);⏏<E…
16:42 hakank joined
[Coke] sidnima: if it /has/ integrated it or if it /can/ integrate it? 16:43
also: what are you trying to do?
masak sidnima: hi!
moritz std: say q()
p6eval std 516268a: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'q' used at line 1␤Check failed␤FAILED 00:01 119m␤»
sidnima if it /can/ integrate it?
because i have many problem to integrate it in perl 5.10 16:45
jnthn sidnima: Not sure what it involves. But I suspect - at least for Rakudo - that our NCI support isn't up to that yet. 16:46
sidnima thx a lot for ur help 16:47
moritz perl6: say ~(-2.5, 2.5)>>.truncate
p6eval niecza v8-10-g77bc5f0: OUTPUT«Unhandled exception: Unable to resolve method truncate in class Rat␤ at /tmp/02rvySV4qK line 1 (MAIN C1_ANON @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1561 (CORE hyperunary @ 56) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1552 (CORE hyperun…
..pugs, rakudo 922500: OUTPUT«-2 2␤»
16:48 hakank left, thou left
moritz ls 16:48
sorry :-)
TimToady .
..
foo
moritz it's actually foo.pl
masak how predictable. 16:49
tadzik hey, I have it too! 16:50
masak considers starting a "Hackers against naming stuff 'foo'" faction :) 16:51
jlaire TimToady must have a really narrow terminal, or he's using that weird System V (?) convention
tadzik I use 'dupa' quite often too
TimToady obviously you're not a Friend Of O'Reilly
masak phenny: pl en "dupa"? 16:52
phenny masak: "ass" (pl to en, translate.google.com)
TimToady jlaire: no, I'm just narrow-minded
masak not the animal, I presume.
jlaire TimToady: hehe
tadzik masak: how predictable was that? :)
16:52 sidnima left 16:53 mj41 left
masak tadzik: I wouldn't allow it in my codebase. :) 16:53
tadzik Would you allow foo?
masak guess so.
TimToady chromatic might not though :) 16:54
sorear TimToady: what does ~(class A {}) mean now?
masak unless it was a really important method or class :P
jnthn tadzik++ # now I know two Polish words, piwo and dupa :)
"They're all you really need."
masak jnthn: sure you you know wino and wodka also? :P
surely*
TimToady sorear: it means you're trying to stringify a typed undef 16:55
tadzik masak: just before I submit my university projects, I always scan them with ack for words like 'dupa' and some worse ones too
sorear do you really count phonetic loans?
jnthn masak: huh, it's as if you can take Slovak and s/v/w/ :P
sorear heh
tadzik jnthn: it's actually wódka
jnthn nom: say ~(class A {})
p6eval nom: OUTPUT«Rebuild in progress␤»
tadzik so you also have to add a comma, but above ;)
jnthn It's a cute comma. :) 16:56
tadzik a little tail, as we say
phenny: "ogonek"?
phenny tadzik: "tail" (pl to en, translate.google.com)
tadzik that'd be "ogon"
jnthn :)
tadzik see? 5 words ;) 16:57
sorear tadzik: have you seen www.jwz.org/doc/censorzilla.html ?
TimToady oddly, to an English speaker, it's strange to have something with a tail on the top
tadzik it's usually on the bottom 16:58
TimToady we can say that Q has a tail on the bottom
tadzik as in ą, ę etc
16:59 cognominal_ left
_sri moritz: yes, we trim newlines automatically 16:59
tadzik sorear: now I did :)
17:00 jaldhar left
tadzik Linux kernel would lose some value if you'd censor it 17:00
17:00 jaldhar joined
_sri moritz: i've been thinking about alternative methods for text extraction with and without trimming… feel free to poke me on #mojo if you have an idea for names :) 17:00
17:01 cognominal joined
jnthn mls__: yay, patch worked :) 17:03
17:03 impious joined, mjreed left 17:04 daxim left
mls__ \o/ 17:06
dalek kudo/nom: b7570f2 | jonathan++ | src/Perl6/Actions.pm:
Fix duplicate emission of CATCH block PAST; mls++ for noticing and research.
17:07
17:11 jaldhar left 17:13 lefthandman left
mls__ gotta go, bye for now 17:14
tadzik jnthn: any news on the traits segfault?
17:14 mls__ left 17:16 wtw left
jnthn tadzik: No, didn't track that one down yet. 17:16
Tene jnthn: A friend mentioned to me that he tried using nom and noticed that it relied on having CWD set to the source directory.
jnthn Tene: Right, we didn't get make install fixed yet. 17:17
(Which is required for it to work outside of the build directory.)
Tene ah, 'k
jnthn tadzik: Not immediately sure on gist.github.com/1118463
tadzik: oh 17:18
tadzik: What's that "our" doing there?
tadzik: Nothing should be our-scoped in the setting.
tadzik jnthn: stolen from master
jnthn it's probably that.
tadzik oh
gah
jnthn I think I made it fatal to our-scope something in the setting the other day as a bit of circularity sawing...
Though I ain't convinced it worked before either 17:19
tadzik nom: $*OUT.say('foo
p6eval nom: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:244)␤»
tadzik nom: $*OUT.say('foo')
p6eval nom: OUTPUT«foo␤»
tadzik nom: $*ERR.say('foo') 17:20
p6eval nom: OUTPUT«foo␤»
17:23 avar left 17:24 avar joined, avar left, avar joined 17:25 simcop2387 left, wooden left 17:26 shachaf left, spetrea left
tadzik okay, it works 17:26
17:27 spetrea joined, wooden joined, wooden left, wooden joined
jnthn tadzik: yay 17:27
moritz sure it does. I IMPLEMENTED IT!!!
jnthn :D
jnthn -> store
tadzik (:
moritz (assuming you're still talking about $*ERR.say :-)
tadzik moritz: no no, the sub MAIN_HELPER { say 'main' } 17:28
moritz oh. :-)
tadzik but yes, $*ERR is good to be here too :)
masak rakudo: $*OUT := class {}; say 42
p6eval rakudo 922500: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in 'Mu::say' at line 1335:src/gen/core.pm␤ in 'say' at line 5897:src/gen/core.pm␤ in main program body at line 22:/tmp/sXqy7YbZW2␤»
moritz undefined behavior is... undefined. 17:29
masak rakudo: $*OUT := class { method say(*@_) {} }; say 42
p6eval rakudo 922500: ( no output )
17:29 shinobicl left
masak \o/ 17:29
tadzik nom: $*OUT = class { method say($a) { say $a.uc } }; say 42
p6eval nom: OUTPUT«Method 'print' not found for invocant of class '<anon>'␤current instr.: 'say' pc 599763 (src/gen/CORE.setting.pir:0) (src/gen/CORE.setting:3903)␤»
masak :P
tadzik eek
masak watch out for infinite regress when adding a method .print ...
moritz doctor, it hurts... 17:30
masak I have a really good use case for this. 17:31
one that doesn't involve the infinite regress. :)
(so I'm happy it works in Rakudo master)
moritz "works"
masak what? it does exactly what I expected it to. :)
moritz the nom examples also do what I expect them to do :-) 17:32
say() redispatches to $*OUT.say, $*OUT.say redispatches to $*OUT.print
masak yes.
17:32 simcop2387 joined
moritz nom: say (-2.5).Int 17:33
p6eval nom: OUTPUT«-2␤»
moritz nom: say 2.5e0.log(10) 17:36
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'log'. Available candidates are:␤:(Num, Mu %_)␤:(Num, Num $base, Mu %_)␤␤current instr.: 'log' pc 633751 (src/gen/CORE.setting.pir:165046) (src/gen/CORE.setting:1816)␤»
moritz nom: say (-2.5).Int 17:37
p6eval nom: OUTPUT«-2␤»
moritz nom: say (-2).base(10)
p6eval nom: OUTPUT«-2␤»
17:38 shachaf joined
tadzik oh, I may fix the one '- 17:39
' switches while I'm at MAIN
(my ' is too close to the Enter key, it seems)
17:39 jferrero joined
sorear perl6: say (class :: is Str { }).^isa(Str) 17:40
p6eval rakudo 922500: OUTPUT«1␤»
..niecza v8-10-g77bc5f0: OUTPUT«Unhandled exception: Unable to resolve method ast in class Any␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 160 (NieczaActions NieczaActions.morename @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 342 (STD STD.morename @ 24) ␤ at /home/p6eval/niecz…
..pugs: OUTPUT«*** ␤ Unexpected " is"␤ expecting "(", twigil or word character␤ at /tmp/t7KfhE4k21 line 1, column 14␤»
17:40 cognominal left, cognominal joined 17:43 cognominal left, cognominal joined
dalek kudo/nom: 67f49aa | Coke++ | t/spectest.data:
track failure mode.
17:43
tadzik jnthn: how much effort is fixing hypers? 17:46
They currently die with Could not find sub !dispatch_method_parallel
17:47 mj41 joined
dalek kudo/nom: e4ec10f | moritz++ | src/core/Real.pm:
implement Real.base
17:49
sorear std: $Foo:: 17:51
p6eval std 516268a: OUTPUT«ok 00:01 118m␤»
17:51 eiro left
sorear TimToady: what is the denotational semantics of this term? 17:51
flussence looks like an anonymous scalar in the Foo namespace to me, but I'm no expert... 17:53
tadzik rakudo: "foobar".substr(1, -1).say 17:54
p6eval rakudo 922500: OUTPUT«ooba␤»
jnthn tadzik: effort.
tadzik okay
niecza: "foobar".substr(1, -1).say
17:54 impious left
p6eval niecza v8-10-g77bc5f0: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.␤ at CORE.C215_Str_2Esay (Niecza.Frame ) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.RunCore (Niecza.Frame& cur) [0x00000] in <filename unknown>:0 … 17:54
jnthn tadzik: pmichaud++ has it on his task list, and I've no desire to task-steal that item :)
tadzik I see :)
MAIN_HELPER uses it in few places 17:55
TimToady I think it's nonsensical
tadzik it also makes Perl::Tidy cry in a few places :)
TimToady unless we treat postfix:<::> as an operator, and assume $Foo contains a type name
in which case it would be short for $Foo.stash or some such 17:57
PerlJam yuck.
(that's my initial reaction)
sorear niecza: "foobar".substr(1, *-1).say # tadzik 17:58
17:58 eiro joined
p6eval niecza v8-10-g77bc5f0: OUTPUT«ooba␤» 17:58
masak what PerlJam said.
sorear TimToady: suggested error message?
jnthn TimToady: $Foo.WHO most likely.
sorear std: class A is Str:: { } 17:59
jnthn (If we make it mean anything at all, which I'm not really suggesting we do. :) )
p6eval std 516268a: OUTPUT«ok 00:01 118m␤»
sorear TimToady: also, is that sensisble?
TimToady well, it's just following P5 syntax there
PerlJam that's perhaps why my first reaction is "yuck" :)
TimToady ::{$symbol} is just a symbol table lookup
sorear is $Foo:: the SV from the same GV as %Foo:: ? 18:00
TimToady the purpose of the :: being to distinguish type objects, which are undefined, from symbol table hashes, which are defined
I don't recall exactly how it works in P5 :) 18:01
sorear TimToady: what error message do you suggest if someone writes $Foo:: ? 18:02
18:02 eiro left
TimToady you're assuming I've decided it's non-sensical :) 18:03
sorear You *think* it's non-sensical :)
guess that's not enogh
PerlJam TimToady: he's just trying to push you in a good direction.
TimToady followed by "unless"
tadzik sorear: thanks, that's what I expected 18:04
PerlJam pretending it's non-sensical is a nice conservative choice. 18:05
it gives you time to come up with a good use for that syntax.
18:05 birdwindupbird joined
TimToady well, the question is, if Foo::<$bar> means Foo.WHO{'$bar'}, why my $foo = Foo; $foo::<$bar> shouldn't mean the same thing 18:09
we might have to tell longname not to parse a trailing ::, and turn it into a postfix, is all
but I'm okay with forcing people to call .WHO for now, and special-casing FOO::<$bar> 18:11
as you say, it's a bit more conservative
masak +1
TimToady but perhaps a bit harder to optimize
moritz rakudo currently misparses $foo::(bar) as ($foo::).(bar)
TimToady but then the error message would "We didn't have enough courage to make this work orthogonally" :P 18:12
moritz anyway, I'm all for overloading :: less than it's now 18:13
PerlJam or just get rid of the special case and then .WHO is "more natural" :)
TimToady it's a little too ugly for how often you want it
PerlJam How about a nice unicode marker then? 18:14
TimToady CALLER::<$/> is nicer than CALLER.WHO<$/>
tadzik jnthn: is prefix:<|> close?
rakudo: my $a = 5; (|$a).WHAT 18:15
p6eval rakudo 922500: ( no output )
tadzik rakudo: my $a = 5; (|$a).WHAT.say
p6eval rakudo 922500: OUTPUT«Capture()␤»
tadzik rakudo: my $a = 5; Capture.new($a).perl.say
p6eval rakudo 922500: OUTPUT«\(5)␤» 18:16
tadzik rakudo: my $a = 5; (|$a).perl.say
p6eval rakudo 922500: OUTPUT«\(5)␤»
jnthn tadzik: In what context?
tadzik my %possible = |$possible;
jnthn ...what does that do?
tadzik (whatever that means :/)
jnthn I don't consider that meaningful.
tadzik #Returns a hash with the short name as key and long name as value
bla bla bla, return %possible; 18:17
eek
I think I'll refactor it a bit after I make it work
18:18 eiro joined
PerlJam TimToady: I guess the best argument I can come up with is "I don't like it", so have that courage you were talking about earlier :) 18:19
18:19 mj41 left
pmichaud today's high temperature: 41.7degC 18:21
tadzik rakudo: my %a = a => 1; say {%a}.perl
p6eval rakudo 922500: OUTPUT«{"a" => 1}␤»
pmichaud tomorrow's high: 41.7degC
Wednesday's high: 41.7degC
:-( 18:22
diakopter degF?
pmichaud 107
moritz whoa there
pmichaud we get a break on Thursday. Only 41.1degC
masak oh that's a relief.
18:23 nbrown left 18:24 nbrown joined
pmichaud today represents the 31st consecutive day of 100degF+ temperatures where I live. :( 18:24
colomon and that is one good reason I don't live in Texas. Ugh.
TimToady y'know, there's Unicode for ℃ and ℉ so you don't have to use the, er, Texas versions
pmichaud y'know, those codepoints appear as boxes in my font. :-) 18:25
tadzik nom: ('a', 'b').hash.perl.say
TimToady must be a Texas font then
p6eval nom: OUTPUT«("a" => "b").hash␤»
pmichaud .u ℃
phenny U+2103 DEGREE CELSIUS (℃)
colomon must remember not to gripe about his local heatwave, which has not gone about 100degF
PerlJam pmichaud: that's what you get for moving away from the coast! :-)
TimToady they have Texas fonts at the coast too 18:26
diakopter fronts too
pmichaud so far we have no fronts 18:27
a front would be welcome. :-)
huf so that's where our summer heat went
it's been rainig/overcast/cool for 3 weeks over here :)
tadzik nom: my $a, $b; say $b.perl
p6eval nom: OUTPUT«Symbol '$b' not predeclared in <anonymous> (/tmp/tSDINxroK7:1)␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 154 (compilers/pct/src/PCT/HLLCompiler.pir:111)␤»
tadzik . o O ( how on earth did this work )
oh, $b was declared earlier
diakopter pmichaud: has there been a night where it stayed above 100 all night 18:28
pmichaud diakopter: no, we tend to get down into the 80s at least
but it does stay in the 90s until well after midnight
masak I know it's been up for discussion before... but every time I use Moose's BUILD, I find myself wanting that Perl 6's would work the same way. 18:29
18:29 icwiener joined
diakopter is visiting Houston this weekend 18:29
pmichaud diakopter: ouch
masak in Moose, BUILD runs *after* the attribute initializations, not *instead of* them.
tadzik aye
I don't like calling callsame; at the beginning of every BUILD I write 18:30
diakopter it will be quite different from the balminess here in CA
pmichaud ...why would someone write callsame at the beginning of BUILD? /me confused.
PerlJam diakopter: I hope you can deal with heat and humidity because you'll have lots of both in Houston
moritz BUILDALL calls alls BUILD submethods
diakopter I grew up there
pmichaud diakopter: okay, so you know what you're getting into. :) 18:31
masak I've never written a BUILD in Perl 6 where I *wanted* the initializations I wrote higher up in the class declaration to be invalidated.
TimToady that's not the point
masak and it keeps surprising people who haven't used Perl 6 OO before. they keep expecting it to work the other way.
there are bug reports in RT about it. 18:32
several.
PerlJam masak: do you mean people who've used Moose but not P6 before, or just random people who haven't used Moose before get confused?
diakopter those poor randoms 18:33
moritz it certainly surprises me occasionally
masak PerlJam: don't exactly know. I hadn't used Moose enough to be influenced by it when I found the Perl 6 behavior wrong the first time.
as for others, no idea.
PerlJam okay ... just wondering if it was just a cultural bias from Moose. 18:34
tadzik I thought it was broken when I moved Moose -> Perl 6
someone even assured me that yes, it's broken :)
moritz one more thing: can I somehow rerun initialization of dependent attributes? 18:35
has $.x = 3; has $.a = $.x * 2;
hm, maybe I shoudl really use methods instead...
but then they aren't so easily overridable 18:36
PerlJam um ... doesn't that use a method?
masak yes.
moritz just for the lookup of $.x
masak inside a thunk, so that it's run at obj instantiation. 18:37
pmichaud I don't quite understand "rerun initialization of dependent attributes".
moritz well, the computation in has $.a = $.x * 2 has to run at some piont 18:38
tadzik rakudo: my $a = 5; if 1 { my $b, $a; say $a }
p6eval rakudo 922500: OUTPUT«5␤»
PerlJam tadzik: precedence. 18:39
pmichaud right. It runs at the end of the BUILD submethod for the class, if $!a hasn't already been initialized.
tadzik PerlJam: what do you mean?
moritz and at some point if $!x has joined, I might want to rerun the computation
tadzik PerlJam: no, that's precisely what I wanted to check :)
PerlJam tadzik: oh. ok. :)
pmichaud moritz: you mean after object construction?
tadzik PerlJam: in master's MAIN.pm there was a my $a, $b :)
moritz pmichaud: yes
pmichaud moritz: ah.
maybe a closure on the attribute or something. 18:40
18:41 soh_cah_toa joined
masak oh! 18:42
that reminds me.
hakank++ and I had an interesting discussion about Excel-like dependent variables the other day. 18:43
18:43 envi left
masak one declares a variable, along with the variables it depends on. 18:43
whenever one of the dependencies change, the variable is recalculated according to its latest assignment. 18:44
we figure that can be done by switching out Scalar for something else :)
tadzik to a closure maybe :)
TimToady there's just something terribly wrong with the view that BUILD is for patching up the defaults when they screw up; just because Moose stole the word BUILD for that doesn't make it right 18:45
masak closures: the solution to everything.
TimToady so what we've got is two very different concepts of when the user wants control, and P6 should give both options 18:46
18:46 daniel-s left
masak TimToady: there's just something terribly wrong with declaring a BUILD and having all the attribute initializations at the top of the class ignored. :/ 18:46
TimToady but BUILD is never going to be the one Moose provides, I expect
what part of "default" do you not understand?
masak sighs 18:47
pmichaud ...they aren't ignored.
masak this happened last time we talked about this feature, too...
TimToady we need a way of saying "now set the defaults, and then let me override them because I wrote them as initializers
masak rakudo: class A { has $.x = 42; submethod BUILD {} }; say A.new.x 18:48
TimToady but with the initializer viewpoint you can never say = die "phooey"
p6eval rakudo 922500: OUTPUT«Any()␤»
masak pmichaud: ignored.
pmichaud masak: that looks like a rakudobug to me.
masak TimToady: see!?
colomon nom: class A { has $.x = 42; submethod BUILD {} }; say A.new.x 18:49
p6eval nom: OUTPUT«42␤»
masak \o/
PerlJam nom groks submethods?
TimToady I see a bug
pmichaud as I said. Rakudobug.
tadzik goodie :)
masak ok, that makes things a ton better :)
PerlJam looks a the feature matrix again.
sorear colomon: for once in my life I think San Diego's weather is good
tadzik so we can actually port IO::Socket::INET without fixing callsame :P
pmichaud S13 is pretty explicit here... uninitialized attributes use the defaulters
tadzik TiMBuS: heard that? :) 18:50
masak TimToady: sorry for being so obtuse. all this time, I've been thinking you've been defending that rakudobug as a design feature... :/
pmichaud *S12
masak so BUILD doesn't override all attribute initializers, only those it mentions. good.
pmichaud correct.
masak that's fine, I think. 18:51
moritz it mentions, or it assigns to?
pmichaud initializes.
masak did we ever iron out what "initialized" means? :)
masak is just full of Pandora box openers today :) 18:52
pmichaud S12:735, for those who are interested.
colomon sorear: San Diego seemed like it had nice weather (though definitely too hot for me) the one time I visited.
18:53 icwiener left
sorear since TimToady hasn't suggested an error message for '$Foo::' yet, I'll go with 'Illegal use of terminal double colon on sigilled name' 18:53
moritz s/terminal/trailing/ 18:54
sorear also, what do we do about class Foo is Str:: { } # jnthn ?
moritz and maybe add ". To access the symbol table, use .WHO
TimToady sigiled is probably more correct, since it's an unemphasized syllable 18:55
sorear heh, I betray my pronunciation like that? 18:56
sorear always says si-GILL
masak mais oui!
pmichaud std: class A { has $.x = 42; submethod BUILD {} };
p6eval std 516268a: OUTPUT«ok 00:01 121m␤»
sorear or si-JILL
pmichaud std: class A { has $.x = 42; method BUILDX {} }; 18:57
p6eval std 516268a: OUTPUT«ok 00:01 121m␤»
pmichaud at one point we had discussed requiring method declarations to have an explicit signature.. did that get dropped?
tadzik I gotta find some short-session hobby waiting for Rakudo to compile
18:57 MayDaniel left
PerlJam tadzik: origami 18:58
tadzik hmm
PerlJam so ... features.json seems inaccurate regarding submethods, but should it be rn+- or rn+ ? 18:59
tadzik I sewed myself a Kindle sleeve while waiting for the spectest run yesterday :)
masak pmichaud: yes. it got dropped.
pmichaud: nowadays, 'method greet' means 'method greet()'
pmichaud PerlJam: I suspect rn+ is fine.
if someone wants to point to a submethod feature that 2011.07 implements that nom doesn't, we can do rn+- 19:00
tadzik setting compilation now takes a Gigabyte of RAM on my machine
that's... less than awesome
masak pmichaud: couldn't the tests answer that question?
pmichaud masak: sure, they could. 19:01
tadzik sorry, 1 GB and counting. Is that normal?
masak pmichaud: just checking :)
19:03 Mowah joined
sorear tadzik: it fluctuates wildly 19:03
jnthn (submethods) not aware of any lackings we have there. 19:04
So rn+ is fine, afaik.
dalek atures: a3a8349 | duff++ | features.json:
nom appears to grok submethods
19:05
sorear Who is duff?
PerlJam me
sorear ah
masak IT'S YOU! 19:06
masak points
PerlJam actually ... where does it get "duff" from ?
I'm perlpilot on github
tadzik jnthn: what is the Parameter.named in nom? Not implemented or something new?
. o O ( maybe I should stop extending nom's setting or I won't be able to compile it anymore ) 19:07
dalek ecza: 6f99914 | sorear++ | src/niecza:
Improve processing of trailing double colons, class :: is Str now works
19:08
jnthn masak: Yes, attr init and BUILD got fixed in nom
masak: re what does initialzied mean - whatever the REPR says.
masak jnthn: ok. so you can ask a REPR whether the storage location was initialized? 19:09
tadzik jnthn: is method named() {nqp::p6bool($!flags +& $SIG_ELEM_SLURPY_NAMED)} ok?
jnthn tadzik: See S06 for the interface Parameter is expected to expose
Or master :)
tadzik saw master, but it's cheating a lot :) 19:10
jnthn masak: Well, the guts can :)
tadzik: It cheats to do what it does, but I think it gets the right semantics on the outside.
tadzik jnthn: there is a SLURPY_NAMED flag, but no NAMED flag :)
jnthn tadzik: Correct.
tadzik so, is my implementation of named() (above) correct? 19:11
jnthn tadzik: ah, now I look at it...now
*no
tadzik what does it miss?
jnthn It doesn't check for a parameter being named :P
tadzik asd
jnthn tadzik: That's checkable by "is $!named_names null" :)
tadzik okay 19:12
hmm
19:13 shinobicl_ joined
tadzik sorear: have you tried to compile nom on your machine? Maybe Parrot's GC is just overestimating mine 19:13
sorear tadzik: yes 19:14
not recently though 19:15
there could have been a regression
shinobicl_ hi, i still having a little trouble with roles. I have a operator - that should work when two Dates have certain role (Workday). So, i defined the operator like this: multi infix:<-> (Workday $start, Workday $target). (the operator is not defined inside the role, by the way). 19:19
19:20 kjeldahl_ joined, kjeldahl_ left
tadzik hmm, the second most often query that sends google users to my blog is "is perl 6 ready" 19:22
TimToady does 1.2G here on a 64-bit machine 19:24
about the same as my firefox-bin :)
masak tadzik: well, is it? is it? huh? huh? :P
tadzik masak: I suspect it's due to the "ready enough for me" post :)
jnthn "Yes, but are YOU ready for Perl 6?" 19:25
shinobicl_ i would answer that as "no"
TimToady the ready is unevenly distributed
PerlJam shinobicl_: so, what's the trouble?
tadzik oh, I has a nice theme 19:26
masak shinobicl_: what PerlJam said. what feature are you waiting for? :)
sorear I would guess shinobicl_ is using Rakudo
tadzik and probably means "Is Rakudo ready"
sorear which has a bug that requires multi infixes to be declared "our" or else they don't work
masak almost made a "running in the rain" metaphor blog post yesterday
shinobicl_ many gotchas here and there... i'm still learning... example: i used my $string = q(message #comment); but ( are now for subs... things like that
sorear q[] and q () both still work
shinobicl_ i would answer "no" to "are you ready for Perl6?"
PerlJam sorear: well, roles /are/ only partially implemented in niecza ;) 19:27
sorear it's only q() that is a sub call
PerlJam: that's one of the reasons I think shinobicl_ is using rakudo
PerlJam: also nobody's heard of niecza.
PerlJam the name is much harder to pronounce than rakudo 19:28
tadzik for you, americans :P
PerlJam (at least at first blush)
TimToady what's hard about knee-ey-cha?
PerlJam it's missing a zed 19:29
TimToady the z is just like an h
masak TimToady: I say it more like "nye-cha". 19:30
masak feels dirty for using English phonemes to explain pronunciation
tadzik Method 'named_names' not found for invocant of class 'Parameter'
jnthn: ?
TimToady well, sure, but nye is misleading
Su-Shee nee eh cha would be my version ;)
huf you mean it's not nee-eh-tza? 19:31
dammit ;)
PerlJam Su-Shee: emphasis on the "eh"?
jnthn tadzik: Did I say method?
masak nyEHcha.
TimToady ñaycha
tadzik jnthn: I used $!
nqp::p6bool(nqp::isnull($!named_names))
nyecha
jnthn tadzik: er, huh
Su-Shee PerlJam: I'd pronounce it similar to the italian "pieta"
jnthn That's certainly an attribute access. wtf. :/
tadzik pietscha :)
huf what language is it in anyway?
polish? 19:32
PerlJam sorearish
TimToady it's mock eastern european :)
huf ah
tadzik not really polish
huf i was just randomguessing
tadzik but it's derived from "nie czas" I think
phenny: "nie czas"?
phenny tadzik: "no time" (pl to en, translate.google.com)
huf oh!
jnthn
.oO( неча )
huf well that's droll
tadzik "Not the right time", I'd say
19:33 saaki left
tadzik eek, it seems to appear only sometimes, or something 19:33
> Parameter.new().named
Bool::True
PerlJam sorear: looking at the feature matrix (assuming it's accurate), there doesn't appear to be much that niecza lacks that I would carp about coming from rakudo (and, in fact, you appear to have more stuff implemented). So ... you need better marketing :) 19:34
tadzik jnthn: any ideas? 19:36
jnthn tadzik: Doing anything with what you get from Parameter.new is likely bogus. 19:38
sorear I like 'nqp::p6bool(nqp::isnull($!named_names))'. best pronunciation suggestion I've heard all day. :) 19:39
tadzik jnthn: I think it's a grep's fault
called from Sub '_block13151' pc 639402 (src/gen/CORE.setting.pir:163703) (src/gen/CORE.setting:629)
:629 is grep
shinobicl_ rakudo: role Workday { method greet{say "I'm a Workday!"}}; multi infix:<-> (Workday $wd1, Workday $wd2) { return 0 }; my $nd1 = Date.new('2011-01-01'); my $nd2 = Date.new('2011-01-02'); my $wd1 = Date.new('2011-01-01') does Workday; my $wd2 = Date.new('2011-01-02') does Workday; $wd2.greet; say $nd1 - $nd2; say $wd1 - $wd2; 19:41
tadzik or, it may be me who broke MAIN.pm while visual-refactoring it
p6eval rakudo 922500: OUTPUT«I'm a Workday!␤-1␤Ambiguous dispatch to multi 'infix:<->'. Ambiguous candidates had signatures:␤:(Workday $wd1, Workday $wd2)␤:(Date $a, Date $b)␤␤ in main program body at line 22:/tmp/VM3PkZV7Es␤»
shinobicl_ rakudo: role Workday { method greet{say "I'm a Workday!"}}; multi infix:<-> (Date $wd1 does Workday, Date $wd2 does Workday) { return 0 }; my $nd1 = Date.new('2011-01-01'); my $nd2 = Date.new('2011-01-02'); my $wd1 = Date.new('2011-01-01') does Workday; my $wd2 = Date.new('2011-01-02') does Workday; $wd2.greet; say $nd1 - $nd2; say $wd1 - $wd2;
p6eval rakudo 922500: OUTPUT«I'm a Workday!␤Ambiguous dispatch to multi 'infix:<->'. Ambiguous candidates had signatures:␤:(Date $wd1, Date $wd2)␤:(Date $a, Date $b)␤␤ in main program body at line 22:/tmp/NINX5miOt7␤»
jnthn shinobicl_: That's correct. Workday and Date are tired. 19:42
grr
*tied
shinobicl_ is the only way to avoid this to declare "Workday" as a class?
jnthn I doubt that'll help
It's that Workday and Date aren't in any kind of subtyping relationship.
19:43 pernatiy joined
masak ah! the old Circle - Ellipse problem :) 19:43
TimToady sorear: maybe you should name it 煮え茶 instead to make the pronunciation clearer :)
moritz multi infix:<-> (Date $wd1 does Workday, Date $wd2 does Workday)
masak or the Square - Rectangle problem, depending on which OOD school you went to...
moritz I didn't even know that this syntax exists
masak me either. 19:44
moritz btw tools/test_summary.pl says 8682 passing tests, 943 skips, 383 todo
masak std: role Workday {}; multi infix:<-> (Date $wd1 does Workday, Date $wd2 does Workday) {}
p6eval std 516268a: OUTPUT«Potential difficulties:␤ $wd1 is declared but not used at /tmp/58PAPVE5Wh line 1:␤------> role Workday {}; multi infix:<-> (Date ⏏$wd1 does Workday, Date $wd2 does Workda␤ $wd2 is declared but not used at /tmp/58PAPVE5Wh line 1:␤------> infi…
shinobicl_ rakudo: class Workday is Date { method greet{say "I'm a Workday!"}}; multi infix:<-> (Workday $wd1, Workday $wd2) { return 0 }; my $nd1 = Date.new('2011-01-01'); my $nd2 = Date.new('2011-01-02'); my $wd1 = Workday.new('2011-01-01'); my $wd2 = Workday.new('2011-01-02'); $wd2.greet; say $nd1 - $nd2; say $wd1 - $wd2;
p6eval rakudo 922500: OUTPUT«I'm a Workday!␤-1␤0␤»
masak std: role Workday {}; multi infix:<-> (Date $wd1 does Workday, Date $wd2 does Workday) { $wd1, $wd2 }
p6eval std 516268a: OUTPUT«ok 00:01 125m␤»
TimToady params are declarations too 19:45
so they can take traits
jnthn Yes, but that doesn't mean params have any clue what to do with said trait. 19:46
nom: sub foo($x does Positional) { }
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<does>'. Available candidates are:␤:(Mu $doee, Mu $role)␤␤current instr.: 'trait_mod:<does>' pc 576037 (src/gen/CORE.setting.pir:134501) (src/gen/CORE.setting:66)␤»
jnthn Right.
TimToady at minimum could morph into where Worday
*day
shinobicl_ i'm thinking that is not of much use to declare operators for certain roles...
19:46 cognominal left
shinobicl_ but it makes sense declaring them for classes 19:46
19:47 cognominal joined
TimToady classes are allowed to export 19:47
tadzik how about ($a where Workday) or so?
TimToady since classes are also modules
jnthn tadzik: What'd work.
But Date would win.
Date $a where Workday # would win. 19:48
s/What'd/That'd/
tadzik jnthn: found it, it actually's complaining about the actual .named_names elsewhere :)
shinobicl_ rakudo: role Workday { method greet{say "I'm a Workday!"}}; multi infix:<-> (Date $wd1 where Workday, Date $wd2 where Workday) { return 0 }; my $nd1 = Date.new('2011-01-01'); my $nd2 = Date.new('2011-01-02'); my $wd1 = Date.new('2011-01-01') does Workday; my $wd2 = Date.new('2011-01-02') does Workday; $wd2.greet; say $nd1 - $nd2; say $wd1 - $wd2;
p6eval rakudo 922500: OUTPUT«I'm a Workday!␤-1␤0␤» 19:49
shinobicl_ it works with "where" :)
tadzik :)
shinobicl_ cool
tadzik shinobicl_: do you know how that works?
where does smartmatching, so there happens something like $a where { $a ~~ Workday } 19:50
shinobicl_ because $wd1 - $wd2 is meant to return 0, when $wd1 and $wd2 has the Workday role
tadzik which becomes { $a.does(Workday) } I think
PerlJam is still puzzling over the "does" variants from before. 19:52
tadzik oh cool, I can now measure how far I'm in setting compilation by looking at the memory usage :)
43%, so about 10 more to go
PerlJam do they mean that anything that gets stuck in that parameter on dispatch will also do the role? 19:53
masak std: sub foo($x but Int) { say $x } 19:54
p6eval std 516268a: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/QLcH9iZG7O line 1:␤------> sub foo⏏($x but Int) { say $x }␤Couldn't find final ')'; gave up at /tmp/QLcH9iZG7O line 1:␤------> sub foo($x ⏏but Int) { say $x }␤ e…
masak ;)
jnthn PerlJam: .does is for checking 19:55
PerlJam std: sub foo($debbie does Dallas) { } # parameters with benefits?
p6eval std 516268a: OUTPUT«Potential difficulties:␤ $debbie is declared but not used at /tmp/J8ULzBCQhe line 1:␤------> sub foo(⏏$debbie does Dallas) { } # parameters w␤ok 00:01 120m␤»
jnthn *lol*
19:56 Trashlord left
tadzik jnthn: what type is $!named_names? 19:56
I get Null PMC access in find_method('elems')
on that
jnthn tadzik: Parrot RPA
tadzik aw, snap
should it be?
jnthn yes.
tadzik okay 19:57
jnthn tadzik: The innards of Parameter are optimized for the binder, not for the person writing the Parameter introspection methods. :)
tadzik I'll just +($_.named_names) then
masak std: sub oscar_wilde($genius) {}
p6eval std 516268a: OUTPUT«Potential difficulties:␤ $genius is declared but not used at /tmp/XY4lxZFXeW line 1:␤------> sub oscar_wilde(⏏$genius) {}␤ok 00:01 120m␤»
jnthn tadzik: nqp::elements($!named_names)
tadzik alright, so what should the public method named_names return, still RPA?
jnthn tadzik: no, should turn the RPA into a Parcel or so
tadzik with infix<,>, si? 19:58
jnthn use pir::perl6ize_type__PP($!named_names)
tadzik jnthn++
sorear Perl 6 code should never see any object that !~~ Mu
19:58 Trashlord joined
sorear user-level 19:58
tadzik yeah, I think so
jnthn Indeed. 19:59
19:59 mj41 joined
moritz have I already lamented about how I hate the "everything is an object" meme? 19:59
19:59 birdwindupbird left
sorear moritz: No. At least not with me around. 19:59
moritz everything? really? is a method call an object?
tadzik especially when C++ers or Javaers say that :P
masak moritz: everytime you object, that's an object too :P 20:00
PerlJam moritz: blame smalltalk
sorear likes to think about Perl 6 through the lens of denotational semantics
tadzik at some stage, a method call is a Match object, yes :P
masak 'sides, a method call could totally be an object.
tadzik or a PAST::Op 20:01
sorear there is a universe O of things that can be stored in my Mu $x. I call these things objects.
moritz so, is a GC run an object?
sorear no, a GC run cannot be stored in a variable.
tadzik if think you're taking "everything" a bit too literally, although it may sound a bit too general, yes
moritz sorear: what does "denotational" mean? my dictionary doesn't know it...
PerlJam How about "all nouny things are objects" ? 20:02
so, if you noun a verb, it could be an object.
sorear moritz: I don't think it means anything. I understand [denotational semantics] as an atomic noun
moritz PerlJam: "program exit" sounds like a noun-y thing to me, and isn't an object either 20:03
if people say "everything you can store in a variable is an object", that's fine by me 20:04
20:04 Mowah left
tadzik nom: Parameter.new.name.WHAT 20:04
p6eval nom: ( no output )
tadzik nom: Parameter.new.name.WHAT.say
p6eval nom: OUTPUT«Str()␤»
PerlJam moritz: "all non-temporal nouny things"? ;) 20:05
tadzik rakudo: say Mu.elems
p6eval rakudo 922500: OUTPUT«Method 'elems' not found for invocant of class ''␤ in main program body at line 22:/tmp/cA4UcSN5Hj␤»
sorear every expression, in a concrete runtime context, has a meaning which consists of a set of modifications to global state, and either an Object O, a Container C, an Unwinding_Exception E, or NonTermination 20:06
tadzik is Parameter object specc'd?
PerlJam feels like he's just entered a Theory of Computation class. 20:07
jnthn tadzik: S06
tadzik List. So it can't be Mu
nom: say ().WHAT
p6eval nom: OUTPUT«Parcel()␤»
sorear "everything is an object" is not the meme itself, but the soundbite form of the meme
tadzik nom: say () ~~ List 20:08
p6eval nom: OUTPUT«Bool::False␤»
tadzik ekhm
nom: say List.new.perl
p6eval nom: OUTPUT«().list␤»
tadzik oh
TimToady nom: say Nil ~~ Mu
moritz it's a Parcel
p6eval nom: OUTPUT«Bool::True␤»
TimToady nom: say Mu ~~ Nil
p6eval nom: OUTPUT«Bool::False␤»
tadzik nom: say ().list.elems
p6eval nom: OUTPUT«0␤»
sorear expressions in Java (to pick a well-known example) have a semantic result with a semantic object universe O, but elements of O do not have much of a common interface
you can't make a call to .GetClass() for an arbitrary semantic object 20:09
TimToady .WHAT!?!
tadzik also, not everything is an object
sorear until recently, you couldn't put any semantic object into containers
tadzik they have primitive types
TimToady
.oO(Occam's circular saw)
20:10
tadzik this could be useful to shave your neck
masak shave *off* your neck, you mean!
tadzik oh, saw. Then maybe to shave your neck off
sorear in more modern languages, like C# and Ruby and Perl6, all semantic objects are instances of an 'Object' class and the load on programmers is lighter 20:11
however, this is a mouthful. Who coined the 'Everyhting is an object' soundbite? Was it the Ruby community? 20:12
tadzik wasn't it Smalltalkers?
TimToady you just have to define "thing" right :)
maybe we should've named Mu Every, so we could have Every thing to go with Any thing 20:14
sorear tadzik: Smalltalk, IIUC, had the universal base class nature, but when you're just introuducing OO to the world 'Everything is an object' isn't a terribly good slogan
TimToady it's a good first approximation 20:15
masak if we ever get an .each junction, will it just translate to a map around the whole expression?
TimToady you have to believe temporary lies to learn most anything
tadzik nom: Array.can('unshift')
p6eval nom: ( no output )
sorear the C89 spec uses 'object' to mean 'a region of memory with semantic importance'. in 1989, C had more "object"s than Smalltalk, an int on the stack has 3 objects...
tadzik nom: say so Array.can('unshift')
p6eval nom: OUTPUT«Bool::True␤»
tadzik Method 'unshift' not found for invocant of class 'Array'. Huh
sorear nom: say so Array.can('pie') 20:16
p6eval nom: OUTPUT«Bool::True␤»
sorear nom: say Array.can('pie').WHAT
p6eval nom: OUTPUT«Parcel()␤»
sorear nom: say Array.can('pie').perl
p6eval nom: OUTPUT«()␤»
tadzik ASD
sorear ASD?
tadzik nom: Array.can('unshift').perl.say
p6eval nom: OUTPUT«()␤»
tadzik sorear: just a placeholder, I sometimes use it to express astonishment 20:17
nom: [1, 2, 3].unshift.say
p6eval nom: OUTPUT«Method 'unshift' not found for invocant of class 'Array'␤current instr.: '_block1002' pc 111 ((file unknown):80064907) (/tmp/2eMWhOcEDN:1)␤»
tadzik rakudo: [1, 2, 3].unshift.say
p6eval rakudo 922500: OUTPUT«1 2 3␤»
tadzik how come nom has unshift NYI? Gosh
TimToady nom is too shifty 20:18
masak fruits. they're hanging so low.
TimToady or maybe too pushy
tadzik I'm picking that one, stay off! 20:19
masak makes to do it faster than tadzik :P
sorear std: $foo.^?pi 20:20
p6eval std 516268a: OUTPUT«===SORRY!===␤Variable $foo is not predeclared at /tmp/ohzcx1sDrD line 1:␤------> $foo⏏.^?pi␤Confused at /tmp/ohzcx1sDrD line 1:␤------> $foo.^⏏?pi␤ expecting dotty method or postfix␤Parse failed␤FAILED 00:01 …
sorear std: 1.^?pi
p6eval std 516268a: OUTPUT«===SORRY!===␤Confused at /tmp/sdrHDuXSLr line 1:␤------> 1.^⏏?pi␤ expecting dotty method or postfix␤Parse failed␤FAILED 00:01 119m␤»
sorear I am suprised this does not parse as 1.HOW.?pi(1)
tadzik rakudo: ().unshift
p6eval rakudo 922500: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 22:/tmp/Q_d2xLD_fq␤»
tadzik masak: ...first! 20:21
and 6 minutes to compile the beast, yes :)
sorear hmm 20:22
PerlJam wonders how hard it would be to write an "autovivification" pragma like Perl 5 has.
sorear I am now dealing with a combinarial explosion (again)
$foo.^Bar::($bar)() 20:23
or better yet $foo.?Bar::($bar)()
I already have special code for various modified method calls. Now I need to add matching indirect-name cases?
masak tadzik: :) 20:24
tadzik++
sorear PerlJam: theory of computation is fun! 20:25
rakudo: "x" ~~ / <Cursor::alpha> /; say $/.keys 20:27
p6eval rakudo 922500: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near "::alpha> /"␤»
sorear rakudo: "x" ~~ / <.Cursor::alpha> /; say $/.keys
p6eval rakudo 922500: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near "::alpha> /"␤»
sorear huh?
nom: "x" ~~ / <Cursor::alpha> /; say $/.keys
p6eval nom: OUTPUT«regex assertion not terminated by angle bracket at line 1, near "::alpha> /"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
[Coke] TimToady: (Mu as Every) I'd rather call Mu No, then. 20:35
20:37 saaki joined
moritz now that we mostly use Any when we mean "undef", can we s:g/Mu/Object/ again? :-) 20:37
tadzik hihi :)
masak moritz: +1 20:39
moritz does t/spec/S32-num/base.t run glacially slow for anybody else? 20:40
jnthn moritz: I noticed that too but didn't get to investigate.
moritz even under load it's a bit harsh to take 27s for 10 tests 20:41
jnthn Ok, it wasn't *that* glacial
but still, wtf is going on there... 20:42
moritz I don't really see what could be wrong 20:43
20:43 soh_cah_toa left
moritz the code is pretty straight forward 20:43
masak tries to think up an autopun about the parsing speed being normal in a different number base 20:44
nope. drawing a complete blank. 20:45
moritz maybe it's drawing too many blanks all the time? 20:46
masak :P
rakudo: .say for <blank blank blank>.roll(50)
jnthn Beat me
*Beats
p6eval rakudo 922500: OUTPUT«blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤blank␤b…
masak slaps jnthn with a trout
moritz hopes it's a random trout 20:47
20:47 mj41 left
masak rakudo: class Trout { method question { say <Yes No>.roll } }; Trout.new.question("Are you random?") 20:48
p6eval rakudo 922500: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in 'Trout::question' at line 22:/tmp/iqYwQ_a3wn␤ in main program body at line 22:/tmp/iqYwQ_a3wn␤»
masak rakudo: class Trout { method question($q) { say <Yes No>.roll } }; Trout.new.question("Are you random?")
p6eval rakudo 922500: OUTPUT«Yes␤»
masak moritz: it's a random trout.
tadzik gist.github.com/1118969 does this appear to be wrong to not only me? 20:49
sorear tadzik: yes, wrong 20:50
masak tadzik: looks weirds, for sure. 20:51
jnthn moritz: golfed
sorear argument to unshift is a slurpy
masak 'night, #perl6
20:51 masak left
sorear rakudo: say 42.base(16) 20:51
p6eval rakudo 922500: OUTPUT«2A␤»
moritz jnthn: golfed?
sorear moritz: is nom or ng slow on base.t? 20:52
moritz sorear: nom
jnthn sorear: nom
We have a nasty performance bug
for 1..10 { my @conversion = 'A' .. 'Z';
}
moritz: Try the above.
moritz ouch
dalek kudo/nom: 4d988e8 | moritz++ | LHF.markdown:
remove item from LHF.markdown
kudo/nom: 57a0e27 | moritz++ | src/Perl6/Actions.pm:
remove trailing ws from Actions.pm -- no functional changes
jnthn pmichaud: ping, if you're about.
kudo/nom: 20a62b2 | moritz++ | src/Perl6/Actions.pm:
handle and check adverbs on rx//
20:52 localhost joined, localhost left
sorear nom: for 1..10 { say ['A' .. 'Z'] } 20:53
p6eval nom: OUTPUT«Rebuild in progress␤»
jnthn moritz: String ranges seem to be insanely slow for some reason, anyway. 20:54
shinobicl_ i have a class and i want to be able to compare 2 objects of that class for "equivalence"
the equivalence is if 2 member arrays of the object are the same 20:55
what operator should i use: eq, == or ~~ ?
i dont know which one to overload
i know that ~~ is true if the 2 objects are exactly the same... so this might be a bad candidate.... and == should be left for numbers only. I'm using 'eq' and 'ne' for the moment. 20:57
but that's my opinion...
tadzik nqp: my @a := []; nqp::unshift(@a, [1, 2, 3]); say(+@a) # bug?
p6eval nqp: OUTPUT«1␤»
20:57 thou joined
tadzik oh, nope 20:57
slurpy
nqp: my @a := []; nqp::unshift(@a, 1, 2, 3); say(+@a) 20:58
p6eval nqp: OUTPUT«error:imcc:The opcode 'unshift_p_p_p_p' (unshift<4>) was not found. Check the type and number of the arguments␤ in file '(file unknown)' line 49␤»
tadzik nqp: my @a := []; nqp::unshift(@a, (1, 2, 3)); say(+@a)
p6eval nqp: OUTPUT«1␤»
tadzik hmm
jnthn: is that okay?
20:58 thou left 20:59 localhost joined
tadzik possibly nqp::unshift is one-argumental 21:00
21:04 shinobicl_ left
dalek atures: 410b05d | larry++ | features.json:
add basic specs
21:04
21:08 soh_cah_toa joined
moritz rakudo: my @a = 0 .. 9, 'A' .. 'Z'; say @a.perl 21:09
p6eval rakudo 922500: OUTPUT«[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]␤»
TimToady nom: my @a = 0 .. 9, 'A' .. 'Z'; say @a.perl 21:10
p6eval nom: OUTPUT«Array.new(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "AA", "AB", "AC", "AD", "AE", "AF", "AG", "AH", "AI", "AJ", "AK", "AL", "AM", "AN", "AO", "AP", "AQ", "AR…
TimToady nom: my @a = lol 0 .. 9, 'A' .. 'Z'; say @a.perl
p6eval nom: OUTPUT«Could not find sub &lol␤current instr.: '_block1002' pc 119 ((file unknown):86) (/tmp/zPI05I2ohf:1)␤»
moritz oh, it doesn't stop at Z ?
it goes right up to YZ 21:11
TimToady nom: my @a = (0 .. 9, 'A' .. 'Z').lol; say @a.perl
p6eval nom: OUTPUT«Array.new(0..9, "A".."Z")␤»
TimToady that's not right
nom: my @a = (0 .. 9, 'A' .. 'Z').lol; say @a[0].perl 21:12
p6eval nom: OUTPUT«0..9␤»
tadzik .lol :)
oh, that's correct
TimToady nom: Array.new(0..9, "A".."Z")[0].perl.say
p6eval nom: OUTPUT«0␤»
TimToady it's the .perl repr that is incorrect
pmichaud: ^^ 21:13
jnthn tadzik: NQP doesn't differentiate between (...) and [...]
tadzik: At least, not in that sense.
moritz nom: say ('A' .. 'Z').list.elems 21:14
p6eval nom: OUTPUT«676␤»
moritz nom: say 26 ** 2
p6eval nom: OUTPUT«676␤»
jnthn ouch.
sorear after YZ is ZA
"ZA" gt "Z"
tadzik jnthn: but nqp::unshift is one-argumental, right?
pushes one thing upfront 21:15
jnthn tadzik: correct
moritz src/core/Range.pm line 93 -- don't we have an opcode for assignment these days? 21:17
tadzik nom: sub foo(*@a) { while @a.pop { say $_ } }; foo(1, 2, 3)
p6eval nom: OUTPUT«Any()␤Any()␤Any()␤»
tadzik correct or not, I don't like it :)
moritz nom: sub foo(*@a) { while @a.pop -> $_ { say $_ } }; foo(1, 2, 3)
p6eval nom: OUTPUT«3␤2␤1␤»
tadzik yeah, I know
still, what I said :)
but I can understand that 21:18
probably it wouldn't work in Perl 5 to
21:19 y3llow left, y3llow_ joined, pothos_ joined 21:20 y3llow_ is now known as y3llow 21:21 pothos left, pothos_ is now known as pothos
jnthn moritz: (opcode) yes 21:21
dalek kudo/nom: 2af47cb | moritz++ | src/core/Int.pm:
unpessimize Int.base
21:27
kudo/nom: b727910 | moritz++ | src/core/Real.pm:
fix Real.base
21:29 kaare_ left
tadzik rakudo: my $a; unshift($a, 5); say $a.perl 21:30
p6eval rakudo 922500: OUTPUT«Method 'unshift' not found for invocant of class ''␤ in 'unshift' at line 3209:src/gen/core.pm␤ in main program body at line 22:/tmp/TXM1RcxHBR␤»
TimToady phenny, tell shinobicl value equivalence is tested with eqv; eq would force string equivalence, while == would force numeric equivalence 21:33
phenny TimToady: I'll pass that on when shinobicl is around.
tadzik rakudo: my @a; @a.WHAT.say
p6eval rakudo 922500: OUTPUT«Array()␤»
tadzik nom: my @a; @a.WHAT.say
p6eval nom: OUTPUT«Array()␤»
tadzik erm
that needs a spectest, my @a; @a.unshift(foo) 21:34
TimToady you did it with $a the first time
tadzik yes, but the last example dies with... let me show
> my @a; @a.unshift(5) 21:35
unshift_pmc() not implemented in class 'Mu'
and spectests didn't catch that
TimToady nodnod
21:35 shinobicl_ joined
tadzik nom: my @a; @a.push(5) 21:36
p6eval nom: ( no output )
shinobicl_ is there a way to 'restrict' a role so it can be applied only to a certain type?
tadzik that doesn't use nqp::push though
jnthn tadzik: nqp::push is for working with VM-level arrays only
tadzik yes, that's what nqp::push is doing 21:37
erm, nqp::unshift
PerlJam shinobicl_: if there were a composition-time hook, you could do it then. But I don't think such a thing has been specced
jnthn shinobicl_: Not so far as I know. Why would you want to do that anyway?
tadzik oh wait, so what are $!items in Array?
jnthn tadzik: Not sure. It may be an RPA.
tadzik that's Mu
but yes, RPA
jnthn tadzik: It may be Mu if never touched yet.
tadzik yes
jnthn tadzik: I don't know the array/list guts well at all. 21:38
tadzik so should it be $!items // $!items = [] or so?
shinobicl_ i'm just trying stuff :)
tadzik (at the beginning of method unshift)
jnthn tadzik: Very unlikely.
Since [] would be a Perl 6 array.
21:38 MayDaniel joined, Trashlord left
tadzik well, but this kind of mechanism? 21:38
21:39 drbean_ joined
tadzik May it be better to just make List.$!items initialized as an empty array, always? 21:39
jnthn I suspect the check must be done elsewhere.
Not really.
Plus we don't have a good way to do that for various reasons.
tadzik deep thing, leave for now?
jnthn tadzik: Or ask pmichaud++
tadzik: I'm just the wrong person to ask about lists and arrays. 21:40
tadzik pmichaud: ping
niecza: my @a; @a.unshift(5) 21:42
p6eval niecza v8-11-g6f99914: ( no output )
jnthn nom: my @a; @a.unshift(5)
p6eval nom: OUTPUT«Method 'unshift' not found for invocant of class 'Array'␤current instr.: '_block1002' pc 86 ((file unknown):63522625) (/tmp/6BTsVJsDq5:1)␤»
tadzik not pushed yet
> my @a; @a.unshift(5)
unshift_pmc() not implemented in class 'Mu'
jnthn nom: my @a = 1,2; @a.unshift(5) 21:43
p6eval nom: OUTPUT«Method 'unshift' not found for invocant of class 'Array'␤current instr.: '_block1002' pc 109 ((file unknown):149) (/tmp/xez4_jeHU7:1)␤»
tadzik my @a = () works fine though
sorear niecza: my @a = 5, 6; @a.unshift(1, (2, 3), 4); say @a.perl
jnthn nom: my @a = (); @a.unshift(5)
p6eval niecza v8-11-g6f99914: OUTPUT«[1, 2, 3, 4, 5, 6].list␤»
nom: OUTPUT«Method 'unshift' not found for invocant of class 'Array'␤current instr.: '_block1002' pc 99 ((file unknown):147) (/tmp/UFRt2j9xH8:1)␤»
tadzik jnthn: ...not pushed yet :)
jnthn tadzik: oh
tadzik ok, pushing for you
jnthn I thought there was a bug, not a NYI :)
21:43 localhost left
tadzik there are both :P 21:43
jnthn tadzik: I think unshift is non-trivial because if you unshift something lazy you gotta do the right thing...
And I've not much feel for what the right thing is.
dalek ecza: c1ce34b | sorear++ | / (2 files):
Name refactor part 5: remaining cases: method calls and term:name
21:44
jnthn But sticking it in $!items is almost certainly wrong, afaik, because that's the reified part.
tadzik oops
sorear hmm
jnthn I may be wrong though.
tadzik well, I made it pass the spectests
jnthn but I *thought* that's what $!items is :)
tadzik 69 tests more :)
sorear niecza: my @a = <a b c>; @a.unshift(1..*); say @a[^5].perl
jnthn Maybe I'm remembering a previous design :)
p6eval niecza v8-11-g6f99914: OUTPUT«(timeout)» 21:45
tadzik so maybe the spectests need lazy lists too
sorear looks like niecza's unshift is semi-eager
dalek kudo/nom: ee1fe6b | tadzik++ | / (2 files):
Implement unshift
tadzik master unshifts the eagered arguments I think
sorear niecza: my @a = 1..*; @a.unshift(<a b c>); say @a[^5].perl
p6eval niecza v8-11-g6f99914: OUTPUT«(timeout)»
jnthn tadzik: OK. Well, we'll see what pmichaud++ says about the patch. :)
sorear niecza: my @a := @(1..*); @a.unshift(<a b c>); say @a[^5].perl 21:46
tadzik and uses splice, I though I'd use an opcode since we have an opcode for that
p6eval niecza v8-11-g6f99914: OUTPUT«("a", "b", "c", 1, 2)␤»
21:47 Patterner left
TimToady I think if you unshift something with unreified bits, it'll have to unreify the reified bits of the destination array 21:49
21:49 Psyche^ joined, Psyche^ is now known as Patterner
jnthn TimToady: sounds sane 21:51
TimToady or surreify them :)
21:56 MayDaniel left
jnthn Tssk. Seems just about all my day got nommed by $dayjob 21:56
And I'm still "behind".
diakopter expectations too eager 21:57
jnthn Well, more than I ignored it more than I shoulda in recent weeks to hack on nom. :) 21:58
e src\binder\bind.c 21:59
GAH!
too tired to type in the right window :)
dalek ecza: e28a93b | sorear++ | src/ (2 files):
mergeback
22:04
diakopter sorear: that's a lot of red 22:06
22:07 soh_cah_toa left
sorear diakopter: the workflow I use tends to make a bunch of very green commits then one very red commit 22:10
22:11 Moukeddar joined, shinobicl_ left
diakopter interesting 22:11
22:12 wamba left
Moukeddar Hello people :) 22:14
sorear Hello, Moukeddar.
Moukeddar what's cooking?
diakopter texas
Moukeddar and how are you doing? 22:15
sorear haha, diakopter
Moukeddar texas is cooking? 22:16
sorear Moukeddar: USA weather is anomalously warm
Moukeddar you should try me region :)
diakopter wonders whether masak has written a sudoku solver in Perl 6 22:19
or generator 22:20
or anyone, for that matter
phenny: ask masak do you know of anyone writing sudoku-related code in Perl 6 22:21
phenny diakopter: I'll pass that on when masak is around.
sorear how is the climate in you area, Moukeddar?
tadzik diakopter: moritz did, methinks
Moukeddar right now i'm in cold City
but in my old one
we reached 54􏿽xB0C
diakopter ?! 22:22
that's, like, 131F 22:23
er, 129
sorear Moukeddar: does it make a difference how close to the coast you are? 22:24
Moukeddar 22 Km
and it doesn't make a difference
tadzik jnthn: how do I detect if something is a Multi? 22:27
22:28 soh_cah_toa joined
dalek ecs: 598535f | larry++ | S12-objects.pod:
more headings, add Foo:A
22:28
jnthn tadzik: .multi 22:29
tadzik: oh...I didn't put that back yet
tadzik: Can do it in just a moment. 22:30
tadzik I suppose relying on .candidates is not reliable?
jnthn tadzik: No 22:31
tadzik good to know
jnthn tadzik: As you can't tell if it's a multi itself or a proto with one candidate.
22:32 Moukeddar left
jnthn nom: (multi foo() { }).dispatcher.WHAT.say 22:32
p6eval nom: OUTPUT«Sub()␤»
jnthn nom: (sub foo() { }).dispatcher.WHAT.say
p6eval nom: OUTPUT«Mu()␤»
dalek kudo/nom: 82481f1 | jonathan++ | src/binder/bind.c:
When we get passed a non-6model argument, try to marshall it. If that fails, complain. This helps with calls in from the outside world, but also avoids a bunch of segfaults.
jnthn That's one way.
22:32 am0c left
jnthn (.dispatcher gets the proto) 22:32
nom: (sub foo() { }).dispatcher.defined.say 22:33
p6eval nom: OUTPUT«Bool::False␤»
jnthn nom: (multi foo() { }).dispatcher.defined.say
p6eval nom: OUTPUT«Bool::True␤»
diakopter TimToady: Multisubs and Multimethods sorely lacks subheadings, 22:34
also Enumerations 22:37
TimToady yes, I've only just started, but will probably work on S02 next 22:40
feel free to add some yerself 22:41
diakopter does Text::Smartlinks create the linked table of contents at perlcabal.org/syn ?
sorry, the ones at the top of each Snn, I mean 22:42
22:44 shinobicl joined
shinobicl hi guys... i'm afraid i will bother you again with questions :( 22:46
phenny shinobicl: 21:33Z <TimToady> tell shinobicl value equivalence is tested with eqv; eq would force string equivalence, while == would force numeric equivalence
shinobicl eqv: noted
diakopter TimToady: ok, can I continue with S12? 22:47
TimToady sure 22:48
shinobicl timtoady: and the not eqv? "neq"? "neqv"? 22:49
TimToady !eqv 22:59
it's a metaoperator 23:00
jnthn I blug: 6guts.wordpress.com/2011/08/01/a-hi...ogramming/
tadzik: ping 23:06
tadzik jnthn: pong 23:07
jnthn tadzik: What did you mean by "is a multi"?
(more)
Did you mean, if I call it, then it'll do a multi-dispatch? 23:08
Or did you mean, it's a multi candidate?
tadzik jnthn: I mean an equivalent of master's $a ~~ Multi
jnthn ah
Then you don't want .multi :)
shinobicl is there any problem with this code???? I can't find any :( . But the operator is never called. pastebin.com/ZS17Xv5K
jnthn nom: sub foo() { }; say &foo.is_dispatcher
p6eval nom: OUTPUT«Bool::False␤»
jnthn nom: multi foo() { }; say &foo.is_dispatcher
p6eval nom: OUTPUT«Bool::True␤»
jnthn That's what you wnat. 23:09
*want
.multi means "is this a multi candidate" - that is, was it declared with "multi".
.oO( maybe it should be &foo.proto... )
23:10
23:11 rdesfo left
dalek kudo/nom: 6d143c5 | jonathan++ | src/core/Routine.pm:
Implement Routine.multi.
23:13
tadzik eek 23:14
method named() { nqp::p6bool(nqp::isnull($!named_names)) }
tadzik, don't swear. Don't swear. Don't swear
jnthn Oh, tabey, it's inverted. 23:15
er, tabej, and backwards...I ruined that one :) 23:16
OK, sleep
sorear have you 1. killed anyone 2. caused over 1000 EUR in property damage ? 23:17
a botched commit is no big deal
tadzik no, I've wasted around an hour tracking down a bug that wasn't
jnthn sorear: yeah but wasting...right.
jnthn lost an hour to a silly bug yesterday too :/
tadzik this is how we roll :)
jnthn Sometimes you hack the code. Sometimes the code hacks you. :) 23:18
23:18 soh_cah_toa left
jnthn Really sleep, or I'll be even more grouchy than normal tomorrow at $client... & 23:19
23:22 rdesfo joined
shinobicl should i explicitly export my overloaded operators? 23:22
diakopter TimToady: hunh. I guess I should've read S12 before now 23:23
tadzik jnthn++ # blogpost 23:24
shinobicl i define them in a .pm file, but does not seem to work when i call them from my test program ... 23:25
dalek ecza: eda0c8e | sorear++ | / (3 files):
Fill in stubs for indirect name references
23:26
sorear shinobicl: as I said earlier they need to be declared 'our' to work 23:27
23:27 jaldhar joined
shinobicl oh, sorry, didn't see your answer before 23:28
thanks and sorry for making that much questions :) 23:29
23:31 soh_cah_toa joined 23:32 colorspace joined 23:33 shinobicl left 23:39 soh_cah_toa left 23:41 soh_cah_toa joined 23:49 f00li5h joined 23:56 whiteknight joined 23:58 soh_cah_toa left 23:59 im2ee left