»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
slavik jnthn: as long as rules #1 and 2 are observed? 00:00
pmichaud ratcheting context cuts after each token. 00:01
(I agree the spec isn't entirely clear on this point)
but I've asked TimToady++ about it in the past and he said that was the intent.
dalek meta: r314 | diakopter++ | trunk/Sprixel/ (3 files):
[perlesque] more .Clone tidying/completeness
pmichaud so in the x/y/z case above, it wouldn't match because token z would fail after matching <x> to "aa" and being unable to match <y> 00:02
so far the only way to avoid it is to explicitly turn off ratcheting inside of z. I've suggested that a postfix ! should also enable backtracking on a token, but I don't think that one was acted upon yet 00:03
i.e.
token z { <x>! <y> };
allows backtracking into <x>
sorear **1..1* should also do it 00:06
pmichaud yes, but it also turns <x> into an array
and I think you mean **! 1 00:08
sorear If I make a minor clarification to a S**, should I edit AUTHORS and VERSION? 00:09
00:09 eternaleye left
pmichaud for minor clarifications, probably no 00:09
pugssvn r30878 | sorear++ | [S05] clarify :ratchet behavior with input from pmichaud++ 00:10
diakopter perlesque: my $x = 5; my $F = _cc.Clone(); say(1); goto $F; say('done'); 00:22
p6eval perlesque: OUTPUT«1␤»
diakopter perlesque: my $x = 5; my $F = _cc.Clone(); $F.Instruction-=2; say(1); goto $F; say('done');
p6eval perlesque:
..OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1􏿽xE2
diakopter interesting. 00:23
in the 2nd case, it doesn't leak memory at all (even though the frame is being cloned every time), b/c nothing holds a reference to the prior frame 00:24
diakopter ponders what to do next 00:26
sorear: if I wanted to add a ->psq target to viv... how could/should I get started? 00:29
sorear first, you need to decide how (runtime typed) Perl 6 is going to map to psq 00:32
then, go into VAST::Base, and copy p5 & emit_p5 but s/p5/psq/ 00:33
then, add a -q --perlesque command option
then, start adding emit_psq overrides by analogy with emit_p5 where needed 00:34
there's going to be a lot of duplicated code at first
as it shows up, I'm going to add an extra level of indirection
emit_p5, emit_p6, and emit_psq will be replaced (eventually) with emit_deep 00:35
DEEP::* will have the p5/p6/psq targets
but DEEP nodes are much fewer in number
jnthn whee
> say (* [*] *).WHAT
Block()
> say (* [*] *).(2,4)
8
diakopter my guess is that the psq emitted by viv will be extremely verbose (almost entirely "java-style" expressions/invocations/accessors to a runtime API) 00:36
00:36 yinyin joined
ajs1 Well, githubs auto-pod-rendering hoses my Unicode bits, but github.com/ajs/rakudo/blob/ajslib-U...ib/URI.pod is there now 00:36
00:38 mathw left
diakopter github.com/ajs/rakudo/raw/ajslib-UR...ib/URI.pod 00:39
ajs1 yeah, it would have been nice if their rendering did the right thing, but we can all read pod, I imagine ;-) 00:40
diakopter sorear: I don't expect there to be all that much duplicated code
from emit_p6 or emit_p5
00:40 ajs1 is now known as ajs
sorear diakopter: emit_p5 implements a great deal of desugaring 00:41
diakopter I'll need to see some of the code viv's STD emits for STD
oh
maybe you can nopaste a sample? :)
(plz)
sorear a sample of what? 00:42
diakopter of greatly desugared p5 edition of STD
[a portion of] STD
maybe just 1 rule, perhaps
sorear pick a rule 00:45
well
diakopter :) ok
sorear actually
run 'make'
then look in STD.pm5
viv generates the same code in most cases
diakopter (eye roll). yes I've studied gimme5's output a lot. 00:46
00:48 Chillance left
jnthn std: 1 .foo 2 00:53
p6eval std 30878: OUTPUT«===SORRY!===␤Method call found where infix expected (omit whitespace?) at /tmp/vI7RieW6AC line 1:␤------> 1 ⏏.foo 2␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤Parse failed␤FAILED 00:01 115m␤»
jnthn std: 1 ++
p6eval std 30878: OUTPUT«===SORRY!===␤Postfix found where infix expected (omit whitespace?) at /tmp/OuJZYVpe1L line 1:␤------> 1 ⏏++␤ expecting any of:␤ bracketed infix␤ infix␤ infix or meta-infix␤Parse failed␤FAILED 00:01 112m␤»
00:55 plobsing joined
diakopter sorear: but everytime I look at STD.pm5, I begin to suspect that it's much too tied to the Perl5 edition of Cursor to ever be separated 00:57
sorear sure - you should prefer editing 3000 lines in viv over 100000 lines in STD.pm5 01:00
diakopter well, there could be other emit schemes for STD's rules 01:03
to the api of another grammar engine that tries to emulate Cursor, I mean
sorear right, that's mostly where I'm going with DEEP 01:04
diakopter gains a glimmer of hope 01:05
I'd love to hear(read) your ideas on how to structure that API
meanwhile, maybe I should consider fleshing out my grammar engine in Sprixel so that it has all the same primitives as Cursor 01:07
also, writing an interpreter edition to supplement the compiler edition 01:08
sigh. 01:09
maybe that does actually help the bootstrapping effort. less directly though.
interesting. lexicals in Lua 5.2 are "state vars" by default, now. they need _ENV marker to mean dynamic allocated. 01:11
sorear diakopter: DEEP is a tree-structured language much like NQP or Perlesque; it has a parse-type known type of "lazy list" which you need to provide somehow 01:12
diakopter you've documented it?
it==DEEP 01:13
sorear no 01:17
diakopter sorear: ok. so it's in your brain only. :) how do I get it out of your brain?
sorear talk. 01:25
diakopter DEEP is a language or an API? 01:26
sorear DEEP, as I currently envision it, has 3 features that aren't mentioned in the perlesque blogs
it's a data structure
diakopter ok.
sorear the AST for a language that will probably never see a concrete syntax
diakopter oooo gimme the feature ideas
sorear 1. Roles
2. Lazy lists (as a builtin data type, not special syntax)
3. Dynamic typing 01:27
diakopter 1 seems to be quite tied to 3
sorear and by lazy lists, I really mean iterators
as looping over the same list >once is never needed
01:27 eternaleye joined
dalek kudo: da0437f | jonathan++ | src/core/operators.pm:
Remove cheating versions of whatever-ers that are no longer used.
01:28
kudo: 0c65df6 | jonathan++ | build/PARROT_REVISION:
Bump to a PARROT_REVISION that's not busted on Win32.
kudo: e659dd5 | jonathan++ | src/Perl6/ (2 files):
Implement bracketed infixes.
diakopter sorear: ok, I think those would be excellent features to add to another layer on top of perlesque (another stage, I mean)
sorear in the general case, yes, 1 and 3 are tied
Tene A co-worker of mine has a weird perl habit. He adds leading underscores to variable names for every nested lexical scope. Anyone ever seen this before?
sorear STD.pm6 uses roles in a very stereotyped way though
diakopter it wouldn't be the sort of thing that would grow to *a p6 implementation*
Tene So everything in a sub is $_foo, and everything in the for loop in the sub is $__bar, etc. 01:29
sorear STD.pm6 treats a role as a set of method overrides
diakopter ok
sorear the role composition operator is: subclass of STD::X * tweak for X -> subclass of STD::X 01:30
diakopter as long as it's correctly covariant...
diakopter blinks
diakopter blinks again
sorear my Class[extends STD] $tweaked = $self.class but unbalanced(')') 01:31
is Class[extends STD] a possible type in CLR-land?
I might be able to fudge it into my STD $tweaked = $self but unbalanced(')')
diakopter are you declaring a class/type or an object 01:32
if class/type, then yes, but not how you're writing it
sorear a variable to hold classes
diakopter ah, ok
sorear does CLR reify classes as objects?
diakopter that's possible too
sortakinda, but perlesque extends that ability more
in C#, you have to express class-as-object with typeof(System.Int32) ( or typeof(int) ) 01:33
but in perlesque, it's just int
there's a detriment to that too, but it slips my mind atm 01:34
what is "$self.class" in your example 01:35
01:37 synth left, synth joined
diakopter sorear: oh, you mean this: 01:38
01:39 cdarroch left, xinming left
diakopter my Type $tweaked = class Tweaked is $self { method unbalanced( ... etc 01:40
sorear: ^^
01:40 [mark] joined
jnthn You can't write a scalar there. :-) 01:41
diakopter I can
jnthn oh, was I not meant to parse it as Perl 6? :-)
diakopter since the type of $self is known/being-constructed at parse-time, the parser can declare/vivify the Tweaked class as a subclass of the class of $self
well yeah, but I don't know whether p6 has a way to alias types 01:42
so I'm just suggesting _some_ way of expressing that the new class being declared derives from the type of $self 01:43
it's a placeholder for whatever correct syntax exists (or will be created)
:D 01:44
in the meantime, I can make perlesque recognize this syntax 01:45
01:47 meppl left
diakopter decommute& 01:47
01:53 snarkyboojum left, whiteknight left
ajs If I have a variable that contains a ResizeablePMCArray and I want to copy it into a full-fledge, honest to goodness Perl 6 Array, how can I do that? 01:54
jnthn ajs: &circumfix:<[ ]> can probably help you
ajs ok
01:55 ethel left, ethel joined 01:57 agentzh joined 01:58 JimmyZ joined
Trashlord hey ddes 01:58
+u
02:07 snarkyboojum joined
lue saluton! 02:09
ajs rakudo: "abc" ~~ /[(b)]?/; say $/[0] 02:10
p6eval rakudo e40ee4: OUTPUT«␤»
ajs rakudo: "abc" ~~ /[(b)]?/; say $/
p6eval rakudo e40ee4: OUTPUT«␤»
ajs rakudo: "abc" ~~ /[(b)]+/; say $/
p6eval rakudo e40ee4: OUTPUT«b␤» 02:11
ajs ?
that's just odd
pmichaud ajs: you said matching the b is optional
so it chooses to match "" at the beginning of the string
ajs I did, but isn't longest matching supposed to win?
02:11 snarkyboojum left
ajs Or did I misread S05? 02:11
pmichaud longest matching wins, yes, but left-most matching wins first
02:12 snarkyboojum joined
ajs A! 02:12
Aha I mean
pmichaud it starts at position zero, tries matching one 'b', fails and backtracks, tries matching zero 'b', succeeds and reaches the end of the pattern and is done
ajs ok, yes
rakudo: "abc" ~~ /a[(b)]?/; say $/
p6eval rakudo e40ee4: OUTPUT«ab␤»
ajs rakudo: "abc" ~~ /a[(b)]?/; say $/[0]
p6eval rakudo e40ee4: OUTPUT«b␤»
ajs that's saner, thanks 02:13
sorear wanders back.
diakopter: yes, the ability to write class definitions generally over superclasses = good enough
02:15 snarkyboojum_ joined 02:16 snarkyboojum left, snarkyboojum_ is now known as snarkyboojum 02:19 snarkyboojum left 02:20 snarkyboojum joined, snarkyboojum left
pugssvn r30879 | sorear++ | [viv] Simplify, de-break, and de-optimize ratchet handling 02:20
02:25 stephenlb left
jnthn was sure we had an RT ticket about bracketed infix operators 02:27
02:27 colomon joined
jnthn rakudo: say 1/7/7/7/7/7/7/7*7 02:28
p6eval rakudo e40ee4: OUTPUT«8.49985975231409e-06␤»
colomon rakudo: say (1/7/7/7/7/7/7/7*7).perl
p6eval rakudo e40ee4: OUTPUT«1/117649␤»
jnthn colomon: Was checking rt.perl.org/rt3/Ticket/Display.html?id=73264 02:29
Which it appears is now fixed
colomon: Also
rakudo: say 5 [+] 37
p6eval rakudo e40ee4: OUTPUT«Confused at line 11, near "say 5 [+] "␤current instr.: 'perl6;HLL;Grammar;panic' pc 528 (ext/nqp-rx/src/stage0/HLL-s0.pir:348)␤»
jnthn huh...not updated yet :-/
colomon jnthn++: I saw the git commit log. \o/ 02:30
jnthn It handles like R[+] and even R[R+] too
Probably will end up having some bug somewhere, but seems so far so good :-)
colomon jnthn: I'll bet moritz_++'s commit bafb6d95ed74f6272fc9 fixed that fraction RT.
:)
jnthn looks
oh! 02:31
Yes, me too
OK, well, I assigned it to moritz++ for spectests. :-)
colomon: How's the Numeric grant/work coming along overall?
colomon I think it's in really good shape.
jnthn Excellent.
colomon++
Not blocking on any role or multi nasties? 02:32
colomon I need to review it carefully (and code review), but I think the only major method area left to worry about is rand and srand.
Probably still need a few more operators.
jnthn You seem to have flushed a bunch of bugs along the way. :-)
colomon most remaining work is probably coming up with improved tests.
jnthn OK, sounds good.
colomon you mean the role issues?
jnthn Yeah
colomon jnthn++ for fixing them. 02:33
jnthn And the Real ~~ Numeric one
colomon but yeah, seems like Numeric and Real may have been the first heavy duty roles used in current master.
jnthn Yeah, good we got those dealt with.
Probably makes masak++'s Stringy journey a little easier. :)
colomon hope so, I'm eager to see Stringy and Buf working. 02:34
jnthn Same. :-)
Very happy somebody has taken it up. :-)
colomon excuse me for a moment, I think I hear my wife calling.
jnthn :-) 02:35
colomon she needed another bottle of milk for the little guy. his sleep schedule is all messed up, probably shouldn't have taken him to the pub last night. :) 02:39
lue :( )
colomon jnthn: anyway, will probably be finishing up the Numeric work next week, unless I get distracted by something else that needs doing for R*. 02:40
jnthn colomon: Wow, talk about starting 'em young. ;-) 02:41
jnthn also has a messed up sleep schedule :-)
OK, sounds good. :-)
Spectesting a fix for 75368 ATM and then I'll attempt sleep. 02:42
We've got up to 640 RT tickets. :-O
colomon jnthn: we went to see a band there, had dinner and then Henry got to see his dad play with the band a bit. :) 02:43
jnthn \o/ 02:46
Sounds very nice :-)
colomon it was cool.
jnthn Mmm...pub food. :-)
colomon > 4 R[-] 5 02:47
1
jnthn :-)
colomon two features added in the last week in one REPL line. :)
jnthn ;-)
lue I remember one time I bought a cheese sandwich in a pub, and gave it to a dog outside [Hitchhiker's text game from Infocom :)]
jnthn misses the Slovak pub noms 02:49
dalek kudo: 51874cc | jonathan++ | src/core/Any.pm:
Fix a spelink fel.
colomon jnthn: did you turn on tests for your grand whatever patch yesterday? how is that stuff tests?
*tested
jnthn colomon: I didn't.
colomon: I was hoping to find an RT ticket for it and didn't and then went to sleep 02:50
colomon any notion where they are?
jnthn Given that we never had them in alpha and I don't think Pugs did them, it may be a case of "if they are". :-)
colomon may be hoping to get another few dozen working tests.... ;)
hmmm... I guess, where are they in the spce? 02:51
*spec?
jnthn Well, if that's what you're up for, I've given a couple of tickets to moritz++ today that you could steal and do the tests for. :-)
almost certainly the test belong in S03.
colomon I really should be going to bed soon, probably (assuming Henry is asleep soon), but I always like seeing new tests work... 02:52
jnthn colomon: A quick search suggests
t\spec\S03-operators\nesting.t
Is worth a look
colomon only has four tests 02:53
jnthn rakudo: say &[+](1, 2)
p6eval rakudo e659dd: OUTPUT«3␤»
jnthn huh, I didn't know that was implemented :-)
At least it's implemented *and* tested. :-)
colomon: Yes, but it has one skipped test that should now pass
colomon jnthn: didn't you do that about a month ago?
jnthn colomon: I figure others can be added in the same kinda way.
colomon: er... :-) 02:54
...maybe. :-)
colomon "others"?
jnthn colomon: more tests
Because is 1 [+] 2, 3, '[+] as an infix'; is hardly coverage. ;-) 02:55
colomon what are you envisioning in nested.t?
jnthn At least test that R[-] works, for example
That is, the bracketed infix forms work with meta-ops too.
Feel free to find a better place though.
pugssvn r30880 | colomon++ | [t/spec] Unfudge test that now works, jnthn++.
jnthn It's just the only one I found of that kind.
colomon hmmm.... does R[-] belong with the tests for [-] or the tests for Rop? 02:56
jnthn Maybe we want tests for bracketed infixes? 02:58
Can call it both ways I guess. :-)
(I meant, all the tests for bracketed infixes together.)
colomon jnthn: (and I was first thinking of tests for * + 2, seems like they belong in S02?)
jnthn: okay, will add some doing it that way. :) 02:59
jnthn Yes, S02 specs that.
colomon you can bracket the metaops too, can't you?
(it works, at any rate!)
jnthn > say 2 [R-] 1
-1
;-)
std: say 2 [R-] 1
p6eval std 30879: OUTPUT«ok 00:01 115m␤»
jnthn Yes. :-)
colomon we need to get out of the habit of say there, I did
> say 4 [R-] 3 03:00
-1
:)
jnthn You've less years of the REPL to unlearn than me. ;-)
03:00 snarkyboojum joined 03:01 eternaleye left
jnthn has since 2007 to unlearn needing to write say ;-) 03:01
PerlJam why get out of the habit? It still does the right thing doesn't it?
jnthn PerlJam: But...but...I could spend the time I spend typing, taking a sip of beer instead.
03:01 eternaleye joined
colomon whoops, toddler sleep fail. gotta go take a stab at putting him to sleep. will try to sneak a few of these tests in in the morning. :) 03:02
o/
jnthn o/
.oO( grr...it's 5am and I'm not feeling especially tired...)
RT 03:03
#75368 fix pushed
OK, going to attempt sleep. :-) 03:04
bbiab :-)
.oO( it's almost sunny outside, night o/ feels wrong! )
03:05
lue good night jnthn o/ 03:06
snarkyboojum good luck sleeping jnthn o/ 03:07
PerlJam good morning jnthn! :)
lue [maybe move to the US temporarily and get a regular sleep pattern :)]
It's 20:00 in PDT
dalek kudo: 63c5a5c | jonathan++ | src/core/operators.pm:
Make ne consistent with !eq and != consistent with !==.
03:08
snarkyboojum likes how useable Perl 6 is becoming with all the work over the last couple of months and a auto printing/working REPL :) 03:09
lue Three day weekend coming up, then I should be able bleed my fingers from coding Perl 6 :D 03:11
03:11 patspam left
snarkyboojum I wonder how helpful/relevant it would be in discussions about "which features you wish were you Perl", to point out how most of the wish list features people are talking about are in Perl 6... 03:14
I find myself doing that more and more, not to proselytize per se, just to point out that they are in Perl 03:15
albeit Perl 6
oops "wish were you Perl" -> "wish were in Perl"
sorear colomon: "to put to sleep" doesn't quite mean what you think it does...
snarkyboojum sorear: my colleague used that phrase the other day about some code we were working on, and we snickered about it happily passing away in it's sleep 03:17
apologies if I'm talking out of context.. too many coffees this morning 03:18
03:18 clintongormley left
PerlJam wonders if sorear had the same thought about colomon "taking a stab at putting the toddler to sleep" 03:19
snarkyboojum anyway, I hope my mentioning Perl 6 in those kinds of discussions doesn't annoy people (wouldn't want it to be counterproductive) - though it seems a valid thing to discuss
whooops - didn't realise that was the context :) 03:20
PerlJam snarkyboojum: I tend to mention Perl 6 features in a Perl 5 context when the Perl 6 solution is interesting or obviously "better" along some axis. 03:25
As long as you don't over do it, it won't be annoying :) 03:26
that's MHO anywya
snarkyboojum PerlJam: aye. fortunately that's quite often the case re interesting or better :)
03:30 xinming joined
pugssvn r30881 | colomon++ | [t/spec] Add two obvious tests we were missing before. 03:45
r30882 | colomon++ | [t/spec] More nesting tests. 03:55
r30883 | sorear++ | [viv] Implement a tree AST reassociation optimizer pass. output is 9.3% smaller! 04:19
sorear I am getting tired of writing visitor boilerplate 04:31
pugssvn r30884 | sorear++ | [viv] Refactor optimizer a bit using a common visitor 04:46
04:47 redicaps joined, redicaps left
Khisanth write something more reusable :) 05:16
05:24 kaare joined 05:25 kaare is now known as Guest17871
pugssvn r30885 | sorear++ | [viv] Strip out AST values that aren't used at runtime - cuts output size by almost half 05:45
05:53 wilx left 06:00 redicaps joined
pugssvn r30886 | sorear++ | [viv] Implement <a>: <b> syntax 06:02
r30886 | STD.pm6 IS NOW TRANSLATED WITHOUT ERRORS
TimToady \o\ /o/ \o\ /o/ 06:03
sorear don't get too excited. perl5 doesn't like the output much
TimToady I'm just very happy that you're taking the ball and running with it 06:04
06:12 BrowserUk left 06:14 rgrau[1] joined
pugssvn r30887 | moritz++ | [t/spec] two unfudges for rakudo 06:15
r30888 | moritz++ | [perl6.org] fix broken link, (John Gabriele)++
06:30 eternaleye left 06:32 Ross joined, mathw joined
sjohnson rakudo: dance if $happiness 06:43
p6eval rakudo 63c5a5: OUTPUT«Symbol '$happiness' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
pugssvn r30889 | sorear++ | [viv] Prototype an additional layer between the regex compiler and Perl5, which will grow into DEEP
06:44 eternaleye joined, ethel left 06:49 Su-Shee joined
TimToady rakudo: say 1 RR- 2 07:12
p6eval rakudo 63c5a5: OUTPUT«-1␤»
TimToady rakudo: say 1 RRR- 2
p6eval rakudo 63c5a5: OUTPUT«1␤»
TimToady rakudo: say 1 R[RR-] 2 07:13
p6eval rakudo 63c5a5: OUTPUT«1␤»
TimToady rakudo: say 1 R[R[R-]] 2
p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
TimToady rakudo: say 1 [R[R-]] 2 07:14
p6eval rakudo 63c5a5: OUTPUT«-1␤»
TimToady rakudo: say 1 [RR[R-]] 2
p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
TimToady rakudo: say 1 [R[RR-]] 2
p6eval rakudo 63c5a5: OUTPUT«1␤»
TimToady curious
zzz & 07:17
07:18 TiMBuS joined
moritz_ rakudo: say <a c b d>.sort: &infix:<Rcmp> 07:20
p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<Rcmp>␤current instr.: '_block14' pc 29 (EVAL_1:0)␤» 07:21
moritz_ rakudo: say 1 [+] 2
p6eval rakudo 63c5a5: OUTPUT«3␤»
07:24 gper joined, gper left
pugssvn r30890 | sorear++ | [viv] A DEEP Optimization - cut combination 07:37
07:39 plobsing_ joined, plobsing left, xinming left 07:40 ejs joined 07:44 xinming joined 07:45 xinming left, ejs left, ejs joined 07:47 xinming joined
pugssvn r30891 | sorear++ | [viv] A DEEP optimization - eliminate many useless 'do' 07:58
moritz_ is DEEP the PAST of viv? 07:59
pugssvn r30892 | moritz++ | [t/spec] test that Rat literals are gone, RT #73264 08:06
08:09 redicaps left
sorear moritz_: sort of 08:14
pugssvn r30893 | sorear++ | [viv] Optimize out more useless do's and factor out sub logic 08:17
08:18 XaeroOne joined
moritz_ Mathematica has a subroutine attribute 'Listable', which makes function autothread over lists 08:22
I wonder how hard it would be to do that with a per-parameter trait in Perl 6 08:23
(as a module, of course)
08:26 clintongormley joined 08:35 dakkar joined 08:36 Intensity left 08:40 mahesh joined 08:41 mahesh left
pugssvn r30894 | sorear++ | [viv] Suppress double whitespace matching 08:41
08:53 XaeroOne is now known as Xaero, Xaero is now known as XaeroOne 08:58 Ross left, Ross joined 09:01 ejs left 09:02 am0c left
sorear hmm. 'Actions.pm' is now my enemy. 09:03
moritz_ why? :-) 09:04
sorear because the right data is going in and the wrong data is going out 09:05
wrong means incomplete, so no downstream workarounds
moritz_ a bug pipe!
09:05 Ross left, Ross joined 09:06 ejs joined 09:17 am0c joined 09:19 jjore left 09:20 codeTraveler___ joined 09:21 codeTraveler___ left
sorear unrelatedly, Actions.pm runs without strict or warnigns. 09:28
09:29 plobsing_ left 09:31 krr joined 09:33 masak joined
masak oh hai, #perl6 09:33
phenny masak: 27 May 22:01Z <jnthn> tell masak at the moment easiest to shift a PMC and then $I0 = $P0 it. We could implement shift_integer and shift_string in ParrotIter though.
masak ah, of course.
masak tries the former 09:34
pugssvn r30895 | sorear++ | [viv] Fix HASH references in concise dumper
r30895 | [Actions] Fix nested capture handling
09:45 ejs left
pugssvn r30896 | sorear++ | [viv] Fix null list pretty-printing 09:45
09:45 ejs joined 09:53 snarkyboojum left
pugssvn r30897 | sorear++ | [viv] Implement $<foo> = <bar> syntax 09:53
09:57 atomicstack joined 09:58 snarkyboojum joined 10:17 yinyin left
pugssvn r30898 | sorear++ | [viv] More fixes for embedded hashes 10:22
masak phenny: tell jnthn lol! gist.github.com/417012 -- it looks right to me, did I just find a Parrot memory bug? 10:25
phenny masak: I'll pass that on when jnthn is around.
10:26 envi^home joined, Ross left 10:30 Ross joined
pugssvn r30899 | sorear++ | [viv] un6 ::X -> 'X' 10:35
10:35 pmurias joined
jnthn morning 10:35
phenny jnthn: 10:25Z <masak> tell jnthn lol! gist.github.com/417012 -- it looks right to me, did I just find a Parrot memory bug?
masak lol jnthn is awake!
jnthn Eww. I'm not looking at that until I've made coffee.
masak probably wise :) 10:36
jnthn goes to negotiate with his favorite kitchen appliance
masak rakudo: say 1 R[R[R-]] 2
p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤» 10:37
masak rakudo: say 1 RR[R-] 2
p6eval rakudo 63c5a5: OUTPUT«Could not find sub &infix:<R[R-]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
masak submits rakudobug
courtesy of TimToady++.
jnthn ah shit. 10:39
masak coffee machine b0rken? 10:40
jnthn ...works after causing...small flood. 10:42
:-|
ooh, my Belgian Perl Workshop talk is accepted. \o/ 10:43
10:43 krr left
jnthn masak: omg 10:44
masak: That's...epic fail.
10:44 JimmyZ left
jnthn masak: Think asking the Parrot folks may be easiest. 10:45
That's going to be perhaps a bit tricky to chase down.
Su-Shee why isn't perl 6 listed here? emerginglangs.com/speakers/ 10:46
10:46 agentzh left
pugssvn r30900 | sorear++ | [viv] un6 invert, miscellaneous fixes 10:48
masak jnthn: I'll ask them after I've investigated exactly where it happened. 10:49
10:49 platypus43 joined 10:50 XaeroOne left
jnthn masak: Wonder if it's reproducable in a pure PIR example. 10:50
masak jnthn: I'll investigate that, too.
pugssvn r30901 | sorear++ | [viv] un6 elsif chains 10:55
sorear calls it a night
perl -c has gotten 10% through viv output
jnthn night sorear o/ 10:56
masak sorear++ # 'night! 10:57
11:01 azert0x joined
azert0x hi 11:01
i've just a little question: why in perl6 it's not as python: do not type ";" at the end of the line, but do indentation? 11:02
it's not a bad idea, at the first view?
m6locks but obfuscation would not be possible then... 11:03
azert0x is it to keep the possiblity to obscure code :)
ok
just i prefer that, in the second view.
Perl6 seem to be harder than Perl5 (i'm seeing perl6.org tuto) 11:04
it's because we can do more things with it, or just because the interpreter change 11:05
masak azert0x: is the question why Perl 6 doesn't use indentation rather than braces to indicate nestedness? 11:06
Su-Shee it's not harder if you treat it like what rubyperl5pythonjavascript can do. only if you get beyond that it's getting new/different.
masak azert0x: a lot of people don't like using indentation for that. TimToady is one of them. I don't much like it either.
azert0x: that said, when it's possible, I'm going to write a grammar modification that allows you to write such code in Perl 6. :)
11:07 FardadJalili joined, FardadJalili left
azert0x ok, i just see more (lost of) things we can do. sorry for my bad english and my little noob question, i'm just a Perl5 little coders, but i use often, and want to know more about the futher: Perl6 -_- 11:08
Su-Shee you _can_ do them. you don't _have to_
11:09 mikehh_ joined
Su-Shee code forcefully using each and every feature isn't automatically better, good or more readable code. ;) 11:10
11:10 mikehh left
Su-Shee also, in a few years, there will be something like "perl 6 best practices" or "rakudo - the good parts" anyway. ;) 11:10
azert0x hum... i see. thanks for you answer! it's clearly for me, now. i'm going to learn more about Perl6 and stay here, so :)
Su-Shee just rewrite what you would do in perl 5 in perl 6 as a first step. actually use classes and methods. play with iterator mechanisms. 11:11
read the moose stuff if you totally don't get it. 11:12
moritz_ back from pizza nom 11:15
11:17 casan joined
moritz_ azert0x: Larry borrows many principles from natural languages; having to end your statements explicitly (with tone in spoken language, and with a fullstop in written language) is much more in line with what we're used to 11:18
azert0x: likewise there's often a semantic difference between no pause at all and a pause (which corresponds to the certain bit of whitespace sensitivy that Perl has) 11:19
but counting whitespaces / measuring pause length isn't applicable in natural languages 11:20
pmurias what's a good CLI interface to enable passing options to backends/frontends 11:22
with the option set being determined on the backends/frontend choosen 11:23
azert0x okay :) 11:24
pmurias reads through 19
azert0x so it's why, partly, Perl6 was born... i see. 11:25
i'm a unix-like system user for 10 years. i started to learn Perl for 4 - 5 years, and never learn Python or Ruby (i think they are not powerfull as Perl in Unix administration), it's why i just enjoy the fact that Perl evolve again. 11:27
pmurias nice S19 specs exactly what i want 11:32
Su-Shee you can do everything in python you can do in perl as an admin; it's really more about _how_ you do things.
moritz_ Turing strikes again :-) 11:34
azert0x yes, i know. has time i studied long and thoughtful about Perl - Python - Ruby and i finaly choose Perl. I did not never regretted. although many of my colleagues (eg community backtrack) I suggested we python.
Su-Shee after a very short period when I thought I should learn Java for jobs, I never looked back and learn only what I want or what I find useful. 11:37
moritz_ that approach has worked well for me too 11:38
Su-Shee I really invest the appropriate time to get a job I really want to have instead. 11:41
rather. not really. 11:42
azert0x I turned to computer security very soon. I think you should know: during my long period of learning (which is still not finished) I really enjoyed this: www.milw0rm.com/author/893 11:43
Afficher en écriture latine 11:45
I am sorry, I'll have to give you a link to my repository: repository.ut4z.free.fr/doc/E-Zines...derground/ ;)
Su-Shee uiuiui a perl underground.. ;)
masak suddenly the channel feels very shady... :)
Su-Shee more or less all security folks I know do perl. 11:46
somewhat different in style compared to us though ;)
12:01 christine left 12:09 ejs left 12:10 christine joined 12:14 ejs joined 12:17 takadonet joined
takadonet morning all 12:17
masak takadonet: \o
12:26 bluescreen joined 12:27 bluescreen is now known as Guest5151, casan left 12:28 JimmyZ joined
pmichaud good morning, #perl6 12:29
jnthn morning, pmichaud
12:29 redicaps joined
takadonet pmichaud: morning 12:29
masak o/
12:31 platypus43 left 12:49 ejs left 12:53 hudnix left 12:57 JimmyZ left
[Coke] masak - looks like r47086 is a fix for you from bacek. 13:00
13:00 Guest17871 left
masak [Coke]: indeed. trying to make it work as we speak. 13:00
13:04 colomon left
masak hm. I need to merge buf into master now. but I'll do it in a buf2 branch first, and if things go well, I'll sync with master. 13:09
jnthn \o/ 13:10
masak: What's in the branch? :-)
masak Str.encode and Buf.decode
jnthn masak: Or will you blog en liten progressrapport? :-)
masak japp :)
that's on today's list of things to do.
jnthn yay!
[Coke] shame we can't buy this for YAPC:
jnthn I haven't blogged for AGES. 13:11
[Coke] www.yousuckatcraigslist.com/?p=4659
13:12 BrowserUk joined 13:16 plobsing joined, JimmyZ joined 13:20 gbacon joined
masak I rebased all of the week's changes into a single commit. 13:24
it's now pushed to master.
dalek kudo: c5fdb17 | masak++ | (4 files):
[Buf] Str.encode and Buf.decode

