|
»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moderator on 20 October 2009. |
|||
| diakopter | TimToady: do you see any downside to emulating the compile-time for each block instead of the whole tree at once? | 00:00 | |
| thoe more I think about it, the more it seems ok to me. | |||
|
00:02
dalek left
|
|||
| quietfanatic | I want a way to find the class of a method. | 00:03 | |
|
00:03
dalek joined
|
|||
| quietfanatic | I mean, the class a method belongs to. | 00:03 | |
| lisppaste3 | Wolfman2000 pasted "Inputs 41, 97, 17, "Hi!" (no quotes) for this RSA code gives 003200330032. I suspect I made a mistake here." at paste.lisp.org/display/90873 | ||
| quietfanatic | Is this possible? | 00:04 | |
|
00:06
middayc_ joined
|
|||
| quietfanatic | If so, it will simplify Events to a large degree. | 00:07 | |
| TimToady | diakopter: what do you mean by 'emulating'? | 00:20 | |
| diakopter | I mean, evaluating | 00:22 | |
|
00:23
synth joined
00:24
middayc__ joined
|
|||
| japhb | Is there a perl6doc that is A) working, B) reasonably quick, and C) up to date with the spec? | 00:25 | |
| TimToady | diakopter: I still don't understand what you mean. most compile-time evaluation must happen immediately at BEGIN time | 00:30 | |
| Wolfman2000 | rakudo: my Str $fin; $fin = 'AFB'; say $fin; | 00:31 | |
| TimToady | trait handlers run the moment they're recognized and modify they're declarand immediately | ||
| p6eval | rakudo 7347ec: AFB | 00:32 | |
| TimToady | *their | ||
| Wolfman2000 | ...I wonder why I'm getting AFBStr() instead of that | ||
|
00:33
justatheory joined
|
|||
| quietfanatic | TimToady: Does a method know what class it's in, ot does that constrain them too much? | 00:35 | |
| colomon | surely self.WHAT would do the job? | 00:36 | |
| quietfanatic | *or | ||
| No, I mean given the method as an object, not the code inside the method. | |||
| colomon | oh | 00:37 | |
| TimToady | no, a method is just a sub that happens to have a reference installed into a metaclass, and could in fact be installed in several at once | 00:38 | |
| like a Unix inode | |||
| quietfanatic | I see | ||
| TimToady | which is also what allows a method to be exported as a multi | 00:39 | |
| quietfanatic | What I need is basically a way, given a method, to find all the objects it would be called on. | 00:40 | |
| The problem is, that 'would' is not so well defined anymore. | |||
| TimToady | your brain must be in upside-down | 00:41 | |
| you keep wanting to follow references backwards :) | |||
| quietfanatic | Yes well, events are backwards like that. | 00:42 | |
| You kinda have to think upside-down in order to implement them. | |||
| TimToady | events usually require a registry of handlers somewhere | ||
| quietfanatic | I have that | ||
| I also need a registry of objects. | |||
| TimToady | or you think you do | 00:43 | |
| quietfanatic | Simply put, if a routine is like a GOTO then an event is like a COME FROM. | ||
| Or a registry of classes that have their registry of objects. | |||
| Each object needs to respond to events individually. | |||
| And most events only affect one object. | 00:44 | ||
| I also don't want to register a pile of handlers every time an object is created. | |||
| TimToady | you want the system to do it for you :P | 00:46 | |
| quietfanatic | I want to do as few operations when an object is created as possible. | ||
| Ideally, just one push onto an object registry. | 00:47 | ||
| TimToady | yes, well, then events are going to be slow, unless you have a Content Addressable Memory sitting around as a co-processor | ||
| quietfanatic | I understood the first half of that :) | 00:48 | |
| TimToady | but you're basically asking for magic from the system | ||
| quietfanatic | No it doesn't have to be like that. | ||
| TimToady | there aren't that many approaches to inverting data | 00:49 | |
| quietfanatic | Each object in a given class will have exactly the same event handlers, so I should only have to register the handlers for the class. | ||
| and register the object once for the class | |||
| That will be everything required. | |||
|
00:49
eternaleye joined
|
|||
| TimToady | so you need classes that also keep a collection, but what about subtypes? | 00:50 | |
| quietfanatic | you mean subsets, or inheriting classes? | ||
| TimToady | inheriting | ||
| quietfanatic | Inheritance is tricky, yes | ||
| Or more specifically, inheritance isn't tricky; it's overriding that's tricky. | 00:51 | ||
|
00:52
eternaleye joined,
middayc joined
|
|||
| quietfanatic | One possible approach is to copy all the event handlers from the parents to the children when they are declared. | 00:53 | |
| and check events only for the immediate instances of each class | 00:54 | ||
| TimToady | sounds more like role composition than inheritance | ||
| since roles pull in methods but flatten them at composition time | |||
| quietfanatic | Oh they do? | ||
| Hmm | |||
| But | 00:55 | ||
| It should ideally work for both role composition and class inheritance. | |||
|
00:56
yahooooo joined
|
|||
| quietfanatic | so if class A does role X, and class B is A, then does the role X get flattened into B as well? | 00:57 | |
| TimToady | well...we've talked about maybe if you "do" a class it takes a snapshot of it and makes an anonymous role | ||
| or maybe there's some other way to thread your inheritance through your role structure | |||
| quietfanatic | In that case roles and classes would be pretty much the same. | ||
| TimToady | I believe it's specced that a role can supply an 'isa' | ||
| quietfanatic | Yes... | ||
| TimToady | it imposes an immutability constraint, yes | 00:58 | |
| quietfanatic | what imposes an immutablitiy constraint on what? | ||
| TimToady | classes are mutable, roles are not | ||
| quietfanatic | oh | 00:59 | |
| TimToady | which is why deriving a role from a class would have to snapshot it | ||
| but snapshot is what you're doing if you 'copy methods down' | 01:00 | ||
| you wouldn't know to copy down methods that are monkey-typed in to the parent class | 01:01 | ||
| the parent would have to push them | |||
| which implies every class has to register with its parent | |||
| also, copy-down might not work with private attributes | 01:02 | ||
| quietfanatic | That's the other approach | ||
| TimToady | infrastructure for a parent class might be out-of-place in a child class | ||
| quietfanatic | How do you mean? | 01:03 | |
| TimToady | suppose a parent method refers to $!foo, the child class will potentially have its own $!foo that is separate | ||
| in that sense, a method kinda knows which class its in somehow | 01:04 | ||
| quietfanatic | Not necessarily | ||
| it could just have a reference to the...wait | |||
| the attribute $!foo is seperate for all instances of both classes | 01:05 | ||
| Oh wait you mean | |||
| if the parent has $!foo and the child has $!foo each object has two seperate $!foos? | |||
| TimToady | yes | 01:06 | |
| quietfanatic | In which case the parent method refers to the parent-defined $!foo... | ||
| But then what if you copy that method into another class? | |||
| TimToady | well, depending on the implementation, it might or might not get confused | 01:07 | |
| quietfanatic | does it use that class's $!foo? | ||
| TimToady | unspecced either way, so erroneous | ||
| quietfanatic | Hmm | ||
| TimToady | or at least non-portable | ||
| quietfanatic | But there's no way of knowing what's in the body of a method when you copy it | ||
| TimToady | indeed | 01:08 | |
| quietfanatic | in which case copying methods around is almost always a bad idea | ||
| TimToady | well, if $!foo magically knows the original class, then it would just be a form of delegation, like calling nextsame | 01:09 | |
| quietfanatic | in which case methods may as well know what class/role they belong to. | ||
| I guess so | |||
| TimToady | yes, basically class-of-origin needs to be part of the key under which a $!foo is stored | 01:10 | |
| a trick people use in Perl 5, btw | |||
| quietfanatic | Yeah | ||
| TimToady | $self->{__PACKAGE__ . 'key'} or some such | ||
| though that's assuming named classes | |||
| quietfanatic | Then the method doesn't know where it's from after all, it's the variable that knows | ||
| colomon wishes pmichaud would lock down the Iterator interface he wants to use so they could start being implemented... | 01:11 | ||
| TimToady | would be more like .WHAT.WHICH | ||
| er, no, that's dynamic | |||
| well, $?CLASS should be WHICHish | |||
| Wolfman2000 | rakudo: my $dec = "00650097"; say ($dec.comb(/<xdigit>**4/).map: {chr(:16($_))} ).join(''); | 01:12 | |
| p6eval | rakudo 7347ec: e | ||
| TimToady | well, maybe the internal call knows it | ||
| Wolfman2000 | ...I don't think that's supposed to be the answer. | ||
| quietfanatic | Wolfman2000: That looks right to me | 01:13 | |
| Wolfman2000 | ...got it fixed on Feather. original problem: needed a space between : and { by map | ||
| Wolfman2000 is finally understanding some of the power of map | 01:20 | ||
|
01:21
nihiliad joined
|
|||
| Wolfman2000 | I forgot: is there a fast method to convert from integer values to hex? | 01:22 | |
| rakudo: say ord(65); | 01:23 | ||
| p6eval | rakudo 7347ec: 54 | ||
| Wolfman2000 | rakudo: say ord(32); | ||
| p6eval | rakudo 7347ec: 51 | ||
| Wolfman2000 | not what I'm thinking... | ||
|
01:23
jaldhar joined
|
|||
| Wolfman2000 needs dinner. | 01:24 | ||
| diakopter | rakudo: BEGIN { a() }; sub a() { say 4 } # does this work? | ||
| p6eval | rakudo 7347ec: Could not find non-existent sub ain Main (file src/gen_setting.pm, line 324) | ||
|
01:28
ashizawa joined
|
|||
| diakopter | nqp: a(); sub c() { our sub a() { say(4) } } | 01:29 | |
| p6eval | nqp: 4 | ||
| diakopter | sigh. | ||
|
01:35
nihiliad joined
|
|||
| TimToady | yeah, that shouldn't work | 01:36 | |
| cotto | Well, the language isn't called "Exactly the Same As Perl 6". ;) | 01:38 | |
| diakopter | nqp: a(); { our sub a() { say(4) } } | ||
| p6eval | nqp: 4 | ||
| diakopter | std: a(); sub c() { our sub a() { say(4) } } | ||
| p6eval | std 29167: ok 00:01 105m | ||
| TimToady | oh, wait, I thought that was ng: | 01:39 | |
| it's okay for nqp | |||
| std should know better though | |||
| diakopter | should it? that seems much farther up the impl ladder | ||
| TimToady | obviously looking in the package for 'a' | ||
| but multi dispatch only looks in lexical scopes these days | 01:40 | ||
| so does only dispatch :) | 01:41 | ||
|
01:46
jaldhar joined
|
|||
| ng_feed | rakudo-ng: colomon++ | 01:49 | |
| rakudo-ng: Rework Range and RangeIterator to properly handle Ranges which exclude their ends and non-numeric Ranges. | |||
| TimToady | ng: a(); { our sub a() { say(4) } } | 01:51 | |
| p6eval | ng 071cdd: 4 | ||
| TimToady | well, same problem | ||
| calling package subs is a hard habit to break :) | |||
| maybe one could argue it's okay as a last resort, maybe | 01:52 | ||
| ng: a(); { our sub a() { say(4) } }; my sub a() { say(-1) } | 01:53 | ||
| p6eval | ng 071cdd: -1 | ||
| TimToady | that's good | ||
|
01:56
_eMaX_1 joined,
Jedai joined,
estrai joined
|
|||
| diakopter | ng: a(); { our sub a() { say(4) } }; my sub a() { say(-1) }; my sub a() { say(6) }; | 02:02 | |
| p6eval | ng 071cdd: -1 | ||
|
02:03
nihiliad joined
|
|||
| colomon | Would it make sense to have a Test.pm function that took an Iterator and a list and checked that the Iterator's output matched the list? | 02:03 | |
| colomon is struggling to figure out how to test Iterators without a pinned down standard for them, and this seemed like it might abstract the trouble issues out of the test code. | 02:04 | ||
| TimToady | std: a(); { our sub a() { say(4) } }; my sub a() { say(-1) }; my sub a() { say(6) }; | 02:05 | |
| p6eval | std 29167: [31m===[0mSORRY![31m===[0mIllegal redeclaration of routine 'a' (from line 1) at /tmp/LEQOF88TwA line 1:------> [32m4) } }; my sub a() { say(-1) }; my sub a[33m⏏[31m() { say(6) };[0m expecting new name to be definedFAILED 00:01 107m | ||
| TimToady | colomon: foo() ~~ (1,2,3) should do that | 02:06 | |
| list smartmatches are supposed to match the whole thing | 02:07 | ||
| colomon | TimToady: That's smart matching an iterator against a list? | ||
| afk for sec, got to prep bottle | |||
| TimToady | if listify any iterator, it should iterate it into a list | 02:08 | |
| colomon | hmm... so the answer is Perl 6 does this automatically for you. | 02:10 | |
| and the problem is I don't think that's implemented yet in ng. :| | 02:11 | ||
| diakopter | rakudo: a(); { our sub a() { say(4) } }; my &a = sub { say(-1) }; | ||
| p6eval | rakudo 7347ec: 4 | ||
| TimToady | can you say $iterator.list? | ||
| colomon | For sure no, since I wrote the iterator and there was nothing for it to derive from. | 02:12 | |
| Should an iterator have a .list method? | |||
| (and should a Range have a .list method?) | |||
| TimToady | dunno | ||
| I didn't write that part :) | 02:14 | ||
| colomon | I thought it all sprung fully formed from your head? | ||
| ;) | |||
| TimToady | that was Athena, not Perl | 02:15 | |
| colomon | And I suppose you claim you are not Zeus? | ||
| TimToady | well, if I get struck by a lightening bolt, you'll know :) | 02:17 | |
| *lightning | |||
|
02:19
orafu joined
|
|||
| eternaleye | A bolt from the blue turns TimToady's har white! | 02:26 | |
| *hair | |||
|
02:30
Rolo joined
02:32
Avada joined
02:33
orafu joined,
_eMaX_1 joined,
Jedai joined,
estrai joined
|
|||
| japhb | nqp: class Foo { method foo () { $method := "bar"; self.$method(); }; method bar { say("Hello from method bar"); } }; my $o := Foo.new; $o.foo; | 02:34 | |
| p6eval | nqp: Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1630 (src/Regex/Cursor-builtins.pir:179) | ||
| japhb | pmichaud: How do I do that ^ ? I need to be able to call a method via a computed name ... | ||
| diakopter | it's not JavaScript (where you could do self[$method]()).. you'd need eval, I think. | 02:37 | |
| you need a 'my ' before $method, and '()' after 'method bar' | 02:38 | ||
| also no self.$method, afaik | |||
|
02:38
TiMBuS joined
|
|||
| Tene | japhb: you should be able ot introspect the class, pull the method out of it, and invoke that as a method. | 02:39 | |
| japhb: $obj.^methods, iirc | |||
| japhb | Tene, I need to do it in NQP. Which means P6object would have to support that. | 02:42 | |
| japhb will go spelunking for that in a bit | |||
| diakopter, I'm trying to avoid eval, as I'm not entirely sure of the semantics WRT to 'self' through an eval, but I'll keep that in mind as a backup. | 02:43 | ||
| Tene | japhb: .^methods == .WHAT.methods or .HOW.methods or something, so you can use that if nqp doesn't support the .^foo syntax | 02:44 | |
| japhb | Tene, OK, thanks, that gives me a couple more places to look. | 02:45 | |
| I have to go AFK to get kids to bed, but any other ideas appreciated -- I'll backlog. | 02:46 | ||
|
02:48
cognominal joined,
bluescreen joined,
wolverian joined,
pnate joined,
stepnem joined,
p6eval joined,
jjore joined
|
|||
| lisppaste3 | colomon pasted "colomon's wishlist for ng" at paste.lisp.org/display/90881 | 02:50 | |
| colomon | Just in case pmichaud or jnthn feel like working miracles overnight.... :) | 02:51 | |
|
02:52
rfordinal3643 joined
|
|||
| eternaleye | japhb: $obj."$methodname" | 02:54 | |
| Wolfman2000 | Back from dinner. | 02:55 | |
| colomon: You aren't offended that I am probably not able to pull off those miracles, right? | |||
| colomon | Wolfman2000: I know that I can't. Doubt there are even as many as ten people out there who could... | 02:57 | |
| Time for bed. | |||
|
02:59
wolverian joined
03:00
eternaleye joined
03:01
stepnem joined
|
|||
| eternaleye | Tene: $obj.^method is $obj.HOW.method( $obj ) | 03:01 | |
| And .^methods gives a List of Methods IIRC | |||
| Wolfman2000 | ...and the rakudo bot is down | 03:02 | |
| eternaleye: Would you know off hand of a built-in function to convert decimal to hex, or is that something I have to do manually? | |||
| Tene | Wolfman2000: the .fmt method | ||
| rakudo: say 14.fmt("%x"); | 03:03 | ||
|
03:03
rfordinal joined
|
|||
| Wolfman2000 | Tene: rakudo is down | 03:03 | |
| Tene | ;_; | ||
| eternaleye | Wolfman2000: Is this p6 or p5? | ||
| Wolfman2000 | p6 | ||
| eternaleye | Ah | ||
|
03:03
cognominal joined,
bluescreen joined,
pnate joined,
p6eval joined,
jjore joined
|
|||
| eternaleye | wait, what? | 03:04 | |
| Did p6eval get voiced before the netplit ended, when it wasn't here? | |||
| Wolfman2000 | ...not on my screen. | 03:05 | |
| Tene | rakudo: say 14.fmt("%x"); | ||
| eternaleye | Quassel-- | ||
| Tene | rakudo: say "wtf... why is p6eval not responding?" | 03:06 | |
| eternaleye | Wolfman2000: Also, when I disconnected a bit ago, that was due to Postgres dying completely. Don't know it it was a segfault or what. | ||
| *if | |||
| nqp: say( 1 ) | 03:07 | ||
| Hm, so it's all languages | |||
|
03:08
orafu joined,
_eMaX_1 joined,
Jedai joined,
estrai joined,
elmex joined
|
|||
| p6eval | rakudo 7347ec: e | 03:10 | |
| rakudo 7347ec: wtf... why is p6eval not responding? | |||
| nqp: 1 | |||
| eternaleye | Epic lag is epic | ||
| Wolfman2000 | I had the same lag. | ||
| rakudo: say "Hi!"; | 03:11 | ||
| p6eval | rakudo 7347ec: Hi! | ||
| Wolfman2000 | ...yeah, shouldn't take 7 seconds to say hi | ||
|
03:11
facsimile joined
|
|||
| eternaleye | Wolfman2000: It took 5 _minutes_ to follow Tene's instructions | 03:11 | |
| Tene | rakudo: say 15.fmt("%x"); | 03:12 | |
| p6eval | rakudo 7347ec: f | ||
| Wolfman2000 | Tene: thanks for confirming | ||
| Wolfman2000 is cleaning up some of his rsa.pl code for his class presentation on Cryptography Monday. | 03:13 | ||
| lisppaste3 | Wolfman2000 pasted "Is there a better way than using the range iterator?" at paste.lisp.org/display/90882 | 03:16 | |
|
03:21
frew_ joined
03:35
nihiliad joined
|
|||
| Wolfman2000 | rakudo: say 5 % 2|3; | 03:46 | |
| p6eval | rakudo 7347ec: any(1, 3) | ||
| Wolfman2000 | ...wasn't what I was after | ||
| then again, maybe it is | 03:47 | ||
| rakudo: say "true" if 5 % 2|3; | |||
| p6eval | rakudo 7347ec: true | ||
| Wolfman2000 | rakudo: say "true" if 8 % 2|3; | ||
| p6eval | rakudo 7347ec: true | ||
| Wolfman2000 | rakudo: say "true" if 8 % 2&3; | ||
| p6eval | rakudo 7347ec: ( no output ) | ||
| Wolfman2000 | rakudo: say "true" if 7 % 2&3; | ||
| p6eval | rakudo 7347ec: true | ||
| Wolfman2000 | rakudo: say "true" if 9 % 2&3; | ||
| p6eval | rakudo 7347ec: true | ||
| quietfanatic | rakudo: multi infix:<=> (Str $a, Str $b) {...}; my $x = 4 | 03:48 | |
| p6eval | rakudo 7347ec: ( no output ) | ||
| quietfanatic | rakudo: multi infix:<=> (Str $a, Str $b) {...}; my $x = 4; say $x | 03:49 | |
| p6eval | rakudo 7347ec: ( no output ) | ||
| quietfanatic | That's a segfault actually | ||
| Wolfman2000 | quietfanatic: were you able to view my recent pastebin? I'm curious if my loop can be reduced further. | 03:50 | |
| quietfanatic | Wolfman2000: You may be able to do it with an infix operator and the [infix] hyperop | 03:51 | |
| if $n is known ahead of time | |||
| Wolfman2000 | $n is known ahead of time | ||
| quietfanatic | *metaop | 03:53 | |
| Wolfman2000 | quietfanatic: are you saying I would have to make my own multi sub infix? | 03:54 | |
| quietfanatic | you could put it inside you modpow sub | ||
| Wolfman2000 | ...seems like little point of a custom infix inside a sub if it's only used once | ||
| TimToady | it would let you write [*%] $base xx $exp | 03:55 | |
| quietfanatic | Yえあh | ||
| er | |||
| Wolfman2000 | check your language settings there | ||
| quietfanatic | I mean yeah | ||
| TimToady | input method, rather | ||
| Wolfman2000 | that too | 03:56 | |
| quietfanatic | somebody made my right-alt key do that... | ||
| When I try to implement it Rakudo NPAs though | |||
| Wolfman2000 | TimToady: how would a custom infix operator make my code smaller/faster? I'm not seeing how. | 03:57 | |
| TimToady | however, the fastest way might be ($res *= $base) %= $mod for ^$exp | 03:58 | |
| quietfanatic | You don't even have to preset $res to 1 because *= will do that for you | 03:59 | |
| rakudo: say ((my $res *= 2) %= 100) for ^10 | 04:00 | ||
| p6eval | rakudo 7347ec: 2222222222 | ||
| quietfanatic | rakudo: say ((my $res *= 2) %= 100 for ^10) | ||
| p6eval | rakudo 7347ec: ( no output ) | ||
| quietfanatic | rakudo: my $res; say (($res *= 2) %= 100 for ^10) | 04:01 | |
| p6eval | rakudo 7347ec: ( no output ) | ||
| quietfanatic | Oh I guess 'for' isn;t returning what I expect | ||
| rakudo: my $res; ($res *= 2) %= 100 for ^10; say $res | |||
| p6eval | rakudo 7347ec: 24 | ||
| quietfanatic | There. 1024 % 100 | 04:02 | |
| rakudo: (my $res *= 2) %= 100 for ^10; say $res | |||
| p6eval | rakudo 7347ec: Lexical '$res' not foundin Main (file src/gen_setting.pm, line 324) | ||
| Wolfman2000 | rakudo: my $res; ($res *= 2) %= 100 for 1..10; say $res | ||
| p6eval | rakudo 7347ec: 24 | ||
| Wolfman2000 | I guess ^10 is a prefix operator meaning 1 .. 10 | 04:03 | |
| quietfanatic | Actually it's 0..9 but nobody's counting :) | ||
| Wolfman2000 | The only thing I'm unsure of...why must $res be prefixed by my outside of the ()? | ||
| At best, we've got a two liner | |||
| quietfanatic | Implied block for the for? | ||
| TimToady | make the parameter 'is copy' and use that | 04:04 | |
| zaslon | loljnthnhazblogged! jnthn++ 'Failure()<0xb77e0098>': Failure()<0xb77d3924> | ||
| quietfanatic | I was gonna say that :| | ||
| Wolfman2000 | TimToady: the only problem is that $res is not even a parameter | 04:05 | |
| TimToady | base is | ||
| use that var :) | |||
| quietfanatic | wait that doesn't work | ||
| ($base *= $base) squares it every time | |||
| You need to keep the original $base too | |||
| Wolfman2000 | I ended up running my code with the proposed ideas. It did not take | 04:06 | |
| zaslon | loljnthnhazblogged! jnthn++ 'Progress and minor frustration': use.perl.org/~JonathanWorthington/j...7?from=rss | ||
| quietfanatic | If your $n is a power of two you ought to be able to say "my uint32 $res; $res *= $base for ^$exp", but rakudo doesn't support native types like that | 04:08 | |
| (replaceing 32 with whatever your size is | |||
| TimToady | well int declarations would be very fast all around if rakudo supported native types | 04:09 | |
| quietfanatic | I mean a power of two power of two. | ||
| zaslon | lolmasakhazblogged! masak++ 'Failure()<0xb77fa7f8>': Failure()<0xb77f7e04> | ||
| TimToady | someday | ||
| why is zaslon going nuts? | 04:10 | ||
|
04:10
Wolfman2000 joined
04:11
kst` joined
|
|||
| Wolfman2000 | quietfanatic: In case my last message didn't get through, the suggested code did not work for me. | 04:11 | |
| quietfanatic | gives more ++es all around? | ||
| Wolfman2000: I see. You mean the *= %= one? | |||
| Wolfman2000 | Yeah | ||
| quietfanatic | the 'is copy' one (which shuldn't work)? | ||
| TimToady | it worked here on the channel | 04:12 | |
| quietfanatic | erk! | ||
| TimToady | oh, yeah, that one won't work | ||
|
04:12
Wolfman2000 joined
|
|||
| Wolfman2000 | ...I got killed. How did I revive? | 04:12 | |
| Wolfman2000 doesn't recall casting Auto-life | |||
| quietfanatic | Wolfman2000: the 'is copy' one (which shouldn't work)? | ||
| Wolfman2000 | quietfanatic: give the example again please. I don't recall trying is copy yet | ||
| quietfanatic | Wolfman2000: it said something about 'nick collision' when you were killed | ||
| TimToady | yes, I was hallucinating | ||
| quietfanatic | Well don't try it cause it doesn't work! | 04:13 | |
| rakudo: my $res; ($res *= 2) %= 100 for ^10; say $res | |||
| Wolfman2000 | The only one I recall trying was return ($res *= $base) %= $n for ^$exp; | ||
| p6eval | rakudo 7347ec: 24 | ||
|
04:13
drbean joined
|
|||
| quietfanatic | ^ That one works | 04:13 | |
| I dunno | |||
| Maybe you weren't returning $res? | 04:14 | ||
|
04:14
Exodist joined
|
|||
| Wolfman2000 | quietfanatic: doesn't seem to want to return what I'm asking it to | 04:14 | |
| quietfanatic | Wolfman2000: Yeah that doesn't work. You have to add a third statement 'return $res' | 04:15 | |
| zaslon | lolmasakhazblogged! masak++ 'November 21 2009 -- you mean the media distort the truth?': use.perl.org/~masak/journal/39926?from=rss | ||
| quietfanatic | That has the 'return' inside the 'for' there | ||
| Wolfman2000 | ...so it's basically the same as the loop version. Guess there's no avoiding the loop. | ||
| quietfanatic | yeah. for is always a loop | 04:16 | |
| Wolfman2000 | yeah, re-adding the return statement did it | ||
| TimToady | the infix form would let you loop using xx | 04:17 | |
| but it's still a loop | |||
| Wolfman2000 | may as well keep what I have. | ||
| TimToady | what you had originally is very readable :) | ||
| an FP folk would probably use recursion though :) | 04:18 | ||
| Wolfman2000 | TimToady: Considering how this cryptography project is going to involve a new language for practically all of them, may as well impress them with some funny, slightly hard to understand code. :P | ||
| Wolfman2000 has a caesar cipher, prime identifier, and simple rsa code implemented now...unsure about going for sha/md | 04:19 | ||
| quietfanatic | rakudo: multi modpow ($a, 1) {$a}; multi modpow($a, $b) {modpow($a, $b-1) * $a % 100}; say modpow(2, 10); | ||
| p6eval | rakudo 7347ec: 24 | ||
| quietfanatic | Like that | ||
| Wolfman2000 | ...you can specify constants as parameters? | 04:20 | |
| quietfanatic | That's actually quite succint. Only two lines | ||
| Yeah you can. | |||
| Can't introspect them though | |||
| (yet) | |||
| Wolfman2000 wishes he knew what introspecting was. | |||
| quietfanatic | rakudo: say :(3).perl | ||
| p6eval | rakudo 7347ec: :(Int ::TYPE_CAPTURE20 where all({ ... })) | ||
| quietfanatic | blech! | ||
| introspecting means...uh...looking at the insides or something | 04:21 | ||
| You notice I can't find a '3' anywhere inside that blechy expression. | |||
| I think I'll report that as a bug | 04:22 | ||
| ...not that anyone reads my bug reports | 04:23 | ||
| zaslon | loljnthnhazblogged! jnthn++ 'Failure()<0xb5ed2774>': Failure()<0xb5ebcf00> | 04:24 | |
| Wolfman2000 | jnthn: looks like you failed to blog | ||
| TimToady | rakudo: my $n = 100; sub modpow($base,$exp) { sub infix:<*%>($res,$base) { $res * $base % $n }; [*%] 1,$base xx $exp }; say modpow(2,10) | 04:25 | |
| p6eval | rakudo 7347ec: 24 | ||
| TimToady | Wolfman2000: ^^^ | ||
| also, zaslon is going nuts somehow and reporting old blogs | 04:26 | ||
| Wolfman2000 | quietfanatic--: maximum recursion depth exceeded | ||
| quietfanatic | Hoh come one! | ||
| Wolfman2000 | quietfanatic: You never knew how big $n could be | ||
| quietfanatic | Haskell wouldn't have complained! | ||
| zaslon | lolmasakhazblogged! masak++ 'Failure()<0xb78428cc>': Failure()<0xb7837f6c> | 04:27 | |
| Wolfman2000 | The only thing I really don't recall...what's the xx operator? | 04:28 | |
| quietfanatic | list replication | ||
| rakudo: .say for 3 xx 5 | |||
| p6eval | rakudo 7347ec: 33333 | ||
| quietfanatic | contrast with | ||
| rakudo: .say for 3 x | |||
| p6eval | rakudo 7347ec: Confused at line 2, near "x"in Main (file <unknown>, line <unknown>) | ||
| quietfanatic | rakudo: .say for 3 x 5 | ||
| p6eval | rakudo 7347ec: 33333 | ||
| Wolfman2000 | ...not every day that one of the founders of the language assists someone like this. | 04:29 | |
|
04:29
cls_bsd left
|
|||
| Wolfman2000 | TimToady++: Thanks for the insight. | 04:30 | |
| quietfanatic | TimToady: Your modpow above will blow up if given $exp = 0 | ||
| rakudo: my $n = 100; sub modpow($base,$exp) { sub infix:<*%>($res,$base) { $res * $base % $n }; [*%] 1,$base xx $exp }; say modpow(2,0) | |||
| p6eval | rakudo 7347ec: 1 | ||
| quietfanatic | !!! | ||
| Wolfman2000 | quietfanatic: is that the blow up you mean? | ||
| quietfanatic | I guess not | ||
| rakudo: sub infix:<*%>($res,$base) { $res * $base % $n }; [*%] 1 | 04:31 | ||
| p6eval | rakudo 7347ec: Symbol '$n' not predeclared in infix:*% (/tmp/rQ5aW4kRFh:2)in Main (file <unknown>, line <unknown>) | ||
| quietfanatic | rakudo: sub infix:<*%>($res,$base) { $res * $base % 100 }; [*%] 1 | ||
| p6eval | rakudo 7347ec: Method '!flatten' not found for invocant of class 'Int'in Main (file src/gen_setting.pm, line 324) | ||
| quietfanatic | rakudo: sub infix:<*%>($res,$base) { $res * $base % 100 }; [*%] (1) | ||
| p6eval | rakudo 7347ec: Method '!flatten' not found for invocant of class 'Int'in Main (file src/gen_setting.pm, line 324) | ||
| quietfanatic | rakudo: sub infix:<*%>($res,$base) { $res * $base % 100 }; [*%] [1] | ||
| p6eval | rakudo 7347ec: ( no output ) | ||
| quietfanatic | rakudo: sub infix:<*%>($res,$base) { $res * $base % 100 }; say [*%] [1] | ||
| p6eval | rakudo 7347ec: 1 | ||
| quietfanatic | I just don't understand what's going on here | 04:32 | |
| Wolfman2000 | Perl 6 has magic | ||
| quietfanatic | shouldn't it say "not enough positionals given"? | ||
| rakudo: sub infix:<?> ($a, $b) {say $a.WHAT; say $b.WHAT}; [?] 1 | 04:33 | ||
| p6eval | rakudo 7347ec: Method '!flatten' not found for invocant of class 'Int'in Main (file src/gen_setting.pm, line 324) | ||
| quietfanatic | rakudo: sub infix:<?> ($a, $b) {say $a.WHAT; say $b.WHAT}; [?] [1] | ||
| p6eval | rakudo 7347ec: ( no output ) | ||
| quietfanatic | rakudo: sub infix:<?> ($a, $b) {say $a.WHAT; say $b.WHAT}; [?] 1, | ||
| p6eval | rakudo 7347ec: No result objectin Main (file <unknown>, line <unknown>) | ||
| quietfanatic | just getting all sorts of weird here | ||
| I give up. | |||
| Wolfman2000 | ...even when I can't contribute to the core Perl 6 code, I can still help...or at least give ideas. | 04:34 | |
|
04:39
gfx joined
|
|||
| pmichaud | good evening, all | 04:39 | |
| Wolfman2000 | evening | 04:40 | |
|
04:42
Exodist joined
04:47
envi^home joined
|
|||
| TimToady | howdy | 04:47 | |
|
04:49
mlaks joined
04:56
qp_pq joined
|
|||
| qp_pq | you bastards, you turned the first name Dijkstra into a verb lol | 04:56 | |
| just saw masak's talk.pdf | 04:57 | ||
| like "dijkstrifying" :)) | 05:00 | ||
| japhb | Any word containing five consecutive consonants ought to get a free pass to be any part of speech it wants. :-) | 05:01 | |
| TimToady | that's not her first name. It's Barbara. | ||
|
05:05
kaare joined,
Nex6 joined
|
|||
| qp_pq | TimToady: ?!? who ? | 05:06 | |
|
05:11
astrojp left
|
|||
| TimToady | Barbara, Ken Dijkstra's wife | 05:13 | |
| japhb | Where is the syntax for calling subs and methods by computed name discussed in the synopses? I'm failing in attempting to search ... | 05:14 | |
| qp_pq | who is Ken Dijkstra ? | 05:21 | |
|
05:26
beggars joined
05:36
c9s joined
05:44
Avada joined
05:57
Avada joined
06:01
orafu joined
06:11
orafu joined
06:21
orafu joined,
carlin joined
06:43
JeffreyKegler joined
06:44
envi^home joined,
cognominal joined,
bluescreen joined,
pnate joined,
p6eval joined,
jjore joined
|
|||
| TimToady | Barbie's husband... | 06:46 | |
| but people are always confusing them with the other Ken and Barbie... :) | 06:48 | ||
|
06:49
meppl joined
06:50
JeffreyKegler left
06:55
justatheory joined
|
|||
| diakopter | nqp: Foo::bar(); { module Foo { our sub bar() { say(77) } } } | 07:12 | |
| p6eval | nqp: 77 | ||
| diakopter | sigh. | ||
| double sigh. | |||
| triple sigh. | |||
|
07:13
jrockway joined
|
|||
| diakopter | out of the frying pan, into the center of the earth. | 07:13 | |
| nqp: Foo::bar(); sub blah() { module Foo { our sub bar() { say(88) } } } | 07:14 | ||
| p6eval | nqp: 88 | ||
| diakopter | how the blanket can that behavior be mimicked? | 07:15 | |
| pugs: Foo::bar(); sub blah() { module Foo { our sub bar() { say(88) } } } | 07:18 | ||
| p6eval | pugs: 88 | ||
| diakopter | I give up. | 07:19 | |
|
07:19
snearch joined
|
|||
| diakopter | nqp: Foo::bar(); sub blah() { module Foo { our sub bar() { say(88) } } }; sub blah2() { module Foo { our sub bar() { say(99) } } }; | 07:24 | |
| p6eval | nqp: 99 | ||
| diakopter | pugs: Foo::bar(); sub blah() { module Foo { our sub bar() { say(88) } } }; sub blah2() { module Foo { our sub bar() { say(99) } } }; | ||
| p6eval | pugs: 99 | ||
| cotto | Should that even compile? | 07:33 | |
| diakopter | std: Foo::bar; sub blah() { my $b := 2; module Foo { our sub bar() { say($b) } } }; sub blah2() { my $b := 4; module Foo { our sub bar() { say($b.WHERE) } } }; | 07:34 | |
| p6eval | std 29167: [31m===[0mSORRY![31m===[0mIllegal redeclaration of symbol 'GLOBAL::<Foo>' (from line 1) at /tmp/x5mXWVKies line 1:------> [32m }; sub blah2() { my $b := 4; module Foo[33m⏏[31m { our sub bar() { say($b.WHERE) } } };[0mUndeclared name: 'Foo::bar' used at line 1FAILED | ||
| ..00:01 107m | |||
| diakopter | whatever compile means, no | ||
| but why a module can be declared inside a sub escapes me | 07:35 | ||
| perl -e 'Foo::a(); sub b { package Foo; our sub a { print(44) } }; sub c { package Foo; our sub a { print(55) } };' | 07:39 | ||
| 55 | |||
| whatever. :[ | |||
|
07:57
orafu joined
08:12
drbean_ joined
08:13
Exodist joined
08:14
Su-Shee joined
|
|||
| Su-Shee | good morning | 08:14 | |
|
08:17
cls_bsd joined
08:19
cotto_w0rk joined
08:34
am0c joined
|
|||
| Woodi | good morning | 08:36 | |
|
08:40
Exodist joined
|
|||
| diakopter | perl6.pastebin.com/f1b671708 prototype-object inheritance/derivation in Perl | 08:40 | |
| cls_bsd | m/win 30 | 08:52 | |
|
08:57
BinGOs joined
|
|||
| diakopter | yeah | 09:00 | |
|
09:04
desertm4x joined
09:25
Exodist joined
09:41
drbean joined
|
|||
| ng_feed | rakudo-ng: pmichaud++ | 09:56 | |
| rakudo-ng: Merge branch 'ng' of git@github.com:rakudo/rakudo into ng | |||
| rakudo-ng: pmichaud++ | |||
| rakudo-ng: Add [eval]. May still want a little bit of testing, but should | |||
|
09:57
cotto joined
10:18
snearch joined
10:19
Guest37418 joined
10:21
desertm4x_ joined
10:53
bryan[c1] joined
|
|||
| Wolfman2000 | *yawn* Morning...I'm up too early. | 11:15 | |
|
11:30
rgrau` joined,
mikehh joined
|
|||
| colomon | eval \\o/ | 11:47 | |
|
11:55
jayeola joined
|
|||
| jnthn wondes how many tests that may win us back | 11:55 | ||
|
11:57
jeremiah joined
|
|||
| jnthn | lolitsjeremiah | 11:57 | |
| jeremiah | OH HAI! | 11:58 | |
| or OH HAIS since we're in Latvia | |||
| Wolfman2000 | ...how many countries are we in? | 11:59 | |
| jnthn | Most of the time, only one at any point in time, though I was once in three simultaneously. | 12:01 | |
| Wolfman2000 | ...leg on one, other leg on one, butt on third? | 12:02 | |
| jnthn | Something like that. :-) | ||
| Wolfman2000 | very strange | ||
| The master branch of rakudo hasn't been updated for a few days. :( | 12:03 | ||
| colomon | jnthn: four tests in rat.t thanks to eval! | ||
| Wolfman2000 | I know ng is loved by everyone, but...oh well. | ||
| colomon | Wolfman2000: until pmichaud checked in eval this morning, no one but me had updated ng in days, either.... | 12:04 | |
|
12:05
cotto_working joined
|
|||
| Wolfman2000 | eval...right: execute arbitrary code. | 12:05 | |
| jnthn | colomon: You aren't no one! :-) | ||
| colomon | jnthn: but you guys are the big guns, and I'm just hanging about trying to show you can indeed write some of the core classes in pure p6. | 12:07 | |
| jnthn | I'm very happy that they're being written in Perl 6. | ||
| colomon | me too, I think that's very importat | 12:08 | |
| Wolfman2000 | colomon: what else are the core classes being written in? | ||
| jnthn | Wolfman2000: Some bits get done in PIR. But the less of that we have, the better, overall. | ||
| Wolfman2000 | ...right, the PIR assembly language. | ||
| jnthn | Yeah. But there's more to it than just writing in PIR | ||
| Wolfman2000 | I recall seeing some of that in some of the Operator type files | ||
| jnthn | e.g. we wrap Parrot sub PMCs up into Pelr 6 code objects. | 12:09 | |
| Introspection tends not to work out so well on Parrot subs. | |||
| Wolfman2000 | Right...not always easy to introspect multi sub infix:<+>($a, $b) | 12:11 | |
| jnthn | Well, that should have been resolved in master now, IIRC | 12:14 | |
| But yes, other examples certainly have problems. | |||
|
12:19
cotto_work joined
12:21
rfordinal left
12:28
zloyrusskiy joined
13:07
ashizawa_ joined
13:16
jaldhar joined
13:17
mjk joined
|
|||
| colomon | jnthn: do we not have substr yet in ng? (I'm checking out int.t to see where we stand with it.) | 13:18 | |
| ng: say substr("hello", 0, 2); | 13:20 | ||
| p6eval | ng 7ab131: Confused at line 1, near "say substr"current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336) | ||
| colomon | ng: say "hello".substr(0, 2); | 13:21 | |
| p6eval | ng 7ab131: Method 'substr' not found for invocant of class 'Perl6Str'current instr.: '_block14' pc 29 (EVAL_1:0) | ||
| colomon | ng: say "hello".lcfirst | 13:22 | |
| p6eval | ng 7ab131: Method 'substr' not found for invocant of class 'Perl6Str'current instr.: 'perl6;Any;lcfirst' pc 181609 (src/gen/core.pir:0) | ||
| colomon | Ug. So we've got a lot less string than it appears in ng, since about half of the defined functions depend on substr, which isn't defined. | 13:23 | |
| Wolfman2000 | colomon: If it matters, I found .sub 'substr' on master/src/builtins/any-str.pir | 13:25 | |
| Perhaps you can just copy that? | |||
| colomon | Hmmm... | 13:26 | |
| ng: say "hello".WHAT | 13:28 | ||
| p6eval | ng 7ab131: Str() | ||
| colomon | It definitely looks tantalizingly possible... | 13:29 | |
| particularly because it appears that there's only one thing in there that really needs to be in PIR. | 13:30 | ||
| pmichaud | good morning, #perl6 | 13:31 | |
| colomon | Just the person I was hoping to see! | 13:32 | |
| If I have $S1 = substr $S0, start, len in PIR, how do I do that as one of those fancy pir::XXXX__ calls? | 13:33 | ||
| (and thank you for eval!) | |||
| pmichaud | I think that pir::substr($str, $start, $len) works. | 13:34 | |
| if not, then it'd be pir::substr__PPii | |||
| colomon | ng: say pir::substr("hello", 0, 2); | ||
| p6eval | ng 7ab131: he | ||
| colomon | \\o/ | ||
| pmichaud | in general, it's pir::opcode(...args...) | 13:35 | |
| but sometimes the compilers don't know the argument types to use for the opcode, so we have to be explicit | |||
| jnthn | summon masak | ||
| pmichaud | thus __PPii would say "return a PMC, first arg is a PMC, second arg is an integer register or integer constant, third arg is a integer register or integer constant" | 13:36 | |
| jeremiah waves magic wand to summon masak | |||
|
13:36
masak joined
|
|||
| pmichaud | so, did eval() win us many tests? does it actually work? ;-) | 13:36 | |
| Su-Shee | "accio" is the charm to summon something ;) | ||
| masak feels groggy | |||
| was I summoned or something? | |||
| jeremiah | lolitsmasak! | 13:37 | |
| masak | lol! | ||
| I can haz math algebra parser. | |||
| colomon | pmichaud: it won us four rat.t tests, but we still need to get Num.Rat working to get the entire file passing. | 13:38 | |
| pmichaud | colomon: does that mean that eval actually works? ;-) | ||
| wow. | |||
| It took me far longer to write than it should've (parrot--) and when I was getting near the end I wasn't fully awake :-| | 13:39 | ||
| jnthn | :-/ | 13:40 | |
| pmichaud: Yes, it was "fun" enough the first time. | |||
| pmichaud: Looks cleanish now, from glancing over the patch, though. :) | |||
| colomon | pmichaud: I've only tested it on strings which were Rats so far, but it seems to work well there. :) | ||
| pmichaud | well, at least this time it's moved the lexicals logic into the components where they belong | ||
| colomon | That's really all anyone ever wanted, isn't it? The ability to eval Rats? | 13:41 | |
| :) | |||
| masak | what's this Japanese Twitterer saying? twitter.com/tokuhirom/status/5944222957 | ||
| pmichaud | colomon: that's all it's really good for. | ||
| jnthn | Yes, it's good to push them into a place where this will work between other HLLs. | ||
| masak | finally, I can eval my Rats. | ||
| jnthn: Rats generally burrow holes in the walls between HLLs. | 13:42 | ||
| colomon | One day we'll be able to eval FatRats... | ||
| jnthn | And our Cat. | ||
| pmichaud | not only that, but it actually follows contexts instead of subs, which is equally important (since a Parrot sub object might not be able to reference the correct outer context) | ||
| masak | oh noes! FatRats! | ||
|
13:44
mikehh joined
|
|||
| masak | oh 猫! | 13:44 | |
| colomon | Any objections to my trying to translate the old master substr into a new, mostly p6 ng substr? | ||
|
13:44
masak joined
|
|||
| jnthn | colomon: None from me. | 13:44 | |
| pmichaud | +1 | 13:45 | |
| colomon | how do you say optional parameter with specifying a default? I seem to recall there is a ? involved. | 13:49 | |
| pmichaud | sub foo($req, $opt?) { ... } | ||
| oh, *with* a default | |||
| Juerd | Implicit defaults ROCK, pmichaud :) | ||
| pmichaud | sub foo($req, $opt = 'default') { ... } | ||
| Juerd | They make coding so much easier :D | ||
| colomon | s/with/without/ actually! | 13:50 | |
| so pmichaud++ had it right the first time. | |||
| pmichaud | oh, *without* a default | ||
| colomon | danke! | ||
| pmichaud | sub foo($req, $opt?) { ... } # :D | ||
| Juerd | Wow, pmichaud has dwimnwis-powers :) | ||
| pmichaud | note that because of the mis-asked question, the ":D" smiley is now a required part of the syntax :D | 13:51 | |
| colomon | Juerd: I'm not at all surprised. :) | ||
| Juerd remembers when the postfix question mark was introduced for this, and was happy about the decision :) | |||
| Also, the ! for required nameds | 13:52 | ||
| colomon | ng: say "hello".chars | ||
| p6eval | ng 7ab131: Method 'chars' not found for invocant of class 'Perl6Str'current instr.: '_block14' pc 29 (EVAL_1:0) | ||
| colomon | ng: say "hello".codes | ||
| p6eval | ng 7ab131: Method 'codes' not found for invocant of class 'Perl6Str'current instr.: '_block14' pc 29 (EVAL_1:0) | ||
| masak | yes, the current syntax for parameters and arguments is a clear improvement on the original apocalyptic one. | 13:53 | |
| Juerd | S03 says that !< doesn't have a shortcut, but isn't that just >=? | 13:54 | |
| colomon | rakudo: say "hello".chars | ||
| p6eval | rakudo 7347ec: 5 | ||
| Wolfman2000 | colomon++: glad I was able to give you an idea for substr. I have to get going now, however...apparently I (got conned?|agreed) to help sub for a sunday school class today | 13:55 | |
| masak | Juerd: yes. | ||
| colomon | Wolfman2000++ # for pointing me in the right direction. | ||
| rakudo: say substr("hello", 2, -1); | 13:57 | ||
| p6eval | rakudo 7347ec: ll | ||
| colomon | Oh, I see. | 13:58 | |
| gotos, they are fun. | |||
| masak | Juerd: though I don't consider >= to be the shortcut of !< -- it's not shorter, for one. | 13:59 | |
| pmichaud | hugme tweet rakudoperl rakudo-ng has a working 'eval' again | 14:03 | |
| hugme hugs pmichaud; tweet delivered | |||
| colomon | Is .chars correct for getting the number of characters in a string in p6? | ||
|
14:05
Whiteknight joined
|
|||
| Su-Shee | works with my version. | 14:06 | |
| jnthn | colomon: yes | 14:07 | |
| colomon | apparently I need to implement that, too. | ||
| :) | |||
| dalek | p-rx: 23bb989 | pmichaud++ | (3 files): Add $obj."method"(...) syntax. |
||
| p-rx: 9f7db2e | pmichaud++ | src/stage0/ (3 files): Update bootstrap. |
|||
| colomon | pir::chars(self) doesn't seem to do it. | ||
| pir::chars__IP(self) ? | 14:08 | ||
| Nope. | 14:09 | ||
| help? | |||
| jnthn | nqp: my $x = "lolvodka"; say pir::chars__IS($x); | 14:11 | |
| p6eval | nqp: Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " \\"lolvodka"current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197) | ||
| jnthn | nqp: my $x := "lolvodka"; say pir::chars__IS($x); | ||
| p6eval | nqp: Confused at line 1, near "say pir::c"current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197) | ||
| jnthn | gha | ||
| nqp: my $x := "lolvodka"; say(pir::chars__IS($x)); | |||
| p6eval | nqp: error:imcc:syntax error, unexpected IREG, expecting '(' ('$I17') in file 'EVAL_1' line 12Could not find non-existent sub charscurrent instr.: '_block11' pc 0 (EVAL_1:6) | ||
| jnthn | *sigh* | ||
| checking the Parrot docs. | |||
| colomon | danke. | 14:12 | |
| jnthn | nqp: my $x := "lolvodka"; say(pir::length__IS($x)); | 14:13 | |
| p6eval | nqp: 8 | ||
| jnthn | =item B<length>(out INT, in STR) | ||
| Calculate the length (in characters) of string $2 and return as integer $1. | |||
| If $2 is NULL or zero length, zero is returned. | |||
| And for .bytes its bytelength | |||
| colomon | right! jnthn++ | 14:14 | |
| I should have checked the old any-str.pir to see how chars was defined. | |||
| \\o/ | 14:15 | ||
| is export doesn't work yet? | |||
| jnthn | colomon: I thought it did... | 14:16 | |
| ng: say uc("wtf") | |||
| p6eval | ng 7ab131: WTF | 14:17 | |
| jnthn | Otherwise that'd not work. | ||
| colomon | So did I, but .substr works and substr doesn't. | ||
| huh. | |||
| jnthn | And it's marked "is export"? Hmm. | ||
| colomon | tell you what. I'll check in what I've got, and we can puzzle it out together. :) | ||
| jnthn | :-) | ||
|
14:19
payload joined
|
|||
| ng_feed | rakudo-ng: colomon++ | 14:19 | |
| rakudo-ng: Add chars and substr. | |||
| pmichaud | + my $len = $given_len || self.chars; | 14:20 | |
| needs to be | |||
| $given_len // self.chars | |||
| (since 0 is a valid length) | 14:21 | ||
| colomon | okay, changed locally. | 14:22 | |
| I suppose, since I have chars working now, that could just be $given_len = self.chars for the argument? | |||
| pmichaud | probably | 14:23 | |
| colomon | Though I think I might like it better this way. | ||
| pmichaud | although the arg name should perhaps match the spec ($length) | ||
|
14:24
masak` joined,
facsimile joined
|
|||
| colomon | given_len becomes length, okay. :) | 14:25 | |
| pmichaud | (building now to see if I can find out why 'is export' isn't working) | ||
| colomon | k | ||
|
14:25
arthur-_ joined
|
|||
| colomon | it does work for chars, I see. | 14:25 | |
| pmichaud | I wonder if there's another substr already defined somewhere that is causing problems. | 14:26 | |
| ng_feed | rakudo-ng: colomon++ | ||
| rakudo-ng: Change $given_len to $length to match the spec. | |||
| rakudo-ng: colomon++ | |||
| rakudo-ng: Change || to // as per pmichaud. | |||
| pmichaud | don't see one. | 14:27 | |
| colomon | has is export been tested with more than one argument, or default arguments? | ||
| pmichaud | ...shouldn't make a difference, really. | ||
| colomon | (seeing as how uc and chars work, but substr doesn't....) | ||
| pmichaud | that could indeed be the difference, but it shouldn't be :) | 14:28 | |
| colomon | :) | ||
| pmichaud | aha | 14:29 | |
| jnthn | I'm guessing substr is in Any? | ||
| pmichaud | looks like ng is parsing the "sub" | 14:30 | |
| i.e., it's parsing as sub str(...) | |||
| jnthn | !! | ||
| pmichaud | we had this problem in master also :) | ||
| jnthn | ng: substr("lol", 1, 1) | 14:31 | |
| p6eval | ng 7ab131: Confused at line 1, near "substr(\\"lo"current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336) | ||
| colomon | ????????? | ||
| jnthn | oh, it's a parse error! | ||
|
14:31
pmurias joined
|
|||
| colomon | ooooooooo | 14:31 | |
| pmichaud | fixing. | ||
|
14:33
ejs joined
14:34
snearch joined
14:35
JimmyZ joined
|
|||
| colomon | ng: "24".Int | 14:38 | |
| p6eval | ng 7ab131: Method 'Int' not found for invocant of class 'Perl6Str'current instr.: '_block14' pc 29 (EVAL_1:0) | ||
| pmichaud | pushed. | 14:39 | |
| ng_feed | rakudo-ng: pmichaud++ | 14:40 | |
| rakudo-ng: Avoid initial "sub", "method", "submethod" as being declarations. | |||
| jnthn | pmichaud: We'd not need that after full LTM? | 14:41 | |
| (just noticing std lacks it) | |||
| colomon | oh bother, we don't have index yet either. | 14:45 | |
| jnthn | nqp: my $x := "lolvodka"; say(pir::index__ISS($x, "l")); | 14:48 | |
| p6eval | nqp: 0 | ||
| jnthn | nqp: my $x := "lolvodka"; say(pir::index__ISS($x, "v")); | ||
| p6eval | nqp: 3 | ||
| jnthn | :-) | 14:49 | |
| pmichaud | jnthn: full LTM should alleviate that, yes. | ||
| colomon | jnthn: ooo, short and simple implementation, then, eh? | 14:51 | |
| jnthn | colomon: looks like it ;_) | 14:52 | |
|
14:52
rindolf joined
|
|||
| jnthn | pmichaud: OK, cool. | 14:52 | |
| masak` | rindolf: hi! | 14:53 | |
| colomon | is there an easy way of checking to see what test files now work (unexpectedly) in ng? | ||
| rindolf | Hi masak` | ||
| masak`: what's up? | |||
| colomon | I think working substr just bought us a bunch. | ||
| (but not substr.t, of course... ;) | |||
| masak | rindolf: in the lobby of a hotel in Riga, hacking away with jnthn++ and jeremiah++. | 14:54 | |
| life is good :) | |||
| rindolf: how're you? | |||
| rindolf | masak: we have a Tel Aviv Open Source Club meeting today. | ||
| An hour or so from now. | |||
| It's a Welcome-to-FOSS meeting. | |||
| masak | \\o/ | 14:55 | |
| rindolf | No one came to the previous meeting. | ||
| jnthn | colomon: I thought it may...uc.t for example. | ||
| rindolf | Except for the lecturer and me. | ||
| colomon | ucfirst.t and lcfirst.t for sure. | ||
| rindolf | And his friend from the university. | ||
| colomon | uc.t doesn't work on my box, no iciu | ||
| masak | oh, bummer. | ||
| rindolf | This time it was better publicised. | ||
| jnthn | colomon: oh. I can check that tomorrow when at home. | ||
| rindolf | But it's a different meeting. | ||
| Maybe we'll do a re-run of the previous meeting in two weeks or so. | 14:56 | ||
| pmichaud | I'll be attempting spectests shortly :) | ||
| jnthn | How epic is our fail? :-) | 14:57 | |
| pmichaud | don't know yet. :-) | 14:58 | |
| but hopefully much less epic by the end of today...? ;-) | |||
| jnthn | pmichaud: I've been pondering metamodel stuff some more today. | ||
| pmichaud: Want to put back role composition in a Good Way. | |||
| Been reading Moose source to figure out their model | 14:59 | ||
| Learned a few things. | |||
| pmichaud | jnthn: +1 | ||
| jnthn | Will do something somewhat along those lines, but with 6isms. :-) | 15:00 | |
| And probably a bit simpler protocol for now. | |||
| rindolf | masak: BTW, have you meet Peteris Krumins (IRL) during the Baltic Perl Workshop? | ||
|
15:03
nihiliad joined
15:07
masak` joined,
Psyche^ joined
|
|||
| colomon | rakudo: index("hello", ""); | 15:19 | |
| p6eval | rakudo 7347ec: ( no output ) | ||
| colomon | rakudo: say index("hello", ""); | ||
| p6eval | rakudo 7347ec: 0 | ||
| jnthn | colomon: Hmm...that looks...odd. | 15:21 | |
| colomon | ng: say min(2, 4); | ||
| p6eval | ng a9956f: Could not find non-existent sub &mincurrent instr.: '_block14' pc 29 (EVAL_1:0) | ||
| jnthn | rakudo: say index("hello", "k") | 15:22 | |
| p6eval | rakudo 7347ec: Substring 'k' not found in 'hello' | ||
| jnthn | rakudo: index("hello", "k") | ||
| p6eval | rakudo 7347ec: ( no output ) | ||
| jnthn | oh, i'ts a fail, not a die. Good. | ||
| So above is right too I guess. :-) | |||
| colomon | clues on how to handle fails in ng would be good, too. :) | ||
| (for me, I mean.) | 15:23 | ||
| SHouldn't it be pir::index__ISSi ? | 15:25 | ||
| jnthn | Why the i on the end? | ||
| colomon | int $pos paramete | ||
| r | |||
| jnthn | ISS = returns an int, takes two strings. | ||
| oh | |||
| maybe there's another variant of the op that does that too | |||
| may work then | 15:26 | ||
| colomon | pos = index s, substring, pos | ||
| is the code in the old Any-str.pir | |||
| jnthn | ah, then yes | 15:27 | |
| colomon | btw, the old code appears to be somewhat broken? | 15:30 | |
| at least, it's got two labels which are never used, one of which appears to be an error condition which is not checked. | |||
| jnthn | That's quite possible. | ||
| colomon | unless "fail:" is a magic label... | ||
| jnthn | Don't bring the brokenness into ng ;-) | ||
| No, it's not. | |||
| colomon | any advice on doing | 15:31 | |
| .tailcall '!FAIL'("Substring '", substring, "' not found in '", s, "'") | |||
| in perl 6 and ng? | |||
| jnthn | fail("Substring '$foo' not found in '$s'"); | 15:33 | |
| colomon | Is that what gets the "non-existant sub &fail called" message? ;) | 15:34 | |
| jnthn | colomon: Yes. ;-) | 15:36 | |
| colomon | then it must be right. :) | 15:37 | |
| jnthn | Well, it won't fail. | 15:38 | |
| colomon | say index("hello", "v") | 15:39 | |
| Could not find non-existent sub &fail | |||
| \\o/ | |||
|
15:41
iblechbot joined
|
|||
| jnthn | ng: sub foo { return 42 }; say foo | 15:44 | |
| p6eval | ng a9956f: sh: ./perl6: No such file or directory | ||
| jnthn | aww | ||
| ng: sub foo { return 42 }; say foo | |||
| p6eval | ng a9956f: sh: ./perl6: No such file or directory | ||
| jnthn | EINPATIENT | ||
| ng: sub foo { return 42 }; say foo | 15:45 | ||
| p6eval | ng a9956f: sh: ./perl6: No such file or directory | ||
| ng_feed | rakudo-ng: colomon++ | 15:46 | |
| rakudo-ng: Port of index from PIR into (mostly) p6. | |||
| jnthn | Yay, Perl 6! | ||
| ng: sub foo { return 42 }; say foo | 15:47 | ||
| p6eval | ng a9956f: 42 | ||
| jnthn | ah, we haz some return | ||
| So maybe fail ain't so hard now. | |||
| colomon | bother. | ||
| first the test wouldn't run because of substr. | |||
| then it wouldn't run because of index | 15:48 | ||
| now it won't run because of fail. | |||
| rakudo: say index("hello", "k"); | 15:49 | ||
| p6eval | rakudo 7347ec: Substring 'k' not found in 'hello' | ||
| colomon | or is that it? | ||
| lisppaste3 | colomon pasted "The test that's giving me trouble" at paste.lisp.org/display/90898 | ||
| colomon | does fail equal undef or something? | 15:50 | |
| dalek | p-rx: da4d6f4 | pmichaud++ | src/ (2 files): Refactor regex creation a bit. |
15:52 | |
| p-rx: c4b8abd | pmichaud++ | src/stage0/ (3 files): Update bootstraps. |
|||
| jnthn | colomon: It returns a failure, which is undefined, yes. | ||
| colomon | makes sense. | 15:53 | |
| any idea how hard it would be to implement fail? | 15:55 | ||
| jnthn | colomon: Probably needs to be done in PIR, but the existing one may be food enough. | 15:56 | |
| rakudo: Failure | |||
| p6eval | rakudo 7347ec: ( no output ) | ||
|
15:57
ejs joined
|
|||
| colomon | shouldn't we have eval_dies_ok by now? | 15:57 | |
| (messing around with other tests because I'm clueless on fail...) | |||
| jnthn | yeah | 15:58 | |
| well | |||
| we have eval | |||
| maybe Test.pm needs updating? | |||
| Now that eval works? | |||
| github.com/rakudo/rakudo/blob/maste...ontrol.pir # for how fail was done before. | |||
| colomon | you stuck a die line in there. should I just delete it? | ||
| that seems naive... | 15:59 | ||
| (deleting the die only, I mean.) | |||
|
16:00
facsimile joined
|
|||
| jnthn | remove the die and uncomment the proclaim call I ugess. | 16:01 | |
| dobut the regex line can yet be removed. | |||
|
16:06
am0c joined
|
|||
| cognominal | jnthn++ # your blog helps so much to understand about rakudo(-ng)? | 16:07 | |
| I meant rakudo[-ng]? | |||
| colomon | jnthn: have to remove the regex in the proclaim line as well, right? | 16:08 | |
| jnthn | colomon: ah, probably, yeah. | ||
| colomon: we don't have those back in just yet | 16:09 | ||
| colomon: comment out the original I guess, and put in the simpler one. | |||
| colomon | already done here. :) | 16:11 | |
| jnthn | Nice :-) | ||
| colomon | I'm trying length.t, and I love the first message: | ||
| Str.length properly not implemented | |||
| All right, I'll check in Test.pm | 16:12 | ||
| ng_feed | rakudo-ng: colomon++ | 16:13 | |
| rakudo-ng: Turn eval_dies_ok back on. | |||
|
16:14
jan_ joined,
am0c joined
|
|||
| colomon | Ack. It really is frustrating that every fix probably fixes dozens of tests, but we can't count them because something else in the test file fails. | 16:17 | |
| ng_feed | rakudo-ng: colomon++ | ||
| rakudo-ng: Turn lcfirst.t and ucfirst.t back on. | |||
| jnthn | colomon: Aye. | 16:18 | |
| colomon: That's my experience on ng too. | |||
|
16:19
KyleHa joined
|
|||
| ng_feed | rakudo-ng: KyleHa++ | 16:30 | |
| rakudo-ng: Add some more passing test files | |||
| masak` | I make the prediction that this interconnectedness of things is worst in the core, where y'all are hacking now. and that it'll get better as those things are in place. | 16:31 | |
| pmichaud | I'm doing regexes now | 16:32 | |
| jnthn cheers on pmichaud | 16:33 | ||
| colomon | masak-prime?! Quick, jnthn, does he have a goatee? | ||
| KyleHa++ # getting more tests on line, yay! | 16:34 | ||
| KyleHa | *bow* | 16:35 | |
| colomon | That picked us up 50-some tests in the spectest! | ||
| pmichaud | I'm predicting that we'll move ng to master before the end of Nov. | ||
| jnthn | colomon: He's bearded, but not quite to the degree I am. :-) | ||
| colomon | pmichaud: woah. | ||
| jnthn | pmichaud: Whoa...I'd better get busy! ;-) | 16:36 | |
| pmichaud | jnthn: that makes two of us :) | ||
| jnthn | Quick...bring beer! | ||
| Hey, akshually...I'm sat with a bar like 15 seconds walk away. | 16:37 | ||
| colomon | I promise to continue making small improvements to the code while rocking my sleeping son. | ||
| jnthn | colomon++ | 16:38 | |
| colomon | Probably some while I'm watching him run around and chew on things, too, like this morning. :) | ||
| colomon can't concentrate enough watching the boy to get real $work done, but very small-scale hacking with lots of spectests is no problem. | 16:41 | ||
| jnthn | nom time! | 16:47 | |
| pmichaud | ugh, trying to follow all of the block/signature logic is really.... difficult. :( | 17:10 | |
|
17:20
dj_goku joined
|
|||
| pmichaud | jnthn: ping | 17:21 | |
| moritz_ | re | 17:23 | |
|
17:28
diakopter left
|
|||
| pmichaud | jnthn: unping -- I think I found the issue. | 17:29 | |
|
17:35
lichtkind joined
17:38
payload joined
|
|||
| moritz_ | ng: class A { }; class A { }; say "alive" | 17:48 | |
| p6eval | ng ebaea1: Class A already registered!current instr.: 'perl6;ClassHOW;new' pc 2339 (src/builtins/ClassHOW.pir:65) | ||
| moritz_ | ng: use Test; plan 1; eval_dies_ok 'class A { }; class A { }'; | ||
| p6eval | ng ebaea1: 1..1not ok 1 - # Looks like you failed 1 tests of 1 | ||
| moritz_ | some eval_dies_ok doesn't seem to work | ||
| ng: eval ''; say $!.defined | 17:49 | ||
| p6eval | ng ebaea1: Method 'defined' not found for invocant of class 'Undef'current instr.: '_block14' pc 29 (EVAL_1:0) | ||
| moritz_ | ng: eval ''; say defined($!) | ||
| p6eval | ng ebaea1: 0 | ||
| moritz_ | ng: eval '++'; say defined($!) | ||
| p6eval | ng ebaea1: Confused at line 1, near "++"current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336) | ||
| moritz_ | ng: my $x = eval '++'; say defined($!) | 17:50 | |
| p6eval | ng ebaea1: Confused at line 1, near "++"current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336) | ||
| moritz_ | ng: my $x = try { eval '++' }; say defined($!) | ||
| p6eval | ng ebaea1: Null PMC access in can()current instr.: 'perl6;Perl6Object;!STORE' pc 1953 (src/builtins/Object.pir:383) | ||
| moritz_ | this looks all so wrong to me | ||
| pmichaud: see above (if not yet known) | |||
| colomon | moritz_: for sure ng's eval_dies_ok does not check for Null PMC, I had to comment that part out this morning because of the regexes. | 17:53 | |
| moritz_ | colomon: that's not what's wrong | 17:55 | |
| (and that check could also be done with index()) | |||
| colomon | hey, good idea! | ||
| moritz_ | colomon: the real problem is that 1) errors propagate through eval '', even though they shouldn't | ||
| 2) empty $! is not a Perl 6 type, and thus doesn't response to .defined | |||
| 3) try { eval '++' } seems to return a Null PMC access | 17:56 | ||
| s/access$// | 17:57 | ||
| t/spec/S06-signature/optional.t | 17:59 | ||
| passes in ng | |||
| but since it uses eval_dies_ok I'm reluctant to add it back in | |||
| ng: sub wrong ($a?, $b) { } | 18:00 | ||
| p6eval | ng ebaea1: ( no output ) | ||
| moritz_ | ng: sub wrong ($a?, $b) { }; say 'alive' | ||
| p6eval | ng ebaea1: alive | ||
| moritz_ | ng: say(1, , 2) | ||
| p6eval | ng ebaea1: 12 | ||
| moritz_ | std: say(1, , 2) | 18:01 | |
| p6eval | std 29167: [31m===[0mSORRY![31m===[0mPreceding context expects a term, but found infix , instead at /tmp/Q8N5rdvauk line 1:------> [32msay(1, ,[33m⏏[31m 2)[0mFAILED 00:02 107m | ||
| moritz_ | over the weekend I had two ideas for potential changes to Perl 6 | 18:03 | |
| the first one is rather straight forward: | |||
| @list.sort($code) does a Schwartzian Transform if $code has arity (or count) 1 | |||
| that could be extended | 18:04 | ||
| if $code returns something Positional | |||
| the comparison could be made by the first item first | |||
| if two first items are equal on the second item | |||
| and so on | |||
| don't know if it might be overkill, but it might be handy in some cases | 18:05 | ||
| the second idea is a bit weird | |||
| I thought that it's a bit ugly to have so many methods defined in class Any | |||
| so user defined classes have more than hundred methods by default | 18:06 | ||
| colomon | oh, actually index won't work for Null PMC detection until fail is implemented. | ||
| moritz_ | so what about adding a second class near the root of our type hierarchy | ||
| and user defined classes inherit from that class by default | |||
| colomon | (or rather, it will work great for detecting null pmcs, but fail utterly at detecting their absence.) | ||
| pmichaud | I think we already have the $code does Positional feature, don't we? | 18:07 | |
| moritz_ | pmichaud: do we? that's news to me | ||
| pmichaud | our Array multi method sort( @values: Ordering @by ) | ||
| moritz_ | (second root class) and if you want to write a class that acts like a builtin type, you make it inherit Any | 18:08 | |
| I'm not yet sure if the details work out | |||
| or maybe there could be a role that all the builtin objects do | 18:09 | ||
| let's call it Base | |||
| so Num ~~ Base, Code ~~ Base etc. | |||
| and then for '24'.sin to work, there's a method sin in role Base | |||
| moritz_ kinda likes that idea | 18:10 | ||
| Wolfman2000 | Back from giving my sunday school lesson and having lunch. ...seems like I unexpectedly caused some more development in the ng branch. | 18:11 | |
| pmichaud | 17:55 <moritz_> 2) empty $! is not a Perl 6 type, and thus doesn't response to .defined | ||
| for this we just need to fix !FAIL | |||
| for that we probably should figure out how Failure works | 18:12 | ||
| moritz_ | that sounds LTT (Less Than Trivial) | 18:15 | |
| colomon | moritz_: which is exactly why I'm happy to sit back and like pmichaud and jnthn sort it out. | 18:16 | |
|
18:18
ejs joined
|
|||
| pugs_svn | r29168 | moritz++ | [t/spec] test for Nil() coercion ans the sink statement prefix | 18:18 | |
| r29169 | moritz++ | [t/spec] prefix + calls .Numeric, ~ calls .Stringy (see r28502, r28502) | |||
| r29170 | moritz++ | [t/spec] tests for prefix:<~>/.Stringy vs .Str | |||
| Wolfman2000 | rakudo: multi sub infix:<^>(Num $x, Num $y) { return $x ** $y; }; say "10^2 = {10^2}"; | 18:19 | |
| p6eval | rakudo 7347ec: push_pmc() not implemented in class 'Sub'in Main (file <unknown>, line <unknown>) | ||
| Wolfman2000 | std: multi sub infix:<^>(Num $x, Num $y) { return $x ** $y; }; say "10^2 = {10^2}"; | ||
| p6eval | std 29167: ok 00:01 110m | ||
| Wolfman2000 | ...sure, std likes it | ||
| colomon | Isn't infix ^ already in there somewhere, with a different meaning? | 18:20 | |
| moritz_ | Wolfman2000: that's the (LTA) error you get when overloading operators that aren't in the setting yet | ||
| colomon | rakudo: say 4 ^ 10 | ||
| p6eval | rakudo 7347ec: one(4, 10) | ||
| moritz_ | colomon: it is (junction) | ||
| colomon | has it been moved to the setting yet? | ||
| moritz_ | apparently not | ||
| Wolfman2000 | apparently not | ||
| colomon | ng: say 4 ^ 10 | 18:22 | |
| p6eval | ng ebaea1: Confused at line 1, near "say 4 ^ 10"current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336) | ||
| colomon | infix:<^> isn't implemented at all in ng yet. :) | 18:23 | |
| Wolfman2000 | Since ng is apparently the new upcoming master, I'll just wait for it to show up as the master before I try to figure out the PIR for it | ||
| Wolfman2000 could still probably use a PIR tutorial. | 18:31 | ||
| moritz_ | there's a book | 18:32 | |
| Wolfman2000 | free? | ||
| moritz_ | yes | ||
| in the parrot repo somewhere | |||
| you can also buy a hard copy | |||
| Wolfman2000 | I have the parrot repo: I required it for compiling rakudo | 18:33 | |
| moritz_ | docs.parrot.org/parrot/latest/html/ scroll down to "PIR book" | ||
| Wolfman2000 | nice | ||
| pugs_svn | r29171 | moritz++ | [t/spec] more Str -> Stringy changes | 18:55 | |
| r29172 | moritz++ | [t/spec] typo in fudg | 18:56 | ||
| moritz_ | moritz-- | ||
| more typos | |||
| colomon | What's Stringy? | 19:00 | |
| pmichaud | it's the "stringification" method, I think. | 19:01 | |
| (haven't read the updated spec yet) | |||
| moritz_ | the abstract role that Str and Buf implement | ||
| and prefix:<~> converts to anything that's Stringy | |||
| colomon | Is it actually implemented anywhere yet? | 19:02 | |
| pmichaud | nafaik | ||
| it's really new | |||
| like <7 days | |||
| moritz_ | it's implemented in the test suite :-) | ||
| at least partially | 19:03 | ||
|
19:03
revdiablo joined
19:04
Nex6 joined
|
|||
| moritz_ | phenny: tell qp_pq thanks for your suggestion, but I consider working code to be better than pseudo-code (and working code is also pseudo code simulatneously) | 19:05 | |
| phenny | moritz_: I'll pass that on when qp_pq is around. | ||
| moritz_ | phenny: tell qp_pq also pseudo code can be used for explaining algorithms, but the goal of the book is to teach Perl 6, not abstract concepts | 19:06 | |
| phenny | moritz_: I'll pass that on when qp_pq is around. | ||
|
19:09
synth joined
19:11
masak joined
|
|||
| s1n | pmichaud: ping | 19:12 | |
|
19:14
snearch joined
|
|||
| jnthn | pmichaud: pong....if you've still issues. | 19:15 | |
|
19:15
snearch_ joined
|
|||
| moritz_ | masak: should I add gge to hugme? | 19:16 | |
| masak | moritz_: yes, please. :) | ||
|
19:19
hugme joined
|
|||
| moritz_ | hugme: list projects | 19:19 | |
| hugme | moritz_: I know about book, gge, hugme, json, november, nqp-rx, perl6-examples, proto, svg-matchdumper, svg-plot, temporal-flux-perl6syn, tufte, web | ||
|
19:19
IOOIIIOIIO joined
|
|||
| masak | hugme: add mberends to gge | 19:20 | |
| hugme hugs mberends. Welcome to gge! | |||
| moritz_ | masak: just curious - why did you port PGE and not NQP-RX? | ||
| masak | moritz_: when I started porting PGE, nqp-rx didn't exist. :) | 19:21 | |
| moritz_ | that's a good point :-) | ||
| jnthn | A long-held sekrit. ;-) | ||
| masak | moritz_: besides, though I know that nqp-rx is way cooler, I'm still fascinated by PGE. :) | ||
| yep. I started this in early September, I think. | |||
| moritz_ | hugme: add moritz to gge | ||
| hugme hugs moritz. Welcome to gge! | |||
| jnthn | Wow! | ||
| masak checks the git log | |||
| moritz_ doesn't plan contributing right now, but wants to save him the trouble of changing the git URL later on | 19:22 | ||
| masak | moritz_++ # good reason :) | ||
| moritz_ tries the 03-optable.t to see how glacial it really is | 19:23 | ||
| IOOIIIOIIO | noob question: is rakudo known to SEGV on fedora12, or have I broken something? | 19:24 | |
| moritz_ | IOOIIIOIIO: what do you do to get it segfaulting? | ||
| IOOIIIOIIO | perl6 -e 'say "hello"' | ||
| moritz_ | that... shouldn't segfault | 19:25 | |
| IOOIIIOIIO | or pretty much anything really | ||
| masak | ouch. | ||
| moritz_ | IOOIIIOIIO: is that a rakudo you built yourself? | ||
| masak | IOOIIIOIIO: tell us a bit about your Rakudo and Parrot versions. | ||
| moritz_ | IOOIIIOIIO: or installed from rpm? | ||
| IOOIIIOIIO | no, I just installed the rpm | ||
|
19:25
pnu joined
|
|||
| moritz_ | IOOIIIOIIO: then you should open a bug in the fedora bug tracker | 19:26 | |
| IOOIIIOIIO | it's upgraded from fedora11 via yum, so something might be a little crooked in the libs | ||
| moritz_ | well, that's the task of a package manager to take care things aren't that screwed up | ||
| IOOIIIOIIO | rpms are rakudo-0.0.2009.09_1.6.0-2.fc12.i686, parrot-1.6.0-1.fc12.i686 | 19:27 | |
| yeah, I'll bug the fedora folks. Or maybe I'll just build it from source. | 19:28 | ||
| moritz_ | IOOIIIOIIO: even if you build from souce you should tell the fedora folks | ||
| 62.24user 0.49system 1:57.33elapsed 53%CPU for 03-optable.t in gge | 19:29 | ||
| IOOIIIOIIO | yeah, I will, but building from source will let me play with perl6 sooner :-) | ||
| and I might get to find out what's broken along the way... | 19:30 | ||
| moritz_ | IOOIIIOIIO++ # good attitude | ||
| IOOIIIOIIO | yeah, well it might be my fault :-) | ||
| masak | IOOIIIOIIO: when I don't check myself, I have the opposite approach: "haha, I'm going to find this bug in Rakudo/Parrot"... those are often the times when it turns out to be my fault. :P | 19:35 | |
|
19:41
mikehh_ joined
19:42
synth joined
19:47
synth joined
19:53
riffraff joined
20:03
zaslon joined
|
|||
| zaslon | lolmasakhazblogged! masak++ 'What you can do with GGE::OPTable that you couldn't without': use.perl.org/~masak/journal/39929?from=rss | 20:03 | |
| masak | zaslon: you are one slow cookie. :) | ||
| zaslon | Sorry, I don't understand that command | ||
| moritz_ | mask++ | ||
| IOOIIIOIIO | ho hum. Just built my own rakudo, and it works just fine. Not that it proves much. I'll be off to fedora-bugs and see if anyone else has seen the problem. | 20:04 | |
| or maybe I'll play with perl6 first :-) | |||
| masak | IOOIIIOIIO: fall for the temptation! :) | ||
| IOOIIIOIIO: as long as it doesn't prevent you from going to fedora-bugs. | 20:05 | ||
|
20:06
carlin joined
20:10
spinclad_ joined
20:11
mikehh__ joined
|
|||
| ng_feed | rakudo-ng: (jnthn)++ | 20:15 | |
| rakudo-ng: Fill out metamodel details somewhat. No doubt this will need and get tweaks and additions, but it'll serve as a first cut. | |||
| jnthn | I'll implement the above spec in the next couple of days. We can fill out and go from there. :-) | 20:16 | |
| mathw | yay | 20:18 | |
| moritz_ | YaY, something nobody reads :-) | ||
|
20:19
mikehh__ joined
|
|||
| mathw | wow | 20:19 | |
| github formats pod | |||
| github++ | |||
| jnthn | moritz_: That's fine, less complaints. ;-) | ||
| mathw | fewer :P | 20:20 | |
| jnthn | mathw: Nah, somebody will half complain, surely. | ||
| mathw | hmm | ||
| jnthn | It's entirely possible if I really screwed it up that the complaints will be continuous. | 20:21 | |
| masak | now I know why most of the Rakudo people are working on ng; it's much nicer to run the spectests there... | ||
| mathw | masak: I suspect it's not just that | ||
| masak | mathw: oh, it is. believe me. :) | 20:22 | |
| mathw | jnthn: I assume that Attribute figures out if it's private or not, and thus if it needs to install accessor methods, by looking for the ! or . in its name? | 20:23 | |
| jnthn | No | 20:24 | |
| moritz_ | jnthn++ # meta model | ||
| jnthn | By whether accessor is set to true. | ||
| In the call to .new | |||
| All attributes are $!foo under the hood. | |||
| But the Attribute is responsible for generating the accessor if that is true. | 20:25 | ||
| mathw | Then how? | ||
| argh | |||
| sorry | |||
| I had massive lag | |||
| I'm an idiot, :accessor is right there in the spec | |||
| jnthn | Yeah, you should make less mistakes like that. :-P | 20:26 | |
| masak | (making less mistakes)++ | ||
| mathw | I guess I'm not really awake | ||
| jnthn | You got fewer sleep than needed last night? | 20:28 | |
| mathw | no I've just not been running on a full tank for a while | ||
| and I'm back to work tomorrow, I think that's the main reason | 20:29 | ||
| I don't want to go back, and I've just been moping around today | |||
| jnthn | Aww. :-( | ||
| mathw | I've had two weeks off | ||
| and I've been interviewing for a job that's much better, so it's not the best situation | 20:30 | ||
|
20:30
masak joined
|
|||
| mathw | ah well | 20:30 | |
|
20:30
mikehh joined
|
|||
| mathw | I shall survive it :) | 20:30 | |
| jnthn | Hope the interviews land you somewhere better. | ||
| mathw | I have stocked up on chocolate | ||
| jnthn | \\o/ | ||
| mathw | so far it's promising :) | ||
| jnthn | Cool :-) | ||
| mathw | just got the last round to go | ||
| ng_feed | rakudo-ng: masak++ | ||
| rakudo-ng: Added infix:<!~~>. | |||
| mathw | where they pay for me to go visit them | ||
| masak++ | 20:31 | ||
| masak: although... does it work? :P | |||
| masak | mathw: for me, it does. | ||
| mathw | that'll do | ||
| masak | mathw: I exercised it really well before I pushed. | ||
| mathw | you're much meaner to Perl 6 than I am | ||
| jnthn | masak ran all the spectests. He told me so. | 20:32 | |
| ;-) | |||
| mathw | :) | ||
| masak | all of them! several times! | ||
| mathw | I'm sorry my ambitions to do useful things for Rakudo didn't pan out, but those job interviews were distracting (and unexpected) | ||
| But I'm glad masak is | |||
| masak | mathw: ...distracting and unexpected? :) | ||
| moritz_ | so how did they go? | 20:33 | |
| mathw | masak: yes | ||
| masak | mathw: boo! | ||
| mathw | moritz_: actually they were quite fun | ||
| masak | :P | ||
| jnthn | mathw: That's fine - it sounds like a long-term win for you if it all works out. :-) | ||
| mathw | Damn well should be | ||
|
20:34
diakopter joined
|
|||
| mathw | :D | 20:34 | |
| Just as long as they don't keep me waiting too long for their decision | |||
| moritz_ hasn't reached the interviews stage yet | 20:35 | ||
| mathw | moritz_: are you looking? | ||
| moritz_ | mathw: yep. Finishing my Diploma in mid December | ||
| mathw | aaah | ||
| good luck! | |||
| moritz_ | thanks | 20:36 | |
| mathw | I wasn't looking, but they said hey, want to talk to us about a groovy job? | ||
| masak | what happens on (0..Inf).pick ? | ||
| mathw | So I did self.think for about pi seconds | ||
| and said yes | |||
| moritz_ | masak: I don't think there's a meaningful answer to that | ||
| mathw | masak: hmm | ||
| jnthn | Wasn't that a bit irrational? | 20:37 | |
| masak | mathw++ | ||
| mathw | jnthn: when has rationality anything to do with it? :P | ||
| masak | moritz_: no, me neither. | ||
| moritz_: but what happens? | |||
| mathw | masak: I would say, it might return a number, or it might sit there forever until your stack explodes | ||
| moritz_ | masak: fail("I can't make up my mind how to pick something from an infinite list") | 20:38 | |
| mathw | moritz_: that would be a sensible approach, I think | ||
| moritz_ | s/list/range/ | ||
| mathw | it could do oh look it's an infinite list | ||
| jnthn | mathw: It was a bad joke about pi :-P | ||
| mathw | rand(Inf) | ||
| jnthn: I know :) | |||
| jnthn | :-P | ||
| moritz_ | I'm sure jnthn didn't want to pi()ss off anybody :-) | 20:39 | |
| mathw | actually I thought about it for a little longer than that | ||
| including checking to make sure it was genuine | |||
| one does get job spam | |||
| jnthn | Yeah | 20:40 | |
| I get loads, but thankfully lots of it is crazy obvious. | |||
| masak | rakudo: say rand() * Inf | ||
| mathw | yeah | ||
| p6eval | rakudo 7347ec: maximum recursion depth exceededin Main (file <unknown>, line <unknown>) | ||
| jnthn | "Want to work from home?" - I already do... | ||
| :-) | |||
| mathw | the genuine stuff is properly written | ||
| heh | |||
| masak | o.O | ||
| masak submits rakudobug | |||
| mathw | also, I find 'earn as much as £5 an hour' to be quite offputting | ||
| jnthn | ng: say rand() * Inf | ||
| p6eval | ng ebaea1: too many arguments passed - 0 params expectedcurrent instr.: '&die' pc 7545 (src/builtins/control.pir:18) | ||
| mathw | I earned £5 an hour when I was 17 | ||
| moritz_ | mathw: but you didn't pay taxes back then :-) | 20:41 | |
| mathw | true | ||
| scowl scowl mutter mumble | |||
| moritz_ | somebody offered me a telecomute jobs at the OTRS developers | 20:42 | |
| mathw | I'm not sure I'd lik ethat | 20:43 | |
| the option to work from home sometimes is nice | |||
| but there's something good about going to an office and being with everyone in the same room to discuss | |||
| moritz_ | aye | 20:44 | |
| and separating $work from $home | |||
| mathw | yes, which is something I'm quite bad at | ||
|
20:45
mikehh_ joined
|
|||
| masak | pmichaud: ping | 20:48 | |
| jnthn | pmichaud: ur doin it rong! | ||
| ;-) | |||
| rakudo: my $x = Any.new; say $x.perl | 20:51 | ||
| p6eval | rakudo 7347ec: Any.new() | ||
| jnthn | o: my $x = Any.new; say $x.perlng | ||
| ng: my $x = Any.new; say $x.perl | |||
| p6eval | ng 218aee: Method 'Iterator' not found for invocant of class 'Any'current instr.: 'perl6;Perl6Object;' pc -1 ((unknown file):-1) | ||
| mathw | hmm | 20:53 | |
| jnthn: looking at the source code, there's method perl in Any-list.pm, and it assumes it can call map on self | 20:54 | ||
| and renders like it's a list | 20:55 | ||
| hmm | |||
| I guess it can call map, because that's also defined in Any-list | 20:56 | ||
| but map is presumably not working properly in this case | |||
| why is map defined in Any? | |||
| I don't understand this | |||
|
20:57
masak` joined
|
|||
| moritz_ | mathw: so that you can doo <foo bar>.map and <foo>.map | 20:57 | |
| mathw: even though <foo> returns a Str, not a List | 20:58 | ||
| mathw | it does?? hmm | ||
| why | |||
| it should be a one-element list, shouldn't it | |||
| although it seems things have been arranged so that you can treat it that way | |||
| jnthn | masak++ and I agree that .perl for List being in Any is wrong. map does belong there, however. | 20:59 | |
| moritz_ | agreed | 21:00 | |
| mathw | so what should .perl in Any do? | ||
| masak | fixing it now. | ||
| moritz_ | mathw: nothing | ||
| mathw: there's a .perl in Object, iirc | |||
| masak | mathw: not be in Any-list | ||
| mathw | I guess it simply cannot know | ||
| moritz_ | which should be the default .perl returning $type.new(%attribs.perl) | ||
| mathw | you need to be something that knows it's a list to start doing listy things in .perl | ||
|
21:01
astrojp joined
|
|||
| jnthn | mathw: Right, thus why it almost certainly belongs in List. | 21:03 | |
| mathw | mmm | ||
| and we don't seem to have a List.pm | 21:04 | ||
| masak | I'm on it. | 21:05 | |
| and learning more about ng in the process. :) | 21:06 | ||
| mathw is too | |||
| RACE! | |||
| although I've got to update parrot first | |||
| masak | mathw: good luck, punk. | 21:07 | |
| ng_feed | rakudo-ng: masak++ | ||
| rakudo-ng: moved .perl from Any-list to List | |||
| mathw | pfft | ||
| having commit access is cheating | |||
| :P | |||
| masak | I guess. | ||
| moritz_ | mathw: submit a few more patches, send in a CLA... | ||
| masak | but I didn't make the rules. | ||
| mathw | :D | 21:08 | |
| moritz_: that's the plan | |||
| hey guess what | |||
| masak: you did exactly what I'm halfway through doing | 21:09 | ||
| mathw is happy about that | |||
| masak | mathw++ # obviously a guy with good judgment | ||
| mathw | except you didn't put the vim filetype hint in the file, as many of the others in core/ have | 21:10 | |
| jnthn | meh, who uses vim. | ||
| ;-) | |||
| mathw | me | ||
| although I seem to be lacking perl6.vim at the moemnt | |||
| which is odd | |||
| moritz_ | |||
| mathw | as i used to have it | ||
| jnthn | Yes, amusingly I think masak++ does too ;-) | ||
| masak | mathw: oh! | ||
| yeah. | 21:11 | ||
| right now, in fact. | |||
| but I don't care much about the difference between Perl 5 and Perl 6 syntax highlighting. | |||
| moritz_ does | |||
| mathw | it's not the most complicated method ever :) | ||
| especially since you just cut and pasted it | |||
| masak | mathw: and yet you only got half-way. :P | 21:15 | |
| mathw | nonsense | ||
| I was about to build it | |||
| but I had to update parrot | |||
| masak | ok :) | 21:16 | |
|
21:17
pmurias joined
|
|||
| mathw | aaaaargh | 21:18 | |
| I updated parrot | |||
| and it still thinks its too old | |||
| did I remember to run make install on parrot | 21:19 | ||
| apparently not | |||
| and that doesn't help | 21:20 | ||
| how odd | |||
|
21:21
masak joined
|
|||
| dalek | p-rx: 19d5ef4 | pmichaud++ | (3 files): Convert 'from' to 'p' (:p/:pos). |
21:24 | |
| p-rx: ba1f213 | pmichaud++ | (7 files): Add 'c'ontinue option to regexes. |
|||
| p-rx: e395215 | pmichaud++ | src/Regex/Cursor.pir: Change check for :rule type. |
|||
| p-rx: 88e6e26 | pmichaud++ | src/stage0/ (4 files): Update bootstrap. |
|||
| ng_feed | rakudo-ng: masak++ | 21:25 | |
| rakudo-ng: added vim setting line to the new file | |||
|
21:25
masak joined
|
|||
| Wolfman2000 | moritz_: I did some reading of the PIR after having just woken up from a nap. PIR makes me wish this was assembly instead of the real gunk | 21:28 | |
| moritz_ | :-) | ||
| mathw | PIR is so much higher level it's silly to call it assembly | 21:29 | |
| Wolfman2000 | If you want, I'll try playing around with it Monday night after my presentation. | ||
| mathw | except that it is, in a sense | ||
| Wolfman2000 | This way I can also help with some of the operator overloading | ||
| jnthn | ng: my @x = 1,2,3; @x.push(4); say @x.perl; | 21:30 | |
| p6eval | ng 440921: Method 'push' not found for invocant of class 'Array'current instr.: '_block14' pc 29 (EVAL_1:0) | ||
| ng_feed | rakudo-ng: (jnthn)++ | 21:31 | |
| rakudo-ng: We now pass mixed-placeholders.t (and are only a push function off passing slurpy-placeholders.t, it appears). | |||
| rakudo-ng: (jnthn)++ | |||
| rakudo-ng: Various fixes to placeholder parameters. | |||
| mathw | jnthn: we don't have .push in ng yet? | 21:32 | |
| jnthn | mathw: Seems not. | 21:35 | |
| It wasn't quite right in master though, irrc. | |||
| *iirc | |||
| Wolfman2000 | jnthn: I checked for push in any-list.pir on master, but...didn't find it | ||
| jnthn | So it's not a copy-paste job. | ||
| Wolfman2000: It'd be in Array | |||
| Wolfman2000: List is immutable. | |||
| Wolfman2000 | So not in builtins then | 21:36 | |
| jnthn | maybe in master it'd live in src/classes/Array.pir | ||
| mathw | it's in src/classes/Array.pir | ||
| I'm looking at it wondering if it can be ported fairly straight across | |||
| although hopefully into src/core/Array.pm so we don't have to do all that signature stuff | |||
| pmichaud | no, it cannot. | ||
| mathw | pmichaud: somehow I'm not surprised | 21:37 | |
| pmichaud | well, arrays now are "isa RPA" instead of "hasa RPA" | ||
| mathw | ahah | ||
| Wolfman2000 | RPA? | ||
| pmichaud | and I'm thinking that push/pop/shift/unshift should all be written in terms of splice anyway | ||
| jnthn | pmichaud: Other way round? | ||
| pmichaud | jnthn: right, other way round (thanks) | ||
| jnthn | :-) | 21:38 | |
| pmichaud | they're now hasa RPA instead of isa RPA | ||
| mathw | Wolfman2000: ResizablePMCArray, I believe | ||
| pmichaud has been fighting regex integration into ng all day :-( | |||
| Wolfman2000 | mathw: ugh...I am NOT a fan of those. | ||
| jnthn | pmichaud: Aww...it turned out harder than expected? | ||
| mathw | pmichaud: in maste rit does use splice, but it does a lot of faffing about first | ||
| pmichaud | jnthn: yeah -- trying to get the methods to be standard subclass of Method has been a pain | ||
| mathw | ah | 21:39 | |
| it goes through args, packs them all into Perl6Scalar, then splices args onto the end of self | |||
| jnthn | pmichaud: Ah, how so? | ||
| pmichaud | jnthn: just that it doesn't seem to work right "out of the box" | ||
| Method 'ACCEPTS' not found for invocant of class 'Regex' | |||
| but if I add a ".sub 'ACCEPTS' :method" to the Regex class, that doesn't help. | 21:40 | ||
| jnthn | That's decidedly odd. | ||
| pmichaud | are we still allowed to write methods in PIR ? | ||
| jnthn | I believe so. | 21:41 | |
| I mean, Code.new is writte in PIR for example. | |||
| pmichaud | right. | ||
| jnthn | Amongst many other bits and pieces. | ||
| pmichaud | I saw that. | ||
| Wolfman2000 | pmichaud: In perl 6? I wonder why we would want to. | ||
| pmichaud | I'll try it again. | ||
| Wolfman2000: because sometimes we can't do things in Perl 6 that can be done in PIR | 21:42 | ||
| in this particular case, we have to be able to set the caller's $/ | |||
| Wolfman2000 | If I remember right, $/ is a capture variable | ||
| ...and Perl generally doesn't allow you to write that | |||
| pmichaud | Wolfman2000: I'm not sure that's true, but assuming that it is -- that'd be why we'd have to do it in PIR instead of Perl 6 :) | 21:43 | |
| jnthn | pmichaud: OK - feel free to push the not-quite-working code if you want me to peek. | 21:44 | |
| pmichaud: Nothing comes to mind about why that would not work. | |||
| pmichaud | nopasting | ||
| gist.github.com/240739 | 21:45 | ||
| jnthn | looking | 21:47 | |
| pmichaud | changes pushed | ||
| ng_feed | rakudo-ng: pmichaud++ | 21:48 | |
| rakudo-ng: Merge branch 'ng' of git@github.com:rakudo/rakudo into ng | |||
| rakudo-ng: pmichaud++ | |||
| rakudo-ng: Updates with attempt to get Regex.ACCEPTS to work. | |||
| rakudo-ng: pmichaud++ | |||
| rakudo-ng: Add initial version of regex matches. | |||
|
21:49
IllvilJa joined
|
|||
| jnthn | pmichaud: Will I need Parrot version bump for this? | 21:49 | |
| mathw realises that his PIR might work better if he didn't put semicolons on all the line endings | 21:50 | ||
| Wolfman2000 | ugh. I just took a look at the push sub in master. Why must it use instructions I haven't seen yet in the tutorial when other subs use the push command? | 21:51 | |
| mathw | because you need to read more of the tutorial? | ||
| Wolfman2000 | So future chapters cover setprop, :slurpy, :subid, set_signature_elem, etc? | 21:52 | |
| mathw | set_signature_elem is part of Rakudo | ||
| I believe | |||
| jnthn | It is. | 21:53 | |
| mathw | it's part of the block that creates the method's Perl 6 signature | ||
| mathw is trying to define push in Perl 6... using inline PIR | |||
| this is not good for my night brain | |||
| but it's kind of interesting | |||
| Wolfman2000 | mathw: I have a feeling you may want to start with copying what's in master and then trying to optimize. | 21:54 | |
| pmichaud | please don't do that | ||
| the version in master is *wrong* | |||
| Wolfman2000 | ...nevermind | ||
| pmichaud | like "not even close" sort of wrong | ||
| because we've fundamentally changed the way lists and arrays are stored | |||
| mathw | Which is why I'm not | 21:55 | |
| I am learning more about PIR | |||
| just trying to persuade the compiler to swallow it | |||
| pmichaud | jnthn: yes, you need Parrot version bump | ||
| mathw | so even if I don't come up with anything that works, it's good | ||
|
21:55
frew_ joined
|
|||
| jnthn | pmichaud: OK, doing so. | 21:56 | |
| pmichaud: Nothing looks immediately wrong with the patch though :-S | |||
| ng_feed | rakudo-ng: (jnthn)++ | 21:57 | |
| rakudo-ng: Parse various junctional operators. | |||
|
21:58
Su-Shee left
|
|||
| pmichaud | jnthn: yeah, I'm a bit stumped by it. I mean, it clearly knows that it's a Regex. | 22:01 | |
| mathw | oh | ||
| jnthn | pmichaud: Right. | ||
| mathw | "syntax error, unexpected $end" has to be one of the least enlightening things I've seen all day | ||
| jnthn | pmichaud: New build takes a while here. :-S | ||
| mathw | but it's bedtime, so I'm sure when I get back someone else will have done push right and I can see how :) | ||
| night all | 22:02 | ||
| jnthn | night, mathw | ||
| pmichaud | ...wtf? | 22:05 | |
| imports = split ' ', 'PAST PCT HLL Regex _dumper' | |||
| that can't be right | |||
| (from Perl6::Compiler.pir) | |||
| oh, I guess it is right. | 22:06 | ||
| ummmmmm, okay, I know what's wrong then | |||
| jnthn | oh :-/ | ||
| pmichaud | The Regex from nqp is overwriting and losing the Regex locally | ||
| jnthn | *nod* | ||
| Ouch :-( | |||
| pmichaud | well, there's actually nothing *in* the Regex space itself that is needed -- just Regex::Cursor | 22:07 | |
| jnthn | Can you just import that? | ||
| pmichaud | well, it's a bit harder since it's not a top-level namespace, but I suspect I can find a way to do it. | 22:11 | |
| or perhaps the real answer will be to simply subclass the parrot classes and use the rakudo ones. We'll have to do that anyway. | 22:12 | ||
| I'll put in a cheat for now. | |||
| jnthn | k | ||
|
22:13
enigmujo1 joined
22:18
enigmujo left
|
|||
| quietfanatic | According to my dictionary, the aforelinked Japanese twitterer was saying "Perl 6 is too powerful; it seems kind of like Trunks" | 22:18 | |
| Wolfman2000 | quietfanatic: Perl as a Dragon Ball [Z] character? | ||
| quietfanatic | where Trunks is, I think, the name of a Dragon Ball Z character. | ||
| Wolfman2000 | Why don't we just put programming languages in other media? | ||
|
22:19
facsimile joined
|
|||
| quietfanatic | Wolfman2000: Perl 6 is more like the kid with the huge power level who can't control it yet | 22:19 | |
| moritz_ | aye | ||
| Wolfman2000 | ...there's only one way to do this. | ||
| moritz_ | we need to develop idioms to guide poeple | ||
| Wolfman2000 | <Vegeta> IT'S OVER -- | 22:20 | |
| quietfanatic | That almost says something... | ||
| I just see a bunch of [0016] boxes | |||
| Wolfman2000 | It's supposed to be 9000 | ||
| In boxes | |||
|
22:21
masak joined
|
|||
| zaslon | lolmasakhazblogged! masak++ 'November 22 2009 -- think globally, act globally': use.perl.org/~masak/journal/39930?from=rss | 22:21 | |
| masak | :) | ||
| zaslon: you're fast again! | |||
| zaslon | Sorry, I don't understand that command | ||
|
22:21
cognominal joined
|
|||
| masak | zaslon: are you sorry you don't understand this command either? :) | 22:21 | |
| zaslon | Sorry, I don't understand that command | ||
| masak thought so | |||
|
22:22
Avada joined
|
|||
| pmichaud | ouch, this is turning out to be a real pain. | 22:23 | |
| moritz_ | doing what? | 22:24 | |
| masak | regexes? | ||
| pmichaud | I need to get ['parrot';'Regex';'Cursor'] to appear as ['perl6';'Regex';'Cursor'] | ||
| (namespaces) | |||
| masak | ah. | ||
| pmichaud | I've never done importing of a second-level namespace before.... and parrot's builtins don't quite handle it. | ||
| moritz_ thought that was what type maps do | |||
| not importing, but mapping | 22:25 | ||
| pmichaud | type maps aren't that sophisticated either, alas. But really this is simply that I need one namespace to appear in two places. | ||
| (which we do for a number of other top-level namespaces) | |||
| oh, perhaps it's just faster to do it the right way than the cheat | 22:26 | ||
| pmichaud goes to work on that :-( | |||
| nope, that's not going to be any quicker | 22:27 | ||
| *sigh* | 22:28 | ||
| Tene | :( | ||
| pmichaud | the fact that Parrot doesn't allow invocables besides Sub is _really_ annoying. | ||
| at least, not good ways of doing it. | |||
| jnthn | pmichaud: Give them an "invokable" role. | ||
| pmichaud: If that isn't working, I think it's a Parrot bug. | |||
| pmichaud | jnthn: that doesn't help me in NQP-rx, which is where the root problem really lies. | 22:29 | |
| jnthn | Code should have 'em though. | ||
| Oh OK. | |||
| ;-( | |||
| pmichaud | what I *really* want is to be able to have the regex methods that nqp-rx (or PGE, for that matter) compiles be classed different than "Sub" | ||
| anyway, that problem isn't going to be solved this decade. | |||
| (where decade ends in about 40 days) | |||
| maybe I just "cheat" for now and go with Perl6Regex as the internal class name. | 22:30 | ||
|
22:31
cognominal_ joined
|
|||
| jnthn | night o/ | 22:33 | |
| cognominal_ | night \\o | 22:34 | |
|
22:49
ashizawa_ joined
|
|||
| pmichaud | argggggggh | 22:51 | |
| okay, regexes now run, but it's a pain to get $/ to be set properly, because &infix:<~~> is imposing its own $/ | |||
| so, this begs the question... what is responsible for setting the caller's $/ ? Is it .match, Regex.ACCEPTS, or &infix:<~~> ? | 22:52 | ||
| moritz_ | so you need to implement some form of OUTER::? | ||
| pmichaud | not OUTER | 22:53 | |
| caller | |||
| moritz_ | right | ||
| pmichaud | and we have to know how many callers to go up | ||
| or we we have to implement 'lift' | |||
| which I'm not quite ready to do | |||
| moritz_ | ouch. | ||
| pmichaud | eh, I guess all of them could do it. | 22:56 | |
| each one is responsible for setting its callers $/ | |||
| that can work. | |||
| t/00-parrot/10-regex.t ............. ok | 23:01 | ||
| moritz_ | pmichaud++ | 23:02 | |
| pmichaud | I'm sure there are lots of broken corner cases. | ||
| hugme tweet rakudoperl rakudo-ng now has (limited) regexes | 23:04 | ||
| hugme hugs pmichaud; tweet delivered | |||
| ng_feed | rakudo-ng: pmichaud++ | ||
| rakudo-ng: Merge branch 'ng' of git@github.com:rakudo/rakudo into ng | |||
| rakudo-ng: pmichaud++ | |||
| rakudo-ng: Enable regexes, at least a limited form of them. I'm sure there | |||
| moritz_ | I was about to say "it doesn't have regex support until you push", but you really did push first :-) | 23:05 | |
| pmichaud | yes, I did. | ||
| my sequence these days is becoming "push, tweet" | |||
| moritz_ | it should be 'test, push, tweet' :-) | ||
| pmichaud | oh, I did the test already, yes. :) | 23:06 | |
| cognominal_ | pmichaud++ | 23:08 | |
| moritz_ | pmichaud: S02-whitespace_and_comments/one-pass-parsing.t fails | 23:10 | |
| pmichaud | in ng? I'd not be surprised :) | 23:11 | |
| moritz_ | it used to pass | ||
| pmichaud | I'd still not be surprised :) | ||
| looking | |||
| moritz_ | but maybe that's because eval didn't work properly back then | ||
| FWIW I'd be fine with commenting it out of spectest.data again | |||
| pmichaud | oh, sure | ||
| moritz_ | it might have been a bogus pass anyway | ||
| pmichaud | we don't recognize 'regex' yet. | 23:12 | |
| the only regexes that we really handle properly are /pattern/ | |||
| moritz_ | that explains a lot :-) | ||
| pmichaud | (we used to recognize 'regex', but it was the NQP form of 'regex' and not the rakudo one) | ||
| so yes, taking it out of spectest.data is wisest for now | |||
| moritz_ pushes | 23:13 | ||
| ng_feed | rakudo-ng: moritz++ | ||
| rakudo-ng: re-disenable one-pass-parsing.t, it was a bogus pass before | |||
| moritz_ | from S05-metasyntax/changed.t | 23:14 | |
| # (The /s modifier is gone.) | |||
| eval_dies_ok('$str ~~ m:s/./', '/s modifier (as :s) is gone'); | |||
| that's so wrong, isn't it? | |||
| m:s exists, it's just something else today, no? | 23:15 | ||
| (:sigspace) | |||
| pmichaud | we've never parsed it correctly, though | ||
| moritz_ | I know | ||
| but the test as Perl 6 is wrong | |||
| pmichaud | ummm. I dunno off the top of my head. | ||
| moritz_ asks ack | 23:16 | ||
| ack confirms :-) | |||
| Wolfman2000 | Merge branch 'ng' of git@github.com:rakudo/rakudo into ng <-- does this mean ng is now master? | ||
| moritz_ | Wolfman2000: nope | 23:17 | |
| Wolfman2000: it means that two people had different versions of "ng", and merged them | |||
| it didn's say "... into master" :-) | |||
| s/s/t/ | |||
| nqp: token { a }; say 'alive'; | 23:18 | ||
| p6eval | nqp: Confused at line 1, near "token { a "current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197) | ||
| moritz_ | nqp: token { a }; say('alive'); | ||
| p6eval | nqp: Confused at line 1, near "token { a "current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197) | ||
| moritz_ | nqp: grammar Foo { token { a } }; say('alive'); | ||
| p6eval | nqp: Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1652 (src/Regex/Cursor-builtins.pir:179) | ||
| pmichaud | tokens want a name | ||
| moritz_ | nqp: grammar Foo { token b { a } }; say('alive'); | ||
| p6eval | nqp: alive | ||
| moritz_ | nqp: grammar Foo { token b { \\A } }; say('alive'); | 23:19 | |
| p6eval | nqp: Obsolete use of \\A as beginning-of-string matcher;in Perl 6 please use ^instead at line 1, near " } }; say("current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197) | ||
| pmichaud | lta error there -- I'll fix it. | ||
| moritz_ | nqp: grammar Foo { token b { \\z } }; say('alive'); | ||
| p6eval | nqp: Obsolete use of \\z as end-of-string matcher;in Perl 6 please use $instead at line 1, near " } }; say("current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197) | ||
| moritz_ | nqp: grammar Foo { token b { \\Z } }; say('alive'); | ||
| p6eval | nqp: Obsolete use of \\Z as end-of-string matcher;in Perl 6 please use \\n?$instead at line 1, near " } }; say("current instr.: 'parrot;HLL;Grammar;panic' pc 519 (src/cheats/hll-grammar.pir:197) | ||
| moritz_ adds a space to that error message | 23:21 | ||
| pmichaud | $ ./perl6 | 23:22 | |
| > say "abcdefabcdef".match(/d/).from | |||
| 3 | |||
| > say "abcdefabcdef".match(/d/, :c(5)).from | |||
| 9 | |||
| lambdabot | <no location info>: parse error on input `,' | ||
| <no location info>: parse error on input `)' | |||
| moritz_ | pmichaud++ | ||
| that will make Str.split(Regex) *so* much easier | |||
| pmichaud | yes, I had to rework the logic anyway so went ahead and did that. | 23:23 | |
| dalek | p-rx: a10da9f | moritz++ | src/Regex/P6Regex/Grammar.pm: add a space to the "Obsolote use" error message |
23:24 | |
| moritz_ loves small optimizations that make programs more usable | 23:25 | ||
| for example gqview, and image viewer, has the "rename" context menu item | 23:26 | ||
| and if your file is named foo.jpg, then the 'foo' part is already marked | |||
| so you can go ahead and type a new name without havin to re-type the extension | |||
| Juerd | Windows Explorer does that too :) | 23:27 | |
| moritz_ | the last Windows Explorer I worked a lot with was that of Win 98 SE | ||
| I don't think it did that back then :-) | |||
| Juerd | Heh :) | ||
| pmichaud | okay, got 'eval' working today, got simple regexes working. | 23:28 | |
| ng_feed | rakudo-ng: pmichaud++ | ||
| rakudo-ng: Eliminate the "Perl6Regex" cheat, enable :c(ontinue) option in regexes. | |||
| pmichaud | That's an earned break for an hour or three, I guess. :) | 23:29 | |
| pugs_svn | r29173 | moritz++ | [t/spec] remove a bogus test; the :s (sigspace) modifier exists, it just has a different meaning today | ||
| moritz_ | indeed :-) | ||
| pmichaud | oh, I suspect we can implement :g(lobal) too pretty soon. | 23:30 | |
| moritz_ | does that make sense inside a regex? | 23:33 | |
| pmichaud | oh, not in a regex, no | 23:34 | |
| but we can do "foo".match(/pat/, :g) | |||
| moritz_ | you mean in .match? | ||
| pmichaud | yeah | ||
| and then use that directly inside of split, subst, etc. | |||
| (instead of repeating it several places as we do now) | |||
| Juerd | Is .match preferred to ~~? | 23:35 | |
| Stylewise | |||
| moritz_ | not really | ||
| pmichaud | no, probably not | ||
| moritz_ | it's more of a stop-gap | ||
| pmichaud | no, it's spec | ||
| ~~ delegates to .ACCEPTS, which then does .match | |||
| Juerd | I see | ||
| moritz_ | it makes passing of pairs easier than ~~, for which you need more parsing goodness | ||
| a specced stop-gap :-) | |||
| pmichaud | well, even with ~~ it'd be rx :g /pat/ | 23:36 | |
| or ~~ m :g /pat/ | |||
| which puts the :g on the 'rx' or 'm', not on the smartmatch | |||
| moritz_ | right | 23:37 | |
| Juerd | Are those spaces required or can you do m:g/pat/ too? | ||
| moritz_ | works without spaces too | 23:38 | |
| std: 'a' ~~ m:g/pat/ | |||
| p6eval | std 29172: ok 00:01 106m | ||
| Juerd keeps forgetting that you can just ask the bots | |||
| moritz_ notices that "git pull" says "Already up-to-date." while "git push" says "Everything up-to-date" | 23:42 | ||
| inconsistent | |||
| cognominal_ | I guess that's a requirement for the Turing test :) | 23:43 | |
| moritz_ is not sure if it'd pass a Turing test :-) | 23:44 | ||
|
23:44
spinclad_ joined,
frettled joined
|
|||
| moritz_ | s/it/he/ | 23:49 | |
| hugme: tweet rakudoperl rakudo-ng now passes 454 spectests | 23:53 | ||
| hugme hugs moritz_; tweet delivered | |||