gaal i want to change Pipe.open to return an IO in scalar context, and (IO, Process) in list context. any cries of horror? 00:00
hmmm, actually, what does that make of the 'returns' clause in the signature? it doesn't quite return List in that case, does it? 00:02
how do you specify context-aware return values to subs?
mrborisguy do you mean: given want { when List { ... }; when Scalar { ... } }? 00:08
gaal that's how you implement them. how do i write the signature?
beh, sorry. 00:09
multi sub open (Str $command, ........) returns IO
mrborisguy gaal: oh, i figured it was too advanced for me, but i thought i'd throw it out there anyway ;)
can't you junction?
i thought i saw that somewhere
returns IO|List
(i could easily be wrong) 00:10
gaal hmm, it doesn't return a junction, that looks weird to me
could be someone overloaded the syntax, though.
okay, checking in Pipe::open2 and open3; no change to open for now 00:11
mrborisguy that's where i saw it... look in the S29 draft and search for keys
gaal s06 and e06 don't seem to mention it. 00:14
mrborisguy gaal: yeah, i don't know what to tell you then 00:17
gaal thanks. i'm asking p6l
theorbtwo Oh, mrborisguy, don't forget to add yourself to AUTHORS when you check in. 00:19
seen Aankhen``
jabbot theorbtwo: Aankhen`` was seen 3 hours 47 minutes 16 seconds ago
gaal he went to sleep 00:20
theorbtwo I'll catch him some other time. 00:21
Or perhaps he wanted AUTHORS to have no info expect his handle.
mrborisguy theorbtwo: alright 00:23
i'll do it next time if check anything in 00:24
gaal if i'm already in package Foo, is there a difference between saying "sub Foo::bar() {...}" and "sub bar() {...}" ? 00:35
theorbtwo Not that I'm aware of, gaal. 00:40
broquaint One is explicit and one is implicit but the behaviour is exactly the same.
gaal (was just asking because that's the way some funcs were specced in S29.)
Chewie[] "Label number 2 out of bounds." - What in the world could that mean? 00:54
(Parrot error, putting source online.) 00:55
home.chewie.info:8080/~chewie/base64/base64.pasm
gaal omg, it's 4:00am. i should sleep :) 00:56
theorbtwo G'night, gaal.
Chewie[] later. heh.
gaal isn't very tired, but has $work in a few hours
well, i'll do the prudent thing (or was the chance to do that four hours ago?) 00:57
&
theorbtwo can't figure out how to write the castV of instance Value Exp. 01:00
I've got castV exp = VObject (createObject (mkType "Code::Exp") [("theexp", exp)])
However, createObject wants to output a m VObject, and VObject wants to take a plain VObject. 01:01
Also, the output of the whole thing wants to be a plain Val, not an Eval Val.
theorbtwo hopes autrijus' bit ends soon. 01:05
broquaint Anyone know what's with pugs on feather spew a load of perl5 code? 01:11
01:13 theorbtw1 is now known as theorbtwo
mrborisguy broquaint: i get it too, but no. 01:18
i don't know what's up
broquaint I think pugs is having a quirky day.
sri_ is there a FindBin equivalent? 01:20
broquaint In what, sri_? 01:21
sri_ in perl6/pugs?
i just need the actual directory 01:22
meppl gute nacht 01:28
theorbtwo Gutte nacht, meppl.
meppl ;) 01:29
theorbtwo G'night. 01:52
kelan theorbtwo: to pull the VObject out of `m VObject` you need to do some binding 02:11
castV exp = do
obj <- (createObject ...)
VObject obj
but you'll need to return something 02:15
broquaint ?eval sub f(*$a,*$b,$c,?$d=sub{ qq/got: {@_.perl}/}) { qq/$a,$b,$c,{$d.perl}/ } my@a=1..3; f *@a; 02:16
Lacking an evalbot the output is: 1,2,3,\undef 02:17
Why isn't $d defaulting properly? Bug or my inability to use perl6? You decide!
kelan maybe defaulting doesnt work for code refs yet? 02:19
what do the splats do in front of the scalar args? 02:20
broquaint A hack so the args slurp properly. 02:21
I don't understand the need for them really, but if you don't have them the signature doesn't match properly.
Defaulting does seem to work on subs but not in this particular case. 02:22
kelan i thought you only needed to splat the calling arg. the `f *@a;` in this case
broquaint So did I :/ 02:23
pugs -e 'sub f($a,?$b=sub{say qq/foo: $_[0]/}) { $b.($a) }; f q[bar]' # outputs - foo: bar 02:24
kelan hmm
maybe its all the splatting? something weird happening with that 02:25
i really have no idea, tho:)
broquaint I reckon so.
Ditto.
kelan what happens when you call it 3 explicit args instead of splatting an array? 02:26
broquaint Maybe I should update some of the subroutine tests ...
*** No compatible subroutine found: "&f"
Unless you take out the splats, in which case it works. 02:27
kelan heh 02:28
i really think the splats are wrong. you shouldnt need them in the signature
broquaint Nor do I. 02:29
I think splattiness isn't working quite right in pugs.
kelan but saying splat in a way related to programming is fun 02:30
broquaint Absolutely. 02:32
Juerd Good localtime 02:37
Juerd goes to bed now.
Bye
broquaint goes for sleep before brain teh splode 02:38
kelan the problem with saying good localtime is that you don't know if it's a greeting or a goodbye
sproingie just say aloha 02:49
02:52 khisanth_ is now known as Khisanth 03:37 robkinyon_ is now known as robkinyon
obscurite Hello. Can anyone suggest a good summer project for the google summer of code thingy? I wouldn't mind hacking some perl6. Had trouble parsing the todo list myself :) 03:52
obra obscurite: what skillset do you have?
sri_ please port modules! :) 03:53
obscurite obra - I've done c, c++, asm on an undergrad level, a touch of professional experience. I've had lots of on the job perl, java, and scripting.
My proposal has to be for a project I can spend a couple of months on. 03:55
sri_ porting whole cpan sounds like a couple of months... ;P 03:56
obscurite you just need an autoporter... wait. maybe you need backwards compatibility
;)
obra obscurite: nod.
hm. autrijus should reappear in a few hours.
mugwump well, we've got a perl5 <-> perl6 bridge, but it's pretty deep magic..
obscurite: here's a good one. Write a YAML parser using Perl6 rules. 03:57
obscurite mugwump - what would it be used for?
mugwump lots and lots of things :) 03:58
sri_ i'd love to see mason ported 04:00
obscurite Both ideas noted
mugwump svn://tangram.utsl.gen.nz/trunk/YAML-Lite/lib/YAML/Lite/Grammar.pm is the grammar in Perl 5, well slightly. The rules implementation wouldn't be much longer or look much different from that 04:03
except with rules it might stand some chance of working ;) 04:04
based on www.yaml.org/spec/
obscurite mugwump, do you currently do perl yaml? 04:05
mugwump ingy's the yaml-meister
also WhyTheLuckyStiff has an implementation 04:06
obscurite yeah, Syck w/ perl binding 04:07
Khisanth <sri_> please port modules! :) <- been wondering about that, is there an actual list or is it more of "All of CPAN"?
mugwump well, depending on who you ask, you'll get a list of the modules they use the most ;) 04:08
sri_ Khisanth: just ask me! :) 04:09
woah, Cwd.pm is such a mess... 04:11
Khisanth sri_: so ...
sri_ and i need it for File::Find::Rule :(
oh cute, File::Spec already has cwd! 04:23
stevan sri_: we have a cwd implemented through Haskell 04:24
File::Spec::cwd
in Prim.hs
sri_ nice
stevan eventually we maybe need to port it, but it works in Haskell for now :)
sri_ Parrot should provide it ;) 04:25
stevan exactly :)
obscurite if parrot can host ruby, why does the mono project want to host ruby? 04:32
stevan why can't they both host it? 04:33
obscurite I guess it's apples and oranges. 04:34
stevan theoretically when we have a good enough code generator, we could port perl 6 to Mono too
(although IIRC the CLR does not handle MI very well, or at least not easily)
obscurite Yeah, that was my _implied_ question :)
stevan it's just another VM when it comes down to it
mugwump hey, if Haskell can run on the JVM anything's possible 04:35
stevan hey mugwump
mugwump hi stevan 04:36
stevan obscurite: the CLR is not built/designed to handle dynamic languages as well as Parrot is/will-be
it is optimized more for C#, etc. 04:37
more static languages
obscurite Thanks for the clarification. 04:40
stevan sri_: ping 05:07
sri_: just FYI, the ext/Tree module is a port of the perl5 module Tree::Simple (which I noticed is used by Catalyst 05:09
sri_ stevan: already noticed :) 05:13
autrijus reappears 05:28
mugwump hey. be warned I've changed perl5.c
obra hi autrijus 05:29
mugwump (cosmetically)
autrijus sure. thanks
hey obra
hey obscurite. 05:36
obscurite Hola :)
gaal i'm getting many, many of these on win32 during make smoke: 05:37
pugs.exe: 1: runProcess: does not exist (No such file or directory)
obscurite So far, perl6-mason and perl6-rules-yaml have been suggested to me as perl foundation grant ideas. (for google summer of code)
gaal i suppose this is parrot not being found
autrijus obscurite: what is p6-rules-yaml? 05:38
gaal: yup, could be.
obscurite: a YAML implementation based on p6rules?
obscurite nods
It seems like the Syck stuff will be in the core though?
05:38 ChanServ sets mode: +o autrijus
obscurite So i'm not sure how practical. 05:38
gaal obscurite: i suggest rich ASTs, so that you can do things like reliably produce normal ASCII source code from code that has unicode ops 05:39
among other interesting applications
autrijus obscurite: what kinds of things are you interested in? :)
mugwump hmm, that seems a little ambitious gaal :)
autrijus ?eval $?PUGS_VERSION 05:40
evalbot6 No code to eval given.
autrijus ?eval 1
obscurite I need something an experienced perler or not so experienced c/c++/asm programmer could do in a couple of months of hacking while studying at the same time.
evalbot6 1
gaal and that would know to change 􏿽xBB to >> in perl but to, uhhh, whatever the \N{unicode name} is in a quoted string.
obscurite something with lasting utility, that could become useful quickly 05:41
gaal mugwump, worth 45 hundred bucks fer sure.
this has many useful applications, but the code canonicalization is really important:
autrijus obscurite: syck may be core pugs (and easily made core parrot), but an independent implementation based on Rules will likely exercise PGE a lot 05:42
gaal diff won't work without it.
mugwump diff already works well on unicode
gaal i mean, it *works*
autrijus obscurite: as gaal said, PPI6 is also a worthy goal that will make many people happy
SamB diff goes line-by-line! 05:43
obscurite writes things down
gaal but it is limited
SamB it works fine with utf8
mugwump but I must recommend making sure that whatever it is you undertake is clearly defined :)
autrijus obscurite: although if you choose to do it with p6rules (i.e. write down Perl 6 grammar in Perl 6 rules)
obscurite: then it will definitely have a great impact on the bootstraping process
gaal another example: i want to grep for <<+>>
autrijus ...except I think it's part of TPF's grant description (the pmichaud part) already... 05:44
gaal but i don't remember if it spelled it 􏿽xAB1􏿽xBB
errr, 􏿽xAB+􏿽xBB
obscurite <gaal> obscurite: i suggest rich ASTs, so that you can do things like reliably
produce normal ASCII source code from code that has unicode ops
<gaal> among other interesting applications
*<* Signoff: geoffb ("Leaving")
<autrijus> obscurite: what kinds of things are you interested in? :)
autrijus ooh flood
gaal: what's wrong with a simple tr// based solution to that. 05:45
obscurite curses at putty to those who have not yet ignored him
autrijus obscurite: that's fine, we only see 5 lines
gaal the weak answer is that it would have false positives
autrijus that's quite week and maybe you _want_ those false positives :)
s/week/weak/
I'd like a refactoring browser though. 05:46
port HaRe to Perl6.
that will rock.
gaal the strong answer includes "code browsing" and hand waving.
autrijus but that far exceeds the two-month span
it's easily a master thesis :)
obscurite Thanks, I have a bunch of things to research now. 05:47
autrijus obscurite: I think mason6 will generate a lot of goodwill :)
and it gets you playing with modparrot and other wonderful things 05:48
gaal autrijus, what would it take to do the whitespace preservation thingie in the AST?
autrijus plus it's clearly doable in 2 months
gaal: we already do that
gaal: you can simply calculare intervals (missing tokens) between Pos
gaal: and do a rescan to find them out 05:49
gaal we do!? then my transformation can almost happen now.
autrijus that of course assume you have a copy of source code amount
s/amount/around/
gaal have a AST dumper that's guaranteed to show quoted sctrings with escaped unicode
and an AST -> perl6 parser 05:50
autrijus er. 05:51
no
you write a Pugs.Compile.Perl6. 05:52
that's your ast->perl6 parser
gaal :D "hello" 05:53
:D 'hello'
they output the same thing 05:54
for any sane application other than this, this is a good thing :)
SamB that sounds like an extra-ugly-printer... 05:55
gaal anyway, i should go to $work. 05:56
the added info should go in the data structure, i'm not proposing the translation actually go through text
later. &
autrijus gaal: "rescan" :) 05:57
SamB starts to think his ToHsExp thing is not going to work beyond the simplest things... 05:58
SamB knows he is too tired to figure that out now, though.
gaal what's "rescan"? (i'll backlog) 05:59
Khisanth how difficult would it be to implement 1..10:by(2)? :) 06:00
autrijus gaal: rescan means to look at the interval in Pos 06:01
and read back the source code
between coordinates
Khisanth: you want to take a stab? 06:02
I don't see an easy way to do that :) 06:03
and I'm not sure if it applies to 1+2:by(3)
or
Khisanth heh not before I find out how you are suppose to do get 5,4,3,2,1 :)
autrijus 1==4:foo<bar>
Khisanth s/do//
autrijus reverse(1..5)
surely?
Khisanth I never liked that 06:04
autrijus 5..1:by(-1) then.
Khisanth so where is the general area is should start stabbing? I think I'll try tomorrow. I need an excuse to do something with Haskell :) 06:05
autrijus Khisanth: ok. you can start by implementing a generic "range" op 06:06
Khisanth that isn't already in?!
autrijus Khisanth: not afaik
the curr impl is all based on ++
so you can do
'a'..'z'
I have _no_ idea if 06:07
'a'..'z':by(-1)
will work.
or how else to make it work
'z'..'a':by(-1) rather
so a generic range op that takes three Val (begin, end interval) is a good start
then you can introduce a special parse rule
that parses range and delegate to that 3ary op 06:08
finally we try to think a way to integrate it into the expression parser table in the correct precedence
that's all
obscurite is catching up on Pugs 06:11
autrijus :)
japhy I'll have a rudimentary perl 6 rules parser by friday 06:13
with some cheating, of course. variable and code-block parsing will be iffy.
autrijus that's fine 06:16
japhy++ # fan tas tic
japhy yay for me.
g'night
autrijus nite!
sri_ there's no FindBin yet, right? 06:17
autrijus sri_: right. write one!
sri_ mkay
obscurite sri, was perl6-mason your idea?
autrijus chuckles.
sri_ obscurite: mhm 06:18
it would rock
obscurite Okay, forgot who it was. :)
autrijus ponders uploading Pugs 6.2.6 with cpan-upload.p6 06:20
that would be nice publicity
or at least fun ;) 06:24
scook0 ahoy! 06:46
obscurite hi 06:47
06:51 castaway_ is now known as castaway
autrijus mugwump: please use "return Int" etc for now 06:59
the "int" type is not in class tree
and so will trigger subtle weird bugs
?eval $?PUGS_VERSION
evalbot6 No code to eval given.
autrijus ?eval eval '$?PUGS_VERSION'
evalbot6 No code to eval given.
mugwump autrijus: noted, thanks 07:00
?eval "$?PUGS_VERSION" 07:01
evalbot6 No code to eval given.
mugwump ?eval [+] 1..5
evalbot6 No code to eval given.
luqui hmm?
that looks broken
nothingmuch morning 07:02
luqui morning nothingmuch
scook0 autrijus: I'm looking at Haddocking Context.hs at the moment... I was wondering how much of the current behaviour is consciously designed, and how much is just hacked together
nothingmuch brb, reboot
autrijus scook0: 0% is consciously designed. 07:03
100% is hacked together.
scook0 autrijus: thanks
autrijus scook0: only deltaType needs to remain. everything else want sto be rewritten using Data.Graph or something else.
scook0 ah
autrijus I think that part of code is ~day 13 or so 07:04
and had not been touched since
scook0 is deltaType supposed to be returning large positive numbers for types that are actually incompatible?
autrijus that is a open design question.
it is that way because we want
'1'+'2'
to work
scook0 I see
autrijus without having to define <+> as Scalar Scalar 07:05
I think I did think of leaving a compatibleTypes as remedy
to specify things that are fundamentally uncastable
scook0 I think I'll just document the current behaviour for now
autrijus nod. it is a mess. it really wants a rewrite.
scook0 with a caveat saying "this may or may not be wise"
autrijus you can kill the "may or"
scook0 'junctivate' turned my brain inside-out too :)
autrijus I asked something about Str->Int casting on p6l
luqui still thinks that the '1'+'2' thing is elegantly solved by making '1' both a Str and an Int at the same time
autrijus but no rulings came down
scook0: "junctivate" is actually sane 07:06
luqui whereas '1a' is just a Str, so gives an error
autrijus luqui: oh and 'Inf' is a Num
scook0 oh, it's sane, it's just that it's so abstract
luqui not sure about that one
autrijus and '1e-1' is a Complex
luqui: and other weird corner cases :)
er, never mind about the Complex thing. thinko
luqui well, it is a complex 07:07
it's just a Num also
:-p
luqui thinks about it some, and decides that '1e-1' should still be a Num, even though it might be unsettling 07:08
scook0 autrijus: btw, is 'countTree' supposed to be ignoring leaf nodes?
mugwump 1i-1 perhaps you mean? :)
or 1ie0+1e0 07:09
luqui probably 1e0i+1e0
mugwump was trying to find the Complex literal equivalent of the /eieio operator
luqui oh
autrijus scook0: it doesn't really matter, but no. 07:10
scook0: if you can fix it so it counts the whole tree, that's fine
scook0 autrijus: it's a one-char fix, so I'll bundle it in when I ci my docs 07:11
doesn't really make any practical difference atm
autrijus k 07:12
Corion "make test" now takes ages - I should do a clean checkout it seems ... 07:15
luqui what does a clean checkout have to do with it? 07:16
Corion luqui: "make clean" doesn't
castaway looks at Corion.. (at home today, what?)
Corion castaway: Yep - working from home ;) 07:17
castaway ha, I'm so clever :)
Corion (resp. fighting our DNS as it doesn't work when trying from home :( )
castaway hmm, reminds me, must figure out why by home dialin is failing 07:21
luqui ?eval "working?" 07:22
evalbot6 No code to eval given.
castaway guess not ,) 07:23
07:27 sekimuraway is now known as sekimura
luqui ?eval "evil working?" 07:29
evileval No code to eval given.
evalbot6 No code to eval given.