»ö« 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! | tinyurl.com/p6contest
Set by moritz_ on 28 December 2010.
jnthn sleep & 00:00
dalek kudo: 914bd1b | KodiB++ | src/Perl6/Grammar.pm:
[Perl6/Grammar] Forbid mandatory positional parameters after parameters with default values.
00:07
ast: b896f12 | (Kodi Arfer)++ | S06-signature/optional.t:
[S06-signature/optional.t] Added tests for RT #76022.
00:08 rgrau left 00:11 cafesofie joined 00:17 dukeleto left 00:18 dukeleto joined 00:27 stifynsemons left 00:35 felliott_ joined, felliott left 00:36 felliott_ is now known as felliott 00:40 wallberg left 00:41 mberends left 00:44 molaf_ joined 00:47 Grrrr joined 00:48 molaf__ left 01:11 tarski left 01:51 drbean joined 01:53 pmurias left 02:02 klunky joined 02:05 klunky left 02:06 klunky joined 02:09 klunky left 02:14 kst left, QinGW joined, kst joined 02:33 coldhead` joined, coldhead left, rhizo left 02:34 risou joined, gimix joined 02:35 risou left, woosley joined 02:36 Limbic_Region left 02:54 whiteknight left, cafesofie left 03:04 cosimo left 03:18 woosley left 03:28 agentzh joined 03:32 cafesofie joined
dalek rixel: f024f78 | diakopter++ | sprixel/s (5 files):
attempt to use the so-called hand-optimized FrameBase
03:32
03:34 QinGW left 03:47 QinGW joined 03:58 VXZ joined, stifynsemons joined 04:04 envi joined 04:11 dukeleto left 04:12 dukeleto joined 04:14 woosley joined 04:23 Su-Shee_ joined 04:27 Su-Shee left 04:30 kfo joined 04:34 kfo_ left, kst left 04:35 kst joined 04:38 drbean left 04:41 coldhead` is now known as coldhead 04:44 risou joined 04:49 felliott left 05:01 risou left 05:02 risou joined 05:11 mberends joined, drbean joined 05:41 mberends left 05:43 starcoder left, Patterner left 05:46 Psyche^ joined, Psyche^ is now known as Patterner, starcoder joined 05:55 mberends joined 05:56 drbean left 06:10 coldhead left 06:15 coldhead joined 06:17 ponbiki left 06:18 ponbiki joined, justatheory left 06:19 mberends left 06:20 cjk101010 joined 06:22 masak joined
masak morning, zebras. 06:22
sorear hello, masak. 06:23
TimToady greasings
sorear is hacking on meta operators
TimToady you should do something fun instead :)
diakopter .oO is there an -O metaop 06:25
06:27 stifynsemons left
diakopter I was interested to read that jnthn's metamodel rewrite in nqp-nom/6model is faster (on parrot) than parrot's implementation of the same. 06:28
TimToady
.oO(low bar)
06:30
06:31 risou left 06:32 kaare_ joined, mberends joined
sorear diakopter: That's not really very interesting... Parrot is fairly well designed insofar as you can replace all the PMC-level and op-level functionality without hurting performance at all 06:33
06:34 starcoder left
sorear that's one of the reasons I'd love to see Parrot win more 06:34
I would love to add a few new primitive types to the CLR
06:34 agentzh left 06:39 starcoder joined 06:41 mberends left 06:44 orafu left 06:46 orafu joined
masak --> interview 06:47
06:47 masak left 06:49 tarski joined 06:51 starcoder left
dalek ecza: e2bc2bc | sorear++ | / (3 files):
Fix chained multiple evaluation, add rest of infix metaop parsing
06:55
06:56 starcoder joined 07:13 cosimo joined
dalek ecza: 67c4da8 | sorear++ | src/ (2 files):
Compile (1,2,3)».sin forms
07:24
07:46 dual left 07:56 baest joined
dalek ecza: 990db5c | sorear++ | src/niecza:
Implement prefix metaop parsing
07:59
sorear ok. compiler work for metaops is done. 08:00
next week's agenda: type constraints and MMD
after that: Roles? &eval? Better CLR integration? Steal Rakudo's setting? 08:01
08:03 drbean joined 08:05 wtw joined, agentzh joined 08:18 Su-Shee_ is now known as Su-Shee
Tene building on shared work is great. 08:26
I think you'd have trouble using rakudo's setting without roles, though.
08:34 shi joined 08:36 shi left 08:37 risou joined 09:06 noganex_ is now known as noganex 09:17 snearch joined 09:26 plobsing_ left
jnthn morning, #perl6 09:32
09:32 drbean left, tzhs joined 09:35 risou_ joined 09:38 risou left 09:41 woosley left, jlaire left 09:43 jlaire joined 09:55 dakkar joined
dukeleto jnthn: howdy 10:05
jnthn o/ dukeleto 10:06
colomon \o
10:08 tarski left, daxim joined 10:09 QinGW left
dukeleto is interested in subrectangles 10:12
i don't really see that term in the spec 10:13
10:16 mberends joined 10:36 stifynsemons joined, risou joined
moritz_ what are subractangles? 10:37
*rect
10:37 risou_ left 10:50 masak joined
masak dukeleto, moritz_: "subrectangles" was a term I made up on the spot. 10:51
I meant it as the two-dimensional version of a slice, which makes it more general than a rectangle, I suppose. 10:52
masak boggles a bit and then tries to find something sensible in S09
moritz_ something like @a[1..3;2..6] ?
masak exactly. 10:53
yes, it is in S09.
S09:391: "A multidimensional array is indexed by a semicolon list, which is really a list of lists in disguise. Each sublist is a slice of one particular dimension." 10:54
10:55 kst left, kst joined
jnthn yayitsmasak! 10:56
moritz_ lolitsjnthnmasakandtherest! 10:57
masak lol! 10:59
10:59 agentzh left
mathw YAYCOOLPEOPLE 10:59
jnthn omgz what did I start... :) 11:00
moritz_ lol! 11:02
masak metayaypeopleareshoutingyay
11:04 gimix left, masak left 11:05 masak joined 11:08 woosley joined
masak has an amazing thing for what to use roles for 11:09
s/thing/idea/
will implement it in the next few days, and then showcase it here :)
moritz_ std: my $x; if $x<= 2 { 1 }
p6eval std 625303c: OUTPUT«===SORRY!===␤Unable to parse quote-words subscript; couldn't find right angle quote at /tmp/X881qIs9_v line 1:␤------> my $x; if $x<⏏= 2 { 1 }␤ expecting escape␤Parse failed␤FAILED 00:01 120m␤» 11:10
masak moritz_: why doesn't <= win over < there?
oh, I think I see why.
moritz_ masak: because = is allowed in subscripts
masak right.
any solution that allowed that would be backtracking.
moritz_ replies to [perl #82638] 11:12
11:13 nadim_ left 11:14 dip joined, dip is now known as Guest54166 11:21 masak left, y3llow left 11:22 masak joined, y3llow_ joined 11:23 daxim left, y3llow_ is now known as y3llow
IllvilJa Anyone knows if posterous.com has died or something? 11:23
11:23 jql left, PZt left, daxim joined
IllvilJa Trying to read the latest mojolicious blog entry "The truth" and the page at posterous.com refuses to load. 11:23
11:23 sftp left 11:24 sftp joined
IllvilJa (yes, I acknowledge that I abuse the fact that this is a nice, friendly channel and use it for asking a Perl5 related question...) 11:24
moritz_ there's a page on the intertubes that tells you if another site is down 11:25
IllvilJa: www.downforeveryoneorjustme.com/
www.downforeveryoneorjustme.com/posterous.com
IllvilJa immediately bookmarks the page! 11:26
moritz_: Thanks!
(and yes, it turns out that posterous.com really IS down... grumble. That means that "The truth" is out of reach :-/ ) 11:27
masak IllvilJa: the Web is very unreliable. I tend to make backups of it to store locally. 11:41
jnthn Oh, so *that's* what all those boxes in your appartment contain...
11:42 tzhs left
masak jnthn: you wouldn't believe how bulky some TLDs are. 11:51
11:52 drbean joined
masak S09 says @array[@x,@y] corresponds to @array.postcircumfix:<[ ]>( ((@x,@y)) ) -- why the double parens in the signature? 11:55
jnthn masak: s/signature/arguments/ ? 11:56
And, not sure if that's really caller side. :S
11:56 JimmyZ joined
jnthn One level of parens would make sense to me but the two is...odd. 11:57
11:59 am0c joined 12:03 cogno joined
masak right, arguments. 12:05
12:05 JimmyZ left 12:06 JimmyZ_ joined, JimmyZ_ is now known as JimmyZ
jnthn masak: OK, then I dunno. If it were sig side it'd be an extra level of unpacking. 12:09
arnsholt The calling convention of posticircumfix:<{ }> and <[ ]> is supposed to be (**@slice), might have something to do with it?
Although I have to admit I'm not entirely sure what that sig actually means :/ 12:10
masak jnthn: no, it can't be the sig side. 12:14
arnsholt: signature. 12:15
er. belay that. :)
arnsholt: right; that's what I'm wondering, too.
dalek p-rx/push_cached_eh: bffc552 | bacek++ | t/setting/01-resizablepmcarray.t:
Stylish change in test.
12:18
12:19 cogno left
arnsholt masak: I found my stuff in S06, "Multidimensional argument list binding" 12:21
FWIW
masak 'k 12:26
12:27 risou left, coldhead left 12:32 jfried joined 12:36 icwiener joined 12:40 karupanerura joined 12:46 felliott joined 12:47 JimmyZ left 13:00 MayDaniel joined 13:04 woosley left
takadonet morning all 13:05
[Coke] sees something nice about parrot in backscroll on #perl6. 13:10
I would dance a small jig, 'tweren't it so cold!
13:14 am0c left 13:17 c9s left 13:22 plobsing joined 13:26 masak left 13:27 awwaiid_ left 13:29 saaki left 13:30 saaki joined, jql joined
pmichaud good morning, #perl6 13:34
jnthn morning, pmichaud
moritz_ \o/
pmichaud jnthn: great article on 6guts 13:35
jnthn pmichaud: Thanks. :)
pmichaud: The grammar stuff was a bit of a battle, but I won. :)
13:35 MayDaniel left
jnthn pmichaud: The messiest bit was with the !PREFIX__ methods. 13:36
pmichaud perhaps those can go away soon
jnthn pmichaud: I suspect my hack/workaround to get them .^add_method'd will go away sooner. :) 13:37
Anyway, just a heads up that I know that is nasty.
pmichaud np
jnthn There's still some residual mess in the repo at the moment, e.g. a Cursor and Cursor2
moritz_ is there any example of how I can add a command line switch to rakudo?
jnthn Will clear that up soon.
moritz_ or a pointer to some docs that might help me? 13:38
pmichaud moritz_: maybe look at how check_syntax is done
jnthn moritz_: iirc, NQP adds a --parse-trace
moritz_ thanks to both
pmichaud moritz_: ack for 'addstage' 13:39
essentially, most options in rakudo are handled as additional compiler stages (not the ideal mechanism -- just left over from some long-ago hacks that people put in place to "get things working") 13:40
moritz_ wants to add an option for PIR-level backtraces
pmichaud oh, I think that belongs in HLL::Compiler
(which Rakudo then inherits)
jnthn can see it being useful there too
moritz_ I had another idea for a command line switch, but I forgot it :-)
pmichaud ack for 'parsetrace' in the nqp-rx src/ directory 13:41
13:42 hanekomu joined
jnthn pmichaud: I think I'm about a week away from branching Rakudo. 13:43
pmichaud jnthn: yeah, that's what it looks like to me also
I'm about 2 days behind where I'd expected to be, because of time spent in the hospital
[Coke] pmichaud, jnthn, moritz_ : good morning!
jnthn pmichaud: OK, no hurry, whenever you have time, help is welcome. :) 13:44
pmichaud yeah, I'll see if I can have the migration roadmap by wednesday. I noticed you had some discussion with bacek++ ?
afk for a bit -- kids to school. bbi10
jnthn pmichaud: Yeah, I'm trying to keep an eye on the PCT work he's doing. 13:47
pmichaud: Oh, and more recently trying to deal with a hot-path that's rather sub-optimal (adding a return exception handler makes invocation overhead 3 times higher...)
13:51 masak joined 13:52 cafesofie left 13:54 cafesofie joined 13:56 tzhs joined 13:57 kst left
pmichaud jnthn: chromatic++ and I have discussed the return exception handler issue quite a bit 13:57
13:57 kst joined
jnthn pmichaud: OK. 13:58
pmichaud one possibility is to eliminate the exception handler altogether
jnthn pmichaud: I added an opt that doesn't add it when there's no return, since it was so trivial to do.
13:58 cafesofie left
jnthn pmichaud: And use a continuation instead? 13:59
pmichaud actually, it's the continuation that is expensive
13:59 Kodi joined
jnthn Ah, OK. 13:59
pmichaud since an exception handler isa continuation
jnthn Ah, yeah. :|
.oO( Can't we just copy what the CLR does here... )
pmichaud what does the clr do? 14:00
jnthn Just has a table with each sub saying "from this region in the bytecode to this other one, there's a handler that is at this location"
So there's nothing to set up at runtime
pmichaud doesn't sound dynamic enough for the general case, though
jnthn Just an extent list to look in when an exception is thrown.
pmichaud here's my best guess 14:01
jnthn For the general case as in "what Rakudo needs" or "what other languages need"?
pmichaud for the general case of "a dynamic language with exceptions"
jnthn OK
pmichaud here's my best guess as of this morning: each Sub maintains a lexically scoped 'return closure' that is in charge of return value checking and packaging things up to be returned 14:02
14:03 drbean left
pmichaud then, instead of throwing an exception, a 'return' statement looks for the dynamically-scoped closure and invokes it with whatever it's intended to return 14:03
that closure then packages up the arguments and invokes its outer's return continuation directly
falling off the end of the sub does the same thing -- it simply invokes the return closure 14:04
jnthn pmichaud: And it uses a leave-like mechanism to actually exit the block?
pmichaud we could put a method on Subs to invokes the return continuation, yes.
14:05 cafesofie joined
jnthn nqpclr does something along those lines, fwiw. 14:05
pmichaud actually, replace closure with 'leave method' above and that might work as well
the tricky part being 'find the correct Sub to leave from'
jnthn I guess I solved that somehow... :)
pmichaud which I guess is the outer scope of whatever invokes 'return'
i.e., return's caller's outer 14:06
jnthn Well not if it's a bunch of lexically nested blocks. Then it may be some way down the outer chain.
pmichaud I meant outer in the "outer until you reach a Sub" sense
(sorry, wasn't clear about that)
but yes. 14:07
return looks at its caller's outer chain for the closest Sub, then invokes the .leave method on that
the .leave method on a Sub packages its arguments up according to the Sub's return signature, and invokes the Sub's return continuation
jnthn That'd also fix the issues we have with return not working lexically in Rakudo. 14:08
14:08 cafesofie left
pmichaud right, I'm trying to solve both problems at once :-) 14:08
no sense solving the speed without getting the semantics right too
jnthn nqpclr actually has an exception handler that catches the return exception and invokes .leave. The handler's outer is actually the block to leave, so it all "just works". 14:09
pmichaud overall I think we have to fix 'return' sooner rather than later
jnthn But you could also do it as you suggest and save having the exception throw at all.
Well, yes, it'd be nice to fix it and leave. :)
pmichaud it's not the exception throw I'm trying to avoid as much as the need to create the exception handler
jnthn And get the return type check back in.
*nod*
Yeah, if creating exception handlers costs, it's not so fun to do it that way. 14:10
pmichaud oh oh oh oh oh
duh!
pmichaud has an idea 14:11
jnthn :)
pmichaud what if we just have one exception handler for return exceptions, very near the top?
(of the caller stack)
a return exception goes to that caller, which then says "okay, figure out what .leave to invoke"
jnthn ...then the cost of returning is proportional to stack depth? ;) 14:12
pmichaud proportional to handler depth, no?
since most subs won't have handlers at that point
jnthn I don't think those are two separate stacks...
But I may be wrong.
pmichaud they aren't
but is chasing up the caller chain that expensive? 14:13
jnthn It's at least two pointer derefs per call frame.
And horrible for cache locality.
pmichaud hmmm
jnthn Contexts are PMCs so you gotta follow the PMC data pointer, then the pointer to the caller, which is a PMC, and so forth. 14:14
pmichaud it's still tons faster than creating the exception handler, especially since 'return' is "exceptional" :-P 14:15
14:15 plobsing left
pmichaud still, I guess it's cheaper to have return check each frame for a control exception handler than to have every return go up the entire caller stack 14:15
jnthn Yeah. Get 500 levels of recursion deep or something and suddenly things get expensive. 14:16
(if you're chasing up the whole stack)
pmichaud I suppose the former could also be statically analyzed in a lot of cases 14:17
jnthn Yes, we can be smarter in the compiler too, I expect.
Oh
We could do that you're suggesting if we have a way to chase down the lexical chain instead and put the handler in the setting, I guess. 14:18
pmichaud oh, that's not too bad
the fundamental question I'm trying to resolve is "What does a 'return' statement generate in NQP?" 14:19
currently it creates and throws a return exception
jnthn oh
pmichaud we can keep that, or switch it to be a method call of some sort, or switch it to be some directly generated code
jnthn If we do .leave on a block 14:20
Then we *know* how to find the block.
It's our nth outer
And we statically know n.
pmichaud but .leave != return
jnthn ?
pmichaud you mean do .leave on the Sub ?
jnthn I mean 14:21
sub foo() { if lol() { return 42 } }
That return could do nqp::get_nth_outer(1).leave(42)
sub foo() { if lol() { if bbq() { return 42 } } } # nqp::get_nth_outer(2).leave(42) 14:22
pmichaud nqp::get_nth_outer(2) doesn't sound very primitive
p6eval nqp: OUTPUT«Confused at line 1, near ":get_nth_o"␤current instr.: 'parrot;HLL;Grammar;panic' pc 635 (src/cheats/hll-compiler.pir:206)␤»
jnthn So yes, on the sub.
pmichaud: How so?
I expect it's just getting mapped directly to an op
pmichaud in the sense that PIR doesn't support it yet. I guess we could add it as a dynop
jnthn Right
The dynop season is open. ;-) 14:23
pmichaud I'm wondering if something like that plays well with the other lexotics
perhaps something even more general than get_nth_outer 14:24
14:24 felliott left
pmichaud because even simpler is nqp::get_outer_Sub 14:24
(so the compiler doesn't have to calculate the depth)
jnthn Huh.
Why throw away static info only re-compute it at runtime?
That thinking already does us a ton of damage.
pmichaud as I said, I'm wondering about the other lexotics, like 'next' and 'last' and ... 14:25
they aren't purely static
jnthn Hmm, I guess not
They're not tied to a sub either really though, but also to a...hmm, well, I guess today map catches them. 14:26
pmichaud Lexotic operators
in Perl 6 include:
return next last redo goto
jnthn Oh.
pmichaud if we're solving 'return', let's be sure to handle the other four as well.
jnthn Yeah, good point. :)
Our current implementation of next/last/redo relies on them being dynamic, iiuc. 14:27
14:27 icwiener_ joined
pmichaud correct, because: 14:27
(C<next> without a label is purely dynamic.)
(S04)
14:27 JimmyZ joined
jnthn Aha. 14:27
I guess I can see how last and redo basically reduce to goto. 14:28
pmichaud um, last and redo are basically the same as next, I think
jnthn Oh, I thought the S04 comment was just about next, which actually needs to interact with map. 14:29
masak I hope the same goes for last and redo.
pmichaud so do 'last' and 'redo'
14:30 icwiener left
jnthn Yeah, it'd be a pain otherwise. 14:30
pmichaud 'last' terminates a map
14:30 kaare_ left
jnthn *nod* 14:30
pmichaud 'redo' re-executes the map block without iterating
jnthn Yes, though you could also see it as a goto to the top of the map block. But I think it'd be hard to implement that way.
I vastly prefer the way we have it now. 14:31
pmichaud you definitely don't want it to be a goto, because the map block is independent of the map
@list.map( { ... } )
jnthn Oh, true.
pmichaud the block doesn't know it's part of a map
14:31 GinoMan left
jnthn *nod* 14:31
OK, I agree the S04 comment has to apply to redo and last too. 14:32
pmichaud and might also be the same for 'goto' :-P
(haven't thought about that one yet)
jnthn goto; # somewhere! :-P
pmichaud anyway, S04 says that return is &?ROUTINE.leave 14:33
which implies that the compiler knows &?ROUTINE and simply invokes .leave on it
jnthn Happily, &?ROUTINE means "resolved at compile time"
*nod*
pmichaud but I don't see where the control exception handler comes into play if that's the case 14:34
jnthn We could either actually install an &?ROUTINE in the static lexpad (oh, wait...)
or do something like I suggested
No, me either.
Should CONTROL get return?
moritz_ yes
jnthn :/
pmichaud and next/last/redo
moritz_ but not leave? 14:35
moritz_ not sure
jnthn leave isn't exceptional
iirc
moritz_ right
it's rather primitive
jnthn Maybe it boils down to, in absence of a CONTROL block in the routine where a return is used, we're free to optimize it to a return.
e.g. &?ROUTINE.leave(42) is an optimization. Perhaps. 14:36
pmichaud that sounds icky
sub foo() { return 42; CONTROL { ... } } 14:37
jnthn I was pondering it'd be twiddled in an optimization pass.
pmichaud we can't decide how to generate the return until after the sub block is done.
so, what does it generate without an optimization pass? 14:38
is it still an exception?
14:38 cafesofie joined
pmichaud "optimization pass" implies "optional" to me 14:38
jnthn I'd guess still an exception there, which is the pessimal case. 14:39
pmichaud and so we'd need a control handler.... where?
14:40 elb0w left
jnthn I'm pondering that it'd look about the same as today in the pessimal case, and the optimizer strips off the exception handler and twiddles the PAST generated for return. 14:40
pmichaud I don't like that answer.
first, I don't think 'return' should be that exceptional in PAST
jnthn github.com/jnthn/6model/blob/maste...timizer.pm does something like that, fwiw.
pmichaud it's just a function call
jnthn But only half of it. 14:41
pmichaud and I think we should avoid installing exception handlers in every Sub
jnthn (e.g. there's no pasttype<return> used anywhere)
(then it strips the exception handler installation)
s/there's/if there's/
pmichaud: I agree we should avoid it, I'm more suggesting that we pessimaly do .control('return_pir') and then the optimizer - which then has enough info to easily know if it can get away with it - removes that and, if needed, re-writes returns to something more optimal. 14:42
14:43 icwiener joined, Su-Shee left
jnthn I'd prefer an option that didn't see us have to do that but if we have to handle CONTROL - which expects it to be an exception - I'm struggling to see a better way off hand. 14:43
pmichaud I'm saying that if we eliminate the need for exception handler in every Sub invocation, we've solved 90% or more of the problem and the optimizing step is something we can figure out a bit later 14:44
14:44 stifynsemons left, cafesofie left
jnthn *nod* 14:44
pmichaud because whatever we come up with needs to work in Rakudo also, and keying off of 'return' is going to require a ton of analysis to make it work right
NQP cheats on 'return'; Rakudo doesn't have that luxury 14:45
jnthn pmichaud: Well, a single handler in the outermost scope that's found lexically, as we considered earlier, would still work.
pmichaud yes, I'm liking that approach a lot better
jnthn Yes, I'm still not enitrely sure I consider it fortunate that return is "just a normal sub call"...
That means to optimize it we have to know "there's no other return in scope overriding it" :)
Which we can but... :)
14:46 icwiener_ left
pmichaud well, Perl 6 depends on such knowledge anyway. we'll eventually have to crack that nut. 14:46
jnthn *nod*
Yeah, I'm trying to stear us towards the "have meta-objects at compile time" part of that goal.
The other nut to crack is having a static lexpad that is the same thing at compile time and runtime.
Well, *an* other. :) 14:47
pmichaud to what extent are the things in Optimizer.pm non-optional?
jnthn The one I just linked?
pmichaud i.e., if I remove the optimizer stage, does it still work?
jnthn It's all optional.
pmichaud okay.
jnthn I don't run it by defualt.
pmichaud good.
14:47 cafesofie joined
jnthn Note it's only in nqpclr 14:47
Not in nqp-rx/nom :)
pmichaud ah, didn't catch that. thanks for pointing that out
jnthn Many things land up in 6model first and then either graduate out of there or flunk it. :)
(in the 6model repo, that is) 14:48
That repo is getting confusing. It's really the nqp-on-other-backends repo by now.
pmichaud it's okay, I expect such confusion given the multi-scoped nature of what we're trying to do right now
jnthn I tried to clarify how I'm using the terminology in the opening part of overview.pod in the 6model repo 14:49
moritz_ I have a patch for a --ll-backtrace option... do you want to review it before committing?
masak oh yes!
moritz_ patch for compilers/pct/src/PCT/HLLCompiler.pir that is
jnthn moritz_: Eek. :) 14:50
pmichaud moritz_: as you wish -- I can review or you can commit and then I'll review
14:50 stifynsemons joined
jnthn moritz_: Someone should patch nqp-rx/nom with that too 14:50
pmichaud +1 from me for commit -- I'll revert if I see an issue
14:50 stifynsemons left
moritz_ jnthn: I can probably do that too, but I don't knwo if I'll be able to test it :-) 14:50
jnthn Given that it incoprorates the stuff that is (from its POV used to be ;-)) in PCT::HLLCompiler. 14:51
moritz_: If it just builds, that's fine for me. :)
moritz_ pmichaud: pushed to parrot 14:52
pmichaud moritz_: +1 14:53
jnthn: if nqp-rx/nom uses HLLCompiler, then it's already patched once Parrot has it, no? ;-)
moritz_ pmichaud: \o/ is there documentation of default options somewhere?
pmichaud moritz_: there was at one time; I think it's gone now
I somewhat expect PCT::HLLCompiler to be evolved away in the near future... but the options would remain in HLL::Compiler 14:54
jnthn pmichaud: Incorporates by copy-paste... :)
pmichaud jnthn: oh. then we should work to eliminate PCT::HLLCompiler asap :-) 14:55
jnthn pmichaud: plz :)
pmichaud it should all just be HLL::Compiler
pmichaud needs more hours in a day, and fewer hours in health care facilities.
moritz_ also spent many hours in hospitals last week. Very draining. 14:56
jnthn pmichaud: (all HLL::Compiler) yes, that's what's done in nqp-rx/nom
14:57 icwiener_ joined
jnthn moritz_: Thanks for that change, will be useful. :-) 14:57
masak moritz_: now that you've been inside PCT::HLLCompiler, what would you say about the feasibility of -n and -p? 14:59
(never mind doing it right with an alternative setting on the first attempt) 15:00
jnthn I suspect those are Rakudo specific.
15:00 icwiener left, kaare_ joined
jnthn (so would go in Perl6::Compiler) 15:00
imo, anyway
moritz_ masak: I still haven't figured out how to add custom options to rakudo only 15:01
15:01 PacoLinux joined
pmichaud I suspect -n and -p need a lot of underlying lexical changes first 15:01
but I could be wrong about that
masak quite possibly. 15:02
(it quite possibly needs lexical changes, I mean) 15:03
jnthn forgets exactly what they do
pmichaud iiuc, -n and -p change the notion of the setting
masak ideally, yes.
jnthn: they're really nice when writing commandline oneliners.
pmichaud in the sense that they cause an alternate/additional setting to be invoked
moritz_ -n wraps in a for lines() { <MAIN CODE HERE> } block
masak jnthn: -n loops the program for each line of input, -p does the same but prints $_
pmichaud which says to me that we need some setting cleanup :) 15:04
jnthn ah, OK
pmichaud: On setting, I'm leaning towards NQP's setting also being one for real at some point.
masak I wanted it so much for Rakudo that I wrote 'pun', now probably very defunct.
moritz_ does p6 have continue { } blocks?
jnthn pmichaud: nqpclr and nqpjvm have it that way, fwiw.
It saves polluting namespaces.
pmichaud jnthn: okay. I'm a little concerned about getting "too much runtime" in place for nqp.... but I suspect we may be stuck with that. I need to chew on it a bit more. 15:05
15:05 plobsing joined
jnthn pmichaud: *nod* 15:05
pmichaud: My worry is that at the moment we rely on ResizablePMCArray etc to the point they get named in some NQP code at the moment.
Any code that does that blows away its portability
But there's not aways a sane alternative.
pmichaud we might need a NQPArray abstraction or something 15:06
to map to the underlying vm
or we just start providing our own complete runtime.... but that starts to sound like a very different animal from NQP itself 15:07
or at least from NQP's original goals
I have some errands to run here -- bbiaw
jnthn k 15:08
15:13 icwiener joined 15:14 karupanerura left 15:16 mtk joined, icwiener_ left 15:17 Su-Shee joined
dalek kudo: 9fdad15 | moritz++ | build/PARROT_REVISION:
bump PARROT_REVISION to get new --ll-backtrace option
15:18
15:19 felliott joined 15:24 felliott left
Kodi rakudo: say ?(0 ^^ 0); 15:27
p6eval rakudo 388eed: OUTPUT«Bool::False␤»
Kodi rakudo: say ?(1 ^^ 1);
p6eval rakudo 388eed: OUTPUT«Bool::False␤»
Kodi rakudo: say (1 ^^ 1).WHAT; 15:28
p6eval rakudo 388eed: OUTPUT«Method 'WHAT' not found for invocant of class 'Undef'␤ in main program body at line 22:/tmp/m2e9nKCIW6␤»
moritz_ it goes straight to a pirop... no wonder it's screwed up the return type 15:29
jnthn whoa. 15:30
15:30 wtw left
masak submits rakudobug 15:30
Kodi masak: RT #72826, actually. 15:31
masak gotcha.
it did look familiar :P
Kodi I'm working on it now. 15:32
masak prefers to be trigger happy than to miss rakudobug opportunities
Kodi++
15:34 VXZ left 15:36 icwiener left, icwiener joined
pmichaud what goes straight to a pirop? 15:38
moritz_ infix:<^^> 15:39
pmichaud it should be going to a pasttype
moritz_ goes to pirop:xor or something
pmichaud that would be really wrong
since pirop:xor is binary
15:39 MayDaniel joined
pmichaud token infix:sym<^^> { <sym> <O('%tight_or, :pasttype<xor>')> } 15:39
right
it's a pasttype, not a pirop 15:40
moritz_ still wrong
pmichaud we can't turn it into a &infix:<^^> until we have some way of defering evaluation of arguments
because ^^ short-circuits
15:40 Kodi left
moritz_ right 15:41
15:44 felliott joined
pmichaud see also discussion at irclog.perlgeek.de/perl6/2011-01-07#i_3162039 15:44
jnthn: ping 15:46
jnthn pmichaud: pong 15:47
pmichaud I have a question about nqp-nom and nqp-clr and the like
jnthn k
pmichaud one of the "features" of nqp-rx was that it could be used to create Parrot subroutines that required absolutely no additional runtime support. To what degree is this capability lost in -nom and -clr and the like -- i.e., do we _always_ need some form of runtime support now? 15:48
jnthn Parrot *subs* - we're fine there still, so far as I know.
Methods - different story.
pmichaud so, if I wrote in nqp:
jnthn Multis - need runtime support. 15:49
pmichaud sub xyz($arg) { say($arg); }
jnthn That's the current state.
pmichaud that could still comple and run (assuming there's a &say somewhere)
15:50 cjk101010 left
pmichaud okay, so very basic routines are still possible, but as soon as you ask for a multi or a method you're needing the additional stuff 15:50
jnthn pmichaud: Almost (more)
The sub itself is totally fine.
There are a couple of .loadlib calls added to get the dynops.
pmichaud right 15:51
jnthn Trouble is...classes do need the runtime support.
pmichaud which means it's no longer generating standalone PIR
15:51 arlinius left
pmichaud well, classes need runtime support even in -rx, so that's not too big a stretch 15:51
jnthn Yeah, but for that particular program I can remove the .loadlib calls and it works.
pmichaud in -rx you still have to load P6object
moritz_ well, clases have always... right
15:51 dfasfdasdasfsdaf joined
dfasfdasdasfsdaf how do i dwnlod it 15:52
jnthn pmichaud: as for nqp-clr, it always needs a runtime library.
pmichaud I'm trying to decide if we drop the idea of generating code that doesn't need additional runtime support
jnthn pmichaud: However, it's not very big.
moritz_ dfasfdasdasfsdaf: download what? 15:53
sorear dfasfdasdasfsdaf: you will need more details
jnthn pmichaud: And when I see "not very big" I mean 55 KB. :)
sorear good * #perl6
15:53 icwiener_ joined
pmichaud i.e., there's always actually a runtime library in place. Then the question becomes "how do we decide what goes in the default runtime library and what stays out?" 15:53
dfasfdasdasfsdaf hao do i dwnlod perl 6
pmichaud dfasfdasdasfsdaf: see perl6.org
dfasfdasdasfsdaf nevar mind tho. i fgurd out
moritz_ dfasfdasdasfsdaf: Perl 6 is a language. How do you download English?
dfasfdasdasfsdaf I'm just joking. 15:54
lulz
masak dfasfdasdasfsdaf: what moritz_ is trying to say is that Perl 6 has different implementations.
jnthn pmichaud: We're at the point now where there is so little you can do *without* the runtime library that I have to wonder how useful the goal is.
dfasfdasdasfsdaf I'm pretty sure, I know what it is.
I've seen and used Perl before.
15:54 pyrimidine joined
pmichaud jnthn: depends on your definition of "we" (more) 15:54
dfasfdasdasfsdaf Coded with it for five years.
masak dfasfdasdasfsdaf: well, Perl 5 has (mostly) only one implementation.
pmichaud certainly the people writing plumage and other nqp-based tools on Parrot have been able to do so with minimal runtime libraries 15:55
(but those have gradually expanded to include the use of the runtimes...)
jnthn pmichaud: "we" was too broad there, and I think you've hit on the issue that underlies all of this.
What I envision: a lightweight Perl 6 that works consistently over various VMs for writing compilers, meta-objects and so forth. 15:56
15:56 icwiener left
pmichaud yes, that's been my vision for nqp-rx as well (more) 15:56
jnthn That's not really the same vision as soemthing that's basically a nicer layer on top of Parrot.
pmichaud the original nqp (no -rx) was really targeted towards being a high-level language for Parrot
jnthn Right.
pmichaud with nqp-rx I've been able to somewhat have it boths ways, but I'm thinking we're at a point where that's no longer possible 15:57
jnthn I fear that trying to be both of those may be increasingly hard.
I agree.
15:57 jpike joined
pmichaud we'll, clearly "lightweight Perl 6 that works consistently" is more what we need than the latter 15:57
at least for Rakudo, and I suspect for other HLLs as well 15:58
jnthn Yeah
pmichaud so, NQP emphasizes its smallness (relative to Perl 6) as opposed to its "no runtime footprint"
at least, going forward that's what we emphasize 15:59
jnthn *nod*
pmichaud I think I'm okay with that. I don't see another promising path, at any rate.
TimToady you could call it perk
moritz_ maybe we should tell the #parrot folks about that decision :-)
pmichaud yes, I was also wondering if we should change the name to indicate the change in scope (more)
however, what we're saying is entirely consistent with the scope of nqp-rx as defined since 2009
moritz_ kinda expected that :-) 16:00
pmichaud and I somewhat like the name "nqp" :-P
jpike not quite perl?
jnthn pmichaud: I don't think that we have to abandon having something that is the "nicer way to work with Parrot than PIR". It basically is the nqp-rx that already exists today.
masak wonders what happened to the Parrot HLL "close"
plobsing TimToady: perk on parrot is sort of already taken (project is dormant)
Tene I vaguely remember the conversation where you were asking for suggestions on the name... might be interesting to go look it up again someday. 16:01
jpike perch on parrot?
16:01 kst left, kst joined
jnthn pmichaud: Whereas -nom is kinda a "new product" that's more suited to HLL developers and with an explicit cross-VM roadmap. 16:01
pmichaud jnthn: perhaps... but I'm not much interested in maintaining two lines of development (more) 16:02
I'm not enamored enough of Parrot to want to have a Parrot-specific language anymore
sorear looks like I need "return optimizations", "-n/-p", "lexotics" back on my TODO
short term
pmichaud or, put another way, who is really the target audience for nqp-rx as it exists today, then?
if it's just people targeting Parrot, then nqp is decreasingly going to be the tool for them 16:03
[Coke] gets ready to completely re-implement partcl again!
. o O (oh wait, no I don't. ;)
pmichaud [Coke]: actually, I suspect that won't be much necessary :-)
[Coke]: but I totally understand the sentiment :) 16:04
[Coke] given that both versions are regularly broken (and no longer fixed, I suspect you're correct.)
16:04 mtk left
jnthn pmichaud: I don't see it as "we have to maintain both", so much as we just don't encourage the non-HLL development usage of nqp-rx to migrate to the new thing. 16:05
16:06 tzhs left
pmichaud well, if we do that, then we need to have a good way of avoiding confusion between the two 16:06
jnthn *nod* 16:07
16:07 Tedd1 joined
pmichaud also, if nqp-rx starts to have a significant runtime (and looks less like a Parrot-specific HLL), there becomes much less clarity about bundling it with Parrot 16:07
jnthn Also true. 16:08
moritz_ uhm
pmichaud so I wonder if the next version of rakudo should be --gen-nqp instead of --gen-parrot
moritz_ I would hate to have another configure.pl step in Rakudo
pmichaud and then nqp is responsible for bundling or obtaining the correct version of parrot and/or clr or whatever
Tene nqnqp?
pmichaud i.e., instead of Rakudo targeting Parrot, Rakudo targets NQP monthly releases 16:09
moritz_ Tene: already taken :-)
pmichaud and NQP monthly releases bundle the appropriate version of Parrot
Tene :P
16:09 mtk joined
moritz_ pmichaud: which increases the release manager's workload 16:09
pmichaud and NQP's configure (and possibly runtime?) can work out Parrot / CLR / whatever underlying backend
jnthn pmichaud: That makes quite a bit of sense.
pmichaud moritz_: it just means NQP has a separate release cycle
and a separate release manager 16:10
plobsing IIUC, parrot's view of NQP is that it is a useful tool and that is why it is bundled. It has little to do with being a runtime-less PIR generator.
moritz_ pmichaud: "just"
pmichaud plobsing: that wasn't the case a year or so ago
16:10 icwiener_ left
moritz_ well, things changed in parrot land too :-) 16:10
TimToady I'm looking for a better way to generate slides from text into either html or OOo; anybody have any ideas?
JimmyZ NQP realeases when it is ready.
16:10 icwiener_ joined
TimToady or into pdf, I guess 16:11
pmichaud TimToady: I'm thinking of writing a tool to do that, in Perl 6. But not likely to happen soon.
moritz_ TimToady: i wrote a p5 script that creates HTML slides that are based on the 's5' HTML+JS+CSS template
[Coke] TimToady: spork?
pmichaud I've had slideshows done in PmWiki, and of course I'm a longtime user of spork (but only because I've been too lazy to write my own)
Tene TimToady: the last time I wanted to do that, I used Beamer
moritz_ TimToady: github.com/moritz/perltalk very minimalistic in terms of features
pmichaud I have fantasies of someday having a pod to slideshow generator. 16:12
TimToady I want something that can do takahashi-esque, code samples, color highlighting
16:12 envi left
masak TimToady: I have one of those. 16:12
pmichaud anyway, slideshow generation is likely to be my next "big project" when I'm at a lull with Rakudo development
TimToady I'm going to India on Thursday, and I'd like something a bit more polished than my whipped-up-in-one-hour Perl script 16:13
oh, and I'd like to be able to embed clickable links
masak TimToady: github.com/masak/talks/blob/master...esentation
TimToady: it's in Perl 6, and it does all you said above before you said "clickable links" :) 16:14
TimToady control of font sizes and colors?
masak possible.
pmichaud plobsing: at the beginning of 2009 there was a big push to get all of the HLLs out of the parrot repository -- i.e., unbundled from Parrot
TimToady define "possible"...
masak highlighting is all there. 16:15
TimToady what is the final form?
masak font sizes try to be good defaults, and if they're not... one needs to change the source code.
pmichaud nqp-rx was then later added back in because it was a parrot-specific tool used primarily to build other HLLs
masak TimToady: SVG slides, which I then convert to a single PDF.
plobsing pmichaud: and nqp is unbundled in that sense. it's development is independant (although closely coupled).
pmichaud plobsing: our point is that development may be about to decouple even further 16:16
masak TimToady: ISTR you were at the YAPC::EU 2010 talk where I used this.
pmichaud s/point/thought/
TimToady well, I'm not sure I need the zoom/pan bits of that 16:17
masak no, not that one :)
TimToady or was that a different talk
masak yes :)
this one does title slides, text slides, code slides.
all very orderly and static.
plobsing pmichaud: perhaps, but parrot does want a structured "middle-level" language. NQP satisfies that description even if it does have some runtime library.
TimToady I seem to recall that pdf can have embedded links
moritz_ it can 16:18
pmichaud plobsing: good to know, then
moritz_ pdflatex often generates them
jnthn plobsing: It's worth remembering that nqp-rx/nom is very different in its usage of Parrot. It doesn't use Parrot's Class/Object to implement its classes. It doesn't use Parrot's multi-dispatch. 16:19
TimToady but popping up another window every time is perhaps a problem; might just be easier to switch desktops for links... 16:20
16:20 plainhao joined
masak if links are a requirement, I'd recommend Beamer as well. 16:20
TimToady what does Beamer do poorly? :)
moritz_ syntax hilighting
(latex in general) 16:21
plobsing jnthn: in practice, most old-style NQP-rx programs also didn't work all that well with Parrot's underlying model. Many implemented runtimes of their own. close-lang got bogged down and turned into kakapo (yet another NQP runtime).
slavik TimToady: drive on roads? :P 16:22
pmichaud I think one of the first things I should do is publish a guide of standardized names for our nqp variants
much like we had rakudo-alpha and rakudo-ng
TimToady I think most of my Perl driving is off-road these days
pmichaud . o O( that's why it crashes so often ) 16:23
16:23 icwiener joined
slavik I had an idea (unrelated to Perl6, feel free to flog me for this). What if the ordering of directory names in a file system didn't matter? That is: /a/b/c/file would be the same as /c/b/a/file and same as /b/c/a/file and son on. 16:23
16:23 icwiener left, icwiener joined
slavik also /a/b/file would be valid as well 16:23
moritz_ slavik: I wouldn't want to work on such a system
huf april's coming up, i think you should expand this idea in time for that 16:24
TimToady it would be a set theory filesystem
pmichaud slavik: sounds to me like the path prefix becomes unimportant, then
slavik TimToady: yes
pmichaud: right
huf the "path prefix" is a freetagging system
pmichaud so, a filesystem with no namespaces
slavik right, huf
pmichaud: yes
pmichaud slavik: the first thing that will happen is that people will start writing "a-b-c-file" to distinguish it from "c-b-a-file" and "b-c-a-file" :-P 16:25
slavik pmichaud: but they are equal ;)
TimToady could be emulated with a notation that orders the set members behind the scenes
slavik also /a/b/file is the same as the above, although /a/b would also include /a/b/d/file
:-\
TimToady: yeap
pmichaud my point is that if you don't provide usable namespaces, people will layer their own on top 16:26
16:26 icwiener_ left
slavik I actually had a perl script written that did that ... it was a while ago though 16:27
TimToady masak: does your system allow copy/paste of text? 16:28
slavik TimToady: it should ^^
no wait, masak has a filesystem?
TimToady: or you mean mine?
pmichaud slavik: different thread 16:29
slavik oh
I'll shut up then
pmichaud slavik: timtoady is talking about masak's slideshow software
slavik ooh
colomon is overjoyed to see such an active #perl6 again.
16:29 dfasfdasdasfsdaf left
pmichaud (or software that is being coerced into making slideshows) 16:29
16:29 wooden joined, wooden left, wooden joined
TimToady I would probably also be happy with something that would import to OOo Presentation 16:29
pmichaud jnthn: do you think our new version of nqp should (1) be bundled like a parrot subsystem or (2) be a standalone platform that bundles a copy of parrot or (3) other? 16:30
or, more precisely: which way would you tend to lean at this point? 16:32
jnthn pmichaud: I'd like to try and work out something now that fits in with the "NQP is available on multiple VMs" goal. 16:33
pmichaud that sounds like #2
jnthn pmichaud: Well, the bundling is a user convenience. (more)
slavik I just realized something
Tene slavik: there's at least one FUSE filesystem that does this. I know that I wrote a prototype versiont hat does it, once.
jnthn I don't think we're going to start bundling a CLR or JVM implementation. :)
pmichaud bundling is a user convenience for now, yes
tadzik o/
pmichaud eventually nqp is smart enough to detect what platform(s) you have installed and use those, I'd hope 16:34
jnthn That'd be the ideal.
slavik Tene: nice ... does it make sense to do this type of stuff?
jnthn For now though, it's nice to make it easy to get started.
Tene slavik: My prototype version used a normal directory for a backend, storing file tags as extended attributes on the files.
pmichaud well, moritz++ is absolutely correct that we need to keep release management and install in mind
Tene slavik: I never actually had any use for it, personally.
jnthn pmichaud: Typically the dependency chain is HLL Compiler (e.g. Rakudo) ==> NQP+PCT+6model ==> VM 16:35
pmichaud correct
16:35 wooden left
jnthn So bundling NQP with Parrot would be making an exception to what I'd expect to be the common case. 16:35
OTOH, it's convenient.
16:35 mberends left
jnthn And doesn't prevent NQP from having a --gen-parrot 16:35
masak tadzik: \o
pmichaud well, the alternative (#1) would mean that we continue to have a --gen-parrot for rakudo and use the nqp from it.... which seems backwards now 16:36
slavik Tene: as I feared, finding a real world useful application would be difficult
pmichaud at least, it's backwards w.r.t. nqp's stated goals
jnthn pmichaud: It feels kinda the wrong way around to me, yes.
slavik although it could be done for searches ...
Tene You may also want to consider alternative backends. If you want rakudo on clr, is nqp going to bundle the clr?
jnthn Tene: No. :) 16:37
pmichaud 15:59 <moritz_> maybe we should tell the #parrot folks about that decision :-)
I think I'll write this up as an email or blog post (before this weekend's PDS) 16:38
jnthn pmichaud: That'd be helpful.
pmichaud Tene: the discussion above is about alternative backends, yes.
the only reason for bundling parrot at this stage is convenience to end users
eventually they should be separate
jnthn *nod*
16:39 wooden joined
pmichaud and, of course, we're only really looking at nqp releases that bundle parrot.... the repo itself doesn't bundle it 16:40
same as what we do now
TimToady I think control exception handlers are really just a bitmap in a word of the stack frame; very cheap to enter by setting a single (statically knowable) word
and throwing a control exception is running up the dynamic stack looking for a particular bit
16:40 icwiener left
pmichaud TimToady: that's helpful to know 16:40
16:41 icwiener joined
TimToady and yes, leave is post-exception, more like a continuation invocation 16:41
jnthn TimToady: leave is what actually unwinds the stack, iiuc?
pmichaud TimToady: but if there's no control exception handler in place, does that mean we end up running up the dynamic stack just to find there isn't one? 16:42
TimToady yes, if that's a valid concept in CPS :)
there are always control exception handlers at the top
dalek rixel: e0deb14 | diakopter++ | sprixel/src/runtime/HandOptFrame. (2 files):
fixup HandOptFrame for .net's/mono's x86 JIT.

