»ö« | 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 diakopter on 25 January 2010. |
|||
mberends | is the Rakudo release waiting for another Parrot update? r44147 seems to be 2.1.0 | 00:00 | |
jnthn | mberends: Note quite sure what we're waiting on right now... | 00:02 | |
chromatic | The tarball's ready to go any time. | ||
We're not bumping Parrot HEAD to 2.1.1 because 2.1.1 is 2.1.0 plus a single patch plus a version upgrade. | 00:03 | ||
jnthn | OK. | ||
frettled | chromatic: nice blog comment, BTW | ||
chromatic | Thanks. | ||
frettled | The source file I snarfed that code from isn't _completely_ filled with horrors, it has _some_ sense. Like, it works as intended. :) | 00:04 | |
chromatic | That's worth something... but you start finding these little annoyances and you start to question much of the rest of the code. | 00:05 | |
00:05
frettled sets mode: +ooo chromatic colomon mberends
|
|||
frettled | yep | 00:05 | |
My upcoming themes are about excessive use of parentheses for the purpose of avoiding knowledge about operator precedence, and then error/result checking. :) | 00:06 | ||
«Nah, it's not necessary to check whether the database query went okay before continuing, the database is almost never down.» | 00:07 | ||
frettled tears his hair in despair. | |||
colomon | BTW, my last spectest run (pre- jnthn's slurpy hash opt) took 547 wallclock secs on my MBP. | 00:08 | |
00:08
snarkyboojum_ joined
|
|||
frettled | That's PDQ. | 00:08 | |
jnthn | colomon: Yeah, those kinda times start to get a lot more manageable. | 00:09 | |
chromatic | jnthn, is that a cache of constant strings I see in the binder? | ||
colomon | now if we could just have this level of optimization on about five more days between now and April... | 00:10 | |
00:10
payload joined
|
|||
jnthn | chromatic: Can't use CONST_STRING in there, so faking it out. | 00:12 | |
chromatic: Unless you know of a better approach? | |||
00:12
snarkyboojum left,
snarkyboojum_ is now known as snarkyboojum
00:17
cj__ is now known as cj
00:21
JoWie left
|
|||
pugs_svn | r29779 | lichtkind++ | updated my talk, smaller reduced pictures, more content | 00:22 | |
00:23
xinming_ left
|
|||
colomon | oh, hey, I just remembered what I wanted to try... | 00:26 | |
chromatic | No, just looking at all of the string_new_literal() calls and their results. | 00:29 | |
jnthn | chromatic: Yeah, lots of garbage? | 00:30 | |
chromatic: Do we win much by caching 'em? | 00:31 | ||
chromatic | I'll try that in a bit. | ||
jnthn reckons probably not even a percent or two. | |||
OK. | |||
00:33
jferrero left
00:38
rgrau left
00:39
jferrero joined
00:43
nihiliad left
|
|||
dalek | kudo/master: e4cdb5b | (Martin Berends)++ | (2 files): [build/PARROT_REVISION] tentatively set to 44147 2.1.0 |
00:43 | |
mberends | testing --gen-parrot with the tarball made with Parrot r44147, looks good | 00:51 | |
jnthn | \o/ | 00:52 | |
pmichaud | (PARROT_REVISION) let me check the svn history a bit | 00:54 | |
btw, latest spectest run on my notebook was 8m58 | |||
00:55
lue joined
|
|||
pmichaud | (still non-parallel) | 00:55 | |
mberends | about 11min here (well .nl akshually) | ||
00:55
colomon left
|
|||
jnthn | pmichaud: Wow, that's shattered the ten minute mark nicely then. :-) | 00:57 | |
pmichaud | the 2.1.1 tag is officially r44149, so we should probably use it. | ||
so, set PARROT_REVISION to 44149 2.1.0 | 00:58 | ||
(I'm okay with leaving it as 44147, also -- 44148 and 44149 are basically documentation updates) | 00:59 | ||
lue | I wonder, is the ability to use modules from other languages (eg. Python) a purely らくど / Parrot thing? | ||
pmichaud | lue: we don't know yet. | ||
lue: I would hope that we could make it work on other platforms eventually. | |||
mberends | pmichaud: but then the Parrot version is 2.1.0, not 2.1.1 (with r44147 at least) | 01:00 | |
pmichaud | it doesn't really matter. 2.1.1 doesn't ever really appear in trunk. | ||
lue | I would like it to be part of the official spec aswell. Even if it isn't, it's great (no more reinventing the wheel, ever :D) | ||
pmichaud | lue: the spec defines the hooks for using modules from other languages. The details are (as yet) left up to individual implementations. | 01:01 | |
lue: additional detail by the spec would be very premature at this point. | |||
lue | Same way teaching a 7-year old how to walk would be premature </sarcasm> | 01:03 | |
01:03
quietfanatic joined
|
|||
mberends | pmichaud: I'm validating the r44147 / 2.1.0 tarball atm, another bump for the doc updates does not seem worth a re-start | 01:05 | |
pmichaud | lue: don't make the mistake that the specification precedes the implementation :) | 01:06 | |
that's generally not how development works. | |||
lue | It sure saves you from being creative, though :) | 01:07 | |
pmichaud | s/saves/prevents/ | ||
the specification really can't (and shouldn't) anticipate the issues that are likely to arise in a real implementation | |||
so what we need to do is have implementations explore the design space, and then codify the best answers as part of the spec | 01:08 | ||
lue | ...like implementation (the process)? :) | ||
pmichaud | this is the way most open source development occurs. It's certainly the case that Internet standards are formed that way (implementations precede specification) | ||
01:08
colomon joined
|
|||
lue | *note to self* invent XYZZY protocol for internet | 01:09 | |
mberends | lue: as in, the Waterfall development model was always intended to show how *not* to do it | 01:10 | |
pmichaud | mberends: wfm | ||
lue not a good place for a note to one's self. | |||
pmichaud | mberends: I agree to whatever you decide for the PARROT_REVISION stuff. | ||
01:11
snarkyboojum left
|
|||
chromatic | jnthn, 1.466% performance improvement. | 01:11 | |
Not huge. | |||
jnthn | chromatic: I'll take it. | 01:12 | |
mberends | the built-from-tarball Rakudo is working perfectly, will do the git tag and upload shortly | ||
chromatic | I can probably get you to 1.8%. | ||
pmichaud | mberends++ | 01:13 | |
lue Hey, anyone want to use the Swazi emalangeni currency? (its abbreviation is pl) | |||
jnthn | mberends: Nice :-) | ||
pmichaud | interestingly, this release announcement doesn't say how much of the spectest suite we pass. (I think that's probably okay for this release.) | ||
jnthn | ;-) | 01:14 | |
pmichaud | the numbers I have are significantly off anyway | ||
mberends | I hope that in a few minutes I can delegate release_guide step 13 to @you, "Publish the release announcement..." because I have no blog-fu | 01:15 | |
pmichaud | sure, I'll do the release announcement if nobody else picks it up. :) | 01:16 | |
I'm all in favor of encouraging delegation :) | |||
("oh wait, I'm supposed to be delegating to others -- not letting them delegate to me!") | 01:17 | ||
01:17
meppl left
|
|||
pmichaud updates Test::Harness on his laptop to see what sort of results he gets with parallel test runs | 01:17 | ||
lue | alpha: my @you="mberends","pmichaud","jnthn","lue","TimToady","noo"; say "The order of delegation is as follows:"; say @you; | 01:19 | |
p6eval | alpha 30e0ed: OUTPUT«The order of delegation is as follows:mberendspmichaudjnthnlueTimToadynoo» | ||
pmichaud | alpha: my @you = <mberends pmichaud jnthn lue TimToady noo>; say "The order of delegation is {@you.pick(*)}"; | 01:20 | |
p6eval | alpha 30e0ed: OUTPUT«The order of delegation is TimToady lue jnthn noo pmichaud mberends» | ||
pmichaud | *snicker* | ||
that's an interesting ordering. :) | |||
mberends | suits me ;) | 01:21 | |
jnthn | Somehow I preferred lue's answer. ;-) | ||
lue | alpha: my @you="mberends","pmichaud","jnthn","lue","TimToady","noo"; say "The order of delegation is as follows:"; say @you[1]; | 01:22 | |
p6eval | alpha 30e0ed: OUTPUT«The order of delegation is as follows:pmichaud» | ||
lue | :D | ||
pmichaud | D'oh! | ||
lue | alpha: my $TimToady=True; say "Alpha, do you prefer Mr. Wall over everyone else? {$TimToady}" | 01:24 | |
p6eval | alpha 30e0ed: OUTPUT«Alpha, do you prefer Mr. Wall over everyone else? 1» | ||
colomon | rakudo: my @you="mberends","pmichaud","jnthn","lue","TimToady","noo"; say "The order of delegation is as follows:"; say @you.pick(*, :replace).batch(10).join(' '); | 01:25 | |
p6eval | rakudo e4cdb5: OUTPUT«The order of delegation is as follows:No candidates found to invokecurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
colomon | drat | ||
jnthn | fail | ||
lue | try alpha, then pugs, then ng. | ||
alpha: my @you="mberends","pmichaud","jnthn","lue","TimToady","noo"; say "The order of delegation is as follows:"; say @you.pick(*, :replace).batch(10).join(' '); | 01:27 | ||
p6eval | alpha 30e0ed: OUTPUT«The order of delegation is as follows:Infinite lazy pick not implementedin method » | ||
lue | Aowww! colomon! :) | 01:28 | |
pugs: my @you="mberends","pmichaud","jnthn","lue","TimToady","noo"; say "The order of delegation is as follows:"; say @you.pick(*, :replace).batch(10).join(' '); | 01:29 | ||
p6eval | pugs: OUTPUT«The order of delegation is as follows:*** No compatible multi variant found: "&pick" at /tmp/GIbwTiQNgU line 1, column 113-155» | ||
pmichaud | mmmmm | ||
lue | I liked alpha the best. | ||
pmichaud | on my notebook, parallel spectest completes in 5m30 | ||
*wow* | |||
jnthn | The interesting thing is that we must have sped up overall. | ||
In terms of pure method and sub dispatch speeds, we were once a bit faster in alpha (not now though). | 01:30 | ||
lue | alpha: use rakudo; say "wow, it worked."; | 01:35 | |
p6eval | alpha 30e0ed: OUTPUT«Can't find ./rakudo in @*INCin Main (file <unknown>, line <unknown>)» | ||
pmichaud | afk for a while | ||
colomon | I just finished a stupidish comparison | ||
If you copy master's spectest to alpha, it runs in 913 wallclock on my system. | 01:36 | ||
That's versus 547 for my current master build. | |||
My guess is most of that is probably in trig, but still, not bad. | |||
jnthn | Really not bad. | ||
colomon | particularly considering a number of the test files don't exist in alpha, or error out very quickly. | 01:37 | |
01:38
avar left
|
|||
jnthn | Quite. | 01:38 | |
lue | Verily. | 01:39 | |
Therefore... Ergo | |||
jnthn | I may re-write the multi-dispatch cache next week. | ||
See what time I got and what other tempting things there are to hack on. | 01:40 | ||
01:40
ihrd joined
|
|||
colomon | I think I'll take a stab at properly implementing .pick, and maybe try to get ... more in line with TimToady++'s crazy schemes. | 01:40 | |
jnthn | Those would both be great things to do. | 01:41 | |
Getting .sort / .min / .max back in the next week would also be a very cool thing. | |||
colomon | jnthn: we have at least stupid versions of .min and .max right now, I think. | 01:42 | |
jnthn | Ah, OK | ||
I plan to continue general triage/re-enabling of S12 and S14 tests too. | |||
quietfanatic | What is 'alpha'? Is it the p6-on-p5 thing? | 01:43 | |
colomon | rakudo: say (5...1).max | ||
p6eval | rakudo e4cdb5: OUTPUT«5» | ||
jnthn | quietfanatic: alpha = what we renmaed old master to. | ||
colomon | quietfanatic: alpha is the old version of Rakudo. | ||
quietfanatic | oh, huh | ||
jnthn | quietfanatic: It's just a branch that holds Rakudo before we made the ng branch be master. | 01:44 | |
colomon | rakudo: say (5...1).max({ -$^a <=> -$^b }) | ||
p6eval | rakudo e4cdb5: OUTPUT«1» | ||
quietfanatic | Okay, I get it now | ||
01:44
ihrd left
|
|||
lue | basically, my %development = {master => alpha, ng => master} | 01:44 | |
#to abuse the term "hash" | 01:45 | ||
colomon | rakudo: say (5...12).max({ $^a leg $^b }); | 01:46 | |
jnthn | .oO( better than actually abusing hash ) |
||
p6eval | rakudo e4cdb5: OUTPUT«9» | ||
colomon | rakudo: say (5...12).min({ $^a leg $^b }) | ||
p6eval | rakudo e4cdb5: OUTPUT«10» | ||
colomon | I think I tried to get .min and .max working well enough to pass minmax.t, and failed. But they mostly work. | 01:47 | |
jnthn | rakudo: class Drink { has $.name; has $.price }; my @bar = Drink.new(name => 'beer', price => 1.10), Drink.new(name => 'wine', price => 2.50); my $cheapest = @bar.cheapest({$_.price}); say $cheapest.name; | 01:49 | |
p6eval | rakudo e4cdb5: OUTPUT«Method 'cheapest' not found for invocant of class 'Array'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
jnthn | rakudo: class Drink { has $.name; has $.price }; my @bar = Drink.new(name => 'beer', price => 1.10), Drink.new(name => 'wine', price => 2.50); my $cheapest = @bar.min({$_.price}); say $cheapest.name; | ||
p6eval | rakudo e4cdb5: OUTPUT«Too many positional parameters passed; got 2 but expected between 0 and 1current instr.: '_block83' pc 679 (EVAL_1:234)» | ||
jnthn | rakudo: class Drink { has $.name; has $.price }; my @bar = Drink.new(name => 'beer', price => 1.10), Drink.new(name => 'wine', price => 2.50); my $cheapest = @bar.min({$^x.price}); say $cheapest.name; | ||
p6eval | rakudo e4cdb5: OUTPUT«Too many positional parameters passed; got 2 but expected 1current instr.: '_block83' pc 679 (EVAL_1:234)» | 01:50 | |
jnthn | Ah, not that form yet. | ||
colomon | Hmmm... I remember that form now, but I don't actually see it in the spec? | 01:51 | |
nor is it tested in minmax.t, as far as I can see. | 01:52 | ||
Seems like it would be pretty easy to implement, though... | |||
did we actually release? when can we start checking in changes again? ;) | 01:53 | ||
mberends | no, just testing, testing the tarball | 01:54 | |
colomon | just as well, I have a lot of other stuff I should be working on. | 01:55 | |
01:55
avarab joined
|
|||
coke | Ok. Parrot 2.1.1 is released. | 01:56 | |
mberends | the tarball (using 2.1.0) should be uploaded in just a few minutes | ||
lichtkind | great | 01:57 | |
conrats to you all | |||
colomon | coke: Thank you again for this rush job rescue. | ||
jnthn | coke: Indeed. | ||
:-) | |||
Wow. Rakudo did well today. :-) | 01:58 | ||
colomon | :) | ||
jnthn | OK, 3am, I guess I should consider getting a little sleep :-) | 01:59 | |
colomon | seems like a good plan. | ||
coke | jnthn, colomon; glad to help. cutting a release is now pretty braindead. | 02:00 | |
chromatic++ for the bugfix. | |||
lue | goodnight, jnthn. (Wow, I wish I were in Europe. Then I wouldn't be up when you guys aren't) :) | ||
jnthn | Yeah, Europe is The Awesome! | 02:01 | |
;-) | |||
colomon | poor lue, having to suffer along with me, pmichaud, and TimToady... | ||
02:02
jferrero left
|
|||
jnthn | lol | 02:02 | |
Anyways... | |||
dobru noc o/ | |||
colomon | good night. | ||
02:03
ShaneC left
|
|||
lue | goodnight o/ o/ o/ o/ (see, I'm a crowd of people :D ) | 02:03 | |
making the novelty P6 16 month calendar... thinking I should make jnthn a month name (uncapitalized, of course) | 02:05 | ||
02:06
avarab is now known as avar
|
|||
quietfanatic | rakudo: class X {method x (*@_) {say @_} }; X.new.x(5) | 02:07 | |
p6eval | rakudo e4cdb5: OUTPUT«Placeholder variables cannot be used in a method at line 11, near "}; X.new.x"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
quietfanatic | There's an error for ya | ||
colomon | rakudo: class X {method x () {say @_} }; X.new.x(5) | 02:11 | |
p6eval | rakudo e4cdb5: OUTPUT«Placeholder variables cannot be used in a method at line 11, near "}; X.new.x"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
02:14
[particle] left,
[particle] joined
02:16
pugs_svn left
02:17
PerlJam left,
dukeleto left,
coke left
02:18
Juerd left,
dalek left,
jnthn left,
hatseflats left,
pmichaud left
|
|||
lue | /o\ timeout alert! Run for cover! Achtung! timeout alert! /o\ | 02:19 | |
02:19
jnthn joined,
hatseflats joined,
dukeleto joined
02:20
pugs_svn joined
02:33
coke joined
02:35
avar left
02:38
pnate joined
|
|||
lue | hello? | 02:38 | |
02:39
mhsparks left
|
|||
bkeeler | hello! | 02:40 | |
lue | hello! | 02:42 | |
colomon | hello! | ||
bkeeler | Sure gets quiet when those noisy euros go to bed eh? | ||
02:43
avarab joined
02:44
mhsparks joined
|
|||
lue | (again, with gusto) HELLO! | 02:44 | |
bkeeler | HELLLLOOOOOO...LLOOOO...OOOoo.....oooo....... | ||
02:45
avarab is now known as avar
|
|||
lue | (huff, huff) HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH | 02:45 | |
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEe | |||
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL | |||
OOOOOOOOOOOOOOOOOOOOOOOOOOO | |||
colomon | rakudo: say +"hello" | 02:49 | |
p6eval | rakudo e4cdb5: OUTPUT«0» | ||
02:50
alinbsp left
|
|||
lue | rakudo: say hello to the class; that's okay, take your time; say hello!; | 02:51 | |
p6eval | rakudo e4cdb5: OUTPUT«Confused at line 11, near "say hello "current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
lue | darn, I thought it was an english language interpreter. :) | ||
02:53
justatheory left
03:02
lichtkind left
03:06
mberends left
03:17
cdarroch left
03:20
mssm left
|
|||
coke | goooooooooooooooooooooodnight everybody. | 03:23 | |
03:23
coke left
|
|||
chromatic | Wow, the spectests are 25% faster than they were last time I checked (after a couple of optimizations). | 03:26 | |
5m 35s for me, with 5 parallel jobs. | |||
Trashlord | cool | 03:27 | |
colomon | chromatic: is that additional optimizations of yours, or what jnthn++ was working on earlier? | ||
chromatic | Both, but mostly jnthns. | 03:28 | |
I also have a Parrot patch to reduce the number of constants in PBC. | |||
colomon | \o/ | ||
03:30
pnate left
|
|||
chromatic | The cut-down trig tests are 17.271% faster. | 03:34 | |
03:35
mberends joined,
pnate joined
|
|||
colomon | nice. | 03:36 | |
mberends | ok, the 2010.02 release tarball is uploaded. It required re-booting to something with Flash to do the Github upload, something a bit foreign to a Linux user. | 03:37 | |
colomon | \o/ and ick. | 03:38 | |
03:43
snarkyboojum joined,
stephenlb left
|
|||
mberends | updated en.wikipedia.org/wiki/Rakudo_Perl as per release guide | 03:44 | |
that's the release done, apart from @you copying the release announcement to rakudo.org, perl6.org etc | 03:46 | ||
03:59
wknight8111 left
|
|||
lue | Hey... how come everyone's here when I'm not? :( | 04:05 | |
mberends | everybody went over there, only you and I are here | 04:06 | |
lue | where's there? | 04:07 | |
mberends | dunno. otherwise I might go myself | ||
snarkyboojum | if I run the spectest how do I interpret the timing results? i.e. do I look at the wallclock secs or.. | 04:08 | |
lue | The least they could do is mark themselves away... (see my gripe yesterday @ about this time in the backlogs) | ||
mberends | snarkyboojum: yes, wallclock times. They came down a lot today. | 04:09 | |
snarkyboojum | 547 on my lappy | ||
snarkyboojum does a bit of reading about wallclock time :) | 04:10 | ||
lue enquires snarkyboojum about the bandersnatches lately :D | |||
snarkyboojum | banderwahh? :) | ||
mberends | lue: asking these people to all do something is like trying to herd cats, and they're distributed globally | ||
snarkyboojum | oh :) | 04:11 | |
bkeeler | my bandersnatches have been a bit frumious lately | ||
colomon | I suspect wallclock time is literal, and therefore not the best measure of time, but it's fine for getting the general notion of progress... which was good today! | ||
snarkyboojum | nice to see it maxing out both my cores | 04:12 | |
colomon | and hopefully not maxing out your ram. :) | 04:13 | |
snarkyboojum | ~90% user and 10% system - b00m! | ||
plenty of ram left | |||
lue | snarkyboojum: Lewis Carrol's Hunting of the Snark. | 04:15 | |
snarkyboojum | lue: aye :) (bit slow in the afternoon heat here) | 04:16 | |
mberends | afk & # sleep | ||
lue | Good thing I don't vanish upon seeing boojums. | ||
snarkyboojum | heh indeedy | ||
lue is continuing work on the P6 novelty calendar system... | 04:17 | ||
lue discovers Linux Action Show! and is now hoping it's streamed in Ogg/Theora | 04:19 | ||
snarkyboojum | lue: checked Linux Outlaws out? | 04:23 | |
lue | no, ne'er heard of it (I rarely look for videos. So few are in Ogg AND I've an old PowerBook to boot) | ||
snarkyboojum | oh, LA is just a podcast | 04:24 | |
LO even | |||
lue | I just hope it streams in OGG, then I have a fighting chance :) | 04:25 | |
04:25
drbean left,
drbean joined
|
|||
lue | They ought to use an HTML5 player as well (I can't use flash (don't want to) ) | 04:26 | |
snarkyboojum finds the idea of a video show on Linux quite amusing - the fake background is hilarious :) | 04:28 | ||
lue | Have they ever used the TARDIS as a background? Or how about an ASCII art picture of Linus Torvalds/Larry Wall/etc ? | 04:30 | |
snarkyboojum | 563 wallclock secs on that run of the spectest | ||
or perhaps a collage of o'reilly animals :P | |||
lue | .u £ | 04:33 | |
phenny | U+00A3 POUND SIGN (£) | ||
lue | Perl6 goal #1: execute at superluminal speeds. | 04:35 | |
snarkyboojum | I noticed I could send rakudo into apoplexy if I do > say 'a' .. '£' | 04:36 | |
never returns... | |||
lue | alpha: say 'a' .. '£' | 04:42 | |
p6eval | alpha 30e0ed: OUTPUT«abcdefghijklmnopqrstuvwxyz» | ||
lue | hee hee | ||
snarkyboojum | I didn't want to try it here with the rakudo eval bot (or whatever it's called) | 04:43 | |
lue | then I will | 04:47 | |
rakudo: say 'a' .. '£' | |||
p6eval | rakudo 8fdc94: ( no output ) | ||
snarkyboojum | oh it timesout :P | 04:48 | |
rakudo: say ('a'..'£').WHAT | 04:49 | ||
p6eval | rakudo 8fdc94: OUTPUT«Range()» | ||
04:51
Guna joined
|
|||
lue | alpha: say ord('a') | 04:51 | |
p6eval | alpha 30e0ed: OUTPUT«97» | ||
lue | alpha: say ord('£') | 04:52 | |
p6eval | alpha 30e0ed: OUTPUT«163» | ||
lue | that range (if I were to implement it) should print every ascii character from 97 to 163 | ||
s/ascii/unicode/ | 04:54 | ||
04:54
gfx joined
|
|||
snarkyboojum | rakudo: say ('a' .. '£').to | 04:59 | |
p6eval | rakudo 8fdc94: OUTPUT«£» | ||
snarkyboojum | rakudo: say ('a' .. '£').from | ||
p6eval | rakudo 8fdc94: OUTPUT«a» | ||
lue | rakudo: say 'a' ... '£' | 05:03 | |
p6eval | rakudo 8fdc94: ( no output ) | ||
snarkyboojum | rakudo: say ord('£') | 05:07 | |
p6eval | rakudo 8fdc94: OUTPUT«163» | ||
05:08
lue left
|
|||
snarkyboojum | ah, it never gets to '£' because it's going to 'z' then 'aa' then 'zz' then 'aaa' and so on | 05:20 | |
rakudo: say 'aaa' after '£' | 05:21 | ||
p6eval | rakudo 8fdc94: OUTPUT«0» | ||
05:45
justatheory joined
05:47
pmichaud joined
|
|||
pmichaud | hmmm | 05:47 | |
why do I keep getting bumped from #perl6? | |||
chromatic | Sir, we require gentlemen to wear jackets. | 05:52 | |
pmichaud | yes, but what does that have to do with me? ;-) | 05:53 | |
chromatic | You're scaring the lobsters? | ||
spinclad | (net turbulence around feather?) | 06:00 | |
(ruffled feathers) | |||
pmichaud | no, I'm only being kicked from #perl6 -- I'm still connected to feather, and to other irc channels on freenode | 06:01 | |
bkeeler | Ahhh, glass of beer, warm dog curled up on my toes, Ashkenazy playing chopin, learning cool new stuff... does life get any better? | ||
spinclad | dunno then... backlog shows a bunch of timeouts from feather, most of whom came right back but not you. | 06:03 | |
probably the lobsters, then, as c said | 06:05 | ||
pmichaud | weird. | ||
06:07
vamped joined
06:27
pppppppeeeeeeeee joined,
pppppppeeeeeeeee left
06:36
nbrown left
06:37
nbrown joined,
xinming joined
|
|||
snarkyboojum | rakudo: say 'z'.succ | 06:51 | |
p6eval | rakudo 8fdc94: OUTPUT«aa» | ||
06:59
justatheory left
07:01
kaare joined
07:02
kaare is now known as Guest99436
07:17
uniejo joined
07:24
Su-Shee joined
|
|||
Su-Shee | good morning | 07:25 | |
spinclad | good dark of night, Su-Shee | 07:29 | |
07:30
justatheory joined
07:34
justatheory left
07:47
mssm joined
|
|||
snarkyboojum | alpha: say 'a'.succ | 08:16 | |
p6eval | alpha 30e0ed: OUTPUT«b» | ||
snarkyboojum | alpha: say 'z'.succ | ||
p6eval | alpha 30e0ed: OUTPUT«aa» | ||
08:18
tewk joined
|
|||
snarkyboojum | alpha: 'aa' after 'z' | 08:18 | |
p6eval | alpha 30e0ed: OUTPUT«Confused at line 10, near "after 'z'"in Main (file <unknown>, line <unknown>)» | ||
08:22
iblechbot joined
|
|||
moritz_ | good morning | 08:22 | |
vamped | guten Morgan | 08:25 | |
08:37
alinbsp joined
08:46
Chillance joined
|
|||
colomon | o/ | 08:49 | |
mathw | o/ | 08:52 | |
mberends | o/ | 08:57 | |
moritz_: the 2010.02 release is all done, apart from mailing the the docs/announce/2010.02 file to the mailing lists, and blogging, because I'm not active in those spheres. Would you be able to do that final bit? | 09:00 | ||
moritz_ | mberends: surewilldo | 09:01 | |
mberends | thanks moritz_ :) | ||
vamped | alpha: say (^10).pick(*) | ||
p6eval | alpha 30e0ed: OUTPUT«9260785314» | ||
vamped | rakudo: say (^10).pick(*) | 09:02 | |
p6eval | rakudo 8fdc94: OUTPUT«No candidates found to invokecurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
vamped | Is this considered a bug, or NYI ? (and how does one tell?) | ||
colomon | vamped: only no argument .pick implemented so far | ||
if I get time from $work, that's one of my goals for today. | 09:03 | ||
rakudo: say (^10).pick | |||
p6eval | rakudo 8fdc94: OUTPUT«3» | ||
vamped | good luck implementing that | 09:04 | |
09:04
Guna left
|
|||
moritz_ | mail to p6a sent | 09:05 | |
mberends | :) | ||
colomon | I don't think it will be too bad. there's a decent finite implementation in alpha to crib from, and the infinite form is easy | ||
moritz_++ | |||
mberends++ | |||
mberends | (teamwork)++ | 09:06 | |
moritz_ | rakudo.org/node/64 and now blogged | 09:07 | |
indeed mberends++ for the release | |||
mberends blushes and bows | |||
mathw looks at pick and finds it to be interesting | 09:12 | ||
colomon | mathw: are you looking at the spec, or the commented out implementation in Any-list.pm? | 09:16 | |
mathw | implementation | ||
colomon | I don't remember what didn't work that got me to comment it out... | 09:17 | |
mathw | the replacing version looks sane | ||
I haven't tried actually running it :) | |||
colomon | something wasn't working, else I wouldn't have fallen back to the 0-arg version. :) | 09:18 | |
but then, it's been a couple of weeks since then, a lot has happened! | 09:19 | ||
hmmm... compiles | 09:21 | ||
> say (1..20).pick(5, :replace) | |||
7101763 | |||
> say (1..20).pick(*, :replace).batch(10) | |||
Method 'Num' not found for invocant of class 'Block' | |||
ah, $num ~~ Whatever isn't working. | 09:24 | ||
mathw | interesting | 09:27 | |
you could enable the non-Whatever form though | |||
colomon | or I could keep fighting with it. :) | 09:29 | |
09:31
fridim_ joined
|
|||
moritz_ | the Whatever non-replace one should be implemented with a Fisher-Yates shuffle | 09:31 | |
it's a common case that deserves a fast algorithm | |||
colomon | reference please? | 09:32 | |
vamped | en.wikipedia.org/wiki/Fisher%E2%80%...es_shuffle | ||
moritz_ | en.wikipedia.org/wiki/Fisher–Yates_shuffle | 09:33 | |
moritz_ too slow | |||
09:33
moritz_ sets mode: +oo colomon vamped
|
|||
vamped | sorry to steal your topic, lol | 09:33 | |
moritz_ | no problem :-) | ||
09:34
payload left
|
|||
colomon | > say (1..20).pick(*, :replace).batch(20).perl | 09:36 | |
(17, 12, 10, 7, 16, 2, 2, 8, 5, 12, 2, 13, 7, 3, 3, 17, 14, 1, 2, 16) | |||
09:36
iblechbot left
|
|||
colomon | > say (1..20).pick(*).batch(30).perl | 09:39 | |
(13, 4, 6, 3, 20, 9, 10, 5, 1, 18, 8, 12, 17, 7, 2, 19, 15, 16, 14, 11) | |||
okay, I appear to have all the basic forms working now. I'll take a look at F-Y once the tests pass. | 09:40 | ||
mathw | \o/ | ||
vamped | thanks colomon. | ||
F-Y s looks interesting moritz. I'll have to finish reading after sleep. 'night all. | 09:41 | ||
colomon | night. | ||
moritz_ | 'night | ||
09:41
vamped left
09:42
mssm left
|
|||
mathw | I like how the Wikipedia article gives numerous incorrect implementations which are subject to modulo bias, then doesn't bother explaining what that is or how to fix it until after the pen-and-paper working section | 09:42 | |
I suppose I could tweak the article a bit, but it's only been an hour since breakfast | 09:43 | ||
frettled | mathw: How about now, it's been an hour and two minutes since breakfast! | 09:45 | |
Good TOD, BTW. | |||
colomon | ok ?(@array.pick eq any <a b c d>), "pick works on arrays"; | ||
Method 'Str' not found for invocant of class 'Junction' | 09:46 | ||
moritz_ | so it doesn't autothread | ||
but coerces to Str | |||
colomon | seems like. | ||
I don't think I'm up for fixing that right now. | |||
In fact, I've got the boy back in bed, so I should be off to bed myself. | |||
Is it okay to check new code into Rakudo again (post-release)? | 09:47 | ||
moritz_ | sleep well | ||
colomon | I see the release has been tagged... | ||
moritz_ | aye | ||
09:52
ihrd joined,
ihrd left
|
|||
colomon | !!!!! | 09:58 | |
spectest down to 475 wallclock secs | 09:59 | ||
chromatic++ | |||
.pick pushed, time for sleep | |||
moritz_ must have missed something - what did chromatic++ do? | |||
chromatic | jnthn had a lot to do with that too. | ||
10:12
fridim_ left
|
|||
frettled | /o\ OMG OMG OMG this code sucks. :( $var = `cat filenamehiddendeepsomewhere | grep STRING`; | 10:14 | |
itz | is there a canonical and maintained perl6 cheatsheet in any repos now? (perlmonks.org/?node_id=238031) I thought it used to be in pugs | 10:16 | |
moritz_ | no | 10:22 | |
10:26
orafu left,
orafu joined
10:27
gfx left
|
|||
moritz_ | there must be a cheat sheet somewhere, but it's surely outdate | 10:39 | |
10:42
chromatic left
10:46
fridim_ joined
10:47
masak joined
|
|||
masak | oh hai, #perl6! | 10:48 | |
moritz_ | [o] | 10:51 | |
masak tries to translate that smiley to a human stance, and fails :) | 10:52 | ||
moritz_: did someone shut you into the box in Schrödinger's lab? | 10:53 | ||
I'd open it, but I'm afraid of the state I'd find you in. | |||
moritz_ | the box is made by a crazy firebird database on one side, and DBD::InterBase on the other | 10:54 | |
masak | huh. | ||
boxed in by db stuff. | |||
10:56
mssm joined
|
|||
moritz_ | cut -d '/' -f 5 < dbs | while read i; do echo "drop database $i" | mysql -u $user -p$password -h $host; done | 10:58 | |
I can't help but feel some grim satisfacton while running this command :-) | |||
mathw found a pesky deadlock! | 11:08 | ||
masak | today's topic: OT :) | 11:14 | |
moritz_ locks the OT topic dead | 11:17 | ||
jnthn | oh hai | ||
masak | lolitsjnthn | 11:18 | |
jnthn | yayitsmasak | 11:19 | |
ooh, yay. chromatic++ did The String Thing for the extra bonus performance win. :-) | 11:20 | ||
masak | chromatic++ | ||
11:21
meppl joined
|
|||
jnthn loves how in the last 8 commits, six of them were performance enhancements. :-) | 11:21 | ||
masak | rakudo: class X {method x (*@_) {say @_} }; X.new.x(5) | 11:26 | |
p6eval | rakudo 3704a2: OUTPUT«Placeholder variables cannot be used in a method at line 11, near "}; X.new.x"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
masak | whoz op with that? | ||
moritz_ | b0rkaged | 11:28 | |
jnthn | masak: Probably it's being a bit over-eager. | ||
moritz_ | rakudo: class X {method x {say @_} }; X.new.x(5) | 11:29 | |
p6eval | rakudo 3704a2: OUTPUT«Placeholder variables cannot be used in a method at line 11, near "}; X.new.x"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
jnthn | masak: The "we has @_ and we're in a method so cry" check probably wants to also check "is @_ defined already". | ||
And not worry about it if so. | |||
masak submits rakudobug | |||
quietfanatic++ for discovering it | |||
11:41
gfx joined
|
|||
jnthn | lol | 11:42 | |
"is this the satnav operator" :-) | |||
Some days, p6l is really worth reading. :-) | |||
masak | yeah, that one was excellent. | 11:43 | |
11:44
fridim_ left
|
|||
masak | I give up. I'm down to one inexplicable step, but that one is *really* inexplicable. I don't grok Deutsch's algorithm. :( en.wikipedia.org/wiki/Deutsch–Jozsa_algorithm | 11:48 | |
mathw | your tweet about it suggests it's quantum | 11:49 | |
therefore | |||
HEAD ASPLODE | |||
masak | mathw: I'm working on removing exactly that irrational fear of QC :) | 11:51 | |
mathw: there's really no magic involved, just an L2-norm instead of an L1-norm. | |||
jnthn | Already sounds like magic. :-) | ||
masak | nono, it's easy! really! | 11:52 | |
what we observe are still ordinary probabilities between 0 and 1. | |||
jnthn | :-) | ||
masak | but they're caused by underlying values which can be negative or complex. | ||
thus, when they're added together, they sometimes cancel out, unlike ordinary probabilities. | 11:53 | ||
this explains all the quantum weirdness. | |||
I just wish I understood how :P | |||
mathw | I'm going to worry about it when there's a quantum computer I might want to program | 11:57 | |
Conventional computers are bad enough! | 11:58 | ||
masak | mathw: for some reason, that reminds me of the people who say they're not going to check out Perl 6 when until there's a production implementation :) | 12:00 | |
& | 12:01 | ||
mathw | well that's silly | ||
although if they don't have time, that's fair enough | |||
but nobody's even entirely sure if we can build a quantum computer yet | |||
although it will be handy to have had people thinking about how to program them at such time that it's accomplished, so that they can be used straight away :) | 12:02 | ||
I just don't think one of those people needs to be me | |||
masak | still sounds pretty analogous to me :P | 12:03 | |
& (really) | |||
12:15
kraih_sri left,
kraih_sri joined
|
|||
mberends is with mathw on the quantum computer thing | 12:15 | ||
12:17
mssm left
12:19
Trashlord left
|
|||
colomon | o/ | 12:20 | |
afk # son started crying just as I hit enter there. | 12:21 | ||
12:22
mssm joined
12:24
macae joined,
nbrown left
12:25
nbrown joined,
hanekomu joined,
hanekomu left
12:39
riffraff joined
12:48
payload joined
|
|||
colomon is starting to intensely hate pick.t | 12:57 | ||
13:02
gfx left
|
|||
moritz_ | why is that? | 13:03 | |
colomon | I'm suspicious you could write a pick function that always returned the first element in the list you pass it, and still pass pick.t... | ||
masak | mathw, mberends: if I eventually grok the Deutsch algorithm, I will implement it in Perl 6 and blog about it. | ||
colomon | It tests a zillion things which we can't do which aren't pick related, but is very stupid about its actual pick tests, as nearly as I can tell. | ||
moritz_ | colomon: I hope it at least tests that @list.pick(*) returns each item once? | 13:04 | |
colomon | yes, once. | ||
13:05
ignacio_ joined
|
|||
colomon | There's one test which tests that you don't get the elements back in the same order. | 13:07 | |
masak | you might. | ||
colomon | but we can't use it now because it uses xx | ||
masak: yeah, I know. | 13:08 | ||
13:08
jferrero joined
|
|||
masak | colomon: so it's kind of a crappy test. | 13:08 | |
colomon | masak: it tries ten shuffles in a row and asserts they are not equal to the source array ten times in a row. | 13:09 | |
moritz_ | it would be great to have some tests for minimal entropy for both rand() and pick | ||
but that would require significant effort, and probably also quite some run time | |||
masak | colomon: that sounds familiar. I think I've seen that file sometime. | ||
moritz_ | because it would be a statistical test | ||
jnthn | colomon: heh, so it randomly fails? :-) | 13:10 | |
colomon | moritz_: there actually is a skipped test like that in rand.t | ||
jnthn: failure should be very unlikely. | |||
jnthn | Well, probably. | ||
;-) | |||
moritz_ | jnthn: a test is allowed to fail randomly is the likelyhood is small enough | ||
like those statistical prime tests | |||
colomon | but looking at them again, I think returning source list in reverse sorted order probably passes every test they have. | ||
jnthn | :-) | ||
moritz_ | there chances of failure are smaller than that cosmic rays influence the result of your computation | 13:11 | |
colomon: then it should not be compared to the original list, but to the first shuffle result | |||
jnthn | During a high level of solar flare activity or a low one? | ||
:-) | |||
Anyway, yes, point taken. ;_) | |||
13:11
moritz_ sets mode: +o jnthn
|
|||
moritz_ | "in statistic mean" | 13:12 | |
colomon | my bigger complaint, though, is that the test also depends on junctions autothreading, hashes listifying, sort, xx, and gather / take. | 13:13 | |
so here I'm hoping for a nice test file that can let me know if I've got the (not yet done) port to Fisher/Yates correct. | 13:14 | ||
and what I've got is a test file that will take weeks before we can get it working correctly, and doesn't really test shuffling to any great extent. | |||
moritz_ | I understand you complaints, yes | 13:16 | |
masak | colomon: that's a very valid complaint. | 13:17 | |
heh. I've started on my E03 implementation. I can't help noting that alpha has :e and :s, but not :r and :w... :) | 13:18 | ||
colomon admits his best thoughts for testing shuffles involve [<] and [>], also complicated ops which are NYI | |||
masak | it's always possible to explain high-level, sugary operations and tests in terms of lower levels and more primitive components. | 13:20 | |
fwiw, that's what I've spent the last year-and-a-half doing :P | |||
moritz_ | sub is_sorted(@a) { @a eq @a.sort }; | 13:21 | |
that's rather close to [<=] | 13:22 | ||
masak | moritz_++ | ||
colomon | but relies on sort and is relatively slow. :) | ||
Probably better just to revert to C programming tricks... | 13:23 | ||
sub checknotall(@a is copy, $code) { my $last = @a.unshift; for @a { return true if $code($last, $_); $last = $_; } | 13:25 | ||
something like that | |||
er, with a return False at the end. | |||
13:29
meppl left,
IllvilJa left
13:41
pausenclown joined
|
|||
masak | hm, there's no way to open a file for reading-and-writing in alpha, is there? | 13:42 | |
the PIR routine in src/builtins/io.pir seems to suggest that an :r adverb overrides a :w adverb. and there's no :rw adverb. | 13:43 | ||
mberends | ugh :( | ||
13:43
athenot joined
|
|||
masak submits rakudo-TODO RT ticket about that | 13:44 | ||
13:44
xabbu42 joined
|
|||
jnthn | It was pretty much copied from master, afaik. | 13:44 | |
mberends | generally to make use of :rw, you would need seek() and a binary mode as well | 13:45 | |
masak | jnthn: not checked ng/master yet. just assuming it hasn't been fixed :) | ||
IO needs love in Rakudo. | |||
as does everything to do with binary modes. | |||
mberends | how long does it take to get one's head around perl6.ops and the binder? | 13:46 | |
masak | depends on the stretchability of the head :P | ||
pmichaud | good morning, #perl6 | 13:47 | |
pausenclown | rakudo: "123" ~~ / <[ a..z ]> ::: { fail "ugh" } / | ||
mberends | the last 20% of docs/compiler_overview.pod is overrunning its 80% of the time | ||
p6eval | rakudo 3704a2: OUTPUT«::: not yet implemented at line 11, near " { fail \"u"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
mberends | goodday pmichaud | ||
pausenclown | hi | ||
masak | good morning, pmichaud. | 13:48 | |
colomon | o/ | ||
jnthn | mberends: The binder is fairly straightforwardish, imo. | ||
mberends: Well commented, at least. :-) | |||
pausenclown | rakudo: "123" ~~ / <[ a..z ]> { fail "ugh" } /; say $! | ||
p6eval | rakudo 3704a2: OUTPUT«Mu()» | ||
pausenclown | mmh | 13:49 | |
mberends | jnthn++ the comments are good, at a low level, but lack some overview | ||
masak | pausenclown: that's a bug, you figure? | ||
pausenclown: want to submit it to RT? | 13:50 | ||
pmichaud | ...why is that a bug? | ||
pausenclown | i don't know it's a bug or not. | ||
masak | pausenclown: the pmichaud reply seems to imply it's not :) | ||
mberends | jnthn: your blog article makes it *look* easy, use.perl.org/~JonathanWorthington/journal/39772 | 13:51 | |
masak | so, where *would* the 'ugh' end up? | ||
pmichaud | we never reach the 'ugh' | ||
13:51
_johnz joined
|
|||
masak | oh! | 13:51 | |
of course. :P | |||
pausenclown | rakudo: "123" ~~ / [ <[ a..z ]> || { fail "ugh" } ] /; say $! | ||
p6eval | rakudo 3704a2: OUTPUT«Mu()» | 13:52 | |
pmichaud | okay, that's more of a bug :) | ||
masak | pausenclown: shall you or I submit it? | ||
pmichaud | ooc, what *should* happen there? | ||
pausenclown | I'm just toying around | ||
masak | pausenclown++ | ||
13:53
johnz left
|
|||
masak | pausenclown: still. it's a new discovery. | 13:53 | |
pmichaud | does fail set $! ? | ||
masak | not that I know. | ||
pausenclown | The Exexgesis says it should. | ||
pmichaud | heh | ||
pausenclown | S05 | ||
masak | that's a synopsis. | ||
pmichaud | Exegesis tend to be waaaaay out of date. | ||
masak | indeed. | 13:54 | |
13:54
moritz_ sets mode: +ooo pmichaud masak pausenclown
|
|||
pausenclown | That they tell me now | 13:54 | |
pmichaud | I can't find any instance of $! in S05. | ||
jnthn | mberends: Maybe the best way is to consider a signature, and then work through what the code would do. | ||
masak | pmichaud: where, according to you, would the 'ugh' end up? | ||
pausenclown | my bad | ||
moritz_ | I've asked TimToady where parsing error message (like from fail or from ~ ) end up | 13:55 | |
pausenclown | rakudo: "123" ~~ / [ <[ a..z ]> || { fail "ugh" } ] /; say $/ | ||
pmichaud | masak: I have no idea, actually, thus my question :) | ||
p6eval | rakudo 3704a2: ( no output ) | ||
jnthn | fail is like a return. | ||
moritz_ | and so far I haven't got an understandable answer | ||
jnthn | afaik | ||
pmichaud | what jnthn++ said. | ||
fail returns an object that throws an exception when it's used. | |||
jnthn | Given we're only in a closure, it probably causes us to fall out of the entire regex. | ||
masak considers all the ambient confusion a bug and submits that | |||
pmichaud | actually, I think we might fall out of the surrounding sub. | ||
jnthn | Well, other question: is an anonymous regex and a named regex different? | 13:56 | |
pmichaud | because a regex is more like a block than a sub in this case. | ||
jnthn | Yeah | ||
Probably fall from surrounding sub here. | |||
pmichaud | that might be the case... but I'm not certain of that either. :) | ||
jnthn | Whether if that'd been a regex { ... } though... | ||
pausenclown | "The call to fail causes the match to fail at that point, and sets an associated error message that would subsequently appear in the $! error variable (and which would also be accessible as part of $0)." | ||
jnthn | pausenclown: Where's that from? | 13:57 | |
pausenclown | dev.perl.org/perl6/doc/design/exe/E05.html | ||
jnthn | Oh | ||
It begins with an E | |||
pmichaud | E05 also says... | ||
jnthn | ...a lot of other out of date stuff. | ||
;-) | |||
pmichaud | [Update: Please note that this was written several years ago, and | ||
a number of things have changed since then. Rather than changing | |||
the original document, we'll be inserting "Update" notes like this | |||
one to tell you where the design has since evolved. (For the better, | |||
we hope). In any event, for the latest Perl 6 design (or to figure out | |||
pausenclown | granted. what should i read instead_ | ||
pmichaud | any cryptic remarks below) you should read the Synopses, which are kept | ||
very much more up-to-date than either the Apocalypses or Exegeses.] | |||
masak | Exx are so out-of-date. that's why they're so interesting! | 13:58 | |
mberends | jnthn: I'll do that in a little while. Right now I'm in the Makefile, figuring out what language perl6.ops is written in: "It's C, Jim, but not as we know it" ;) OPS2C must be the clue... | ||
pausenclown | The Synopsys is too short/sparse for my taste | 13:59 | |
masak | pausenclown: then you might try moritz_++'s stuff. | ||
moritz_ | or the book | ||
but it's not very complete yet | |||
masak | or the Advent Calendar. | ||
moritz_ | or perl6.org - it links to all that stuff | ||
jnthn | mberends: It's preprocessed by Parrot into a .c file. | 14:00 | |
mberends: er | |||
14:00
jferrero left
|
|||
jnthn | mberends: By a Parrot build tool. | 14:00 | |
mberends | by build/ops2c.pl | 14:01 | |
jnthn | yup | ||
It is basically C | |||
mberends | 98% C | ||
jnthn | Wrapped up in op bodies | ||
And $1 style thingies which just refer to registers. | |||
mberends | 2% riddle/mystery/enigma | ||
moritz_ | "just enough syntactic sugar for confusion" | 14:02 | |
mberends | heh. yes :) | ||
jnthn | ;-) | ||
pausenclown | damn. i just burned my bolognese | 14:04 | |
14:05
cognominal joined
14:06
cognominal left
14:07
_johnz left,
johnz joined
|
|||
pmichaud | did the release announcement go out? | 14:08 | |
14:08
cognominal joined
|
|||
pausenclown | alpha: say "abc" ~~ m/a(bc){my $foo = $0}/ | 14:08 | |
p6eval | alpha 30e0ed: OUTPUT«Confused at line 10, near "{my $foo ="in Main (file <unknown>, line <unknown>)» | ||
mberends | pmichaud: moritz_++ did it for us | ||
pausenclown | ok, this is straight from the synopsis =) | 14:09 | |
pmichaud | okay -- it doesn't appear to have landed in my email yet. | ||
masak | but I didn't see any email on p6c or p6u. | ||
colomon | pmichaud: I thought moritz_++ did it at about 4am EST. | ||
mberends | delegation fail | ||
pausenclown | Is this closure thing implemented at all? | ||
pmichaud | pausenclown: alpha doesn't know how to do closures in regexes -- that's strictly in the new version | ||
jnthn | rakudo: say "abc" ~~ m/a(bc){my $foo = $0}/ | ||
pausenclown | The one which has been announced | 14:10 | |
p6eval | rakudo 3704a2: OUTPUT«abc» | ||
pausenclown | ? | ||
moritz_ | pmichaud: I've sent the mail to p6a, but it seems to hang in the moderation filter | ||
pmichaud | moritz_: okay, just wanted to make sure someone had taken care of it. :) moritz_++ | ||
pausenclown: yes, the one that was just released | |||
pausenclown | Nothing to see at PM | 14:11 | |
mberends | I had tried that too, to p6l p6a p6c and p6u and assumed they were rejected by some filter | ||
14:12
alinbsp left
|
|||
pausenclown | whats this /p6./ thing about_ | 14:12 | |
moritz_ | pausenclown: short for perl6-{user,announce,compiler,language} mailing lists | 14:13 | |
mberends | pausenclown: dev.perl.org/perl6/lists/ | ||
pausenclown | .oO( damn acer kezboard ) |
||
ah. thanks | |||
moritz_ | mberends: nooow, link to perl6.org/community/ :-) | ||
mberends re-programs | 14:14 | ||
pmichaud | we really _should_ update the dev.perl.org/perl6 pages somehow. :-| | 14:19 | |
mberends | they were updated recently, this is the result ;-) | 14:20 | |
moritz_ | it is updated in many ways already, and much better than half a year ago | ||
mberends bashes head against moritz_ | |||
moritz_ runs away (not related to mberends' head bashing) | 14:21 | ||
pausenclown | helmet, anyone? | ||
mberends | yes, please! | 14:22 | |
masak | $fh.get(4) still gets me four lines from the filehandle $fh, no? | 14:23 | |
jnthn | pmichaud++ # glad you agreed on find_name | 14:24 | |
pausenclown | so,,, then $fh.get(*) should slurp, no? | 14:25 | |
gawd, i hate this laptop | |||
masak | pausenclown: yes, but there's also $fh.lines() which does that. | 14:26 | |
mberends | masak: perlcabal.org/syn/S32/IO.html does not seem to spec an arg for $fh.get(), it seems to default to 1 line | 14:27 | |
pmichaud | jnthn: the whole reason "find_sub_not_null" was created was because it was important to preserve the existing semantics of "find_name". :) | ||
masak | mberends: so... is it $fh.lines(4), then? | ||
mberends | yes | 14:28 | |
masak | kthx | ||
jnthn | pmichaud: Right. | 14:29 | |
pmichaud: I just feared that thread was starting to get a little traction and figured it was time to step in with a "no don't do it" :-) | |||
pmichaud | jnthn: I mentioend in the conference call last week that I was a bit concerned that many changes were being proposed (and prototyped) for Parrot that were likely to cause problems, but that I didn't want to put myself in the role of "Parrot history cop" | 14:30 | |
14:31
makkksimal joined
|
|||
jnthn | pmichaud: I haven't been watching it at all really... :-/ | 14:31 | |
14:31
uniejo left
14:36
Guest99436 left
|
|||
pausenclown | lunch! | 14:40 | |
pugs_svn | r29780 | duff++ | [S03] minor typos | 14:41 | |
14:42
PerlJam joined
|
|||
masak | no &seek and no &truncate in Rakudo... :/ | 14:43 | |
PerlJam | TimToady: I'm not sure what you were trying to say at S03:1855 . It looks like s/arrange// is warranted, but "as long as you return it as a list value" seems odd to me in a different way. | 14:44 | |
14:45
IllvilJa joined
|
|||
masak | if I have a filehandle open for reading, can I close it and re-open the same filehandle for writing instead? | 14:46 | |
if not, does the filehandle store and expose which file path it is a filehandle of? | |||
since I'm assuming the answer to both these questions re Rakudo is 'no', I'm asking re Perl 6. | 14:47 | ||
14:48
Trashlord joined
|
|||
masak | alpha: my @ = 1, 2, 3 | 14:50 | |
p6eval | alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "@ = 1, 2, "in Main (file <unknown>, line <unknown>)» | ||
masak | rakudo: my @ = 1, 2, 3 | ||
p6eval | rakudo 3704a2: OUTPUT«Malformed my at line 11, near "@ = 1, 2, "current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
masak submits rakudobug | |||
pausenclown | whad did you expect here, masak? I mean, the array has no nam | 14:52 | |
e | |||
masak | pausenclown: :) | ||
pmichaud | std: my @ = 1, 2, 3 | ||
p6eval | std 29779: OUTPUT«ok 00:01 109m» | ||
masak | pausenclown: what pmichaud/STD.pm said. | ||
rakudo: my % = foo => 1, bar => 2 | 14:53 | ||
p6eval | rakudo 3704a2: OUTPUT«Malformed my at line 11, near "% = foo =>"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
masak | rakudo: my $ = 'OH HAI' | ||
pausenclown | std: my @ = 1, 2, 3; say @[1] | ||
p6eval | rakudo 3704a2: OUTPUT«Malformed my at line 11, near "$ = 'OH HA"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
std 29779: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at /tmp/GjxufXToMv line 1:------> my @ = 1, 2, 3; say @⏏[1] expecting twigilFAILED 00:01 107m» | |||
mberends | masak: a filehandle that you close is not a filehandle any more. Your next open() would create a new filehandle. Filehandles cannot tell you what their filepath is, the language would have to cache that, which would be a performance hit for the programs that don't ask for it. | ||
masak | mberends: thanks for the explanation. here's why I'm wondering: dev.perl.org/perl6/doc/design/exe/E03.html | 14:54 | |
mberends: that program, interrupted by out-of-date updates as it is, does its business by passing filehandles between subroutines. | |||
mberends: that makes sense when there's &seek and &truncate, but not so much so without them :/ | |||
mberends: so I think I'll be forced to pass the filepath around instead. | 14:55 | ||
colomon | What the heck is that program supposed to be doing, anyway? | ||
mberends | yes. the Unix system interface has a reopen(), I think, to change modes | ||
masak | colomon: show off lots of operators :P | 14:56 | |
14:56
ruoso joined
|
|||
masak | colomon: (yes, the use case is "a bit" forced.) | 14:56 | |
pausenclown: when you declare '$', '@' or '%', you're basically throwing data into a hole. | 14:57 | ||
pausenclown: its primary use is in sub/method sugnatures when you need to declare a param, but don't want to use it. | 14:58 | ||
mberends | masak: absolutely needs seek() and truncate(). And if the file encoding is utf-8, the implementation will crawl :( | 14:59 | |
masak | o.O | ||
mberends: I've seen seek-like algorithms for utf8 that are quite fast, though. very little overhead. | 15:00 | ||
mberends | that gives us a glimmer of hope :) | ||
jnthn | I suspect you won't open a binary file as utf-8. :-) | 15:01 | |
masak | mberends: found it! :) www.daemonology.net/blog/2008-06-05...trlen.html | ||
15:01
SmokeMachine joined
|
|||
mberends | jnthn: no, alpha choked on favicon files in HTTP::Daemon after utf-8 was enforced | 15:01 | |
masak | we had encoding problems in November for a while. viklund++ did an excellent job at solving them. | 15:02 | |
pausenclown | jnthn: what if u want to read a file backwards? | ||
masak | s/solving/working around/ | 15:03 | |
PerlJam | pausenclown: that's crazy talk! :) | ||
masak | pausenclown: read it forwards, and do .flip on the result :) | ||
pausenclown | it is not | ||
masak | pausenclown: ¿uʍop ǝpısdn ǝןıɟ ɐ pɐǝɹ oʇ ʇuɐʍ noʎ ɟı ʇɐɥʍ | 15:04 | |
pausenclown | now, that is crazy talk. | ||
PerlJam | masak++ | 15:05 | |
pausenclown | nice trick, though. | ||
masak bows | |||
mberends | masak: impressive utf-8 handlers! I think Objective-C and OSX string libraries implement something like that. I had ideas of doing similar things for native utf-8 in vill, before TimToady++ talked me out of it. Applying it to files would still crawl, however :( | 15:07 | |
jnthn | .oO( Str.^add_method('mirror_text', ...) ) |
||
masak | mberends: yes. I guess it's still O(n) rather than O(1). :/ | 15:08 | |
mberends | yep | ||
masak | jnthn: I guess one shouldn't be able to do that without MONKEY_TYPING enabled? | ||
mberends | masak: thanks for the utf-8 ideas though, it may be worth reconsidering for vill :) | 15:09 | |
masak | mberends: you're welcome. I'm glad I found it. Google++ | 15:10 | |
pausenclown | time to play some crossfire (crossfire.z8games.com/). come and get me =) | 15:13 | |
jnthn | masak: You probably can't augment. | ||
masak: You can likely do meta-model things though. | 15:14 | ||
masak: They're just method calls after all. | |||
PerlJam | weird. | ||
masak | pausenclown: Perl 6 is my online game :) | ||
PerlJam | masak: who's winning? ;) | 15:15 | |
15:17
pausenclown left
|
|||
masak | PerlJam: everyone :) | 15:21 | |
(duh) | |||
rakudo: rand() | |||
p6eval | rakudo 3704a2: OUTPUT«Unsupported use of rand(); in Perl 6 please use rand at line 11, near "()"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
masak | std: rand() | ||
p6eval | std 29780: OUTPUT«===SORRY!===Unsupported use of rand(); in Perl 6 please use rand at /tmp/u95Z6iRUXu line 1:------> rand⏏()FAILED 00:01 107m» | ||
masak | rakudo: my $a = rand until $a > .5; say $a | 15:22 | |
p6eval | rakudo 3704a2: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | ||
masak | alpha: my $a = rand until $a > .5; say $a | ||
p6eval | alpha 30e0ed: OUTPUT«Null PMC access in can()in Main (file <unknown>, line <unknown>)» | ||
masak | std: my $a = rand until $a > .5; say $a | ||
jnthn | Hey look, one less NPMCA! | ||
p6eval | std 29780: OUTPUT«ok 00:01 107m» | ||
masak | jnthn: :) | ||
masak submits rakudobug | |||
jnthn | hmm, yeha | ||
makkksimal | ?eval 1+1 | 15:23 | |
jnthn | Wait, should until evaluate the loop once always? | ||
masak | jnthn: that would actually make the error make sense... | ||
jnthn checks the spec | |||
masak: Right, that's why I was asking. | |||
masak stands down rakudobug alert | |||
jnthn | I mean, I'd expect it from my $a = rand while $a <= .5; | ||
masak | nod. | 15:24 | |
you're right. | |||
jnthn | It's a bug if until is spec'd to evaluate once first, anyways...just not sure if it is. :-) | ||
BTW, one of the big refactorings in ng was to handle things like that in a way that'd hopefully avoid NPMCA. | 15:25 | ||
rakudo: sub foo($x where { $x == $y }, $y) { }; foo(1,2) # doesn't NPMCA either now :-) | |||
p6eval | rakudo 3704a2: OUTPUT«No applicable candidates found to dispatch to for 'infix:<==>'current instr.: '_block51' pc 434 (EVAL_1:170)» | ||
masak | jnthn: no, 'until' is '!while'. | ||
jnthn | masak: Ah, ok | ||
Then error makes sense I guess. | |||
masak | aye. | ||
masak submits a LTA rakudobug for that last one :) | 15:26 | ||
std: sub foo($x where { $x == $y }, $y) { } | |||
p6eval | std 29780: OUTPUT«Potential difficulties: Variable $y is not predeclared at /tmp/1c7JszfEht line 1:------> sub foo($x where { $x == $y⏏ }, $y) { }ok 00:01 110m» | ||
masak | that's a lot better. | ||
jnthn | Yeah | 15:28 | |
But NPMCA woulda been worse | |||
masak | yeah :) | 15:30 | |
colomon is suffering SAN loss from $work. | 15:35 | ||
moritz_ | when that happens you're happy if you have your source code in git and not svn on the server :-) | 15:37 | |
15:39
justatheory joined
|
|||
colomon | Here's what's happening, just in case it suggests something useful, because I'm utterly boggled. | 15:42 | |
For $work, I ship C++ code to customers. Apparently a customer complained to some of the folks I work with that we had non-virtual destructors on many classes, and requested that we add them to adhere to their source code conventions. | 15:43 | ||
So I added a bunch, with no difficulties but perhaps microscopically less efficient code due to unneeded vtables. | 15:44 | ||
That is, no difficulties on OS X. | |||
I just tried a Windows build with the now-virtual destructors, and I'm getting an endless stream of pop up messages informing me the program must be aborted because these destructors could not be found. | 15:45 | ||
Now, the destructors in question existed before the change. All that's different is they are virtual. And if they can't be found, they shouldn't be linking in the first place, as far as I can see. | |||
bkeeler | Some artifact of a previous build confusing things perhaps? | 15:46 | |
colomon | and suddenly I have an overwhelming urge to just revert the patch that added all the virtuals... | ||
15:46
nihiliad joined
|
|||
colomon | Nope, I .... | 15:46 | |
hmmm. I did a clean build, sort of. Maybe I should try harder on that front? | |||
bkeeler | Can't hurt | 15:47 | |
colomon | bkeeler++ # good idea | ||
jnthn | Maybe if you've a VM runner handy, try a build/run on one of those too. | ||
bkeeler | Remove all vestiges of any installed .dlls too | ||
jnthn | So you know it's clean. | 15:48 | |
bkeeler | If in doubt reinstall Windows ;) | ||
15:52
Psyche^ joined
15:53
Patterner left,
Psyche^ is now known as Patterner
15:55
snarkyboojum left
15:56
pmurias joined
15:57
rv2733 joined,
dual left
15:58
SmokeMachine left,
riffraff left
15:59
riffraff joined
16:02
jferrero joined
16:09
rgrau joined
16:13
mssm left
16:14
riffraff left
16:25
SmokeMachine joined
|
|||
colomon | Hmmm... after a complete rebuild of my $work code, I get a completely different linking error. Progress, I guess. bkeeler++, jnthn++ | 16:40 | |
bkeeler | hehe, good to hear | 16:41 | |
16:46
am0c left
|
|||
masak | E03 has the most contrived program I've ever seen. | 16:55 | |
mberends | are you working on making a running version of it? | 17:01 | |
masak | mberends: eventually. | 17:05 | |
mberends: first I just want to translate it to modern Perl 6. | |||
mberends | masak: interesting. E03 could do with updating. | 17:06 | |
bkeeler | any emacs users here? Just wondering if there's a cperl mode with perl6 support that's more recent than the one in the pugs repo... | ||
masak | mberends: SF already has a blog post about it. want me to paste the URL? | ||
mberends | yes please! | 17:07 | |
masak | lastofthecarelessmen.blogspot.com/2...-stab.html | ||
I don't want to look at it yet :) | |||
mberends | SF is already up to date with s/master/alpha/ :) | 17:08 | |
masak | SF++ | ||
17:13
makkksimal left
|
|||
jnthn | chromatic++'s improvements last night took test from 517s to 502s - a small but nice extra gain. :-) | 17:19 | |
(times for me, of course :-)) | |||
17:20
masak left
17:24
Chillance left
|
|||
colomon | jnthn: it was more like a 10% improvement on my machine. | 17:24 | |
17:24
Chillance joined,
dual joined
|
|||
jnthn | colomon: Really? Wow. | 17:31 | |
colomon | I guess it's possible one of your later optimizations snuck into the comparison as well, I wasn't being careful. :) | ||
but I'm getting 475 wallclock on my system, and the previous timing I noted was 547. | 17:32 | ||
at this point it's really solidly much better than alpha, too. | |||
jnthn | Dunno, I pushed two, and then a third one later. | ||
Yes, that makes me happy. :-) | |||
colomon should stop fantasizing about implementing Rat versions of the trig functions and get back to $work... | 17:40 | ||
17:44
nbrown left
|
|||
colomon | Would probably be easier if they were FatRats... | 17:45 | |
17:45
cdarroch joined,
cdarroch left,
cdarroch joined
|
|||
jnthn | .oO( It occurs to me that Rat.Capture actually means something... ) |
17:45 | |
jnthn lols | |||
colomon | what does it mean? | 17:46 | |
jnthn | colomon: Just coercion to a capture | 17:47 | |
colomon | ah, does that make sense as something to call? | 17:48 | |
jnthn | rakudo: sub foo(Rat $r (:$numerator, :$denominator, *%)) { say $numerator; say $denominator; }; foo(3/5) | ||
p6eval | rakudo 3704a2: OUTPUT«35» | ||
jnthn | colomon: The binder calls it in order to make things like the above work. :-) | ||
colomon | I am awed that you got that working. | ||
what does the *% in there mean? | 17:49 | ||
jnthn | colomon: It's just a slurpy hash, it means "and throw away anything else" | 17:50 | |
Though actually, a Rat probably doesn't ahve any other attributes. | |||
rakudo: sub foo(Rat $r (:$numerator, :$denominator)) { say $numerator; say $denominator; }; foo(3/5) | |||
p6eval | rakudo 3704a2: OUTPUT«35» | ||
jnthn | ah, yeah, so you get away with just that. :-) | ||
colomon | ah, cool. | ||
jnthn | Works on returns too. | ||
rakudo: sub foo() { return 4/3 }; my (Rat $r (:$numerator, :$denominator)) := foo(); say $numerator; say $denominator; | 17:51 | ||
p6eval | rakudo 3704a2: OUTPUT«43» | ||
colomon | rakudo: sub makerat() { return 3/5; }; my Rat $r (:$numerator, :$denominator) = foo()... beaten to the unch | 17:52 | |
p6eval | rakudo 3704a2: OUTPUT«Confused at line 11, near "my Rat $r "current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
colomon | punch | ||
jnthn | That one *was* real fun to make work... | ||
I needs to blog about that stuff. :-) | |||
colomon | jnthn++ | ||
17:53
jferrero left
17:54
cdarroch left
17:56
nbrown joined
17:57
cdarroch joined,
cdarroch left,
cdarroch joined
18:00
ignacio_ left,
stephenlb joined
|
|||
colomon | working $work build! \o/ | 18:02 | |
18:04
meppl joined
18:05
lichtkind joined
18:07
nbrown_ joined
18:10
nbrown left,
nbrown_ is now known as nbrown
18:15
ignacio_ joined
|
|||
colomon | hey, the release announcement just popped up in my mailbox! \o/ | 18:23 | |
18:23
visitor9 joined
|
|||
visitor9 | Has any work begun on a Perl 6 binding to a GUI toolkit? Which one are you most interested in for Perl 6? | 18:24 | |
Su-Shee | gtk | 18:25 | |
qt | |||
arnsholt | AFAIK the native language bindings are a bit underspecified ATM | ||
But Parrot as a native call interface so it's possible, but it'll be Rakudo-specific | |||
visitor9 | Does that mean, if someone writes PIR bindings to a GUI toolkit, then any Parrot-hosted lang can use them? | 18:26 | |
arnsholt | I think so | 18:27 | |
At least if you don't rely on any of the Rakudo data-type stuff | |||
18:29
SmokeMachine left
|
|||
lichtkind | Su-Shee: kam die einteilung in unterseiten auf perl6.org auch von dir? | 18:29 | |
18:42
payload left
|
|||
Su-Shee | lichtkind: nur die idee/vorschlag. | 18:42 | |
18:42
ignacio_ left
|
|||
lichtkind | Su-Shee: gut, danke | 18:42 | |
18:44
nbrown left,
payload joined
18:46
quietfanatic left
|
|||
mathw | good localtime | 18:47 | |
Is there anything I could look at in Rakudo this evening that would be helpful? | |||
jnthn | mathw: A lot of S03-smartmatch/*.t is still commented out in t/spectest.data | 18:49 | |
mathw: I suspect a bunch of them may be not too hard to put back (the non-syntactic ones, anyways). | |||
mathw | okay | ||
I'll take a look | |||
just waiting for rakudo to update and recompile | |||
jnthn | Some of it may be review alpha, copy, paste. :-) | ||
Some of it may be re-write because the previous impl was either (a) in PIR not Perl 6 or (b) sucks. :-) | 18:50 | ||
mathw | :) | ||
jnthn | (or maybe (c) the spec changed...) | ||
mathw | I'll be asking for help I'm sure | ||
jnthn | I need to go buy food now (which is why it's just started to rain heavily, I guess...) | ||
mathw | but I'm determined to do something useful from time to time instead of just lingering and talking like I used to do | 18:51 | |
hah | |||
jnthn | But will be around and probably Rakudo-ing. :-) | ||
mathw | yes it tends to work that way doesn't it | ||
18:51
nbrown joined
|
|||
jnthn | Thing is, I don't think it's rained all the rest of the day! :-) | 18:51 | |
mathw | typical | ||
I'm also trying to cope with my cat, who thinks he should be sitting in front of the screen | |||
18:52
visitor9 left
|
|||
jnthn | mathw: Clearly he wants to see some lolcats....or the McDonalds site. | 18:52 | |
PerlJam | If *+* comes to mean { $^a + $^b }, then I guess all of those cool things we wrote like (*** + ***).(2) will have to become (*** + ***).(2,2 ...) or something | 18:53 | |
mathw | ah, he's wandered off now | ||
18:53
SmokeMachine joined
|
|||
mathw | one day I'll find an ethernet cable lying around that he's been plugging himself into or something | 18:54 | |
jnthn -> getting wet buying stuff to cook for dinner | 18:56 | ||
18:59
ash__ joined
19:00
ignacio_ joined
19:01
ShaneC joined
19:02
chromatic joined
19:04
nbrown left
19:09
nbrown joined
|
|||
jnthn back | 19:25 | ||
mathw | Well | ||
I have discovered that Rat doesn't have an ACCEPTS method | 19:26 | ||
alpha: ('1.2' ~~ 1.2).say | |||
p6eval | alpha 30e0ed: OUTPUT«1» | ||
mathw | rakudo: ('1.2' ~~ 1.2).say | ||
p6eval | rakudo 3704a2: OUTPUT«Method 'ACCEPTS' not found for invocant of class 'Rat'current instr.: 'infix:<~~>' pc 211284 (src/gen/perl6-actions.pir:15386)» | ||
mathw | what I haven't figured out is where alpha keeps it | 19:27 | |
or if alpha is cheating | |||
jnthn | src/setting/Rat.pm moybe the first place to look | 19:28 | |
PerlJam | you're looking for an alpha rat? | ||
:) | 19:29 | ||
mathw | har | ||
ash__ | do they have alphas? just curious | ||
mathw | jnthn: I looked in there, no dice | ||
ash__ | what does it inherit from? | ||
did you check its parent? | 19:30 | ||
alpha: say Rat.^methods(:local); | |||
p6eval | alpha 30e0ed: OUTPUT«predsecnudenumeratorsuccNumdenominatorsignperlabsStrnew» | ||
ash__ | alpha: say ~Rat.^parents; | ||
p6eval | alpha 30e0ed: OUTPUT«Any() Object()» | ||
mathw | I've got a local tree with alpha, so I'm poking through that now | 19:31 | |
ash__ | rakudo: say Rat.^methods(:local); # does this work now? | ||
p6eval | rakudo 3704a2: OUTPUT«absStrsecaccessor_helper_roaccessor_helper_roRatnewpredIntBoolnudesuccNumsignperl» | ||
ash__ | ooo, jnthn++ fixed introspection, at least some of it, woot | 19:32 | |
what does nude do on Rat? | 19:33 | ||
PerlJam | ash__: numerator, denominator | ||
nu de | |||
mathw | okay I have no idea what alpha's doing | 19:34 | |
ash__ | ah, cool | ||
mathw | I guess it falls back to Any | ||
ash__ | rakudo: (3, 4, 1).sort; # :-( | 19:35 | |
p6eval | rakudo 3704a2: ( no output ) | ||
ash__ | hmmm that gave me an error a second ago | 19:36 | |
rakudo: say ~Any.^methods(:local).sort; | |||
p6eval | rakudo 3704a2: OUTPUT«Method 'sort' not found for invocant of class 'Array'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
mathw | rakudo: (2.3 == 2.3).say | 19:37 | |
p6eval | rakudo 3704a2: OUTPUT«1» | ||
colomon | alpha: ('1.2' ~~ 6/5).say | 19:38 | |
p6eval | alpha 30e0ed: OUTPUT«Method 'ACCEPTS' not found for invocant of class 'Rat'in Main (file src/gen_setting.pm, line 324)» | ||
colomon | 1.2 isn't a Rat in alpha. | ||
mathw | aaah | 19:39 | |
that makes sense | |||
so the question is, which branch is correct about that | |||
rakudo: 1.2.WHAT.say | |||
p6eval | rakudo 3704a2: OUTPUT«Rat()» | ||
colomon | Well, 1.2 is definitely supposed to be a Rat. | ||
mathw | alpha: 1.2.WHAT.say | ||
p6eval | alpha 30e0ed: OUTPUT«Num()» | ||
colomon | Whether or not Rats should have an ACCEPTS, I dunno. | ||
mathw | okay | ||
well there should be some way to smartmatch it | 19:40 | ||
colomon | Ah, right, that makes perfect sense. :) | ||
jnthn | RAt should have ACCEPTS | ||
Should do what == does, I suspect. | |||
colomon | hold on, let me poke at the code. | ||
PerlJam | Was REJECTS speced away? | ||
colomon | Hmmm... I think == is just relying on Nums to do the work. | 19:41 | |
ash__ | i shouldn't ACCEPTS exist on all objects? | ||
jnthn | colomon: Maybe - == could be overloaded for Rat though | ||
colomon | probably makes sense to do so. | ||
jnthn | But an ACCEPTS that just does $topic == self should be enough, I think. | 19:42 | |
mathw is trying that at the moment | |||
I had thought of that, and then thought hang on... isn't that a bit simple | |||
and then I thought well why shouldn't it be | |||
! | 19:43 | ||
okay | |||
I don't know what just happened | |||
mathw pokes | |||
colomon | tell us more? | 19:44 | |
mathw | well I gave Rat an ACCEPTS | 19:45 | |
and I ran the same test, which does '1.2' ~~ 1.2 | |||
and now it says "Use of type object as value" | |||
colomon | what were the arguments to ACCEPTS? | ||
mathw | hold that thought | 19:46 | |
food time... | |||
ash__ | i think method ACCEPTS($self:, $other) {...} is the general definition of ACCEPTS... | 19:51 | |
jnthn | rakudo: say '1.2' == 1.2 | 19:52 | |
p6eval | rakudo 3704a2: OUTPUT«1» | ||
jnthn | rakudo: Rat.^add_method('ACCEPTS', method ($topic) { self == $topic }); say '0.5' ~~ 1/2 | ||
p6eval | rakudo 3704a2: OUTPUT«1» | ||
ash__ | is there an overall numeric class/role that all numberish objects use? | ||
jnthn | Numeric | ||
colomon | but it's NYI | 19:53 | |
ash__ | okay, was wondering about that, Rat.^parents; only returns Any, Mu | ||
is it a role? probably? | 19:54 | ||
colomon | yes | ||
actually Rat does Numeric and Real. | |||
and eventually Rational, I think... | |||
ash__ | how do you get a list of what roles an object has applied to it? | ||
jnthn | ash__: .^roles | 19:56 | |
ash__: Roles aren't parents. :-) | |||
ash__ | yeah, i know, i just wasn't sure where they'd be stored | 19:57 | |
PerlJam | rakudo: my $a; say $a.^methods.join(":") | 19:59 | |
p6eval | rakudo 3704a2: OUTPUT«BUILDALL:new:Bool:say:print:defined:REJECTS:BUILD:clone:WHICH:CREATE:Capture:PARROT:bless:WHENCE:WHERE:list::notdef» | ||
PerlJam | Why is there an empty method name just before .notdef ? | 20:00 | |
jnthn | Good question. | 20:02 | |
ash__ | rakudo: my $a; say $a.^methods.map({ say $_; }); | 20:06 | |
p6eval | rakudo 3704a2: OUTPUT«WHERElistnotdefBUILDALLnewBoolsayprintdefinedREJECTSBUILDcloneWHICHCREATECapturePARROTblessWHENCE1111111111111111111» | ||
ash__ | is my 1111111111111111111 === to your blank? | ||
oh, um no, i see a \n\n in there, nevermind, thats not it | 20:07 | ||
PerlJam | ash__: those 1s are the return values from each say | ||
ash__ | still, 1111111111111111111 is an odd result | ||
doh | |||
yup, i see that now | |||
20:08
hercynium left
|
|||
ash__ | rakudo: my $a; $a.^methods.map({ say $_; }); | 20:09 | |
p6eval | rakudo 3704a2: ( no output ) | ||
ash__ | why does that give no output? | ||
is it being lazy? | |||
PerlJam | rakudo: my $a; $a.^methods.map({ say $_; }); say "hi"; | 20:10 | |
p6eval | rakudo 3704a2: OUTPUT«hi» | ||
PerlJam | rakudo: my $a; my @a = $a.^methods.map({ say $_; }); say "hi"; | ||
p6eval | rakudo 3704a2: OUTPUT«notdefBUILDALLnewBoolsayprintdefinedBUILDREJECTScloneWHICHCREATECapturePARROTblessWHENCEWHERElisthi» | ||
PerlJam | ash__: I'm not sure if it has something to do with being in sink context, but that coupled with laziness is probably it. | 20:11 | |
mathw | okay | ||
food is eaten | |||
just re-gathering my thoughts | |||
ash__ | how would one make that not-lazy? eager()? | 20:12 | |
PerlJam | rakudo: my $a; eager $a.^methods.map({ say $_; }); say "hi"; | ||
p6eval | rakudo 3704a2: OUTPUT«WHICHCREATECapturePARROTblessWHENCEWHERElistnotdefBUILDALLnewBoolprintsaydefinedBUILDREJECTSclonehi» | ||
PerlJam | rakudo: sub foo (*@_) { }; my $a; foo $a.^methods.map({ say $_; }); say "hi"; | 20:13 | |
p6eval | rakudo 3704a2: OUTPUT«blessWHENCEWHERElistnotdefBUILDALLnewBoolsayprintdefinedBUILDREJECTScloneWHICHCREATECapturePARROThi» | ||
PerlJam | rakudo: my $a; @($a.^methods.map({ say $_; })); say "hi"; | ||
p6eval | rakudo 3704a2: OUTPUT«hi» | ||
PerlJam | rakudo: my $a; ($a.^methods.map({ say $_; })); say "hi"; | ||
p6eval | rakudo 3704a2: OUTPUT«hi» | ||
mathw | ah | 20:14 | |
it looks like my ACCEPTS works | |||
there's something else wrong with the test case which triggered me to add it | |||
no there isn't | 20:15 | ||
I'm misreading | |||
this is another problem, with the next case | |||
woo | |||
ash__ | rakudo: my $a; eager($a.^methods.map({ say $_. })) | ||
p6eval | rakudo 3704a2: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)» | ||
ash__ | eager() works | ||
oops | |||
rakudo: my $a; eager($a.^methods.map({ say $_ })) | 20:16 | ||
p6eval | rakudo 3704a2: OUTPUT«BUILDALLnewBoolsayprintdefinedREJECTSBUILDcloneWHICHCREATECapturePARROTblessWHENCEWHERElistnotdef» | ||
PerlJam | rakudo: my $a; for $a.^methods { say $_ } | ||
p6eval | rakudo 3704a2: OUTPUT«notdefBUILDALLnewBoolprintsaydefinedBUILDREJECTScloneWHICHCREATECapturePARROTblessWHENCEWHERElist» | ||
PerlJam | huh. | 20:17 | |
I don't see the extra empty one in that list (using the for loop) | |||
rakudo: my $a; for $a.^methods { say "<<$_>>" } | 20:18 | ||
p6eval | rakudo 3704a2: OUTPUT«<<BUILDALL>><<new>><<Bool>><<say>><<print>><<defined>><<REJECTS>><<BUILD>><<clone>><<WHICH>><<CREATE>><<Capture>><<PARROT>><<bless>><<WHENCE>><<WHERE>><<list>><<>><<notdef>>» | ||
20:18
hercynium joined
|
|||
ash__ | it was first | 20:18 | |
PerlJam | oh, it was at the beginning the first time | ||
rakudo: my $a; say $a.WHAT; | 20:19 | ||
p6eval | rakudo 3704a2: OUTPUT«Mu()» | ||
PerlJam | rakudo: my $a; say $a."WHAT"; | ||
p6eval | rakudo 3704a2: OUTPUT«Quoted method name requires parenthesized arguments at line 11, near ";"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
20:19
vamped joined
|
|||
PerlJam | rakudo: my $a; say $a."WHAT"(); | 20:19 | |
p6eval | rakudo 3704a2: OUTPUT«Mu()» | ||
PerlJam | rakudo: my $a; say $a.""(); | ||
p6eval | rakudo 3704a2: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | ||
mathw | github.com/mattw/rakudo/commit/3b52...a3373a1e2a <- trivial, really. Next problem... | ||
PerlJam | rakudo: my $a; say $a(); | ||
p6eval | rakudo 3704a2: OUTPUT«invoke() not implemented in class 'Mu'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
PerlJam | btw, rakudo++ for some awesome error messages | 20:20 | |
sometimes they make up for the LTA ones | 20:21 | ||
20:21
coke joined
|
|||
mathw | okay I'm not sure about this test | 20:21 | |
coke | Hey, the rakudo notice that just hit my inbox says it requires parrot 2.1.0 | ||
mathw | ok(Mu ~~ 0); | ||
that's what's making rakudo complain about the use of a type object as a value | 20:22 | ||
I'm not sure what the purpose of this test is | |||
PerlJam | rakudo: Mu ~~ 0 | ||
p6eval | rakudo 3704a2: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | ||
PerlJam | rakudo: Mu() ~~ 0 | ||
p6eval | rakudo 3704a2: OUTPUT«Could not find non-existent sub &Mucurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
PerlJam | rakudo: my $a; $a ~~ 0 | ||
p6eval | rakudo 3704a2: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | ||
coke | mberends: ping. | 20:23 | |
mathw looks at Int.ACCEPTS | |||
mberends | coke: pong | ||
coke | mberends: did you send out the latest release notice on rakudo ? | 20:24 | |
mathw | rakudo: my $a; $a == 0; | ||
p6eval | rakudo 3704a2: OUTPUT«No applicable candidates found to dispatch to for 'infix:<==>'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
20:24
iblechbot joined
|
|||
coke | (just making sure you is he. =-) | 20:24 | |
20:24
justatheory left
|
|||
mberends | coke: I sent emails to p6a etc, but only some have arrived :-/ | 20:25 | |
coke | mberends: I just got one. | ||
mberends | hmm, moritz_++ also tried to send some more | ||
coke | mberends: you say it requires 2.1.0 - we cut 2.1.1 just for you guys to fix the memory leak that was identified in here yesterday. | ||
so if anyone tries to run rakudo agains the 2.1.0 release and not 2.1.1 or trunk, it's probably going to be less than awesome. | |||
Not sure if you want to put out an addendum, or just deal with it if anyone asks, but I wanted to let you know. | 20:26 | ||
20:26
cosimo left
|
|||
mberends | coke: sorry, afk for dinner, talk in 45 mins? | 20:26 | |
20:26
cosimo joined
|
|||
coke | I'm done. just an FYI. enjoy your dinner! | 20:26 | |
(curses, now I want food!) | 20:27 | ||
jnthn | D'oh, the release announcement shoulda mentioned 2.1.1... | 20:38 | |
20:39
colomon left
|
|||
mathw | jnthn: the next test I've got that fails tries to do Mu ~~ 0. This seems odd. | 20:39 | |
jnthn | mathw: Mu == 0 is also problematic. | 20:40 | |
mathw | yes | ||
rakudo: Mu == 0 | |||
p6eval | rakudo 3704a2: OUTPUT«No applicable candidates found to dispatch to for 'infix:<==>'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
jnthn | Right. | ||
ash__ | undef was the old Mu? sorta... so, isn't that like saying my $a; $a ~~ 0? that seems like a valid test, IMO | 20:41 | |
mathw | rakudo: Mu ~~ 0 | ||
p6eval | rakudo 3704a2: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | ||
jnthn | ash__: Yes | ||
PerlJam | rakudo: 0 ~~ Mu | ||
mathw | rakudo: my $a; $a ~~ 0 | ||
jnthn | I agree it should give True | ||
p6eval | rakudo 3704a2: ( no output ) | ||
rakudo 3704a2: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | |||
ash__ | rakudo: Mu ~~ Mu; | ||
p6eval | rakudo 3704a2: ( no output ) | ||
jnthn | I wonder if the answer is to define like | ||
mathw | Out of experimentation, I moved Int.ACCEPTS from PIR to Perl 6, and it swaps over to the 'no applicable candidates' message for infix:<==> | 20:42 | |
PerlJam | What question is Mu ~~ 0 asking? | ||
mathw | I don't know | 20:43 | |
other than that presmuably after my $a, $a contains Mu, and if you numify Mu maybe you get 0 so it should be true by that logic | 20:44 | ||
jnthn | our multi infix:<==>(Mu $a where .notdef, $b) { 0 == $b } # or some such | ||
Essentially, the problem is... | |||
our multi infix:<==>($a, $b) { ... } won't accept Mu as a parameter. | |||
before undef ~~ Any, so it all worked out | |||
mathw | Please don't say we have to add Mu overloads | ||
jnthn | mathw: Yeah, but it's infix:<==> that numifies. | ||
mathw: Well, yeah, I thought that seemed...oddish too. | 20:45 | ||
mathw | I suppose we do have to teach it what to do with Mu | ||
jnthn | Well, undefineds generally | ||
oh, no, most of them are handled already | |||
rakudo: our multi infix:<==>(Mu $a where .notdef, $b) { 0 == $b }; my $a; say $a == 1; say $a == 0; | 20:46 | ||
p6eval | rakudo 3704a2: OUTPUT«01» | ||
PerlJam | rakudo: say Mu.^parents | 20:47 | |
p6eval | rakudo 3704a2: OUTPUT«» | ||
PerlJam | rakudo: say Any.^parents | ||
p6eval | rakudo 3704a2: OUTPUT«Mu()» | ||
mathw | jnthn: that simple? | ||
PerlJam | the smart-match table in S03 is written in terms of Any, and doesn't mention Mu | 20:48 | |
ash__ | that sounds like it needs updating, IMO... since Mu is kinda important, does it mention undef? | ||
20:49
andy1 joined
|
|||
jnthn | ash__: Well, that's the problem | 20:49 | |
20:49
SmokeMachine left
|
|||
jnthn | Mu !~~ Any, whereas the old undef ~~ Any | 20:49 | |
So we never got into this kind of problem before. | |||
I know we can multi our way out of the situation. :-) | 20:50 | ||
But that feels slightly...inelegant. | |||
ash__ | yeah | ||
maybe some of the Any functionality should have fallbacks for when you get passed a Mu | |||
or maybe Mu should be converted to an Any? /shrug | |||
PerlJam | rakudo: my $a; say Any ~~ $a; | 20:51 | |
ash__ | or add some other definitions for Mu cases | ||
p6eval | rakudo 3704a2: OUTPUT«1» | ||
mathw | jnthn: is there any particular reason why Int's ACCEPTS is defined in PIR? | ||
PerlJam | rakudo: say Any ~~ Mu; | 20:52 | |
p6eval | rakudo 3704a2: OUTPUT«1» | ||
mathw | aargh | ||
head asplode | |||
clearly I need sleep, not Perl | 20:53 | ||
jnthn | mathw: Not that I know of. | ||
PerlJam | rakudo: class X { }; say Mu ~~ X(); | ||
p6eval | rakudo 3704a2: OUTPUT«Could not find non-existent sub &Xcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
mathw | I will come back to rakudo tomorrow | ||
PerlJam | rakudo: class X { }; say Mu ~~ X; | ||
mathw | when I'm awake | ||
p6eval | rakudo 3704a2: OUTPUT«0» | ||
mathw | and maybe pick something less mind-bending to work on :) | ||
PerlJam | I'm thinking that Mu ~~ * should always be false unless it's Mu ~~ Mu | 20:54 | |
mathw | the change I did make is here: github.com/mattw/rakudo/commit/3b52...a3373a1e2a which adds Rat.ACCEPTS. not spectested. | ||
mathw -> blessed sleep | |||
jnthn | night, mathw | 20:56 | |
21:00
macae left
|
|||
PerlJam | rakudo: sub foo { }; say &foo.arity; say &foo.count; | 21:00 | |
p6eval | rakudo 3704a2: OUTPUT«00» | ||
PerlJam | rakudo: sub foo ($,$,$) { }; say &foo.arity; say &foo.count; | 21:01 | |
p6eval | rakudo 3704a2: OUTPUT«33» | ||
PerlJam | rakudo: sub foo ($,$,$?) { }; say &foo.arity; say &foo.count; | ||
p6eval | rakudo 3704a2: OUTPUT«33» | ||
PerlJam | rakudo: sub foo ($,$ = 2,$ = 3) { }; say &foo.arity; say &foo.count; | ||
p6eval | rakudo 3704a2: OUTPUT«13» | ||
PerlJam | rakudo: sub foo ($,$? = 2,$? = 3) { }; say &foo.arity; say &foo.count; | ||
p6eval | rakudo 3704a2: OUTPUT«13» | ||
PerlJam | rakudo: sub foo ($,$?,$? = 3) { }; say &foo.arity; say &foo.count; | 21:02 | |
p6eval | rakudo 3704a2: OUTPUT«23» | ||
jnthn | PerlJam: $? is perhaps getting swalled by the twigil rule, though I suspect wrongly... | ||
PerlJam | yeah, I wasn't sure. | ||
rakudo: sub foo ($a,$b?,$c? = 3) { }; say &foo.arity; say &foo.count; | 21:03 | ||
p6eval | rakudo 3704a2: OUTPUT«13» | ||
jnthn | rakudo: sub foo ($,$,$?) { }; say &foo.arity; say &foo.count; | ||
p6eval | rakudo 3704a2: OUTPUT«33» | ||
jnthn | rakudo: sub foo ($,$,$? ) { }; say &foo.arity; say &foo.count; | 21:04 | |
p6eval | rakudo 3704a2: OUTPUT«33» | ||
PerlJam | should be easyish to fix though. | ||
jnthn | token twigil:sym<?> { <sym> } | ||
Hmm | |||
Maybe that one wants a <?before \w> | |||
Like some of the other twigil tokens. | |||
TimToady: See ^ | |||
PerlJam | add something like <before: <ident> > for twigils (I don't remember the exact syntax) | 21:05 | |
jnthn | Well, STD does it for some twigils. | ||
But not all of them. | 21:06 | ||
I'd rather check if it's an oversight or deliberate that ? wasn't given such a thing. | |||
PerlJam | ah, I see that. | ||
jnthn | But yes, in theory it'll fix it. | ||
PerlJam | whoa ... what's <!!worry ...> ? | 21:07 | |
ash__ | what exactly is the point of ? in a parameter? like, sub foo($a!) {}; vs sub foo($a) { }; if i call it with no parameters it gives an error either way... | ||
err s/?/!/ | |||
21:08
clsn joined
|
|||
PerlJam | ah ... S05++ I need to absorb the spec a little more. | 21:10 | |
clsn | Having a weird experience with rakudo lately. Even with new rebuilt parrot and all rebuilt, the simple script 'token xx { "x" } say ("x" ~~ /<xx>/);' gives me an error. | ||
jnthn | Makes it optional... | ||
clsn | Anything with named regexps I think, though not the builtin ones. | 21:11 | |
jnthn | clsn: Hi! :-) Did you just grab the latest release or are you working from a git clone? | 21:12 | |
TimToady | testing a twigil fix that generalizes \w to all twigils | ||
clsn | git clone. | ||
jnthn | clsn: Basically though, a branch landed recently that has caused various regressions. | ||
clsn: In the meantime, you may wish to switch to the "alpha" branch while the fallout gets cleared up. :-) | 21:13 | ||
21:13
snarkyboojum joined
|
|||
clsn | OK, thanks. I was worried somethng really inexplicable was wrong with my system if nobody else heard of this... | 21:13 | |
21:14
wknight8111 joined
|
|||
jnthn | clsn: No, nothings "wrong" as such - just that a big bunch of internals changes landed and we're still putting various bits back together again. | 21:14 | |
TimToady | PerlJam: <!! is just like <? except that negative lookaheads aren't counting in LTM | ||
so it takes the LTM from after it | |||
clsn | jnthn: Is the alpha branch not in git? git branch isn't showing it after pull. | ||
jnthn | clsn: I wrote a blog post about it here, if you like: use.perl.org/~JonathanWorthington/journal/40190 | ||
TimToady | whereas <? steals the LTM baton and doesn't use anything after | 21:15 | |
jnthn | clsn: Ah, you may need to git checkout origin/alpha | ||
clsn | Oh, great, I am curious as to *what* happened too. | ||
OK, thanks again! | |||
PerlJam | TimToady: yeah, I got that from S05. TimToady++ for writing this stuff down :) | ||
jnthn is not a git wizz kid :-) | |||
clsn | Me either; we'll fake it. | ||
pugs_svn | r29781 | lwall++ | [STD] generalize \w lookahead to all twigils | 21:17 | |
cognominal | yea, jnthn is a wizz kid in everything programmatic. | 21:19 | |
ash__ | jnthn, i was asking about '!' which makes parameters required, but whats the difference between foo($a) vs foo($a!) | ||
cognominal | jnthn++ for the last blog entry | ||
ash__ | in both cases if you say foo(); it gives an error | 21:20 | |
pmichaud | I see no real problem with the 2.1.1 versus 2.1.0 note in the announcement | 21:21 | |
rakudo will work with either one | |||
jnthn | ash__: none | ||
ash__: It's useful on nameds | 21:22 | ||
ash__: Which are optional by default. | |||
pmichaud | with 2.1.0 it will not be quite as nice as 2.1.1, but it will still generally work | ||
jnthn | ash__: On positionals it's pretty pointless. | ||
mberends | pmichaud: coke++'s point is just that the performance would be a bit less | ||
ash__ | okay, so, it does make a difference with named params, that makes sense | ||
chromatic | We yanked 2.1.0, so people will have to get 2.1.1. | ||
mberends | ok, that solves it too | 21:23 | |
jnthn | pmichaud: Sure, but Parrot folks cut 2.1.1 so things would be less sucky. :-) | ||
ash__: ? is thus kinda useless on nameds. :-) | |||
ash__ | but not on positional | ||
jnthn | Right. | ||
PerlJam | It wouldn't hurt for someone to reply to the announcement with that information. | ||
pmichaud | jnthn: sure, I understand that. But someone using --gen-parrot will end up with something that says "2.1.0", and it's also good if we can avoid the confusion | 21:24 | |
jnthn | pmichaud: Ah, I see. | ||
mberends | pmichaud: --gen-parrot gets r44147, which is 2.1.1 in all but name... | ||
chromatic | I didn't think of that, but it makes sense. | 21:25 | |
coke | 2.1.0 is gone? | ||
pmichaud | mberends: agreed, 2.1.1 in all but name. but someone looking at --parrot-version will see 2.1.0 | 21:26 | |
pmichaud@plum:~/rakudo/parrot$ svn info | grep Revision | |||
Revision: 44147 | |||
pmichaud@plum:~/rakudo/parrot$ ./parrot --version | |||
This is Parrot version 2.1.0-devel built for amd64-linux. | |||
mberends | I'm sorry for the confusion I've caused | ||
pmichaud | there's just not a perfectly clean answer for this issue | ||
suppose that we had detected the memory leak _after_ the rakudo release? what would we have done then? ;-) | |||
coke | trunk can be updated with the new number, if that helps. | 21:27 | |
pmichaud | we'd end up with what we have now -- a rakudo release targeting 2.1.0 | ||
coke | I have an nqp question. ok for here? | ||
pmichaud | except that it's svn number would end up pointing to a trunk version that doesn't have the leak fix, which would be less awesome than what we do have | ||
coke: yes | |||
coke | want a global in my module. can I do INIT { our $foo := 2;} and have the $foo available elsewhere in the module? | 21:28 | |
do I have to separate the $our outside of the INITI and the := 2 inside for that to work? | |||
(that /seems/ to DWIM.) | 21:29 | ||
PerlJam | coke: our outside the INIT | ||
pmichaud | our $foo; INIT { $foo := 2 }; # I think | 21:32 | |
clsn | Rebuilt, doesn't fail the same, but an odd error maybe. perl6 -e 'token xx { "x" } ; say "x" ~~ m/x/;' and the error is Confused at line 1, near "x\" ~~ m/x/"; that backslash looks strange. | ||
pmichaud | with "our" inside of the braces it limits the scope of the declaration to the INIT block | 21:33 | |
coke | pmichaud, PerlJam: excellent. now If I can just figure out how to say "this variable is really an int..." | ||
pmichaud | coke: int as in Integer PMC or as in I register? | ||
PerlJam | coke: why do you want to say "this var is an int"? | 21:34 | |
21:34
dalek joined,
ruoso left
|
|||
coke | I register. | 21:34 | |
PerlJam: trying to keep it as close to the original PIR as possible. | |||
21:35
ewilhelm_ joined
|
|||
PerlJam | coke: luckily you can use PIR in NQP :) | 21:35 | |
21:35
ewilhelm left
|
|||
pmichaud | coke: welcome to my pain -- Parrot doesn't allow lexicals to refer to registers. | 21:35 | |
coke: welcome to my pain -- Parrot doesn't allow lexicals to refer to anything but PMCs. | |||
I'm working on ways to make local declarations that might do that for specific block situations... but there's no general solution in Parrot for it. | 21:36 | ||
in the specific example you give, there'd be almost no way to tie a package-scoped variable to a register. | |||
coke | ok. might be to nest a lot of pir::opcodes to get this. Makes it a terrible example to convert to NQP. =-) | 21:37 | |
pmichaud | could be, yes. You can also still do Q:PIR for long blocks of PIR | ||
coke | ... this is so short, not worth converting then. | ||
(parrot's Math/Rand) | 21:38 | ||
PerlJam would probably opt for Q:PIR in Coke's case | |||
coke | PerlJam: the PIR itself is already so small, wrapping it in NQP be silly at that point. | 21:41 | |
"would be" | |||
I'll pick a larger, non-math related sample to hack on. | |||
21:43
dalek left
21:44
dalek joined
21:47
ignacio_ left
|
|||
chromatic | I have some ideas on how to make lexicals refer to primitives. | 21:48 | |
How much does Rakudo benefit from that? | |||
jnthn | May be a win. | 21:49 | |
Though probably not for anything we implemented yet. | |||
pmichaud | it'd be much bigger benefit for NQP than for Rakudo | ||
jnthn | pmichaud: That's true... | ||
pmichaud | Rakudo's types are pretty heavily tied up in PMCs -- they have to be, because so much of Perl 6 is method-based | 21:50 | |
jnthn | pmichaud: Int can't go in an I register, but int can. | ||
pmichaud | but NQP wants to be able to emulate the vm, and not having a way to declare register types as lexicals (or access non-pmc registers from nested lexical scopes) really limits their utility | ||
jnthn: sure, but can you keep track of type constraints and rw-ness? | 21:51 | ||
TimToady | ash__: dunno if anyone answered this, but sink context is eager | ||
pmichaud | anyway, I stand corrected -- Rakudo as it stands today can't make much use of them, but they're absolutely needed for us to be able to do much with native types in Perl 6. :) | ||
jnthn | pmichaud: It's probably the same machinary we'd need to handle auto-boxing. | ||
pmichaud: Perhaps. | 21:52 | ||
pmichaud: I didn't work out a detailed implementation plan. | |||
pmichaud | jnthn: right, I agree. | ||
Anyway, lexicals as native registers would be a great benefit to NQP and nqp authors. | |||
TimToady | ash__: that is, it's *specced* to be eager | ||
21:53
hatseflats left,
hatseflats joined
|
|||
PerlJam | rakudo: my $a; $a.^methods.map({ .say }); | 21:53 | |
p6eval | rakudo 3704a2: ( no output ) | ||
PerlJam | TimToady: so that should output all of the methods? | ||
jnthn | pmichaud: Though my intuition is that other register types as lexicals will (a) certainly help NQP, which in turn helps Rakudo since parts of it are written in NQP and (b) stands a change of being useful for doing lowercase types in Perl 6. | ||
s/change/chance/ | 21:54 | ||
pmichaud | jnthn: agreed. | ||
TimToady | PerlJam: yes, in theory, though maybe sink needs to be strictly eager | ||
pmichaud | sink is on my list of rsn things to implement | ||
jnthn | pmichaud: The overall plan for the lowercased types needs to include how object attributes work out too. | 21:55 | |
ash__ | what makes something 'sink context'? | ||
pmichaud | jnthn: I agree. Not sure what that will look like. | 21:56 | |
jnthn | pmichaud: Terrifying. | ||
:-D | |||
TimToady | ash__: being a non-final statement, for one | 21:57 | |
rakudo: my $a; $a.^method.map({ .say }); 42; | |||
p6eval | rakudo 3704a2: OUTPUT«Method 'method' not found for invocant of class 'ClassHOW'current instr.: '!dispatch_.^' pc 410 (src/glue/dispatch.pir:100)» | ||
TimToady | rakudo: my $a = 2; $a.^method.map({ .say }); 42; | ||
p6eval | rakudo 3704a2: OUTPUT«Method 'method' not found for invocant of class 'ClassHOW'current instr.: '!dispatch_.^' pc 410 (src/glue/dispatch.pir:100)» | ||
pmichaud | rakudo doesn't have sink context at all yet. It needs a good way to detect the non-final statements. :) | ||
TimToady | rakudo: my $a = 2; $a.^methods.map({ .say }); 42; | ||
p6eval | rakudo 3704a2: OUTPUT«maximum recursion depth exceededcurrent instr.: 'perl6;Seq;!fill' pc 13548 (src/builtins/Routine.pir:21)» | 21:58 | |
pmichaud | the current "fix" is to explicitly request eager, atm | ||
TimToady | O_o | ||
pmichaud | rakudo: my $a = 2; eager $a.^methods.map({ .say }); | ||
p6eval | rakudo 3704a2: OUTPUT«maximum recursion depth exceeded» | ||
TimToady | rakudo: my $a = 2; sink $a.^methods.map({ .say }); | ||
pmichaud | ....which appears to point to a different problem :) | ||
p6eval | rakudo 3704a2: ( no output ) | ||
PerlJam | 2 bugs in one! :) | 21:59 | |
pmichaud | rakudo: my $a = 2; sink $a; | ||
p6eval | rakudo 3704a2: OUTPUT«Could not find non-existent sub &sinkcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
pmichaud | Right. | ||
21:54 <pmichaud> sink is on my list of rsn things to implement | |||
TimToady | rakudo: my $a = 2; gather $a.^methods.map({ .say }); | ||
p6eval | rakudo 3704a2: ( no output ) | ||
TimToady | gather is also supposed to be void inside | 22:00 | |
PerlJam | rakudo: my $a = 2; say $a.^methods | ||
p6eval | rakudo 3704a2: OUTPUT«maximum recursion depth exceededcurrent instr.: 'perl6;Seq;!fill' pc 13548 (src/builtins/Routine.pir:21)» | ||
PerlJam | rakudo: my $a; say $a.^methods | ||
p6eval | rakudo 3704a2: OUTPUT«REJECTSBUILDcloneWHICHCREATECapturePARROTblessWHENCEWHERElistnotdefBUILDALLnewBoolsayprintdefined» | ||
pmichaud | I'm guessing an issue with .^methods | ||
on Int | |||
PerlJam | rakudo: my $a = 2; say $a.WHAT | ||
p6eval | rakudo 3704a2: OUTPUT«Int()» | ||
TimToady | .WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT.... | ||
ash__ | rakudo: my $a = 1; say $a.^methods(:local); | 22:01 | |
p6eval | rakudo 3704a2: OUTPUT«secACCEPTSRatIntpredBoolsuccNumsignperlWHICHabsComplexStr» | ||
pmichaud | rakudo: my $a = '2'; say $a.^methods | ||
p6eval | rakudo 3704a2: OUTPUT«maximum recursion depth exceededcurrent instr.: 'perl6;Seq;!fill' pc 13548 (src/builtins/Routine.pir:21)» | ||
TimToady | hmm, parent trap? | ||
pmichaud | likely. | ||
PerlJam | I bet Rats, Bools, Complex, and Nums do it too :) | 22:02 | |
my $a = 3.14; say $a.^methods; | |||
TimToady | I smell a Bool! | ||
( no output ) | |||
PerlJam | rakudo: my $a = 3.14; say $a.^methods; | 22:03 | |
TimToady | ( no input either ) | ||
p6eval | rakudo 3704a2: ( no output ) | ||
pmichaud looks forward to has Complex $oedipus; | |||
PerlJam | rakudo: my $a = Bool::True; say $a.^methods; | ||
p6eval | rakudo 3704a2: OUTPUT«maximum recursion depth exceededcurrent instr.: 'perl6;Seq;!fill' pc 13548 (src/builtins/Routine.pir:21)» | ||
TimToady | BTW, parent of Rat should be Cool rather than Any | ||
PerlJam | rakudo: my $a = 4i; say $a.^methods; | ||
p6eval | rakudo 3704a2: ( no output ) | 22:04 | |
jnthn | rakudo: my $a = 2; say $a.^methods(:local) | ||
p6eval | rakudo 3704a2: OUTPUT«secACCEPTSRatIntpredBoolsuccNumsignperlWHICHabsComplexStr» | ||
jnthn | rakudo: my $a = 2; say $a.^parents | ||
p6eval | rakudo 3704a2: OUTPUT«» | ||
TimToady | rakudo: say 2.WHAT.WHAT | ||
p6eval | rakudo 3704a2: OUTPUT«Int()» | ||
jnthn | oh wtf | ||
TimToady | rakudo: say 2.WHAT.WHAT.WHAT | ||
p6eval | rakudo 3704a2: OUTPUT«Int()» | ||
jnthn | TimToady: my $a = 2; say $a.PARROT | ||
er | |||
rakudo: my $a = 2; say $a.PARROT | |||
PerlJam | rakudo: say 3.14.WHAT.WHAT | ||
p6eval | rakudo 3704a2: OUTPUT«Integer» | 22:05 | |
rakudo 3704a2: OUTPUT«Rat()» | |||
jnthn | .oO( must not use TimToady as an evalbot ) |
||
TimToady | ( no output ) | ||
PerlJam | jnthn: why does .PARROT matter? | ||
jnthn | PerlJam: 'cus it tells you what the thing *really* is. | 22:06 | |
PerlJam: And also probably gives me a clue on how to fix the bug. | |||
pmichaud | btw, it's PARROT($foo) now instead of $foo.PARROT | ||
PerlJam | .^methods "delegates" to the .PARROTy thing? | ||
jnthn | pmichaud: Huh? Both work, no? | ||
pmichaud | because the .PARROT form doesn't let you see any intermediate ObjectRefs | ||
jnthn | PerlJam: No | ||
PerlJam: Oh | |||
pmichaud | (because they get dereferenced as part of the method call...) | ||
jnthn | gah, tab complete | ||
pmichaud: Oh, good point. | |||
PerlJam: The problem is that it goes and finds the Parrot Integer PMC's PMCProxy rather than Perl 6's Int class. | 22:07 | ||
22:08
cls_bsd_ joined
|
|||
PerlJam | rakudo: my $a = 3.14; say $a.PARROT | 22:08 | |
p6eval | rakudo 3704a2: OUTPUT«Rat» | ||
PerlJam | and it doesn't do that for Rats because ... ? | 22:09 | |
they happen to have the same name? | |||
pmichaud | that used to not be the case, but now it is :) | ||
my $a = 5; say $a.PARROT; say PARROT($a); | |||
rakudo: my $a = 5; say $a.PARROT; say PARROT($a); | |||
rakudo: my $a = 5; say $a; | |||
ENOP6EVAL? | |||
P6EVAL hateses mee? | |||
rakudo: say 'hello'; | |||
:-( | |||
p6eval | rakudo 3704a2: OUTPUT«IntegerPerl6Scalar->Integer» | ||
pmichaud | rakudo: my $a = 3.14; say $a.PARROT | ||
p6eval | rakudo 3704a2: OUTPUT«5» | ||
pmichaud | because there's no underlying Parrot type | ||
p6eval | rakudo 3704a2: OUTPUT«hello» | ||
rakudo 3704a2: OUTPUT«Rat» | |||
22:09
clsn left
|
|||
PerlJam | oh, so .PARROT lies when there's no underlying Parrot type? | 22:10 | |
pmichaud | no, it reports the actual Parrot type | ||
22:10
nbrown left,
rgrau left
|
|||
pmichaud | rakudo: my $a = 2; say Parrot($a); | 22:11 | |
PerlJam | rakudo: class X { } ; my $a = X.new; say $a.PARROT | ||
p6eval | rakudo 3704a2: OUTPUT«Could not find non-existent sub &Parrotcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
rakudo 3704a2: OUTPUT«X» | |||
ash__ | pmichaud: so, i am trying to figure out if its possible to implement nqp-rx's rx stuff with bison and flex... does that sound reasonable? just roughly speaking here, since you have already implemented it | ||
22:11
rgrau joined
|
|||
pmichaud | ash__: I'd be highly doubtful. | 22:11 | |
PerlJam | rakudo: class X { } ; my $a = X.new; say PARROT($a) | ||
p6eval | rakudo 3704a2: OUTPUT«Perl6Scalar->X» | ||
PerlJam | ah. | ||
22:11
dalek left
|
|||
pmichaud | rakudo: class X { } ; say PARROT(X.new); | 22:12 | |
p6eval | rakudo 3704a2: OUTPUT«X» | ||
ash__ | pmichaud: i have a grammar defined in bison with flex that handles most of nqp's cases i have found, its not doing any code gen, but its parsing somewhat correctly | ||
pmichaud | ash__: are you able to parse nqp's grammar? | 22:13 | |
22:13
dalek joined
|
|||
ash__ | no, not yet, if i see a grammar ID { } i just ignore whats between { } for now | 22:13 | |
pmichaud | ash__: well, nqp-rx's rx engine is based on its own grammar | 22:14 | |
so, you'd need to be able to parse that :-) | |||
ash__ | yeah, i know | ||
i am trying to figure out how to write something that parses it | 22:15 | ||
pmichaud | anyway, I'm doubtful of implementing rx with bison and flex... but that may be insufficient imagination on my part. | ||
ash__ | i might just pull the contents out as a string | 22:16 | |
pmichaud | there's a reason I didn't head down that path in the first place :) | ||
ash__ | and make a custom parser to do the actual parsing of a regex | ||
i can parse github.com/ashgti/nq-nqp-rx/blob/ma...basics.nqp file successfully, but its technically ignoring the stuff in token abc { } between the { } | 22:17 | ||
PerlJam | ash__: so ... you'd be using bison/flex for what exactly? ;) | ||
ash__ | learning | ||
22:17
ggoebel joined
|
|||
pmichaud | ash__: my mental model has always been that you start by parsing regexes first, and then build everything on top of that -- not the other way around :) | 22:17 | |
ash__ | i have a class on compilers, and i wanted to learn how its been done in the past | ||
22:17
payload left
|
|||
ash__ | so yacc/lex | 22:17 | |
PerlJam | ash__: you could write a version of NQP in C. That would be interesting. | 22:18 | |
ash__ | well, it parses most of nqp now, it just doesn't make any code for it | ||
my plan is to have it gen code eventually, i just want to get the grammar right | |||
my biggest hurdle right now is the stuff between a { } in a token | 22:19 | ||
pmichaud | right | ||
ash__ | which is to say, a lot | ||
pmichaud | my point is that the nqp grammar is really a bunch of regexes | ||
22:20
dalek left
|
|||
pmichaud | more to the point, nqp's codegen depends on having a regex parse tree to work from | 22:20 | |
ash__ | i guess its a chicken and the egg problem, i am trying to write something that can parse your grammar, but it needs to be able to parse regex's so... yup, kinda why i am asking you about this | ||
pmichaud | right | 22:21 | |
in my mind, parsing regexes is the place to start | |||
once you can parse regexes, building the rest of the grammar is really quite simple | |||
22:22
dalek joined
|
|||
pmichaud | you can write something that parses everything but regexes, but then you're still left with the problem of "how do I parse a regex"? | 22:22 | |
TimToady | I don't think Mu needs to numify | ||
PerlJam | rakudo: Int.^methods.join(' ').say | ||
p6eval | rakudo 3704a2: ( no output ) | ||
TimToady | most of the failures we return ought to be derived from Failure or some such derived type | ||
PerlJam | rakudo: Int.^methods.join(' ').say; say "hi"; | ||
jnthn | TimToady: Should Mu == 0 fail? | ||
p6eval | rakudo 3704a2: OUTPUT«maximum recursion depth exceededcurrent instr.: 'perl6;Seq;!fill' pc 13548 (src/builtins/Routine.pir:21)» | ||
PerlJam | rakudo: my $a; $a.^methods.join(' ').say; say "hi"; | 22:23 | |
TimToady | it's probably okay if it does | ||
p6eval | rakudo 3704a2: OUTPUT«WHICH CREATE Capture PARROT bless WHENCE WHERE list notdef BUILDALL new Bool print say defined BUILD REJECTS clonehi» | ||
PerlJam | rakudo: my $a; $a.^methods.sort.join(' ').say; say "hi"; | ||
p6eval | rakudo 3704a2: OUTPUT«Method 'sort' not found for invocant of class 'Array'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
jnthn | TimToady: so this is OK: | ||
pmichaud | I think that Mu == 0 ought to give a "use of uninitialized..." or something | ||
jnthn | rakudo: my $a; say $a == 0; | ||
p6eval | rakudo 3704a2: OUTPUT«No applicable candidates found to dispatch to for 'infix:<==>'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
ash__ | alpha: my $a; say $a == 0; | ||
TimToady | maybe variables should default to Any | ||
p6eval | alpha 30e0ed: OUTPUT«Use of uninitialized value1» | ||
pmichaud | Mu is basically our "undef". | 22:24 | |
TimToady | and you have to declare if you want to store a junction or a Mu | ||
jnthn | pmichaud: The problem is that we fail the dispatch to == | ||
TimToady: Maybe. ;-) | |||
TimToady: That would magic away that problem. | |||
TimToady: Trying to think of others it might make... | |||
pmichaud | jnthn: we fail the dispatch to == ? | ||
why? | |||
jnthn | TimToady: Though none immediately come to mind. | 22:25 | |
pmichaud | oh, because == expects Any? | ||
or ...? | |||
jnthn | pmichaud: sure | ||
pmichaud: multi infix:<==>($a, $b) { } | |||
pmichaud | we got away with it before because we weren't multidispatching operators? | ||
jnthn | Default parameter types are Any | ||
TimToady | in fact, there was speculation several years ago that we shouldn't allow assignment of junctions to variable by default | 22:26 | |
pmichaud | jnthn: right. | ||
jnthn: got it. | |||
TimToady | so maybe variables should default to Any as well | ||
jnthn | pmichaud: No, we got away with it before because Failure ~~ Any | ||
And undef ~~ Any | |||
pmichaud | in initial value, or type constraint? | 22:27 | |
chromatic | Why not Mu ~~ (anything) == Mu? | ||
jnthn | TimToady: Well, there's two things: what we initialize a variable to and whether we put a type constraint on it. | ||
pmichaud | jnthn: okay, makes sense. | ||
jnthn | We can do one and not the other. | ||
PerlJam | if vars default to Any, then I don't see a pressing need for a Mu entry in the S03 smart-match table. | ||
:) | |||
ash__ | are regular expressions something that can't be defined using a tool like yacc/bison? | 22:29 | |
jnthn tries to think what the fallout for chromatic's suggestion would be. | |||
Well, and how to do it... | |||
pmichaud | istr that suggestion coming up also | ||
(in the past at one point) | |||
PerlJam | rakudo: say ?Mu | ||
p6eval | rakudo 3704a2: OUTPUT«0» | ||
TimToady | I don't see how making Mu both bottom and top helps much of anything | ||
pmichaud | there was a discussion of Mu being simultaneously at the top and bottom of the hierarchy :) | 22:30 | |
TimToady | the bottom should be Um | ||
22:30
quietfanatic joined
|
|||
pmichaud | ummmmm.... maybe. | 22:30 | |
I could argue for nW | |||
jnthn | I kinda don't fancy that. | 22:31 | |
TimToady | Lu | ||
pmichaud wonders how many people have turned their monitors and/or heads 180 degrees :) | |||
TimToady | "least undefined" | ||
I can rotate things in my head okay | |||
pmichaud | well, fwiw, alpha essentially was doing the equivalent of initializing variables to Any | 22:32 | |
TimToady | was always fast on the spactial reasoning tests | ||
pmichaud | it just called it "Failure" :) | ||
TimToady | spatial even | ||
pmichaud | (note: initial value, not type constraint) | 22:33 | |
I'd think that initializing to Any would be a reasonable place for us to start and see what happens. | |||
TimToady | sounds good to me | ||
pmichaud | it's also fairly easy to do in rakudo :) | ||
jnthn | aye. | 22:34 | |
Maybe let's try that | |||
PerlJam | and Mu ~~ * is Bool::False? | ||
pmichaud | just change src/Perl6/Compiler.pir:34 to point to Any instead of Mu | 22:35 | |
actually, we need to do it after Any is created , though. | |||
so that setting might need to go into src/builtins/Any.pir | 22:36 | ||
22:36
lambdabot joined
22:37
Su-Shee left
|
|||
pmichaud | I'd leave Compiler.pir:34 as is, and then replace $!OBJECTREF with the Any protoobject when we get to Any.pir | 22:37 | |
(just in case any ObjectRefs get created before Any is established, which is a little later in the process) | |||
TimToady | whatever still match anything | 22:40 | |
matches | |||
ash__ | pmichaud: for nqp-rx did you make your own regular expression parser or did you use one that exists already? i think you made your own, right? | 22:41 | |
pmichaud | ash__: I started with PGE | ||
(and yes, I wrote PGE) | |||
ash__ | okay, got ya, i'll look at PGE too to try to understand what all you had to do to get it working | 22:42 | |
pmichaud | it's actually easier to look at nqp :) | ||
because now nqp parses itself. | |||
ash__ | but if your bootstrapping from scratch, you'd need a starting point, right? | 22:43 | |
pmichaud | what backend are you ultimately wanting to target? | ||
ash__ | for now, i was going to do the llvm, but that can change for sure | ||
pmichaud | ultimately you'll want/need things that can do object-oriented stuff | ||
because regular expression processing in Perl 6 (and NQP) is very method-oriented | 22:44 | ||
there might be other ways of doing it, though -- my focus/vision has become pretty narrow the past couple of months | 22:45 | ||
anyway, if I were starting a project, I'd probably find ways to port the existing nqp to other backends, rather than start from scratch :) | |||
jnthn | pmichaud: List/iterator question. | ||
pmichaud: If I have an iterator, what's the right way to get a Seq from it? | |||
pmichaud | that was the purpose of making nqp self-hosting, so that one could write the backend and use the existing parser/engine :) | ||
pugs_svn | r29782 | lwall++ | [S02,S09] default variables to Any, must declare Mu explicitly to hold junctions | ||
r29782 | (this is to reduce pressure to duplicate == and such with Mu arguments) | |||
r29782 | most of our failure values should be derived from Any in any case; | |||
r29782 | Mu is more indicative of a major malfunction now. | |||
jnthn | pmichaud: Or something that does Positional, or some such... | 22:46 | |
pmichaud | jnthn: I suspect it's $iter.Seq or Seq($iter) | ||
$iter.Seq works now. | |||
jnthn | Oh? | ||
OK. | |||
I just ran into an...issue when writing an example. | |||
pmichaud | there are lots of updates and fixes that need to be made to the iterator method hierarchy in rakudo | 22:47 | |
jnthn | *nod* | ||
pmichaud | I probably need to summarize the notes | ||
jnthn | pmichaud: Let me ask another one then. | ||
pmichaud: Is it correct that grep returns a GatherIterator? | |||
pmichaud | yes. | ||
jnthn | OK | ||
pmichaud | at least, it's not *incorrect* | ||
jnthn | :-) | ||
OK | |||
pmichaud | grep is lazy, so some form of iterator is warranted | ||
22:48
coke left
|
|||
jnthn | Right, my question was more if it should be packaged up into something. | 22:48 | |
pmichaud | probably | ||
getting iterator-as-list and iterator-as-item is still a bit tricky | |||
jnthn | *nod* | ||
pmichaud | so grep should be returning a GatherIterator in its "list form", not in its "item form" | 22:49 | |
but its "list form" needs to be non-flattening | |||
22:49
ash__ left
|
|||
jnthn | The problem I hit is a fairly weirdish one. | 22:49 | |
I'm doing That Cute Quicksort. | |||
multi quicksort([$pivot, *@values]) { quicksort(@values.grep({ $^n < $pivot })), $pivot, quicksort(@values.grep({ $^n >= $pivot })) | 22:50 | ||
} | |||
multi quicksort( () ) { () } | |||
gah, format fail | |||
And anyway, it wasn't producing a Capture properly for the sub-signature to look at. | |||
PerlJam | jnthn: are you going to use this to implement Array.sort? ;-) | ||
jnthn | Since it only knew what to do with a Seq (and Array) | ||
PerlJam: lol. | |||
PerlJam: Though no. :-) | 22:51 | ||
Quicksort = bad when input data sucks. | |||
22:51
xomas joined,
xomas left,
xomas joined
|
|||
pmichaud | jnthn: just for now, try a .Seq at the end of your greps and see what happens. | 22:52 | |
22:53
xomas left,
justatheory joined
|
|||
jnthn | pmichaud: That does it. | 22:54 | |
pmichaud | okay. It won't be that way long, though. | ||
this is a very useful datapoint :) | |||
we need to modify gather/take to return a list-thinking form of GatherIterator, or (perhaps more likely) GatherIterator needs to .Seq itself in item context | |||
and act like a list in other contexts | 22:55 | ||
anyway, this is a very useful example to consider/work from. | |||
22:55
masak joined
|
|||
masak | oh hai. | 22:55 | |
jnthn | Well, for now I can make it work with .Capture being made to lolitsmasak work on Iterator. | ||
pmichaud | I'm not sure that'd be right. | 22:56 | |
well, it'd be right if Capture honors the flattening rules. | |||
jnthn | Well | ||
masak | quick question: would @a[0, 2 ... *] DTRT and only return the even-indexed elements of @a, or would it (1) run forever, or (2) give me infinitely many Mu values at the end? | 22:57 | |
TimToady | Captures never flatten according to current spec | ||
masak | I guess @a[0, 2 ... +@a] would DTRT, now that I think about it. | ||
22:57
justatheory left
|
|||
pmichaud | TimToady: I mean what Capture does with an Iterator, not how a Capture itself acts in a flattening context. | 22:58 | |
jnthn | pmichaud: It's more about coercing to a Capture. | ||
pmichaud | jnthn: yes, that's my point | ||
the difference is | 22:59 | ||
($iter, 2, 3).Capture | |||
versus | |||
(@$iter, 2, 3).Capture | |||
jnthn | ah. | ||
pmichaud | you can't just flatten any ol $iter you see | ||
masak | next question: what's the safest way to generate all the odd numbers up to $N? | ||
TimToady | same thing, I think | ||
pmichaud guesses 1, *+2, ... $N | 23:00 | ||
masak | pmichaud: ah, *+2 is nice. | ||
I was thinking 1, 3 ... $N | |||
pmichaud | fails if $N < 3, I think. | ||
masak | and it seemed problematic for $N == 1 | ||
TimToady | by current spec, 1,3,5,7 ... 3 just makes 1,3 | ||
masak | right. | ||
pmichaud | I haven't read updated spec. | ||
so TimToady's comment might be more apropos | |||
masak | TimToady: oh, that's nice. | ||
I don't understand why yet, but I guess I will :) | 23:01 | ||
pmichaud | so then 1,3 ... $N ? | ||
masak | guess so. | ||
TimToady | as long as $N >= 1, you're fine | ||
masak | it is. | ||
well, um, it could be 0, I guess. | |||
what's 1,3 ... 0 ? | |||
jnthn | pmichaud: Hmm. The initial patch I wrote doesn't help at all (for teaching iterators to coerce to capture) | 23:02 | |
pmichaud: Maybe I just show example with .Seq in. | |||
pmichaud | jnthn: you need this very soon? | ||
requiring the .Seq would probably be very misleading | 23:03 | ||
jnthn | pmichaud: It was example I wrote for blog post I was about to write, and thought I should check the code in it akshually ran. ;-) | ||
pmichaud | ahhhh | ||
can it wait 24 hrsish? | |||
I can bump the list thinking a bit higher. needs to be resolved soon anyway. | |||
jnthn | pmichaud: Sure. | 23:04 | |
TimToady | we can probably force 1,3...0 to make (), but 1...0 is always gonna make 1,0 | ||
23:04
colomon joined
|
|||
TimToady | but by current spec, I think 1,3...0 is the same as 1,3...* | 23:05 | |
masak | without actually having read the updated spec, I'd say getting () feels better than getting 1,3...* | 23:06 | |
pmichaud | wild idea -- maybe *,1,3...0 ? | ||
nah, doesn't really give a good start point. | |||
masak | that idea was so wild I don't think I understand what it meant :P | ||
ok, now I'm finally done translating E03. | 23:08 | ||
gist.github.com/309333 | |||
I haven't run it yet, but I expect it to more-or-less run on alpha. | |||
now to blog about it and then see what SF got :) | |||
23:10
mssm joined
|
|||
TimToady | I think we can fix it so that 1,3...0 makes () | 23:12 | |
masak | yay | ||
dalek | kudo/master: 3b869ce | (Martin Berends)++ | docs/compiler_overview.pod: [docs/compiler_overview.pod] update for new master branch completed |
23:13 | |
mberends | jnthn, @others: please check docs/compiler_overview.pod for accuracy and completeness. Patches welcome :) | 23:17 | |
23:18
iblechbot left
|
|||
pmichaud | mberends: most of NQP is actually written in NQP. I'll fix that section. :) | 23:20 | |
jnthn | mberends: Will check it. Thanks! :-) | 23:21 | |
mberends | thank you too, it was very educational to go over it all | 23:22 | |
jnthn | mberends: Yes, Rakudo guts are, IMO, getting less and less terrifying. | 23:26 | |
Either that or I've just ceased to see them as such. | 23:27 | ||
"What a hack!" :-D | 23:28 | ||
masak | loliblogged! use.perl.org/~masak/journal/40195 | 23:30 | |
masak looks at SF++'s code | |||
ooh, >>.subst! | 23:31 | ||
but, yeah, that won't work, since .subst in itself is non-destructive. | |||
he meant >>.= | |||
is there such a beast? :) | |||
jnthn | mberends: The Stages section maybe belongs as a top level | ||
masak | std: my @a; @a>>.=subst(/foo/, 'bar') | ||
p6eval | std 29782: OUTPUT«ok 00:01 109m» | ||
jnthn | masak: There is. | ||
masak | whoa. :) | ||
that's intense. | 23:32 | ||
jnthn | alpha: my @a = 'food', 'fool'; @a>>.=subst(/foo/, 'bar'); say @a.perl; | ||
p6eval | alpha 30e0ed: OUTPUT«["bard", "barl"]» | ||
masak | double whoa :) | ||
jnthn | Bet master doesn't quite manage it again yet. | ||
master: my @a = 'food', 'fool'; @a>>.=subst(/foo/, 'bar'); say @a.perl; | |||
gah | |||
rakudo: my @a = 'food', 'fool'; @a>>.=subst(/foo/, 'bar'); say @a.perl; | |||
p6eval | rakudo 3704a2: OUTPUT«["bard", "barl"]» | ||
masak | \o/ | ||
jnthn | holy shit | ||
\o/ | |||
masak | 哈哈 | 23:33 | |
jnthn | I'm getting to the point now where I've put so many bits back, I can barely remember them all. | ||
mberends | Christmas draws nearer... | ||
jnthn | heh | 23:34 | |
pugs_svn | r29783 | vamped++ | minor typo fix | ||
masak | I'm kinda coming around to the view that Perl 6 is executable line noise with a superiority complex. | ||
jnthn | heh, >>.^ | ||
masak | O.O | ||
diakopter | rakudo: say ['food','fool']>>.=subst(/foo/, 'bar').perl; | ||
p6eval | rakudo 3704a2: OUTPUT«("bard", "barl")» | ||
masak | rakudo: $0 | 23:35 | |
p6eval | rakudo 3704a2: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''current instr.: '!postcircumfix:<[ ]>' pc 10887 (src/builtins/Iterator.pir:25)» | ||
jnthn | :-/ | ||
masak submits rakudobug | |||
jnthn | lta | ||
masak | and wrong. | ||
alpha: $0 | 23:36 | ||
p6eval | alpha 30e0ed: ( no output ) | ||
masak | that's better :) | ||
diakopter | rakudo: $[0] | ||
p6eval | rakudo 3704a2: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''current instr.: '!postcircumfix:<[ ]>' pc 10887 (src/builtins/Iterator.pir:25)» | ||
jnthn | rakudo: (Rat, Complex)>>.^add_method('lol', method () { say "lolwtf" }); 1/2.lol; (1 + 2i).lol; | 23:37 | |
p6eval | rakudo 3704a2: OUTPUT«lolwtflolwtf» | ||
jnthn | Hyper-meta. | ||
23:38
rv2733 left
|
|||
chromatic | Some of Rakudo's C code is still terrifying, jnthn. Don't worry. | 23:38 | |
diakopter | rakudo: (Rat, Complex)>>.^add_method('', method () { say "lolwtf" }); 1/2.''(); (1 + 2i).''(); | ||
p6eval | rakudo 3b869c: OUTPUT«lolwtflolwtf» | ||
jnthn | !! | 23:39 | |
rofl | |||
masak | ok, SF and I had many points of similarity this time. I feel a little bit bad for not getting my code to run before submitting it, but that's the obvious next step. :) | ||
jnthn | diakopter: Arguably, it's not incorrect. | ||
:-) | |||
masak | no, it's very correct. | 23:40 | |
it's the null string method. nothing to worry about. | |||
diakopter | rakudo: [*]>>.^add_method('', method () { say "lolwtf" }); 1/2.''(); | ||
p6eval | rakudo 3b869c: OUTPUT«Method 'shift' not found for invocant of class 'Rat'current instr.: 'perl6;Mu;' pc 2375 (src/builtins/Mu.pir:541)» | ||
masak | now what happened there, really? | 23:41 | |
jnthn | I...wish I knew. | ||
diakopter | 1/2.''() | ||
rakudo: 1/2.''() | |||
p6eval | rakudo 3b869c: OUTPUT«Method 'shift' not found for invocant of class 'Rat'current instr.: 'perl6;Mu;' pc 2375 (src/builtins/Mu.pir:541)» | ||
masak | std: [*]>>.^add_method() | ||
p6eval | std 29782: OUTPUT«ok 00:01 106m» | ||
masak | ah. | ||
masak submits rakudobug | |||
diakopter | rakudo: [Any]>>.^add_method('', method () { say "lolwtf" }); 1/2.''(); | ||
masak | diakopter: how do you come up with these things? :) | 23:42 | |
p6eval | rakudo 3b869c: OUTPUT«lolwtf» | ||
jnthn | diakopter: Any.^add_method will do there :-) | ||
diakopter | I'm good at being^Wplaying the novice programmer | ||
masak | novice?! .^add_method? | ||
jnthn | rakudo: 1/2.''() # no, just this gets it | ||
p6eval | rakudo 3b869c: OUTPUT«Method 'shift' not found for invocant of class 'Rat'current instr.: 'perl6;Mu;' pc 2375 (src/builtins/Mu.pir:541)» | ||
masak | jnthn: nod. | 23:43 | |
diakopter | yah, as I wrote above | ||
jnthn | I'm...completely bewildered...how. | ||
masak | jnthn: a little RT ticket will remind you to find out how :P | ||
diakopter | in the invocant | ||
jnthn | So kind of you. :-P | ||
masak is kindness itself | |||
jnthn | oh, I know what it is | ||
diakopter | rakudo: .''() | 23:44 | |
p6eval | rakudo 3b869c: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | ||
masak | that's wrong/lta too. | 23:45 | |
23:45
pmurias left
|
|||
diakopter | rakudo: .WHAT.say | 23:45 | |
p6eval | rakudo 3b869c: OUTPUT«Mu()» | ||
diakopter | rakudo: Mu.''() | ||
p6eval | rakudo 3b869c: OUTPUT«Use of type object as valuecurrent instr.: 'perl6;Perl6Exception;throw' pc 14244 (src/builtins/Seq.pir:52)» | ||
jnthn | masak: Same underlying cause as 1/2.''() | ||
masak: Put them all on one ticket. | |||
masak | jnthn: yes, I know. I'm on it. :) | ||
jnthn | Thanks. | 23:46 | |
:-) | |||
masak | jnthn: for different tickets, you'd have seen me saying '/me submits rakudobug' twice :P | ||
jnthn | (I didn't think it was obvious it was the same underlying cause, fwiw. Thus why I mentioned it. :-)) | ||
masak | no, it's obvious. :) | ||
diakopter | rakudo: Any.^add_method('', sub ($a) { say $a }); 1/2.''(); | ||
p6eval | rakudo 3b869c: OUTPUT«0.5» | ||
masak | I only pretend to be ignorant of the innards of Rakudo when it serves me. :P | ||
diakopter | rakudo: Any.^add_method('', sub ($_) { $_.WHAT.say }); 1/2.''(); | 23:47 | |
p6eval | rakudo 3b869c: OUTPUT«Rat()» | ||
masak | rakudo: 1/2.'lolidontexist'() | 23:48 | |
p6eval | rakudo 3b869c: OUTPUT«Method 'lolidontexist' not found for invocant of class 'Rat'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
diakopter | rakudo: Any.^add_method('', sub ($_) { $_.WHAT.say }); $_= [1/2]; .=''(); | 23:49 | |
p6eval | rakudo 3b869c: OUTPUT«Null PMC access in elements()current instr.: 'perl6;SeqIter;get' pc 13737 (src/builtins/Routine.pir:122)» | ||
jnthn | diakopter: you'd get away with a pointy block there too fwiw. | ||
rakudo: [].WHAT.say | |||
p6eval | rakudo 3b869c: OUTPUT«Null PMC access in elements()current instr.: 'perl6;SeqIter;get' pc 13737 (src/builtins/Routine.pir:122)» | ||
diakopter | o | ||
jnthn | Eww. That one. :-/ | ||
masak submits rakudobug | |||
jnthn | I thought I'd fixed that :-| | 23:50 | |
masak | 'pparently not | ||
diakopter | rakudo: @_.'pop'().say; | 23:51 | |
p6eval | rakudo 3b869c: OUTPUT«/tmp/p7QvN9rmI9» | ||
diakopter | rakudo: @_.pop.say; | 23:52 | |
p6eval | rakudo 3b869c: OUTPUT«/tmp/fsPRcEaY90» | ||
diakopter | rakudo: @_[*-1].say; | ||
masak | diakopter: p6eval artefact. | ||
p6eval | rakudo 3b869c: OUTPUT«Method 'Num' not found for invocant of class 'Block'current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)» | ||
masak | and that one is indexing or whatever algebra not working properly, I guess. | 23:53 | |
rakudo: my @a = 1, 2, 3; say @a[*-1] | |||
p6eval | rakudo 3b869c: OUTPUT«Method 'Num' not found for invocant of class 'Block'current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)» | ||
jnthn | I think just NYRI | ||
masak | right. | ||
you won't get a ticket for that :) | |||
diakopter | ticket monster hungry | 23:54 | |
masak | nom nom nom | ||
masak goes looking for more kittens doing that on Youtube | 23:55 | ||
jnthn: www.youtube.com/watch?v=MnagRjxp7v4 | |||
diakopter | rakudo: {;;;;;}.WHAT.say | 23:56 | |
p6eval | rakudo 3b869c: OUTPUT«Hash()» | ||
masak | Hash? really? | ||
it's full of statements! :) | |||
23:57
cotto_w0rk left
|
|||
diakopter | rakudo: {;;;(say 4)=>4;;}.WHAT.say | 23:57 | |
p6eval | rakudo 3b869c: OUTPUT«4Hash()» | ||
diakopter | rakudo: {;;;{say 4}=>4;;}.WHAT.say | 23:58 | |
p6eval | rakudo 3b869c: OUTPUT«Hash()» | ||
jnthn | No no, Rakudo's just telling diakopter what it thinks he's been smoking... | ||
diakopter | rakudo: {{say 4},Nom}.WHAT.say | 23:59 | |
p6eval | rakudo 3b869c: OUTPUT«Block()» | ||
diakopter | rakudo: {Nom,Nom,Nom}.WHAT.say | ||
p6eval | rakudo 3b869c: OUTPUT«Block()» | ||
jnthn | masak: Wow! nom nom nom! :-D | ||
diakopter | rakudo: {nom,nom,nom}.WHAT.say | ||
p6eval | rakudo 3b869c: OUTPUT«Block()» | ||
diakopter | erm |