A bunch of tests now pass in t/spec/S32-str/encode.rakudo.
13:25
jnthn masak: Does ~$foo now call $foo.Stringy?
masak no. not yet.
jnthn k
masak I'll see if I can change that without breaking anything.
13:26 [mark] left, Ross left
moritz_ you probably need something similar to prefix:<+> 13:27
masak hm. also, now that things work, I have my first 'interesting' encoding mismatch: gist.github.com/417142
moritz_ where non-perl6 objects go through the vtable
masak have a look at test 8.
13:28 SmokeMachine joined
masak hm, it would do that if it treated each byte as an individual character... 13:29
13:30 am0c left
moritz_ just verified that the test is correct 13:30
$ perl -CS -MEncode=decode_utf8 -wE 'say decode_utf8(chr(195) . chr(182))' 13:31
ö
13:32 Ross joined, patspam joined, ejs joined
masak I'm starting to suspect that the fix in Parrot also closed off the ability to decode Bufs the way [Coke] originally suggested. 13:32
moritz_ did that test pass in alpha? 13:33
masak no, Buf.decode is new for this week.
it was written yesterday. 13:34
bacek StringBuilder doesn't work with "bytes". 13:36
It always "chars"
masak bacek: ok, so my current code simply misses the point, then. 13:37
bacek: given a list of int values that either are identical to or can be translated to a list of bytes, how can I use Parrot to construct a Str?
13:37 ejs left
bacek masak, what are you trying to do? 13:38
moritz_ the question boils down to "how do I decode a byte string?"
masak bacek: what I just described.
and what moritz_ said.
moritz_ the list of integers/buffers are the UTF-8 representation of a string
bacek ah. 13:39
let me check it
moritz_ fights with Mathematica
13:41 Lorn joined
[Coke] masak: my apologies; I misunderstood your original request. 13:41
masak no problem. it found us a bug :) 13:42
yeah, when I said list of bytes, I really meant a list of *bytes*. I know the word "byte" is very overloaded and sometimes used to mean "character". but I meant "bytes".
13:43 ejs joined
Su-Shee aren't we supposed to mean actual bytes, characters and so on from now on? 13:43
masak at least here in #perl6 :) 13:44
bacek ok. Looks like it's not quite possible with current APIs.
13:44 tomka joined
bacek It's a bad news. 13:44
moritz_ suggests s/bytes/octets/
tomka print "Hiho ;-)";
masak bacek: yes.
bacek But there is good news
moritz_ bacek: uhm, why not? how does IO handle decoding?
[Coke] good news is that bacek the magic coding robot is awake!
bacek moritz_, it's not exposed to HLLs
moritz_ hi tomka 13:45
so it "just" needs exposure?
Su-Shee masak: I personally think the distrinction makes it all easier.
bacek moritz_, not really.
I think about adding .push_byte to StringHandle PMC.
masak Su-Shee: I'm not arguing. of course it makes it easier to have a non-confused model of things.
Su-Shee looks forward for frontends using the bytes/chars/whatevers facitility for sorting mechanisms. 13:46
bacek but it's almost tomorrow here and I can't think clearly. Catch darbelo on #parrot - he is working on NFG and should know about strings 13:47
masak anyway, going from zero to "here's what we're blocking on now" is definitely a kind of progress, and definitely bloggable. :) 13:49
14:01 jaldhar left 14:02 jaldhar joined, meppl joined, viklund left 14:11 ruoso joined
cognominal \o 14:28
masak o/ 14:29
lol I blogged: use.perl.org/~masak/journal/40369
pmurias diakopter: hi
diakopter: see failing test 14:30
jnthn masak-- # not sharing chocolate cake :-( 14:31
masak++ # nice report :-)
dalek meta: r315 | pawelmurias++ | trunk/Sprixel/ (7 files):
remove the sketched Perl 6 runtime classes written in C#
meta: r316 | pawelmurias++ | trunk/Sprixel/t/why-does-that-fail.t:
failing test
cognominal no more taker for speaking at Calais? journeesperl.fr/fpw2010/, mberends is almost signed in.
jnthn masak: +role Buf[::T = Int] does Stringy { 14:32
2
+ has @.contents;
I guess that'll become has T @.contents; at some point - does that not work ATM?
masak jnthn: oh! didn't even try :) 14:34
I'm such a cynic. :P
jnthn++ # suggestion
jnthn awaits a bug report ;-)
14:34 colomon joined
jnthn masak: I feel like I'm missing something somewhere in reading this. 14:35
jnthn re-reads encode and decode
masak jnthn: oh?
jnthn masak: So when we have a Buf of UTF-8, what does it actually mean? 14:36
masak: That is, if I index into the Buf, at what level am I indexing?
masak jnthn: at the byte level, I should think. 14:37
moritz_ dearly hopes so
14:37 SmokeMachine left
jnthn Given öl 14:37
In UTF-8 that's
0xC3 0xB6 0x6C 14:38
masak 195, 182, 108. yes.
jnthn So if I do say "öl".encode('UTF-8').[1] 14:39
I get 0xB6?
masak yes.
moritz_ you get 0xB6
jnthn
.oO( Even if I'm running PPC? ;-) )
oh, B6, not 86
pun fail
masak heh :) 14:40
jnthn masak: OK, I'm now trying to fathom if the code actually does that. :-)
moritz_ sighs
jnthn masak: The bit that's worrying me is in decode 14:41
$S1 = chr $I1
masak well, have you seen the discussion about it here and on #parrot?
jnthn That's presumably only "part" of a character potentially though?
Didn't see the Parrot one.
masak we're aware of the bytes != chars thing.
it's a problem.
jnthn OK
masak I even mention it in the blog post! :P
jnthn I'm not convinced that this wants to be done in terms of chr.
masak didn't you just read it?
was it too long? :) 14:42
jnthn All I can think about is not having cake. :-P
I'm just trying to catch up. :-)
masak jnthn: keep up :P
jnthn How could telling someone to keep up possibly help?
;-)
masak sorry, I meant it in a rather nice way... 14:43
:-)
jnthn <chuckle>
[Coke] it's all my fault anyway for not knowing what masask wanted. =-)
jnthn masak: OK, I think I follow the issue now.
[Coke]: It almost feels like we may need a primitive for "get me the raw bytes that make up this chunk of string data". 14:44
masak on #parrot they suggested a ResizableByteArray.
jnthn [Coke]: I wonder about a PMC that could reference a STRING*
[Coke]: And provide a byte view of it. 14:45
Then we don't have to make a copy of the string.
We can just reference the original
Which, since strings are now immutable, would seem safe.
[Coke] at that point, wouldn't String.bytes() be a way to go?
jnthn Or at least as far as my rusty parrot guts knowledge goes.
[Coke]: Yes, but what would it return?
A PMC like I just described? 14:46
[Coke] something that does array that contains the bytes?
and if it does something sneaky under the covers to avoid byte-ifying the whole string, we don't care.
(but for now, let's just do that.)
moritz_ (or a string in "binary" encoding?)
jnthn $P0 = new ['StringBytifier']
moritz_ shuts up
jnthn $P0 = 'öl'; 14:47
mberends different encodings give different byte sequences for the same string
jnthn $I0 = $P0[1]
masak any such solution would have to parameterize on the actual encoding, since we're potentially interested in... what mberends said.
jnthn say $I0 # 182
[Coke] every String has an encoding, though.
jnthn Yeah, I guess I assumed there, that we have a chunk of memory containing the string encoded that way 14:48
Which wouldn't be the original string itself I guess, once the current NFG work is done.
[Coke] let me back up a sec - is this needed for R* ? 14:49
or is this just NTH?
moritz_ [Coke]: it's needed for masak's gsoc project
jnthn No, not an R* blocker, but...what moritz_++ said.
[Coke] ok. perhaps I'll just sic our GSOC student on your GSOC student (or vice versa) and let them sort it out. 14:50
;)
masak :)
moritz_ though it would be nice indeed to ahve at least some basic binary data handling in R*
jnthn Hey, delegation. :-)
moritz_: Oh, indeed. It's desirable, just not blocking.
moritz_ class Coke { has $.gsoc-student handles <string-tasks>; } 14:51
14:51 JimmyZ left
[Coke] looks like this may be more of a bacek issue. I'll ping him when he wakes up. 14:53
jnthn OK, and I can perhaps quickly hack up a PMC like the one I was mentioning to (as a Rakudo dynpmc initially) if it sounds interesting. 14:55
It's probably a half an hour hack unless I'm missing something.
14:55 plobsing left
jnthn But I don't know it's a long term answer. 14:55
It's nice outside - going for a little stroll. bbs. :-) 14:56
15:00 SmokeMachine joined 15:09 redicaps left 15:10 nnunley left 15:11 nnunley joined 15:12 _kaare joined 15:15 ejs left 15:18 azert0x left 15:19 ejs joined 15:23 tomka left
ajs This makes my life far too complicated: 15:29
15:29 ejs left
ajs rakudo: "abc" ~~ /[ 'a' $<b> = (b) ]?/; $/<b>.WHAT; 15:29
p6eval rakudo c5fdb1: OUTPUT«Method 'WHAT' not found for invocant of class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon pick failures in spectest?
masak ajs: I know moritz_ has been working on fixing that and related issues. 15:30
ajs: rt.perl.org/rt3/Ticket/Display.html?id=73462 15:31
jnthn back 15:32
ajs ah, cool Thanks 15:33
masak jnthn: a half-hour exploratory hack would be much appreciated. :)
fwiw, the #parrot people (NotFound and whiteknight) seem to have converged on a solution they call 'ByteBuffer'. 15:34
jnthn masak: Ah, OK. 15:35
masak: They may beat me to getting to said exploratory hack. :-)
(can't really do it until this evening - want to get some $dayjob finished first)
masak maybe.
I'm about to go home and make nom.
15:35 ejs joined
jnthn omnomnom 15:36
Enjoy :)
masak I might resurface later in the evening, if only for a short while.
thanks :)
o/
jnthn o/
15:36 masak left 15:37 azert0x joined
colomon rakudo: <a b c d>.pick(*).sort 15:45
p6eval rakudo c5fdb1: OUTPUT«Method 'sort' not found for invocant of class 'Block'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon rakudo: <a b c d>.pick(*) 15:46
p6eval rakudo c5fdb1: ( no output )
colomon rakudo: <a b c d>.pick(*).say
p6eval rakudo c5fdb1: OUTPUT«_block46␤»
jnthn :-/ 15:47
rakudo: <a b c d>.pick(*).(Mu)
p6eval rakudo c5fdb1: OUTPUT«No candidates found to invoke␤current instr.: '_block46' pc 317 (EVAL_1:23161569)␤»
colomon rakudo: <a b c d>.pick(OInf).say
p6eval rakudo c5fdb1: OUTPUT«Could not find sub &OInf␤current instr.: '_block14' pc 29 (EVAL_1:0)␤» 15:48
colomon rakudo: <a b c d>.pick(Inf).say
p6eval rakudo c5fdb1: OUTPUT«dabc␤»
ajs github.com/ajs/rakudo/tree/ajslib-URI/ajslib/ -- all tests now pass. I'll add a few more tests tonight and clean up the docs a bit. Then I'm on to... something else? Perhaps I'll write Perl5.pm in my spare time ;-)
colomon jnthn: in pick(*), the * either isn't becoming a Whatever or it isn't matching Whatever.
(in dispatch)
jnthn colomon: How does it match? 15:49
colomon I'm just looking at this:
jnthn colomon: Where is pick implemented?
colomon multi method pick(Whatever, :$replace) {
self.pick(Inf, :$replace);
}
Any-list.pm
jnthn rakudo: multi x(Whatever) { say 42 }; x(*)
p6eval rakudo c5fdb1: OUTPUT«42␤»
moritz_ rakudo: multi a(Whatever) { say "*" }; multi a($) { say '$' }; a(*) 15:50
p6eval rakudo c5fdb1: OUTPUT«*␤»
colomon rakudo: class X { method pick(Whatever) { say 'hello' }; }; X(*)
p6eval rakudo c5fdb1: OUTPUT«Could not find sub &X␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon rakudo: class X { method pick(Whatever) { say 'hello' }; }; X.new.pick(*) 15:51
p6eval rakudo c5fdb1: ( no output )
jnthn rakudo: say 1 ~~ *
p6eval rakudo c5fdb1: OUTPUT«_block46␤»
jnthn Ah. :-)
colomon: I think we need to add ~~ to the "do not curry" list. :-)
colomon: See whatever_curry in Actions.pm - it's easy to add 15:52
colomon jnthn: yes, I reviewed your code when you pushed it. ;) 15:54
compiling.... 15:55
jnthn colomon++
moritz_ is looking for tests
colomon: I have a failing test for it... should I push? 15:58
colomon moritz_: better fudge it, I've still got issues here.
> say 1 ~~ * 15:59
1
but pick(*) still fails.
pugssvn r30902 | moritz++ | [t/spec] smartmatching against Whatever *
jnthn colomon: Guess that must be a seperate issue then...
15:59 ejs left
jnthn colomon: The Whatever candidate certainly doesn't get called? 16:00
moritz_ rakudo: class X { method pick(Whatever) { say 'hello' }; }; X.new.pick(*)
p6eval rakudo c5fdb1: ( no output )
16:00 jaldhar left
moritz_ rakudo: class X { method pick(Whatever) { say 'hello' }; }; X.new.pick(Whatever) 16:00
colomon well, I haven't tried a say in the code, but ...
p6eval rakudo c5fdb1: OUTPUT«hello␤»
diakopter pmurias: I updated my blog post
colomon > <a b c d>.pick(Inf).say 16:01
badc
> <a b c d>.pick(*).say
_block50
diakopter now you have coroutines as well as full continuations
colomon and pick(Whatever) just calls pick(Inf), so that's very suggestive. 16:02
rakudo: say *.WHAT
p6eval rakudo c5fdb1: OUTPUT«Whatever()␤»
colomon rakudo: class X { method pick(Mu $a) { say $a.WHAT; say $a.perl }; }; X.new.pick(*)
p6eval rakudo c5fdb1: ( no output )
colomon :\ 16:03
rakudo: class X { method pickle(Mu $a) { say $a.WHAT; say $a.perl }; }; X.new.pickle(*)
p6eval rakudo c5fdb1: ( no output )
jnthn colomon: does different for me at command line 16:04
oh stf
*w
pmurias diakopter: seen the failing file?
jnthn > class X { method pick(Mu $a) { say "here"; }; }; X.new.pick(*)
_block67
colomon moritz_: well, your new test passes anyway. 16:05
jnthn colomon: Somehow doesn't even make it into the call?!
colomon jnthn: is it currying it?
rakudo: class X { method pick(Mu $a) { say "here"; }; }; X.new.pick(*)(Inf)
p6eval rakudo c5fdb1: OUTPUT«here␤»
jnthn ... 16:06
Yes. How on earth.
moritz_ magically modified singleton?
16:07 ejs joined
colomon I pushed the 1 ~~ * fixed. 16:09
*fix
without spectesting, but I'm pretty sure it makes things less broken rather than more. :) 16:10
pugssvn r30903 | colomon++ | [t/spec] Unfudge moritz++'s new test.
moritz_ jnthn: might be related to RT #75302 (or might not)
jnthn ooooh!
ouch ouch ouch 16:11
diakopter pmurias: checking in your fix now
my fix, I mean
jnthn colomon: Think I know what it is.
lol
colomon \o/
dalek kudo: ac1571f | (Solomon Foster)++ | src/Perl6/Actions.pm:
Don't whatever-curry infix:<~~>.
16:12
mberends moritz_: could you let hugme add contributors to github.com/mberends/fakedbi ?
moritz_ mberends: yes; you need to /msg or mail me your github API key for that 16:13
jnthn colomon: The PAST is...pretty telling :-)
mberends ok
jnthn colomon: Will fix it shortly.
moritz_ mberends: it changes when you change your github password 16:14
16:14 ejs left
moritz_ mberends: and of course you need to tell me how should have meta committing access ("the usual crowd" works fine) 16:15
colomon jnthn: so, if one were to add a test for passing Whatever to a method, where would it go? S06-multi? S06-advanced_subroutine_features? 16:16
moritz_ colomon: S12-something
mberends moritz_: yes, "the usual crowd" wfm
moritz_ method, not sub
colomon S12-methods...
jnthn colomon: It's not multi related 16:17
colomon: S12-methods/instance.t is often the all-sorts place
colomon jnthn: groovy
jnthn++
jnthn
.oO( too much curry...not as tasty as it first sounds )
16:18
[Coke] wishes there was a local place to grab a curry. 16:19
16:19 hugme joined
moritz_ hugme: add moritz to fakedbi 16:20
hugme hugs moritz. Welcome to fakedbi!
moritz_ mberends: looks good
mberends :-) ++moritz_
jnthn hugme: show fakedbi
hugme jnthn: the following people have power over 'fakedbi': PerlJam, TimToady, [particle], colomon, jnthn, masak, mberends, moritz_, pmichaud, sorear. URL: github.com/mberends/fakedbi/
moritz_ it's the hilight spammy feature :-) 16:21
[particle] i wonder if there's a way to make that less spammy... 16:22
jnthn rot13 the names ;-)
[Coke] add spaces.
moritz_ t/spec/S32-list/pick.rakudo .................................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 6/18 subtests (less 2 skipped subtests: 10 okay)
[Coke] P-erlJam
moritz_ hey, what about non-printable characters?
[particle] yeah, let's include the bell 16:23
jnthn .u INVISIBLE SEPERATOR
phenny jnthn: Sorry, no results for 'INVISIBLE SEPERATOR'.
jnthn aww
moritz_ .u INVISIBLE
phenny U+2062 INVISIBLE TIMES (⁢)
[Coke] .u APL
phenny U+2374 APL FUNCTIONAL SYMBOL RHO (⍴)
diakopter .u INVISIBLE SEPARATOR
phenny U+2063 INVISIBLE SEPARATOR (⁣)
moritz_ jnthn: spelling halps :-)
[Coke] spelling FTW.
moritz_ rakudo: say "foo\c[INVISIBLE SEPARATOR]bar"
p6eval rakudo c5fdb1: OUTPUT«foo⁣bar␤»
jnthn lol 16:24
It's lol-compatible too ;-)
[Coke] ... I can still see it. 16:25
moritz_ [Coke]: how does it look like? 16:26
jnthn Here it sorta seems to put a box around the o... 16:27
16:27 ejs joined
moritz_ is open to suggestions for other characters 16:28
16:28 hugme left, hugme joined
moritz_ hugme: show fakedbi 16:29
hugme moritz_: the following people have power over 'fakedbi': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣berends, m⁣oritz_, p⁣michaud, s⁣orear. URL: github.com/mberends/fakedbi/
moritz_ did anybody get hilighted by that? (except mberends, who appears in the URL)
colomon moritz_: not I. how does that work? 16:31
moritz_ colomon: \c[INVISIBLE SEPARATOR]
colomon oooooo
pugssvn r30904 | colomon++ | [t/spec] Add test for the mysterious method call currying. 16:33
16:36 patrickas joined
colomon afk # family all together now. ;) 16:36
[particle] i did not get highlighted. joy! 16:37
patrickas saba7o perlsixers :-)
moritz_ rakudo: my @x = <a b c d e>; say @x.map: *.succ
p6eval rakudo c5fdb1: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: 'perl6;Block;count' pc 549801 (src/gen/core.pir:90607)␤» 16:38
moritz_ rakudo: say (*.succ).params
p6eval rakudo c5fdb1: OUTPUT«Method 'params' not found for invocant of class 'Block'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
moritz_ rakudo: say (*.succ).signature.params
p6eval rakudo c5fdb1: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
jnthn moritz_: I didn't (intentionally) do anything with currying of those. 16:40
rakudo: say (*.foo).WHAT
p6eval rakudo c5fdb1: OUTPUT«Block()␤»
jnthn rakudo: say (*.foo).signature
p6eval rakudo c5fdb1: OUTPUT«␤Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
jnthn Though they evidently need fixing too.
16:41 cdarroch joined, cdarroch left, cdarroch joined
moritz_ takes a look at src/glue/dispatch.pir 16:43
rakudo: say *.succ 16:44
p6eval rakudo ac1571: OUTPUT«!whatever_dispatch_helper␤» 16:45
moritz_ so is the problem that !whatevver_dispatch_helper doesn't have a signature?
16:45 ejs left
jnthn moritz_: I suspect it's return a Parrot sub and not packaging it in a Perl 6 block 16:45
moritz_: Though maybe more sensible is to re-write whatever_dispatch_helper in Perl 6.
moritz_ jnthn: I'll give it a shot
jnthn Put it somewhere in src/glue/ if you do it. 16:46
And probably p6opaque.pmc needs an update.
moritz_ and I guess I have to rename it to something not starting with a !, right?
jnthn aye
16:50 ShaneC joined, ShaneC left, pmurias left
awwaiid is blizkost the current/only way to do perl5 from rakudo? 16:55
moritz_ you can also pipe CSV between the two processes, one perl 5, one Perl 6 16:58
jnthn Blizkost is probably the best bet. 16:59
It's the curernt suggested way to go, at least.
moritz_ jnthn: my local patch changes the Null PMC access to segmentation fault :-) 17:01
[Coke] that's not a good thing. :P
moritz_ I guess that maybe it doesn't find the Perl 6 sub 17:02
17:02 aesop left
moritz_ #0 0x00007f00cafcd963 in Parrot_P6opaque_find_method () from dynext/perl6_group.so 17:04
jnthn moritz_: Did you update it?
moritz_ jnthn: yes
jnthn (P6opaque)?
Did you mark the sub "our" so it is put in the namespace too?
moritz_ yes 17:05
jnthn (P6opaque finds it that way)
Ah
OK, I guess it's maybe...a little less easy.
:S
lisppaste3 moritz_ pasted "failed attempt..." at paste.lisp.org/display/105735 17:06
17:07 ruoso left, dakkar left
[Coke] perlbuzz.com/2010/05/how-to-shuffle...-perl.html 17:07
jnthn moritz_: Hmm...now we can probably consider passing the name is as an argument rather than setting a property 17:08
I suspect the fail is somewhere related to that. 17:09
Instead of 17:10
VTABLE_setprop(interp, method, name_str, boxed_name);
Do like 17:11
PMC *call_sig = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
VTABLE_unshift_pmc(interp, call_sig, boxed_named);
Or something like that.
Then you get $name as the first argument to the Perl 6 sub
17:11 aesop joined
jnthn And it may be a bit happier. 17:11
(Parrot used to make it hard to do this, thus the properties approach, but now we can modify call sigs easily...) 17:12
17:12 SmokeMachine left
jnthn afk for a little bit 17:14
sorear TimToady: How hard would it be for STD to associate names in the AST with definition sites? 17:18
17:19 stephenlb joined 17:20 masonkramer joined
pugssvn r30905 | sorear++ | [viv] Translate parameterized role invocations 17:21
dalek meta: r317 | diakopter++ | trunk/Sprixel/ (5 files):
[perlesque] committing broken code; don't svnup to this revision
17:22 perlperson joined
perlperson who else here thinks we should rename Perl 6 to Perl++ 17:22
17:22 TiMBuS left
moritz_ oh man, we've discussed this way too often already 17:23
pugssvn r30906 | sorear++ | [viv] ... and fix a regression on non-parameterized roles
perlperson because the Perl 5 folks are stuck noow
now
with like Perl 5.78.9
moritz_ they aren't any more stuck than before
and renaming Perl 6 wouldn't make them unstuck 17:24
because people would still associate the name "Perl 6" with what we call Perl 6 today
bad luck.
perlperson and nobody will want to use Perl 5 because they will perceive that it is stale because of the crazy version numbers
sorear sighs
moritz_ that's just crap
emacs is also stuck at 2.$hugenumber of years 17:25
or decades
perlperson yeah, and for that reason everyone uses vim now
moritz_ if version numbers are our biggest problem, we're really lucky
patrickas moritz_: why is emacs stuck ? do they have a similar story to perl6 ? 17:26
moritz_ patrickas: nope; I think they just figured that they don't want to change their major revision number anymore
patrickas suggests perl 5.14 drops the 5. from the version number, this way they'll be ahead and we'll have to catchup :-) 17:27
moritz_ hey, Perl 5 still has numbers for about 490 stable releases left 17:28
Su-Shee moritz_: I've _just_ wanted to ask :)
moritz_ even if they increase the pace to two stable major releases per year, they won't run into any technical problems for a ridiculous long time 17:29
17:32 ruoso joined
pugssvn r30907 | sorear++ | [viv] Translate shorthand match variables 17:33
lisppaste3 moritz_ annotated #105735 "second attempt" at paste.lisp.org/display/105735#1 17:35
moritz_ still segfaults :(
the pir::printerr is never reached 17:36
pmichaud fwiw, printerr is now a dynop 17:39
moritz_ I know, but it's loaded in Compiler.pir
17:39 moritz_ sets mode: +o pmichaud, moritz_ sets mode: +vv pugssvn lisppaste3, eternaleye left
pmichaud perlperson: the arguments you present have all been heard before. I'm not saying they're wrong -- just that they seem to be insufficient to convince many more people to change. 17:41
moritz_ especially Perl 5 doesn't gain anything from renaming Perl 6
the name will still taken in the people's minds 17:42
pmichaud moritz_: oh, that argument I might be able to agree with. Perl 5 might gain something by renaming Perl 6 (but it wouldn't gain the ability to be "Perl 6")
17:42 masonkramer left
moritz_ s/agree/argue/ ? 17:42
pmichaud but renaming Perl 6 to something else might make it clearer to uninitiated that Perl 5 isn't a dead-end. 17:43
but just because a renaming might help Perl 5, doesn't automatically mean it would help Perl. 17:44
17:45 masonkramer joined
pmichaud I still think that Perl 5 ought to find a way to break out of the trap that any "next version" would have to be called "6". One thing is clear (at this point), Perl 5 doesn't get to claim the entire mantle of the name "Perl" for itself forever. 17:46
17:47 PZt left
moritz_ and neither will Perl 6 17:47
pmichaud correct.
"Perl" is larger than either 5 or 6.
moritz_ ponders making a book release
pmichaud rakudo: say 'perl' gt 5|6
p6eval rakudo ac1571: OUTPUT«any(Bool::True)␤»
pmichaud see, rakudo agrees with me :-) 17:48
moritz_ :-)
pugssvn r30908 | sorear++ | [viv] Implement basic 'has' translation
pmichaud regardless, I think most of us working on Perl 6 basically gag at the name "Perl++" 17:49
17:49 BrowserUk left
pmichaud I know that I do. 17:49
moritz_ same here
pmichaud so someone that says "Perl 6 should change to '...'" really needs to propose a name that most of us would like far better than the one we already have -- something much nicer than "Perl 6". :-) 17:50
jnthn Me too.
pugssvn r30909 | sorear++ | [viv] Oops, that needs to be moose_has
pmichaud otherwise we're likely to say "no thank you, we like our current name better than '...'" 17:51
(I'm guessing that perlperson is no longer actively monitoring the channel. Oh well.)
patrickas not that it would matter but I think even if someone did find a "better" name, I think we got used to / got attached to the one we have so it wouldn't be easy, 17:52
17:52 envi_home2 joined
pmichaud patrickas: oh, I don't know about that. I *really* like the name "Rakudo Perl" :-) 17:52
in many ways I like it better than "Perl 6"
(I also like that I get to use both :-)
17:52 [particle]1 joined
patrickas ok then i'm probably wrong :-) 17:53
pmichaud by way of comparison, I also really like the names "Strawberry Perl" and "Vanilla Perl"
moritz_ not a matter of wrong and right
pmichaud for some reason, "Strawberry Perl" always strikes me as being a much friendlier and more mature thing than "Perl 5" 17:54
it's like someone finally took this thing known as "Perl" and figured out how to market it to a wider audience.
patrickas well I mean obviously the name "Rakudo" came much later than perl6 and if people like it more than plain "perl 6" it means I was wrong in my theory. :-)
I have to admit that I LOVE theit webpage too .... 17:55
pmichaud right
patrickas their
pmichaud by way of analogy: "Perl 5" and "Perl 6" strike me as being like "Buick 4" and "Buick 5"
(or substitute whatever make/model scheme you want there) 17:56
17:56 SmokeMachine joined, envi^home left
pmichaud anyway, these are mostly the same-old arguments, I'm hoping someone brainstorms a new one someday. :-) 17:57
Su-Shee I take everything as long as it doesn't get a nuisance like stallman and his "it's GNU/Linux!" 17:58
pmichaud yeah, I always felt that was a weak sort of argument 17:59
pugssvn r30910 | sorear++ | [viv] Handle twigilled variable assertions in regexes
17:59 masonkramer left
Su-Shee sorear: are you finishing viv today? :) 17:59
pmichaud iiuc, the whole point of free software is that I can take your free code and use it to build my own bigger thing, as long as I make the code available. There's nothing in the contract that says I have to market your name as well as mine.
Su-Shee pmichaud: I only know of exclusing clauses - like qmail. "take it, change it, do whatever you want, but don't call it qmail anymore" 18:01
pmichaud so what if Linux was built using a bunch of GNU tools? That collection of GNU tools on their own in no way make them into "Linux"
Su-Shee excluding.
pmichaud: I'd say it's about recognition in case of GNU
pmichaud Su-Shee: yes, that's essentially what I'm saying too. To me that just smacks of insecurity. 18:02
or greed.
Su-Shee I agree. as if literally being installed everywhere isn't just enough.
mberends it's going for global attention domination 18:04
pmichaud anyway, I find the name "GNU/Linux" about as appetizing as names like "Java/OpenOffice", "PHP/PmWiki", "CPAN/any-significant-Perl-application", etc.
Su-Shee pmichaud: php/fi? ;) 18:05
pmichaud Su-Shee: :-)
moritz_ (FWIW only a very small part of OpenOffice is actually written in Java)
pmichaud anyway, just because I write a Perl application using huge parts of CPAN shouldn't imply that CPAN has to be in the name of my application. No matter how successful it becomes. 18:06
I think the same is true for Linux and GNU tools.
*Perl application where significant portions come from CPAN 18:07
Su-Shee actually I'm hoping that the fuzz about p5/p6 stops some day when both are used on a regular base (or both went into blissfull oblivion ;)
pmichaud Su-Shee: I'm sure it will. Until then, I just tell people to read mst++'s excellent blog post about the whole issue. :) 18:08
off to lunch
diakopter buries a time capsule so the next generation knows to do that.
Su-Shee oh, and what I wanted to mention in the first place before this discussion started again: more and more people asking on #perl for perl6. and many of them consider it as "should I learn python or perl 6?" which I find really interesting.
alester [Coke]: What made you post that perlbuzz link? 18:09
pmichaud ...perlbuzz link?
alester 1:02 ago
pmichaud follows the buzz
oh, you mean "pick"! :-) 18:10
moritz_ the next one, probably
jnthn Ooh, it's stopped hailing. 18:12
jnthn can go for dinner without getting drenched now :-)
bbiab 18:13
alester pmichaud: I still don't understand 18:14
pmichaud alester: "shuffle" is called "pick" in Perl 6 :-) 18:15
alester Why?
Or does pick get one at random?
shuffle actually reorders the list
pmichaud pick gets n at random
moritz_ rakudo: say <a b c d>.pick
p6eval rakudo ac1571: OUTPUT«d␤»
moritz_ rakudo: say <a b c d>.pick(*)
p6eval rakudo ac1571: OUTPUT«_block46␤»
pmichaud @list .= pick @list, *
moritz_ bah
currently broken 18:16
moritz_ curses
pmichaud alpha: say <a b c d>.pick(*)
p6eval alpha 30e0ed: OUTPUT«dcab␤»
18:16 SmokeMachine left
pmichaud alpha: my @list = <a b c d>; @list .= pick(*); say @list; 18:17
p6eval alpha 30e0ed: OUTPUT«bdca␤»
pmichaud (I don't know the answer to your question of why Coke++ posted the perlbuzz link :-)
pick also allows random selection with replacement 18:18
alpha: my @list = <a b c d>; @list .= pick(15, :replace); say @list;
p6eval alpha 30e0ed: OUTPUT«cbdcdcbcdbdbddb␤»
18:19 patrickas left
pmichaud and, of course, .pick(*, :replace) gives an infinite list of random selections :-) 18:19
(at least it will once we get laziness implemented properly.) 18:20
moritz_ phenny: tell kraai that I've merged his 'book' branch with lots of typo corrections. Thank you very much!
phenny moritz_: I'll pass that on when kraai is around.
Su-Shee you're starting to sound like offering the menu to guests :)
sorear TimToady: Where in viv is the code which turns %X{'a'} into $X{'a'} ?
moritz_ rakudo: say <a b c>.pick(*, :replace).batch(10) 18:21
p6eval rakudo ac1571: OUTPUT«ccaacabbcb␤»
moritz_ pmichaud: works today, it seems
pmichaud moritz_++ 18:23
afk, lunch
dalek ok: 70acc5b | (Matt Kraai)++ | src/operators.pod:
Fix the "operator; x" index entry.
18:23 dalek left
moritz_ colomon++ more likely :-) 18:23
18:23 dalek joined 18:31 meppl left 18:34 awwaiid left
saaki doh 18:36
mdxi hyst got my first tshirt since coming back to my old job. thought some of you might appreciate the sentiment: mdxi.tumblr.com/post/641115787/yessssssssss 18:37
s/hyst/just/ # middle finger fencepost error
18:38 Woody2143 joined
moritz_ :-) 18:39
pugssvn r30911 | sorear++ | [viv] Common $OPT_log so Actions can use it 18:42
18:43 jrtayloriv joined
pugssvn r30912 | sorear++ | [viv] Fix duped output in --log 18:44
jrtayloriv I'm failing several of the spectests for the latest git revision -- pastebin.ca/1873454 -- don't know if this is useful ... just thought I'd let ya'll know. 18:47
18:48 SmokeMachine joined
[Coke] alester: I posted here because I figured someone would post the p6 oneliner that replaces it. good chance for marketing. 19:14
19:14 BrowserUk joined
alester well, good idea for perl101 at least 19:15
where I want to have p5 and p6 equivalents of everything
[Coke] perl101? 19:16
alester perl101.org
19:18 clintongormley left
[Coke] yah, was trolling for the infobot that i forgot doesn't exist here. purl++ 19:18
19:26 hercynium joined 19:28 envi_home2 left 19:34 jrtayloriv left
moritz_ can I somehow trace vtable calls in parrot? 19:36
[Coke] sure, if it's written in PIR. 19:37
moritz_ it is
[Coke] if it's a C based vtable... you probably need callgrind. 19:38
moritz_: then you can put a "trace 1" in the vtable to start, and trace 0 to end.
19:44 diakopter left
sorear resorts to perl -d:Trace viv 19:44
19:45 TimToady left 19:46 colomon left
mathw Evening 19:49
jnthn o/ 19:50
moritz_ has "fun" with vtables
mathw has had "fun" with wooden knives at aikido
jnthn Are they actually any use for cutting stuff? 19:51
mathw also a few moments of "fun" with my face and the floor meeting each other with some rapidity
nah
but they poke
and the knife disarms tend to be painful
jnthn Sounds like an evening of ouch. 19:52
mathw yeah but it's fun ouch 19:53
moritz_ and at the same time probably strangely satisfactory
mathw I got my blue/white belt today
jnthn Nice :-)
moritz_ congratulations
mathw Sensei said "well done, now you're nearly ready for the big boys' class where we get to kick your ass"
this is also strangely satisfactory
moritz_ so, I have a set_pmc_keyed_int vtable that delegates to postcircumfix:<[ ]> 19:54
and I call that on an array
jnthn *nod*
moritz_: A Perl 6 array?
moritz_ yes
and I end up with an Any type object in $!rest (class Seq) 19:55
and I don't even find the place where that $!rest attribute is ever set
jnthn moritz_: Well, probably just that
rakudo: class Foo { has $.rest; }; Foo.new.rest.say 19:56
...
moritz_ jnthn: but if there's no location in the whole rakudo codebase that sets $!rest to a defined value... why do have it?
jnthn is confused 19:57
"have an Any type object in $!rest"..."defined value"?
Or do you mean, nowhere ever sets $!rest to anything else?
moritz_ right
I see that it's get set to null in some cases (in method !fill) 19:58
jnthn That may well be so - I'm not sure if our Seqs and Arrays are completely lazy yet
Parcel is
19:58 TimToady joined
moritz_ for now I'll work around it 19:59
by testing for rest.'defined'()
jnthn moritz_: What's the actual problem, though?
moritz_ that it dies
it calls rest.'get'()
jnthn Ah
moritz_ which it can't, if rest is Any 20:00
jnthn How is the array being created?
Array.new ?
moritz_ my $x = [3, 4]
Q:PIR {
$P0 = find_lex '$x' $P1 = box 'newstring' $P0[2] = $P1
};
now with my workaround that doesn't die anymore 20:01
let's see if it brought us closer to match objects...
ack shows that 'rest' (+ word boundaries) only appears in Seq.pir, apart from a comment 20:02
alester moritz_: You did that with "-w", right? :-) 20:03
moritz_ alester: yes
alester whew
20:03 TimToady left
pmichaud Seqs and Arrays are still terribly wrong 20:07
moritz_: shall I see if I can get us real match objects? 20:08
moritz_ pmichaud: that would be awesome
pmichaud: the mob5 branch works for named, non-quantified captures 20:09
pmichaud iiuc, the main problem with the existing match objects is that the arrays aren't really Rakudo arrays and the hashes aren't really Rakudo hashes?
moritz_ right
and that $/.uc doesn't work
pmichaud that part is very fixable. 20:10
let me update my rakudo repo and see what I can do quick-ish.
moritz_ so I thought :/
20:14 wasy_ joined 20:15 wasy_ left
sorear pmichaud: I'm having trouble with the (ideal, not Rakudo) semantics of Seq and lazy lists 20:18
Under what conditions is map eager?
pmichaud map is never eager.
map returns a lazy list, which in void context gets evaluated eagerly 20:19
sorear what is void context?
pmichaud okay, sink context. :-)
sorear sink context confuses me
pmichaud basically, sink context is when the result value of a function/expression/statement is guaranteed not to be used
for example
sorear my $list = $infinite-list
the result value of the &infix:<=> is guaranteed not to be used 20:20
moritz_ rakudo: say my $x = 3
pmichaud sorear: oh, interesting point.
[Coke] buubot: seen audreyt?
buubot [Coke]: I don't think I've seen audreyt?.
jnthn Aye, but then the my isn't in sink context.
moritz_ uhm, where's p6eval?
[Coke] buubot: seen audreyt
buubot [Coke]: I don't think I've seen audreyt.
sorear jnthn: what context IS it in? 20:21
pmichaud jnthn: is the result of the assignment in sink context?
arnsholt Does that mean you can't do $a = $b = $c?
[Coke] who owns perlcabal.org ?
jnthn pmichaud: Hang on, which example? :-)
pmichaud jnthn: here:
my $a;
$a = $infinite-list
is the assignment in void context?
[Coke] yay dig.
jnthn pmichaud: Yes. (more) 20:22
pmichaud: I think this is where the :pure annotations in STD help us not to do the wrong thing though.
moritz_ I think assignments and bindings need special-casing
pmichaud looks
jnthn moritz_: It may just be that the :!pure is that special casing, though. 20:23
pmichaud what is :pure, ooc?
hadn't seen that yet, it must be new-ish
but yes, we could say that we don't do sink context on operators that are :!pure
jnthn I'm still trying to fit the full picture of it into my head. It's also related to our ability to say "useless use of foo in sink context" though. 20:24
sorear function calls are :!pure
so what about sub { return $infinite-list; } sub()
jnthn sorear: Return value of the sub would then be in sink context. 20:25
pmichaud jnthn: except that invocations are apparently :!pure
jnthn Gotta be for sub foo { for 1..100000 { .say } }; foo(); # to do its thing
pmichaud and we just said that :!pure means no sink context
jnthn Ah. :-/
moritz_ I don't think function calls should be :!pure 20:26
pmichaud constant %methodcall = (:dba('methodcall') , :prec<y=>, :assoc<unary>, :uassoc<left>, :fiddly, :!pure);
jnthn yeah, just noticed that one.
Hmm.
OTOH, we don't want to go warning about useless use of function call. :-)
pmichaud I think it may need to be more than a binary proposition 20:27
we have sink context warns
jnthn Yeah
pmichaud sink context doesn't warn
jnthn It's not always the same thing.
sorear jnthn: how is 'for' dependant on sink eagerness?
pmichaud and not sink context
sorear: for maps to .map
for @list { ... } is equivalent to list(@list).map({ ... })
jnthn sorear: What Pm said. And in the example I gave, it's the last thing in the block, so that means within the sub it's not in sink context. 20:28
pmichaud (as in *exactly* equivalent, according to the current thinking on #perl6)
jnthn To the point of "compiles down to a call to map" equivalent.
sorear this suprises me 20:29
I would have expected for to run eagerly and return the last value from the block
jnthn It sinks in after a little bit.
pmichaud regardless, the for statement is intended to be lazy in exactly the same way that .map is lazy
no, return value from a for is the result of each invocation of the block -- i.e., it's a list
sorear doesn't like sink context eagerness
pmichaud i.e., 'for' returns a list (the same that .map returns a list)
jnthn pmichaud: Anyways, the "it's not binary" thing sounds along the right lines. 20:31
pmichaud: Not sure if that implies we want two different flags though.
pmichaud could be a flag with multiple values
jnthn aye
or :sunk ;-)
pmichaud e.g., the same way that :assoc<...> has multiple possibilities
jnthn = is already sunk
:-)
20:32 TimToady joined, Limbic_Region joined, tedv joined
pmichaud TimToady: we could use your reflections on irclog.perlgeek.de/perl6/2010-05-28#i_2378871 20:32
tedv Where is the official spec for the pack/unpack functions? The S32-Str entry on it is remarkably sparse on how the new token syntax works, and all that I found on google was some RFCs from 2000. 20:34
Example: dev.perl.org/perl6/rfc/248.html
pmichaud tedv: pack/unpack functionality is still quite speculative at this point 20:35
20:35 p6eval joined
tedv that explains the lack of specifations and tests for it 20:35
Su-Shee cool. I can just think about it and it works? ;)
pmichaud tedv: a lot of it is in synopsis 9, but is listed as "compact structures"
jnthn I suspect masak++ may look at some of that as part of his GSoC grant.
tedv Is "compact structures" a superset of data packing, or a different name for it? 20:36
pmichaud see svn.pugscode.org/pugs/docs/Perl6/Sp...-data.pod, search for "Compact structs"
tedv I see 20:38
That's more of a high level "this is how things should work"
pmichaud right
20:38 diakopter joined
tedv basically you want full control over packing in memory 20:38
which is important for optimization, obviously
pmichaud but essentially the idea is to move away from pack/unpack as function calls and instead you declare the exact structure you want
tedv would pack/unpack exist as ways to get data into/outof a compact struct though? 20:39
it feels a bit artificial
pmichaud The packing serialization is performed by coercion to an appropriate
buffer type. The unpacking is performed by coercion of such a buffer
type back to the type of the compact struct.
(from S09)
tedv I guess sometimes you are doing quick-and-dirty programming and don't want to define a whole structure just to read something that's like... an int, two characters, and another int 20:40
sorear is now confused by the dba/class handling
tedv Hmmm well I was looking for some helpful work to do over the weekend and was planning on spec tests for pack/unpack. There are lots of cases which need defining and it doesn't require understanding much else of the system. 20:41
but it seems like that's not an awesome choice anymore, since the spec isn't well defined.
anyone have suggestions for other introductory tasks? 20:42
sorear tedv: you could try defining the spec
not long ago, somebody wrote S32-temporal as an introductory task
tedv Hmmm that's probably a good idea
sorear (they bounced several drafts off perl6-compiler@)
tedv will take more than a weekend 20:43
alright, I'll look at that. I suppose I should sign up for perl6-compiler emails sometime too
moritz_ and perl6-language, if you like bikeshedding :-)
tedv I'm pretty pragmatic. I'd just like to get things working 20:44
pmichaud aliases perl6-language to perl6-bikeshed in his mail client. 20:45
moritz_ tedv: that's a helpful attitude
tedv only if it actually generates results! 20:46
"liking to get things done" is not the same as "getting things done"
not to be pedantic or anything. :)
moritz_ well, usually you can find areas where getting things done works pretty well
like, writing tests 20:47
tedv yeah
20:47 pmurias joined
mberends tedv: I could use the help of a tester for FakeDBI 20:47
jnthn mberends: Is it ready for testing? ;-) 20:48
*excited look*
tedv What's FakeDBI? section of code that pretends to operate as a real database?
mberends yes, the CRUD operations seem stable enough.
jnthn mberends++
diakopter weird; I guess i was offline for an hour
mberends github.com/mberends/fakedbi
passingg over 80 P5 DBD::mysql tests locally now 20:49
20:50 wasy joined
jnthn \o/ 20:50
20:50 wasy left
mberends tedv: it's real, just not the DBI v2 that's planned for Parrot 20:50
20:51 rv2733 joined
mberends just pushed another update 20:53
sorear pmichaud: What is the status of lexically aware rakudo repl?
pugssvn r30913 | sorear++ | [viv] Use STDERR more consistently for diagnostics 20:56
r30914 | sorear++ | [viv] Correctly translate postcircumfixes on method calls 21:01
pmichaud sorear: I still want to refactor YOU_ARE_HERE a bit. If you wanted to pick up from where I left off (and base it on what I have for NQP), I'd be glad to look at that. 21:04
your idea of checking for an outer context and using that to decide what to do is exactly the direction I thought we should go in. (and get rid of $*IN_EVAL) 21:06
anyway, I'm not likely to get to it again until tonight or tomorrow sometime, so if you want to beat me to it, I think I'm likely to accept a patch from you :)
pugssvn r30915 | moritz++ | [t/spec] refudge a test for rakudo; one test fails, but it did not work before anyway 21:07
r30916 | moritz++ | [joyofsix.org] skeleton for website
21:08 whiteknight joined
sorear I'm not likely to get back to it today either; I'm still on the trail of a different shiny thing 21:16
21:19 Ross left
pmichaud sorear: either way, I expect one of us will get to it soonish. Right now I'm focusing a bit on match objects for moritz, and then I'll either do repl, closures, or lists. 21:24
moritz_ just brought thejoyofsix.org online, and has no idea what exactly to do with it 21:26
diakopter moritz_: when're you gonna do something with perlblog.org
moritz_ another domain I forgot *sigh* 21:27
originally I wanted to set up something like blogs.perl.org 21:30
but never came up with sufficient tuits/motivation
Su-Shee moritz_: it'll get some content when some content just wants to be put on that domain.
moritz_ content's not everything; we need a design too 21:31
21:34 Guest5151 left
jnthn can only imagine how a "joy of six" logo design contest could end. :-) 21:37
pugssvn r30917 | sorear++ | [viv] Translate my ($x, $y); correctly
TimToady sorear: line 1117, if you didn't find it already 21:39
mathw jnthn: 3.bp.blogspot.com/_YNb9r6Pzxks/SMjQ...er-six.jpg like that :)
21:39 moritz_ sets mode: +oo tedv diakopter, moritz_ sets mode: +o TimToady
pugssvn r30918 | moritz++ | [joyofsix] add camelia favicon 21:41
21:43 dju_ is now known as dju
sorear TimToady: yes, it took me a while to figure out what Actions.pm was doing with dba 21:43
TimToady made it to San Diego with the quiz team. fortunately they still seem to have the GuestWIFI set up here... :) 21:46
21:47 rv2733 left 21:50 Guest5151 joined
sorear Where in San Diego? 21:53
21:53 ruoso left
TimToady Point Loma Nazarene University 21:54
which, oddly, is on Point Loma
21:54 patspam left
sorear opposite side of the city from me, then 21:55
TimToady you can probably here the band from there though; I think it's playing at about 230db 21:58
I've been handing out free earplugs, knowing it would be that way :)
21:59 pmurias left
TimToady (it's not just a quiz meet...) 21:59
pragma_ I can here the band from hear. 22:00
TimToady I can't spell "hear" right when I'm wearing earplugs 22:01
22:02 dual joined
sorear not over a pair of 7 year old case fans I can't 22:03
the gimme5 regex ~ implementation is confusing me
it seems to only ever have worked because of a fortuitous accident involving the ratchet optimization
TimToady could well be 22:05
the backtracking code is not heavily stressed by STD
diakopter winces 22:07
22:12 meppl joined 22:14 PenThrive joined
sorear TimToady: Will there be any pitfalls in rewriting ~ a b into [ :my $*GOAL = b; :lang(...); a [ b || failgoal ] ] ? 22:17
a bracketed subexp with decls
TimToady I don't see a problem offhand, but then I've been blindsided by any number of don't-see-a-problems over the years... :) 22:19
sorear after gimme5 is dead I'm looking forward to doing a proper refactor of RE_ast 22:20
TimToady sure, I've always thought that that would be in conjunction with the refactor of the TRIE logic toward parallel NFA 22:21
the current string concat approach is just a prototype
sorear I've got a plan that I think will get us half the benefit 22:22
but it'll need a full study of the existing code first
TimToady it was more important to me to see the patterns as they evolve than that they be fast
sorear yes
debuggability is important
TimToady by the way, the new viv output is real purty
bbl & 22:24
22:25 awwaiid joined, patspam joined 22:29 gbacon left 22:31 pausenclown joined 22:33 alester left
pugssvn r30919 | sorear++ | [viv] Redesign and correctly implement regex ~ 22:37
pausenclown rakudo: say "{ for 1, 2, 3 { print } }" 22:38
p6eval rakudo ac1571: OUTPUT«get_string() not implemented in class 'ArrayIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
pausenclown rakudo: std "{ for 1, 2, 3 { print } }"
p6eval rakudo ac1571: OUTPUT«get_string() not implemented in class 'ArrayIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
pausenclown std: say "{ for 1, 2, 3 { print } }"
p6eval std 30918: OUTPUT«Potential difficulties:␤ Unsupported use of bare 'print'; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument at /tmp/3Yz5JY9oLp line 1:␤------> say "{ for 1, 2, 3 { print⏏ } }"␤ok 00:01 115m␤»
pausenclown std: say "{ for 1, 2, 3 { .print } }" 22:39
p6eval std 30918: OUTPUT«ok 00:01 112m␤»
pausenclown rakudo: say "{ for 1, 2, 3 { .print } }"
22:39 M_o_C joined
p6eval rakudo ac1571: OUTPUT«123get_string() not implemented in class 'ArrayIterator'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤» 22:39
pausenclown mmh. thats supposed to work, right?
sorear right 22:41
er
it sortof works
for returns a lazy list
this lazy list gets stringified in the {}
and that's not quite implemented
pausenclown what about 22:42
22:42 Targhan joined
pausenclown ah no, it cant be nested. 22:43
sorear passed 10K lines accepted 22:44
pugssvn r30920 | sorear++ | [viv] Our output requires features 5.010
22:45 jferrero joined
sorear Something I don't quite follow in the Perl 6 treatment of contexts - why isn't my $a = @a; @a = $a; a no-op? 22:47
pausenclown check this out: 22:52
rakudo: my $a = 1; my @a = 2, 3; say $a.perl; say @a.perl; $a = @a; say $a.perl; @a = $a; say @a.perl
p6eval rakudo ac1571: OUTPUT«1␤[2, 3]␤[2, 3]␤maximum recursion depth exceeded␤current instr.: 'parrot;P6object;HOW' pc 54 (runtime/parrot/library/P6object.pir:97)␤»
sorear Not helpful.
I don't want .perl, I want a rules laywer. 22:53
pausenclown i expected the fourth value to be [[2, 3]]
basically u get bitten by 'magic' (de)?referencing. 22:54
jnthn sorear: Because putting an array in scalar context and putting a scalar in list context are not exactly the opposite of each other.
pausenclown like when u say $a = 1, 2, 3 and $a holds an array.
jnthn (Becase the $ says "don't flatten me")
sorear jnthn: I don't understand contexts very well
jnthn: What is scalar context? 22:55
jnthn OK, it's called "item context" now really. :-)
sorear jnthn: if $foo and @foo are the same value, what do they do differently when referecnce?d
jnthn $foo has a a "I don't flatten" flag on it.
Or @foo has a "I flatten" flag
sorear I have my implementor hat on. Simplistic explanations like that are fine for programmers
jnthn Forget exactly which way around we have it in Rakudo at the moemnt.
sorear hrm 22:56
jnthn I think the first.
sorear And what does that flag affect?
jnthn Yes, we *really* do have a flag on the container saying whether it's going to flatten or not.
22:56 masak joined
jnthn When something is put in list context (usually by calling .list on it), then it affects whether it flattens or not. 22:56
lawlitsmasak
sorear I thought that .list was called on the value, not the container
jnthn No, captures are "symbolic" in a sense. 22:58
pmichaud @foo has a flatten flag on it
pausenclown yeah, and why does @a = $a; above end up in a deep recursion?
pmichaud antyhing without the flatten flag doesn't flatten
masak ahoy, #perl6!
jnthn Otherwise is rw wouldn't work.
pmichaud: Heh. We did have it the other way around once, no? :-)
masak: dobry vecer :-) 22:59
pausenclown gives masak a cookie
pmichaud jnthn: yes
jnthn pmichaud: Heh. I can't keep track. :-)
masak has finally ported GGE to Rakudo master
jnthn pmichaud: Though given you're refactoring all of that again soon, maybe I'll wait a bit to catch up. ;-)
masak: Yay!
pmichaud .list always "flattens"
22:59 _kaare left
jnthn masak: Was it epic pain? 22:59
pmichaud note that list context is not .list
list context is &list()
TimToady it's supposed to be .flat 23:00
masak jnthn: it was more work than I would have guessed.
23:00 Psyche^ joined
pmichaud okay, .flat (I'm still out of date with latest spec changes) 23:00
items with the flatten flag will flatten in list context
jnthn didn't know about .flat either :-/
pmichaud items without that flag will not
the difference is with something like
jnthn Is .slice for non-flattening list context?
er, slice context
:)
sorear So, when I say @foo, I'm actually talking about the container? 23:01
23:01 patspam left
jnthn Or what's that one called? 23:01
sorear: Yes
pmichaud my @a = <a b c>; my $a := @a; say (@a, $a).elems
sorear And value extraction only occurs when the container is put in item context?
pmichaud even though $a and @a are the same object, @a is flattening while $a is not
jnthn masak: Main difficulties being...?
pmichaud (so the result of the above would be 4)
sorear pmichaud: That doesn't make sense 23:02
pmichaud sorear: that's the spec.
masak jnthn: I'll probably blog about it soonish. but the main difficulty was that it was a large set of small changes in a big codebase.
pmichaud sorear: I didn't make that part of the spec -- I've been trying to cope with it for years.
jnthn masak: ah, ok
masak: near-death by a hundred cuts, as such.
sorear pmichaud: I'm not complaining. I'm confused.
pmichaud flattening versus non-flattening behavior is determined by the container, not by the value. 23:03
sorear I want to understand what I'm implementing
masak jnthn: and it takes a while to run the test suite, which slows down even small refactors.
jnthn masak: Aye.
23:03 Patterner left, Psyche^ is now known as Patterner
sorear pmichaud: but after $a := @a, the containers are the same, no?, so how can they have different flattening behaviors? 23:03
pmichaud I'm getting spectest fails in master... are these known?
sorear: no, the containers are not the same 23:04
$a and @a are still different
they're separate containers referring to the same value
sorear I thought := was container assignment
pmichaud it's binding
23:04 rml_ left
jnthn pmichaud: In pick.t? 23:05
pmichaud that's one of them
also in advent2000-day19
sorear so, after $a := $b, the containers are bound, but remain distinct as objects?
pmichaud and 99problems-21-to-30
sorear: yes. It's the same with subroutine parameter binding, too.
sorear pmichaud: so this is what ObjectRef is for *lightbulb*
pmichaud my $a = 4; sub xyz($b) { say $b; $a = 5; say $b )
sorear bound containers... 23:06
pmichaud it's also why binding isn't a simple "store_lex ..."
in my example above, $b is readonly, while $a isn't
yet they still both refer to the same value
jnthn pmichaud: Very possibly the same underlying thing.
pmichaud jnthn: I continue to work under the assumption that := will ultimately work the same as parameter binding. 23:07
oh, sorry, wrong topic :)
you're saying all of the failures are likely the same underlying problem
jnthn pmichaud: I was commenting on the test...yes. :-)
pmichaud okay, I guess it's a known failure though. I started working on match object changes for moritz++ and said "huh? how did my changes cause these failures...?" 23:08
23:08 BrowserUk left
jnthn pmichaud: I have what I can only fathom is a bizzare compiler quirk with the (very old) MS VC++ on my desktop. Since all works great on my laptop, but I get a bunch of test fails on my desktop even with clean checkout of everything. 23:09
Turns out I fail pick.t here even before my changes that broke it for everyone else.
pmichaud okay.
sorear It All Makes Sense Now.
jnthn is currently attempting to build under a newer compiler. ;-)
sorear Now excuse me while I implement :=.
pmichaud :-)
:= is likely going to require a bit more than simply setting up objectrefs, though -- I suspect it impacts autovivify 23:10
but a good first cut might be to simply establish the objectrefs :-)
and then see what breaks
jnthn pmichaud: Aye, that's very possible.
pmichaud: Having our own binder makes this easily playwithable. :-)
pmichaud jnthn: correct.
sorear: you'll also run across places where we have Perl6Scalar as well as ObjectRef 23:11
those are left over from a time when we were trying to distinguish flattening by the type of reference
turns out that it's not quite that simple, and having a flag property ends up being the way to go. So I don't know if we still need a separate Perl6Scalar type, but haven't bothered to try to clean it up to find out until we get list laziness and flattening all worked out in the first place. 23:12
pugssvn r30921 | sorear++ | [viv] Implement flattening (very crude)
sorear Perl6Scalar has a huge difference from ObjectRef, AIUI
Perl6Scalar is mutable
a "rw" ObjectRef still propagates = to its inner
a "rw" Perl6Scalar changes its inner on = 23:13
pmichaud oh, that may indeed be the difference now
I haven't looked at that code since February.
so many of the details are confused in my brane
sorear How did that detail use to work?
pmichaud I honestly don't remember (more)
there have been at least four separate implementations in Rakudo of container, list, and flattening semantics 23:14
each implementation has resulted in a change to the spec, invalidating the implementation and requiring another redesign
sorear wow, jumped all the way ahead to 43%
jnthn The check was an isa of some kind.
pmichaud in February I was in the middle of the latest set of dealing with issues when medical issues intervened
jnthn I think Perl6Scalar implied "do not flatten"
iirc.
pmichaud yes, at one point Perl6Scalar implied do not flatten
sorear also, ng 23:15
pmichaud that's no longer the case
it's the flattening flag on the outermost reference that controls
23:15 SmokeMachine left
pmichaud thus: my $a = <a b c>; my @a := $a; 23:15
and: my @a = <a b c>; my $a := @a; 23:16
both know how to flatten properly
(@a always flattens, $a never flattens)
pugssvn r30922 | sorear++ | [viv] Translate 'note' 23:17
pmichaud jnthn: .pick(*) seems to be what is failing here. 23:18
jnthn pmichaud: Yup
pmichaud: The currier is...a little overeager.
pmichaud: Turns out methods calls show up in EXPR with a label POSTFIX too. 23:19
I didn't expect that. :-)
pmichaud well, of course :-)
jnthn :-P
pmichaud they *are* postfixish
TimToady but the * isn't what they're a postfix of
unless you say *.pick
jnthn TimToady: Aye, it's doing something very wrong. :-) 23:20
23:20 BrowserUk joined
pmichaud jnthn: which part is doing the wrong thing? ;-) 23:20
is it the curry-code, or the expr code?
jnthn pmichaud: The curry code.
pmichaud: Just a bad assumption. :-)
pmichaud okay, good, I'm off the hook :-)
sorear hmm
pugssvn r30923 | sorear++ | [viv] Translate True and False
sorear I'm getting lots of 'TOP redefined' errors'
but.. TOP is only defined once 23:21
s/TOP/$method/
diakopter backtracking... making it redefine things it sees again?
sorear no
Perl5 errors
Subroutine xblock redefined at STD.viv.pm5 line 28719.
diakopter hm 23:22
pmichaud jnthn: yes, whatever_curry is too eager. :-)
diakopter someday I'll understand all the container/reference discussions
maybe I'm just scared to admit my tentative understanding could be correct.
or otherwise in denial. 23:23
jnthn pmichaud: I figure checking in the 2-arg case that we have a call rather than a callmethod node may well do it.
pmichaud: Alternatively, I could check that .name starts with postfix, infix or prefix.
pmichaud jnthn: that feels like a wrong test also
jnthn Rather than checking the LABEL
pmichaud I'd like to see whatever_curry have an argument that says how many things to check for currying
in the case of prefix and postfix, the limit should be 1
in the case of binary infix, the limit would be 2
i.e., prefix and postfix should only ever check the first child for whatever-ness 23:24
jnthn pmichaud: Ah, and then EXPR decides what to pass there?
That'd work.
OK, I'll do it that way.
pmichaud that just feels more likely if we ever do currying on :assoc<list>
and we know that in the case of prefix/postfix we only want to curry $0
jnthn *nod* 23:25
pmichaud (because they're unary)
jnthn hmm, I wonder if...
rakudo: my $x = *.[1]; my @y = 1,2,3; say $x(@y)
pmichaud it's also probably important to do it that way for when we ultimately start handling adverbs on operators
p6eval rakudo ac1571: OUTPUT«2␤»
sorear oh
I see
STD.pmc from gimme5 is being loaded into the same interpreter
jnthn pmichaud: I've tried to work out how on earth those are parsed...and failed. 23:26
pmichaud jnthn: yes, it's on my list, I know
I'm glad my schedule is finally clearing up so I can work on those :)
jnthn pmichaud: Sure, I was more curious than planning to do it.
oh yay, it looks like using a later compiler is going to make my test run *much* cleaner.
pmichaud afk for a bit 23:27
23:27 PZt joined
sorear passes 30K lines parsed 23:28
diakopter how many to go?
30K lines of what? STD.pm6 isn't that long 23:30
sorear 30K/65K lines of sandbox/STD.pmc have made it through perl5
STD.pm6 itself is already fully translated, but some of the translations are wrong to the point of not parsing 23:31
(incidentally, viv's output is considerably smaller than gimme5's)
23:32 ShaneC1 joined, ShaneC1 left
pugssvn r30924 | sorear++ | [viv] Fix phase error in submatch handling inside argument lists 23:38
23:46 BrowserUk left
jnthn spectests fix for $embarassing_bug 23:59