Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
geoffb rafl, by "pin to the etch release" do you mean setting APT::Default-Release in apt.conf or something else? 00:01
rafl That's what I mean. Then sid packages will only be installed if you explicitly ask for it. 00:02
geoffb rafl, even for dependencies? That would be much easier.
I guess a versioned dependency would override . . . .
rafl No. If the dependencies can't be satisfied from etch they will be pulled from sid without asking you. 00:03
Otherwise it'll install etch packages.
geoffb cool.
When you do it manually using dpkg, I assume you just wget out of the package pool? 00:04
Yay . . . pinning the release passed the "update and dist-upgrade installs nothing" test
(apt-cache policy)++ 00:06
Oooh, working as advertised, rafl. Thanks. Sometimes one just needs to hear "No really, it will work the way you want it to." :-) 00:10
rafl :-)
geoffb: Well, I use a small script that gets the package from the pool. It doesn't handle dependencies, though. 00:11
nothingmuch doesn 00:21
't understand why it breaks this way
Some::Object->new(..., orig => $obj, ...); # after a while orig is gone
geoffb nothingmuch, this is old, I'm sure -- but I like your idea for a circularly defined functionally complete prelude -- did that come from your Forth interpreter hacking? 00:25
nothingmuch that's what I'm working on these days
svn.openfoundry.org/pugs/perl5/Blondie/ 00:26
geoffb I'll take a look as soon as the pugs build completes
nothingmuch it's perl 5 =) 00:27
i'm off to bed 00:30
geoffb OK 00:31
cool.
Is everything that I need to know in the README or whatever?
geoffb is multitasking
nothingmuch in the example, I guess 00:32
The parts are:
AST (Blondie::Nodes) constructs programs
Blondie::Compiler compiles them using Blondie::Prelude
it creates a single AST from an AST and an env 00:33
Blondie::Backend::* takes this AST and does something else with it
the Perl runtime can just interpret it
the C runtime uses Blondie::TypeSafe to type infer the AST and install explicit conversions on type mismatch
Then the C runtime emits the code, binds it using Inline::C, and runs it 00:34
geoffb How complex are the "programs" taht it understands? Just little snippets?
nothingmuch we have calls with fixed param numbers
and perl values
theretically it's good enough 00:35
geoffb good enough to do PIL -> Blondie AST, you mean?
nothingmuch i doubt it... not yet
good enough == turing complete ;-)
i don't think there is any reason to do PIL -> Blondie, too
Blondie is strictly optimized to make the compilation simpler 00:36
geoffb heh
nothingmuch it's got no lexical scop
e
it's got no objects
it's got no assignment
geoffb wheee
nothingmuch these things can be added on later if we like
geoffb right 00:37
nothingmuch but right now i'd like to concentrate on the compilation, which is the part i'm interested in =)
geoffb So what are your plans from here?
oh jinx
nothingmuch finish the C backend
start expanding the prelude
geoffb nodnod
nothingmuch type safety for higher order functions
geoffb Is harrorth on the back burner or pretty much dead?
nothingmuch i'd say it's on hold 00:38
nothingmuch tends to give few time slices to projects like that after he's not learning as much ffrom them as he was in the begining
anyway i really must be off
geoffb g'night! 00:39
and I know what you mean
rafl Wow, Catalyst really rocks. I wrote a little CMS+Blog including an RSS feed that uses POD files as its database within a few hours. The original version of that (without rss feed) was more than three times bigger and I needed about a week to write it. :-) 02:55
Hopefully someone ports it to Perl6 :-) 02:56
stevan rafl: IIRC sri has already begun the porting of catalyst 03:08
not sure what stage it is in, he never checked it in
rafl Cool! 03:17
Supaplex Catalyst? 03:58
rafl stevan: catalyst.perl.org 04:00
Err, Supaplex: catalyst.perl.org
Supaplex thanks 04:03
Supaplex waits for it to ... load... 04:04
ding
gaal morning! 05:28
masak morning 05:38
gaal heya masak 05:40
geoffb morning, gaal 05:44
and morning, masak :-)
rafl Yay, suspend to disk on a swap partition on LVM2! :-) 05:55
masak hooray, examples/games/wizard.p6 is working again! :) 05:58
rafl It seems to become a good morning. :-)
masak indeed 05:59
geoffb hooray, I finally have all my non-darcs checkouts converted to svk! :-)
nodnod
masak everybody's happy, it seems
geoffb I'd be even happier if SVK spoke darcs . . .
rafl I'd be even happier if SVK would be darcs. :-) 06:00
masak it seems to me they have some things in common, though
wolverian Catalyst needs to get higher in the google results for 'catalyst' :) 06:02
geoffb definitely. I just happen to like SVK for a number of reasons, and would prefer not to ever care about what the backend is for any checkout.
masak geoffb: lately we have a lot of cvs-esque alternatives. it's time to become picky and choosey :) 06:03
svk is the best i've used so far 06:05
but i still haven't tried darcs
geoffb I'm all in favor of abstracting out the back end. I'm picky about my client, but less so about the protocol & server -- with the exception that they had bloody well better support atomic change/patch sets, or some such isomorphic concept
nodnod
gaal hey geoffb, long time no moose. 06:10
geoffb MOOOOOSE
no kidding
new system hell
I think I'm on the other side now, though.
Basic utilities I can't believe aren't installed on every *nix system by default, #105: tree 06:11
What have you been up to, gaal? 06:12
wolverian IRC-- # no default encoding for channel names
geoffb wolverian, ???
wolverian (or if there is, it's ASCII or something similarly pathetic)
gaal they had encodings when irc was invented? :)
geoffb, oh, bits and pieces
wolverian standards are called "standards" because they're meant to be modified 06:13
geoffb gaal, yep: EBCDIC or ASCII-7, your choice
gaal that's why they shoulda've been called walkards. or creepards
geoffb shuffleards? 06:14
wolverian oh, for the love of god, there is a tree(1)? I have coded this myself in perl many many times :/
geoffb oh dear
wolverian well, it was fun, anyway 06:16
geoffb And you probably learned something . . . um, well at least the first time
azuroth hmm. I'm trying pugs, but I'm getting weirdness with shebangs. it's running with bash or something, even though the shebang says to use /usr/bin/pugs 06:18
gaal azuroth, does invoking the script with an explicit interpreter work? 06:24
/usr/bin/pugs yourscript.p6
azuroth yeah, it does 06:25
gaal can you nopaste the output of what goes wrong? 06:26
perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
pasteling "azuroth" at 220.245.178.140 pasted "shebang" (26 lines, 1.1K) at sial.org/pbot/13237 06:28
azuroth if I go "/usr/bin/pugs test.p6", works fine... if I put stuff like "echo $SHELL" in there, it tells me /bin/bash or somesuch 06:29
nothingmuch morning 06:33
geoffb morning, nothingmuch
dduncan morning ... and good night 06:34
gaal azuroth, this is weird. but i don't have a unix pugs around so i can't reproduce it. 06:42
putter, ping
azuroth ahh
well I'm going to try setting up apache to explicitly call `pugs blah` on all .p6 files... if I can? 06:43
gaal i'm no expert on apache, but i think you can, like people used to associate '.cgi' with perl(5).
actually while you're at it, make the association with pugs_bin, because recently that's what 'pugs' has been made to frontend. 06:44
save yourself a fork :)
azuroth ahh, okay
gaal (and a p5 load hit!)
azuroth er...
geoffb The latter being by far the bigger pain
gaal okay we really really need a getopt library ported 06:45
and preluded.
azuroth I changed the shebang to pugs_bin ... it works now...
gaal interesting, i thought interpreter hopping was supposed to work
what os are you on?
azuroth debian 06:46
hmm... yay, I suppose 06:47
gaal wow, we'll need to back off that frontending it seems. it also causes problems on win32.
thanks for the report!
azuroth that's alright ;-p 06:48
now I need to figure out how to do CGI 06:49
gaal hint the first: replace `print ".....\n"` with `say "....."` :-) 06:50
azuroth hurrah 06:54
wolverian do we have filehandle objects yet? 06:55
gaal open returns an IO
wolverian does it have methods? :) 06:56
I mean, $STDOUT.record_separator = "\r\n"; etc
gaal not very interesting ones yet :) see Prelude.pm - and please hack :) 06:58
but =, btw, is a method.
wolverian right. :)
I thought larry said it isn't?
gaal he did? 06:59
wolverian I had the impression he said in some p6l post that = and . are not methods
which TSa argued against (never mind, never mind..)
gaal in the prelude it's a "next" method on iterables
wolverian oh
you mean =$foo
I meant &infix:<=>
gaal aah
yes
wolverian anyway, I have a maths lecture now, from which I'm late already. have to go :)
gaal bye :) 07:00
azuroth while (=<STDIN>) { say $_; } ?? 07:02
gaal say for =$*IN
you don't need <>
azuroth hmm, okay 07:03
geoffb What's the preferred way to interpolate an array into a string?
gaal actually, you want print in this case, not say, since we don't autochomp (yet)
geoffb "@foo" no workie
azuroth ahh
gaal {[~] @foo} ? :-)
geoffb bleh!
hmm . . . 07:04
gaal {@foo} works.
geoffb yeah, just tried that
?eval my $foo = 5 == 5; $foo.perl 07:05
evalbot_7057 '\\bool::true'
geoffb ?eval my $foo = 5 == 5; "$foo" 07:06
evalbot_7057 '1'
geoffb ?eval my $foo = 5 == 4; "$foo"
evalbot_7057 ''
geoffb ?eval my $foo = 5 == 4; $foo.perl
evalbot_7057 '\\bool::false'
gaal you want 0? try numeric context.
geoffb That's just the problem, I was interpolating it into a string. :-)
And anyway, why bother to have a different case for strings? 0 is still false, right? 07:07
All hail iblechbot
er, "0", I meant 07:08
dduncan hail 07:11
geoffb I thought you were going to sleep, dduncan?
Or was that good night just a timezone reference?
dduncan I am going to sleep 07:12
really
gaal i don't know, maybe so ([~] @tests).chars counts successes? j/k :-)
dduncan and its 12:12am here
I should be back online in 10 hours ... 07:13
starting NOW
geoffb gaal, that is so disturbing a rationale, but you know, I would believe it. 07:14
well, almost.
Man, my tendency to use fat comma all over the place in Perl 5 is going to bite me in the ass over and over as I do Perl 6 conversions 07:15
azuroth fat comma? 07:16
geoffb =>
azuroth ahh 07:17
half a space ship
geoffb :-)
?eval 1 => 2 => 3
evalbot_7057 (1 => (2 => 3))
geoffb good
azuroth eek 07:18
geoffb ?eval ?(1 => 2) 07:20
evalbot_7057 Error: Insufficient number of required parameters: 0 actual, 1 expected
geoffb ur?
?eval my $foo = 1 => 2; $foo 07:21
evalbot_7057 (1 => 2)
azuroth ?eval say (1)??('a'):('b');
evalbot_7057 Error: unexpected ":" expecting term postfix, operator or "!!"
geoffb ?eval my $foo = 1 => 2; ?$foo
evalbot_7057 Error: Insufficient number of required parameters: 0 actual, 1 expected
azuroth ?eval say (1)??('a')!!('b');
evalbot_7057 a bool::true
geoffb OK, something is just broken with booleanization of Pairs 07:22
Anyone know what the rule is supposed to be? Is it always bool::true, or does it depend on the key or value or both?
?eval ?1 07:23
evalbot_7057 bool::true
geoffb ?eval ?0
evalbot_7057 bool::false
geoffb ?eval ?"0"
evalbot_7057 bool::false
geoffb good. :-)
?eval ?""
evalbot_7057 bool::false
geoffb ?eval ?"0.0"
evalbot_7057 bool::true
geoffb ?eval ?0.0
evalbot_7057 bool::false
azuroth ?eval 1? 07:24
evalbot_7057 Error: unexpected "?" expecting digit, "_", fraction, exponent, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
azuroth ?eval 1?;
evalbot_7057 Error: unexpected "?" expecting digit, "_", fraction, exponent, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
azuroth oh, right
nothingmuch wow, that was fun
azuroth what was?
geoffb ?
nothingmuch replied to the gather : async { } thread 07:25
implemented scook's function
and gathedr
conclusion: perl 6 needs continuations
conclusion 2: perl 6 is fucking cool
geoffb :-)
nothingmuch, do you happen to remember what the boolean context rule for Pairs is?
nothingmuch nope 07:26
geoffb damn
nothingmuch i'm guessing ?$pair.snd
geoffb huh?
nothingmuch boolean context of the values
value
www.nntp.perl.org/group/perl.perl6....uage/23139
geoffb ?eval my $foo = 1 => 2; $foo.snd 07:27
evalbot_7057 Error: No compatible subroutine found: "&snd"
geoffb ?eval my $foo = 1 => 2; $foo.2nd
evalbot_7057 Error: unexpected "." expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
geoffb ?eval my $foo = 1 => 2; $foo.value
evalbot_7057 \2
nothingmuch aye
?eval my $foo = 1 => 2; ?$foo
evalbot_7057 Error: Insufficient number of required parameters: 0 actual, 1 expected
nothingmuch ?eval my $foo = 1 => 2; ? $foo
evalbot_7057 Error: Insufficient number of required parameters: 0 actual, 1 expected
nothingmuch ?eval my $foo = 1 => 2; $foo ?? 1 :: @
geoffb and therein lies my problem
nothingmuch ?eval my $foo = 1 => 2; $foo ?? 1 :: 2
evalbot_7057 Error: unexpected ":" expecting operator or "!!"
nothingmuch ?eval my $foo = 1 => 2; $foo ?? 1 !! 2
evalbot_7057 1
nothingmuch ?eval my $foo = 1 => undef; $foo ?? 1 !! 2 07:28
evalbot_7057 1
nothingmuch bah
nothingmuch is really amazed at how easy 'sub buffer_lazy' was
geoffb Man, perl6-language needs a better archive interface than nntp.perl.org 07:29
nothingmuch google hasn't gotten the msg yet 07:30
geoffb ?eval my $foo = undef => undef; $foo ?? 1 !! 2 07:31
evalbot_7057 1
geoffb ?eval my $foo = undef; $foo ?? 1 !! 2
evalbot_7057 2
geoffb So it seems a Pair is true, but prefix:<?> doesn't know how to handle it 07:32
At least, that's the way pugs sees it
QtPlatypus ?eval my $foo = undef=>undef; ?$foo; 07:33
evalbot_7057 Error: Insufficient number of required parameters: 0 actual, 1 expected
QtPlatypus ?eval my $foo = undef=>undef; ? $foo;
evalbot_7057 Error: Insufficient number of required parameters: 0 actual, 1 expected
QtPlatypus ?eval my $foo = undef=>undef; say ?$foo;
evalbot_7057 Error: Insufficient number of required parameters: 0 actual, 1 expected
nothingmuch submit a bug report? 07:35
i.e. test?
geoffb I was planning to. I was hoping someone knew (for relative sure) the correct booleanization. 07:37
So I could make a test better than "this shouldn't error"
nothingmuch geoffb: i think you get to decide ;-)
geoffb heh
nothingmuch the most sensical thing is, IMHO, value, but that's just an opinion
ods15 hya nothingmuch 07:38
azuroth does that mean the ternary for it is buggy too, then?
or is that entirely different :x
nothingmuch hi ho 07:39
geoffb fair nuf. The only other halfway rational thing I can think of is the way ternary is interpreting it: It's a complex thing, so therefore true.
ods15 ?eval 5
evalbot_7057 5
ods15 ?eval 5;
evalbot_7057 5
ods15 hmm, that's slightly interesting
nothingmuch azuroth: i think it's a syntactic issue
ods15: how come?
last statement of any block has optional ;
ods15 what does ; do?
nothingmuch it's a separator more than a statement closer 07:40
and it allows empty statements
my $foo = do { ...; $x };
my $foo = do { ...; $x; };
ods15 well, i thought ; turns an expression into a statement
nothingmuch not really
it's more mundane than it seems 07:41
ods15 mundane?
nothingmuch every statement is possibly an expression and vice versa
geoffb Evil bug workaround: # my $update = %move_update{$command} or return;
my $update = %move_update{$command} ?? %move_update{$command} !! return;
ods15 'if' ?
nothingmuch if is a construct, not a statement
ods15 ?eval if(0) { 1 }
evalbot_7057 undef
ods15 ?eval if(0) { 1 } else { 2 }
evalbot_7057 2
nothingmuch although in pugs it's hacked to be an expression too ;-) 07:42
ods15 ...
nothingmuch that's not what you think it is
this is for
ods15 if is a statement :)
?eval $a = if(0) { 1 } else { 2 };
evalbot_7057 Error: unexpected "i" expecting term reserved word
nothingmuch sub factorial ($n) { if ($n == 0) { 1 } else { $n * factorial($n - 1) } }; factorial(5);
ods15: no, it isn't 07:43
ods15 ?eval $a = (if(0) { 1 } else { 2 });
evalbot_7057 Error: unexpected "i" expecting expression reserved word
nothingmuch ?eval sub factorial ($n) { if ($n == 0) { 1 } else { $n * factorial($n - 1) } }; factorial(5);
evalbot_7057 120
ods15 hmm
?eval $a = do{ if(0) { 1 } else { 2 } }; $a
evalbot_7057 Error: Undeclared variable: "$a"
ods15 ?eval my $a = do{ if(0) { 1 } else { 2 }; }; $a
evalbot_7057 \2
geoffb boo-yah!
nothingmuch ods15: "every block is a closure"
ods15 geoffb: damn where is that from 07:44
nothingmuch so oevery block can return
hence every block can do an implicit return
geoffb managed to get to step 40 in his conversion of Perl 5 OpenGL code from his perl.com articles to Perl 6
ods15, it has been a long damn road.
Only 35 more steps to go, so far. 07:45
Of course, I'm hoping to make the Perl 6 conversion be article 6. I've only published 4 so far, so the goal will get farther away before I'm done.
ods15 geoffb: hmm, oh, i know, from GG
geoffb blinks 07:46
GG?
ods15 gilmore girls
in the ep where she interviewed some geek he kept saying booyah
geoffb oh, you mean the exclamation "boo-yah!"?
ah, well, not from there, but I have no idea where 07:47
QtPlatypus boo-yah is a canadiean thing I think.
geoffb OK, now that I have the workaround in place, time to go file a pugsbug
o/~ Blame Canada! o/~ 07:48
nothingmuch boo-yah much older than gilmore girls, ods15
ods15 nothingmuch: yes i know, but tried to remember where _I_ know it from :)
nothingmuch ah 07:49
azuroth ~ is concat? what about . ? 07:51
geoffb Wheee, wikipedia rules: en.wikipedia.org/wiki/List_of_catch_phrases
azuroth for some reason, wikipedia is firewalled off at my college-ish-thing
geoffb that's just wrong. Wikipedia *is* college 07:52
azuroth, where do you go?
(to college, I mean)
azuroth a TAFE in Australia
geoffb TAFE? 07:53
QtPlatypus Techincal and Further Education
azuroth yeeah
it's like university for dropouts?
geoffb Like DeVry in the US?
QtPlatypus Its a Technical Collage. 07:54
nothingmuch azuroth: . is method call
azuroth ah, okay
?eval $a = "second"; $b = 1=>2; say $b . $a; 07:55
evalbot_7057 Error: unexpected "." expecting operator, ":", ",", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
azuroth ?eval $a = "second"; $b = 1=>2; say $b.second(); 07:56
evalbot_7057 Error: Undeclared variable: "$a"
nothingmuch geoffb: google groups got the message: groups.google.com/group/perl.perl6....655531e6c3
azuroth err, whoops
?eval my $a = "second"; my $b = 1=>2; say $b.second();
evalbot_7057 Error: No compatible subroutine found: "&second"
azuroth ?eval my $a = "second"; my $b = 1=>2; say $b.$a();
evalbot_7057 Error: unexpected "." expecting word character, "::", term postfix, operator, ":", ",", postfix conditional, postfix loop, postfix iteration, ";" or end of input
azuroth d'oh
geoffb nothingmuch, nod. I guess now we know how long the GG backlog is. :-)
nothingmuch ?eval my $a = "value"; my $b = 1 => 2; $b.$a;
evalbot_7057 Error: unexpected "." expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
nothingmuch darn 07:57
?eval my $a = "value"; my $b = 1 => 2; $b.value;
evalbot_7057 \2
ods15 ?eval my $a = "value"; my $b = 1 => 2; $b.$a();
evalbot_7057 Error: unexpected "." expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
nothingmuch ?eval my $a = "value"; my $b = 1 => 2; $b ~ $a;
evalbot_7057 pugs: src/Pugs/Prim.hs:1286:13-36: Non-exhaustive patterns in lambda
ods15 that's a shame
nothingmuch hah
ods15 bbl
nothingmuch ods15: we'll have that, worry not
we have it in prel 5
perl 5
ods15 we do?
nothingmuch i use it all the time
yep
you can use a var containing a string or a code ref as a method
geoffb ?eval my $a = "value"; my $b = 1 => 2; $b.::($a)
evalbot_7057 Error: unexpected "." expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
nothingmuch very handy for dispatch table behavior 07:58
sub dispatch {
my $self = shift;
my $thing = shift;
ods15 heh. speaking of which, someone asked me to take a list and make a "count" of each elemen in the list and was amazed how fast i did it in perl..
geoffb ?eval my $a = "value"; my $b = 1 => 2; &::($a).($b)
evalbot_7057 \2
nothingmuch if (my $method = $self->can("do_" . $thing->moniker)){ $self->$method($thing) };
geoffb got it
nothingmuch }
ods15 moniker? 07:59
azuroth name?
ods15 bbl
nothingmuch ods15: err, yes, that's what perl is about. make things easy =)
define: moniker
geoffb No definebot, I take it
nothingmuch or in our example search.cpan.org/~kasei/UNIVERSAL-mo...moniker.pm
oops, that was a google query
www.google.com/search?client=safari...p;oe=UTF-8
it has the onload focus crap 08:00
nothingmuch really hates that, especially about amazon
whenever you do tabbed browsing in amazon it makes the browser jump around
azuroth ack
geoffb You know, this is cool and all: 08:01
?eval my $a = "value"; my $b = 1 => 2; &::($a).($b)
evalbot_7057 \2
geoffb But I really want this:
./::($action).($command, @args); 08:02
nothingmuch "it's stuck in while(true) waiting for sub-processes stopping, but stopProcess() fails because of wrong credentials got from hrcmdrc."
that's the bug report for the setup program
geoffb I wonder . . . .
nothingmuch i hate that code =(
geoffb mine? Or the setup program?
nothingmuch the installer for our product at work
geoffb ah
nothingmuch it's a classic example of bad management
someone from the QA team with only bash experience changed departments 08:03
so this was her learning project
she didn't know OOP, didn't know C++ and didn't know Qt
the code is a total mess
replacing it is out of the question
fixing it when it goes wrong is hard
for example, this bit of code could be fixed by using exceptios 08:04
but i don't think she knew of exceptions and how to use them
there should be a polling wait loop to make sure the prooduct goes down cleanly when upgrading
if it takes too long a timeout is raised
if it doesn't work at all an error is raise 08:05
d
but in the current code it just loops
azuroth ack 08:07
geoffb bleah 08:08
pugsbug committed 08:18
svnbot6 r7058 | geoffb++ | New t/pugsbugs/pair_boolean.t for broken pair booleanization 08:19
geoffb Hmmm, I'm decently passed 2**5 commits, but it will be a while before I get to 2**6, I think. 08:21
s/passed/past/ 08:22
Clearly, I need sleep
"But mommy, I don' wanna go to bed!"
ods15 nothingmuch: do you have a job or anything?... 08:24
nothingmuch yes
that's what I'm complaining about 08:25
azuroth buy me a job
ods15 geoffb: hehe, that's funny, the act of growin up is becoming your own mommy :)
geoffb :-)
nothingmuch not the job itself, but one of the things i maintain
ods15 nothingmuch: ah, cause you're just connected and active atm, soo...
nothingmuch ods15: yep... 08:26
two screens =)
nothingmuch hears ods15 in his minds ear: "isn't that laptop screen enough?"
well, no. I have another 19" flatscreen just to the left of it ;-)
azuroth I have a 21" crt. :D 08:27
geoffb Mmm, 21" CRT . . . 08:29
geoffb loves everything about his, except for the total loss of desk real estate
ods15 whatever
brb
geoffb oh, and the unhappy lights on the UPS every time it degausses 08:30
g'night all 08:31
geoffb is finally heading to bed
azuroth night
is there a bug tracker for pugs? 08:40
gaal "Champion needed: command-line processing in Perl 6": www.livejournal.com/users/gaal/171558.html
nothingmuch hopes it isn't damian conway 08:45
gaal azuroth: t/pugsbugs
or more genrally: grep -r todo t
generally 08:46
azuroth ahh, cool 08:50
gaal bugs that are fixed don't (usually) get their tests removed 08:51
so that if they resurface we (1) catch them early and (2) already have some context about them
and of course have a test to know when they're refixed. 08:52
azuroth makes sense 08:54
masak gaal++ # for the getopt post
gaal why, thanks. it's been on my mind for months now but i never got around to writing it 08:57
for the same reasons i guess that i never actually did the getopt thing myself 08:58
masak gaal: how difficult is it? 09:29
svnbot6 r7059 | putter++ | pugs: a somewhat more portable #! incantation 09:30
azuroth svn ups 09:31
09:41 davidra is now known as jp-autark
nothingmuch masak: IMHO the next generation of Getopt libraries should be multilayered 09:43
gaal masak: it shouldn't be crazily difficult. it depends on how ambitious you are. 09:44
nothingmuch the first level should provide an abstract interface for storage of named parameters in an array
this includes two elements which form a pair
one element which is 'foo=val'
gaal i think a cleaned-up version of getopt::long is fine for a start
nothingmuch a filter callback to decide what is an option and what isn't
gaal though anything nothingmuch tells you now is probably smart too
nothingmuch a way to get certain things to be synonymous 09:45
(short options, etc)
gaal and yet, like i said, we want something before everything.
nothingmuch then on top of that we can leverage subtyping and D::FV style interfacing for parameter validation
subclasses of the basic array<->named mapper can add features such as clustering
or non standard prefixes 09:46
the most crucial thing is to resist adding functionality that is not bare essentials
gaal nm: don't forget though that not every cli is option based.
nothingmuch and to refactor every composite decision into smaller methods
you mean like 'svn --universal_option up --sub_option'
?
gaal yup. i sure want a library for that! 09:47
nothingmuch okay, here's a thought:
the basic array to named mapper is an event parser
gaal that dispatches to another parser?
that works.
nothingmuch right
gaal that's how we did it in logjam 09:48
nothingmuch the events should be as informative as possible
gaal except not prettily or generically.
but:
you want to make interfacing to the data convenient
nothingmuch then a XML::SAX filter like approach can help unwind certain things:
gaal there's the api side of this to think of too
nothingmuch clustered options become single entities, etc
what do you mean?
gaal i mean how does the programmer access the parsed results?
nothingmuch ah 09:49
gaal what you said gives the power to do anything
nothingmuch the layered approach works:
gaal i also want a conventional and convenient practice
nothingmuch an "easy" library leverages the event parser, and collects key<->value mappings in the handler
my $opts = Getopt::Easy.new; 09:50
$opts.optname; # just parsed out
this is the simplest case where you don't even specify what you want
the constructor for Getopt::Easy uses a factory methodo to create an event parser
listens to events from an array (defaults to ARGV) 09:51
gaal oh, new was wired to @*ARGS because i didn't specified anything else? that sounds like IO::All :-)
nothingmuch and then collects the results
sensible defaults are a good thing
gaal sure
nothingmuch implcit behavior isn't
there's a line between them ;-)
IO::All let's you construct an HTTP server in one line. I don
gaal especially in this case where 98% of the cases you'll indeed want @*ARGS
nothingmuch 't think that's a good thing for anyone who doesn't know IO::All inside out 09:52
right
gaal ok ok no time for wars now :)
nothingmuch anyway, my #1 problem with Damian code is:
it's usually very brilliant, except for a small bit that bothers me
but i can never reuse it
because everything is in one huge sub
gaal forget the code
nothingmuch or makes weird assumptions about state
i'd like a Getopt library that is not like that at all 09:53
gaal reuse design, reuse ideas, reuse specs.
nothingmuch right
gaal reuse tests if you can :-)
nothingmuch and since there are so many approaches and requirements for getopting, the only way to create a standard library is to create a standard set of libraries that get along and encourage extensibility
anyway, enough of this, i've got to get back to debugging this installer thing 09:54
gaal let's identify a few "styles" then.
aw, we only just started :)
nothingmuch long options with short synonyms
when boolean, with clustering
gaal that's essentially getopt::long 09:55
nothingmuch that's "the" approach most small things use
yes, but Getopt::long is not a convenient
and it's not reusable either
i can identify 2 processes to getting there
maybe if i think more i can get a 3rd one out
the event parser notifies of tokens to the Getopt::Long thingy 09:56
there are two types of tokens, aside from "regular"
--foo and -f
in the base class for a handler these simply delegate to the regular token handler
the base class also stops processing at '--' and puts the rest in a special normal args array
anyway... when the ::long variant gets a single slash event it tries to figure out char by char what they are 09:57
it translates each one of these to a call to the single dash event recursively, for the single options
when a single option is a single char it looks for a boolean option and enables it 09:58
the moment the clustered parser finds an option that isn't boolean, the rest of the string is gobbled as a parameter to that option
recouple that, it's too separate
the long option thingy behaves a bit differently - it puts the option on the stack 09:59
and gobbles up the next thing as an argument
all setting of options is first filtered through a synonym normalizer
i take it back 10:01
clustered options do reraise events
gaal (you're describing g:l's algorithm, with what you thing is wrong about it? or the design you're proposing?)
(ah, what you're proposing. okay)
buu Hrm. Does perl6 have a 'Safe' type module that actually works yet? 10:13
integral pugs has a safe-mode which works
buu Yeah, but I don't want to fork pugs 10:14
integral ?eval say "I'm safe!"
evalbot_7059 I'm safe! bool::true
buu I was thinking about a mush using perl6 as a scripting language
But it needs to be safe, and fast
integral pugs is the former, but not necessarily the latter.
embedded haskell can be safe (see hs-plugins)
buu But I don't like haskell!
Dunno. I guess the only real way is to provide a super limited set of commands 10:15
Including no loops 10:16
I mean, how do you safely handle'while(1)' no matter what language you're using?
azuroth mush?
nothingmuch gaal: i waas trying to describe the G::L process 10:17
buu azuroth: Yeah!
nothingmuch and how it oculd be implemented as a second layer on top of an event parser
azuroth ...woo, yeah!
buu I guess if you strip out say, functions, loops, and gotos it would be safeish 10:18
azuroth but... 10:19
nothingmuch uh?
buu Seems kind of pointless.
nothingmuch you can place time limits
buu nothingmuch: sure, but that starts getting ugly
nothingmuch Time::HiRes can set an alarm to be delivered after N cpu seconds
as can the limit interface (sends a deadly signal)
buu look Object;
10 seconds later 10:20
It responds
nothingmuch as for IO - that can be filtered out in a well shaped language
pugs knows to do this
and what do you mean by that?
that X is too slow?
buu nothingmuch: Yeah 10:21
nothingmuch what about perl 5?
buu Er, no. Not the speed of the language
nothingmuch Safe.pm is Good Enough, i think
then?
buu Imagine walking in to the room. It executes code to display the contents of the room
The code includes a while(1)
It would take X seconds to display the room 10:22
nothingmuch oh
buu Any X seems too long to me =/
nothingmuch in that case: rooms with while (1) should be moderated out of the system
if it's a wiki style mush, then the user base should know how to do that
and a time limit for room rendition can be made
and rooms can be pre-rendered whenever the manhatten distance to the current room is 1 10:23
buu Yeah, I suppose
Dunno about "wiki style"
That's a Bad Idea
nothingmuch what is the mush user base going to be?
buu Sorry, I don't understand. People? 10:25
I would assume fairly educated perl programmers.
nothingmuch PING 1127298315 362945
buu waves
azuroth ?eval 2 err 1 11:01
evalbot_7059 2
azuroth ?eval 0 err 1
evalbot_7059 0
azuroth ?eval false err 5
evalbot_7059 Error: No compatible subroutine found: "&false"
azuroth ?eval 0 or 2
evalbot_7059 2
azuroth how is PGE and rules stuff going? 11:04
dada ?eval bool::false err 5 11:11
evalbot_7059 Error: No compatible subroutine found: "&bool::false"
dada ?eval ?0
evalbot_7059 bool::false
dada mmm
?eval bool::false 11:12
evalbot_7059 bool::false
dada ?eval (bool::false) err 5
evalbot_7059 bool::false
dada isn't this a bug?
?eval bool::false or 42 11:13
evalbot_7059 Error: No compatible subroutine found: "&bool::false"
dada ?eval 42 or bool::false
evalbot_7059 42
dada please, tell me it is a bug :-) 11:14
azuroth I'll tell you so 11:16
and we can pretend we combined have the power to enforce it...
is err equivalent to or? 11:17
dada not really equivalent
but they're both infix operators
?eval bool::false and 42 11:18
evalbot_7059 Error: No compatible subroutine found: "&bool::false"
ods15 ?eval !0
evalbot_7059 bool::true
dada the problem is bool::false, not err
or, more to the point, the problem is the parser
?eval 42 or false 11:20
evalbot_7059 42
gaal wha--! dada, please pugsbugs.
dada gaal: any pointer? 11:21
how to pugsbug, that is
gaal sure, add a test in t/pugsbugs
dada ok, I'll try
gaal thanks!
ods15 gaal: yeah, i used to think pugs was perl6 bug tracking system :0 11:22
:)
gaal yes, it's also a spec bug filter 11:23
btw: 11:24
?eval bool::false() err 42
evalbot_7059 bool::false
gaal which also isn't right :)
i think this may actually be two bugs 11:25
dada mmm
gaal in err and in bool::false's arity or some such.
dada I think is something more deep 11:26
bool::false should be a constant, but in fact it is implemented as an accessor
eg. like perl5's "use constant" stuff 11:27
gaal an accessor? no, here's the implementation:
azuroth ?eval ?0
evalbot_7059 bool::false
gaal op0 "bool::false" = const $ return (VBool False)
Pugs.Prim:62
dada mmm 11:28
ok, so maybe constants are implemented as accessors :-)
?eval Inf or 0
gaal not sure what you mean by that?
evalbot_7059 Inf
dada I mean something like sub bool::false { return 0 } 11:29
no, maybe not
I'm just plain wrong
I can't svn up!
gaal what's the error? 11:30
dada svn: Failed to add file 'pugs': object of the same name already exists
gaal ah, yes. it's a script now. simply move away the file.
(you can delete it)
dada but it isn't there...
there was a pugs.exe
(I'm on Win32) 11:31
oh well, deleted pugs.exe, now everything works
what is, gramatically speaking, Inf? 11:32
gaal a Num, I think. 11:33
that is, a literal number 11:34
dada mmm
gaal yes, it's a named literal. Pugs.Parser:1872 11:35
dada seen
while bool::false, in fact, is a primitive
masak gaal: so, if i started porting getopt::long to perl6, would that further things?
dada Bool pre bool::false safe ()
masak i think i know perl6 sufficiently well 11:36
gaal masak: yes!
dada so, it looks in fact something like sub bool::false() { return 0 }
masak but would probably need some hand-holding here at #perl6 in places
gaal: ok, i'll get on it
gaal masak: my recommendation, feel free to change things you want to change
and start with porting the tests :)
re: perl6, nobody knows it perfectly. that's what we're here for ;-) 11:37
masak gaal: good idea w/ tests
i can even commit them as i go
gaal yes, commit muchly. 11:39
masak first question: is there a good, working example p6 module in the pugs tree somewhere?
gaal dada: why is that a problem?
masak: yes, look in ext/ for a few
masak oki 11:40
gaal masak: also see tpe.freepan.org/modules.html though many of those have never actually run
dada gaal: because bool::false is declared (for the parser) as a function with prototype (), so bool::false() of course works
gaal dada, that doesn't mean what perl 5's prototype () means 11:41
dada mmm
gaal it means there's a prim with arity 0
dada have to go now
later
gaal bye!
masak, also see docs/porting_howto if you haven't yet. 11:43
masak gaal: i have, but i will, again
gaal also also, avoid rules for now, and prefer p5 regexps, because not everyone has parrot. 11:44
masak right 11:46
can always refactor them later 11:47
GeJ gaal: do you have an idea about when a new pugs release may occur?
gaal masak, sure, they're clearly labeled all over pugs. 11:52
masak gaal: in what sense? 11:53
gaal GeJ, no. Autrijus is traveling now (I hope! :) and has to recover from multiple hardware failures
masak: in that it's no problem to grep ':Perl5' all over the code tree :-) 11:54
when we do want to move upwards that is.
masak ah
let's see... qw(...) is spelled <...> nowadays, yes? 11:56
gaal yup 11:57
<< ... >> if you want interpolation
masak yes, found it in A02 11:58
azuroth ?eval <a b>.length
evalbot_7059 Error: No compatible subroutine found: "&length"
azuroth ?eval $a = <a b>
evalbot_7059 Error: Undeclared variable: "$a"
azuroth ?eval my $a = <a b>
evalbot_7059 ['a', 'b']
azuroth buhh
gaal elems 12:00
there is no length.
azuroth ahh
gaal masak: better work with the synopses, not the apos 12:01
azuroth $eval <a b>.elems 12:02
?eval <a b>.elems
evalbot_7059 2
azuroth ?eval my $a="a b"; <<$a>>.elems
evalbot_7059 Error: No compatible subroutine found: "&elems"
azuroth ?eval my $a="a b"; @a = <<$a>>; say @a.elems;
evalbot_7059 Error: Undeclared variable: "@a"
azuroth ?eval my $a="a b"; my @a = <<$a>>; say @a.elems; 12:03
evalbot_7059 2 bool::true
azuroth I could've probably gotten a quicker answer by asking...
masak gaal: right. maybe a good time to get familiar with the synopses, i've mostly read the apocs 12:04
question: what sort of comparison does is() do, numeric or stringy? 12:05
or some smart, dwimmy stuff? 12:07
gaal sorry, i'm also $working so i'm here a little sporadically 12:08
masak no problem 12:09
gaal is() is defined in ext/Test/lib/Test.pm
masak yes
it calls proclaim()
gaal "eq"
masak oki, thx 12:10
does that mean i should rewrite numerical comparisons as ok() calls?
gaal you can force numeric context if you need to 12:11
is(+$x, +$y)
or if you fear something that should be returning a number might not be, insert an explicit test for that
masak ah, ok 12:13
right. here goes 12:17
masak commits
svnbot6 r7060 | masak++ | Getopt::Long test file gol-basic.t 12:19
masak is 'undef' still in perl6? 12:24
gaal "undefine" now
masak ok
i like that better
gaal also, maybe we can ditch g:l's automatic symbol generation? those two undefines there are really weird: they're not even use strict clean 12:25
also: @ARGV is spelled `@*ARGS` now 12:26
and, where you can, try adding a test description
masak yes
i can fix @*ARGS
gaal giggles at 'plan 9' 12:27
masak but what about the automatic symbol generation?
i thought i would get away with an automatic translation :)
gaal it's okay to change the api a little. 12:28
masak yesyes, but to what? i have no good ideas right now 12:29
my head is full of translationg p5->p6
gaal but a core module ought not assume you're running without strictures, because those will be turned on by default in p6
oh, you know how you can say
masak i agree
gaal (in p5)
GetOptions \our %Config, qw(help user|u=s password|p=s); 12:30
svnbot6 r7061 | masak++ | corrected gol-basic.t: undef is now undefine
r7062 | masak++ | corrected gol-basic.t: @ARGV is now @*ARGS
masak that is, store stuff in a hash
gaal that is, don't ask the library to do any symbol magic at all
in fact:
you can probably do away with the OUT variable and do: 12:31
my $conf = GetOptions <spec>
and have the library raise an exception when it fails
well, fail when it fails. :})
masak so GetOptions returns a hash
gaal hashref, yes 12:32
masak yes
gaal seems reasonable to me.
masak sounds neat
gaal that's how i always use it anyway
masak i'll rewrite the tests to that end
gaal i don't like the ad-hoc switch args
*but*, some people do like things like:
GetOptions "user|u=s" => \my $user, "password|p=s" => \my $pass, "help" => \&help 12:33
so don't prevent that :)
masak not sure i grok that syntax right away, but ok :) 12:34
gaal the good news is that you can easily detect how you were called
oh, that was perl 5 syntax -- it's one of the ways you can use G::L today
and it's reasonable to allow it in the ported version too
you pass a hash (list of pairs in p6) of each option and "where you want to put it" 12:35
masak oh ok 12:36
gaal in the case of the first two you <declared and passed a reference in one go> to scalars
and in the third, the "help" option, you gave a coderef to dispatch if the option was activated.
masak yes 12:38
this is exciting!
gaal :) 12:40
masak commits again 12:41
feel free to have a look, i might have missed things
gaal sure 12:43
looks good. just: ok($options = GetOptions ("foo", "Foo=s")); 12:45
svnbot6 r7063 | masak++ | made gol-basic.t more perl6ish: GetOptions now returns hashref
gaal you can say GetOptions <foo Foo=s>
though you don't have to :-)
masak oh yes, that's nicer 12:48
masak changes
svnbot6 r7064 | masak++ | made gol-basic.t more perl6ish: replaced list of strings with <...> 12:51
masak what do you think gaal, should i still support the call syntax w/ OUT variable?
eg GetOptions (\%lnk, "foo", "Foo=s") in perl5
gaal your call... i can't think of a reason to include it right from the start :) 12:54
though 12:55
i have my own pattern of using this module
i don't know, how useful do you think the current return value of getoptions is?
svnbot6 r7065 | masak++ | added test descriptions in gol-basic.t 12:57
masak the only reason i can see for including it is the principle of least surprise
a port should deprecate as little as possible 12:58
gaal true, but it should also be in the style of the target language. so for example we want to encourage fail 12:59
to signal failures
in libraries.
masak yes 13:00
but here it's more a question of providing extra behaviour for free
gaal you always have that question when working on an interface 13:01
masak of course
gaal imho "fail" is the way to go. and make the thing that's returned better than a hashref, make it an object
so you can also query it later for the info that would have been in the return value (what is it, number of options?) 13:02
number of matches?
masak a Getopt::Result object or something
i don't know
i can check
seems to return true iff all went well 13:05
gaal yes, but what true? it's a count of something. 13:08
oh, you're right, it's just a boolean 13:09
so by all means we can get rid of the out variable with no loss of any information
you'll have to spell your invocation a little differently, but code that handles errors can stay essentially the same 13:10
that is, if you want not to use exceptions
no fatal; my $opts = getoptions err die "can't parse: $!....";
masak how will that look in the test files? 13:11
gaal no fatal; ok(! getoptions("bad spec"), "parser detects bad spec"); ok($!, "some error", "yields useful error") 13:13
or without mucking with use fatal: 13:14
dies_ok { getoptions "bad spec" } "parser detects bad spec"; ok($! ....
(hmm, i *think* dies_ok preserves $!. don't trust me on that one :-) 13:15
masak :) 13:16
svnbot6 r7066 | masak++ | fixed capitalisation in gol-basic.t 13:19
masak i get a new evalbot for every commit i do 13:21
how wastefully cool isn't that? :) 13:22
svnbot6 r7067 | masak++ | Getopt::Long test file gol-linked.t 13:25
masak oh my, Test.pm is broken since the interrobang decision :( 13:45
dare i change it on my own? 13:46
i mean, it's just a s/::/!!/ change of syntax
masak changes it
what the heck
QtPlatypus Worce comes to worse we revert the files.
masak hmm 13:49
looks fixed already
maybe i just need recompile... strange
masak compiles pugs
nothingmuch ah! finally, some internet
Blondie now compiles to C much better 13:50
now i'll be refactoring Thunk, and adding branch support at the tree level
then I'll try harder math with C and Perl together
and then i'll work on lists, the type inferrencer, and runtime deferred types
e.g., the type of X is either IV or PV because X is an element of an array which has interacted with IVs and PVs 13:51
so all of the elements in the array are boxed with type info
svnbot6 r7068 | nothingmuch++ | Symbolic representations of reused nodes in C output 13:55
r7069 | nothingmuch++ | Folding of constants
masak seems i have an old version of Test.pm in /usr/lib/perl6/ 13:57
what do i need to do?
kolibrie delete it? 13:59
masak then i will have no version of Test.pm in /usr/lib/perl6/ :) 14:00
QtPlatypus delete it and then check out the new version
masak but this is /usr/lib/perl6/, not part of the pugs source tree
kolibrie the install path for perl6 modules changed a while back
masak ok... 14:01
svnbot6 r7070 | iblech++ | Usual svn props. 14:31
deego (curious newbie..) Is perl6 being developed in haskell altogether? Or, is pugs just an alternative implementation? 15:28
And, if the latter, what is the purpose? 15:29
QtPlatypus deego: Bootstrapping
integral It's mostly the latter (except being the only implementation, it looks a bit like the first...) 15:30
svnbot6 r7071 | iblech++ | * t/data_types/lists.t: =begin more-discussion-needed'ed, as there is no 15:31
r7071 | iblech++ | final ruling on the \(...) thread yet (link included in the test).
r7071 | iblech++ | * t/pugsbugs/pair_boolean.t: begin more-discussion-needed'ed, for the same
r7071 | iblech++ | reason (link included as well).
dudley_ deego: The main purpose of Pugs is "fun" 15:32
integral and to demonstrate that it really is possible to require a cluster to just compile a program! 15:33
Limbic_Region anyone interested in the "run once" thread may be interested in following a related thread at PerlMonks I just posted perlmonks.org/index.pl?node_id=493826 15:34
deego thanks dudley_, QtPlatypus 15:42
and integral :) 15:43
evalbot_7071: help 15:44
Odin- deego: Perl6, although it will have an "official" implementation isn't intended to be bound to a single implementation. Although, to be fair, that's the likeliest outcome... :p
deego :)
does evalbot_7071 eval perl expressions?
Odin-: I see 15:45
Khisanth Odin-: and I would say the preferable one ...
nothingmuch bah
nothingmuch is having trouble with Y combinator in Blondie 15:46
Khisanth sure there are advantages to multiple implementations but there also some very annoying disadvantages
pasteling "nothingmuch" at 82.81.247.180 pasted "*sigh*" (83 lines, 1.2K) at sial.org/pbot/13240
nothingmuch deego: watch 15:47
?eval 1 + 1
evalbot_7071 2
deego nothingmuch: thanks
nothingmuch ?eval class Foo { has $.x; submethod BUILD { $.x = 5 } }; my $f = new Foo; $f.x;
evalbot_7071 \5
nothingmuch the only thing it can't do is IO related stuff
and infinite loops: 15:48
?eval [+] 1 ...
evalbot_7071 pugs: out of memory (requested 1048576 bytes)
Khisanth nothingmuch: hey! that is actually valid perl5?
nothingmuch ?eval [+] 1 .. 10
evalbot_7071 55
nothingmuch no, that's perl 6
deego neat
nothingmuch [] is the meta reduction operator
it applies to infix operators, and is a bit like foldl/foldr
only i don't know if it has a defined "lean" 15:49
1 ... is the infinite list constructor for 1 to Inf
sub &*postfix:<...> ($n) { $n .. Inf } 15:50
stevan hey there nothingmuch
nothingmuch hi ho stevan
stevan I am about to commit generic classes in the metamodel :) 15:51
nothingmuch generic classes?
stevan you should like this one
yes
dudley_ Whoa
nothingmuch like C++ templates?
stevan yeah but not
Odin- Khisanth: I said nothing about that. ;)
nothingmuch delta(C++ templates, generic classes);
i mean
?eval delta(C++ templates, generic classes);
evalbot_7071 Error: No compatible subroutine found: "&delta"
dudley_ You mean classes that take type parameters
right? 15:52
nothingmuch dudley_: afaik that's the definition of a C++ template
stevan dudley_: yes, parameterized classes
dudley_ knows no C++
nothingmuch e.g. vector<Dog> is the template class 'vector' parametrized over Dog so in a sense it's a vector of dogs
stevan yup 15:53
I was reading a paper recently on how they do this
nothingmuch it's a bit like instantiating an anonymous class, which is how I bet you implemented it, right?
stevan Array[Int]
etc
svnbot6 r7072 | stevan++ | Perl6::MetaModel 2.0 -
r7072 | stevan++ | * we now have generics (kind of) see t/32_parameterized_classes.t for an example
r7072 | stevan++ | * fixed isa() in class
nothingmuch aye
stevan nope
and yes
nothingmuch nope and yes?
stevan the class macro can take either a hash ref of method/attr definitions or it can take a subroutine 15:54
the subroutine is expected to build the class manually
so ,..for parameterized classes all I did was to add another possible set of parameters
nothingmuch y combinator smashed my swap =(
stevan so if you pass an array ref, followed by a sub
you get back a parameterized class constructor 15:55
which is basically just an anon-sub, which will spit out a class when given the right parameters
its kind of a cheap fix 15:56
nothingmuch $::CLASS->add_method('STORE' => ::make_method(sub {
my ($self, $value) = @_;
($value->isa($T->name)) # || $value->does($T))
|| confess "Incorrect Type";
::opaque_instance_attr($self => '$:value') = $value;
stevan but it works
nothingmuch }));
that's what I suspected
stevan++
very nice =)
stevan nothingmuch: :)
nothingmuch is this implemented in $Object?
stevan nope
nothingmuch or $Class?
stevan it is all in the macro layer
nothingmuch oh
stevan the paper i was reading was talking about how you do not create the class until you have the paremeters
nothingmuch that's exactly like C++ templates 15:57
stevan yes I guess
nothingmuch they are instantiated only when the parameters are given
that causes mui headaches
stevan knows less C++ than dudley :)
mui?
dudley_ doubts that :)
nothingmuch lots, plenty, many, and much rolled in one
stevan oh
nothingmuch it's spanish
stevan thought it was some weird acronym
nothingmuch and since i don't know spanish it becomes polymorphic
=D 15:58
stevan nothingmuch: why does it cause issues ?
nothingmuch because some compilers are too dumb
stevan ah
no compilers here,.. its all runtime baby :P
nothingmuch and they instantiate template classes before the templates are fully defined
you wanna see what I was up to?
stevan I saw a big AST
and I have been wathing Blondie :) 15:59
nothingmuch that's a test that's causaing an infinite loop
stevan ah
Y combinator?
nothingmuch but the C compilation stuff is the Big Thing
stevan yes I saw that
that is very cool
nothingmuch Y combinator takes a function f and returns a function that takes a value x, and applies f to x and f itself
Odin- C compilation? :/ 16:00
nothingmuch Odin-: errm, yes
Blondie compiles down to C/
Odin- has clearly lost track.
Blondie? :p
stevan so it would look like : sub { my $f = shift; return sub { $f->(@_) }}
Odin-: Blondie is our Perl 6 fork ;)
nothingmuch Blondie is my toy language for trying to implement the compiler strategies i've been bringing up on p6l
stevan: aye 16:01
stevan hey fglock
Odin- Hm. I see.
fglock hi stevan
nothingmuch y(sub { my ($n, $f) = @_; if ($n == 0) { return 1 } else { return $n * $f->($n - 1) } })
stevan fglock: FYI - I just added (very rough) parameterized classes to MM 2.0 16:02
so, what is the issue with this nothingmuch ?
fglock parameterized classes? 16:03
nothingmuch ?eval sub y (&f) { -> $x { f($x, &f) } }; sub facty ($x, &f) { $n ?? $n * f($n - 1) !! 1 }; my &fact := y(&facty); fact(5)
evalbot_7072 Error: Undeclared variable: "$n"
nothingmuch ?eval sub y (&f) { -> $x { f($x, &f) } }; sub facty ($n, &f) { $n ?? $n * f($n - 1) !! 1 }; my &fact := y(&facty); fact(5)
evalbot_7072 Error: No compatible subroutine found: "&f"
nothingmuch ?eval sub y (&f) { -> $x { f($x, &f) } }; sub facty ($n, $f) { $n ?? $n * $f.($n - 1) !! 1 }; my &fact := y(&facty); fact(5)
evalbot_7072 Error: Undeclared variable: "$f"
stevan fglock: like Array[Int]
where Array can only hold Int objects 16:04
nothingmuch ?eval sub y ($f) { -> $x { f($x, $f) } }; sub facty ($n, $f) { $n ?? $n * $f.($n - 1) !! 1 }; my &fact := y(&facty); fact(5)
evalbot_7072 Error: No compatible subroutine found: "&f"
nothingmuch ?eval sub y ($f) { -> $x { $f.($x, $f) } }; sub facty ($n, $f) { $n ?? $n * $f.($n - 1) !! 1 }; my &fact := y(&facty); fact(5)
evalbot_7072 Error: Undeclared variable: "$f"
nothingmuch damnit
fglock cool - so Array doesn't need to check - how does this interact with Type (old question - what a Type really is?) 16:05
nothingmuch gives up on the y comb test 16:06
stevan fglock: well, the parameterized Array class would implement the checking
but you could get Array[Int] Array[Str], etc really easily
as for how it interacts with Type,.. I have no idea 16:07
nothingmuch: so is it choking Blondie?
nothingmuch stevan: you pervert
stevan nothingmuch: your sick,.. sick sick sick
stevan forgot he has to walk to the dog, bbiab & 16:08
gaal rehi 16:17
nothingmuch hi ho
gaal fe 16:24
svnbot6 r7073 | nothingmuch++ | Some smoke tests for the Blondie backends 16:35
gaal putter, ping 16:36
on win32, sometimes make doesn't precompile a prelude for me. has anyone seen this happen on other systems? 17:15
dudley_ gaal: It's never happened to me on osx, but I don't compile pugs as often as I used to. 17:17
gaal this is pretty recent, say two weeks. 17:19
svnbot6 r7074 | stevan++ | docs/journal - update of current meta-model activity 17:24
darkelectron so whats the deal with perl6? 17:36
gaal how do you mean? 17:37
darkelectron is it done yet?
its been years since I spent anytime with it
I haven't coded perl5 for like a year
gaal it's not done, but it's progressing nicely.
darkelectron ok
I was just wondering 17:38
be back in a year
gaal heh.
acme ;-) 17:46
autrijus ;)
stevan hola autrijus 17:47
how is @life?
autrijus see journal
gaal autrijus! 17:48
hello! :)
autrijus :)
<- epitome of badluck this week
but I survived, so it should me stronger, or something ;) 17:49
gaal at least your passport eventually surfaced...?
autrijus yeah. turns out .tw dhl and .us dhl knows nothing of .jp dhl shipment 17:50
still shows "no info available" even when I got it
stevan autrijus: so where are you now?
autrijus stevan: .tw, about to get some much deserved sleep - was death marching for three days
but I got a bundle of fine pugs t-shirts that surpassed my expectation 17:51
stevan very nice
autrijus I'm wearing it every day and that somehow kept me sane :)
stevan :) 17:52
svnbot6 r7075 | stevan++ | Perl6::MetaModel 2.0 -
r7075 | stevan++ | * fixed weirdness with Perl 5 subs to make the parameterized classes
r7075 | stevan++ | work correctly
autrijus I think I'm going to try Takahashi slides for ICFP for a change 17:53
er CUFP
seems a nice improvement over the Lessig style, or the MJD/Ingy style that I'm used to
stevan I have never seen them, but I trust your opinion on the matter :) 17:54
gaal so you're using Acme::Takahashi::Method? 17:55
autrijus stevan: www.rubycolor.org/takahashi/thinkin.../img0.html
gaal: the spirit of it :)
gaal :) 17:56
autrijus so, what's fun and exciting that I should mention in my talk?
blondie? 17:57
stevan Blondie is very cool yes
autrijus: what do you think of the parameterized classes hack? 17:58
I am not sure it is the right way to do it
autrijus stevan: the factory thing makes sense on runtime
though it's not really positional 17:59
stevan positional?
autrijus ah, nvm, the spec wasn't positional anyway
it's the compiler's job to translate Foo[Int, Str] into Foo('::T1' => ::Int, ''::T2' => ::Str) 18:00
stevan it's all sugar to me :)
szabgab hi autrijus 18:01
gaal that's why we call you sweet tooth stevan
autrijus greetings szabgab
szabgab you might know I am involved in the Hungarian Perl workshop[
on 22nd October
is there any chance seeing you there ? 18:02
autrijus on 22nd I'll be in Nordic
szabgab :-(
autrijus which is also 22nd
maybe the organizers can do another of those teleconference things
szabgab we might setup videoconference like you had in Austria 18:03
nearly the same people after all
autrijus right, that would work.
szabgab yeah I talk to Andras,
then it seems we'll meet in Israel
autrijus indeed 18:04
clkao szabgab! 18:05
szabgab: btw, hugary visa is insanely expensive
obra autrijus: you'll be at nordic perl workshop? 18:06
szabgab do you need a visa there ?
beppu autrijus, (my response is a little late, but....) takahashi's slides are simple but very cool. the big, bold lettering has a nice impact. I like.
szabgab it is EU
clkao but tokaj++
no, it's not schengen state
so need different visa
obra: yes he will and i will too
obra ooo
obra hopes the customer in .lt bites
autrijus obra: aye. sorry I missed the conf call but I was still deathmarching anywa 18:07
szabgab I see, I have Hungarian passport
autrijus y
obra autrijus: nod. it's ok
autrijus beppu: yeah. I've only seen it in black on white
szabgab clkao, btw can you also come to Israel ?
clkao when is that? 18:08
autrijus whilst I preferred white on black before. I wonder if there's something about takahashi that wants black-on-white
clkao: feb 06
szabgab sometime in February, no fixed date yet
svnbot6 r7076 | gaal++ | simplify lexical pragma stuff by dropping the cons list
clkao ok... we'll see.. when is lunar new year?
autrijus before that
I depart immediately after lunar 5th 18:09
szabgab really autrijus, do you have some preferred dates ?
autrijus er, fwiw, 06 stood for '06, not 6th
szabgab: well, midfeb sounds good, somewhere around 10th, just so I have more time to adjust for jetlag
szabgab yeah, Larry said basically the only date that is not good for him is the 11th :-) 18:10
autrijus cool, I'll be happy with 12th then
a repeated hackathon with Larry would be most welcome
szabgab I think we'll have to give him some time to come over from the US
autrijus k
szabgab I'll try to put the conf on 14-16 18:11
gaal autrijus, you'll be coming from .tw?
szabgab and hackathon afterwards
autrijus gaal: likely. why?
gaal no special reason. jetlag isn't too bad that way though, i think 18:12
5 hours difference, going westwards
might actually be in your favor, because confs usually start early in the morning :)
autrijus I certainly hope so :)
also I think the pre-conf hackathon format worked well for yapcna 18:13
szabgab but the drinking lasts late in the evening
autrijus just so there's more exciting things to report at the con
szabgab do you think it is better to hack before the conf ?
ah
geoffb (backlogging) What is the difference between Lessig and Takahashi? Lessig has less on each slide?
gaal szabgab, what drinking, autrijus will beat us all unconscious in the CPAN game :)
autrijus geoffb: no, lessig's font size are fixed
geoffb And hi, autrijus, nice to see you.
autrijus geoffb: takahashi always scale to 100% 18:14
geoffb ah, gotcha
autrijus nice to see you too :)
geoffb :-)
szabgab gaal even with jetlag ?
geoffb Well, new computer is (mostly) working, so coming back to where the flavor^Wfun is 18:15
autrijus cool, and just in time for ghc 6.4.1 which should also improve in the zippiness front
geoffb How so? Better optimizer?
autrijus yeah, less leak 18:16
geoffb thank HEAVENS
autrijus <cough>precompiled prelude</cough>
gaal szabgab, i wouldn't count on that to save us :)
heh heh
geoffb nodnod, maybe we can make the prelude longer without giving ghc dispepsia now 18:17
nothingmuch autrijus: how's life?
did the passport make it?
oh wait, i see
hurrah
gaal autrijus, is there a way for me to debug-print all the existing envs at a given point? i'm trying to debug a mislaid write to an env. i'm not sure this question even makes sense...
nothingmuch seen iblech 18:18
gaal fe
grrr, i'm trigger happy
autrijus gaal: all the existing envs?
gaal well, it's like this: i'm writing something with putRuleEnv 18:19
but it doens't turn out where i want it
nothingmuch autrijus: did you hear the blondie news?
gaal so either i'm writing it to some sort of a temporary env, or, well, i don't know :)
but i don't really grok the lifetime of an env, in a pure world, which is why my question may not be sensible 18:20
it's not even supposed to have a lifetime, is it
autrijus nothingmuch: yes I did, most amazing work 18:21
I got it running and I saw the C output.
nothingmuch: no README? ;)
nothingmuch phooey 18:22
it raises kwalitee
nothingmuch will henceforth stop pod tests, stop READMEs, changelogs, licence files, and whatnot.
i will explicitly insert one padly formatted pod file into every dist
and.... uh...that's it
well, no, i'm kidding 18:23
geoffb <troll>But POD already *is* badly formatted!</troll
nothingmuch geoffb++
gaal if it were the end of March nothingmuch would be releasing Devel::Uncover 18:24
nothingmuch huh? what's March got to do with it?
geoffb Perhaps the Ides of March?
gaal April :-)
(first)
nothingmuch ah
geoffb :-)
nothingmuch i don't know what it'll do ;-) 18:25
nothingmuch fills a few more songs into the ipod, and goes biking
geoffb has been rolling the Getopt stuff around in his head . . . (ow, ow, stop that!)
gaal nothingmuch, it'll probably search for tests and delete them? 18:26
nothingmuch autrijus: i am going to break the AST tonight, so when you return from CUFP things should be better
geoffb You know, maybe the solution is to just stop the hackish designs and go straight to defining the command line as a language, using rules . . . .
nothingmuch gaal: hmm... interesting
geoffb (yes, I understand P6 rules don't work now, I'm thinking about the Happy Place(tm))
nothingmuch geoffb: the problem is that there are too many dialects
and the worse problem is that they are all equally valid
gaal geoffb, have you seen my post about that? 18:27
geoffb No, that's what I'm saying . . . have an engine that parses an array of arguments according to a grammar. The only thing special is that the shell has already done a tokenize pass for you.
gaal, yes.
er, at least at LJ
gaal yeah, that one. 18:28
geoffb So specify all standard dialects as grammars,
nothingmuch geoffb: err, that's what I was sort of thinking of earlier
geoffb rather than regex monstrosities
nothingmuch except with an event parser approach
and stacking layers of high levelism
geoffb Yeah, I was offering grammars as an alternative to event parser approach
nothingmuch can the rule engine handle tokens which aren't chars? (please pretty please?) 18:29
geoffb Grammars already have obgect orientation
so use it
hmmm? What do you mean?
nothingmuch Parsec, for example, can parse any list
it only happens to provide builtin parsers (rules in p6esque) that parse arrays of chars 18:30
(strings)
geoffb nod
nothingmuch i'd like to be able to do two things:
geoffb So PGE seems to be an early optimization that wasn't backed up with huge amounts of time to overcome the early opt hell.
nothingmuch lazy parsin
made practical using the cutoff operation 18:31
that's one
geoffb So we should go the opposite direction, and be as simple as possibly necessary to get something that complies with the Rules design
nothingmuch (for infinite streams)
and second is support for parsing anything
geoffb nodnod
nothingmuch define rules which eat tokens that aren't chars at all
including branching
(parsing a tree)
geoffb right 18:32
OK, who has worked on Rules engines so far? 18:33
nothingmuch pmichaud
geoffb I know pmichaud for PgE
nod
nothingmuch the parsec guy
the arrows guy
let's get the arrows guy to do it for us
geoffb heh
nothingmuch parrow is faster than parsec ;-) 18:34
autrijus I for the longest time thought prettyprinting combinators should be able to serve also as parser combinators
nothingmuch Template::Extract and Template::Generate?
autrijus and those combinators shoudl be inferable too
yeah.
svnbot6 r7077 | autrijus++ | * 6.2.10's Main.hs poem is in Espa?\195?\177ol: "Un nuevo barco para ?\195?\169l construyeron..."
nothingmuch autrijus++
you do it then ;-)
gaal ah it's by *version*! 18:35
geoffb autrijus, how many languages do you speak, anyway?
nothingmuch TSa never listens =(
integral the parsing idea described in the idiom notes sound interesting too, they interleave the function with constructs the tree with the parsing
nothingmuch "No, the role installs homogenious targets into the generic
autrijus geoffb: surprisingly few; chinese, holok, english, a bit german, and that's it
nothingmuch binary-MMD comparator which I think is called eqv."
this was a reply to me, on a thread where i criticized eqv
autrijus: that's not few
that's average plus
geoffb autrijus, clearly you haven't spent enough time with Americans if you think that's small.
nothingmuch most people I know speak one language well
and if it's not english than they also speak OK english 18:36
geoffb just thanks his lucky stars that he natively speaks the language of computing
autrijus geoffb: the americans I spent time with, they generally speak 2+ langs, or are at least okay with me speaking nonenglish in front of them
(the latter trait, I was much surprised to learn, is of minority) 18:37
stevan never understood why people got offended by that
autrijus ditto
stevan most of the same people who are offended by that, would probably speak english in front of you :)
autrijus you'd think they'll also oppose OpenPGP or something
geoffb Not that I'm one of those, but I'm guessing perhaps it's like having your parents taking about you in the third person in front of you? Kindof a "Hello, I'm HERE!" kindof issue 18:38
stevan regardless of if you knew it or not
geoffb generally doesn't have much of a problem with that, because he figures anyone speaking another language in front of him doesn't want to communicate with him
stevan geoffb: some people might see it as that
autrijus geoffb: yeah, but I learned english on IRC, which it is pretty much a given that people will 1)talk past each other and 2)not comprehending much of the sentences not directed to them
geoffb LOL 18:39
stevan however, it is not always easy to express yourself in a second language (be it english or another), and when conversing with another native speaker, why cripple the converstation to my (non-speaking) level
geoffb no doubt
Actually, some dialects I like to hear people speak in, because the sounds of the language are beautiful and calming. 18:40
stevan yes, that is true
stevan always wanted to learn another language, but has enough trouble with english as it is 18:41
geoffb I wish I could take the DoD tests that can figure out what language you'd be good at.
stevan geoffb: are tehy not public?
geoffb My Dad did that many years ago, and the answer was Chinese.
nothingmuch studied french for a while 18:42
stevan geoffb: was your dad in the DoD?
nothingmuch i like it a lot, but:
teacher was kind of lousy
not enough practice
some day i'll go to a french speaking country for a few months to make sure I lock it in
geoffb stevan, Vietnam-era Air Force.
I took 5 years of French. I remember a few phrases.
stevan took spanish and german classes, but would mix up the two, which made for very confused teachers 18:43
nothingmuch wow, Gong can be annoying when you're not in the mood 18:44
geoffb stevan, I thought you pretty much only got them if you went to sign up for military service. Which in the current political climate in the US is . . . possibly tantamount to suicide.
stevan geoffb: doesnt have to be the armed forces, I think the CIA is hiring ;)
geoffb Nothing like children to make you say "I'll pick my battles, thanks."
svnbot6 r7078 | autrijus++ | * Minor comment cleanup in Main.hs
geoffb Oh man, I'd be such a horrid spook 18:45
Way too honest
stevan yeah, me too, I am a very bad opium farmer too
nothingmuch geoffb: stevan knows
geoffb ???
stevan nothingmuch: shhhhhhhhhhh
18:45 stevan is now known as nothingmuch_
nothingmuch whenever I would threaten to take the money and run when he made me write Verby he would be like "i know where to find you" 18:46
nothingmuch_ oh geoffb, nothing ...
18:46 nothingmuch_ is now known as stevan
gaal lol 18:46
geoffb heh
nothingmuch geoffb: forgive stevan, he's in a kinky mood today
how did nickserv let you be nothingmuch_ ?
geoffb Kinkiness is always forgiven
autrijus waves goodnight to you spirited folks :)
nothingmuch ciao autrijus!
gaal autrijus, re: pre-YAPC::Il hackathon - sure, my place will be open to hackers from when you arrive
geoffb Have a good night autrijus!
gaal well, after you'd done the post-flight sleep that is 18:47
autrijus gaal: much kudos
nothingmuch apropos spirited, did you see the backlog from the Juerd talk about life?
gaal only problem it isn't very big
nothingmuch that was a funny moment =)
stevan dials his Mossad contact .....
geoffb nothingmuch, link?
nothingmuch gaal: can I stay too?
gaal nm, sure
nothingmuch mui bien
gaal what Juerd talk?
autrijus nothingmuch: no. url?
nothingmuch one sec 18:48
starts here: colabti.de/irclogger/irclogger_log/...el=78#l123
it's really very funny
gaal async { say "night, autrijus" }
nothingmuch we discover that QtPlatypus and I are twins with a telepathic link
and then Juerd's electricity goes out to make the point extra clear 18:49
async... mmm.
nothingmuch had fun with async today
scook should be happy =)
geoffb 's mind wanders back to an actual on topic subject, strangely 18:51
So lessee, we need:
1) A generic grammar engine that understands things other than arrays of characters 18:52
autrijus 4005 pass for pilrun?
autrijus is positively shocked
nothingmuch checks if hs pugs stopped hanging in ext/
autrijus I was still remembering it as <400
geoffb 2) One or more modules that convert friendly CLI descriptions to grammars and run them
autrijus finally asynchronously goes back to sleep 18:53
nothingmuch ciao
geoffb The nice thing is that 2) shouldn't be brutally hard, and 1) gets us past the PGE blockade
to tuit or not to tuit, that is the question
I have too strong a tendency to take on projects, I think 18:54
I just hate saying "Gee, someone should do this, just not me." 18:55
bah
nothingmuch does it all the time
geoffb 's stream of consciousness begins to dribble out his ears
nothingmuch only gets to the fun stuff
geoffb: how's your forth 18:56
geoffb It's been on the back burner since the machine arrived, but I'm considering restarting it
It actually can compile words at this point, rather than faking it. 18:57
nothingmuch ooh
with the : word and immediate/nonimmediate, and STATE?
geoffb Yep 18:58
nothingmuch cool!
where is it?
geoffb mmmf, hold on, I'll look
nothingmuch bah, it's getting late. 18:59
geoffb perlbot, nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
nothingmuch is going to go biking
szabgab aurijus we are looking for sponsors for both the conference, the hackathon and your stay in Israel
nothingmuch so paste it and i'll read it later
szabgab: he went to bed 19:00
szabgab :-(
then I talk to him later I guess
nothingmuch szabgab: email is probably best
szabgab which is?
nothingmuch [email@hidden.address]
szabgab ok, I can find it
found it :-)
nothingmuch geoffb: i'll ttyl 19:01
*poof*
pasteling "geoffb" at 69.110.115.185 pasted "gjbforth part 1: Perl" (333 lines, 10K) at sial.org/pbot/13243
"geoffb" at 69.110.115.185 pasted "gjbforth part 2: prelude" (98 lines, 2.4K) at sial.org/pbot/13244 19:02
geoffb It's buggy, but it's all mine. :-)
szabgab I am not really following, what's going on with the separation of stages that will make it "easy" to write other front-ends to Pugs ? 19:03
kolibrie geoffb: I've been playing around with MJD tokens function from Higher-Order Perl 8.1.3 19:55
I've gotten it to work with Perl 6, mostly
I don't know if that kind of approach would be useful for command-line argument parsing 19:56
tokenize what you know, leave everything else intact
geoffb kolibrie, if you backlog: That is probably a good option for nothingmuch's approach, actually. 21:19
svnbot6 r7079 | stevan++ | Perl6::MetaModel 2.0 -
r7079 | stevan++ | * Roles are now (mostly, sorta) complete.
r7079 | stevan++ | - Role does Role
r7079 | stevan++ | - Class does Role
r7079 | stevan++ | * some tests added to check this stuff, but many more still
r7079 | stevan++ | needed.
geoffb My true calling -- kicking svnbot 21:20
putter gaal: pong 21:48
fglock: have you seen the latest PIL-Run smoke? 4k passes. :) fglock++ 21:49
slurpy array parameters are busted again unfortunately. if you get a chance to look at it... ;)
stevan: sooo... MM2.0 ready to be swapped into PIL-Run yet? :) /me wonders hopefully 21:50
rafl Good evening everybody 21:53
fglock putter: ping
putter re pugs, if there are more portability issues on pugs-is-now-a-script, someone should look more closely at make (MakeMaker?)... this has to be a solved problem.
fglock: pong. hi!
evening rafl 21:54
fglock hi! I've been away for a few days - back to normal now :)
putter i'm about to disappear for a few days. ;) such is life.
fglock I saw you have problems with :todo - did you set the parameter to optional? 21:55
putter yeah, I did a workaround ... ?$msg, ?$todo) it works now on pilrun, but is incorrect (ie, doesnt work on pugs). when slurpy hashes work (even just plain hashes dont really work at present), we can change it to ?$msg, *%adverbs). 21:57
fglock Perl6::Param->new( ..., required => 0 )
putter ?
explain ?
fglock maybe I didn't understand what the problem is 21:58
I thought ?$todo wasn't working 21:59
putter sub f(*%h){} f() errors in Code
fglock ok
putter hmm, or did. before I short-circuited check_mumble. but since I gave up on *%h, the short-circuit can come out now.
fglock is slurpy array ok? 22:00
putter sub f(?$todo){} f(:todo<bug>) should not work. but in pilrun, it isnt, it currently works, so.... I use it. 22:01
slurpy array is dead dead not working dead.
;)
fglock the implementation is pretty simple (Code.pm 281) it should work. Adding slurpy hash should be easy 22:02
but if slurpy array doesn't work we have a problem
putter ok, 7080 has the short-circult removed. 22:05
fglock slurpy array creates a native array - maybe that's the problem? 22:06
putter yes, slurpy array is needed by many things.
it may not be related, but I had to modify p6_to_a() (another layer of ->fetch()?) as it was not working. 22:07
$ary->fetch($i)->fetch 22:08
fglock that's right - array fetch returns a Scalar - so you have to fetch again
that's because you may want to $ary->fetch($i)->store($thing) 22:09
for example $a[$i] = 3
putter k
./pugs -B perl5 22:10
svnbot6 r7080 | putter++ | Perl6/Code.pm: removed check_params() short-circuit. Giving up on sub f(*%h){} for now.
putter sub f(*@a){} f(3,4)
sub f(*@a){@a} f(3,4)ARRAY(0x1289400)
fglock I'll make *@a create a boxed array - wait a second
putter that probably shouldn't be an ARRAY, but an Array
:)
fglock yes
putter I'd say it was almost time for a pilrun evalbot... but safety would be a nightmare. 22:11
bbiam
fglock done - slurpy array works now 22:15
putter back
svnbot6 r7081 | fglock++ | * perl5/Code - slurpy array now creates a boxed Array internally
putter awesome! :)
fglock now let's see slurpy hash
I think slurpy hash is actually creating an array of pairs - I'll test 22:16
putter hmm... ./pugs -B perl5 -Iperl5/PIL-Run/lib6 t/subroutines/slurpy_param.t went boom, but I'm not sure it ever worked... 22:17
fglock the signature check for slurpy hash must be fixed first 22:19
putter ok 22:20
fglock only Array and Hash can be slurpy? 22:21
ok, I've got it generating an Array of pairs - now let's make it into a hash 22:23
putter I think there is slurpy code, but it's not a pressing issue. 22:24
Note that hash has issues: %h=(3,4) errors, %h=(3=>4) yields {((3, 4), undef)}, etc. 22:25
fglock ok - so we should expect these errors 22:27
btw - %h=(3=>4) error may be bacause it is calling $hash->store($pair) instead of $hash->store($key,$value) 22:28
so the key is "3=>4" 22:29
putter So what has changed about slurpy array params since they were list working? Line 224 in ApiX is giving an Not an ARRAY reference error, breaking all the PrimP5.pm primitives with slurpy array parameters. 22:31
s/list working/last working/
fglock I don't get this error here 22:32
putter p5ugs> join("a","b")
Fyi: Not an ARRAY reference at /home/net1/perl6/pugsxpl2/perl5/PIL-Run/lib/PIL/Run/ApiX.pm line 224.
fglock ok, I got it
rafl Any news from autrijus, btw?
putter he stopped by earlier today. and there is a new journal entry. 22:33
fglock slurpy hash is ok 22:35
now checking the join() error
sub f(*%a){%a} f(3=>4, 5=>6) 22:36
geoffb rafl, and he actually sounded decent, if tired 22:37
rafl Ah, OK 22:39
svnbot6 r7082 | fglock++ | * perl5/Code - slurpy hash works
putter (versioned evalbot)++ 22:40
geoffb Yeah, I like it too. Some people find it wasteful, but I think the old scheme was just hiding the work, rather than not doing it 22:41
putter ah. transparency++ :) 22:42
fglock putter: line 224 is expecting a native ARRAY - it is getting an Array now
putter ok, I'll change that 22:43
fglock thanks
putter sub f($foo){13} f() currently works, but likely shouldnt
fglock checking
it is ignoring extra parameters - Code.pm 225 - I'll try to fix that 22:45
geoffb Heh: on the path to finding out a problem with the $contract code I was debugging was actually just a PEBCAK, I found (and fixed) a real bug in the project's debug logging facility . . . 22:48
putter :) 22:51
pebcak? 22:52
mugwump problem exists between chair and keyboard
geoffb what mugwump said
My other favorite for consulting, slightly more pointed, is PICNIC: Problem In Client, Not In Computer 22:53
Though honestly, PICNIC situations often mean the UI sucks . . . 22:55
putter :)
fglock putter: it looks like the required/optional flag is not being set (all parameters are required) 22:57
"sub f($foo,?$x){13}" has the internal signature "(Any $foo, Any $x)" 23:00
svnbot6 r7083 | putter++ | PIL-Run - progress with slurpy array parameters. fglock++ join() improved, but still failing many tests. 23:03
putter ./pugs -B perl5 -Iperl5/PIL-Run/lib6 t/builtins/lists/join.t now has some passes. :) ! and many failures.
required/optional flag? a Param->new thing? 23:04
fglock yes - either you send it a variable with the '?', or you set "required=>0" 23:05
putter so '?$x' means optional, but apparently '$x' does not mean required? 23:06
'$x',required=>1 neededd?
fglock required is the default - you need it when required=>0 23:07
required=>0 means optional
I think the '?' is being stripped before Param->new 23:08
putter err, the problem is sub f($x){13} f() _works_.... no ? to strip... 23:10
fglock I was counting parameters in Code->check_params(), in order to fix the f() bug, and then I noticed that the optionals are not marked as optionals 23:12
it's an urelated bug - but it explains the :todo problem
fixed 'f($x){13} f()' - but Code.pm still needs much work 23:18
putter ok. sorry, I got distracted working through join.t looks like my "strawman" join() primitive was quite incomplete...
!:)
very odd join.t test: 23:20
my $joined4d = join("", [ "a", "b", "c" ]);
is($joined4d, "a b c", 'join("", []) works');
svnbot6 r7084 | fglock++ | * perl5/Code - fixed Code->check_params() strictness about required parameters
fglock is it supposed to be 'join("", "a", "b", "c" )' 23:22
?
putter fglock: r7084 broke lib6/Test.pm. Signature does not match - (Any $v, Any $v2, Any $msg, Any $todo).
fglock isn't it "?$todo" - the optional parameter bug? 23:23
putter hmm, ? is getting stripped... let's see where... 23:25
fglock found it - ApiX 299
needs a required=>xxx flag 23:26
somehow the parameter in line 266 should get to line 299 :) 23:28
putter err, I thought required=>1 was the default...
however, the $is_optional test was wrong. no ref() needed/wanted.
fglock it is - that's why it is requiring a :todo 23:29
putter ok, isOptional works. yay. 23:34
7085.
fglock :)
putter looking at the other flags, is there anything which should be done with is invocant/lvalue/lazy/named/writable? 23:35
any Param->new() flags for them? 23:36
fglock some parameters are not implemented yet - checking 23:37
svnbot6 r7085 | putter++ | PIL/Run/ApiX.pm: optional args fixed. 23:38
r7085 | putter++ | PIL/Run/PrimP5.pm: join() improved.
fglock new() takes: type - a Perl6::Type, name - the name, default - the default value, required, slurpy - it is missing all of invocant/lvalue/lazy/named/writable 23:39
putter ok 23:40
I've been meaning to do default value, but just haven't gotten to it.
fglock you can add those - they will be ignored by now, but they can be implemented later
putter k
fglock default is easy - just say default=>$thing
btw - congratulations for the 4k mark! 23:41
putter I'm going to leave Test.pm using ?$msg,?$todo) as ?$msg,*%adv) eats :todo<bug> with $msg when there's no msg. 23:42
hey, it's your and stevan's (and anyone I'm leaving out's) work on mm and objects. I've just added a bit of pil-ish glue. 23:43
fglock++ ;)
fglock that's one of the 'need more work' errors I was talking about - named parameters are not handled properly yet
putter Junctions are going to be a real pain. But there's lots of stuff to do first. 23:44
fglock I must leave now - I'll try to come back later
putter thanks for your work.
fglock thank you
putter I'll clean up a bit, and leave a new smoke running... :) 23:45
buu ?eval my $a="b"; $a--; 23:48
evalbot_7085 'b'
buu ?eval my $a="b"; $a--; $a
evalbot_7085 \-1.0
buu =[