Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by autrijus on 4 August 2005.
mugwump brentdax: utsl.gen.nz/pugs-svk-dump.bz2 will be ready shortly... 01:20
brentdax: both PCRE and P6 Rule objects look like rules when you say them
brentdax mugwump: PCRE is emitting errors when I try to run Perl 6 regexes. 01:26
mugwump ah
hmm, that dump file is 20MB
still going, too. almost ready.
brentdax Alright.
How do I use ti once I get it? 01:27
*it
mugwump ok, it's finished. I would guess that piping through | bunzip2 | svnadmin load ~/.svk/local should do it 01:30
brentdax Okay, thanks.
svnbot6 r6181 | fglock++ | * Migrated all containers, tests from ext/ to perl5/ 02:27
r6181 | fglock++ | (with help of a 5-line regex)
hobbs (5-line regex)++ 02:28
svnbot6 r6182 | iblech++ | * Usual svn props. 02:50
r6182 | iblech++ | * PIL2JS: More recovery after the CPS change.
r6182 | iblech++ | * If you return a flattened array, its flatenessness is preserved now. This
r6182 | iblech++ | re-enables &prefix:<*>. (Before the CPS change, it was not possible to
r6182 | iblech++ | return flattened arrays, either, but I worked around that by using a hack.
r6182 | iblech++ | It's solved correctly now.)
r6182 | iblech++ | * Other things that work again: Prettyprinting of unhandled exceptions,
r6182 | iblech++ | stringification of arrays with holes (e.g. arrays where .delete was used),
r6182 | iblech++ | return(...) in subrefs.
dbrock is svnbot6 tracking Pugs? 03:11
autrijus dbrock: yes. 03:12
dudley "we don't have to be strong typists to enjoy Strong Typing" 03:19
autrijus++
obra heh 03:20
hobbs groan-o-meter++ 03:25
Aankhen`` groans. 03:39
"Scotty, beam me up"?
I dislike Star Trek, and that still jumped out at me.
Oh well. TSa++ # obviously understands more than me :-) 03:44
svnbot6 r6183 | fglock++ | * fixed syntax errors in /perl5 containers
r6184 | Stevan++ | Perl6::MetaModel - removing the container types, fglock++ is doing a much better job :) 05:01
putter brentdax: re PCRE errors with p6 regexp - do you have a test case? (I ask hopefully:) It is my current obstacle on improving pugs rule support. But I've only seen it in mutant versions of pugs. I'd love a replicable example on unmodified pugs... Thanks! :) 05:24
brentdax Let me see if I can get it to happen with a single module and a one-liner... 05:27
(Unfortunately, it's not the best time--I'm packing for a trip to Europe.)
putter ah, np. whenever you get a chance. I've backburnered it for now. 05:30
brentdax Hmm, looks like I have an unhappy Parrot.
Complaining about the fingerprint on PGE.pbc.
putter mugwump: I snarfed a copy of your dump. Thanks! At some point I'll stop thinking "if only I had svk, I could have done x instead" and finally switch. ;) 05:31
autrijus possibly you have different installed parrot and build path parrot.
clean out one of those.
brentdax I'm configured with Parrot embedding--do I have to rebuild Pugs after I rebuild Parrot? 05:33
autrijus yes, this is exactly like modperl.
(and for the same reason)
(when you upgrade perl to a nonbincompat version, modperl may cease working) 05:34
brentdax Okay...just `make`, or `make clean`?
autrijus rm src/Pugs/Embed/Parrot*o then make
or something like that.
putter brentdax: but beware mission creep. brief pause in packing to see if a test is easy, ++. longer excursion into debug land when packing needs to be done, --. number of human neurons devoted to mastercard commercial, easily 1e8+. ;)
autrijus clean out the temp files.
brentdax putter: Heh. 05:35
autrijus putter++
brentdax Hell, I'll just make clean and let pugs rebuild itself. That'll give me packing time anyway. 05:38
putter Yipes. Ok, that was easy. Just finished a fresh build of pugs on parrot 0.2.3. Guess what 'a' ~~ /\N/ yields. Thanks brentdax, looks like we have simple test case. :)
brentdax Heh. Any idea how far back I'll have to go to get a working build of Parrot? As I mentioned, I'm packing to head to another country and such... 05:39
putter checking my dog pile...
Ok, r6108 works. (and a _modified_ r6110 doesnt). 05:42
brentdax Of Pugs? Alright... 05:43
putter Of pugs. I'm afraid I'm not sure which parrot is embedded. From the dates, it is almost certainly 0.2.3. 05:45
putter goes to see what r6109 and r6110 were... 05:46
putter discovers his patch broke regexps... 05:49
brentdax: I'm sorry, my fault. Would you benefit from a very fast 60 second fix to head, or shall I just fix it for real, which will take a bit more time? 05:53
I apologize for the time it no doubt cost you. :-(
brentdax It's alright--I've been busy with other stuff today anyway, it hasn't cost me much time. 05:54
If a real fix is possible within a few hours, that'd be great.
putter Ok. In progress...
dduncan putter, were you at OSCON this year? 06:03
someone with a nick like that was there, but was a female; however, your comment said 'his' 06:04
dbrock would it cause much trouble to allow $foo-bar.moomin-snufkin as a synonym for $foo_bar.moomin_snufkin? 06:11
putter dduncan: nope... 06:12
brentdax dbrock: Is that an identifier or a math equation?
coral are you saying $foo - bar.moomin - snufkin?
dduncan so what is the nick of Ingy's girlfriend? 06:13
obra boojum
dbrock I can see that $foo-$bar might be somewhat common, but $foo-bar?
dduncan real name?
coral death
brentdax $foo-bar()?
coral er, ww
dduncan I could swear it sounded like an accented puuter
maybe my memory's just bad 06:14
dbrock brentdax: right... but do people write that? 06:16
I guess they probably do, don't they
brentdax $foo-bar = { foo; bar }; $foo-bar(); 06:17
Basically, once you do that, you start drifting into Heuristicland, which is a place language designers try to avoid. It's the land of uncertain behavior, where the ground can shift under one function's feet because of an innocuous change 500 lines away. 06:18
dbrock I'm proposing to unambiguously (i.e., non-heuristically) make $foo-bar always mean $foo_bar
brentdax Or, less poetically: it's not *that* hard to hold the shift key. :^P 06:19
coral wouldn't the routine that changes - to _ internally when it's an identifier be a heuristic?
dbrock s/(\w)-(\w)/\1_\2/g
coral s/(?<=\w)-(?=\w)/_/ 06:20
anyways, i'm not being helpful and i'm not cheerleading
so g'night #perl6 :)
coral zz
brentdax module DBD::mysql-1.23-cpan:TIMB; 06:21
putter good night coral. 06:28
svnbot6 r6185 | putter++ | r6109 introduced a bug in which p6 rules were also given to PCRE, the :perl5 rule handler, which sometimes threw an error. Eg, 'a' ~~ /\N/ threw a 'PCRE does not support \N' error. The bug is now gone. But r6109's support for :global in PCRE rules is now commented out, as I failed to find a haskell phrasing to keep it in place.
dbrock yeah yeah, but mine is just as short and easier to read, so there :-) 06:29
brentdax: no, it's not *that* hard, but I also happen to prefer hyphens to underscores when reading the identifiers
the typographical center of gravity of $foo-bar.baz-quux feels better than that of $foo_bar.baz_quux
moreover, the method call periods stand out better in the hyphenated style
brentdax: I'm not familiar with that syntax --- what does it mean?
dbrock is not a Perl hacker, but is in complete awe of Perl 6
putter brentdax: r6185 removes the bug (at the cost of :global on pcre rules going back to being slightly incorrect). 06:30
dbrock what does the `::to' mean in `multi sub *coerce:as (Us $us, Them ::to) { to.transmogrify($us) }'? 06:31
wolverian it's a Type. (:: is the type sigil.) 06:33
dbrock ah, okay
putter Ok, r6185 tests look plausible. 06:35
Good night folks. & 06:36
Safe travels brentdax.
castaway_ sheep? 06:37
dbrock assuming that `has Foo $foo = .new()' is sugar for `has Foo $foo = $foo.new()', is there any less redundant way to write `has Foo $foo = { Foo.new }'? --- i.e., I want a new Foo object to go with each new instance of the container 06:44
uh, I mean `has Foo $foo .= new()', not `has Foo $foo = .new()' 06:45
oh, and I mean $.foo instead of $foo :-)
jql you can initialize has? 06:46
oh, larry had an email about that today. never mind 06:47
dbrock I'm reading A12, and am otherwise just another clueless fan
castaway_ (oops)
06:47 castaway_ is now known as castaway
jql it works. magically. don't mind me. :) 06:48
dbrock okay, I'll try another question :-) 06:49
what is the difference between $.foo and $:foo, apart from the fact that declaration of the former will automatically define accessor methods? 06:50
jql public/private visibility 06:51
dbrock I mean, why distinguish between public and private attributes, when the real difference is in whether or not accessor methods are defined?
jql cause it's handy to have private member variables -- see various other languages we stole it from 06:52
dbrock I might have gotten this wrong, but it appears $.foo attributes are in fact not visible directly from the outside
jql indeed they aren't
dbrock they have to go through a .foo method, correct?
jql $obj.foo really calls the method on $foo, which supposedl;y returns $.foo 06:53
err, on $obj, but you get the idea
dbrock but that method could just as well return $:foo, couldn't it?
jql indeed. or it could calculare sqrt(2) and return that
the beauty of methods 06:54
dbrock yeah, so again, what is the difference between $.foo and $:foo?
jql $.foo is automatically (and obviously) accessable from outside
dbrock can you say `has $.foo is private', or something to that effect?
jql no 06:55
but you can override the accessor method and make it ...
dbrock okay, so that'd have to be `has $:foo is private' (which is redundant)
jql quite redundant 06:56
and it's the name itself that makes it private. method :foo is also private
dbrock but if you declare $:foo and an accessor named .foo, isn't that effectively the same as declaring $.foo?
jql yes, but subclasses can access $.foo directly, while they can't $:foo 06:57
dbrock oh I get the distinction between public and private *methods*: public methods are visible from the outside, whereas private methods are only visible from within the class
aah
I hadn't considered subclasses 06:58
jql in C++ parlance, only methods can be "public". $.foo is "protected", $:foo is "private"
dbrock okay, I see. It all makes sense now, thanks :-)
jql :)
brentdax Thank you putter. 07:00
putter++
(And yes, it does work with the fix.) 07:20
autrijus still at $work 07:41
the spec just changed to be much scarier :-/ 07:42
castaway eep
autrijus ponders writing this one in ocaml
vkon looking at 02 util/src_to_blib.pl 01 I see that copying of all *.hi and *.o files is intentional, but are those really needed? May be *.hs are enough?? 08:29
integral vkon: autrijus said yesterday that the .hi and .o files are needed for pugscc. I think he means when compiling perl6 to haskell, you need the perl6 runtime available as a library 08:30
autrijus right, that is so. 08:31
it'd be cool if you can ar the .o into .a 08:32
and install that only
integral wishes ghc could manage to produce shared libs
autrijus much as CORE/libperl.a does
integral: it does
at leats, cabal does
but I had not digged into how
integral ooh
autrijus also .so only works on certain platforms
but iirc .a works on all
and we really only want .a
there's no need to have pugs628.dll currently. 08:33
vkon this means pugscc works well even on Windows? (unlike perlcc, which is troublesome?) 08:34
autrijus vkon: it's supposed to, yes.
but currently it gives
Overlapping instances for MonadSTM IO
arising from use of `liftSTM' at /home/autrijus/i/MainCC.hs:37:25-31
it used to work in 6.2.8 (I think) though
brentdax watches the parrot dump load into svk (thanks, autrijus!). 08:35
autrijus np, glad to be of help :) 08:37
nothingmuch morning
autrijus yo nothingmuch.
vkon autrijus: then src_to_blib.pl should combine all *.o into *.a ... (but this looks like asking for problems?) 08:38
wow: pugscc -we "say[*]1..@*ARGS[0]" and then a.exe is 7Mb executable doing its work! way good. 08:43
autrijus yeah and it would not need any runtime 08:45
you can then copy it anywhere.
gaal hello
autrijus hey gaal.
vkon autrijus: you will take a speech about pugs in Tallinn?? (sorry if this is FAQ:) 08:46
autrijus vkon: sadly the haskell workshop rejected my paper
so I'll speak about it in CUFP 08:47
but CUFP is closed-door last I heard
gaal i'll have to punt on the lexical pragma stuff, at least in the coming month
autrijus gaal: *nod*
vkon autrijus: sad indeed.... but why??
dbrock what does say[*] mean?
autrijus vkon: my english presentation is not good enough and that was my first academic paper :) 08:48
gaal will be hiking in northern turkey
vkon autrijus: you will take part as listener?
autrijus dbrock: [*] is "product"
vkon: yes
dbrock: ([*] 1,2,3) means (1*2*3)
dbrock oh
autrijus the [] is the folding -- or reduction -- metaoperator
dbrock wow, that's cool
gaal was there a verdict on identity/empty list behavior for that, btw? 08:49
dbrock this language is so awesome
autrijus gaal: no.
?eval [*] ()
evalbot6 undef
autrijus fine with me.
gaal ?eval [/] ()
evalbot6 undef
autrijus dbrock: even better is that it works on your user-defined infix too :) 08:50
dbrock yeah, I figured as much :-)
autrijus ?eval [||] 0,0,0,3,2,1,0,0,0,3,2,1
evalbot6 3
autrijus (first-true)
gaal ?eval [//] (undefined, undefined, undefined, 7, 55)
vkon autrijus: however that paper is very interesting to read anyways
autrijus ?eval [and] 1,2,3,0
evalbot6 Error: No compatible subroutine found: "&undefined"
0
gaal errrr
autrijus vkon: thank-you :)
gaal ?eval [//] (undef, undef, undef, 7, 55) 08:51
integral ?eval [//] (undef, undef, undef, 7, 55)
evalbot6 7
autrijus gaal: haskell-brained :)
wolverian I finally streamlined my *cough* working *cough* and created a personal feed aggregator. yay!
autrijus wolverian: nice!
gaal autrijus, :)
dbrock are there ternary infix operators? 08:52
gaal ?eval bool::true ?? "moose" :: "elk"
evalbot6 'moose'
clkao mugwump_, if you let others use your dump, be sure to ask people to use --ignore-uuid when loading it
gaal dbrock, is that whay you mean?
dbrock I want to define the ... if ... else ... operator
gaal ?? :: then.
autrijus dbrock: yes, supposedly it's 08:53
vkon ?eval "test;".say
evalbot6 test; bool::true
autrijus &ternery:< ?? :: >
or something resembling that
but pugs does not support it yet.
Aankhen`` &ternary:<?? ::> perhaps?
autrijus yeah
dbrock gaal: no, I want `a if b else c' to mean `b ?? a :: c'
Aankhen`` One sec.
gaal ahhh
wolverian that looks pythonic, somehow.
hack in list comprehensions, too, will you :) 08:54
dbrock autrijus: maybe it could just be &infix:<?? ::>?
gaal don't say that when autrijus is listenting, wolverian :)
autrijus dbrock: right, maybe that.
gaal: I did a fake list comprehension the day that userdefined infix was available
:)
wolverian yeah, I remember that. :)
gaal heh heh heh :)
dbrock what did it look like? 08:55
autrijus something silly. I no longer remember
wolverian but I don't like the 'action for items if condition' syntax. the for and if are reversed.
and I know it's cultural and resembles math notation but I still hate it.
dbrock by the way, would it even be possible to define an operator named `if'-something?
Aankhen`` Doesn't seem to be any `ternary:` category. 08:56
wolverian autrijus, { x | x <- a..b } I think. I don't think it had a condition.
but I don't remember that well.
dbrock wolverian: yeah, I too have always thought Python has that backwards
gaal eval("[ x | x <- xs, x `mod` 2 ]" :lang<haskell>) 08:57
wolverian oh, and I also hate putting options at the end of the arg list
Aankhen`` gaal: You missed a comma. :-P
gaal hmm, there's an 'even' function in haskell's prelude
oops, right
scook0 is there a spec around for how type-variables (my Foo ::x) work?
wolverian there's a reason why Larry moved the m// flags to the front!!! 08:58
gaal i am a generator function yielding errrors :(
scook0 or is it just something floating around the p6l ether?
Aankhen`` gaal: Nah, just occasional typos. :-)
dbrock so wouldn't eval:lang<haskell> "..." be possible?
wolverian now that's how I like my options! 08:59
dbrock++
dbrock why is it not allowed?
Aankhen`` dbrock: You would have to specifically name the "..." parameter.
integral can't you do: eval:lang<haskell> <=== "..." ?
wolverian I guess it's because normal arguments can be passed in as named, too? 09:00
gaal eval( :lang<haskell> code => $string) ?
Aankhen`` eval(:lang<haskell> :code<...>);
gaal again missing a comma :)
Aankhen`` Or code => '...', whichever one.
dbrock is Aankhen`` missing one too?
Aankhen`` No, commas are allowed to be omitted between pairs.
dbrock oh, okay
Aankhen`` Atleast, when they're specified using that funky syntax.
gaal which reminds me 09:01
dbrock what about eval:lang<haskell>:code<...>?
is that allowed?
gaal in the interpreter, i typed :H by mistake once
wolverian that should work, yes.
gaal and of course got
?eval :H
evalbot6 ('H' => 1)
wolverian gaal, that seems correct.
gaal should we just for the sake of user friendliness make it an alias for :h ?
wolverian but what I really want to write is: $obj.method:option(arguments)
Aankhen`` The reason why you can't put `:lang<haskell>` in front and '...' later without naming it is that in the signature of `eval`, the `lang` parameter is specified as a named parameter, whereas the `code` parameter is a positional parameter.
gaal wolverian, sure
wolverian gaal, oh, right, I didn't remember :h :) 09:02
gaal, or maybe change the prefix from : to something else?
Aankhen`` Named parameters are optional. I hope you do understand why required parameters always have to come before optional parameters. ;-)
dbrock I actually don't :-)
Aankhen`` Hrm.
Very simplified: sub foo ($foo, $bar, ?$baz, $quux) { ... } # this declares `baz` as an optional parameter, the rest as required 09:03
jql can't do that
dbrock oh, I get why that doesn't work
Aankhen`` jql: Shh.
jql optional at the end
:P
jql passes? :)
Aankhen`` That is what I'm trying to explain. :-)
dbrock but make that sub foo ($foo, $bar, +$baz, $quux) { ... }
gaal another interpreter question: is it correct for :e to reload an env (including prelude) every time?
Aankhen`` dbrock: `+$baz` declares the named parameter `$baz`. Named is optional. 09:04
dbrock why can't you call that as foo(1, 2, :baz, 3)?
jql Aankhen``: actually, that was a better example. :)
wolverian Aankhen``, ++$baz :)
dbrock (yeah, I know the signature is invalid, but it doesn't matter)
pairs are slippery in the sense that they don't easily bind to positional parameters, right? 09:05
Aankhen`` What do you mean?
wolverian hmm. how do you pass in a pair as a positional?
jql foo(my $var = :pair) ? 09:06
Aankhen`` wolverian: Not sure; maybe flatten it?
wolverian sub foo ( $x ) { ... } foo :a; # $x == :a, or "no such argument"?
jql, ewww.
jql what? you no like?
jql chuckles
Aankhen`` In the case you gave, `foo` is being passed a single named argument (`a`) with a value of `1`.
(which is, of course, incompatible with the signature) 09:07
jql what's the perl6 magical noop? it's not + anymore
dbrock I mean if you have sub foo($foo, ?$bar, +$baz) {...} and call foo(123, :baz), then $baz is 1 and $bar is undef
Aankhen`` dbrock: Yep.
dbrock so why can't you stick named arguments in between positional parameters?
wolverian Aankhen``, how do I put :a in $x then?
Aankhen``, without calling it as foo x => :a
dbrock it's not like they affect the positional parameters in any way 09:08
Aankhen`` wolverian: Er, I used "flatten" earlier... that was the opposite of what I meant.
dbrock: They do, since they are optional arguments too.
wolverian Aankhen``, foo \:a? :)
Aankhen`` You can't specify "positional, positional, optional, positional".
dbrock wolverian: ISTR that happens if you declare ?$bar as a Pair 09:09
jql dbrock: I think the @Larry agree with you in principle, but it's something which could be added later without breaking anything, so I think it's been punted
Aankhen`` In the same way, you can't specify "positional, positional, named, positional".
?eval sub foo (Pair $x) { $x.key }; foo(:a)
evalbot6 'a'
Aankhen`` ?eval sub foo (Pair $x) { $x.value }; foo(:a)
evalbot6 \1
Aankhen`` dbrock++
wolverian hmm. okay.
I still want to write $foo.meth:option(args) :)
Aankhen`` wolverian: Wha? 09:10
dbrock Aankhen``: but optional parameters in general (i.e., positional ones) affect positional ones; named parameters don't
wolverian Aankhen``, isn't it logical? think m:2nd/.../ generalised to method/sub calls.
dbrock hmm, that is one lousy formulation
wolverian of course I guess it can't work, but one can always wish.
Aankhen`` dbrock: You're probably right, come to think of it. Now I have no answer. :-P
scook0 wolverian: but that passes (args) to (option), not to (meth), doesn't it?
Aankhen`` wolverian: Sorry dude, you lost me there. 09:11
wolverian scook0, yes.
that's obviously what I don't want. maybe force options to use <> instead of (), or something.
Aankhen`` (I am functioning on no sleep, so my ability to comprehend things is somewhat diminished)
wolverian Aankhen``, hm. $file.write:chomped($lines) 09:12
Aankhen`` Ahh, you mean placing the modifiers at the beginning.
wolverian I guess it's visually confusing if ($lines) were an arg to write instead of chomped there.
Aankhen``, yes.
Aankhen`` (as opposed to the end)
scook0 would $file.write:chomped:($lines) be able to work?
wolverian yes.
scook0 I think that was one workaround that rules had
Aankhen`` I was looking at the behaviour, rather than the syntax. My bad.
wolverian scook0, no idea. 09:13
Aankhen`` [14:41:35] <wolverian> that's obviously what I don't want. maybe force options to use <> instead of (), or something. # please don't take away my `:foo(0)`... :-(
wolverian :!foo ;) 09:14
(or !:foo, I guess.)
Aankhen`` You can have that for your subs. :-P
Hmm, time to shower.
BBIAB.
gaal remind me, how do you use two* dimensional arrays in p6? (* or n > 1) 09:15
this looks wrong:
?eval my @x; @x[5][5] = 5; @x.perl 09:16
evalbot6 '[undef, undef, undef, undef, undef, [undef, undef, undef, undef, undef, 5]]'
jql w t f?
oh, nm. missed the inner []
jql is blind -- sorry 09:17
gaal oh, maybe it isn't wrong? like p5 really
jql it's p5 behavior
allthough perl6 introduces @x[5;5]
scook0 gaal: the other elements haven't been autovivified yet
gaal right right of course
jql ?eval my @x; @x[5;5] = 10; @x.perl
evalbot6 Error: unexpected "[" expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
jql yeah, didn't think that worked yet
dbrock ?eval my @foo is shape(3; 3) = [1,2,3; 4,5,6; 7,8,9]; @foo[1][1] = 0; @foo.perl
evalbot6 Error: unexpected "[" expecting expression
gaal my brain needs resurrection 09:18
jql magic semi doesn't do its thing yet
there a test for it in pugs?
scook0 jql: was that just syntactic sugar, or is it distinct from nested arrays (can't remember...)
jql it was syntactic sugar for anonymous array creation... then it got redefined
dbrock oh 09:19
?eval my @foo is shape([3],[3]) = [[1,2,3],[4,5,6],[7,8,9]]; @foo[1][1] = 0; @foo.perl
evalbot6 '[((1, 2, 3), (4, 5, 6), (7, 8, 9)), [undef, 0]]'
jql (1, 2; 3, 4) used to mean [1, 2], [3, 4], which would've had special meaning for the postfix:<[]> op
dbrock actually doesn't have much of a clue :-)
jql but now I dunno
dbrock ?eval my @foo is shape([3],[3]) = [[1,2,3],[4,5,6],[7,8,9]]; @foo[[1][1]] = 0; @foo.perl 09:20
evalbot6 Error: unexpected "[" expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
dbrock ?eval my @foo is shape([3],[3]) = [[1,2,3],[4,5,6],[7,8,9]]; @foo[[1],[1]] = 0; @foo.perl
evalbot6 Error: unexpected "[" expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
jql ?eval my @foo is bogus;
evalbot6 undef
jql yeah, didn't think do
dbrock :-) 09:21
scook0 ?eval my @foo is totally_awesome
evalbot6 undef
scook0 :)
dbrock ?eval my @foo is shape([3],[3]) = [[1,2,3],[4,5,6],[7,8,9]]; @foo.perl
evalbot6 '[((1, 2, 3), (4, 5, 6), (7, 8, 9))]'
jql ?eval my $car is bitchin will kick :your<ass> 09:22
evalbot6 Error: unexpected "w" expecting trait, "=", ".=", ":=", "::=", ";" or end of input
dbrock well that seems somewhat right anyway... right? :-)
jql will requires a block, nm
dbrock haha jql rules 09:23
QtPlatypus ?eval my @foo is shape([3],[3]) = [[1,2,3],[4,5,6],[7,8,9,10]]; @foo.perl 09:24
evalbot6 '[((1, 2, 3), (4, 5, 6), (7, 8, 9, 10))]'
dbrock ?eval my @foo is shape([3],[3]) = [1,2,3],[4,5,6],[7,8,9]; @foo.perl
evalbot6 '[(1, 2, 3), (4, 5, 6), (7, 8, 9)]'
dbrock hmm, your example is interesting :-)
QtPlatypus I guess array shaping isn't implemented yet.
dbrock ?eval my @foo is shape([3],[3]) = [1,2,3],[4,5,6],[7,8,9,10]; @foo.perl
evalbot6 '[(1, 2, 3), (4, 5, 6), (7, 8, 9, 10)]'
dbrock I guess not 09:25
QtPlatypus ?eval my @foo is shape(3) = (1,2,3,4); @foo.perl
evalbot6 '[1, 2, 3, 4]'
QtPlatypus ?eval my @foo is doc("My array for containing foo") = (1,2,3,4); @foo.perl 09:26
evalbot6 '[1, 2, 3, 4]'
dbrock ?eval my @foo is doc("My array for containing foo") = (1,2,3,4); @foo.doc
evalbot6 Error: No compatible subroutine found: "&doc"
dbrock ?eval my @foo is doc("My array for containing foo") = (1,2,3,4); @foo.meta.doc 09:27
evalbot6 Error: No compatible subroutine found: "&doc"
dbrock is totally clueless :-)
QtPlatypus wonders what exactly the behavour of my example should be "Should the shaped array (1) Act in degraded mannor. (2) Throw an error. (3) Silently truncate the input"
Arguments can be made for all three. 09:28
dbrock how do you get at the variable itself?
QtPlatypus How do you get at the trait do you mean?
dbrock ?eval my @foo is doc("My array for containing foo") = (1,2,3,4); \@foo.doc
evalbot6 Error: No compatible subroutine found: "&doc"
dbrock yeah
QtPlatypus doesn't know "I think there will be some sort of introspection, but I don't think its defined" 09:29
dbrock I figured I needed to call the method on the variable as opposed to the value referenced by the variable
jql that's the correct way -- however, the role has to exist for it to work, and it has to have a property of its own name
at least according to the apocalypse
dbrock oh
QtPlatypus thanks jpl.
dbrock jql: got an example of an existing role that has an eponymous property? 09:30
jql my Role bitchin { has $.bitchin } 09:31
dbrock ?eval my Role bitchin { has $.bitchin }; my $variable is bitchin; \$variable.bitchin 09:32
evalbot6 Error: unexpected "b" expecting variable name or "("
jql pokes the parser 09:33
dbrock ?eval my role bitchin { has $.bitchin }; my $variable is bitchin; \$variable.bitchin
evalbot6 Error: unexpected "b" expecting variable name or "("
jql ?eval role foo {};
evalbot6 undef
jql ?eval role bitchin {};
evalbot6 undef
jql ?eval role bitchin { has $.bitchin; };
evalbot6 undef
dbrock ?eval my role bitchin {};
evalbot6 Error: unexpected "b" expecting variable name or "("
dbrock :-)
jql can't declare lexical roles yet
not my fault. :) 09:34
dbrock ?eval role bitchin { has $.bitchin }; my $variable is bitchin; \$variable.bitchin
evalbot6 Error: No compatible subroutine found: "&bitchin"
dbrock ?eval role bitchin { has $.bitchin }; my $variable is bitchin; \$variable
jql ?eval role bitchin { has $.bitchin; }; 0 but bitchin
evalbot6 \undef
Error: cannot cast from VObject (MkObject {objType = (mkType "Class"), objAttrs = <ref>, objOpaque = Nothing, objId = 50}) to Pugs.AST.Internals.VCode (VCode)
jql woot 09:35
dbrock gg
jql oh, there's an annoying wordy syntax
?eval role bitchin { has $.bitchin; multi sub trait_auxiliary:is(bitchin $trait, Any $container) { ... } } 09:36
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
jql ?eval role bitchin { has $.bitchin; multi sub trait_auxiliary:<is>(bitchin $trait, Any $container) {...} } 09:37
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
jql ?eval role bitchin { has $.bitchin; multi sub trait_auxiliary:<is>(bitchin $trait, Any $container:) {...} } 09:38
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
dbrock ?eval sub trait_auxiliary:<is>($trait, $container) {...} 09:40
evalbot6 undef
dbrock ?eval sub trait_auxiliary:<is>(bitchin $trait, Any $container) {...} 09:41
evalbot6 Error: unexpected "b" expecting formal parameter, ":" or ")"
jql it's a todo
dbrock ?eval role bitchin {}; sub trait_auxiliary:<is>(bitchin $trait, Any $container) {...}
evalbot6 Error: unexpected "b" expecting formal parameter, ":" or ")"
vkon ?eval $*OS
evalbot6 \undef
dbrock ?eval role Bitchin {}; sub trait_auxiliary:<is>(Bitchin $trait, Any $container) {...} 09:42
evalbot6 undef
jql w t f?
vkon ?eval $*PERLVER
evalbot6 \undef
jql ?eval role Bitchin {multi sub trait_auxiliary:<is>(Bitchin $trait, Any $container) {...} }
evalbot6 undef
dbrock haha 09:43
jql ?eval role Bitchin {multi sub trait_auxiliary:<is>(Bitchin $trait, Any $container) {...} } my $var is Bitchin
evalbot6 undef
vkon there are no version variable in pugs (like $] in perl) isn't it?
autrijus ?eval $?PUGS_VERSION
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6185)'
jql ?eval role Bitchin {multi sub trait_auxiliary:<is>(Bitchin $trait, Any $container) {die("what?") }} my $var is Bitchin
evalbot6 undef
autrijus jql: trait_auxiliary is not handled. 09:44
jql I noticed, but I don't understand the parse error on 'b'
vkon autrijus: thanks. worth mention in docs\quickref\var, isn't it
autrijus almost all metaprogramming generic features is disabled :)
vkon: sure, commits welcome
s/disabled/TODO/
dbrock ?eval sub trait_auxiliary:<is>(int $trait, Any $container) {...}
evalbot6 Error: unexpected "i" expecting formal parameter, ":" or ")"
dbrock that's definitely wrong, right? :-) 09:45
jql I don't get that, either
autrijus I think that's because we don't handle unboxed types :)
and as such all types are assumed to be upper cased.
dbrock is there any problem with not assuming so?
jql ahh. parser shortcut. all parameters begin with [A-Z:$%@&]
autrijus I don't think so, so feel free to change
it's in Lexer.hs line 304 09:46
change "upper" to "letter" will do, I think.
although I don't know about the _ type.
sub f (_ $trait) {}
dbrock what's the _ type?
autrijus it's a valid package name that will not be matched by "letter".
vkon autrijus: will try... this eval bot is that one on Juerd's 'feather.perl6.nl' ?? 09:47
dbrock oh, right
autrijus so maybe you want wordAlpha instead.
vkon: right
come to think about it, maybe _ is a good way to say "is typed"
as in "compiler, please fill in the type here"
my _ $x;
wolverian could we generalise ... to that? :)
autrijus I think ... is the term :) 09:48
dbrock and what does that do?
autrijus dbrock: it's a proposed feature that restricts $x to have a static type.
wolverian which is determined when the variable is first assigned something?
autrijus my $x is typed; $x = "x"; $x = length($x);
wolverian: no, which is unified via the usual inference rules
dbrock oh...
autrijus i.e. at compile time
not runtime
wolverian autrijus, I have no idea what unification means in this context :)
autrijus wolverian: it means that it gathers the three constrains 09:49
dbrock so is that equivalent to my Object $x; ... or something?
autrijus (store($x) <-- Str), (fetch($x) --> Str), (store($x) <-- Int)
and try to find a type that satisfies them
which of course fails
wolverian ah, right.
I do think a 'use static;' is more useful here. 09:50
autrijus I suggested "use traits 'typed'".
i.e. append "is typed" to all var decls.
dbrock isn't there a top type?
wolverian right. that makes sense.
autrijus dbrock: yes, but $x can't be Object because you can't guarantee fetch(Scalar of Object) can yield Str. 09:51
so top type doesn't help here.
wolverian autrijus, would the typed mode be equivalent to haskell?
dbrock so what? Isn't it sufficient to guarantee that it can yield Object? 09:52
autrijus wolverian: or OCaml, or Scala, or Nemerle... but yes.
wolverian autrijus, right. :)
autrijus dbrock: no, because then it may contain something that cannot be stringified.
dbrock: then calling length() on it is bogus.
dbrock ah
wolverian autrijus, did you solve the undef problem you talked about on p6l?
autrijus the idea of "is typed" is make sure that runtime errors are raised
wolverian: looks like "is defined" can work 09:53
wolverian: but larry is musing something very crazy
hopefully he will elaborate.
something about defined(Str) is false.
wolverian that makes sense, and doesn't. 09:54
depending on what defined() does, I guess.
autrijus which is typically larry
so I asked for code examples :)
wolverian yeah. :)
hmm. why aren't classes called templates? 09:55
(in general.)
autrijus because templates don't have this "inheritance" thing?
->SUPER and ->NEXT 09:56
wolverian I think various templating modules do handle that sort of a thing...
autrijus really.
usually they do INCLUDE
wolverian I think Mason has inheritance
component inheritance, anyway
autrijus that's true, but that's stretching its templating metaphor. 09:57
wolverian I guess. the undef thread just made me think about classes as templates.
idle speculation. :)
I have to go, now. I'll check back in the evening to see if Larry has elaborated.ƶ 09:58
autrijus the prototype-based world share you view :)
wolverian s/ƶ//
autrijus sure, ciao
wolverian cheers!
autrijus dbrock: under which name should I add you to AUTHORS? 10:08
svnbot6 r6186 | vkon++ | describe more variables and reorganiza a bit quickref/var
vkon ?eval say %*CONFIG.keys 10:13
evalbot6 bool::true
vkon ?eval %*CONFIG.keys
evalbot6 ()
vkon I see quickref/var are alphabetically sorted... I didn't noticed this first time... but is this reasonable?? 10:14
svnbot6 r6187 | autrijus++ | * Allow lowercase and underscore for type names, eg:
r6187 | autrijus++ | sub f (foo $x) { ... }
r6187 | autrijus++ | Reported by jql.
vkon ?eval %?CONFIG.keys 10:20
evalbot6 ()
autrijus disabled in safe mode. 10:21
autrijus logs out from $work 10:22
bbl
vkon autrijus: see (from Run.hs) 10:24
autrijus: but what @=POD do? can't test it... 10:25
putter dbrock, Aankhen``, et.al., eval:lang<haskell> "True" should be just fine...
?eval sub ev(+$lang,$code){$lang~" > "~$code} ev :lang<haskell> "foo"
evalbot6 'haskell > foo'
putter ?eval sub ev(+$lang,$code){$lang~" > "~$code} ev "bar" :lang<haskell> 10:26
evalbot6 'haskell > bar'
putter ?eval sub ev(+$lang,$code){$lang~" > "~$code} ev:lang<haskell> "foo"
evalbot6 Error: unexpected "\"" expecting ":", "(", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
putter That last is a bug. I haven't gotten around to examining it. Please feel free... :)
Eventually want to be able to parse rx:foo/bar/ . 10:27
And 1..10 :by(2) but adverbs on infix is completely unimplemented. 10:28
scook0 vkon: I thought that was supposed to be %=POD
but @=POD is in the source...
vkon scook0: but how it can be used? can't figure out... 10:30
scook0 vkon: my impression was that if you say %=POD<FOO> 10:31
that gets you a string with the contents of
=FOO
in the current source file (or something like that)
vkon it does not accepts '='; may be it is not implemented?? 10:32
scook0 i.e. it's a hash you can use to access all the different POD regions in the current file
vkon: I don't think it would be implemented
I was talking in terms of the spec 10:33
I don't think pugs handles POD at the moment
(could be mistaken...)
vkon scook0: aha! where are spec?
scook0 vkon: dev.perl.org/perl6/doc/synopsis.html 10:34
vkon scook0: thanks!
scook0 there's also the Apocalypses and Exegeses, but those aren't as current 10:35
and there's a LOT of stuff that's accepted on p6l, but hasn't been written up in the Synopses
so don't take it as gospel :)
putter also search.cpan.org/~ingy/Perl6-Bible-0.19/ and stuff in pugs/docs/AES/ 10:36
svnbot6 r6188 | vkon++ | describe more variables and reorganize quickref/var, 2nd try
Aankhen`` ?eval class Foo { has $.bar = { "bar" }; method baz () { $.bar } }; Foo.new.baz 10:42
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
Aankhen`` ?eval class Foo { has $.bar = "bar"; method baz () { $.bar } }; Foo.new.baz
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
Aankhen`` ?eval class Foo { has $.bar = { "bar" }; method baz () { $.bar } }; Foo.new().baz()
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
Aankhen`` ?eval class Foo { has Str $.bar; method baz () { $.bar } }; Foo.new().baz()
evalbot6 \undef
Aankhen`` ?eval class Foo { has Str $.bar = "bar"; method baz () { $.bar } }; Foo.new().baz()
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
Aankhen`` Ah.
?eval class Foo { has $.bar is ro; submethod BUILD () { $.bar = "bar" }; method baz () { $.bar } }; Foo.new().baz() 10:43
evalbot6 \'bar'
putter It needs some work, but appending this 10:49
site:dev.perl.org OR site:aspn.activestate.com/ASPN/Mail/Browse/Threaded/perl6-language 10:50
to the phrase of interest yields an intriguing google search. I wonder if this could be tweaked to the point of usefulness?
Aankhen`` I think it'd be more useful if you changed the second `site:` to `inurl:`.
dbrock Aankhen``: why did that avoid a parser errorL 10:52
s/L/?/
Aankhen`` dbrock: What?
putter yes! www.google.com/help/operators.html Aankhen``++
Aankhen`` :-D
dbrock: Why did what avoid...? 10:54
The "Changes" file for CGI.pm (Perl 5 :-) scares me. 10:59
Especially the mentions of "Netscape 2.0b2". 11:00
OK, I'm almost asleep anyway, so I'm gonna go lie down in my bead and hope to finish the job. 11:02
BBL. &
putter & 11:07
an improved google suffix: 11:19
inurl:aspn.activestate.com/ASPN/Mail/Message/perl6-language OR inurl:www.nntp.perl.org/group/perl.perl6.compiler OR inurl:dev.perl.org/perl6/doc/design
(though something has been lost - you need to search with omitted results included to get all the relevant stuff some other searches returned...:( 11:20
google has 10k+ pages from rt.openfoundry.org, but no pugs; and a few pages from svn.perl.org/perl6/pugs/trunk/docs/ , but not enough. does have pugs.kwiki.org. 11:27
dbrock Aankhen``: adding the BUILD submethod 11:28
putter &
dbrock if I wanted to have hyphens be interchangable with underscores inside identifiers, could I implement that as some kind of custom parser thing? 11:29
assuming it would be possible --- any idea of how it might look?
11:43 nothingm1ch is now known as nothingmuch
scook0 dbrock: you mean like lisp-style identifiers? 11:45
I suppose in a fully-implemented Perl6 you would be able to replace the default identifier rule 11:46
(you'd probably want to s:g/-/_/ internally for compatibility with everyone else's code) 11:47
QtPlatypus dbrock: You could do it with a macro 11:54
dbrock scook0: ah, right 11:56
(and yeah, that's what I'd do --- use underscores internally) 11:57
QtPlatypus: like wrap all my code in a macro call?
scook0 well, you'd probably end up putting it in a package 11:58
then just put 'use LispyIdentifiers' at the top of all your source files
QtPlatypus Possably. Or an infix macro called "-" that glues the identifier together.
scook0 QtPlatypus: that would be rather inelegant...
QtPlatypus Or as scook0 says, replacing the identifier rule. 11:59
scook0 "There's more than one way to do it" # but not all of them are sensible :) 12:00
dbrock yeah, that'd obviously be the most elegant way
(well, it wasn't obvious to me when I asked the original question, but now that scook0 has mentioned it, it seems blatantly obvious :-))
estel hi 12:22
have you seen iblech here lately? I'm a friend and I'm starting wondering where he is... 12:23
gaal seen iblech 12:24
jabbot gaal: iblech was seen 13 hours 21 minutes 35 seconds ago
estel thank you, you don't have his ip (maybe he's on holidays...) 12:25
Limbic_Region heh - patches I submitted for Parrot over a year old just got applied 12:30
Limbic_Region is still involved with Parrot development and didn't even know it
Has Pugs noticed another startup performance gain recently? 12:32
fglock ping 12:53
fglock hi
bom dia 12:54
Limbic_Region how does the new ruling about native sets affect what you are working on 12:57
from the commits I have seen - I know you have put in a lot of work on them
fglock I understand it is a new type - it is nor a List or Array
more like 'Set', which is likely to be reused 12:58
Limbic_Region err um - does this mean that any/all of the modules you have created are now obsolte
does it mean you can recode some of it to use a new data type
and make some of the things you have already done easier
or are they completely unrelated
or something else entirely?
fglock Set != Ordered Set 12:59
Although I would like to see ordered sets supported
Limbic_Region ok - so none of what you have done changes and it is still needed/useful 13:00
fglock yes - if you had ordered sets you could do things like (1..100) (-) (20..30) --> (1..19),(31..100) 13:01
you can do this with sets, but it is a waste - and it wouldn't work with infinite lists
currently you can't do (1..Inf) (-) (20..30) --> (1..19),(31..Inf) 13:02
you can do this with Set::Infinite
Limbic_Region ok - I think I got it 13:03
thanks
fglock too many data types
i'm only starting to grok List x Array and Container x Value 13:04
I guess I should rename Set::Infinite to Set::Ordered 13:06
I'm learning to switch back and forth between $x.method and $x->method 13:20
svnbot6 r6189 | fglock++ | * perl5/Perl6::Value::List - t/array-lazy.t passes all tests 15:05
r6190 | iblech++ | * docs/quickref/var: Added note about p6l musing about $*ENV and $?ENV. 15:07
r6190 | iblech++ | * PIL2JS: runjs.pl: Added PIL2JS_RESOURCE_GUARD from pil2js.pl to runjs.pl.
r6191 | iblech++ | t/magicals/, t/builtins/io/: skip_rest if $*OS eq "browser". 15:14
Limbic_Region OS = browser? 15:18
Emacs trying to take over the world again?
iblech No, PIL2JS :) 15:19
I.e. JavaScript
Limbic_Region was of course kidding 15:26
svnbot6 r6192 | fglock++ | * perl5/ List passes grep(), map() tests
hexmode I'm pretty sure the world is already ruled by emacs 15:32
hexmode ducks and covers
stevan iblech: someone was looking for you earlier 15:38
svnbot6 r6193 | fglock++ | * perl5 List - map, grep working - "coro-less"
r6194 | fglock++ | * updated TODO
iblech stevan: Yep, talked to him, thanks for noticing :) 15:39
stevan iblech: cool :)
iblech fixed -CPIL not printing multi sub decls, committing in a minute
stevan iblech++ :) 15:40
iblech Thanks :)
svnbot6 r6195 | iblech++ | Pugs.Compile: -CPIL prints multi sub decls now. (It's a 2-line patch, 15:42
r6195 | iblech++ | (Haskell's conciseness++) :))
scrottie uploading to slowass. this will take about an hour ;) 16:18
svnbot6 r6196 | brentdax++ | Initial Pugs checkin.
scrottie ack, wrong window.
scrottie looks at svnbot6, startled
brentdax ...crap, didn't mean to do that.
autrijus what the... 16:21
autrijus takes swift action.
...you beat me to it. ;) 16:22
chip_ autrijus: could you give me a quick answer how hoisting is supposed to work given the presence of { my $x; { my $x; $x = 1 } }
autrijus chip_: note the inner scope is a closure.
brentdax Wow, I screwed things up. Sorry.
autrijus i.e. a Code.
chip_ it's a Code in principle, but given the "as-if" rule I'm not planning to make it a real Code 16:24
svnbot6 r6197 | autrijus++ | ...undo...
chip_ darn it, I have to go. transportation
grr
autrijus chip_: a inner label is as good as a inner routine, no?
chip_ &
autrijus oh well. ciao
chip_ not for pad reasons
labels dont' have pads
chip_ & really
autrijus I suggest that I can hang pads to labels. 16:25
or I'll use a real inner routine for it.
ciao :)
brentdax: it's fine, you wasted maybe 10 bytes on the repository 16:26
autrijus praises svk, lazy copy
brentdax True. Hurray for cheap copies.
Limbic_Region autrijus - so you don't go back to $work till next Monday right?
autrijus Limbic_Region: right, I plan to give PIL another push this weekend
however I need to sleep first :) 16:27
Limbic_Region right
autrijus clkao++ # cheap copies across offline repositories and back
brentdax I'll try using 'pull' instead of 'sync' from now on. ;^) 16:28
clkao damnit, I am so cheap!
autrijus clkao++ # cheap and cheerful!
Limbic_Region autrijus - as you have a pretty good handle on who is concentrating on what - who, if anyone, is focusing on implementing more of the spec'd p6 into Pugs 16:29
Limbic_Region was suprised to hear you estimate only 25% of the spec'd language has been implemented
autrijus Limbic_Region: note that of the remaining 75%, over half was vaguely, badly, or inconsistently specced.
which we don't really notice until we go ahead and implement them anyway. 16:30
brentdax Proof that you only use 20% of the language for 80% of your tasks... 16:31
autrijus indeed.
or
Proof that perl6 is a 10x richer language than perl5.
;)
brentdax is vaguely tempted to fake MMD with nested hashes. 16:32
(or rather, MMD with arbitrary constraints.) 16:33
autrijus you mean value mmds
yeah.
brentdax I figure I could do %adapter{$revision.attributes<kontent:class>}{$request.mode}{$request.format}, then try undefing one, then two. Or something. But that would be insane. 16:34
autrijus how did you survive in p5? :) 16:36
brentdax I could have written this project in Perl 5 anytime if I thought the language was up to it. 16:37
With Pugs I at least know the hacks are temporary. I couldn't stand them being permanent. 16:41
Gah, I hate how when you pack the night before, you always end up needing stuff you've packed the next morning. 16:43
autrijus proceeds to defend inferencing some more. 16:54
fglock autrijus: set operations are list ops? 16:57
or will be a separate entity for sets 16:58
autrijus fglock: just provide two coercers. :)
Set.to_list and List.to_set 16:59
chip_: larry lifted the ban!
the ban on documenting about named returns :) 17:00
autrijus is happy
sub f ($x --> $y) { $y = $x * 2; say "I return $y anyway!" }
fglock 1..Inf.to_set could yield a Span object - you can do 1..Inf intersection -Inf..10 and get 1..10
autrijus fglock: right. that'd be cool 17:01
fglock *shift doesn't call the core shift, it calls the method 17:03
autrijus you need &*shift
otherwise it's taken as slurpizing shift().
fglock :) 17:04
autrijus sub init_dbh (--> DBI $dbh) { $dbh .= connect('dbi:...'); $dbh.do('some init code'); say "I return $dbh no matter what :-)" } 17:11
integral eww, how fortranish :) 17:17
PerlJam fortranish? 17:19
stevan reminds me of "out" parameters in Ada 17:21
autrijus I don't think it's a bad idea :) 17:22
(but yes it's very fortranish.)
it also enables
sub foo (+$dbh) { ... }
and then
foo(init_dbh()) 17:23
without explicitly passing in the name
(not sure it's a feature, but it falls out naturally)
integral foo init_dbh; # more perlish
ods15 if((a=p[m]&~15)&&a==p[m-1]>>4?(!(++n^1)&&!(U[n-1]=p[m-1]&15))||(U[n]=p[m]&15)<<1:n){ 17:24
autrijus yeah. 17:25
ods15 i'm trying out for ioccc
do i have a chance :/
tbh, i think not
autrijus you can learn to program in J instead.
ods15 my program is mostly just ugly, not obfuscated :/ 17:26
autrijus # en.wikipedia.org/wiki/J_programming_language
qsort =: ]`(($:@:((}.<:{.)#}.)),{.,($:@:((}.>{.)#}.)))@.(*@#)
ods15 i've seen worse. i think 17:30
autrijus oh? 17:33
coral ow ow
the source to formail looks like what you said, ods15 17:34
ods15 formail?
F(j,9,0)n=(m=r[j*9+i].i)+r[i+j*9].t,x[n?m:1]-=0&y[r[j+i*9].i]--||n?!z[r[L(i,j)].i]--|1:(j=0,3);
F(i,10,1)i=b->n[i]?main(Q(r+((V*)memcpy(b+1,r,!~3+sizeof(r))-1)->p,b->i=i),0)? 17:35
b->i+(memcpy(r,b+1,sizeof(r))&&0):1:i;
for(a=(k[10]==n)*9;a--||(m++,n=0);)F(i,9*!!(p[m]&(8<<(a+2))),(k[i]?R(c,i):1));
those are all my best expressions
the rest are nowhere near as good, and even these are not that good :/ 17:36
fglock i'm debugging perl5/Lazy for half an hour - can't find the bug 17:37
ods15 as perl programmers i was wondering if you guys can help me obfuscate...
fglock ods15: i'm trying to learn to do the opposite :) 17:38
ods15 rafb.net/paste/results/M9AM4o72.html 17:39
that's an out of date version actually.. my newer version is about 300-400 bytes smaller and hasn't been formatted yet
the design IS supposed to mean something, but it's hardly understandable, only if you already know it... 17:40
autrijus journal up. /me waves & 17:43
dduncan alright
obra night
ods15 bite 17:45
mauke sizeof(*p)? how boring 18:06
I'd use sizeof*p or sizeof n or sizeof L(3, 'x') 18:08
svnbot6 r6198 | fglock++ | * perl5/ List - almost all tests pass 18:24
ods15 mauke: ? 18:36
what's sizeof L(3, 'x') ?
mauke do you know what sizeof is?
ods15 well, i know it's a C construct, not a function... 18:37
hmm, a keyword.. meaning is can tolerate not having ()...
anyway, finally, this one is the first good expression i made using recursions.. (i have a recursive main(), but it's not a very good recursion) 18:38
T Q(t,o)V*t;{u t->i?o&16?t->t=0:(t->n[o+1]=Q(t,R(L((t->p%9/3+t->p/27*3),o),R(o*9+t->p%9,
R(o+t->p/9*9,t->i)))?o-1:e)):(e=t->i=o)&&Q(t,8);}
mauke sizeof is a (unary) operator
the nice thing about it is that it doesn't evaluate its operand
ods15 mauke: ok, but what's that 'L' thing got to do with it
mauke that's a function in the source 18:39
ods15 yeah, it only cares about the typeof
hmm, so, if i have some functions which returns typeof *p, i can use it there, and it will never be called?
mauke yes 18:40
typeof *p seems to be int, so sizeof printf("hello") would work
ods15 hmm, yeah, that one is an int
i got another sizeof though for a struct 18:41
and none of my functions return that struct, it's global
no, wait, it's a sizeof of the entire array 18:42
mauke (2<<5)^17 is the same as 2<<5^17
typedef struct {...} V; "better" written as struct {...} typedef V;
ods15 that's odd, i thought i removed all redundant ()
ohhh, it's the one in the very begginning 18:43
lol, i hadn't touched that part in quite a while, i just needed to spazz up a const :)
mauke there are many redundant () there
sizeof(r) => sizeof r 18:44
.deparse :p (p[m]&~15)&&(p[m]>>4==p[m-1]>>4)
p[m] & ~15 && p[m] >> 4 == p[m - 1] >> 4
no parens needed
ods15 mauke: i think that one has already been fixed
if((a=p[m]&~15)&&a==p[m-1]>>4? \ (!(++n^1)&&!(U[n-1]=p[m-1]&15))||(U[n]=p[m]&15)<<1: \
yeah 18:45
some are to prevent compiler warnings, my program compiles cleaning without warning in -Wall
hmm, that's a bug! .. ? 18:46
odd that it worked 18:47
that '<<1' should've been '>>4'
mauke still too many parens 18:48
but I guess gcc warns about && in || 18:49
ods15 mauke: yes 18:50
that's the only redundant paranthesis there
anyway, the new version...
rafb.net/paste/results/PfdeWb36.html 18:51
afaik not a single redundant () there, except sizeof
mauke wow, C++ rocks: int x ; :: new (& x) int ( 42);
ods15 mauke: ?? 18:52
mauke it compiles
ods15 what is it though 18:53
new is a keyword, not a function, so i'm not sure what ::new() does...
mauke putchar((putchar(p++->i+3*16)&1<<5)-22*!(i%9)) could be rewritten as putchar(putchar(p++->i+3*16)%2*32-22*!(i%9)) 18:54
ods15 i didn't even know new could get a 9&)
mauke that's just placement new
ods15 (&x) i mean
mauke that's how you tell it to construct an object at a specified address
it should be equivalent to x = 42; 18:55
ods15 putchar(p++->i+3*16)%2*32 - i don't get it.. how would this work?
mauke hmm, or not
haha, I'm an idiot
ods15 mauke: and it destroys the previous object?
mauke no, it doesn't call any destructors
ods15 it should...?
mauke never mind, my "rewrite' is wrong
it's useful if you want to implement a container like std::vector 18:56
ods15 but, i think it should call the destruct is x's type is some kind of weird advanced thing
because it's basically overwriting it 18:57
mauke you can get a chunk of memory with new char[x], then construct objects in it with new (buf) T;
ods15 if x was pointwer, it would be like: delete x; x = new something
anyway, forget it, i hate C++
anyway, my next TODO is to make it "pretty print" 19:00
instead of dull output
2 8 6 9 1 3 7 5 4
3 9 1 5 7 4 6 8 2
1 4 3 | 5 8 6 | 2 9 7
======+=======+======
8 9 4 | 2 1 5 | 7 6 3
like that
i can easily do it with more putchars(), but putchar is an expensive funxtion name... 19:01
it won't fit easily in my formatting later, and it's a lot of bytes
mauke: any ideas? 19:04
maybe puts
kolibrie stevan: ping 19:32
stevan kolibrie: pong 19:33
pdcawley pang
kolibrie stevan: about to commit 20_000_ft_view.txt
stevan kolibrie: nice! 19:34
kolibrie in response to your adding my name to your 10_000 ft view
stevan :P
masak at which altitude will the file contain just one dot? :) 19:35
kolibrie stevan: r6200
what a nice number that is
svnbot6 r6199 | kolibrie++ | initial import of metamodel 20_000_ft_view.txt
kolibrie oh, 6199
stevan masak: orbital_view.txt
masak oh :) 19:36
kolibrie stevan: I was planning on sending a post to p6c, to kick off discussion 19:37
nothingmuch evening 19:38
kolibrie hi nothingmuch
stevan evening nothingmuch
kolibrie that made a nice pyramid
kolibrie hits send 19:40
stevan kolibrie: cool 19:41
svnbot6 r6200 | masak++ | spelling
r6201 | iblech++ | PIL2JS: 19:44
r6201 | iblech++ | * Unbreak Test.pm procompilation (was broken because -CPIL outputs the multi
r6201 | iblech++ | &Test::skip now -- needs proper multi support in PIL2JS).
r6201 | iblech++ | * Speed up compilation by 300% or so by not indenting the output unless
r6201 | iblech++ | explicitely wanted -- i.e. ":js ..." in the interactive shell still outputs
r6201 | iblech++ | indented code, but Prelude.js is mostly unindented. This also fixes the
r6201 | iblech++ | problem that compiling t/operators/arith.t takes 1.5 GiB of RAM... 19:45
r6201 | iblech++ | * Rewrote the indenting code to use a regex instead of manually splitting and joining.
integral 1.5GiB :-/
Khisanth and I thought compiling pugs itself was bad... 19:46
stevan kolibrie: should I respond with changes/updates/clarifications on p6c? or add to the doc? 19:50
ok, not seeing a p6c post yet, so I will update svn :) 19:51
kolibrie stevan: whichever - the post should be coming - but svn is the "master" 19:52
stevan ok 19:53
svnbot6 r6202 | iblech++ | Prelude::JS::ControlFlow: Fix if $junc {...} and unless $junc {...} (was 19:54
r6202 | iblech++ | incorrectly autothreading).
r6203 | iblech++ | PIL2JS: PIL::Params: Always $?SELF := invocant in methods. 19:59
nothingmuch is hearing sirens and automatic gun fire 20:01
you'd think I was in israel or something
Khisanth you're not?
nothingmuch ;-)
silliness aside - this is a quiet part of israel, and the sirens and gunfire were unrelated 20:02
i expect possibly more sirens later in response to the gunfire, but i think the first ones were an ambulance
the gunfire we get around here is usually beduim tribes duking it out because someone's sister had a crush on a guy from another family 20:03
masak romeo and juliet theme
nothingmuch: are you in any danger? 20:04
nothingmuch masak: i don't think so 20:05
nothingmuch has a good feeling about the snail-mail mailbox
nothingmuch goes to check (an excuse to ride my bike) 20:06
masak :)
nothingmuch shit... my bike is stuck in piles of books and I can't wedge it out 20:07
masak i hate when that happens 20:08
nothingmuch yeah, we're rennovating
Khisanth read faster! :P
masak lol
nothingmuch Khisanth: i can't read german and these are mostly in german, and not mine, either
mostly my mother's
masak then i guess your bike is stuck
Khisanth hmm burn the books! 20:09
nothingmuch yes, it is, till they finish retiling our floors and we can refill the bookshelves
masak maybe someone else who knows german can read them and remove them?
nothingmuch Khisanth: they're in my room, next to my: bed, books, bass, furniture
masak you should ask TSa for help
or stevan 20:10
nothingmuch heh =)
'rents read german, so that's not a problem, and most of these books were already read
anyway, i'm going to go by car =(
masak ...if it's not obstructed by giant servers :)
svnbot6 r6204 | iblech++ | PIL2JS: 20:14
r6204 | iblech++ | * PIL::Params: Don't autothread junctions if in Bool context. (To be
r6204 | iblech++ | fair, I'm not really checking if we're in Bool context (that'd need some more
r6204 | iblech++ | work on the -CPIL side as well), but if the param expects a Bool.)
r6204 | iblech++ | * PIL::Params: Params which expect Pairs do not participate in named binding.
Khisanth nothingmuch: walk! 20:18
nothingmuch Khisanth: too lazy time wise
bike is quick, car is quick and cumbersome, walk is slow 20:19
anywho, good news - my new pocket knife has arrived. I bought it 3 months ago when I was supposed to go camping, but they ran out of stock. Camping was subsequently delayed till cancellation, and now the knife arrives just as plans for camping are reformulating 20:20
this is possibly a good sign, since it could mean that camping might actually happen this time around 20:21
svnbot6 r6205 | iblech++ | PIL2JS: README: Updated to current status (no return exceptions any more, but CPS). 20:34
r6206 | fglock++ | * perl5/ List - only 2 bugs left 20:56
r6207 | Stevan++ | 20,000 ft view - updates, clarifications and corrections to kolibrie++ document 21:07
Aankhen`` goes to sleep. 21:14
G'night.
kolibrie stevan: thanks for your clarifications and corrections 21:27
kolibrie will ponder overnight
svnbot6 r6208 | iblech++ | * Usual svn props. 22:03
r6208 | iblech++ | * PIL2JS:
r6208 | iblech++ | * Unbreak subs which take params which are not Any or Pair (was broken
r6208 | iblech++ | because of r6204).
r6208 | iblech++ | * return(...) always jumps out of the enclosing subroutine, not block/whatever.
r6208 | iblech++ | * Still haven't figured out why .pairs does not work 100% correctly, seems to
r6208 | iblech++ | have to do with pairs, will investigate further tomorrow.
iblech Night all :) 22:05
svnbot6 r6209 | fglock++ | * perl5/ List 22:16
r6209 | fglock++ | - all tests pass!
r6209 | fglock++ | - Removed pair() - this module does not has access to the Pair constructor
r6209 | fglock++ | - updated MANIFEST
r6209 | fglock++ | - Separate from_num_range() and from_range() constructors.
r6209 | fglock++ | - from_num_range() is a numeric range.
r6209 | fglock++ | - from_range() is a generic range for strings, etc.
r6209 | fglock++ | Both constructors are just new() wrappers.