Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-05-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 jnthn ooh, that works. :-)
00:01 jnthn diakopter++
00:01 TimToady sorear: one optimization that STD does there is to not rebuild LTM tables that didn't change from the parent
00:04 sjohnson no alt+\d for me :/
00:04 sjohnson ctrl works hto
00:04 sjohnson tho*
00:07 sorear phenny: tell diakopter : I am conflicted for both #parrotsketch and #rakudosketch. Permanently.  Every week.
00:07 phenny sorear: I'll pass that on when diakopter is around.
00:09 fengshaun joined #perl6
00:11 diakopter sorear: oh
00:11 phenny diakopter: 00:07Z <sorear> tell diakopter : I am conflicted for both #parrotsketch and #rakudosketch. Permanently.  Every week.
00:16 spinclad that's worth making a search for a better time (yet again) (having no idea if there is a better time all around)
00:19 sjohnson heh
00:23 spinclad (i can be pretty sure there's no _good_ time all around)
00:24 Tene #rs is new to me.
00:26 sorear actually, not quite permanently; #ps and #rs fall in prime classes time in this timezone
00:26 sorear so when I leave school I'll probably be free :D
00:26 sorear and I can always backlog.
00:26 sorear also, RT never processed my reply.
00:27 sorear so pmichaud presumably never saw my reply.
00:28 Casan joined #perl6
00:28 sorear I sent it out seven hours ago to the Reply-To on RT's return mail
00:28 sorear and ... nothing.
00:28 sorear we rely on RT so much, why aren't the BP team lurking here?
00:29 diakopter obra: OUBG
00:29 diakopter ping, I mean
00:30 spinclad (cryptographer deduces QWERTY keyboard)
00:30 obra yes?
00:30 diakopter something about RT
00:30 obra rt.perl.org...is not ours.
00:31 * diakopter forgot (again)
00:31 sorear phenny: tell pmichaud : RT ate my followup, so here - http://pastie.org/956317
00:31 phenny sorear: I'll pass that on when pmichaud is around.
00:31 obra they have, among other things, heavy spamfiltering
00:31 sorear obra: Did I send that message to the right address?
00:32 diakopter you proably have to retain all the other header fields, like thread id in-reply-to and such
00:32 sorear Does RT have a manual?
00:32 sorear Trying to guess how it works is very disconcerting
00:32 sorear diakopter: I did a full reply
00:34 obra just seind a reply is what you want to do
00:39 sorear obra: Did that seven hours ago, it hasn't appeared on the ticket yet
00:40 envi^home joined #perl6
00:41 obra sorear: the spamfiltering involves quarentine and manual review
00:41 sorear Ah.
00:44 yinyin joined #perl6
00:44 * ruoso just sent an email about the "object-belongs-to-thread" idea
00:45 * ruoso hopes to kick-start a more consistent discussion on the threading model...
00:46 spinclad phenny: tell pmichaud i see a race possibility still between when !A1 sets &B's outer_ctx to !A1, (suspends), !A2 does the same, (suspends), !A1 clones &B : #B1 -> !A2 (oops) and later !B1 likewise.
00:46 phenny spinclad: I'll pass that on when pmichaud is around.
00:48 lue hello!
00:48 spinclad hellue!
00:51 spinclad phenny: tell pmichaud i don't see a coherent meaning to embedded our's, but what meaning i do see seems to include an ordinary rvalue (at an incoherent time).
00:51 phenny spinclad: I'll pass that on when pmichaud is around.
00:58 lue alpha: my @a=(1,2,3,4); @a[3] := @a[0]; @a[9] = 3; say @a[0]
00:58 p6eval alpha 30e0ed: OUTPUT«rtype not set␤in Main (file <unknown>, line <unknown>)␤»
01:00 lue why didn't that work?
01:04 sorear because it's alpha?
01:04 lue would it work though? (checking)
01:05 lue std: my @a=(1,2,3,4); @a[3] := @a[0]; @a[9] = 3; say @a[0]
01:05 p6eval std 30618: OUTPUT«ok 00:01 113m␤»
01:05 sorear it should work, yes
01:05 plobsing joined #perl6
01:06 sorear hello plobsing
01:07 sorear Switched to branch 'topic/binding'
01:07 sorear let's see.
01:25 sorear I think the left hand side of := should *always* be a signature
01:25 sorear not sure how that interacts with one-pass parsing though.
01:30 * lue would have to look up what a signature is, then.
01:33 plobsing joined #perl6
01:39 sorear lue: the stuff you put between () in sub definitions
01:42 lue oh.
01:43 lue so anything I were to stuff in, say, sin(), becomes a signature (assuming no errors pop up)?
01:48 lue afk
01:53 sorear no
01:54 sorear anything you were to stuff in sub foo (#`( SIGNATURE GOES HERE )) { ... }
01:54 sorear when you call, you pass a Capture
01:54 sorear which is the opposite of a signature
01:55 jaldhar_ joined #perl6
02:01 pmichaud joined #perl6
02:01 pmichaud ESTILLNOFEATHER?
02:01 phenny pmichaud: 00:31Z <sorear> tell pmichaud : RT ate my followup, so here - http://pastie.org/956317
02:01 phenny pmichaud: 00:46Z <spinclad> tell pmichaud i see a race possibility still between when !A1 sets &B's outer_ctx to !A1, (suspends), !A2 does the same, (suspends), !A1 clones &B : #B1 -> !A2 (oops) and later !B1 likewise.
02:01 phenny pmichaud: 00:51Z <spinclad> tell pmichaud i don't see a coherent meaning to embedded our's, but what meaning i do see seems to include an ordinary rvalue (at an incoherent time).
02:05 sorear Actually, S03 already specs the LHS of := as being a signature
02:05 kfo_ joined #perl6
02:05 pmichaud ...it does?!
02:05 sorear S03:1519
02:06 pmichaud alas, I don't have a current copy of S03, and feather is down :-(
02:06 pmichaud .oO( about now is when I wish such things were stored in git instead of svn )
02:09 pmichaud sorear: short answer to your reply (since I seem to be having internet problems) -- #1:  instead of cloning !UNIT_START, it can be sensitive to a contextual.   #3:  no, I don't think this logic belongs in PAST::Compiler -- I think it should go in HLL::Compiler.  But ultimately I think the generated PAST should remain the same and then we wrap it appropriately in REPL context.
02:10 pmichaud (as opposed to changing it altogether in REPL context)
02:11 pmichaud afk again (sorry)
02:14 sorear Perhaps part of the problem is that my PAST-enlightenment is incomplete.
02:14 sorear I see PAST as a tree-structure, highly abstracted PIR
02:14 sorear You seem to see it as something deeper
02:14 pmichaud actually, PAST is abstracted HLL
02:14 pmichaud POST is abstracted PIR
02:14 sorear Language-independant processing of PAST to add autoprints is unthinkable to me
02:14 pmichaud I don't think the PAST should have to be processed.
02:15 pmichaud I think the autoprinting should be wrapped around it.
02:15 sorear wrapped... around it?
02:15 pmichaud sure, you're just printing (or not printing) the return value that comes back.
02:16 sorear HLL::Compiler doesn't compile statments, though; it compiles lines
02:16 sorear printing lines feels wrong to me
02:16 pmichaud it compiles code.
02:16 pmichaud it doesn't know about "lines"
02:16 sorear 'interactive' knows about lines
02:17 pmichaud right, 'interactive' is what needs to be fixed.
02:17 sorear how would you fix it?
02:17 pmichaud so that it can do autoprinting of the result
02:17 pmichaud basically it compiles the code, executes it, then autoprints the result
02:18 TimToady hmm, I would read that example as saying that you can have a signature on the left, not that you must.  But I can see how you'd read it the other way...
02:18 pmichaud please tell me that it's "can" and not "must"  :-)
02:18 bluescreen joined #perl6
02:18 TimToady "can" is the intention
02:18 pmichaud ty
02:19 sorear It doesn't really make sense to have anything other than a "signature" on the left
02:19 TimToady though other forms may well need a macroish 'make bvalue' action at compile time
02:19 pmichaud $a := $b     # makes perfect sense
02:19 sorear since "signatures" are the only Perl 6 concept that can be bvalueish
02:19 sorear $a is a signature
02:19 sorear my $a;  # this is specced to parse $a as a signature
02:20 TimToady yes, but lvalues in general aren't quite bvalues
02:21 TimToady so $a := $b really turns into something like 'VAR($a) := $b', or however we get the un-indirection
02:22 sorear part of me wants to call VAR a multi macro
02:22 TimToady this is more apparent with $x[42] := $b; somehow the array has to bind its native pointer to scalar, presuming it has a compact array of native pointers somewhere inside
02:23 TimToady and if it doesn't, then the binding fails, as with a compact array of int
02:24 sorear TimToady: please go on
02:24 TimToady so as with exists and delete, it's really a modifier on the subscripting operation to return something more primitive than usual
02:24 TimToady the reason, btw, for the current :exists and :delete adverbs is related
02:25 TimToady the problem is that we haven't specced what a subscript really turns into as an object
02:25 TimToady a Slicel or some such
02:25 TimToady but when you have @foo[42]:delete
02:25 TimToady it's easy enough to grok it as the same as @foo.delete(42)
02:25 TimToady but what about slices and multidims?
02:26 TimToady what does @foo[42,43;@x]:delete desugar to?
02:26 TimToady we probably need a special form for passing a subscript as an argument
02:27 sorear could do "delete" as a setting macro pretty easily, rewriting itself into the adverb form
02:27 TimToady then we could say it desugars to @foo.delete(:subscript[42,43;@x]) or some such
02:28 TimToady anyway, in all these delete/exists/bvalue cases, it's an instruction to the @foo to not actually follow the subscript to the end
02:28 sorear I'll need to think about what sort of thing VAR / :bvalue returns
02:28 TimToady so maybe there's a primitive @foo.bvalue(:subscript[]) form
02:29 sorear pmichaud: Back to interactive; can you explain in more detail what you want the 'interactive' to do on 2+2; 3+3, and how it works?
02:29 TimToady and in a sense, .delete is just .bvalue = Nil
02:29 TimToady except delete returns the old value
02:30 sorear pmichaud: !UNIT_START looking at contextuals feels wrong; the lexical parent of a module is a lexical thing, not a dynamical thing
02:32 sorear TimToady: Unifying signatures and bvalues feels right to me.  If anything you could apply VAR() to is valid in a signature, then we get multi binding $x[1], $x[0] := $x[0], $x[1] for free
02:33 TimToady it'd be a bit strange to allow @x[42] in a signature though
02:36 meppl joined #perl6
02:46 TimToady よし! I think I've implemented circumfixes in STD, finally...testing
02:47 sorear std: (2)
02:47 p6eval std 30618: OUTPUT«ok 00:01 112m␤»
02:47 sorear ?
02:50 agentzh joined #perl6
02:52 Heame joined #perl6
03:03 Heame left #perl6
03:07 sorear huh.
03:07 sorear mutablevar.pmc appears to be entirely dead code in rakudo
03:09 duff_ joined #perl6
03:16 * diakopter very glad others are figuring out details of semantics
03:17 diakopter not my forte.
03:20 sorear Why does rakudo support ObjectRef and Perl6Scalar pointing to other ObjectRef values?
03:21 meppel joined #perl6
03:26 sorear I'm lost.  What's the purpose of having ObjectRef at all?
03:39 TiMBuS joined #perl6
03:42 hercynium joined #perl6
04:02 BrowserUk joined #perl6
04:02 BrowserUk ?
04:03 JimmyZ joined #perl6
04:03 sorear !
04:03 gfx joined #perl6
04:03 sorear or is that ¿
04:06 JimmyZ \o I can't make spectest
04:25 sorear std: sub infix:<¢>($a,$b) { ... }; 2 ¢ 3
04:25 p6eval std 30618: OUTPUT«ok 00:01 115m␤»
04:25 sorear std: { sub infix:<¢>($a,$b) { ... }; }; 2 ¢ 3
04:25 p6eval std 30618: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/gDzAX4LEVA line 1:␤------> [32m{ sub infix:<¢>($a,$b) { ... }; }; 2 [33m⏏[31m¢ 3[0m␤    expecting any of:␤   bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 112m␤»
04:26 sorear TimToady: Where is operator overloading implemented in STD?
04:26 TimToady Cursor.pmc add_macro
04:27 ash__ joined #perl6
04:27 plobsing joined #perl6
04:27 jonrafkind joined #perl6
04:28 TimToady doesn't do anything with is parsed yet
04:29 sorear is parsed works with operator overloading ?!
04:29 sorear how does the match object get into the sub?
04:30 TimToady well, it will by the time add_macro actually adds macros :)
04:30 sorear (hmm.  Cursor's implementation is... completely unsuitable for Rakudo ;))
04:30 TimToady I guess you'd need a ponie...
04:32 Bzek joined #perl6
04:33 sorear Where does the actual language switchover happen?
04:33 TimToady it's really just add_operator currently
04:33 TimToady sec
04:33 sorear add_macro creates a new $~MAIN, but $¢ is still on the old $~MAIN
04:34 [mark] joined #perl6
04:35 TimToady cursor_fresh is what actually does the swap
04:36 BrowserUk joined #perl6
04:36 sorear cursor_fresh only looks like it makes a new cursor
04:36 TimToady the optional argument specifies language to switch to
04:37 ash__ with closures, when a capture happens, does it capture the world or just values it knows to capture? for instance, if you had an eval (so you don't know what value your closure is referencing) does it freeze the world? or would that not work right? sub foo($a) { my $b = $a + 1; return -> ($c) { eval "$c + $b" }; }; my $d = foo(1); say $d(2);     I think demonstrates what I mean. From lexically analysis of the closure you couldn't tell
04:37 phenny ash__: 11 May 23:20Z <spinclad> tell ash__ i can argue that whenever you use a function you use it as a rvalue, so create a closure.
04:37 ash__ it would need to capture, so it seems to capture the world, that seems expensive...
04:37 phenny ash__: 11 May 23:26Z <spinclad> tell ash__ (even if thrown away in sink context) ... but pmichaud seemed to have a different point of view on #rs.
04:37 ashleydev joined #perl6
04:37 sorear TimToady: how does the main rule engine know to do $¢ = %*LANG<MAIN>?
04:38 ash__ my lexical scope in nq-nqp is broken it seems, its almost right... but not exactly... i think i see the right way of doing things, you do need to freeze the world when you make a capture
04:39 TimToady STD.pm6:1468
04:39 ash__ sorry, ignore me, i am kinda thinking by typing
04:39 sorear <!!{ $*LASTSTATE = $¢.pos; $¢ = %*LANG<MAIN>.bless($¢); }>
04:39 sorear ?
04:39 sorear (that's 1465 for me.  (feather being down)--)
04:40 TimToady ah right, my last checkin failed
04:40 sorear what does <!! mean?
04:41 sorear double negation?
04:41 TimToady same as ?, but don't count as LTM
04:41 * sorear nods
04:42 sorear std: (my sub infix:<¢>($x, $y) {...}).(2 ¢ 3, 4 ¢ 5)
04:42 p6eval std 30618: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse argument list at /tmp/L3x9CpKowT line 1:␤------> [32m(my sub infix:<¢>($x, $y) {...}).([33m⏏[31m2 ¢ 3, 4 ¢ 5)[0m␤Couldn't find final ')'; gave up at /tmp/L3x9CpKowT line 1:␤------> [32m(my sub infix:<¢>($x, $y) {...}).(2
04:42 p6eval ..[33m⏏[3…
04:44 TimToady looks like a buglet
04:44 TimToady it knows to switch languages in the {...}, but outside that not till after the current statement
04:45 sorear that was actually a test of my understanding as much as anything else
04:46 sorear partly motivated by NQP-rx not doing roles, and partly by a desire for diversity, I'm going to try to do lexical operator overloading a bit differently in rakudo
04:46 sorear it will temporalize the same grammar
04:46 sorear there'll be a stack of grammar temporalizations
04:46 sorear with a bit of dynamic-wind-y trickery at module loads
04:47 TimToady that won't work if you also do Cursor's trick of representing continuations with cursors
04:48 sorear reprewhatting whats with cursors?
04:49 diakopter heh
04:50 TimToady Cursor does backtracking using lazy lists of cursors that keep the entire match state including current position, match tree, and language
04:51 TimToady no work is done to backtrack; you merely throw away the current cursor and find the next one
04:52 BrowserUk left #perl6
04:52 sorear bleh
04:52 sorear NQP-rx basically works like that...
04:52 sorear the temporalization *might* automatically undo
04:52 sorear (except we keep our cursors on the stack, and return to backtrack)
04:53 TimToady you can't backtrack into a match that way
04:54 sorear well then.  looks like I'm going to wait for any("pmichaud to change his mind on mixins in NQP-rx", "Rakudo bootstrapped")
04:56 TimToady the neat think about the Cursor approach is that the ratchet optimization simply throws away all but the first result
04:57 TimToady hence most of the rules turn into if/thens instead of nested lazymaps
04:58 TimToady bbl &
05:00 spinclad ash__: re does it capture the world, a naive display implementation will do so, and an eval will force you to.  not expensive in what it has to do on closing, but, yes, expensive in what it hangs on to.
05:01 ash__ yeah, you only need to clone lexpads, which shouldn't be to bad, but if you have an object that represents 30MB of memory, that can be expensive to hang on to for a closure that may or may not be needed much
05:01 spinclad (not expensive in that you already have the outer context/display with the world already in it, and you just clone and lengthen it by a layer)
05:01 ash__ and you could just set a flag to COW the variables so you don't have to actively clone everything
05:01 spinclad (clone is O(lexical depth)
05:01 spinclad )
05:03 ash__ you could do some lexical analysis to see if you would eval in the closure, and which variables need capturing to minimize the amount of work, but a naive implementation would probably just copy the lexpads of the lexical scope
05:03 spinclad right, and for that you need an escape analysis, which the eval (or YOU_ARE_HERE also) blocks
05:06 kcwu joined #perl6
05:07 kaare joined #perl6
05:07 spinclad needn't copy the lexpads (layers) i think, they can be shared by reference among different displays (naively)
05:09 ash__ well, right now, my plan in nq-nqp was to scan the closure for variables it used and copy them into a special lexpad that is pushed to the top of the lexical scope when you call the closure, which i think i can still do, but now i have to make my lexpads a bit smarter and set a flag on variables that should be captures so when they get updated, it pushes the old value into that special lexpad
05:09 ash__ i think that would give me the right functionality for my program
05:09 spinclad in fact, for shared lexical state they should/must be shared (naively)
05:10 ash__ was perlcabal on feather?
05:11 spinclad variables it uses: declares and uses?  that's the new layer in my rough language
05:12 diakopter ash__: yes
05:13 diakopter spinclad: your rough language?
05:13 diakopter Juerd should be waking up sometime soon :)
05:13 diakopter and might resurrect feather
05:13 spinclad diakopter: don't know if layer is established terminology
05:14 spinclad i'm just rough-hewing the language there
05:14 diakopter oh you don't mean a programming language. got it
05:14 ash__ well... this is going to be a fun re-design of my lexical scoping >.<
05:15 spinclad i think lexpad a good common term there
05:23 spinclad joined #perl6
05:23 ash__ well, thanks for talking, sleep time
05:24 diakopter 'nite
05:46 snarkyboojum joined #perl6
06:00 moritz_ good morning butterflymoose
06:01 diakopter howdy
06:01 TimToady butterflymeese?
06:02 spinclad flutter-by meeses
06:02 sorear hello moritz_
06:04 sorear moritz_: can you tell me what the purpose of ObjectRef is?
06:04 sorear I can understand Perl6Scalar
06:06 * sorear is trying to implement binding and maybe !FETCH
06:06 moritz_ sorear: not really; as far as I understand it's used to distinguish array containers that flatten, and those that don't
06:06 sorear Who would know more?
06:06 moritz_ sorear: pmichaud would
06:06 uniejo joined #perl6
06:07 sorear hmm, I wonder if I should switch to e-mail for extracting information from him.
06:08 Su-Shee joined #perl6
06:08 ashleydev joined #perl6
06:08 moritz_ maybe ask on p6c; perhaps somebody else knows too
06:08 moritz_ is feather known to be down/unreachable atm?
06:09 sorear yes
06:09 TimToady doesn't even have DNS at the moment
06:10 sorear hmm.  My RT reply went to p6c, but not to the ticket itself
06:10 sorear so much for Reply-To:
06:11 sorear ah, it finally made the ticket too...
06:17 moritz_ rt + mailing lists introduce quite a delay
06:18 moritz_ which is why I usually also CC the one I'm replying to
06:27 moritz_ btw if anybody wants a git clone of the pugs repo, please go to http://github.com/moritz/Mu
06:27 moritz_ last commit it recorded is from 13 hours ago
06:28 dual joined #perl6
06:29 kel_ joined #perl6
06:52 iblechbot joined #perl6
07:05 Trashlord joined #perl6
07:06 kel_ joined #perl6
07:20 zloyrusskiy joined #perl6
07:34 gfx joined #perl6
07:35 M_o_C joined #perl6
07:42 sorear :/ My IRC client is trying to turn into a full reactive programming framework
07:43 moritz_ emacs?
07:44 sorear no
07:44 sorear a long-term project of mine that I've been using as a scaffold to learn perl56
07:44 sorear perl6
07:46 moritz_ oh, then one you're writing
07:46 sorear it's what I started playing with macros for
08:24 dakkar joined #perl6
08:30 envi^home joined #perl6
08:45 arnsholt joined #perl6
08:46 yinyin joined #perl6
09:04 k23z__ joined #perl6
09:08 M_o_C joined #perl6
09:15 proller joined #perl6
09:28 ruoso phenny, tell BrowserUK please take a look at perl6-language history. TimToady sent your comments about the threading model there and I'm posting a reply...
09:28 phenny ruoso: I'll pass that on when BrowserUK is around.
09:29 molaf joined #perl6
09:29 k23z__ !seen BrowserUK
09:32 JimmyZ joined #perl6
09:38 masak joined #perl6
09:38 masak oh hai, #perl6
09:38 moritz_ lolitsmasak
09:38 masak lol!
09:39 Casan cat
09:40 molaf_ joined #perl6
09:40 dalek joined #perl6
09:41 snarkyboojum masak-san o/
09:41 dalek csmeta: r265 | diakopter++ | trunk/Sprixel/ (4 files):
09:41 dalek csmeta: [perlesque] fix bug exposed by similar pugsbug; ash__++
09:41 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=265
09:41 dalek csmeta: r266 | diakopter++ | trunk/Sprixel/ (2 files):
09:41 dalek csmeta: [perlesque] remove debug
09:41 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=266
09:41 dalek csmeta: r267 | diakopter++ | trunk/Sprixel/ (2 files):
09:41 dalek csmeta: [perlesque] add dynamic .dll resolution/loading
09:41 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=267
09:41 dalek csmeta: r268 | diakopter++ | trunk/Sprixel/src/Grammar/Grammar.cs:
09:41 dalek csmeta: [perlesque] catch dll load exceptions
09:41 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=268
09:41 dalek csmeta: r269 | diakopter++ | trunk/Sprixel/ (2 files):
09:41 dalek csmeta: [perlesque] this is only a test. if this were a real emergency, ...
09:41 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=269
09:41 dalek csmeta: r270 | diakopter++ | trunk/Sprixel/src/Grammar/Grammar.cs:
09:41 dalek csmeta: [perlesque] yes.
09:41 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=270
09:41 masak someone is up hacking :)
09:41 pmichaud_ joined #perl6
09:42 Juerd joined #perl6
09:44 Su-Shee so called "flood by productivity".
09:45 pugssvn joined #perl6
09:46 rv2733 joined #perl6
09:48 masak rakudo: sub A($a) { our sub B { say $a } }; A(4); B()
09:48 p6eval rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in B␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
09:48 masak ah, our-scoped subs. :)
09:48 masak rakudo: sub A($a) { our sub B { say $a } }; B()
09:48 p6eval rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in B␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
09:48 masak alpha: sub A($a) { our sub B { say $a } }; B()
09:48 p6eval alpha 30e0ed: OUTPUT«Null PMC access in type()␤in Main (file <unknown>, line <unknown>)␤»
09:49 masak I guess I could submit an RT ticket over something here, but frankly there doesn't seem to be much point. I have no idea how it all should work.
09:50 moritz_ perl 5 warns in such situation
09:51 moritz_ "Variable $a not shared in sub B, $location_info"
09:51 moritz_ or so
09:51 moritz_ "will not stay shared" or "is not available"
09:53 snarkyboojum "Variable "$a" will not stay shared"
09:53 masak TimToady commented on that the other day.
09:53 masak when I asked impossible questions.
09:53 * masak digs in the logs
09:54 masak aye, here: http://irclog.perlgeek.de/perl6/2010-04-27#i_2269712
09:54 masak I got the impression that since Perl 6 has 'real closures', the problem had somehow gone away.
09:54 masak but right now my li'l head hertz from thinking about all the details :/
09:55 moritz_ it's not really about closures; it's about being able to access soemthing by name which hasn't set up an environment yet
09:56 moritz_ unless you spec that at compile time a stub environment for these closures needs to be established
09:57 masak I think something like that is the long-term vision.
09:58 masak so if A wasn't called, calling B would print 'Any()'.
09:58 moritz_ which will kinda annoy pmichaud, because in parrot there's no lexpad before the invocation
09:58 moritz_ (iiuc)
09:58 masak and if't was called, calling B would print the last value of the $a parameter.
10:02 wolverian /aw
10:02 wolverian whoops.
10:03 masak 'Mu' is a lovely name for the repository formerly known as the Pugs repository, by the way :)
10:04 moritz_ :-)
10:15 JimmyZ "JimmyZ" at 192.168.1.3 pasted "Rakudo Test Summary Report" (81 lines) at http://nopaste.snit.ch/20535
10:16 moritz_ it's known to be pretty noise on new parrots
10:26 am0c joined #perl6
10:27 mathw Hey
10:27 masak hoi
10:27 moritz_ heu
10:27 masak std: sub A { our sub B {} }; B
10:27 p6eval std 30618: OUTPUT«ok 00:01 112m␤»
10:27 pmurias joined #perl6
10:28 pmurias diakopter: you switched to git-svn?
10:28 phenny pmurias: 11 May 15:26Z <TimToady> tell pmurias no, we will not remove .say from Any; you seem to have lost track of the idea that the main point of superclasses is to *lose* the separation of concerns imposed by the subclasses.  Language design is more about *balance* of concerns.
10:28 masak phenny: you already said that.
10:28 masak hm, maybe not.
10:29 masak the above sounds like the core of Liskov defiance, by the way. :)
10:30 masak at least reading between the lines.
10:32 masak but I guess that was the intent. :)
10:34 masak on a more worldly note, Rakudo make install has been failing for me lately: http://gist.github.com/398424
10:35 masak the cuase is something with permissions, but I don't see anything which looks immediately wrong.
10:36 masak lunch &
11:06 masak yay! Web.pm is mentioned in a TPF grant summary report. http://news.perlfoundation.org/2010/05/running-grants---a-summary-rep.html
11:07 masak it's been a while since that happened. when your grant organization stops including you in their summary reports, and you're unable to reach your grant manager, things get so much less straightforward... :/
11:07 masak Alberto++
11:07 masak behind the scenes, via email, communication has been picking up lately. all in all, it's a relief.
11:09 jnthn masak++ # not giving up on it
11:10 mikehh joined #perl6
11:10 masak it's been one long, drawn-out project. but I still think it has many good parts.
11:10 masak in a sense, the Web.pm project started both way too early and right on time.
11:11 masak on a Rakudo/Perl 6 timeline with perfect hindsight, that is.
11:12 jnthn It's chicken and egg. Rakudo needs more apps developed to make it better. Devloping apps being fun needs Rakudo to be better.
11:13 hejki i can't see the proto-chicken dinosaur which egg evolved into a chicken egg in that analogy
11:13 masak I'm sure all small language communities face this Catch 22 in some way.
11:14 jnthn We have a growing number of modules/apps and Rakudo is steadily improving, so I guess we're getting it somewhat right.
11:25 moritz_ masak: re install, that line should be pod2man docs/running.pod > /usr/local/man/man1/perl6.1
11:25 moritz_ masak: could you please nopaste the generated Makefile?
11:25 masak okie.
11:26 masak http://gist.github.com/398455
11:27 masak line 29:
11:27 masak POD2MAN       =
11:27 masak there you go.
11:27 masak moritz_++
11:27 moritz_ masak: do you have a pod2man in $PATH?
11:28 masak likely not.
11:28 masak whence do I get that?
11:28 KyleHa joined #perl6
11:28 * moritz_ would have thought that's shipped with perl
11:28 masak hm, I do seem to have one in /opt/local/bin/pod2man
11:28 moritz_ it is, on Debian
11:28 KyleHa Howdy #perl6
11:28 moritz_ is that in $PATH?
11:29 moritz_ hello KyleHa
11:29 masak KyleHa: hi!
11:29 masak moritz_: yes.
11:30 KyleHa Pugs SVN is running again \o/
11:31 moritz_ masak: what does  parrot_config has_pod2man pod2man  print?
11:32 masak has_pod2man => '0'\n no such key: 'pod2man'
11:33 moritz_ so parrot's Configure.pl doesn't detect it
11:33 masak odd.
11:33 moritz_ do you use the perl in /opt/local/bin/ to configure parrot?
11:33 masak possibly not.
11:34 moritz_ do you have a pod2man in the same directory as the perl that you use for configuring?
11:34 masak hm.
11:34 cognominal
11:35 masak moritz_: no.
11:35 moritz_ hm
11:36 envi^home joined #perl6
11:36 masak hold on; yes.
11:36 masak but it's not executable! o.O
11:37 moritz_ :/
11:37 moritz_ then make it so :-)
11:37 masak 'The contents of this script should normally never run!  The perl wrapper should pick the correct script in /usr/bin by appending the appropriate version.'
11:37 masak and there are scripts with version numbers appended, which are executable.
11:38 moritz_ and no wrapper or symlink in /usr/bin?
11:38 moritz_ called /usr/bin/pod2man, I mean
11:38 masak yes, but that's the non-executable one with the above quote.
11:38 masak not sure I want to mess with the way things are currently set up.
11:38 moritz_ huh, that looks silghtly weird
11:42 moritz_ any other macos user around?
11:42 clintongormley joined #perl6
11:43 masak filling the POD2MAN variable in the Makefile with /usr/bin/pod2man5.10.0 works, fwiw.
11:43 masak but it's hardly a long-term solution. :)
11:44 moritz_ the long term solution is probably to fix your pod2man/perl installation
11:45 moritz_ or bribe the parrot devs into patching Configure.pl to work with your setup
11:45 JimmyZ joined #perl6
11:45 masak aye.
11:46 colomon joined #perl6
11:49 snarkyboojum I'm a macos user :)
11:49 snarkyboojum but I use a custom built perl 5.12 by default :)
11:49 moritz_ snarkyboojum: do you have a /usr/bin/pod2man?
11:50 snarkyboojum moritz_: yep - same story as masak
11:50 snarkyboojum but $ which pod2man -> /usr/local/bin/pod2man
11:50 moritz_ and that's executable?
11:50 masak I get that too.
11:51 masak but that's not my default perl installation, AFAIK.
11:51 snarkyboojum both are executable on my system
11:51 snarkyboojum i.e. /usr/bin and /usr/local/bin
11:51 snarkyboojum pod2man
11:53 snarkyboojum $ which perl -> /usr/local/bin/perl
11:53 snarkyboojum for me
11:53 snarkyboojum i.e. perl 5.12
11:54 moritz_ snarkyboojum: and parrot detects your pod2man correctly?
11:54 snarkyboojum it did last time I did a perl Configure.pl --gen-parrot
11:54 snarkyboojum at least I could view the man pages if I gave it the right search path i.e. man -M blah
11:54 moritz_ and can you install a current rakudo?
11:54 snarkyboojum current as of last night
11:54 M_o_C joined #perl6
11:55 moritz_ thanks
11:55 moritz_ that's new enough
11:55 snarkyboojum welcome :)
11:55 * snarkyboojum tries again anyway
11:56 snarkyboojum yep - my generated Makefile has 'POD2MAN       = /usr/local/bin/pod2man'
11:56 moritz_ the patch that uses pod2man was applied yesterday morning
11:56 moritz_ by me :(
11:57 Trashlord joined #perl6
11:58 Trey joined #perl6
11:59 snarkyboojum just did another build and it works fine
11:59 snarkyboojum man pages are installed locally i.e. in my home directory, using /usr/local/bin/pod2man
12:01 \shade\ joined #perl6
12:01 bluescreen joined #perl6
12:02 cognominal joined #perl6
12:05 pmichaud_ yay, feather is back!
12:05 pmichaud_ good morning, #perl6
12:05 Juerd 3;0 juerd@feather:~$ uptime
12:05 Juerd 14:05:44 up 42 days, 18:28,  5 users,  load average: 0.03, 0.10, 0.05
12:05 Juerd twas the fiber.
12:05 jnthn morning, pmichaud_
12:06 colomon o/
12:06 masak morning, pm.
12:06 pmichaud_ whether it twas feather or fiber, I was unable to get spectests yesterday :-|
12:06 Juerd I was unable to get sleep...
12:06 masak musta been the fiber, 'cause the www.november-wiki.org is still up :)
12:06 Juerd 14:06 here and I'm about to go to bed now. Finally.
12:07 moritz_ juerd: suspected as much, because the dns was also down
12:07 moritz_ good sleep :-)
12:07 Juerd Thanks
12:07 moritz_ pmichaud_: git mirror of the pugs repo at http://github.com/moritz/Mu/
12:08 pmichaud_ moritz_: oooh -- good to know :-)
12:08 moritz_ (I'm slowly trying to weed out the term "pugs repo", because pugs isn't in there anymore)
12:08 Juerd What's in a name :)
12:08 moritz_ but it's hard as long as the path is still svn.pugscode.org/pugs
12:08 moritz_ Juerd: confusion
12:09 Juerd That's the thing we need more of, right?
12:10 ruoso joined #perl6
12:15 pmichaud_ I always thought we had plenty.  :-)
12:16 moritz_ speaking of confusion... most .de domains aren't resolvable right now
12:16 moritz_ or maybe half of them
12:16 masak why?
12:17 moritz_ seems 4 of the 6 primary DNS server don't want to give any answer except NXDOMAIN
12:17 * pmichaud suspects volcano ash.
12:17 * moritz_ suspects technical incompetence
12:18 pmichaud or perhaps it has to do with greek sovereign debt.
12:22 moritz_ ah
12:23 pmichaud afk, kid to school
12:23 moritz_ there was an announcement on a denic mailing list
12:23 moritz_ "maintenance for increasing system redundancy"
12:23 moritz_ somebody asked "will the nameservers be affect" - "no"
12:23 moritz_ of course not.
12:27 snarkyboojum left #perl6
12:27 snarkyboojum joined #perl6
12:32 masak snarkyboojum: the more I think about subs and their scoping, the more I realize that I do not fully understand them yet. it would be nice if we could sit down at some point and try to figure them out together, such that the road ahead is clear.
12:32 masak probably after my talk on Monday :)
12:33 moritz_ the more I think about subs, the more I'm convinced that having them lexically scoped is a good idea.
12:33 snarkyboojum masak: gladly - sounds like a fun evening of rakudo machinations :)
12:34 snarkyboojum talk on Monday is a Moscow talk?
12:34 masak aye.
12:34 snarkyboojum topic?
12:34 snarkyboojum grammars? :D
12:34 masak http://devconf.ru/perl/page/programm
12:35 masak for once, not grammars.
12:35 masak I'll be talking about Yapsi, Tardis and Sigmund.
12:36 snarkyboojum masak: w00t - looks v. cool :)
12:36 snarkyboojum "The future is now, it's just unevenly distributed." in my translation
12:36 snarkyboojum :)
12:36 masak aye. that's an accurate enough translation.
12:40 snarkyboojum masak: do subs have lexical scope by default in rakudo?
12:40 snarkyboojum err.. perl 6 :)
12:41 masak yes, I think so.
12:41 moritz_ both
12:41 masak but they can still be called textually before they're defined, because the compile phase comes before the run phase.
12:42 snarkyboojum at least in the symtable when looking at --target=past you get "scope" => "lexical"
12:42 masak rakudo: foo; sub foo() { say "OH HAI" }
12:42 p6eval rakudo ed2409: OUTPUT«OH HAI␤»
12:42 masak rakudo: BEGIN { foo }; sub foo() { say "OH HAI" }
12:42 p6eval rakudo ed2409: OUTPUT«Could not find sub &foo␤current instr.: '_block13' pc 25 (EVAL_1:0)␤»
12:43 moritz_ that's because the lexpad sits notionally at the start of each block
12:43 moritz_ rakudo: eval 'say $x'; my $x = 4;
12:43 p6eval rakudo ed2409: OUTPUT«Any()␤»
12:43 moritz_ rakudo: eval 'say $x'; my $x = 4; BEGIN { $x = 4 }
12:43 p6eval rakudo ed2409: OUTPUT«Symbol '$x' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
12:43 moritz_ rakudo: eval 'say $x'; my $x = 4; BEGIN $x = 4;
12:43 p6eval rakudo ed2409: OUTPUT«Symbol '$x' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
12:44 * pmichaud suggests 'INIT'
12:44 moritz_ rakudo: eval 'say $x'; my $x = 4; INIT { $x = 4 }
12:44 p6eval rakudo ed2409: OUTPUT«Null PMC access in getprop()␤current instr.: '&infix:<=>' pc 17523 (src/builtins/Junction.pir:205)␤»
12:44 pmichaud bah :-)
12:44 moritz_ :-)
12:44 moritz_ anyway
12:44 moritz_ the fact that the eval '...' doesn't die, but print anything, shows that $x is in scope
12:44 moritz_ even if not yet initialized
12:45 masak *nod*
12:45 masak another way to state the same thing is that 'my' keywords play no role after compilation.
12:45 JimmyZ ya, Null PMC access in getprop again!
12:45 masak that one's reported already :)
12:47 snarkyboojum rakudo: eval 'my $a = 5'; say $a;
12:47 p6eval rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
12:47 snarkyboojum :)
12:48 hanekomu joined #perl6
12:48 masak snarkyboojum: that doesn't work, because the compiler doesn't see your 'my' while compiling the program.
12:48 JimmyZ rakudo: my $a = \Int; say $a
12:48 p6eval rakudo ed2409: OUTPUT«Capture()<0x33534d0>␤»
12:48 snarkyboojum masak: yeah, was testing that out
12:48 JimmyZ rakudo: my $a = \Int; say &$a
12:48 p6eval rakudo ed2409: OUTPUT«␤»
12:48 snarkyboojum so my is processed 'statically'?
12:48 masak rakudo: eval '$a = 5'; say my $a
12:48 snarkyboojum or something...
12:48 p6eval rakudo ed2409: OUTPUT«5␤»
12:49 masak snarkyboojum: yes.
12:49 snarkyboojum cool
12:49 * ruoso just sent a second version of the threading model to p6-l
12:49 JimmyZ eval doesn't like " ?
12:50 pmichaud eval likes " just fine.  But you have to escape the $'s  :-)
12:50 pmichaud rakudo:  my $a = 5;  eval "$a = 5";
12:50 p6eval rakudo ed2409:  ( no output )
12:50 pmichaud rakudo:  my $a = 5;  eval "$a = 5; say $a";
12:50 p6eval rakudo ed2409:  ( no output )
12:50 pmichaud rakudo:  my $a = 5;  eval "\$a = 7; say \$a";
12:50 snarkyboojum rakudo: eval "my $a = 5";
12:50 p6eval rakudo ed2409: OUTPUT«7␤»
12:50 p6eval rakudo ed2409: OUTPUT«Symbol '$a' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
12:51 pmichaud rakudo++
12:51 snarkyboojum that's kinda weird - so it doesn't see the declaration at eval time, but it see the initialisation attempt
12:51 pmichaud uh, no.
12:51 snarkyboojum ok :)
12:52 pmichaud with the double quotes, it's trying to substitute a value of $a into the string, but there is no $a
12:52 JimmyZ rakudo: eval "use MONKEY_TYPING; class Foo{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo.new"
12:52 moritz_ it interpolates the string before eval() is ever called
12:52 p6eval rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Null PMC access in get_string()␤current instr.: '_block14'
12:52 p6eval ..pc 29…
12:52 snarkyboojum eek ok
12:52 JimmyZ rakudo: eval 'use MONKEY_TYPING; class Foo{ }; augment class Foo { method Str() { "hi"; } } ; say ~Foo.new'
12:52 p6eval rakudo ed2409: OUTPUT«hi␤»
12:52 JimmyZ rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:52 p6eval rakudo ed2409: OUTPUT«hi␤»
12:53 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} } ; say ~Foo.new"
12:53 p6eval rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
12:53 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:53 masak "You can't backslash that" -- that's what I was thinking :)
12:53 p6eval rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
12:54 pmichaud nqp: sub xyz($a) { -> { say $a } };   my $x := xyz(4);  my $y := xyz(5);  $x();
12:54 p6eval nqp: OUTPUT«Missing block at line 1, near "-> { say $"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
12:54 JimmyZ rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:54 p6eval rakudo ed2409: OUTPUT«hi␤»
12:54 pmichaud nqp: sub xyz($a) { { say $a } };   my $x := xyz(4);  my $y := xyz(5);  $x();
12:54 p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)␤»
12:54 pmichaud nqp: sub xyz($a) { { say($a) } };   my $x := xyz(4);  my $y := xyz(5);  $x();
12:54 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:54 p6eval nqp: OUTPUT«4␤5␤invoke() not implemented in class 'Integer'␤current instr.: '_block11' pc 0 (EVAL_1:5)␤»
12:54 p6eval rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
12:54 pmichaud nqp: sub xyz($a) { -> { say($a) } };   my $x := xyz(4);  my $y := xyz(5);  $x();
12:54 p6eval nqp: OUTPUT«Missing block at line 1, near "-> { say($"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
12:54 pmichaud nqp: sub xyz($a) { sub { say($a) } };   my $x := xyz(4);  my $y := xyz(5);  $x();
12:54 p6eval nqp: OUTPUT«Routine declaration requires a signature at line 1, near "{ say($a) "␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
12:54 pmichaud arrrrrgh
12:55 moritz_ sub () { ... } maybe?
12:55 pmichaud nqp: sub xyz($a) { return { say($a) } };   my $x := xyz(4);  my $y := xyz(5);  $x();
12:55 p6eval nqp: OUTPUT«5␤»
12:55 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a{ }; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:55 pmichaud there
12:55 p6eval rakudo ed2409: OUTPUT«Null PMC access in invoke()␤current instr.: '!postcircumfix:<{ }>' pc 14451 (src/builtins/Code.pir:30)␤»
12:55 pmichaud (yes, output is wrong -- that's what I was testing)
12:55 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { 'hi'; } } ; say ~Foo.new"
12:55 p6eval rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Null PMC access in invoke()␤current instr.:
12:55 p6eval ..'!postcircumfix:<{ }…
12:56 moritz_ JimmyZ: the {...} still interpolate in double-quoted strings
12:56 JimmyZ How can I get it to work?  my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:56 JimmyZ or Is it a bug?
12:57 * moritz_ doesn't see a bug
12:57 JimmyZ then how can I get it working?
12:57 moritz_ JimmyZ: first construct the string; then print it out, to verify it's actually what you expect
12:58 moritz_ once you've got that work, feed it into eval
12:58 pmichaud note that you need a space between the $a and the brace
12:58 pmichaud i.e.,   "class $a \{ \};"   and not   "class $a\{ \};"
12:59 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a \{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:59 p6eval rakudo ed2409: OUTPUT«hi␤»
12:59 JimmyZ rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:59 p6eval rakudo ed2409: OUTPUT«hi␤»
12:59 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class {$a}\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
12:59 p6eval rakudo ed2409: OUTPUT«hi␤»
12:59 JimmyZ ~~
12:59 pmichaud interesting.  :-)
13:00 JimmyZ then the error message bugs me
13:01 pmichaud well, the error message is actually pointing to the error, as far as it goes
13:01 pmichaud although Null PMC is certainly wrong -- not sure why that's coming up.
13:01 JimmyZ Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace?
13:01 moritz_ http://www.denic.de/typo3temp/pics/i_64bbbffdb3.jpg # that pretty much explains the DNS failure
13:02 pmichaud JimmyZ: what error are you referring to, then?
13:02 JimmyZ How can I get it to work?  my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
13:02 JimmyZ sorry
13:03 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { 'hi'; } } ; say ~Foo.new"
13:03 p6eval rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Null PMC access in invoke()␤current instr.:
13:03 p6eval ..'!postcircumfix:<{ }…
13:03 actualmind joined #perl6
13:03 moritz_ rakudo: my $a = 'Foo'; print "use MONKEY_TYPING; class $a{ }; augment class Foo { method Str() { 'hi'; } } ; say ~Foo.new"
13:03 p6eval rakudo ed2409: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Null PMC access in invoke()␤current instr.:
13:03 p6eval ..'!postcircumfix:<{ }…
13:03 JimmyZ rakudo: eval "use MONKEY_TYPING; class Foo\{ \}; augment class Foo\{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
13:03 snarkyboojum masak: "View History" for pages at http://november-wiki.org/ is giving "An internal error occurred. Apologies."
13:03 p6eval rakudo ed2409: OUTPUT«hi␤»
13:03 JimmyZ but this one works
13:04 JimmyZ the former doesn't work
13:04 moritz_ JimmyZ: that's because the { ... } is run *outside* the eval
13:04 masak snarkyboojum: I think there's a long-standing Issue ticket for that on github.
13:04 moritz_ JimmyZ: and that way it's also run outside any class
13:04 snarkyboojum masak: okydoke
13:05 moritz_ JimmyZ: so the error message does make sense
13:05 masak snarkyboojum: lichtkind discovered it months ago, and I haven't really taken the time to investigate. it wasn't always like that, though.
13:06 JimmyZ rakudo: my $a = 'Foo'; eval "use MONKEY_TYPING; class $a\{ \}; augment class Foo \{ method Str() \{ 'hi'; \} \} ; say ~Foo.new"
13:06 p6eval rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}; augment"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
13:07 JimmyZ rakudo: my $a/ = 'hi'; say $a/;
13:07 p6eval rakudo ed2409: OUTPUT«Confused at line 11, near "my $a/ = '"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
13:07 JimmyZ rakudo: my $a\ = 'hi'; say $a\;
13:07 p6eval rakudo ed2409: OUTPUT«Confused at line 11, near "say $a\\;"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
13:10 orafu joined #perl6
13:12 colomon left #perl6
13:12 colomon joined #perl6
13:14 * jnthn afk, talk i Malmö
13:14 raj joined #perl6
13:15 PerlJam joined #perl6
13:16 JimmyZ rakudo: my $a = 'Foo'; eval " class $a\{ \}"
13:16 p6eval rakudo ed2409: OUTPUT«You can't backslash that at line 11, near "}\""␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
13:16 JimmyZ rakudo: eval " class Foo\{ \}"
13:16 p6eval rakudo ed2409:  ( no output )
13:17 moritz_ JimmyZ: unless there's something that you want to demonstrate, could you please use private message with p6eval?
13:17 moritz_ that would reduce the noise level here
13:17 JimmyZ I think it's a bug.
13:18 moritz_ then report it as such
13:18 moritz_ including a description why you think it's a bug
13:19 moritz_ std: my $a = 'Foo'; eval " class $a\{ \}"
13:19 p6eval std 30618: OUTPUT«ok 00:01 113m␤»
13:19 moritz_ ah, unspace interpolation issue, probably
13:19 JimmyZ $a\ is not a var
13:20 moritz_ $a{ is the beginning of an interpolation of a variable + postcircumfix
13:20 moritz_ and $a\{ is the same thing with an unspace, in rakudo's opinion
13:21 JimmyZ and Foo\{ ?
13:22 moritz_ Foo has no sigil
13:23 JimmyZ then I can send report, because std works
13:23 JimmyZ :)
13:23 moritz_ 15:18 <@moritz_> then report it as such
13:24 JimmyZ will do, I forgot std :(
13:25 hanekomu left #perl6
13:28 snarkyboojum masak: you'll have to put up that moscow preso somewhere once done :)
13:29 masak I usually publish presentations as PDFs here: http://feather.perl6.nl/~masak/
13:29 * ruoso actually sent a third and simplified version of the threading model
13:30 snarkyboojum ah yes, read them all :P
13:31 masak :)
13:31 masak not sure how much sense some of them make without a speaker.
13:45 plobsing joined #perl6
13:47 iblechbot joined #perl6
13:53 perlygatekeeper joined #perl6
13:56 masak http://wikitravel.org/en/Moscow -- "There are no English signs inside so have your itinerary ready beforehand or learn to read Cyrillic, which is possible." I like that last part. :)
14:02 PerlJam I think there may be an "im" missing :)
14:05 masak oh, I wouldn't say that.
14:06 masak most people in the sciences already have some familiarity with the Greek alphabet.
14:06 masak and Russian has a refreshingly mismatch between spelling and pronunciation. at least compared to English.
14:06 masak s/refreshingly/refreshingly small/
14:07 k23z__ I just generated
14:11 rgrau` joined #perl6
14:11 masak k23z__: missing direct object near line 1 :)
14:11 k23z__ masak, haha
14:12 pugssvn r30619 | lwall++ | [STD,Cursor] implement circumfix:«X Y» as grammar derivation
14:12 pugssvn r30619 | [Cursor] recognize foofix:("\x[face]") and foofix:("\c[YOUR CHARACTER HERE]")
14:12 pugssvn r30619 |     without actually evaluating
14:17 ash__ joined #perl6
14:19 colomon rakudo: say (-.5).floor
14:19 p6eval rakudo ed2409: OUTPUT«-1␤»
14:20 masak rakudo: say .floor
14:20 p6eval rakudo ed2409: OUTPUT«Method 'floor' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
14:21 masak rakudo: say .WHAT
14:21 p6eval rakudo ed2409: OUTPUT«Any()␤»
14:21 masak guess floor is Cool nowadays.
14:22 moritz_ rakudo: say Cool.^methods(:local).map({.name}).grep(any <ceiling floor round>)
14:22 p6eval rakudo ed2409: OUTPUT«floorroundceiling␤»
14:22 moritz_ rakudo: say Cool.^methods(:local).map({.name}).grep(any <ceiling floor round>).join: ', '
14:22 p6eval rakudo ed2409: OUTPUT«ceiling, floor, round␤»
14:23 colomon okay, that was an impressive string of p6.  moritz_++
14:24 ash__ know what would be a cool operator
14:25 ash__ something that means ( )., so in the above you could do .map { .name } NEWOP
14:25 ash__ well, NEWOP grep  or maybe NEWOP .grep
14:25 moritz_ ash__: *.name
14:25 ash__ ah
14:26 ash__ true
14:26 moritz_ just forgot that it was implemented
14:26 ash__ but you'd still have to ( ) around that
14:26 ash__ .map *.name .grep wouldn't work, would it?
14:27 moritz_ map: *.name ==> grep any <... > ==> say
14:27 moritz_ ash__: yours would be two terms in a row
14:28 TimToady you can already use . for free after {}
14:28 TimToady at least in STD
14:29 TimToady since {} terminates an argument list unless followed by , or :
14:29 ash__ so, could you write .map {.name}.grep(...) ?
14:30 PerlJam almost
14:30 TimToady not without a : after the map
14:30 ash__ i am thinking of the cascading message operator in smalltalk, thats were i have seen it before
14:30 moritz_ std: .map: {.name}.grep(...)
14:30 p6eval std 30619: OUTPUT«ok 00:01 112m␤»
14:30 TimToady methods assume there are no arguments
14:30 TimToady and these days you can drop the space
14:30 TimToady std: .map:{.name}.grep(...)
14:30 p6eval std 30619: OUTPUT«ok 00:01 110m␤»
14:31 ash__ cool
14:31 * moritz_ thinks that feed operators will make nice syntax
14:31 TimToady since we don't allow name extension with closures :)
14:31 TimToady yah, but nobody quite knows how to think of them yet
14:32 moritz_ I have a mental model of them, and it's probably mostly wrong :-)
14:32 TimToady I have several mental models, so most of 'em are guaranteed wrong :)
14:33 TimToady but if they set up threads, and if we go the Erlangish no-shared variables route, then suddently ==> looks like it's breaking lexical scoping
14:34 TimToady otoh, if ==> is just a lazy list writ large, then lazy lists could break lexical scoping too...
14:34 * moritz_ kinda thought that the Perl 6 model was to share everything from outer scopes
14:34 moritz_ no idea how sane that is, though
14:35 TimToady well, that's not what ruoso++'s current model does
14:35 * ash__ started reading the messages from ruoso and is not sure what perl 6s threading model will be
14:35 moritz_ TimToady: well, it's not in any S\d\d document yet, so I feel free to ignore it for a moment
14:35 TimToady we might be able to analyze use of an outer lexical and determine which thread is the reader and which is the writer
14:36 moritz_ what I miss from these proposals are examples
14:36 ash__ that would be useful
14:36 moritz_ use cases, and how the proposed model handles them
14:36 moritz_ I'm not into die-hard concurrency terminology
14:36 ash__ he also mentions erlang and IO a lot and i am not familiar with those... i know they exist, but i haven't threaded with them before
14:36 TimToady and if ==> implies async, we probably want to force use of {} on one end or both
14:37 * ruoso always thought that ==> implies async
14:37 moritz_ so most of that is just abstract talk with not relation to reality - and kinda fits well into p6l (no offense meant)
14:37 moritz_ (at least to me it is)
14:38 ash__ ruoso: do you have any references for erlang i can glance over to understand their threading model better?
14:38 ruoso ash__, http://www.c2.com/cgi/wiki?ActorsModel
14:38 TimToady but if so, you don't want (my @abc = ...; ...) ==> @abc sorts of lexical visibility, probably
14:39 * ruoso would be quite confused by that
14:39 TimToady {my @abc} ==> @abc would catch that
14:40 TimToady that's assuming only the source is async
14:40 TimToady I guess the default in Unix pipes is that the sink is sync, unless you put &
14:40 ruoso TimToady, agreed
14:40 TimToady but it's still a separate process to its shell
14:41 TimToady so it can't make lexical vars for the shell
14:41 ruoso I have considered that when resolving outer variables inside a different thread, you would get a RemoteValue bvalue
14:42 TimToady I guess shell's & is spelled '==> sink' in p6
14:42 ruoso which means the actual variable manipulation would be delegated to the original thread
14:42 pugssvn r30620 | renormalist++ | Sync with github version rebased to upstream v6.2
14:42 ruoso TimToady, no... that'd be the equivalent to "> /dev/null"
14:43 TimToady printing to the terminal is a mere side effect :)
14:43 moritz_ just to make sure I understood that correctly, the parent and child threads are asymmetrical in that proposal?
14:43 ruoso "async { .... ==> ... }" would be the equivalent to &
14:45 bubaflub joined #perl6
14:45 ruoso moritz_, the point is that there isn't child and parent threads... it's a plain list, not a tree
14:45 ruoso TimToady, sink is sync
14:45 hejki unless you have a master thread that runs a bunch of threads :)
14:45 TimToady I would like to have it both ways :)
14:46 TimToady but from the standpoing of message passing policy, flat is pretty good
14:46 ruoso that's the point...
14:46 ruoso not even the coroutines stack is a tree
14:47 ruoso it's a flat list
14:47 ruoso and coroutines waiting for a return value are simply blocked
14:47 ruoso CPS ftw
14:47 TimToady structure is reflected in the names/locations of sources and sinks
14:47 ruoso precisely
14:47 TimToady and doesn't necessary have to be duplicated in thread table
14:47 TimToady *rily
14:48 ruoso sources and sinks are the "pipes"
14:48 TimToady Erlang has some nice properties which it would be good to steal, to the extent possible
14:48 TimToady are the ends of the pipes
14:49 ruoso TimToady, yes... yes... I meant they are not the actual thing reading or writing to them...
14:49 TimToady Erlang's threads are very lightweight, and you can run 100,000 without bogging down
14:49 * PerlJam makes a mental note to learn erlang next
14:50 TimToady the other property that is nice is that you can upgrade a module in place, and since the state is mostly reflected in the messages, the new module just fits in and takes up where the old one left off
14:50 TimToady we perhaps have more state that is not in message, so it might be harder for us
14:50 moritz_ you can't even run 100,000 iterations sequentially with Rakudo without bogging down :-)
14:50 dakkar joined #perl6
14:50 ruoso TimToady, yes... I wouldn't try to natively support network-bound messaging yet...
14:51 ruoso (as things that would be harder to us)
14:51 TimToady it would be nice to hit a sweet spot that is extensible in various ways, though
14:51 ash__ would there be a N:M threading model? (where there are X schedulers running in kernel threads and M threads in each scheduler?)
14:52 ruoso one thing i still didn't think much about is how to share the data in the setting...
14:52 ruoso ash__, yes... where M are the coroutines in my model
14:52 ash__ got ya
14:52 TimToady most setting data is immutable
14:52 TimToady unless you're speaking of the setting of the async
14:53 ruoso or the fact that the setting of the async is mostly the same as the setting of the calling coroutine
14:53 ruoso maybe we just assume that the setting should be immutable and thread-safe
14:53 TimToady I think the setting of an async has to be the language in force at the point of the async, just like eval does by default
14:54 TimToady predeclarations have to be visible
14:54 TimToady that doesn't mean that any kind of access is allowed
14:54 TimToady we can restrict access without restricting visibility, where such is necessary for sanity
14:55 TimToady s/eval does/eval is supposed to do/  :)
14:55 ruoso and... compile-time optimizations might be sufficient...
14:55 ashleydev joined #perl6
14:55 TimToady if static analyis can look at an outer construct and distribute it sanely over its users, sure
14:55 ruoso if the symbol is known to come from the setting at compile time (and we do know it), we can have a different policy
14:56 TimToady there are many settings, when you start talking about eval and friends
14:56 ruoso otherwise it will have to ask the caller thread what does "infix:<+>" menas
14:56 ruoso *means
14:56 TimToady no, that's lexical
14:56 TimToady only macros have to worry about that sort of thing
14:57 TimToady and other such generic code, like maybe roles
14:57 ruoso yes... it's lexical... but in { my $foo = 1; async { sleep 1; say $foo}; $foo = 2}
14:57 ruoso it needs to ask the caller thread what $foo means
14:58 ruoso but in { my $foo = 1; async { sleep1; say $foo + 2 }; $foo = 2 }
14:58 TimToady well, sure, but that's dynamic data, and yes, if you rebind &infix:<+> in the outer, then it has to ask about that too, unless we restrict that
14:58 ruoso it doesn't need to ask what infix:<+> is
14:58 ruoso that was what I was talking about
14:59 ash__ well, what about custom ops?
14:59 ash__ or multi's
14:59 TimToady all lexically scoped
14:59 ash__ wouldn't it need to ask about the ops?
14:59 ruoso and you know about'em at compile time
15:00 TimToady (again, unless explicitly rebound)
15:00 TimToady but we can recognize that and pessimize
15:00 ruoso ash__, if it's declared in another thread, it will need to ask to that thread for it...
15:00 TimToady but can cache an immutable
15:01 TimToady just as it can cache the value of an immutable $*FOO
15:01 ruoso we can even make it thread-safe eventually
15:01 ruoso the immutables, I mean
15:03 TimToady immutables work much better than mutables under multiprocessing of various sorts, but people like to program with mutables, so it's another balance fo concerns
15:03 TimToady *of
15:05 ruoso but there are a lot of immutables in a lot of places, even if people prefer mutables
15:06 TimToady sure, and sometimes you can sneak 'em in and make 'em look mutable, as with strings
15:06 ruoso for instance, as much as I like the idea of applying a Role to a method, I'd be pretty much confortable with requiring that to be made at declaration time
15:07 ruoso so methods can be immutable
15:08 TimToady well, there's always 'use SLOW_MONKEYS;'
15:08 uniejo joined #perl6
15:09 TimToady and many things can be proven effectively immutable simply because nobody changes them anywhere in the application
15:09 TimToady if you do whole program analysis
15:10 ruoso (which is completely possible in Perl 6)
15:10 TimToady which, in fact, we require for class finalization
15:10 ash__ will/should async provide a synchronization point mechanism?
15:10 ash__ oh duh
15:10 ash__ stupid question, thats the maybe/deferrer/contend
15:12 TimToady that does extend the lockless paradigm into shared objects, if we can work it out nicely
15:12 ruoso the problem is making sure they are thread-safe
15:12 TimToady but we might have to put constraints and requirements on Responder Interfaces
15:13 ruoso thread-safeness can be a target for code in the setting, otoh
15:13 TimToady or tell the RI "you aren't allowed to participate in STM"
15:14 TimToady one could go as far as to manage foreign data with before-and-after snapshot comparisons, provided there's a way to reset to 'before' state
15:14 TimToady and someday it could potentially integrate into a well-behaved database interface
15:14 ruoso that's what STM does... and it's way too complicated
15:15 TimToady well, but the other way just has different complicatoins
15:15 TimToady I like the sandwich model that does STM on top and messages on the bottom
15:15 ruoso the issue is how deep the complications are...
15:15 TimToady with a scheduler as the filling
15:16 ruoso hmmm... STM on top?...
15:19 TimToady the phrase to google is "unify events and threads"
15:19 TimToady unfortunately the original article seems to have disappeared from upenn
15:19 * ruoso just loves when "I'm feeling lucky" returns a paper
15:21 TimToady *unifying events and threads
15:21 TimToady LtU has some discussion, even if you can't get at the original
15:22 ruoso hah! that's the same article you pointed me three years ago... :D
15:22 ash__ what if you made each thread a share nothing threading, and they have to ask for things from the rest of the world via contend blocks, or is that to cumbersome?
15:22 molaf joined #perl6
15:22 ruoso ash__, the idea is making it transparent to the user
15:23 ruoso i.e.: make them easier then Perl 5 shared variables
15:23 ruoso ash__, it kinda works like that, but it's hidden by a "RemoteValue" object
15:24 * ruoso lunch &
15:24 ash__ i am just thinking of how to keep the threads as light weight as possible, doesn't erlang (i could be completely wrong on this) do a share nothing? and everything each thread does know about, it became aware of through a message queue?
15:25 ruoso ash__, a RemoteValue isn't aware of the other thread... it's a proxy to a message queue
15:26 ash__ ah, got ya
15:26 ash__ so your just doing that automatically thats cool
15:43 moritz_ \o/ I've got support from TPF for buying t-shirts for new Perl 6 contributors
15:43 colomon moritz_++
15:44 moritz_ TPF++
15:45 masak \o/
15:53 TimToady *o*   <-- waving pompoms
15:53 ash__ neat
15:53 ash__ if you want to buy one, how would this be accomplished?
15:54 moritz_ https://rakudo.spreadshirt.com/
15:54 moritz_ there are other shops too
15:54 k23z__ what's a second system ?
15:55 moritz_ there's a wikipedia entry about that
15:55 moritz_ http://en.wikipedia.org/wiki/Second-system_effect
15:55 clintongormley hi all, i'm hoping that somebody can answer a not-perl-related-at-all question
15:56 clintongormley it's about unicode and DUCET
15:56 masak sounds like a question for #unicode-and-ducet :P
15:56 clintongormley if only that existed ;)
15:56 masak sorry; carry on. :)
15:57 clintongormley ok - the thing i'm trying to do is to sort search results by 'name', where 'name' can contain characters from pretty much any language
15:57 clintongormley results are being returned from a Lucene based full text search
15:57 * Su-Shee offers a tissue. you will cry.
15:58 clintongormley heh yeah :)
15:58 clintongormley unfortunately, java's unicode library (ICU) doesn't seem to support DUCET
15:58 clintongormley just to clarify, if i've understood it correctly, DUCET is a best-attempt at sorting across most scripts
15:58 moritz_ Unicode::Collate
15:59 clintongormley moritz_: yeah, except this is coming from java
15:59 Su-Shee return it unsorted and pipe it through something else.
16:00 clintongormley so best solution would be (1) somebody saying, oh you do it like this with ICU, or failing that (2) this is how you can store the strings, so that an ordinary sort would fix it
16:00 clintongormley Su-Shee: the problem is the number of results. it'd be much more efficient if i can do this inside lucene
16:01 clintongormley so i'm thinking something like: 'João' would get stored as 'joa2o', while 'joan' would become 'joa1n'
16:01 clintongormley is this something I could hijack Unicode::Collate to do?
16:02 Su-Shee die DUCET wikipedia article says, ICU can do it.
16:02 * clintongormley looks again
16:02 moritz_ "#perl6 - we are not afraid of Unicode"
16:02 moritz_ isn't that a nice slogan?
16:03 clintongormley Su-Shee: as far as I understand it, ICU supports the Unicode collation algorithm, which is a baby brother to DUCET
16:03 clintongormley although, this is from piecing together bits of info from 4 billion websites, so may well be wrong
16:04 Su-Shee clintongormley: I'm googling around as well..
16:04 clintongormley ICU seems to require knowing the language up front
16:04 Su-Shee hm. the icu website says nothing about ducet. no good sign.
16:04 clintongormley yeah :(
16:04 jonrafkind joined #perl6
16:04 clintongormley (again, apologies for hijacking #p6 for this)
16:06 Su-Shee you can pay #perl6 by writing a something nice for it some day. ;) like, let's say a cool text processing framework. :)
16:07 clintongormley sure, can you do it by tuesday? ;)
16:07 clintongormley oh whoops, i misread that
16:07 moritz_ sure; depends on the Tuesday you mean :-)
16:07 * clintongormley notes that moritz_ resembles a lazy operator
16:08 * moritz_ would rather be a lazy meta operator
16:08 moritz_ the moperator!
16:10 justatheory joined #perl6
16:11 moritz_ it seems that the Unicode collation algorithm needs a table
16:11 moritz_ and ducet is just the default
16:11 moritz_ so I'd assume that icu uses ducet by default if it sorts
16:11 clintongormley i think it uses ducet's baby brother
16:11 clintongormley which is about 10kB instead of 100kB
16:12 clintongormley and doesn't sort João correctly
16:14 Su-Shee hm, I found a blog entry about icu which at least seems to assume that the c++ version works
16:14 clintongormley link?
16:15 Su-Shee also, it seems that you want UCA and not DUCET
16:15 Su-Shee here: http://useless-factor.blogspot.com/2007/12/alphanum-sort-and-unicode.html
16:16 cdarroch joined #perl6
16:16 cdarroch joined #perl6
16:16 * moritz_ wonders if decomposing and sorting isn't a sufficient approximation
16:16 moritz_ or maybe decomposing, removing all marks, and then sorting
16:16 clintongormley hmm, so according to that blog DUCET is the data table for the UCA. I thought the UCA was like a subset of DUCET
16:17 Su-Shee clintongormley: I'm so very much not sure :)
16:17 moritz_ UCA is an algorithm; DUCET is a table
16:17 clintongormley moritz_: yes, removing the marks may be a reasonable approximation
16:17 cotto_w0rk joined #perl6
16:17 clintongormley i wonder how it will work with Cyrillic though
16:18 clintongormley (we have a russian site as well)
16:18 Su-Shee we sort per language only.
16:19 k23z__ "Nulla dies sine linea"
16:20 clintongormley the problem is, i'm running several websites off a single DB and a single full text engine. so different languages get stored in the same field, and for performance, should be analysed (for later sorting) at the time it is stored
16:20 * Su-Shee nulled plenty of lines today while refactoring. ;)
16:20 clintongormley thanks for the help all, and apologies again for the interruption. just know that you guys are valued :)
16:20 moritz_ clintongormley: normal form KC should help you then
16:20 moritz_ ... and gals, please
16:20 clintongormley moritz_: thanks - will check it out
16:21 Su-Shee clintongormley: do you _really_ need sorting mixed by languages?
16:21 Su-Shee if not, I wouldn't even store different languages in one field and instead separate them and optimize per language.
16:21 araujo joined #perl6
16:22 clintongormley Su-Shee: yeah, would mean rewriting my app completely, so don't want to go down that road
16:22 Su-Shee and btw.. what db?
16:22 Su-Shee clintongormley: well if it doesn't really work.. do it early and spare you many headaches later.
16:22 clintongormley i'm using mysql, which actually has a decent unicode collation based on ducet. it does the right thing
16:22 Su-Shee clintongormley: and mysql doesn't have a fulltext search?
16:23 clintongormley but we're switching the full text search to ElasticSearch (based on Lucene) which is why i'm hitting these issues
16:23 Su-Shee clintongormley: we simply use the postgres fulltext search for our stuff.
16:23 clintongormley FTS on MySQL is slooooow, and not terribly good
16:23 moritz_ it does, but it's not comparable to a proper search engine
16:23 clintongormley it's fine with small datasets, but not now
16:23 clintongormley 6 million objects
16:23 Su-Shee well right now, you lucene doesn't seem to work at all :)
16:23 clintongormley sometimes it'll lock up for 50 sec +, which also stops all updates :(
16:23 clintongormley Su-Shee: one part of Lucene :)
16:24 araujo joined #perl6
16:24 Su-Shee well I can tell you we _have_ all languages in one field and this doesn't help you with anything and only causes nuisance and headaches and sucks big time.
16:27 araujo joined #perl6
16:28 _Vi joined #perl6
16:28 _Vi perl -pe 'commands'  Which perl6 invocation corresponds to this?   perl6 -pe 's/q/w/' doesn't work.
16:29 moritz_ _Vi: most command line options aren't implemented in Rakudo yet
16:29 moritz_ _Vi: S19 contains the gory details
16:29 _Vi So perl6 can't be used for simple sed-like oneliners now?
16:30 Su-Shee if I wanted to do a perl 6 art project, I'd print the specs by number on their city train counterparts. ;)
16:30 Su-Shee _Vi: no, only for huge powerful parsing stuff.
16:30 moritz_ _Vi: masak wrote a module that fakes those...
16:30 _Vi E.g. I want to do "perl -i * -pe 's/Qqq/Www/i' but with features of Perl6 regexes (like :ii).
16:30 moritz_ _Vi: http://github.com/masak/pun/
16:31 moritz_ and :ii isn't implement yet either :(
16:33 moritz_ however Str.samecase is
16:33 _Vi moritz_, Does this document (http://perlgeek.de/en/article/5-to-6) describes which things are already done in Perl6 or just planned?
16:33 moritz_ _Vi: planned
16:35 moritz_ to quote from the first sub-article: "It is also not oriented on the current state of the implementations, but on the ideal language as specified."
16:36 _Vi moritz_, How much of Perl6 is approximately done and when will it be ready? [in about 5 years?]
16:37 moritz_ "enough to use it in some cases, never enough"
16:37 moritz_ and readiness strongly depends on your needs
16:38 cotto_work Is there a likely date for the Rakudo * release or is that still unknown?
16:39 moritz_ cotto_work: "June"
16:39 cotto_work How firm is that?
16:40 moritz_ I haven't seen any indication for it being moved
16:40 cotto_work (I'm gathering dates to figure out when the best time for Parrot to move to Git is with minimal disruption to Parrot-based projects.)
16:41 cotto_work ko
16:41 cotto_work ok
16:45 [Coke] (for future reference, if someone is having trouble contacting their TPF grant manager, ping me. I am on the GC.)
16:48 clintongormley hah! Unicode::Collate rocks!  $sortKey =  $Collator->getSortKey($string)
16:49 colomon [Coke]: you do garbage collection for TPF?
16:49 colomon ;)
16:50 Su-Shee clintongormley: well perl loves you. ;)
16:50 clintongormley and boy do I love Perl :)
16:50 Su-Shee so you're throwing away your java? good boy :)
16:51 clintongormley nope - ElasticSearch works really well - me likee.  it's the first java project that has made me go, hmm, interesting
16:51 moritz_ .oO( KinoSearch )
16:52 Su-Shee someone in a stack overflow thread called java the cobol of the 21st century ;)
16:52 clintongormley KinoSearch has faltered, last I looked. and its unicode support was pretty poor (nonexistent?)
16:52 moritz_ KinoSearch is currently being revamped in a branch
16:52 clintongormley ok
16:52 moritz_ of which there are development releases
16:53 clintongormley the guy who wrote ElasticSearch has done a really nice job of making it DWIM, and easy to use, and scalable
16:53 moritz_ the old one was pretty limited; I've planned to use the new one to re-do the search in th IRC logs
16:53 bubaflub moritz_: yesterday you asked me to add some tests for pairs being assigned to variables that have twigils
16:54 bubaflub some of those twigils are for class variables (like public and private) stuff
16:54 moritz_ bubaflub: not being assigned to, but built from
16:54 bubaflub oh, ok
16:54 clintongormley moritz_: you should check out elasticsearch, it's got a lot going for it. JSON REST API
16:54 clintongormley i've written a Perl interface : http://search.cpan.org/~drtech/ElasticSearch-0.12/lib/ElasticSearch.pm
16:55 * moritz_ will take a look
16:55 clintongormley http://www.elasticsearch.com
16:55 moritz_ bubaflub: and yes, some of them are attributes
16:56 moritz_ rakudo: class Foo { has $!a; method pair { :$!a } }; say Foo.new(a => 5).pair.perl
16:56 p6eval rakudo ed2409: OUTPUT«Symbol '$!a' not predeclared in pair␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
16:56 moritz_ that should return 'a' => 5
16:57 moritz_ pmichaud: is there a way to apply an external modifier to a regex?
16:57 moritz_ pmichaud: I want to implement $str.subst($re, '', :ii) - which requires setting the :ignorecase modifier on the regex
16:59 _Vi joined #perl6
17:06 alester joined #perl6
17:11 pmurias joined #perl6
17:11 pmurias diakopter: hi
17:11 k23z__ joined #perl6
17:12 SmokeMachine joined #perl6
17:16 bubaflub moritz_: should that be a skip test then?
17:16 moritz_ bubaflub: yes
17:17 bubaflub ok, i'll add some tests to S02-literals/pairs.t
17:17 diakopter pmurias: hi
17:17 diakopter pmurias: no I didn't switch to git-svn, why
17:18 hercynium joined #perl6
17:19 stephenlb joined #perl6
17:20 pmichaud moritz_: not yet, no.
17:20 ash___ joined #perl6
17:20 pmichaud moritz_: and I haven't quite figure out how to make modifiers work on already-compiled regexes.
17:21 pmichaud because it involves changing the regex code.
17:21 ashleydev_ joined #perl6
17:21 moritz_ store the original text,  and recompile?
17:21 sorear pmichaud: we seem to be running on skewed schedules here... shall I take the patch discussion to e-mail?
17:21 moritz_ probably not that easy, because of lexical context...
17:22 pmichaud sorear: sure, that works.  I would've answered last night but I was having internet and flooding issues at home.
17:23 pmurias diakopter: when using git-svn you first commit to your local copy of the repo and then push the commits "dcommit" to the central server
17:23 pmichaud for example, I was going to answer via the rt ticket, but ran into problems there.
17:23 Chillance joined #perl6
17:23 diakopter pmurias: oh, yes.
17:23 pmurias diakopter: 6 commits in a short time span looked like a dcommit
17:23 diakopter :)
17:26 PerlJam pmurias: could have been SVK too :)
17:27 pmurias isn't SVK dead?
17:28 PerlJam It isn't dead if people are using it.  (I have no idea if people are using it)
17:28 pmichaud what if only dead people are using it?
17:29 PerlJam Then it's good that we live in Texas where there are guns-a-plenty to take care of the zombies.
17:30 sorear this is quite surreal.  perfectionism has *always* been my greatest coding failure
17:31 sorear and now pmichaud is complaining that I'm being too short-term.
17:31 pmichaud no, just that it doesn't see a larger picture :)
17:31 pmichaud and it's not really a complaint, it's more of a "comment from the designer"
17:32 PerlJam sorear: you're a short-term perfectionist?
17:34 SmokeMachine joined #perl6
17:36 bubaflub moritz_: here's a gist of my diff for the test, not sure if this is what you want http://gist.github.com/397483
17:44 iblechbot joined #perl6
17:51 SmokeMachine joined #perl6
17:53 sorear pmichaud: since you seem to be here right now.  1. In !UNIT_START, you propose using a contextual to figure out where to load code.  I'm not sure I follow - surely lexical scoping is a static property?
17:55 pmichaud except in the case of interactive mode
17:56 pmichaud at any rate, we always have .set_outer to be able to explicitly set the lexical scope of a Parrot sub
17:56 sorear in the output it's static, though
17:56 sorear since, as soon as the parser starts to process some code, it has to commit to the correct lexical scope
17:56 sorear old-rakudo didn't do this, but it's necessary for sigilled variables
17:56 pmichaud sure, but we can tell the parser of any existing lexical scope
17:57 sorear yes
17:57 pmichaud we already have to do that, e.g., for 'use' modules
17:57 sorear the parser knows the lexical scope - why shouldn't it tell !UNIT_START directly?
17:57 pmichaud because the parser isn't the thing responsible for calling !UNIT_START
17:57 pmichaud more to the point, it shouldn't be that.
17:58 sorear the parser... currently is the thing responsible for setting up !UNIT_START
17:58 pmichaud it is?
17:58 * pmichaud looks
17:59 sorear src/Perl6/Actions.pm +75
17:59 pmichaud looks to me like the actions do it.
17:59 pmichaud right, that's not really "the parser"
17:59 pmichaud that's the "compiler" or "translator"
17:59 sorear I consider the actions part of the parser
17:59 sorear they're completely inseperable
17:59 pmichaud they're not.  Or more to the point, they shouldn't be inseperable.
18:00 sorear ok, then
18:00 hercynium joined #perl6
18:00 pmichaud the actions cannot live without the parser, but the parser should be able to live without the actions.  That's part of the theory behind STD.pm.
18:00 sorear the *compiler* needs to commit to a lexical scope immediately
18:00 pmichaud sure, no problem.
18:00 sorear so why shouldn't the *compiler* tell !UNIT_START?
18:00 pmichaud because the compiler also isn't responsible for invoking !UNIT_START
18:00 sahadev joined #perl6
18:01 pmichaud it generates code that invokes !UNIT_START< yes.
18:01 pmichaud but more generally, I believe that having a working REPL is something that ought to be doable across all HLLs
18:01 pmichaud and that each HLL shouldn't have to roll its own from scratch
18:01 pmichaud thus the core pieces of the REPL should be in the HLL::Compiler object
18:02 pmichaud !UNIT_START is purely a Rakudo feature
18:02 sorear you have this wonderful and lofty goal, but I can see absolutely no way to implement it
18:02 pmichaud I see how to implement it though.
18:02 sorear would you please tell me?
18:03 sorear compilers differ far too much; I don't see how to pass an initial lexical scope to an arbitrary compile
18:03 sorear compilers differ too much; I don't see how to extract the "inner lexical scope" from compiled output to pass to the next compilation
18:03 pmichaud in the PCT/NQP world, it would be done via a dynamic variable that holds the current lexical scope
18:04 pmichaud the compiler would then be able to look up things in that lexical scope
18:04 pmichaud this already happens -- e.g., for eval()
18:05 pmichaud when we compile a string in eval(), all we have is the existing dynamic scope of whatever is calling eval.
18:05 ShaneC joined #perl6
18:06 pmichaud indeed, arguably Rakudo's eval() and the interactive mode should end up using very similar (ideally identical) mechanisms for this.
18:06 SmokeMachine joined #perl6
18:06 ShaneC joined #perl6
18:06 ShaneC left #perl6
18:08 pmichaud to that end, there's potentially an argument to be made that HLL::Compiler's eval should be lexically aware, and able to easily pass outer lexical context information to the compiler it invokes.
18:10 sorear so all that's needed is the back hook
18:11 pmichaud right, and a reasonable API for using it
18:11 sorear given: a PAST::Node tree returned from (some compiler)
18:11 sorear how do we: find the new value of outer_ctx
18:11 pmichaud I think the question doesn't quite fit
18:12 pmichaud at the point of evaluating code, we already know an outer_ctx
18:12 sorear find the *new* value of outer_ctx
18:12 sorear which is inner to the current code
18:12 pmichaud oh, we don't get that from a PAST::Node tree
18:12 pmichaud we get that from the Parrot Sub object
18:13 pmichaud or, from a context
18:13 pmichaud at runtime, we have Parrot Subs
18:13 sorear where in HLL::Compiler does the "get that" code fit?
18:13 Tene not all compilers will necessarily use PAST, remember
18:13 patspam joined #perl6
18:14 pmichaud in interactive mode, we compile some source down to a Parrot executable sub, then invoke that sub, and keep the sub around to be used as the outer context for the next line of interactive input
18:14 Tene Ah, nice.
18:14 Tene I see. :)
18:15 pmichaud when the next line comes in, we compile the source (having the previous outer sub stashed away in a dynamic variable somewhere), the compiler can make use of the lexical information in that outer sub, it compiles to a new sub that is returned to interactive mode, interactive mode then invokes the new sub and keeps it around to be used as the outer context for the next line of interactive input
18:15 pmichaud and so on...
18:16 PerlJam pmichaud: does that preclude "incomplete" lines in interactive mode?
18:16 pmichaud PerlJam: not at all
18:16 TimToady that'll screw up all your OUTER::s
18:16 PerlJam you just wait until an appropriate sequence point before compiling and executing?
18:16 ash___ i don't think winxed uses PAST, i think it has its own system for emiting PIR, if i am not mistaken
18:16 pmichaud it just means that interactive mode has to work with the grammar a bit more to be able to detect when it has a complete statement.  This is somewhat anticipated by the 'moreinput' method in STD.pm
18:17 pmichaud TimToady: yes, OUTER::s are a bit of a problem with this approach.  I'm aiming to crawl before running.
18:17 TimToady why not just have the compiler call the evaluator on the sub-tree like you'd do for BEGIN?
18:17 pmichaud TimToady: we could potentially have each newly compiled sub duplicate its outer lexical context and then discard the old outer.
18:17 TimToady then you don't have to play any games with scopes--it's just there
18:18 ethel joined #perl6
18:18 pmichaud TimToady: right now we have a problem with BEGIN being able to affect its outer lexical scope as well.
18:18 pmichaud for similar reasons.
18:18 TimToady in p6 BEGIN isn't even required to have a lexical scope
18:18 TimToady std: BEGIN my $x = 2;
18:19 p6eval std 30620: OUTPUT«ok 00:01 113m␤»
18:19 sorear pmichaud: simply using the previous compiled sub as the lexical outer won't work
18:19 pmichaud sorear: why not?
18:19 sorear because rakudo generates an inner lexical scope
18:19 sorear my $x = 2 becomes UNIT_START({ my $x = 2 })
18:19 sorear more or less
18:19 pmichaud sorear: yes, why is that a problem?
18:20 sorear because $x is not lexically visible at the level of the UNIT_START
18:20 sorear so it won't be visible in subsequent lines
18:20 pmichaud I mean, I can fix the compilation process so that the compiler can designate the correct scope
18:20 pmichaud just a sec
18:20 sorear "I" can?  You seem to be taking a lot onto yourself
18:21 pmichaud I don't follow that last comment.
18:22 yahooooo joined #perl6
18:23 pmichaud if it helps, s/I/we/ as appropriate.
18:23 sorear ok
18:24 pmichaud but it's entirely possible for us to set it up so that the correct block is used as the outer scope
18:24 Juerd "We don't follow that last comment."? Confusing ;)
18:25 pmichaud indeed, the simplest way to do it might be to have !UNIT_START set a dynamic variable that says "use the block I received as a parameter as the outer_scope for any subsequent eval"
18:26 pmichaud (and this can be done entirely without modifying the current AST generation)
18:28 bubaflub joined #perl6
18:28 TimToady is the current AST capable of representing BEGIN my $x = 1; without curlies?
18:29 pmichaud TimToady: the AST, yes.  But Parrot isn't currently capable of executing things outside of a lexical context.
18:29 pmichaud i.e., we always have some sort of (complete) context that we're executing in.  Yes, it's a big problem that we've not yet addressed.
18:30 pmichaud rakudo:  my $x;  BEGIN { $x = 5; };  say $x
18:30 p6eval rakudo ed2409: OUTPUT«Symbol '$x' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
18:30 sorear should I feel dissuaded from attempting to address this problem?
18:30 pmichaud which problem?
18:30 sorear lack of protolexpads
18:31 pmichaud that would be a very nice problem to have addressed, so no, please do not feel dissuaded.  :-)
18:31 TimToady +1
18:32 pmichaud but I will say that it will involve going completely around the default Parrot lexicals implementation
18:32 pmichaud it likely will involve dynlexpads of some sort, and then the compiler will need to be able to merge that dynlexpad into a "normal" lexpad as it gets to the CHECK phase.
18:33 PerlJam So ... how much "going around parrot" equals "switching vms"?  :)
18:33 pmichaud PerlJam: that remains to be seen :)
18:35 sorear pmichaud: I see a problem with your set_outer REPL.
18:35 sorear set_outer needs there to be a call frame for the sub somewhere in order for lexpads to work
18:36 sorear this works for 'eval', because the sub that called eval is running (duh)
18:36 sorear this works for !YOU_ARE_HERE, because !YOU_ARE_HERE itself is running (even if the mainline isn't)
18:36 sorear this won't work for just passing the previous sub to set_outer the new one
18:36 pmichaud sorear: currently Parrot stores the call fram as a property of the sub.
18:36 pmichaud *call frame
18:36 pmichaud so it's available, even after the sub exits.
18:37 hercynium joined #perl6
18:37 sorear what.
18:37 sorear OK.
18:38 pmichaud even if we decide not to use that because it's too icky, we can set up a simple call in the mainline code to keep track of the callframe (a-la eval), and do that on every execution, not just interactive ones
18:38 sorear that's a memory leak waiting to happen, but it's good enough for now
18:38 pmichaud I agree, it's a memory leak, but it's a parrot design issue.
18:38 pmichaud chromatic has looked at it somewhat extensively and backed away from changes as being pretty involved.
18:38 * diakopter garners helpful intel from this convo
18:39 pmichaud but parrot will need to resolve that eventually.  at any rate, we can either store the call frame or use parrot's method of doing it
18:39 pmichaud *sigh* wife is calling me for some assistance -- I'll be gone another hour or two
18:40 sahadev joined #perl6
18:40 pmichaud bbl
18:41 athomason joined #perl6
18:43 SmokeMachine joined #perl6
18:43 * sorear doesn't know how to feel about how his ideas get completely redesigned
18:44 diakopter ours is not to question why
18:44 sorear parse error
18:45 TimToady mys is but to gather or fail
18:45 sorear parse error
18:45 PerlJam sorear: get used to communication  through implication and pun around here :)
18:46 TimToady for those following along at home, we've been having allusions to http://en.wikipedia.org/wiki/The_Charge_of_the_Light_Brigade_(poem)
18:46 mdxi Use Your Allusion
18:46 TimToady the spoon is an allusion
18:46 sahadev joined #perl6
18:47 pmichaud Allusion Randal?
18:48 pmichaud (ideas completely redesigned)   I can probably make the same claim.  :)
18:49 pmichaud (back for a bit.. turns out wife wanted me to be _ready_ to leave in a few minutes)
18:49 TimToady I presume you are likely to miss the phone call
18:49 pmichaud actually, probably not.  I'll probably be riding in a vehicle.
18:50 pmichaud Paula has an errand to run this afternoon and needs someone to accompany her; she was going to take our son (so I can stay and work), but he's now going to a friend's house so I'm the only one left.
18:51 ive joined #perl6
18:53 patrickas joined #perl6
18:53 pmurias TimToady: re Any.say what's the rationale for the invocant in Any.say being the thing to be printed and in IO.say the invocant being the thing doing the printing
18:54 pmurias TimToady: sorry if that's excess bikeshedding
18:54 kel joined #perl6
19:01 TimToady I just think that's one of those places where typical users will prefer it to dwtm rather than be perfectly consistent
19:01 colomon "do what TimToday means"?  ;)
19:01 TimToady most english speakers are used to sorting out the arguments to a verb by meaning anyway
19:02 TimToady and most verbs are rather heavily overloaded on valences
19:02 colomon (agree 100% with TimToady here, for what it's worth.)
19:02 pyrimidine joined #perl6
19:02 TimToady nobody writing 42.say is going to expect file descriptor 42 to try to do the IO
19:03 colomon Can Any.say take arguments?
19:03 colomon that is to say, if I say $a.say: blueberry
19:03 TimToady it might take an optional IO handle :)
19:04 pmichaud alternatively, does IO.say require an argument?
19:04 colomon thinking $a is an IO and it's actually something else, that's an error, right?
19:04 TimToady I would tend to think that Any.say wouldn't be looking for a slurpy
19:06 pmurias $a being an IO and assuming that's it something that can stringify and calling $a.say would be the quiet error
19:07 TimToady maybe an output handle carps if you stringify it
19:07 colomon If Any.say wants no arguments (or at most an IO object), and IO.say must have an argument, making the double error required to use it wrongly seems unlikely.
19:08 TimToady I think this bikeshed lives on a remote desert island.
19:09 pmurias perl6: $OUT.say();
19:09 p6eval rakudo ed2409: OUTPUT«Symbol '$OUT' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
19:09 p6eval ..elf 30620: OUTPUT«Global symbol "$OUT" requires explicit package name at (eval 122) line 3.␤ at ./elf_h line 5881␤»
19:09 p6eval ..pugs: OUTPUT«␤»
19:09 pmurias perl6: $*OUT.say();
19:09 p6eval elf 30620, pugs, rakudo ed2409: OUTPUT«␤»
19:10 colomon rakudo: $*OUT.say
19:10 p6eval rakudo ed2409: OUTPUT«␤»
19:11 colomon I'd say it was worth making that not work to avoid confusion.
19:11 TimToady so we want a + slurpy instead of a * slurpy :)
19:11 colomon :)
19:12 kel_ joined #perl6
19:12 colomon slurpy where { ?@slurpy }
19:12 TimToady or that
19:13 TimToady or *$, *@
19:13 colomon (I assumed your smiley meant + slurpy was a hypothetical, not a language feature I wasn't aware of.  :)
19:13 TimToady yes, but it's been thought about several times by now
19:14 TimToady since the * is, in fact, a pattern quantifier, more or less
19:15 ruoso one can always declare :($a, *@a)
19:16 TimToady though it's silly to have to split it into two variables just to get that behavior
19:17 ruoso there's just one point that holds my opinion...
19:17 ruoso *@a might be entirely lazy
19:17 TimToady rakudo: multi foo() { say "You're ugly." }; multi foo(*@a) { say ~@a }; foo()
19:17 ruoso +@a would require at least one item being evaluated
19:17 p6eval rakudo ed2409: OUTPUT«You're ugly.␤»
19:17 TimToady multi dispatch already does what we want here though.
19:19 ruoso I'd better have :($a, *@a) to make it explicit about the eager evaluation of first item of the capture...
19:20 TimToady I'm not worried, because Perl 6 is not about strict laziness
19:20 TimToady we just have mostly lazy and mostly eager, most of the time
19:21 TimToady and it is erroneous to assume that a lazy list cannot work ahead in batches
19:22 sorear in perl 6, laziness is an operational concept
19:22 sorear you can't generally have _|_ in lists
19:22 TimToady we generally try to avoid the bottom of the barrel... :)
19:23 TimToady but it is a bit FP oriented, insofar as we assume that working ahead in batches doesn't matter if the list is philosophically immutable
19:25 TimToady I guess Nil is about as close as we get to _|_
19:26 TimToady and even Nil is lazy about deciding whether it's in scalar or list context
19:26 TimToady turns into a placeholder arg in item context, but not in list context
19:27 TimToady and in a parcel, isn't committed yet
19:28 colomon woah, that's actually a big complication for lazy lists, isn't it?
19:28 colomon just occurred to me.
19:28 TimToady I suppose Nil's bottomliness is one way to explain why 'my Foo $x = Nil;' works
19:28 _Vi joined #perl6
19:28 colomon any of the examples we just came up with involve getting the first element from the list.
19:29 colomon but if it's a "forget about it" list, that first element is now lost.
19:29 colomon particularly sucky if it's happening in the middle of multi dispatch.
19:29 pmichaud colomon: which is why I've been saying it has to do with binding :-)
19:29 TimToady that's why binding is a form of pattern matching that can involve backtracking
19:29 pmichaud if it's being bound, then the "forget about it" semantic gets changed
19:29 colomon pmichaud: but it's not bound until it matches, is it?
19:30 pmichaud colomon: attempted binding, then.
19:30 TimToady and it gets more complicated with repeated binding such as map does
19:30 colomon but then how can you ever not bind it?
19:30 pmichaud colomon:  but yes, this is one of the huge complication features of lazy lists :-)
19:30 TimToady and I still have to spec capture cursors...
19:30 colomon (in a sub call)
19:33 colomon I guess there's no reason we can't unshift on lists, so something like that can handle it without binding.
19:35 TimToady unget, but yes
19:36 TimToady to the first approximation, all arrays and all lists have (at least potentially) a reified region and a lazy region
19:36 TimToady they just differ in API
19:37 TimToady however, we do have a slight problem if we commit a capture to slurping at some point, and then want to back that out and bind non-slurpy
19:37 TimToady maybe candidate ordering precludes this, generally
19:37 TimToady but maybe not
19:38 SmokeMachine joined #perl6
19:39 sorear bottom = nontermination
19:39 sorear 1, 1, 2, (while 1 {}), 3
19:40 sorear the categorical/poset model of the lambda calculus is truly a thing of beauty
19:43 sorear hrm.  pmichaud's approach seems to require me making two patches, sending them to two trackers, and getting approval twice from two sets of people
19:43 pmichaud ?
19:44 sorear HLL::Compiler doesn't live in the rakudo repo
19:44 pmichaud sorear: yes, this is true.
19:44 pmichaud sorear: that's really no different from Rakudo changes that require fixes/improvements to Parrot, though
19:45 pmichaud we do have to strike a balance between language interoperability and the needs of Rakudo itself
19:46 pmichaud and since nqp-rx and rakudo currently have the same pumpking, it only requires one approval :-)
19:46 sorear what about PCT?
19:46 pmichaud that's still part of Parrot, yes.
19:47 pmichaud although I'm the nominal pumpking for that as well
19:47 pmichaud eventually significant portions of pct may move to nqp-rx ; it's just not a pressing need at the moment
19:47 sorear I actually meant PCT::HLLCompiler :/
19:47 pmichaud oh, that's definitely moving
19:47 pmichaud I just haven't had time to do it
19:48 pmichaud but HLL::Compiler overrides PCT::Compiler, so changes can easily go there
19:48 pmichaud it doesn't have to be fixed in PCT::Compiler
19:48 pmichaud er, PCT::HLLCompiler
19:48 pmichaud also, ideally the code for HLL::Compiler should be written in nqp instead of PIR :-)
19:49 pmichaud and, of course, any HLL compiler (e.g., Rakudo) can override methods from HLL::Compiler, and we can see about backporting them into nqp-rx
19:49 pmichaud (as long as they've been written with backporting in mind, of course)
19:50 * sorear wonders if all of PCT should be moved to nqp-rx
19:50 sorear following all the conditional jumps in PAST::Compiler gets confusing after a while
19:51 pmichaud well, moving PCT (at least PAST) into nqp has been a goal of mine.  as I said, it's not a pressing need, since what we have now works fairly well.
19:53 pmichaud I think the next major thing that ought to be done is to start eliminating pir::opcode()  in favor of nqp::opcode()
19:53 pmichaud that way nqp can decide how best to translate to the underlying vm, instead of requiring PIR directly.
19:53 _Vi joined #perl6
19:54 * jnthn is back from talking/pizzaing.
19:54 sorear pmichaud: In your alternate world where neither the parser nor the compiler knows that it's running in the REPL, how does autoprinting work?
19:55 pmichaud the interactive mode calls a method on the compiler object to display the results that it received back from the code execution
19:55 pmichaud self.'autoprint'(result)  or something like that
19:55 pmichaud each compiler can then override autoprint to do whatever it thinks is the right thing
19:55 jnthn pmichaud: That sounds quite clean.
19:55 sorear So only one value should be printed per loop through the compiler?
19:55 pmichaud (and there's a default one that simply stringifies and displays on stdout)
19:55 sorear *interactive
19:56 pmichaud ?
19:56 pmichaud "only one value"?
19:56 sorear > 2+2; 3+3
19:56 sorear 4
19:56 sorear 6
19:56 pmichaud oh yes
19:56 pmichaud I think it should only print the result of the input statement
19:56 * jnthn is a little surprised that prints 4 and 6
19:56 pmichaud I don't think it should print the result of all intermediate expressions that might've been there.
19:57 jnthn (would have expected just the final result)
19:57 jnthn Especially since 2+2; is in Sink context in normal code
19:57 pmichaud precisely.
19:59 sorear ohhhhh
19:59 sorear you see that as like the inside of a block
19:59 sorear the value is the last statement
19:59 pmichaud any statement that is not the last statement of a block is in void context.
19:59 pmichaud s/void/sink/
19:59 sorear I was seeing it as a semicolon-separated list of statements, each to be (maybe) printed separately
19:59 TimToady phone
20:00 sorear where autoprint applies to all sink statements
20:00 pmichaud I wouldn't expect    "foo(); 2+3;"   to autoprint the return value from foo(), though.
20:01 pmichaud (and it's in sink context)
20:01 justatheory joined #perl6
20:01 sorear out of curiousity, why does chromatic always blog exactly five days later?
20:01 obra the meeting minutes?
20:01 sorear yes
20:01 moritz_ phenny: tell bubaflub http://gist.github.com/397483 looks good, except it should be .pair.value, not .pair.perl.value (.perl returns a string)
20:01 phenny moritz_: I'll pass that on when bubaflub is around.
20:02 obra It's policy that folks on the call get a chance to review them  and correct mistakes before they go live
20:02 TimToady to give people a chance to read his transcription and fix up mis-hearings
20:03 sorear I see.
20:03 chitragupt joined #perl6
20:05 justatheory joined #perl6
20:06 sorear pmichaud: Should draft2 go into PCT::HLLCompiler, HLL::Compiler, or Perl6::Compiler?
20:19 pmichaud sorear: if you want to just work in Perl6::Compiler for now, that's fine.  Just keep in mind that I'd like it to ultimately live in HLL::Compiler :)
20:19 moritz_ pugs: class A { has $!b; method p { :$!b } }; say A.new(b => 5).p.value
20:19 p6eval pugs: OUTPUT«5␤»
20:19 moritz_ wow, not only correct, but actually fast
20:20 moritz_ pugs: class A { has $!b; method p { :$!b } }; say A.new(b => 5).p.key
20:20 p6eval pugs: OUTPUT«b␤»
20:20 diakopter heh
20:20 diakopter yeah in that July 08 blog entry audreyt mentioned she sped up the startup time tremendously
20:20 diakopter or 09
20:20 diakopter I don't remember
20:20 moritz_ yes, I remember that too
20:21 moritz_ 08, more likely
20:22 nihiliad joined #perl6
20:31 sorear pmichaud: So 'interactive' should be reimplemented in HLL::Compiler?  Currently, it lives in PCT::HLLCompiler
20:32 Tene did rakudo ever get HLL::Compiler vs PCT::HLLCompiler sorted out?  Last I looked, months ago, it was using both in different parts.
20:32 sorear PCT::HLLCompiler --> HLL::Compiler --> Perl6::Compiler
20:33 sorear it's an inheritence hierarchy
20:34 Tene when I looked, rakudo created Perl6::Compiler class as a subclass of one in one place and as a subclass of the other elsewhere.  I never got around to checking which order it did them in.
20:35 moritz_ current it just seems to inherit form HLL::Compiler
20:35 moritz_ in src/Perl6/Compiler.pir
20:37 Tene You're right, it's not using PCT::HLLCompiler anymore. :)
20:47 rgrau joined #perl6
20:47 pmichaud it's using PCT::HLLCompiler indirectly
20:47 pmichaud because HLL::Compiler inherits from PCT::HLLCompiler
20:48 pmichaud sorear: yes, I'd reimplement 'interactive' to do more of what we want
20:57 _buno_ joined #perl6
21:09 pyrimidine left #perl6
21:10 pyrimidine joined #perl6
21:18 Trashlord joined #perl6
21:24 Schwern joined #perl6
21:32 wknight8111 joined #perl6
21:43 cotto_work joined #perl6
21:45 [Coke] if you need another language to test this out, partcl is missing its REPL post-nqp conversion.
21:45 [Coke] (and may have more requirements on prompt changing, incomplete commands, that sort of thing.)
21:55 snarkyboojum joined #perl6
21:59 holli joined #perl6
22:08 eternaleye joined #perl6
22:09 sahadev joined #perl6
22:11 bubaflub joined #perl6
22:29 bubaflub moritz_: should i make skip tests for the other twigils as well?
22:29 phenny bubaflub: 20:01Z <moritz_> tell bubaflub http://gist.github.com/397483 looks good, except it should be .pair.value, not .pair.perl.value (.perl returns a string)
22:33 kel joined #perl6
22:35 kel joined #perl6
22:37 kel joined #perl6
22:37 gabiruh joined #perl6
22:38 lue hello!
22:40 sorear [Coke]: pmichaud is punting on "incomplete commands"
22:41 pmichaud I'm punting it to slightly later, yes.
22:41 k23z__ joined #perl6
22:41 pmichaud if someone wants to take a crack at it, I'm in favor of that :-)
22:41 pmichaud I don't know if STD.pm has a working version yet, but that would be hugely helpful.
22:41 sorear pmichaud: I wonder if there's a good way to lift !UNIT_START and friends up to the NQP layer
22:42 lue .oO(interesting, pmichaud went from light green to red in my IRC client)
22:42 sorear A lot of languages have a concept of pre-seeding the referencing environment
22:42 sorear and it's so similar to the repl/eval thing
22:43 pmichaud sorear: it's possible, it'd be a method on HLL::Compiler then
22:44 pmichaud (which gets overloaded by subclasses)
22:44 sorear The main complication is that we would need to require Rakudo + NQP-backend to be loaded when loading precomp'd PIR
22:45 pmichaud that's already the case.
22:45 pmichaud well, where "NQP-backend" is really "HLL::Compiler + Regex + PCT"
22:45 pmichaud pre-comp'd PIR always ends up loading Rakudo, if only to get the setting.
22:46 sorear I've heard various people talking about "Setting-NQP".  What is this?
22:55 sahadev joined #perl6
22:58 Psyche^ joined #perl6
23:00 justatheory_ joined #perl6
23:08 lue http://joindiaspora.com/ and I thought we were the only death star. Oh well, at least it's privacy-aware social networking.
23:08 lue And also like us, it's NYI :)
23:08 eternaleye joined #perl6
23:08 bubaflub phenny: tell moritz_: ok.  lemme know if i should add similar tests for the other twigils
23:08 phenny bubaflub: I'll pass that on when moritz_ is around.
23:10 bluescreen joined #perl6
23:37 lue afk

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

Perl 6 | Reference Documentation | Rakudo