Pugs 6.2.8 released! | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net Set by autrijus on 13 July 2005. |
|||
brentdax | Is there a Perl 6 tail call syntax, and if so is it implemented in Pugs? | 00:36 | |
autrijus | &sub.goto(...); | 00:37 | |
and yes. | |||
brentdax: do you see a problem with Block params default to Item|Pair|Junction -- i.e. any ? | 00:42 | ||
s/any/Any/ | |||
brentdax | Just that the for 1|2|3 { ... } behavior is no longer automatic. | ||
autrijus | but it is of dubious value anyway | 00:43 | |
brentdax | Oh...are tail method calls possible? | ||
True. | |||
autrijus | tail method calls. hrmph. | 00:44 | |
what would you suggest as a syntax? | |||
brentdax | Basically, it means that a lot of things that were expected to autothread before won't. But that's not necessarily a bad thing, because those were mostly surprising places to autothread. | ||
autrijus | (tail methcalls is only not there because of unspeccedness) | ||
brentdax | I don't know...Perl 6 doesn't have an equivalent of a C# delegate (besides general-purpose currying, that is). In the worst case, you could do something along the lines of $obj.can('method').goto($obj, ...); | 00:47 | |
But clearly that's rather ugly. Maybe $obj.\method can give you a reference to the method, pre-curried to $obj. | 00:50 | ||
autrijus | maybe .can('method') should precurry to $obj anyway. maybe. | 00:51 | |
goto $obj.can('method'): @args; | |||
anyway, try p6l it and we'll see how to implement that :) | 00:52 | ||
brentdax | Will do, soonish. | ||
autrijus | eggcellent. | 00:53 | |
Khisanth | first ./ now .\? :/ | 00:58 | |
coral | autrijus: with Quantum::Entanglement it's possible to tell it to pick one of the entangled numbers in the junction | ||
how do i do that with (0|1)? | |||
autrijus | Khisanth: I don't think it's a good idea :) | 00:59 | |
?eval (0|1).pick | |||
evalbot6 | 1 | ||
coral | aha | ||
autrijus | ?eval (0|1).pick | ||
coral | thanks | ||
evalbot6 | 1 | ||
autrijus | ?eval (0|1).pick | ||
evalbot6 | 1 | ||
autrijus | mmmmm. | ||
coral | ?eval ((0|1).pick) xx 10 | ||
evalbot6 | (0, 0, 0, 0, 0, 0, 0, 0, 0, 0) | ||
coral | hmm | ||
Khisanth | autrijus: I am envisioning a perl6 variant called toothpick | ||
autrijus | Khisanth: I \\ /|\ | \//|\ \ | ||
coral | ?eval sub decision () returns Int { (0|1).pick }; (decision) xx 3 | 01:00 | |
evalbot6 | (1, 1, 1) | ||
coral | ?eval sub decision () returns Int { (0|1).pick }; (decision) xx 50 | ||
evalbot6 | (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) | ||
Khisanth | that looks like a bridge :) | ||
autrijus | coral: xx is merely repeat | ||
coral | hm | ||
so it evals left side and THEN repeats | |||
is there a way to force left side to eval *after* the repeat occurs? | 01:01 | ||
autrijus | ?eval map { (0|1).pick } 1..10 | ||
evalbot6 | (0, 0, 1, 1, 1, 0, 1, 0, 0, 1) | ||
coral | aha! | ||
unf! | |||
thank you :) | |||
autrijus | np :) | ||
coral | ?eval map { (0|1).pick } 1..any(5..10) | ||
evalbot6 | ((0 | 1)) | ||
coral blinks | |||
?eval map { (0|1).pick } 1..5 | |||
evalbot6 | (0, 1, 1, 1, 1) | ||
coral | ?eval map { (0|1).pick } 1..(any(5,10)) | 01:02 | |
evalbot6 | ((0 | 1)) | ||
coral | ?eval any(5,10) | ||
evalbot6 | 5 | ||
coral | i don't get it | ||
autrijus | ?eval 1..(5|10) | ||
evalbot6 | (1, 2, 3, 4, 5) | ||
autrijus | ?eval 1..(5|10) | ||
evalbot6 | (1, 2, 3, 4, 5) | ||
autrijus | ?eval 1..(5|10) | ||
evalbot6 | (1, 2, 3, 4, 5) | ||
autrijus | ?eval 1..(5|10) | ||
evalbot6 | (1, 2, 3, 4, 5) | ||
autrijus | hrm. | ||
coral | well, i think there's one or two bugs in that somewhere | ||
autrijus | what's wrong with the randomizer. | ||
coral | ?eval 1..any(1) | ||
evalbot6 | (1) | ||
coral | ?eval 1..any(10) | ||
evalbot6 | (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) | ||
autrijus | ?eval map { 1 } 1..2 | ||
evalbot6 | (1, 1) | ||
coral | ?eval 1..any(2,4) | ||
evalbot6 | (1, 2) | ||
autrijus | ?eval map { 1 } 1..any(2,2) | 01:03 | |
evalbot6 | ((1)) | ||
autrijus | ?eval map { 1 } 1..any(3) | ||
evalbot6 | ((1)) | ||
autrijus | ?eval map { 1 } 2..any(3) | ||
evalbot6 | ((1)) | ||
coral | neato | ||
i think 2..any() is busted | |||
autrijus | only as argument to map | ||
coral | ?eval map { (0|1).pick } 1..(4|5|6).pick | ||
evalbot6 | (0, 1, 1, 1) | ||
autrijus | I think what happens is that it autothreads over map | ||
coral | ?eval map { (0|1).pick } 1..(4|5|6|7|7|7|7|7|7|7|7|7|7|7).pick | ||
evalbot6 | (0, 1, 0, 0, 1, 1, 0) | ||
coral | hey, that worked. neato. | 01:04 | |
autrijus | as a list of junctions with one element | ||
and recombine back to any(1,1,1,1,1) | |||
which is ((1)) | |||
coral nods | |||
?eval 0^1 | 01:05 | ||
evalbot6 | 0 | ||
coral | ?eval 2^4 | ||
evalbot6 | 2 | ||
coral | ?eval my @code = (0|5).pick..(6|10).pick; @code | 01:07 | |
evalbot6 | [5, 6] | ||
coral | ?eval my @code = (0|5|5|5|5|5|5|5|5).pick..(6|10|10|10|10|10|10).pick; @code | ||
evalbot6 | [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | ||
coral bows. | |||
stevan | rehi autrijus | 01:10 | |
if you have a spare moment, can you please look over perl5/Perl6-MetaModel/t/80_Code.t | |||
I need an (in)sanity check on the class layout :) | 01:11 | ||
autrijus | looks excellent | 01:13 | |
stevan | autrijus: :) | ||
thank you | |||
autrijus | :) | 01:14 | |
stevan | ok, nothingmuch and I are going to prototype some MMD stuff this weekend | ||
autrijus worries a bit about name clash with existing CPAN Perl6::* modules | |||
stevan | yes, I thought about that too | ||
I am punting on it for now though | 01:15 | ||
autrijus ponders Perl6::Runtime::Signature, P6::Signature, etc | |||
sure | |||
stevan | hmm, P6:: might be nice | ||
mugwump | stevan: out of interest, why wouldn't you use check_params at new() time ? | 01:16 | |
I just hate seeing unmarshalled @_ going into objects ;) | |||
(reminds me of the Tangram code base too much) | |||
stevan | mugwump: where specifically? | ||
mugwump | oh, wait, duh, this is a test script. I just saw the packages | 01:17 | |
and my brain flipped into "you are reading a module" mode | |||
stevan | mugwump: yes, it was just a first draft | ||
s/was/is/ | 01:18 | ||
autrijus | hm, I really need to find some breakfast, lest I'll be late, as in late autrijus tang | ||
bbiab & | 01:19 | ||
mugwump | Maybe I should write a version of Class::Tangram::Generator that makes Perl6::Class objects | 01:26 | |
hmm, no, it would have to work from T2 objects. | 01:31 | ||
that seems like an interesting distraction | 01:32 | ||
autrijus | rehi. | 02:12 | |
autrijus praises food | |||
cm is hungry | 02:16 | ||
Khisanth | hmm | 02:39 | |
mugwump prods svnbot6 | 03:16 | ||
svnbot6 | r5722, mugwump++ | A little doodle | ||
r5723, Stevan++ | Perl6::Code - changes execute() to do() because $Larry hates COBOL | |||
stevan | mugwump: very interesting | ||
mugwump | You like? :D | 03:17 | |
stevan | so can that make Perl6::MetaModel classes from a DB schema? | ||
mugwump | so long as (DB schema) does Tangram::Schema | ||
stevan | nice | ||
mugwump | I have an example schema that is modelled against an RT schema in the Tangram distribution. There is also a simpler "musicstore" schema | 03:20 | |
stevan | very nic | ||
e | |||
so using this I can build normal Class::Tangram classes, and they will make Perl6::MetaModel classes? | 03:21 | ||
svnbot6 | r5724, Stevan++ | Perl6.MetaModel : JS port of Perl6::MetaModel | ||
r5724, Stevan++ | * only (partial) Perl6.MetaClass so far, but the C3 MRO is ported | |||
r5724, Stevan++ | - some tests as well | |||
stevan | iblech: that one is for you :P | ||
autrijus | say what? | 03:22 | |
stevan | :P | ||
autrijus | wow, I see some loving from JSAN | ||
maybe this can indeed hit JSAN ;) | |||
cwest: look! Perl6/MetaClass.js! | 03:23 | ||
stevan | we will see how the actually class builder part turns out, the MetaClass is the easy part | ||
autrijus | JSAN-compliant even | ||
stevan: perl5/ ? :) | |||
cwest | woo! | ||
autrijus ponders jsan/ or js/ | |||
stevan | autrijus: I wasnt sure where to put it actually | 03:24 | |
mugwump | stevan: Class::Tangram generates accessors, it doesn't try to represent them. T2::Class is the "meta" object, if you like | ||
stevan | mugwump: ok, I think I get it. I will wait for some more tests to really grok it | 03:26 | |
jdv79 | how does one generate js? | 03:56 | |
autrijus | jdv79: see PIL2JS/README | ||
perl5/PIL2JS/README | |||
jdv79 | oh, thanks! | 03:57 | |
autrijus | :) | 03:59 | |
brentdax | Hmm...are there any parts of Pugs that are especially slow? Each page request is taking several seconds of max CPU right now... | 04:03 | |
autrijus | yes, the evaluator is especially slow. | 04:04 | |
it will be faster in the new evaluator, and is already faster if compiled to PIR. | |||
brentdax | Heh. | 04:05 | |
autrijus | i.e. known issue, working on it :) | ||
(we apologise for the inconvenience) | |||
brentdax | (Code base is 700-odd lines, and uses both Perl 5 interop and some simple regexen via Parrot embedding.) | ||
autrijus | nod... likely not your problem. | 04:06 | |
brentdax | Alright. I was thinking that maybe the pattern matches might be a problem, and that I should use :p5 instead. | 04:07 | |
autrijus | you can bench, but I don't think that is the bottleneck. | ||
brentdax | I don't think I'll bother, then--this doesn't have to be fast yet, it just has to work. | 04:13 | |
luqui | none(): poke | 04:16 | |
jdv79 | mandel to js in FF ran a little faster this time:) cool. | 04:19 | |
luqui | there's a js backend now? | 04:21 | |
stevan | luqui: yes | 04:22 | |
brentdax | I'm not sure if the JS backend is the coolest or most twisted thing I've ever heard of. Or maybe both. | 04:26 | |
cwest | brentdax: My vote is both. | 04:47 | |
05:57
calvin__ is now known as calvin_
|
|||
svnbot6 | r5725, Stevan++ | Perl6.MetaModel - | 06:24 | |
r5725, Stevan++ | * added Perl6.Method class | |||
r5725, Stevan++ | - tests for this | |||
r5725, Stevan++ | * added Perl6.MetaClass.Dispatcher class | |||
r5725, Stevan++ | - added tests for this | |||
r5725, Stevan++ | * added dispatcher support and method support for MetaClass | |||
r5725, Stevan++ | - added tests for that | |||
Darren_Duncan | I've just been working on writing my Lightning Talk now ... | 08:07 | |
and boy is 5 minutes ever short | |||
near as I can tell, it takes 5 seconds to read a line of text, so I have to max out at 60 full lines, or better yet 60 partial lines to allow pauses and breathing | |||
that's not very much at all | |||
my original intro was 2.5 minutes itself, and I'll have to chop it way down | 08:08 | ||
anyway, that's all fyi | |||
kks | How to call a shell script from a perl cgi? | 08:19 | |
QtPlatypus | I think that you need #perl rather then #perl6 | 08:20 | |
kks | QtPlatypus, thanks | 08:24 | |
QtPlatypus | No problem. | 08:26 | |
?eval class Foo {...};ref(Foo); | 10:49 | ||
evalbot6 | *** ... - not yet implemented at <eval> line 1, column 12-15 | ||
QtPlatypus | ?eval class Foo {};ref(Foo); | ||
evalbot6 | ::Class | ||
10:52
Aragone is now known as Arathorn
|
|||
svnbot6 | r5726, fglock++ | * Added tests for negative infinity stringification | 13:39 | |
r5726, fglock++ | (-Inf ne '-Inf') | |||
r5727, fglock++ | (fixed test count) | |||
r5728, fglock++ | * Tests int() of special values Inf,-Inf,NaN | 13:51 | ||
dada | ?eval ref('Foo'); | 14:39 | |
evalbot6 | ::Str | ||
dada | ?eval ref(Foo); | ||
evalbot6 | Error: No compatible subroutine found: "&Foo" | ||
dada | ?eval my $sub = \&print; ref($sub); | ||
evalbot6 | Error: Undeclared variable: "&print" | ||
dada | ?eval my $sub := \&print; ref($sub); | 14:40 | |
evalbot6 | Error: Undeclared variable: "&print" | ||
dada | ?eval my $sub = sub { 42 }; ref($sub); | ||
evalbot6 | ::Sub | ||
dada | ?eval my $array = (1,2,3); ref($array); | 14:41 | |
evalbot6 | ::Array | ||
nothingmuch | home.cwru.edu/%7Ejnt5/Planarity/ | 14:47 | |
nothingmuch is already at level 12 | |||
productivity is down | |||
but fun is up | |||
dada | nothingmuch: Planarity++ (even +++) | 15:07 | |
nothingmuch | oh man | ||
Khisanth | that thing again | 15:18 | |
dada | ?eval ref 42 | 15:36 | |
evalbot6 | ::Int | ||
dada | ?eval ref \42 | ||
evalbot6 | ::Int | ||
dada | ?eval ref 1,2,3 | ||
evalbot6 | (::Int, 2, 3) | ||
dada | ?eval ref(1,2,3) | ||
evalbot6 | Error: No compatible subroutine found: "&ref" | ||
dada | ?eval ref [1,2,3] | ||
evalbot6 | ::Array | ||
QtPlatypus | ?eval ref (1,2,3) | 15:37 | |
evalbot6 | ::Array | ||
Aankhen`` | ?eval my $foo = 10; $foo is random_trait; | 15:42 | |
evalbot6 | undef | 15:43 | |
Aankhen`` | ?eval my &foo := sub () { "foo" }; &foo is random_trait; foo | ||
evalbot6 | 'foo' | ||
Aankhen`` | ?eval module Foo { my &Foo::("foo") := sub () { "foo" }; &Foo::foo is random_trait; foo } | 15:44 | |
evalbot6 | Error: unexpected "{" expecting trait, ";" or end of input | ||
Aankhen`` | ?eval module Foo { &Foo::("foo") := sub () { "foo" }; &Foo::foo is random_trait; foo } | ||
evalbot6 | Error: unexpected "{" expecting trait, ";" or end of input | ||
Aankhen`` | ?eval module Foo { &Foo::foo := sub () { "foo" }; &Foo::foo is random_trait; foo } | ||
evalbot6 | Error: Undeclared variable: "&Foo::foo" | ||
Aankhen`` | ?eval module Foo { &foo := sub () { "foo" }; &foo is random_trait; foo } | ||
evalbot6 | Error: Undeclared variable: "&foo" | ||
Aankhen`` | ?eval module Foo { }; &Foo::foo := sub () { "foo" }; foo | 15:45 | |
evalbot6 | Error: Undeclared variable: "&Foo::foo" | ||
Aankhen`` | Bah. | ||
dada | QtPlatypus: does the space matters? | ||
QtPlatypus | dada: Yes | ||
dada | awful | ||
QtPlatypus | ref(1,2,3); Means call the three argument form of &ref. There is no three arugment form of ref so it fails. | 15:46 | |
dada | yes, I understand this | ||
osfameron | eeek! | ||
QtPlatypus | ref (1,2,3); Means call ref on the array (1,2,3). So it works. | 15:47 | |
dada | but then, "mysub (1,2,3) means "call mysub with a single arrayref parameter?" | ||
QtPlatypus | ref .(1,2,3)l Means call the three arguement form of &ref | ||
dada | oops | ||
but then, "mysub (1,2,3) means "call mysub with a single arrayref parameter?" | |||
dada is unable to type | |||
QtPlatypus | Thats my (and pugs) understanding. | 15:48 | |
dada | ?eval sub foo(*@args) { join ", ", @args; }; foo(1,2,3); | ||
evalbot6 | '1, 2, 3' | ||
dada | ?eval sub foo(*@args) { join ", ", @args; }; foo (1,2,3); | ||
evalbot6 | '1, 2, 3' | ||
dada | mmm | ||
QtPlatypus | ?eval sub foo(@args) { join ", ", @args; }; foo(1,2,3); | 15:49 | |
evalbot6 | Error: No compatible subroutine found: "&foo" | ||
QtPlatypus | ?eval sub foo(@args) { join ", ", @args; }; foo (1,2,3); | ||
evalbot6 | '1, 2, 3' | ||
dada | I'm not sure *@args should take [1,2,3] as (1,2,3) | ||
?eval sub foo(*@args) { join ", ", @args; }; foo (1,[2,3],4); | 15:50 | ||
evalbot6 | '1, 2 3, 4' | ||
QtPlatypus | What do you mean? | ||
dada | I expected @args to contain only one element, an arrayref | 15:51 | |
oh, but my expectation is wrong, I see | |||
(1,2,3) (which is [1,2,3] in p5 terms) is evaluated in list context here, so it correctly derefs | 15:52 | ||
QtPlatypus | It still is the list context. | ||
dada | ?eval sub foo(*@args) { join ", ", @args; }; foo \(1,2,3); | ||
evalbot6 | '1 2 3' | ||
dada | heh | ||
QtPlatypus | ?eval sub foo(@args) { join ", ", @args; }; foo [1,2,3]; | 15:53 | |
evalbot6 | '1 2 3' | ||
dada | ?eval sub foo(@args) { join ", ", @args; }; foo \(1,2,3); | ||
evalbot6 | '1, 2, 3' | ||
dada | this is very, very subtle | ||
QtPlatypus nods "It is" | 15:54 | ||
dada | but wait, why [1,2,3] comes in as @args[0]? | ||
?eval sub foo(@args) { join ", ", @args; }; my @x = (1,2,3); foo @x; | 15:55 | ||
evalbot6 | '1, 2, 3' | ||
dada | ?eval sub foo(@args) { join ", ", @args; }; my @x = (1,2,3); foo \@x; | ||
evalbot6 | '1, 2, 3' | ||
dada | ?eval sub foo(@args) { join ", ", @args; }; my $x = (1,2,3); foo $x; | ||
evalbot6 | '1 2 3' | ||
dada | ouch | 15:56 | |
QtPlatypus | The lession here, use the spaceless form unless you realy realy knwo what your doing. | ||
dada | I think the spaced form should elicit a warning, unless you "use mastery;" | 15:57 | |
gaal | hola | 16:03 | |
lumi | Hola | 16:05 | |
stevan | hey gaal | 16:08 | |
gaal | greetings from the tel-aviv hackathon! | 16:11 | |
stevan | gaal: nice | ||
geoffb waves in the general direction of tel-aviv | 16:12 | ||
PerlJam | tel-aviv hackathon? | 16:14 | |
these hackathons are *everywhere* ;) | |||
lumi | "Join us..." | 16:15 | |
geoffb | Need to have one at my house. :-) | ||
stevan | PerlJam: if you are going, can you pick me up on the way? My jet is in the shop | 16:16 | |
geoffb | Of course, not any time soon, what with the coming baby and all . . . | ||
stevan | geoffb: hackathon hours are not all that different from new baby hours actually :) | 16:18 | |
geoffb | Yeah, but both together would have me up the entire time the hackathon was going. | ||
By day 3 my code could be mistaken for fluent Drunkeneese | 16:19 | ||
stevan | geoffb: we could all take turns feeding, burping and changing diapers,... hackers tend to be good at such things :P | ||
geoffb | LOL | ||
stevan | though in all seriousness, I think gaal has a great idea | 16:20 | |
geoffb | oh, totally | ||
stevan | (mini-local-hcakathons)++ | ||
if I didnt think my wife would kill me, I would have one :) | 16:22 | ||
gaal | whoa, gaal also has some grocieries he forgot to put in the fridge. brb | 16:41 | |
Jon1 | has anybody used placeholders with use perl5:DBI ? | 16:48 | |
my @a = $db.selectrow_array('select * from emp where pid = 1'); works for me | |||
my @a = $db.selectrow_array('select * from emp where pid = ?', undef, 1); does not work for me | |||
the parameters are the sql, then a hashref of statement attributes or undef, then the parameters to bind | 16:50 | ||
in perl 5 I almost always just used undef | 16:51 | ||
pugs gives me: DBI::st=HASH(0x8968c10)->_prepare(...): attribute parameter 'pugs=SCALAR(0x881e55c)' is not a hash ref at /usr/lib/perl5/site_perl/5.8.4/i686-linux/DBD/Oracle.pm line 321. | |||
geoffb | Given what you just said, is there a problem with s/undef/{}/? | 16:52 | |
Jon1 | what is the p6 syntax for an literal empty hashref? (I've tried various things with no luck) in p5 it was just {} | 16:53 | |
geoffb | ?eval \{} | ||
evalbot6 | \sub {...} | ||
geoffb | ah, interesting | ||
?eval {,} | 16:54 | ||
Khisanth | ?eval +{} | ||
evalbot6 | Error: unexpected "," expecting ";", statements or "}" | ||
Error: cannot cast from VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubBlock, subEnv = Just (MkEnv {envContext = CxtItem (mkType "Any"), envLValue = False, envLexical = MkPad (padToList [("$?1",[(<ref>,<ref>)]),("$_",[(<ref>,<ref>)]),("$code",[(<ref>,<ref>)]),("$lang",[(<ref>,<ref>)]),("&?BLOCK_EXIT",[(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>)]),("&break",[(<ref>,<ref>),(<ref>,<ref>)]),("& | |||
Khisanth | ! | ||
geoffb | ?eval {;} | ||
evalbot6 | undef | ||
geoffb | ! | ||
Jon1 | I think in p6 {} is always a closure | ||
geoffb | ok | ||
hmmm | |||
Khisanth | ?eval hash{} | ||
evalbot6 | {('<SubBlock(<anon>)>' => undef)} | ||
geoffb | ?eval hash() | ||
evalbot6 | {} | ||
geoffb | A-ha! | ||
Khisanth | ah | ||
so it IS looking more and more like PHP :) | 16:55 | ||
geoffb | evalbot6++ # just for being there when I needed it most | ||
geoffb sees 'PHP' and starts saying 'la-la-la-la-la-la' | |||
Khisanth | hmm | ||
?eval {=>} | |||
evalbot6 | Error: unexpected ">" expecting term | ||
Jon1 | my @a = $db.selectrow_array('select * from emp where pid = ?', hash(), 1); | 16:56 | |
DBI::st=HASH(0x8968c10)->_prepare(...): attribute parameter 'ARRAY(0x8968d30)' is not a hash ref at /usr/lib/perl5/site_perl/5.8.4/i686-linux/DBD/Oracle.pm line 321. | |||
Khisanth | ?eval {undef=>undef} | ||
evalbot6 | {('undef' => undef)} | ||
geoffb | Jon1, eww | ||
Jon1, try 'my $empty = hash(); my @a = $db.selectrow_array(..., $empty, 1); | 16:57 | ||
just to help narrow this one down | |||
Jon1 | my @a = $db.selectrow_array('select * from emp where pid = ?', {('undef' => undef)}, 1); | ||
DBI::st=HASH(0x8968c10)->_prepare(...): attribute parameter 'ARRAY(0x8968d30)' is not a hash ref at /usr/lib/perl5/site_perl/5.8.4/i686-linux/DBD/Oracle.pm line 321. | |||
ok | |||
16:57
Maddingue__ is now known as Maddingue
|
|||
Jon1 | my $empty=hash(); my @a = $db.selectrow_array('select * from emp where pid = ?', $empty, 1); | 16:58 | |
DBI::st=HASH(0x8968c10)->_prepare(...): attribute parameter 'ARRAY(0x8968d30)' is not a hash ref at /usr/lib/perl5/site_perl/5.8.4/i686-linux/DBD/Oracle.pm line 321. | |||
geoffb | pugs seems to have invariance problems with literal things versus same stuffed in variables. Or maybe it is a Perl 6 issue . . . | ||
bah | |||
embed-layer bug, mayhaps | 16:59 | ||
Khisanth | geoffb: perl5 has a bit of problem with that too | ||
geoffb | Khisanth, fair enough, but I've still been amazed at how often it comes up in pugs . . . I think my mental model of the internals must be wrong. | 17:00 | |
Khisanth | well only one I know of in p5 is with undef | ||
geoffb | Khisanth, example? | 17:01 | |
Aankhen`` | ?eval 1 => 2 => 3 => 4 | ||
evalbot6 | (1 => (2 => (3 => 4))) | ||
geoffb | ... and there was much rejoicing | 17:02 | |
Aankhen`` | Hi. | ||
gaal | hey Aanken``! | ||
Aankhen`` pouts. | |||
s/nk/nkh/ | 17:03 | ||
And: HI gaal. =) | |||
gaal can't type. sorry :) | |||
Aankhen`` | What's shakin'? | ||
gaal | tlv hackathon's up, yo | ||
Aankhen`` | Oooh, awesome. | ||
Man. I'm thoroughly exhausted today. It's only 10:30 PM and I'm already thinking of turning in. | 17:04 | ||
geoffb would follow up with a similar slangfest, but I just can't bring myself to do so. | |||
Aankhen``, are you in Bangalore? | |||
Aankhen`` | Somewhere in India. :-) | 17:05 | |
geoffb | Dang. Was trying that "Think of a card. Is it the Ace of Spades?" trick | ||
Aankhen`` | o_O | ||
With "Bangalore"? | 17:06 | ||
How does that go? | |||
geoffb | You're in the right timezone, and Bangalore is a tech center, so the percentages were good enough to try it. If I'd been right, you'd have gone "How the heck did you know that?" :-) | ||
I think the Ace of Spades and the Queen of Hearts are the most popular cards, so just guessing one of those will get a certain percentage of your audience to be impressed. | 17:07 | ||
"Think of a number. Is it 3?" Is similar | |||
Aankhen`` | Ah, thataway. | ||
?eval (1, 2, 3) >>+ 4 | 17:08 | ||
evalbot6 | Error: unexpected ">" expecting operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
Khisanth | ?eval (1, 2, 3) >>+<< 4 | ||
evalbot6 | (5, 6, 7) | ||
Aankhen`` lost his bearings with regard to `>>+` vs. `>>+<<` today. | 17:09 | ||
Khisanth | ?eval sub prefix:<sub prefix:<+> ($val) { $val + 4 } +<< (1,2,3) | 17:12 | |
evalbot6 | (1, 2, 3) | ||
Khisanth | hmm | 17:13 | |
oops | |||
?eval sub prefix:<+> ($val) { $val + 4 } +<< (1,2,3) | |||
evalbot6 | (5, 6, 7) | ||
Khisanth | Aankhen``: need the >> and << unless it's a unary op :) | ||
Aankhen`` | Er... wha? | 17:14 | |
Khisanth | ?eval (1,2,3) >>++ | 17:18 | |
evalbot6 | Error: Can't modify constant item: VInt 1 | ||
Khisanth | hmm | ||
?eval my @foo = (1,2,3); @foo >>++ | 17:19 | ||
evalbot6 | Error: Can't modify constant item: VInt 1 | ||
Khisanth | ?eval my @foo = (1,2,3); ++<< @foo | 17:21 | |
evalbot6 | Error: Can't modify constant item: VInt 1 | ||
svnbot6 | r5729, Aankhen++ | * HTTP::Cookies: added `NEXT` block within &add_cookie_header. | ||
r5730, Aankhen++ | * HTTP::Status: (hopefully) better generation of mnemonic subroutines. | |||
r5731, Aankhen++ | * HTTP::Status: fixed mistake in previous commit. | |||
Khisanth | why is that a constant? | 17:22 | |
Aankhen`` | ?eval sub foo (&block) { &block() }; foo(-> { "foo" }) | 17:24 | |
evalbot6 | 'foo' | ||
Aankhen`` | ?eval sub foo (*&block) { &block() }; foo(-> { "foo" }) | ||
evalbot6 | pugs: Internal error: doBindArray: unexpected char: '&' Please file a bug report. | ||
Aankhen`` | ?eval sub foo (Code *$block) { &block() }; foo(-> { "foo" }) | ||
evalbot6 | Error: No compatible subroutine found: "&block" | ||
Aankhen`` | ?eval sub foo (Code *$block) { $block.() }; foo(-> { "foo" }) | ||
evalbot6 | 'foo' | ||
Aankhen`` | ?eval sub foo (Code *$block) { $block.() }; foo():{ "foo" } | 17:25 | |
evalbot6 | 'foo' | ||
Aankhen`` | How come `*&block` doesn't work? | ||
geoffb | slurpy block? | 17:30 | |
dammit, can't even make unoptimized anymore. | 17:32 | ||
geoffb goes about trying to clean VM | |||
(sigh) | |||
Aankhen`` | Yes, slurpy block. | ||
I would have thought it'd function in the same way as `Code *$block`. | 17:33 | ||
Khisanth | what exactly does a slurpy block mean? | ||
Aankhen`` | A block that can be passed as an adverb (see last ?eval above). | ||
G'night. | 17:39 | ||
svnbot6 | r5732, iblech++ | * Usual svn properties. | ||
r5732, iblech++ | * New test added to t/data_types/hash.t: | |||
r5732, iblech++ | my %hash = (a => 1, b => 2, a => 3); say %hash<a> # should be 1, not 3 | |||
r5732, iblech++ | (see www.nntp.perl.org/group/perl.perl6....age/22401) | |||
geoffb | Hmmm. | 17:45 | |
iblech++ # including a link to the ruling | 17:46 | ||
.oO( But what's wrong with foo(*%defaults, a => 1)? ) |
|||
gaal | hey folks. i'm getting ready to check in the file-based build config stuff; it might break stuff so i need your help testing + fixing :) | 17:47 | |
geoffb | "file-based build config stuff"? | ||
oh, the YAML thing? | |||
gaal | yeah, at last. | ||
geoffb | I was in try-to-build mode anyway, so as soon as I can build (aka kill some windows chewing VM), I can help test | 17:48 | |
gaal | cool, thanks | 17:49 | |
geoffb | np | ||
gaal | sec, i want to make clean once after the svn up to make sure i'm not committing total bollcks :) | 17:50 | |
anyone know why $ccdlflags aren't being passed to make ghci today? | 17:51 | ||
dinner :) & | 17:52 | ||
iblech | stevan: FYI, I'm reading the docs of Perl6[.-]MetaModel now so we can integrate it into PIL2JS today/tomorrow :) | 17:55 | |
svnbot6 | r5733, iblech++ | PIL2JS: Splitted the main Prelude::JS into smaller parts, e.g. | 17:57 | |
r5733, iblech++ | Prelude::JS::Array, Prelude::JS::Code, etc. | |||
gaal | hola szabgab | 17:59 | |
szabgab | hey gaal are you also here ? | ||
gaal | i see the hummous got to you. :) | ||
szabgab | that and all the other the things I stuffed | 18:00 | |
iblech | stevan: "Submethods are methods which can only be called by an invocant whose class is the same as which the submethod has been defined in. Meaning they are not inherited." | ||
stevan: But the following does work (I asked Larry): class Foo { submethod blarb {...} }; class Bar is Foo { submethod blarb {...} }; Bar.new.blarb() (calls &Bar::blarb); Bar.new.Foo::blarb() (calls &Foo::blarb) | 18:01 | ||
Limbic_Region | $larry just muddied the decision on hash assignment btw | ||
geoffb | It's times like this I remember why I haven't subscribed to p6* | 18:02 | |
iblech | stevan: The relevant posting is at groups-beta.google.com/group/perl.p...538ded4a3, at the very end | 18:03 | |
Hm... WRT to hash creation with duplicate keys: I don't care if we choose the Perl 5 behaviour or Luke's, but I think I definitely want the behaviour to be the same in assignment and binding (consistency...) | 18:05 | ||
geoffb | agreed | 18:06 | |
PerlJam | iblech: I've come to rely on p5's behavior in a couple of places. I'd prefer that it remain that way :-) | ||
though if it's right-most wins on assignment and left-most on binding I could probably deal. | |||
geoffb | That seriously violates least surprise | 18:07 | |
PerlJam | well ... talk to $Larry about it. | 18:08 | |
PerlJam contemplates writing a "science fiction" story where a large community of programmers follow the lead of their chief language designer despite his occasional bizarre decisions only to find out in the end that the language designer has gone crazy mid-way through the design process ;-) | 18:10 | ||
geoffb takes comfort in the fact that we can make a 0-day Perl 6+i if need be | 18:11 | ||
svnbot6 | r5734, iblech++ | t/oo/submethods.t -- SomeSubclass.Superclass::some_submethod() should work (and | ||
r5734, iblech++ | does), see groups-beta.google.com/group/perl.p...538ded4a3. | |||
geoffb has mentally brutalizing children's songs going through his head | 18:15 | ||
.oO( as opposed to all of them that *aren't*? ) |
|||
Must replace with something opposite . . . hmmm, Ozzy in order, I think | 18:16 | ||
gaal, my current compile still continuing. How close are you to committing? | |||
dudley is reminded of the duet that Ozzy did with Miss Piggy... | 18:17 | ||
geoffb | Man, that would have been fun to watch | ||
Sigh . . . ghc going on 4 min of CPU time for Pugs.Run | 18:19 | ||
iwlx | Huh, only? | 18:20 | |
18:20
iwlx is now known as wilx
|
|||
wilx | I remember AST.hs to take much more time. | 18:20 | |
geoffb | wilx, *just for that one file* | 18:21 | |
Oh, perhaps, but this is pass 2. | |||
whee, linked | |||
(using 290 MB of VM . . . I really need to finish up that separate-link-pass patch) | |||
wilx, oh, and unoptimized . . . I can't build optimized at all on this box | 18:22 | ||
Limbic_Region | I am completely confused by Pugs compile times - my work machine (which is beefier) takes forever while my home machine takes no time at all (relatively speaking) | 18:23 | |
geoffb | Odd . . . same OS and toolchain versions? | ||
integral | Limbic_Region: more memory at home? (more free memory?) | 18:24 | |
Limbic_Region | integral - beefier = more resources all around | 18:25 | |
integral | hmm, are you using those resources? | ||
Limbic_Region | well, not me personally - but it is possible that there are some uber hidden monitoring devices I don't know about - but if there are I can't detect them | 18:26 | |
geoffb | gaal, OK, previous pugs made/installed/realcleaned -- ready when you are | ||
Limbic_Region | hmmm - that's odd | ||
there very well may be hidden processes | 18:27 | ||
*shrug* - it isn't like I can complain really - what exactly is Pugs and how does it relate to your job would be a tough question to answer | 18:28 | ||
geoffb | Work machine is locked down, yes? I wonder if they went so far as to run the visible env under a VM supervisor . . . . | ||
Limbic_Region | yes, locked down. But it works, and that is what counts. | 18:30 | |
geoffb | sure . . . just theorizing | ||
?eval my $foo = [1, 4, 9]; say $foo[0]; $foo[0]++; $foo[0]; | 18:31 | ||
evalbot6 | 1 \2 | ||
geoffb | hmm | 18:32 | |
Limbic_Region | makes sense | ||
1 is the return code of say | |||
geoffb | sorry, evalbot was failing to replicate a strangeness in my code | ||
?eval my $foo = [1, 4, 9]; say $foo[0]; $foo[0] += 10; $foo[0]; | 18:33 | ||
evalbot6 | 1 \11 | ||
geoffb | ?eval my $foo = {bar => [1, 4, 9]}; say $foo<bar>[0]; $foo<bar>[0] += 10; $foo<bar>[0]; | 18:34 | |
evalbot6 | 1 Error: Can't modify constant item: VInt 1 | ||
geoffb | Aha! | ||
Caught you, you bastard | |||
?eval my $foo = {bar => [1, 4, 9]}; say $foo<bar>[1]; $foo<bar>[1] += 10; $foo<bar>[1]; | |||
evalbot6 | Error: Can't modify constant item: VUndef | ||
geoffb | urp? | ||
?eval my $foo = {bar => [1, 4, 9]}; say $foo.perl; say $foo<bar>[1]; $foo<bar>[1] += 10; $foo<bar>[1]; | 18:35 | ||
evalbot6 | {('4' => 9), ('bar' => 1)} Error: Can't modify constant item: VUndef | ||
geoffb | wah? | ||
?eval my $foo = (bar => [1, 4, 9]); say $foo.perl; say $foo<bar>[1]; $foo<bar>[1] += 10; $foo<bar>[1]; | |||
evalbot6 | ('bar' => [1, 4, 9]) 4 \14 | ||
coral | Limbic: "skills development" | ||
geoffb | coral: ? | 18:36 | |
?eval my $foo = {bar => [1, 4, 9],}; say $foo.perl; say $foo<bar>[1]; $foo<bar>[1] += 10; $foo<bar>[1]; | |||
evalbot6 | {('bar' => (1, 4, 9))} 4 Error: Can't modify constant item: VInt 4 | ||
Limbic_Region | coral ? | ||
geoffb fervently hopes that hash parsing wierdness is a pugs issue and not a design misfeature | 18:37 | ||
?eval my $foo = {bar => [1, 4, 9], baz => 6}; say $foo.perl; say $foo<bar>[1]; $foo<bar>[1] += 10; $foo<bar>[1]; | 18:38 | ||
evalbot6 | {('bar' => (1, 4, 9)), ('baz' => 6)} 4 Error: Can't modify constant item: VInt 4 | ||
geoffb | ?eval my $foo = {bar => [1, 4, 9], baz => 6}; say $foo.perl; say $foo<baz>; $foo<baz> += 10; $foo<baz>; | 18:39 | |
evalbot6 | {('bar' => (1, 4, 9)), ('baz' => 6)} 6 \16 | ||
geoffb considers his options: | 18:41 | ||
1. Bang head against wall until bloody | |||
2. Go crazy and get a visit from the nice men carrying a white coat with long sleeves | |||
3. Table current several projects and actually get around to learning Haskell | |||
Dammit, this isn't an easy decision | 18:42 | ||
PerlJam | Learning Haskell has some side benefits. you should choose option #3 | ||
iblech | geoffb: FYI, your last two ?evals work fine in PIL2JS :) | 18:43 | |
geoffb | sigh, you're probably right | ||
Limbic_Region | geoffb - you could add an option 4 (which is what I have decided to do) | ||
take a break | |||
use.perl.org/~Limbic%20Region/journal/25807 | |||
gaal | okay, the build system thing - lumi cause me to think about it a bit | ||
which is good | 18:44 | ||
because i realized that it sucks | |||
s/cause/caused/ | |||
it doesn't suck badly | |||
but it does suck somewhat. | |||
geoffb | iblech, sure, but I have some very cool things I'd like to do in the pugs world that A) require Perl 5 embedding right now, and B) were making me happy to think about doing *soon* | ||
gaal, fair enough | |||
gaal | here's the deal | 18:45 | |
it has two purposes: | |||
1. factor out duplicate lines in Makefile.PL | |||
2. centralize config options | |||
(making it possible to put your personal prefs in a file) | |||
(and override them temporarily from env) | 18:46 | ||
so, #2 achived. | |||
problems is, i removed about 20 lines from Makefile.PL | |||
by adding about 200 elsewhere :) | |||
geoffb | I've shelved some of my makefile tweaks in the hope that your stuff would do #1, to make my changes easier | ||
stevan | iblech: ping | ||
iblech | stevan: pong | 18:47 | |
stevan | iblech: re: submethods | ||
geoffb | gall, Well, just not having 20 different variations on ghc's command line params would be nice . . . | ||
gaal | so maybe i'll ci this and let y'all try and see if you like it? | ||
geoffb | gaal, That's the Pugs Way. | ||
stevan | yes, what larry said was that if you call the submethod bypassing the dispatch table, then all bets are off | ||
see Perl6::SubMethod::force_call | 18:48 | ||
gaal | just have to add a little dep on the config file so that editing it then running make triggers a rebuild. | ||
iblech | stevan: ah, ok then | ||
geoffb | gaal, cool | 18:49 | |
stevan | iblech: it is not the idea solution, but it works for BUILDALL DESTROYALL, and I punted on the other details | ||
mostly because I dont have proper packages in the prototype | 18:50 | ||
iblech: also, i will be updating the Perl6.MetaModel (JS) more this weekend, but it is not yet complete enough for integration | |||
I still need to figure out how to do Perl6.Object | 18:51 | ||
and Perl6.Class | |||
basically, JS does not have AUTOLOAD | |||
which is the crux of how I deal with method dispatching | |||
iblech | Hm... we could emit .dispatch("subname")() instead of .subname(), then .dispatch can deal with AUTOLOAD appropriately | 18:53 | |
stevan | iblech: that would work | ||
or I can try to pre-populate the prototype of the generated class | |||
iblech | Ah, basically AUTOLOAD at compile-time :) | 18:54 | |
stevan | yes | 18:55 | |
bloated, but it would work | |||
however, It would make classes closed | |||
unless I wrapped .meta.add_method to add into the class as well | |||
but then I would have to handle all classes | |||
iblech | Hm... couldn't you extend the prototype at runtime, if necessary? | ||
stevan | yuk | 18:56 | |
iblech: yes, but say I add to Perl6.Object, I need to mess with every prototype in the system | |||
because I am not using the prototpyes for inheritance | |||
I am doing it on my own | |||
iblech | Ah..., ok | ||
stevan | oh, wait | ||
Object.watch might do what we need | 18:57 | ||
I am investigating right now | |||
iblech | Object.watch? | ||
Ah! | 18:58 | ||
coral | Limbic: pugs at work. skills development. | 19:01 | |
Limbic_Region | coral - that's an extreme stretch given that I am not a programmer by trade | 19:02 | |
geoffb | Limbic_Region, what is your trade then? | ||
Limbic_Region | geoffb - well, since working as a government employee I don't really do much of anything | 19:03 | |
geoffb | *chuckle* | ||
Besides that, silly man | |||
Limbic_Region | but my previous job titles included "Systems Engineer" | ||
geoffb | I can definitively say (having hired several "system engineers") that programming is Most Definitely skills development | 19:04 | |
Limbic_Region | basically - I design solutions to problems which may involve hw, sw, networks, etc | ||
right - but as I said, I am not a systems engineer anymore | |||
geoffb | It stretches the brain in a way that makes for much better solutions. | 19:05 | |
so what does the government think you do, how about that phrasing? | |||
stevan | iblech: I don't think Object.watch will do what we need | ||
Limbic_Region | geoffb - I review documentation, sit on an engineering review board to render decisions - um - hard to say | 19:06 | |
stevan | Limbic_Region: that sounds like *gasp* management?? | ||
Limbic_Region | our IT staff consists of 2 people - myself and a network goon - everything else is contracted out | 19:07 | |
geoffb | yikes | ||
Limbic_Region | stevan - nope, not people mgmt nor project mgmt - just decisions on if a particular approach meets the contractual requirements | ||
stevan | Limbic_Region: suuuuurrreeee :) | 19:08 | |
Limbic_Region does get to code some perl sometimes when data needs to get converted from 1 format to another in a hurry | |||
go figure | |||
stevan | iblech: I have to do $work now, but I will be doing some MetaModel stuff more tonight (approx 5-6 hours from now) | 19:09 | |
geoffb | apt-get install hugs # The adventure begins . . . | 19:10 | |
<newbie_mode>Does Haskell have a way to combine multiple lines into one? (as with ; in Perl) | 19:21 | ||
gaal | ; ? you mean \ ? | 19:22 | |
geoffb, one function application? | |||
geoffb | No, I meant I want to be able to do a pile of definitions on one line, like the custom when feeding evalbot6. These tutorials all show prettyprinted files, and I'm a one-liner guy | 19:23 | |
gaal | ahhh, you want non-layout | ||
{ a ; b ; c } | |||
you need the braces too | |||
geoffb | ok, /me tries that . . . | ||
Hmm, hugs doesn't seem to like that | 19:25 | ||
bah, ok, food has arrived | |||
& | |||
kolibrie | hmm, larry is rewriting method and attribute syntax | 19:50 | |
geoffb | o_O | 19:51 | |
Link, kolibrie ? | |||
iblech | stevan: re. Great :) | 19:52 | |
geoffb: www.nntp.perl.org/group/perl.perl6....uage/22404 | |||
kolibrie | iblech: thanks for providing the link | 19:57 | |
svnbot6 | r5735, fglock++ | * Added a "Set::Symbols" role that implements unicode | ||
r5735, fglock++ | operators in Span.pm and Recurrence.pm (it could be | |||
r5735, fglock++ | used in Set.pm too) | |||
kolibrie | geoffb: sorry, I was on the phone | ||
geoffb | kolibrie, oh, no prob. | 19:58 | |
Interesting -- so now convention becomes authoritative | |||
er, wrong word there | 19:59 | ||
"becomes binding"? | |||
svnbot6 | r5736, fglock++ | * svn properties | 20:18 | |
Khisanth | hmm why not just method foo is private ... ? | 21:31 | |
geoffb | .oO( He wants two uses for the same thing (_ == privacy) so that people don't complain about it being a singleton concept in the language? ) |
21:33 | |
21:35
Maddingue__ is now known as Maddingue
|
|||
iblech | Night all :) | 21:38 | |
svnbot6 | r5737, iblech++ | PIL2JS: | ||
r5737, iblech++ | * Added some new primitives and fixed some bugs. | |||
r5737, iblech++ | * Refactored &run_pugs, run_pil2js, etc. into separate module lib/PIL2JS.pm. | |||
r5737, iblech++ | * runjs.pl automatically precompiles the Prelude now, if needed. | |||
r5737, iblech++ | * Test.pm is now precompiled, too. Now tests using Test.pm compile and run | |||
r5737, iblech++ | with a satisfactoring speed -- if s/use Test//: | |||
r5737, iblech++ | "use Test" still loads and compiles Test.pm -- bad. BEGIN { | |||
r5737, iblech++ | %*INC{"Test.pm"}++ } would work, but: pugs -E "BEGIN {...}" t/.../foo.t does | |||
r5737, iblech++ | (of course) not work... | |||
ocarina | greetings | 22:18 | |
autrijus, i'm reading the interview chromatic made you at perl.com... pretty cool :) | 22:19 | ||
22:19
ocarina is now known as Excalibor
|
|||
geoffb | OK, end of _Haskell Tutorial for C Programmers_, time for a break before _Tour of the Haskell Syntax_ | 22:29 | |
Excalibor | geoffb, :) | 22:34 | |
Excalibor still reading _Functional Programmin with Haskell_ :-P | 22:37 | ||
geoffb | I'm trying to keep my partially-read book stack small, but I'm pretending that online tutorials do not constitute pushing onto that stack | 22:40 | |
Excalibor | geoffb, yeah, keep lieing to yourself... ;) | 22:43 | |
geoffb | yep, it's completely OK that I'm several levels deep in Haskell and Forth tutorials because of harrorth. Damn nothingmuch++. :-) | 22:44 | |
Khisanth | you can't damn someone while increasing their karma! | 22:47 | |
geoffb | Certainly you can. "Damn you for being right" makes total sense to me. Besides, damnation and karma aren't on the same vector, though they have non-zero dot product. | 22:49 | |
Oh dear, I'm losing my mind. | |||
Khisanth | since we are damning things I would like to damn wikipedia :) | 22:51 | |
geoffb | For managing to replicate the whole surfing-off-into-the-sunset problem of the web as a whole, all in just one site? | ||
Excalibor | geoffb, haha only serious? | 22:53 | |
geoffb | nodnod | 22:54 | |
Excalibor | well... time for bed to me | ||
geoffb | g'night | 22:55 | |
Excalibor | take care... thx | ||
gotta keep trying to understand those monads in pugs, though... some IO module in mind, no way to do w/o them though, lol | 22:56 | ||
i'll keep studying :) | |||
laters! | |||
szabgab | ?eval "gabor" ~ " szabo" | 23:00 | |
evalbot6 | 'gabor szabo' | ||
szabgab | (gaal here showing off safe mode) | ||
?eval open "/etc/passwd" | 23:01 | ||
evalbot6 | Error: No compatible subroutine found: "&Pugs::Internals::openFile" | ||
Khisanth | geoffb: neither | 23:02 | |
geoffb | neither? | ||
geoffb can't remember having asked a disjunction | |||
Khisanth | oops "no" :) | ||
geoffb | So why *are* you damning wikipedia? | 23:03 | |
Khisanth | because I read something on it before and now I can't recall the name! | ||
geoffb | heh | ||
?eval use perl5:Cwd; cwd | 23:04 | ||
evalbot6 | pugs: *** No compatible subroutine found: "&require_perl5" at src/perl6/Prelude.pm line 110, column 30-59 | ||
Khisanth | ah en.wikipedia.org/wiki/Programming_paradigm should lead me to the right place :) | ||
geoffb | Cute: [10,9..1] in Haskell | 23:10 | |
wolverian | ?eval 3..1 | 23:12 | |
evalbot6 | () | ||
wolverian | :( | ||
Khisanth | geoffb: why is that cute? | 23:17 | |
[10,8..1] is even nicer :) | 23:18 | ||
hmm | 23:19 | ||
?eval 3..1:by(-1) | |||
evalbot6 | Error: unexpected ":" expecting digit, fraction, exponent, term postfix, operator, "does", "but", "is", "^..^", "cmp", "<=>", "^..", "..^", "..", postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
geoffb | OK, so I hadn't come up with the most powerful example. I just meant the idea of determining the step by showing two in series, rather than some "by" syntax, is a cool idea | ||
Khisanth | bah, do both for the sake of TIMTOWTDI! :) | 23:20 | |
geoffb | well, yes, there is that | ||
Khisanth | I see nothing particularly wrong with :by though | 23:21 | |
geoffb | OK, this is beginning to bug me, and the tutorials so far have not cleared this up. Is there either A) a base type that unifies with every other type, or B) a data structure in Haskell that is variable-length like a list and contains differently-typed contents, like a tuple? | ||
Khisanth | [10..] :) | ||
heh a list of tuples? :P | 23:22 | ||
geoffb | Hmmm, doesn't seem to work. | 23:23 | |
"Cannot infer instance" | |||
So I guess that kills A as a likely possibility, or it would have Just Worked | |||
Khisanth | heh I think I had/have the same problem | 23:24 | |
geoffb | I was appalled to see the definition of Eq on tuples, with only tuples of length 1 to 10 or so defined | ||
For a language that prides itself on flexible typing, that's just odd | 23:25 | ||
Khisanth | isn't zip only define for up to 3 lists? :) | 23:29 | |
geoffb | That's just wrong. | ||
"Language designers should be forced to pass language ideas past the average 5 year old . . . " | 23:30 | ||
Khisanth | geoffb: although I seem to recall autrijus writing a oneliner that does the same as zip but works for an arbitrary number of lists :) | 23:31 | |
nothingmuch | seen ingy | ||
jabbot | nothingmuch: ingy was seen 2 days 6 hours 31 minutes 5 seconds ago | ||
nothingmuch | blast | ||
thunder | |||
geoffb | Khisanth, yeah, for a list of lists . . . but what about an arbitary length tuple of lists? | 23:32 | |
ingy | nothingmuch: whuh? | 23:36 | |
geoffb | _Tour of the Haskell Syntax_ down . . . next! | 23:47 |