pugs.blogs.com/dist/Perl6-Pugs-6.2.13.tar.gz released! | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com
Set by audreyt on 17 October 2006.
00:11 glasser joined 00:37 systems`` joined 00:47 vel joined, systems`` left
audreyt xinming: your .close change somehow broke 200+ tests... 01:01
lambdabot audreyt: You have 1 new message. '/msg lambdabot @messages' to read it.
audreyt I'll take a look after nap
@messages
lambdabot lanny said 2h 54m 50s ago: You'll want to check the smokes for Win32. r14463 (just before GHC threading turned on) has 2 failures and after 231 (including having to kill pugs by hand on 2 test to
continue).
audreyt @tell lanny it's not me, it's xinming... 01:02
lambdabot Consider it noted.
01:05 ferreira left
Limbic_Region audreyt - what's your next timezone anyway? 01:09
audreyt brazil
Limbic_Region perlbot .bz 01:10
perlbot .bz is Belize
eviltwin_b .br :)
Limbic_Region ah
01:23 justatheory joined
audreyt repaired 01:27
svnbot6 r14480 | audreyt++ | * Pugs.Types: IO::Dir is not a subtype of IO, really...
r14480 | audreyt++ | * Pugs.Prim: Socket::close and IO::close should be two different things.
audreyt @tell xinming never mind, fixed
lambdabot Consider it noted.
eviltwin_b don't think you @tell-ed him to start with; only a snark to lanny 01:29
audreyt that's correct. 01:32
@tell lanny never mind; fixed :)
lambdabot Consider it noted.
audreyt sorry for the snarky tone; intense sleep deprivation does that for a person... 01:33
eviltwin_b enh. actually I think I was being snarky there (but same comment; was up until 3am yesterday then got up earlyish today. mmm, weather futzing with my head) 01:34
xinming audreyt: sorry for my rudeness about introducing that bug... >_< 01:36
lambdabot xinming: You have 1 new message. '/msg lambdabot @messages' to read it.
xinming @messages
lambdabot audreyt said 9m ago: never mind, fixed
audreyt xinming: no, it's actually not your bug; it's that IO::Dir was incorrectly considered a subclass of IO
but that's wrong because $dir.say doesn't do anything meaningful 01:37
your change is fine :)
xinming en, thanks.
audreyt (it just revealed an existing bug)
xinming BTW
while we pass the variable to perl 5, is $a sames as \$a while we pass it to perl 5 please? 01:38
hmm, I mean from Pugs
The bugfix you fixed yesterday for me seems treat $a and \$a are the same 01:39
my $a; $t.process("hello", $v, $a); which would act as $t.process("hello", $v, \$a); 01:40
audreyt well it depends on what the other side wants
if it wants something it can write back (as is the case for .process)
then it's rw
in which case $a will work too 01:41
I think, anyway
01:43 prism joined
xinming is confused about this small difference... 01:44
so, you mean, $a is just an alias passing to the perl 5 program, right? 01:45
audreyt right
xinming and by default, it's ro, But we need to write to it,
so, It's an rw alias.
hmm, not sure about this. >_< 01:46
audreyt basically in perl5 land, when we have a pugs value
if you teat it as a scalar ref
then it behaves as a lvalue, that is you can assign to it
and because in Pugs, $x=1 and $$x=1 and $$$x=1 and $$$$x=1 means the same thing 01:47
(if $x is a simple uninitialized scalar variable)
the extra \ got canceled away
but my mind isn't working really right now; I should probably sleep instead of offering potentially misleading/bogus explanation :) 01:48
01:51 lanny joined
xinming audreyt: Just go and sleep. :-) 01:51
lanny Hiya. Sorry to point at your stuff first, audreyt. I had reviewed xinming's changes and they seemd trivial so...
lambdabot lanny: You have 2 new messages. '/msg lambdabot @messages' to read them.
lanny Thanks for the every-so-quick-fix. You are gonna burn yourself out at this pace. :) 01:52
01:52 SubStack joined
lanny @messages 01:52
lambdabot audreyt said 50m 5s ago: it's not me, it's xinming...
audreyt said 19m 31s ago: never mind; fixed :)
audreyt lanny: not likely :) been like this for 1.5+ years now :)
lanny Let me just say then that I'm glad you are using your powers for good instead of ebil. 01:53
01:54 LimbicRegion joined
audreyt I'm using it for fun, actually, but thanks :) 01:54
audreyt fades into sleepland &
01:54 LimbicRegion is now known as Limbic_Region 02:15 thepler joined 02:25 thepler joined 02:57 weinig is now known as weinig|sleep 03:07 avarab joined 03:09 avarab is now known as avar 03:19 avarab joined, avarab is now known as avar 03:30 avarab joined 03:42 avarab_ joined 03:51 avar joined 04:02 Eidolos joined, avarab joined
svnbot6 r14481 | lanny++ | * t/regex/p6regex/p6regex.t -- stab at un-todo of unexpected passed tests 04:04
04:58 root4o joined
root4o hi, { ... } is not implemented yet , right ? 05:00
eviltwin_b L<S06|The &?BLOCK object> contains a code snippet using ?? :: (instead of ?? ||) 05:01
?eval sub x {...}; x()
evalbot_r14481 *** ... - not yet implementedā¤ at <eval> line 1, column 8-11
eviltwin_b looks that way
05:02 MacVince joined
eviltwin_b hm, actually that looks like it DTRT: {...} means "this sub is not yet implemented" 05:02
?eval sub x {!!!}; x() 05:03
evalbot_r14481 Error: !!! - not yet implemented
eviltwin_b ?eval sub x {???}; x()
evalbot_r14481 Error: Cannot cast from VUndef to Handle (VHandle)
eviltwin_b whoops, that wan't what I meant
MacVince Hi all! 05:04
root4o 10x
eviltwin_b huh, yes it was, but {???} apparently isn't implemented
?eval ... 05:05
evalbot_r14481 *** ... - not yet implementedā¤ at <eval> line 1, column 1 - line 2, column 1
root4o this also doesnt seems to work ? right... 05:06
my $args1 = \(1,2,3);
eviltwin_b huh?
root4o foo(|$args1)
eviltwin_b the point is that {...} *means* "not yet implemented"
root4o i'm getting 05:07
eviltwin_b oh, you're on to something else
root4o pugs: don't know how to toVV': VList [VInt 1,VInt 2,VInt 3]
but
$args1 = \{ x => 5 };
works 05:08
eviltwin_b ?eval my $x = \(1,2,3); sub x ($a, $b, $c) {say "Hi!"}; x(|$x) 05:15
evalbot_r14481 Error: No compatible subroutine found: "&x"
05:15 BooK joined
eviltwin_b wonders if he's too tired to be trying to figure this out 05:16
root4o ?eval my $x = \(1,2,3); sub x ($a, $b, $c) {say "Hi!"}; x(|$x) 05:17
evalbot_r14481 Error: No compatible subroutine found: "&x"
root4o eval my $x = \(1,2,3); our sub x ($a, $b, $c) {say "Hi!"}; x(|$x)
05:17 nothingmuch joined
root4o ?eval my $x = \(1,2,3); sub x ($a, $b, $c) {say "Hi!"}; x(|$x) 05:17
evalbot_r14481 Error: No compatible subroutine found: "&x"
eviltwin_b you need the leading ?
root4o yes i got that :)
eviltwin_b yeh, I'm slow :) 05:18
root4o ?eval my $x = \(1,2,3); our sub x ($a, $b, $c) {say "Hi!"}; x(|$x)
evalbot_r14481 Error: No compatible subroutine found: "&x"
root4o ?eval my $x = \{a => 5}; sub x ($a) {say "Hi!"}; x(|$x)
evalbot_r14481 OUTPUT[Hi!ā¤] Bool::True
root4o eval my $x = \{a => 5}; sub x ($a) {say "Hi!"}; x(|$x)
this works
pairs also doesnt seems to work 05:19
eviltwin_b ?eval my @x = \(1,2,3); sub x ($a, $b, $c) {say "Hi!"}; x(|@x)
evalbot_r14481 Error: No compatible subroutine found: "&x"
root4o when I type '?' does ppl on the irc see it ? 05:20
eviltwin_b yes
root4o good
:)
i'm tring to find a thing to write test, for... but it is more harder to find something than to write the test ;) 05:21
eviltwin_b ?eval my $x = \(1,2,3); say $x.perl
evalbot_r14481 OUTPUT[\CaptSub {c_feeds = [MkFeed {f_positionals = [VPure (IFinite 1),VPure (IFinite 2),VPure (IFinite 3)], f_nameds = fromList []}]}ā¤] Bool::True
eviltwin_b ?eval my $x = \(1,2,3); say $x 05:22
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
root4o and then when something dont work ;)
eviltwin_b ?eval my @x = \(1,2,3); sub x {say "Hi!"}; x(|@x)
root4o yes it has to be Capture ,right ?
evalbot_r14481 OUTPUT[Hi!ā¤] Bool::True
root4o hmm :)
eviltwin_b yes, it needs to be a Capture
root4o so @ instead of $ 05:23
eviltwin_b ?eval my $x = \(1,2,3); say $x
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
root4o ?eval my @x = \(1,2,3); sub x (@a){say "Hi!"}; x(|@x) 05:24
evalbot_r14481 OUTPUT[Hi!ā¤] Bool::True
eviltwin_b ?eval my $x = \(1,2,3); sub x (Int $a, Int $b, Int $c) {say "Hi!"}; x(|$x)
evalbot_r14481 Error: No compatible subroutine found: "&x"
root4o ?eval my @x = \(1,2,3); sub x (@a){say @a}; x(|@x)
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
eviltwin_b that still seems wrong, the point of unary | is that it's supposed to unwrap the array
root4o yes 05:25
eviltwin_b ?eval my $x = \(1,2,3); sub foo (Int $a, Int $b, Int $c) {say "Hi!"}; foo(|$x)
evalbot_r14481 Error: No compatible subroutine found: "&foo"
root4o it gets capture
05:25 avarab is now known as avar
root4o but seems it can not unwrap it ! 05:25
?eval |(1,2,3) 05:26
evalbot_r14481 (1, 2, 3)
eviltwin_b ?eval my $x = \(1,2,3); sub foo (Int $a, Int $b, Int $c) {say "Hi!"}; foo(*$x)
evalbot_r14481 Error: ā¤Unexpected "x"ā¤expecting term postfix, operator, ":" or ")"
eviltwin_b ?eval my $x = \(1,2,3); sub foo (Int $a, Int $b, Int $c) {say "Hi!"}; foo(|($x)) 05:27
evalbot_r14481 Error: No compatible subroutine found: "&foo"
root4o ?eval $x = \(1,2,3); say *$x
evalbot_r14481 Error: ā¤Unexpected "x"ā¤expecting term postfix, operator, ":" or ","
eviltwin_b no, that was me thinking wrong
root4o ?eval $x = \(1,2,3); say |$x 05:28
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
root4o ?eval $x = \(1,2,3); say *|$x
evalbot_r14481 OUTPUT[any(VNum Infinity,VV (VPure (CaptSub {c_feeds = [MkFeed {f_positionals = [VPure (IFinite 1),VPure (IFinite 2),VPure (IFinite 3)], f_nameds = fromList []}]})))ā¤] Bool::True
root4o ?eval $x = \(1,2,3); say $x.yaml 05:30
evalbot_r14481 OUTPUT[--- !hs/IScalar ā¤- !hs/VV ā¤ - !hs/Pugs.Val.Val ~ā¤ā¤] Bool::True
eviltwin_b ?eval my $x = \(1,2,3); say |$x
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
eviltwin_b ?eval my $x = \(1,2,3); say |($x) 05:31
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
eviltwin_b ?eval my $x = \(1,2,3); say(|($x))
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
root4o ?eval $x = \([1,2,3]); say |$x
eviltwin_b hrm, that looks not good
evalbot_r14481 pugs: don't know how to toVV': VRef <Array:0xb7b805f0>
root4o what is 'toVV' mean ? 05:32
eviltwin_b dunno but it sounds internal
root4o ?eval $x = \(a => 1); say |$x
eviltwin_b is still working his way throuhg the Synopses
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
eviltwin_b see, I thought unary | "unwrapped" the cpature but that looks like not 05:33
root4o ?eval $x = \(a => 1); sub x($a) { $a }; say x($x)
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
root4o ?eval $x = \(a => 1); sub x($a) { $a }; say x(|$x) 05:34
evalbot_r14481 OUTPUT[<capt>ā¤] Bool::True
root4o ?eval $x = \(a => 1); sub x($a) { $a }; say x(*|$x)
(22:35:03) evalbot_r14481: OUTPUT[<capt>ā¤] Bool::True
evalbot_r14481 OUTPUT[any(VNum Infinity,VV (VPure (CaptSub {c_feeds = [MkFeed {f_positionals = [], f_nameds = fromList [("a",[VPure (IFinite 1)])]}]})))ā¤] Bool::True
eviltwin_b I don't think we need the "say" there 05:36
05:37 shobadobs joined
root4o ha 05:37
aha
eviltwin_b ?eval my $x = \(1,2,3); |$x 05:41
evalbot_r14481 \CaptSub {c_feeds = [MkFeed {f_positionals = [VPure (IFinite 1),VPure (IFinite 2),VPure (IFinite 3)], f_nameds = fromList []}]}
eviltwin_b ?eval my $x = \(1,2,3); |(|$x)
evalbot_r14481 \CaptSub {c_feeds = [MkFeed {f_positionals = [VPure (IFinite 1),VPure (IFinite 2),VPure (IFinite 3)], f_nameds = fromList []}]}
root4o ?eval $x =\{a => 5}; |$x 05:44
evalbot_r14481 {("a" => 5),}
root4o ?eval $x =\(1,2); |{$x} 05:45
evalbot_r14481 {Syn "block" {Var "$x"}}
root4o ?eval $x =\(1,2); {|$x}
evalbot_r14481 \CaptSub {c_feeds = [MkFeed {f_positionals = [VPure (IFinite 1),VPure (IFinite 2)], f_nameds = fromList []}]}
root4o ?eval $x =\{(1,2)}; |$x 05:46
evalbot_r14481 \{Syn "block" {Syn "," {1;ā¤ 2}}}
06:11 root4o left 06:28 marmic joined 06:39 seano joined 06:46 DHGE joined 06:53 nothingmuch joined 07:54 lumi joined 08:03 AzureStone joined 08:06 foo\ joined 08:31 SubStack joined 08:40 SCalimlim joined 08:52 iblechbot joined 09:00 pjcj joined 09:05 kanru joined 09:10 ditto joined 09:13 DHGE left 09:22 larsen_ joined 09:28 dduncan left 09:29 nothingmuch joined 09:33 qmole joined 09:40 Tzoa joined 09:41 larsen__ joined 09:45 Tzoa left 10:31 yodo joined 10:34 frankg joined 10:39 stennie joined 10:56 lumi joined, marmic joined, andres joined, Steve_p joined, f0rth joined, TimToady joined, ingy joined, fridim joined, ajs joined, awwaiid joined, holoway joined, chip joined, sri_ joined, dvorak joined, orafu joined, revdiablo joined, perlbot joined, rafl_ joined, hcchien joined, cj joined, kolibrie joined, jferrero joined, frankg joined, qmole joined, nothingmuch joined, kanru joined, iblechbot joined, SCalimlim joined, SubStack joined, foo\ joined, shobadobs joined, MacVince joined, weinig|sleep joined, buubot joined, Odin- joined, bennymack joined, lollan joined, jabbot joined, araujo joined, cnrocks joined, wilx joined, plural joined, bcorn joined, audreyt joined, Juerd joined, webmind joined, PerlJam joined, leo joined, pmichaud joined, wolverian joined, yuval joined, statico2 joined, mdiep_ joined, spoop joined, Narcisse joined, stevan joined, meppl joined, takesako joined, takanori_ joined, autark joined, buu joined, nine joined, jdv79 joined, rafl joined, Ikarus joined, svnbot6 joined, nipotaway joined, gnuvince joined, jojo joined, spinclad joined, Shabble joined, jiing joined, masak joined, osfameron joined, beppu joined, cognominal joined, Yappo joined, eviltwin_b joined, baest joined, ajs_home joined, kcwu joined, norageek joined, kalven joined, woremacx joined, mako132 joined, kane-xs_ joined, ruz joined, xinming joined 11:01 weinig|sleep is now known as weinig 11:03 buetow joined 11:23 chris2 joined 11:33 AzureStone joined 11:38 Psyche^ joined, pjcj joined 11:50 Psyche^ is now known as Patterner, elmex joined 12:13 ditto joined 12:37 andres_ joined
svnbot6 r14482 | kudra++ | Summaries for this week 12:40
meppl "require" doesnt work inside a class? 13:48
audreyt nopaste? or commit a test? 13:49
13:56 stevan_ joined
pasteling "meppl" at 89.54.90.94 pasted "require does not work here?" (10 lines, 114B) at sial.org/pbot/20597 14:10
meppl k
audreyt, so, in this paste require does not work
14:10 weinig is now known as weinig|bbl
meppl the error-message is: 14:11
*** No compatible subroutine found: "&Fest::Foo"
at ./Fest.pm line 7, column 9-33
it does not work, when i use "require" in a class, which is in a extra file
xinming BTW, may I ask what does "nopaste" mean please? Every time I saw nopaste, I know I would paste somewhere in trained reflex... :-P
meppl "require" works in a "class{}" 14:12
xinming, paste code into here ;) sial.org/pbot/paste 14:13
audreyt meppl: well try ::Fest::Foo
xinming: nopaste is the older paste service nopaste.snit.ch/
meppl xinming, "nopaste" ---> not paste it direct in the channel
audreyt meppl: problem is that require does not yet introduce a class literal
not exactly sure if it should
maybe yes
meppl hm
no, that doesnt work, too 14:14
whatever
i can also use "use" 14:15
momentaneous
;)
thx
audreyt ::Fest::Foo.new ?
that doesn't work?
meppl oh
audreyt, that works
yes
thank you very much audrey 14:16
audreyt ok. the problem is that
require Foo::Bar
can't tell if F::B is a class (in which case Foo::Bar should be registered as literal)
or if it's a package (in which case it should not. Or should it?)
so in writing ::Fest::Foo you delay the resolution to runtime
meppl ah, okay 14:17
audreyt principle of least surprise tells us that maybe registering a literal regardless of class/moduleness is sane 14:18
audreyt ponders about it some more 14:19
meppl what about that? require "/home/non/Sense.pm"; 14:36
require $foo; 14:37
my $bar = ::$foo.new();
does not work ;)
if $foo were edited to home::non::Sense 14:38
audreyt yup
::($foo) will work 14:39
meppl thx 14:40
nothingmuch audreyt: got a few spare minutes for a brain dump? 14:49
wrt MO::Emit
eviltwin_b dumb question about capture objects? 14:52
audreyt eviltwin_b: there's only dumb answers... 14:53
eviltwin_b ?eval my $x = \(1,2,3); sub foo (Int $a, Int $b, Int $c) {say "Hi!"}; foo(|$x)
audreyt nothingmuch: wait me for ~20min?
evalbot_r14482 Error: No compatible subroutine found: "&foo"
audreyt need to finish breakfast
eviltwin_b shouldn't that be interpolating?
audreyt nothingmuch: of course you can braindump ahead
eviltwin_b a couple of us were tossing that around last night (~8 hours ago)
nothingmuch audreyt: i'll wait 14:54
thanks =)
}:)
eviltwin_b 9 hours ago :)
audreyt eviltwin_b: weird... seems interpolation is like completely broken :)
I'll check. a sec... 14:55
eviltwin_b we were wondering if it was implemented yet. further exploration made it look like the Capture object was passed through unchanged
audreyt that is the case though it shouldn't
nothingmuch audreyt: i'll hop to the post office
eviltwin_b (i.e.. declare with a single untyped argument, that argument is rvealed to be a Capture)
nothingmuch ~30 mins
sounds good?
audreyt compare $x = [1,2,3]
nothingmuch: sure
which does interpolate correctly
15:28 vel joined 15:33 [particle] joined
audreyt eviltwin_b: there you go 15:46
thanks for prodding
svnbot6 r14483 | audreyt++ | * Interpolation of Capture objects via prefix:<|> implemented,
r14483 | audreyt++ | suggested by eviltwin_b++:
r14483 | audreyt++ | sub f ($x, $y) { ... }
r14483 | audreyt++ | my $capt = \(1,2);
r14483 | audreyt++ | f(|$capt); # now works
r14483 | audreyt++ | Previously only Array, Hash, Scalar and Pair were intepolated.
r14482 | kudra++ | Summaries for this week
audreyt nothingmuch: hmm it's ben nearly an hour... 15:47
nothingmuch: I had to nap a bit. please braindump ahead when you're back but obra will abduct me to some coffee tasting soon 15:48
gaal audreyt: in a few weeks i'll prolly have some more time - and can start moosing over more stuff to newland in the parser
audreyt gaal: good, mostly it's just the Sub signature producer
once it's there we can implement sub Main
which is a nice standalone task
gaal well, and then everything else!
audreyt really looks forward to sub Main 15:49
gaal eg oldcode, pads(!), lexical pragmas
audreyt I mean sub MAIN.
nodnod
15:49 Khisanth joined
nothingmuch audreyt: back 15:49
audreyt oy, there goes my napping
gaal I'd like to be / under the sea / in an octopuses garden / in sub MAIN 15:50
nothingmuch heh =)
gaal er, wrong song
nothingmuch you can nap if you prefer
audreyt I'll nap _and_ IRC at the same time
so dump ahead
nothingmuch heh
it's supposed to be bidi ;-)
but okay 15:51
i'm trying to figure out MO::Emit
been doing so for the past 2-3 days
i am trying to design it so that it's portable
to some extent
the mandatory incest we require:
the emitter has an undefined output, but a well defined input (responder interfaces) 15:52
sometimes the output can be responder interface, if it's a dynamic runtime
(or partly)
audreyt (all runtimes are dynamic)
nothingmuch e.g. in the case of the p5 emitter the output is packages
all our runtimes are dynamic
audreyt correct.
nothingmuch however, MO, by design, can also do static systems
anymoose 15:53
audreyt yes, but a compelling use case does not yet exist to generalize that so bduf yagni et
cetera
nothingmuch yes, i'm ignoring the cases i don't care about in terms of implementation
i'm just being accurate in my descriptions ;-)
however 15:54
for my purposes the p5 emitter is not dynamic per se
in that the target runtime doesn't twiddle MO objects all over the place
so dynamic -> foreign dynamic is the same as dynamic -> static as far as the emitter is concerened
(set aside the fact that the second is a lot more work ;-)
i need two runtimes for p5: 15:55
one is the interpreted one, in which there are actually calls to $ri->dispatch( $invocation, $responder );
and the "compiled" one, in which $ri's are flattenned into packages
and $invocation must be ::Method
and $responder must be invocant
the flattenning into packages is incest #1 that the emitter must do
audreyt define incest 15:56
nothingmuch (e.g. take apart a private interface, layer it over, and codegen methods that are actually dynamic with if ( caller == ... ) { $body_one->() })
incest == related objects that know a lot about eachother
15:56 stevan_ joined
audreyt oh. tight coupling 15:56
ok
nothingmuch that is, you can't just toss any old object into the emitter
the polymorphism only takes you so far
tight coupling sounds like a good thing sometimes ;-) 15:57
anymoose
the second type of incest we need to take care of is method body <-> emitter
the problem is that to write generic accessors
that don't care what the emitter's output is 15:58
audreyt ...is impossible
nothingmuch i need some sort of abstracting out of calling conventions, etc
well, it si possible, for very simple accessors
audreyt you need another layer
nothingmuch what I need is macros
audreyt yes.
nothingmuch e.g. method_call( $inv_ast, $method )
but perl 5 doesn't have these
audreyt write one for it then 15:59
nothingmuch i can kludge them as simply runtime calls
(fugly..., sub method_call { ... })
or i can codegen some perl using Code::Perl (not very transformable)
or I can finish Perl::Generate (too long)
audreyt what transormatino you going to do?
I think Code::Perl makes a lot of sense 16:00
nothingmuch e.g. the method call macro
it does
audreyt as a proof of concept
nothingmuch but it's holder objects aren't powerful enough
it's nice as an emitter AST
but not as a highlevel AST
audreyt my pt is that HL AST is not needed for the specific case of ->pkg p5 emit
nothingmuch indeed 16:01
but Code::Perl is not enough for fake method call vs. real method call going into the same AST node
which means i have to rewrite subtrees
which means pain
also, it doesn't have a walking API
audreyt it's localized limited pain though
nothingmuch my plan B is to go 100% macro
audreyt walking api is trivial
just reify the calls
wrap them with all same-named functions 16:02
nothingmuch since i'm only emitting very specific code, i write macros for all these "things" (a method call, a return, etc)a
nd the emitter has a class for macros
which does the relevant Code::Perl calls
audreyt that reifies them into data structure that represents suspented call
presto, walkability
yes, it's similar to the macros you just described
nothingmuch yep
any other ideas?
err,nevermoose, it won't get any better than this 16:03
okay, the second thing is how should the input params to the emitter be designed? 16:04
i'm thinking there should be low level emitter that deals with responder interfaces
and an "assistant" that futzes the meta classes
audreyt define futz 16:05
nothingmuch well, the problem is that responder interfaces <-> perl 5 packages are not a 1:1 fit
to support SUPER:: etc natively we decompile the responder interfaces into actual classes by first emitting the superclasses
if the MRO and perl's MRO disagree 16:06
we kludge by masking the superclass
hence the unit being emitted is a collection of classes, typically
but that is problematic, because classes are not the one true way of creating responder interfaces 16:07
audreyt why is that prblmtc? 16:09
you only mro-kldg on cls clstr
nothingmuch that's for the "
compiling" perl 5 emitter
the non compiling emitter will simply fmap the input objects
audreyt yeah so say you have a nonclass rspd if
nothingmuch recursively replacing method defs with code refs
audreyt yes yes
a non class rspdif will not participate in c3 16:10
it will handle mro some other way
afaics
nothingmuch yes
audreyt so why is that problmtc?
nothingmuch mm... i suppose the input to the emitter is just responder interfaces... =P
audreyt I thougt you said that yourself. 16:11
17:52 < nothingmuch> the emitter has an undefined output, but a well defined input (responder interfaces)
nothingmuch i guess i'm searching for something a bit more like a compilable unit
heh
oops =)
well, that was a slip then
audreyt I think it's orthogonal
compunit means your analysis has a bound
but for MO whenever you hit "emit" that's a compunit 16:12
by definition
so don't worry about that
nothingmuch hmm
fairynuff
audreyt sepcomp will just trigger MO once for each compu
(sorry for abbrs I'm napping so suspending laptop with my palms )
nothingmuch ... and it'll be the emitter's problem i guess, to also glean data from the already compiled units
audreyt or it calls into a nonlocal analyzer 16:13
nothingmuch okay, i'll let you nap for real and stop talking nonesense ;-)
audreyt without storing state itself
nothingmuch polymorphic ;-)
audreyt what, I talk nonsesne?
:)
nothingmuch i'll let you $unit, and stop talking nonesense
not i'll let you $unit
where 4unit == ( $subunit, and stop talking nonesnese )
;-)
if that was the case, i'd i wouldn't use "and stop", because that's bad english 16:14
audreyt well it makes a lot of non nonsense
nothingmuch is having coders block
audreyt which represents a thunk of sense
nothingmuch hence undecisiveness
audreyt (cf. Haskell is Not Not ML)
16:15 stef_ joined
audreyt oh. then write some more component tests 16:15
I hear that's good for you
nothingmuch i've been doing Crypt::Util when my brain would freeze
audreyt gravedigging module?
nothingmuch =)
16:15 stef_ joined
audreyt "This module provides an easy, intuitive and forgiving API for wielding crypto-fu." 16:16
nothingmuch use Shovel; open my $fh, $crypt; while( my $goodies = <$fh> ) { } =)
audreyt :D
cool, that part of PlRPC I liked
so abstracting it out into a ::Util makes sense
nothingmuch oi! i didn't know
i'll go through PlRPC and extract goodies 16:17
eviltwin_b "suggested"?
S06
nothingmuch huh?
audreyt Obviously you still haven't quite memorized all the synopses (of all CPAN modules)... :-)
nothingmuch that was perl 5
audreyt eviltwin_b: "suggested to implement"
nothingmuch wait wait wait
oh, i thought that was you
eviltwin_b ah, was not clear that it wasn't implemented yet
nothingmuch my nickcoloring script died, sorry =(
audreyt eviltwin_b: I forgot to implement it during the releng frenzy is all 16:18
eviltwin_b ah
audreyt because it's not tested! 16:19
(or was it)
16:19 andres__ joined
audreyt eviltwin_b: can you add the relevant tests to t/data_types/capture.t ? 16:20
in additon to &foo.call($c) it should also test foo(|$c)
eviltwin_b not at the moment
audreyt someone else then? :)
I'll nap for real...
16:21 ferreira joined
eviltwin_b I have a nonfunctional setup at the moment, found out last night my dports is thoroughly horked so I'm doing a full reinstall 16:21
hence most stuff (including svn and dependencies) is currently nonfnctioning
audreyt eviltwin_b: mail juerd at convolution.nl with your real name and preferred login name
to get a feather.perl6.nl / perlcabal.org account 16:22
which is handy for things like webirc and pugshacking
afk... & 16:23
16:24 Limbic_Region joined 16:26 lisppaste3 joined 16:40 DHGE joined 16:47 prism joined, TimToady joined 16:54 weinig|bbl is now known as weinig 16:56 bernhard joined, justatheory joined
nothingmuch @seen cmarcelo 17:07
lambdabot I saw cmarcelo leaving #perl6 3d 12h 20m 38s ago, and .
17:08 thepler joined, chris2 joined 17:18 penk joined 17:20 offby1 joined 17:21 aufrank joined
offby1 here's a dumb question: what's the perl6 equivalent of the Camel Book? 17:21
I.e., the one place I can go to find out how to actually write perl6 code?
nothingmuch the synopses are the closest thing we have
offby1 *sigh*
well, maybe that's not as bad as I'd thought.
nothingmuch there's also a plethora of tutorials 17:22
offby1 they are kept up to date with pugs, yes?
nothingmuch it's more the other way around
offby1 see, I don't want a plethora, because then I have to decide which to pick.
nothingmuch pugs tries to keep up to date with them
offby1 I want just one canonical authoritative site.
nothingmuch right, that's why i assumed you'd prefer the synopses =)
offby1 OK, I'll see if my pugs checkout includes them
nothingmuch it doesn't 17:23
dev.perl.org/perl6/doc/synopsis.html
lambdabot Title: Synopses - perl6
offby1 oh :-|
thanks
nothingmuch also in svn.perl.org
and Perl6::Bible
offby1 to be honest, I can never remember if it's the Synopses, Apolocyptamundo, or the Ex-Weegeeans that I want to consult. 17:24
aufrank I thought pugs/docs/Perl6/Spec/ was equivalent to the syns these days
nothingmuch oh
offby1 isn't the only one confused, apparently
nothingmuch didn't know
perhaps /me is out of date
spec.pugscode.org is a good way to see how pugs <-> syns interact
that said, synopsis describe and specify perl 6 17:25
apocalypses are earlier (so now out of date)
and explain more of the why behind some things, or what some things should be
and plural(exegesis) were supposed to help explain apocalypses using a practical code sample
aufrank exegeses 17:26
nothingmuch ta =)
17:27 nelhage joined
offby1 thanks 17:28
Not much; you? :-)
nothingmuch ta =) 17:29
bah
this is not a terminal
offby1 Ici n'est pas un pipe.
Are the synopses kept under revision control somewhere? I prefer reading things locall via my editor, than on the web ... 17:30
*whine whine*
nothingmuch svn.perl.org/perl6/doc 17:32
lambdabot Title: Revision 13276: /doc
offby1 thanks!! 17:38
offby1 smacks forehead 17:39
I already had a checkout of that. Yeesh.
nothingmuch heh
offby1 I bet I asked for the URL here back then, too :-|
I need to be _forced_ to use Perl6 for a few months, rather than dabbling in it. That way I'll remember this stuff.
17:40 bonsai joined
offby1 happily reads S02 17:43
17:49 mako132_ joined 17:58 Aankhen`` joined, TimToady joined 17:59 zdeqb joined 18:01 zdeqb left
offby1 OK, my first real question. I want a hash whose values are anonymous list references. In Perl5, I'd add a new element to one of those lists by saying push ``@{%dict_hash{$key}}, $value'', but with pugs, I get an error: ``Unexpected "{%" expecting "@" or "::"''. What's the syntax that I'm looking for? 18:20
actually I guess in Perl5 I'd really say ``push @{$dict_hash{$key}}, $value''
but you get the idea
wolverian you don't need to deref explicitly in perl6. 18:21
offby1 go on. 18:22
wolverian %hash{$key}.push($value);
offby1 oho! I'll try that.
hmm, now I must show you what I'm _actually_ doing, rather than the simplified version :-) 18:23
%dict_hash{&bag($chopped)}.push ($chopped);
that yields
Unexpected "($" expecting comment, operator, statement modifier, ";" or "}"
so -- I want to call the "bag" function on $chopped, and use that as my hash key ... 18:24
wolverian you can't use whitespace so freely.
offby1 ah
wolverian otherwise it looks fine, except the & is not required.
offby1 superstition :-)
wolverian it shouldn't be used in perl5 either.
(except when you need it. which is probably never. :) 18:25
offby1 fabulous!
thanks, mr wolverian !
wolverian you're welcome :) 18:26
18:29 cjeris joined
offby1 OK, next: how do I open a file, and tell Perl (or Pugs) "This file is encoded in Latin-1, so please don't whine about "decodeUTF8: bad data '\243'" ?? 18:30
I bet it's just an extra arg to "open"
alas, I can't remember where "open" is documented
eviltwin_b S16? 18:32
offby1 lemme look
dev.perl.org/perl6/doc/synopsis.html doesn't mention an s16 18:33
lambdabot Title: Synopses - perl6
eviltwin_b hm, it's a draft
offby1 nor do I find one in /usr/local/src/langs/perl6-doc/
eviltwin_b I'm at perlcabal.org/syn/? (the ? is part of the url)
lambdabot Title: Official Perl 6 Documentation
eviltwin_b redirected from spec.pugscode.org 18:34
offby1 yikes, there really _is_ no one place to find the perl6 equivalent of the Camel Book ... :-(
18:34 Limbic_Region joined
eviltwin_b I think perl6 is still a bit too young for that 18:35
offby1 guess so
eviltwin_b not to mention pugs vs. parrot vs. other implementations
offby1 well, I'd assume all those implementations would hew to the same spec.
s/assume/hope/
eviltwin_b heh
perl evolves by mutation, as always, the spec just documents the successful mutations :) 18:36
offby1 hmm
wolverian the idea is, actually, that the implementation adhere to the spec.
offby1 well, S16 didn't answer the question anyway.
wolverian in any case, I don't think pugs has IO layers yet. 18:37
offby1 Any idea how to tell perl that my file is Latin-1 ?
oh
wolverian you could always look at the source :)
ingy seen TimToady 18:39
jabbot ingy: TimToady was seen 1 days 13 hours 7 minutes 49 seconds ago
18:49 aufrank joined 18:52 glasser joined
offby1 so ... Ints and Strings are different types, in that ``3.perl'' and ``"3".perl'' yield different strings ... but it appears that if I use an Int as a hash key, it gets coerced to a string. Am I understanding correctly? 18:57
eviltwin_b as I understand it, that's the default. you can declare hash using general objects (Any) or other types as keys
offby1 aha 18:58
that coercion indeed mimics perl5's behavior.
(except Perl6 is better because I can use _big_ ints as keys. yay)
hm. How _would_ I write that declaration? ``my Int %h'' doesn't sound right -- I'd expect that to declare that the _values_ are Ints, not the keys. 19:00
wolverian that's defined in the data structures synopsis 19:01
offby1 aha, I'm looking in the wrong place, then.
wolverian perlcabal.org/syn/S09.html#Hashes 19:02
lambdabot Title: S09
offby1 hmm, isn't doing what I'd expect: 19:03
my Any %h{Int}
%h{3} = "Three"
%h{"4"} = "Four"
%h 19:04
(("3", "Three"), ("4", "Four"))
wolverian pugs doesn't necessarily implement that yet.
offby1 ah
but it looks like I'm doing the right thing then? If so I'll just write it that way and ignore that pugs doesn't yet do it. 19:05
wolverian yup 19:06
offby1 thanks. 19:07
nelhage "You should write a test" :) 19:22
wolverian that, too. :)
nelhage OK. I've built and installed pugs from svn; How do I run stuff in the examples/ dir? neither perl examples/foo.pl nor pugs examples/foo.pl is working 19:23
offby1 I dunno, but I'll be curious to hear the answer too. 19:24
in the meantime, my next q:
my $cache_file_name = "dict.cache"
my $cache = open ($cache_file_name, :w)
--- That yields
*** dict.cache w1: openFile: does not exist (No such file or directory)
that's puzzling, since I think I'm telling it to create a new file 19:25
pugs/t/builtins/io/open.t seems to imply I'm doing it right...
wolverian you don't want the whitespace there, anyway. 19:26
offby1 *smack*
gotta figure out how whitespace works
eviltwin_b GNU style conventions are not valid Pugs (and suck anyway IMO :) 19:27
offby1 just habit
wolverian perlcabal.org/syn/S02.html#Whitespa...d_Comments
lambdabot Title: S02, tinyurl.com/y89dt4
offby1 yeah, I read it, but it hasn't sunk in yet
wolverian the relevant bit here is that whitespace before a postfix operator is invalid (unless escaped) 19:28
offby1 stares blankly
eviltwin_b look for "long dot"
wolverian yeah. 19:29
nelhage looks for the postfix operator in offby1's code fragment, but fails to find it.
eviltwin_b <( )>
wolverian nelhage, ()
eviltwin_b (that is, the parens are a postfix_circumfix operator
nelhage hmm, ok. I guess that makes sense 19:30
eviltwin_b a postfix operator which takes an argument in circumfix
nelhage (*very* new to p6 here)
19:30 MacVince joined
eviltwin_b is still quite new to it as well but is working through the Synopses and seems to be retaining *something* at least 19:30
offby1 I think my rule will be: never use any whitespace anywhere :-| 19:31
eviltwin_b that won't help, there are cases where it's mandatory :>
offby1 *smack*
I think my rule will be: add and delete whitespace at random until it compiles :-|
eviltwin_b hey, it could be Python...
offby1 anyway.
so: what's the inverse of "say $foo.perl" -- in other words, what's the perl6 equivalent of "do $filename" ? 19:32
wolverian use a module :) 19:33
offby1 huh? 19:34
I don't understand how that answers my question.
maybe I wasn't clear.
wolverian generally you want to use Foo; instead of do "foo.pl" 19:35
so. anyway. good night!
offby1 "say $foo.perl" is a delightfully easy way to get an unparsed string that, when re-parsed by perl, creates a value that is just like $foo. So it's a handy way to write perl data to files. Now, if I do this, I am eventually going to want to read that data back, and turn it back into a perl value. How do I do this second step?
wolverian eval() 19:36
offby1 eval what?
the string?
oh, of course.
offby1 tries
eviltwin_b you want that anyway, really, IMO --- forces you to at least think about validation etc. 19:37
offby1 wolverian: seems to work; thanks.
eviltwin_b: say again?
eviltwin_b if you just slurp data in with "do" (even in perl5) you're being lazy and potentially very insecure 19:38
offby1 because the "data" might contain Evil Code. Sure.
eviltwin_b making it harder to do that is therefore a Good Thing IMO
offby1 uh
not if I already know beforehand that the stuff is safe, it isn't.
anyway, calling "eval" doesn't seem noticeably safer. 19:39
eviltwin_b is a professional paranoid and thinks that "already know beforehand" is a road paved with good intentions
offby1 good point, I'll grant you. 19:40
eviltwin_b it's not, but by breaking it up it should aty least suggest putting checks between the read and the eval
offby1 aaahhh
gotcha
although ...
ugh.
any such checks would require me to do my _own_ parsing, wouldn't they?
surely there's a safe, standard way to serialize and unserialize data? YAML, perhaps? 19:41
eviltwin_b I think there is (or is intended to be) but haven't seen it yet
oh, if you're intent on being lazy I get the impression open($file).slurp.eval is supposed to work 19:42
offby1 sounds good.
works indeed. 19:43
eviltwin_b as to parsing, that's not too horrible an idea --- go take a look at grammrs 19:45
er. Grammars
eviltwin_b is impressed --- has been noodling that concept for a while 19:46
offby1 I refuse to do that sort of parsing. It's unthinkable that perl6 won't eventually provide a safe way to do this. 19:47
eviltwin_b worse come to worst you could fall back to perl5 YAML :> 19:48
oh look, S29 mentions an evalfile(). (now if there were an indication of any of these things are actually implemented...) 19:50
offby1 I notice that there's already a .yaml method for generating the output, so I wouldn't be surprised if there were a corresponding method for reading it back in 19:51
ooh, look how a file handle stringifies: 19:58
<VHandle ({handle: dict.cache}>
that's odd
unbalanced left paren.
I know that isn't meant to be parsed, but it still looks funny ...
SamB indeed it does... 20:03
I bet it was a mistake
20:05 MacVince joined
gaal offby1: also check out .yaml 20:17
20:17 ferreira joined
gaal ?eval { moose => 'elk', 42 => "lala" }.yaml 20:18
evalbot_r14483 "--- !hs/IScalar \n- !hs/VUndef VUndef\n"
gaal ugh.
eviltwin_b ...or then again,maybe not:>
gaal ?eval my %x = ( moose => 'elk', 42 => "lala" ); %x.yaml
evalbot_r14483 "--- \n? 42\n: lala\n\n? moose\n: elk\n\n"
20:19 trym joined
gaal the other direction is eval $str :lang<yaml> 20:19
offby1 let's try that. 20:23
gaal ?eval { why => 'did that happen earlier' }.perl 20:25
evalbot_r14483 "\\undef"
offby1 cool
gaal interesting.
very not cool :(
offby1 I meant "cool" because one can read yaml natively
gaal weirdly, it's newVal undef.
yes. it roundtrips objects too :)
nelhage ?eval my $x = {whats => "up"}; $x.perl
evalbot_r14483 "\{(\"whats\" => \"up\"),}"
gaal nelhage: yes, I suspect it's parsed as a thunk, which may be correct, but then showing it as an undef is incorrect. 20:26
?eval { "this is an anonyblock" }.perl 20:27
evalbot_r14483 "\\undef"
gaal yeah.
should stringify as CODE0xdeadbeef or something. 20:28
offby1 indeed
although a disassembler would be cool too :-)
gaal "something" being perhaps 'CODE:{ "this is an anonyblock }'
yeah :)
newVal will make this not-so-difficult 20:29
though I need for audreyt to jiggle my memory about how we capture original layout/comments etc. now that newAST doesn't have annotations 20:30
offby1 *gasp* 20:32
there's actually a plan for saving comments and so on in parsed code?
gaal of course. how else would we do refactoring IDEs? :)
offby1 ga-roovy
nelhage gaal: by abusing horrible hacks, of course. 20:33
offby1 sure
that technique was good enough for my granddaddy
gaal nelhage: you mean writing a Z80A backend to pugs, writing the optimizing refactoring engine + AI that infers the comments that went with it on the output, and prettyprinting the result back to Perl 6? 20:34
ok, I'd like to see that
nelhage Huh. That would be pretty awesome. 20:35
I was thinking more along the lines of jesse's fsck.com/~jesse/extract
(Warning: this code has been known to traumatize small children) 20:36
gaal that's... intereting 20:40
20:41 jferrero joined 21:02 scsibug joined 21:07 putter joined
putter openfoundry down? 21:08
ah well. bbl & 21:11
21:19 mauke joined
eviltwin_b hm, I'm having sporadic network problems in general 21:31
nothingmuch night 21:34
21:43 ferreira left 21:45 shobadobs joined
obra gaal: it _works_ 21:52
it's scary, but works 21:53
21:56 larsen_ joined
audreyt openfoundry worksforme 21:58
clkao audreyt: what was the moving to commitbit plan? 21:59
22:03 [particle] joined 22:12 putter joined
putter re openfoundry, / svn: REPORT request failed on '/pugs/!svn/vcc/default' / svn: REPORT of '/pugs/!svn/vcc/default': Could not read status line: connection was closed by server. (svn.openfoundry.org) 22:12
eviltwin_b 502 Proxy error 22:13
cute
22:15 weinig is now known as weinig|bbl
Patterner for interesting values of cute 22:20
offby1 I got that too, and hour or two ago
s/and/an/
audreyt just for commits?
pulling seems to be fine 22:21
working now to get us a new svnhost.
Patterner "svn up" fails
eviltwin_b s/interesting/ironic/ :) 22:22
offby1 works OK nwo. 22:23
now.
audreyt read worksforme and write is borked. 22:24
hopefully will get a new .perl.org host for pugs soon
(I don't have openfoundry shell anymore so can't fix it at the moment :/)
offby1 idly wonders if Google could be talked into hosting it
audreyt there's already a google pugs host. 22:25
offby1 there you go, then! problem solved :-)
audreyt they lifted quota limit for us
well, problem is all committers need to get gmail accounts...
and @perl.org with commitbit support doesn't have that restriction
but yes, googlecode will be our rw fallback 22:26
offby1 audreyt: I must say, your work on pugs leaves me in awe. It's the only free software project that I am genuinely excited about, _and_ believe has a prayer of actually being completed.
audreyt but @perl.org should be main
Patterner I think i have 100 invites to gmail left :)
audreyt Patterner: yeah but the good nicknames have run out
clkao audreyt: luckily there's openid support planned
audreyt e.g. I had to be audreyt.org instead of audreyt
and I'd like to maintain some sort of continuity in nicknames
offby1 nods
offby1 hates it when he finds he's not the first "offby1" in some namespace :-| 22:27
Patterner you don't like [email@hidden.address]
eviltwin_b suid audrey? :)
clkao 22:28
SamB has "naesten", should have grabbed SamB if it was still there though... 22:32
offby1 bellows belligerently: there's only room enough in this community for _one_ "offby1"!
audreyt offby1: re genuine excitement, I'm very very happy to hear that :) 22:34
offby1 I imagine I'm one of many, but 22:35
audreyt re completed, sure it will :)
but we first need to fix the most nonfun part, which is a nonfunctional svn master... working on it now
(fortunately clkao has a completely nointerrupted-by-skip svk mirror of the repo)
clkao: can you do the svndumpfilter into huge file now?
clkao sure 22:36
offby1 audreyt: if I donate to the Perl Foundation, does that support y'all?
clkao i think buying her shiny cloth 22:37
cloths would help ;)
audreyt offby1: donating money for keeping the new pugsmachine running would be nice 22:38
offby1 investigates
I'm far too lazy to contribute code, but money I can handle. 22:39
audreyt clkao: I've got a large enough deposit on Issey retailers that will buy me another year's clothes or so... 22:40
offby1 hmm, the dropdown only lists "Perl Development Fund", and three other less-likely-looking things
audreyt obra: which fund would this be?
obra i don't know for sure. offby1: for large donations, all kinds of magic can happen. 22:41
but I know that's hard to pull off sometimes.
offby1 obra: ain't gonna be large, unless your idea of "large" is much smaller than mine :-)
obra understood
I've been trying to get pugs-donation stuff streamined. but i'm not tied in enough.
offby1 ka-ching 22:43
well, the perl foundation donation stuff was easy enough to do that I've just done it.
hope they throw it at y'all.
audreyt eventually, indirectly, some of them will... 22:44
offby1 sounds like getting your paycheck after tax and social security has been deducted ... :-( 22:46
SamB maybe canned food? 22:48
22:48 SubStack joined
audreyt mmm spam 22:55
Limbic_Region raises his hands above his head in triumph 22:56
NP complete -> O(1) in < 8 hours
offby1 ?
audreyt Limbic_Region: yay! 22:57
Limbic_Region of course, uploading the db so I can show it off it going to take > 10 hours 22:58
(slow upload)--
23:00 trym joined 23:03 Aankhen`` joined 23:05 jferrero is now known as JoaquinFerrero 23:13 bsb joined 23:19 root4o joined 23:20 jferrero joined, jferrero is now known as JoaquinFerrero
putter svn up, svn ci still down. 23:29
23:30 fridim left
putter are there "using svk with pugs" instructions somewhere? 23:30
(switching to svk is nominally on putter's todo list for this next week) 23:31
23:31 offby1 left
putter but for now, have fun all. & 23:31
23:37 SubStack joined 23:39 diakopter joined 23:44 [particle] joined 23:51 diakopter left