also change Framebase *not* to derive from System.Object.
pmichaud okay, so we end up chasing up the dynamic stack just to find the one at the top?
16:43 hercynium joined
TimToady but it should be cheap enough that every sub can manage its own bitmask 16:43
pmichaud as jnthn++ noted earlier... that sounds expensive for the common case
TimToady no, it's not
it only happens if you have an unhandled exceptoin
tion
16:43 icwiener_ joined
pmichaud an unhandled control exception? 16:43
jnthn pmichaud: I think TimToady is still assuming there'll be a return exception handler per sub. 16:44
TimToady yes, it's just very cheap to setup on entry, hopefully
pmichaud that's our problem... currently it's very expensive to set up on entry
TimToady esp if we can put off cloning CATCH/CONTROL till we need it
diakopter finds it hard to imagine it could be made much cheaper to set up on entry 16:45
TimToady that would be after the bit check in the frame
pmichaud so the bit check simply says "I catch this type of control exception", and then there's some additional logic to figure out what happens? 16:46
TimToady in any case, it needs a clone only if you actually have a CONTROL, and if it refs outer lexicals
yes, do it as lazily as possible at that point
all you do is check the same bit in every stack frame till you find one
jnthn That'd be cheap.
TimToady then you do whatever work is necessary
for a small number of important exceptions, this can be very fast 16:47
could even promote some CATCH exceptions to this mechanism, if there are spare bits
16:47 icwiener left
TimToady or at least have a bit that says "there's a CATCH" 16:47
is it possible in PIR to access the stack frame, or is that all encapsulated to the point of brittleness? 16:48
pmichaud well, can do bits to say "I catch these control exceptions", and when found we look to see if there's a CONTROL block (if yes, invoke it, if not, then go to the default handler)
We can access the stack frame, yes 16:49
but we have limited ability to add our own attributes to it
jnthn We have commit bits..
;)
pmichaud well, the stack frame will point back to the original block, though, and there we could hang some attributes
since this information is largely static, iiuc
jnthn pmichaud: There's also those bits that every PMC has (private bitfield) 16:50
For flags
Though only 7 bits and some may be in use.
TimToady likewise, I think $! and $/ could be special cased to have very low-overhead creation, if an access can be generated that checks a static bit
16:50 wooden left
pmichaud well, it becomes a question of whether it's cheaper to set the bits in the stack frame on every sub entry or to simply set the bits on the static sub and check it when the exception is generated 16:51
since the stack frames reference the original sub
slavik Tene: I got one, if you use the file system to store docs, this can be used as a basic keyword search for relevent docs (back to the filesystem), do that make sense?
jnthn pmichaud: Oh.
pmichaud: A custom Sub PMC subclass is very feasible.
pmichaud right 16:52
diakopter phenny: ask sorear is dalek okay? I pushed something to github sprixel and haven't seen it yet
phenny diakopter: I'll pass that on when sorear is around.
jnthn pmichaud: I'm already doing it to have a DispatcherSub for implementing proto
TimToady maybe one bit in the frame for "is interested in control exceptions"
pmichaud 16:49 <pmichaud> well, the stack frame will point back to the original block, though, and there we could hang some attributes
TimToady and the rest one level of indiretion away
diakopter phenny: ask sorear nm now I see it
phenny diakopter: I'll pass that on when sorear is around.
TimToady .o(level of indiscretion)
jnthn pmichaud: Exactly.
pmichaud of course, most of the control exceptions are lexotic, so it's not just the dynamic scope we're looking at 16:53
TimToady the whole point of "exceptions" is that you optimize with the assumption they won't occur, and that you're willing to do more work later if they do
jnthn pmichaud: Yes, but it's just as easy to follow the static chain. 16:54
pmichaud jnthn: correct.
TimToady but I don't see how we can do less than one bit per frame
pmichaud TimToady: does it have to be tied to the frame itself, if the frame already reference the block?
i.e., the block can hold the bit(s) ? 16:55
TimToady well, that's an implementation detail
pmichaud okay, wfm
TimToady just do the fastest thing :)
pmichaud just wanted to make sure there wasn't some level of dynamic-exception-handling that might make it be very per-frame instead of per-block
TimToady I think a registering-interest bit can be static even if the CATCH/CONTROL is completely dynamic in its decisions 16:56
pmichaud perfect, wfm
jnthn Sounds good. 16:57
pmichaud jnthn: would all of this imply we're basically implementing our own exception handlers and avoiding the Parrot ones? 16:58
at least for the control exceptions?
TimToady you still have to do the throw, even for lexotics
16:58 wooden joined
jnthn pmichaud: heh :) 16:58
pmichaud: ...just about... :)
16:58 MayDaniel left
TimToady optimizing out the throw would require knowing the call graph 16:59
pmichaud the corollary question is -- can we get something like this into Parrot, and is it worth the effort?
plobsing fwiw, exceptions being slow hurts more than just NQP
pmichaud plobsing: it's not the exceptions that are slow as much as the cost of creating the handlers
plobsing yes. the overhead of using (or expecting to use) exceptions anywhere. 17:00
jnthn pmichaud: Well, I am the expert at subverting Parrot... :/
pmichaud: At this rate we'll mostly only use it for GC and a runloop. :)
TimToady at a guess, I'd say that normal return exceptions probably merit their own bit in the frame since they're the hot path
17:01 cafesofie left
TimToady dynamic frame visit: check bit && call handler 17:01
jnthn pmichaud: Anyway, I suspect it's do-able but may be worth seeing if we can do try and get it into Parrot in a more "official" way.
TimToady lexotic frame visit: check bit && check lexotic identity guard && call handler 17:02
17:02 justatheory joined
pmichaud yes, I'm thinking more along the lines of "can we get parrot to migrate to this model" as opposed to subverting it :) 17:02
jnthn Depends how soon we want it. :)
TimToady alternately, the dynamic version is just the lexotic version with a *
jnthn if Parrot migrates to it then we can have the bit in the call frame so it's a pointer follow or two less. 17:03
TimToady I'm of two minds about whether the lexotic identity check should be based on smart-matching 17:05
on the one hand, it is behind the "I care" bit check, so overhead is not so much an issue 17:06
on the other hand, doing something as complicated as smartmatching for something so low-level is just asking for problems 17:07
probably normal lexotic checks based on &?ROUTINE.WHICH can be special cased, and smartmatching provided as a backup
jnthn TimToady: Nod. .ACCEPTS is no longer the ultimate type-checking primitive in 6model. It delegates to something in the meta-model, and anything that cares about a fast type check goes and straight to the meta-model for the answer. 17:08
TimToady sounds good
jnthn The cost was just too high going through an explicit .ACCEPTS call every time.
TimToady yes, we certainly don't want .ACCEPTS in the normal return path :) 17:09
jnthn Right. :)
Or the parameter type checking path... :)
TimToady the only question is how much we can hide that from the user, so it always looks like smartmatching 17:10
jnthn Well, smart-matching would directly delegate to it, so *that* way around it works.
TimToady but that's partly why we broke the symmetry of ~~
so that we could optimize based on the RHS's type
jnthn Yes, if we know it's just going to be a type object in there we could optmize away the .ACCEPTS call there. 17:11
s/in there/on the RHS/
TimToady which is why I was so steamed that p5 borrowed the symmetrical version :)
jnthn :) 17:12
masak they got better, though.
TimToady yup, after I yelled...
17:12 plobsing left
pmichaud okay, I have $otherjob tasks to do now. Then I'll work on writing up a plan for nqp that can be published and made available in time for pds 17:13
Tene jnthn: afaict, parrot is glad to accept any improvements to exceptions and handlers
pmichaud I think I want to start dropping the -rx from nqp now (and even perhaps change the repo)
Tene Just needs someone to do the work. Whiteknight has been interested in exceptions work lately. 17:14
pmichaud there's no longer a 'nqp' in the parrot repository afaict so we don't need the -rx to make that distinction. I'll keep -rx on the version of nqp that we have now that is bundled in parrot, though.
to distinguish it from the newer version(s) of nqp that will be coming along soon 17:15
jnthn pmichaud: A way to talk about the different backends would be helpful too.
pmichaud jnthn: perhaps that just nqp-parrot and nqp-clr for now 17:16
jnthn e.g. nqp-clr
Yeah, wfm.
pmichaud where "nqp" is the overall name for the platform, and "-parrot" and "-clr" are the versions designed for specific platforms
jnthn I'm happy for the stuff in the 6model repo to migrate when the time is right.
It was only ever intended as a working repo.
pmichaud and eventually we hope to be able to drop those extensions into a final merged product
jnthn +1
pmichaud I'll be a little busy with $otherjob stuff today, so will have to work on the draft either tonight or early tomorrow 17:18
jnthn pmichaud: That's fine. I have $otherjob to worry about a bit this week too :)
TimToady moritz_: to the first approximation, p5's "continue {}" is spelled "NEXT {}" in p6 17:22
17:22 JimmyZ left
moritz_ TimToady: or LEAVE { } 17:23
afaict after each iteration the block itself is left, no? 17:24
TimToady that would also run on a last though
NEXT doesn't
you'll note that continue isn't called in p5 on a last 17:25
17:26 plobsing joined
masak put differently, calling &next doesn't always trigger NEXT {} 17:32
though calling &last probably always triggers LAST {} 17:33
hey, why isn't there a REDO {} block? :) is it because UNDO {} already covers that?
17:34 rgrau joined 17:35 plobsing left, kst left, kst` joined 17:39 nadim_ joined 17:40 Lorn left 17:45 impious joined, impious left 17:46 kjeldahl left 17:54 hanekomu left 17:55 kjeldahl joined 17:57 dakkar left 17:58 cdarroch joined, cdarroch left, cdarroch joined 17:59 mberends joined 18:00 necrodearia joined
TimToady masak: calling &next is supposed to always trigger NEXT 18:03
S04:1420 18:04
18:04 mikehh joined
masak TimToady: you can't have it both ways. either it's always triggered, or it doesn't trigger on the last execution. 18:05
diakopter but just look ahead into the future... 18:06
TimToady it's not for after the test
if there's some spec that implies that, it's wrong
18:06 MayDaniel joined
masak ah; I see now. I think I misunderstood what you said above. 18:06
<TimToady> that would also run on a last though 18:07
<TimToady> NEXT doesn't
I read that "last" as "the last time through the block".
but it means an explicit &last call.
meant*
TimToady apologizes for not closing all the sheepgates 18:08
masak sheepish apologies for going for the gate :P
TimToady doesn't apologize for stealing the sheepgate idea from C.S. Lewis 18:09
flussence # Looks like you failed 6 tests of 18 18:12
2 more!
TimToady 2 more failed?!? 18:13
flussence well I could spin that and say those tests weren't there before... but it's 2 more passes too :)
diakopter feels spun 18:14
slavik TimToady: sheepgate? 18:20
here's an interesting question: would consider a developer who specializes in language X to be an expert in the X virtual machine? 18:21
18:26 kst` is now known as kst
shortcircuit slavik: Not strictly speaking, no. 18:27
slavik: I wouldn't assume a developer specializing in Java knows a great deal about the JVM, for example.
slavik shortcircuit: yea, that's where I was going
18:27 spq1 joined 18:29 Kodi joined
[Coke] I know a LOT of java developers. I would assume the opposite. 18:29
shortcircuit I might have to accept a distinction about a developer's being an _expert_ in X and being an expert in the XVM, as well. You might be slick with C# but never used anything but Mono, for example.
Kodi S03:1337 says infix:<^^> should return Bool::False when more than one argument is true. Fine by me, but it also says False should be returned when all arguments I false. I say that in that case the last (false) argument should be returned, as in the case of infix:<||>. 18:30
(I apologize for taking issue with line 1337.) 18:31
diakopter shortcircuit: yeah, but that's a difference between "the clr" and "the clr implementation"
shortcircuit admits unfamiliarity with the number and defnition of boundaries between .Net languages and the underlying hardware. 18:32
18:39 plobsing joined
diakopter there are hundreds of language implementations targetting .Net/clr, probably 50 or so "production"/"commercial"-level 18:43
oh, number of boundaries. heh. 18:44
sry
slavik shortcircuit: I'd continue that conversation, but it's outside the scope of this channel :( 18:45
moritz_ there's always privmsg 18:46
flussence
.oO( wait a minute... why am I not using multi for .indent? )
18:49
flussence rewrites for 5-6th time
dalek p-rx/nom: 26e717c | moritz++ | src/HLL/Compiler.pm:
port --ll-backtrace from parrot 5e3b4d2f
18:50
TimToady slavik: www.suddeninaminute.org/2010/09/tur...iting.html
slavik ty
18:51 Mowah joined, MayDaniel left, Axius joined
slavik TimToady: that's interesting ... 18:51
masak TimToady: "Pastor of Muppets" indeed :P 18:53
TimToady well, perhaps thegospelcoalition.org/blogs/justin...ting-well/ is a better ref 18:54
but certainly Lewis was against sloppy writing in general
masak "The way for a person to develop a style is (a) to know exactly what he wants to say, and (b) to be sure he is saying exactly that." -- there's an autopun in there somewhere... :) 18:55
TimToady I've taken this to heart in all my writing, and assume that if I do not communicate what I want to communicate, it's my fault as a writer, not the reader's fault.
masak TimToady++
Su-Shee I still like "elements of style" very much. 18:56
masak Su-Shee: I know a bunch of people who don't. they're over on languagelog.
Pullum chief among them. 18:57
and he seems to have good reason, too.
Su-Shee well I also like Rilke's letters to a young poet ;)
TimToady I don't much care for it myself--I'm not quite so much of a {pre,pro}scriptivist.
I'm a whatever-works writer.
masak Su-Shee: chronicle.com/article/50-Years-of-S...mmar/25497 18:58
Su-Shee I found it helpful as a non native writer.
TimToady it's certainly useful for codifying the standard practices
I'm not much into other people's standards, is all... 18:59
masak Su-Shee: I haven't read EoS, but I recently bought www.amazon.com/Sin-Syntax-Craft-Wic...amp;sr=8-1 and found it very enjoyable. it's more descriptive than prescriptive.
18:59 molaf_ left
TimToady I'd rather (re)learn the first principles as real principles, not as standards. :) 18:59
Su-Shee I've collected a metre of docs on the subject for german and english and applied what I found useful or what improved my style. :) 19:00
19:00 Mowah left
Su-Shee which was easier in german as I don't really have a "style" yet in english.. ;) 19:01
TimToady me no style normal
19:02 snearch left
Su-Shee good thing there's a short reference then. :)) 19:03
TimToady Kodi: I guess I'm fine with ^^ behaving as you suggest, since it might let you pass info on why it failed. 19:06
feel free to fix the spec there
Kodi TimToady: That I will.
masak Kodi++
flussence anyone: which is best, "([min] @whitespaces).chars" or "[min] @whitespaces».chars"? 19:09
jnthn They do different things, I think. 19:10
I think the second does what you probably want.
flussence the input's all varying length strings of ' ' chars, and they seem to work identically... I'll use the latter if it's more obvious-looking though. 19:12
masak the latter, then.
dalek ecs: a6a03fb | (Kodi Arfer)++ | S03-operators.pod:
[S03] When a chain of ^^s gets only false arguments, return the last one.
masak the former would take the length of the lexically first string.
flussence rakudo: ( [min] (' 'x2, ' 'x1, ' 'x4) ).perl 19:13
p6eval rakudo 9fdad1: OUTPUT«===SORRY!===␤Confused at line 22, near "( [min] ('"␤»
flussence huh.
moritz_ what is x2 supposed to be? 19:14
flussence rakudo: ( [min] (' ', ' ', ' ') ).perl
p6eval rakudo 9fdad1: ( no output )
flussence a missing-whitespace typo :)
rakudo: ( [min] (' ', ' ', ' ') ).perl.say
p6eval rakudo 9fdad1: OUTPUT«" "␤»
moritz_ rakudo: say ([min] ' ', * ~' ' .. *.length == 5).perl 19:15
p6eval rakudo 9fdad1: OUTPUT«" "␤»
moritz_ should be .chars really
rakudo: say 'abc'.length
p6eval rakudo 9fdad1: OUTPUT«Method 'length' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/p5bKxw6hcu␤»
19:15 _jaldhar left 19:16 _jaldhar joined
moritz_ rakudo: say (*.length == 5).('foo') 19:16
p6eval rakudo 9fdad1: OUTPUT«Method 'length' not found for invocant of class 'Str'␤ in <anon> at line 22:/tmp/xNVmQZX3Z2␤ in <anon> at line 22:/tmp/xNVmQZX3Z2␤ in main program body at line 22:/tmp/xNVmQZX3Z2␤»
masak didn't we have an awesome error message for that one? 19:19
flussence One like "please use .chars, .bytes or .graphs"? Sounds familiar...
19:20 plobsing left 19:21 Kodi left, fhelmberger left, kst left
TimToady or .elems 19:22
19:22 kst joined
jnthn We could add a .length method that DWIMs and just gives you some natural unit based on the type...oh, wait... 19:22
:)
masak jnthn: no scalar/list context in Perl 6... 19:23
jnthn :)
flussence $str.length(:in<12pt Helvetica>) ...
moritz_ :-)
masak flussence: your brain is fascinating. 19:24
TimToady that would be .width, I suspect
jnthn .width is still kinda unitless though 19:25
.pixels or .cms or .inches or something could work :)
19:25 plobsing joined 19:26 cjk101010 joined
flussence when /^(\t \s*) (.*)/ { ... } # Looks like the remaining test-fails are for this part :( 19:27
TimToady .pixels could be vertical 19:30
you're gonna want .height too
and maybe .depth
19:31 Chillance joined
jnthn Troo. 19:33
slavik TimToady: is logical programming similar to prolog in scope for perl6? 19:35
moritz_ hopes all programming is logical
slavik moritz_: if it was, I wouldn't have a job 19:36
19:36 MayDaniel joined
masak :D 19:36
TimToady slavik: eventually, though perhaps not for 6.0.0
moritz_ declarative aspectes are handles by multi (and nested) sigs and regexes, for example 19:37
TimToady basically we need a better story on unification to get there
diakopter blinks to attention
masak slavik: I've been thinking of it in terms of a module that imposed unification on something like signatures, and did backtracking on statements.
slavik TimToady: cool. would be nice to have a language with prolog type rules that didn't have like 5-10 implementations
TimToady er...
diakopter slavik: hahahaha
masak the 'let' declarator has Prolog-like properties, IIUC. 19:38
19:38 Axius left
diakopter throws some more irony slavik's direction 19:38
TimToady slavik: the other answer is that all other languages are really just dialects of Perl 6 19:39
moritz_ stopped counting Perl 6 implementations
19:39 icwiener_ left
TimToady biab & 19:40
slavik moritz_: except that perl6 has 1 spec
diakopter yeah, but... that spec is not ... how do you say ... built up from first principles. so implementations diverge from very different starting points & emphases. 19:42
19:44 nperez left 19:45 daxim left
moritz_ that's why we have a test suite, and regular discussions in here 19:45
s/regular/continuous/
slavik moritz_: right, because the spec is not final 19:46
moritz_ and sometimes ambiguous
slavik but in the end, there will be 1 spec and 1 set of spec tests ... spec can change and there will be versions, but it's not like Perl5 where you simply do what the interpreter does
19:49 skipper joined 19:50 PerlJam left 19:51 PerlJam joined 19:59 plobsing left, plobsing joined 20:03 flatwhatson left 20:16 flatwhatson joined 20:23 dukeleto left 20:24 dukeleto joined 20:27 mtk left 20:28 skipper left 20:29 mtk joined 20:32 coldhead joined 20:33 kjeldahl left 20:37 PZt joined 20:41 kjeldahl joined 20:50 plainhao left 20:53 kst left, kst joined, plobsing left 21:02 snarkyboojum left, cjk101010 left 21:05 MayDaniel left 21:15 leprevost joined
masak 'night, #perl6. 21:19
moritz_ o/ masak
colomon \o 21:20
21:21 masak left
moritz_ the small one is coming home tomorrow 21:21
colomon \o/
moritz_ indeed
tadzik yay :) 21:22
[Coke] YAY 21:23
moritz_ dang, if only I could remember what the second command line option was that I wanted to implement for rakudo
21:24 kst left 21:25 snarkyboojum joined, kst joined
dalek kudo: 7239864 | moritz++ | docs/running.pod:
document --ll-backtrace option
21:29
21:34 timbunce joined
pmichaud in the S03 update that was just pushed to specs, it says: 21:37
Returns C<Bool::False> 1339
+otherwise (when more than one argument is true). In list context 1340
+forces a false return to mean C<()>.
...shouldn't it just return Nil there instead of having the "In list context forces ... " ? 21:38
i.e., is list context a bit of a fossil?
21:38 plobsing joined
moritz_ sounds like it 21:39
jnthn There is no list context as such any more.
pmichaud right 21:40
so I'm thinking that phrase is a fossil that needs fixing
jnthn Feels like a 5o.
pmichaud I'd suggest "Returns Nil if multiple arguments are true."
moritz_ +1
pmichaud I'll make the change now... forgiveness > permission and all that 21:41
although we have similar things for && and ||, it seems.
I'm not so comfortable about changing those.
and // 21:42
anyway, I'd like to get rid of that "In list context forces ..." clause of the short-circuiting operators. 21:43
21:43 molaf joined, Kodi joined
pmichaud TimToady: see ^^^^ 21:43
afk again
21:46 leprevost left 21:50 pmurias joined
gfldex std: use MONKEY_TYPING; class Foo { method bar(){ augment class Foo { method lol(){} }; Foo.new().bar(); 21:56
p6eval std 625303c: OUTPUT«===SORRY!===␤Unable to parse block at /tmp/OfFSMwbTqK line 1:␤------> MONKEY_TYPING; class Foo { method bar()⏏{ augment class Foo { method lol(){} }; ␤Couldn't find final '}'; gave up at /tmp/OfFSMwbTqK line 1 (EOF):␤------> Foo {
..method l…
22:10 molaf_ joined 22:12 molaf left 22:16 jevin_ left 22:19 zevpl joined 22:27 starcoder left 22:32 starcoder joined 22:36 MayDaniel joined 22:39 hercynium left, noganex_ joined 22:43 kaare_ left, noganex left 22:52 timbunce left 22:57 pmurias left 23:04 pyrimidine left 23:07 kst left, whiteknight joined, kst joined 23:19 rgrau left 23:22 fhelmberger joined, fhelmberger left 23:23 fhelmberger joined 23:27 _jaldhar left 23:28 dual joined, leprevost joined 23:30 MayDaniel left 23:32 felliott left 23:40 felliott joined 23:44 felliott left
sorear good * #perl6 23:46
phenny sorear: 16:52Z <diakopter> ask sorear is dalek okay? I pushed something to github sprixel and haven't seen it yet
sorear: 16:52Z <diakopter> ask sorear nm now I see it
23:52 spq1 left 23:53 starcoder left
flussence suddenly realises q:to() depends on a working .indent(*)... argh 23:55
23:58 starcoder joined