pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: irc.pugscode.org/ | ~340 days 'til Xmas Set by mncharity on 16 January 2009. |
|||
ruoso | hmm... $i++ isn't a postfix | 00:01 | |
00:03
justatheory joined
|
|||
ruoso | std makes ++$i and $i++ different then =$i | 00:05 | |
which solves part of the mistery | |||
and maybe solves it all | 00:06 | ||
prefix, postfix and postcircumfix are unary | |||
and can, therefore, be seen as methods | |||
infix is binary (or have list associativity | |||
therefore needs to be seen as a sub | 00:07 | ||
00:07
maerzhase left
|
|||
ruoso | does it make sense? | 00:07 | |
00:09
explorer__ left
00:11
DemoFreak left,
Casan left
|
|||
ruoso just had a blackout in his neighborhood, but as the modem is in a no-break, he has internet, but no light... cool | 00:12 | ||
ruoso later & | |||
00:12
ruoso left
00:15
|jedai| joined,
_jedai_ left,
samlh left
00:17
nihiliad left
00:20
aindilis joined
00:22
Patterner left
00:23
Psyche^ joined,
Psyche^ is now known as Patterner
00:38
justatheory left
00:39
justatheory joined
00:40
justatheory left
00:51
charsbar_ joined
00:52
lisppaste3 left,
cotto left,
Helios left,
zostay left,
moritz_ left,
literal left,
AzureStone left,
pasteling left,
silug left,
[particle]1 left,
Whiteknight left,
xinming left,
pdcawley left,
Aisling left,
avar left,
|jedai| left,
bahaa2008 left,
ilbot2 left,
mberends left,
hudnix left,
agentzh left,
smtms left,
thepler left,
mdxi left,
Grrrr left,
StephenPollei left,
meltingwax left,
revdiablo left,
allbery_b left,
elmex left,
alanhaggai left,
stephenlb left,
orafu left,
cj left,
Patterner left
00:53
tux300181 left,
buubot left,
simcop2387 left,
pjcj left,
s1n left,
Jedai left,
wolverian left,
dalek left,
yahooooo left,
edenc left,
c1sung left,
Matt-W left,
drbean_ left,
gbacon left,
kanru left,
Eevee left,
jnthn left,
kisu left,
cognominal left,
estrabd left,
Ehtyar left,
Maghnus left,
TimToady left,
Trey left,
rafl left,
szabgab left,
nipotan left,
r0bby left,
baest left,
jjore left,
buu left,
ingy left,
broquaint left,
lambdabot left,
nothingmuch left,
japhb left,
jiing left,
preflex left,
km2 left,
REPLeffect left,
araujo left,
ft left,
lumi left,
charsbar left,
sjn left,
mtve left,
spinclad left,
sunnavy left
00:54
Patterner joined,
tux300181 joined,
buubot joined,
simcop2387 joined,
pjcj joined,
s1n joined,
Jedai joined,
wolverian joined,
dalek joined,
gbacon joined,
c1sung joined,
yahooooo joined,
Matt-W joined,
drbean_ joined,
edenc joined
00:55
sunnavy joined,
broquaint joined,
lambdabot joined,
nothingmuch joined,
japhb joined,
jiing joined,
preflex joined,
TimToady joined,
cognominal joined,
kanru joined,
kisu joined,
estrabd joined,
Ehtyar joined,
Maghnus joined,
Eevee joined,
jnthn joined,
Trey joined,
rafl joined,
irc.freenode.net sets mode: +o TimToady,
|jedai| joined,
bahaa2008 joined,
ilbot2 joined,
mberends joined,
hudnix joined,
agentzh joined,
smtms joined,
meltingwax joined,
thepler joined,
Grrrr joined,
mdxi joined,
elmex joined,
revdiablo joined,
allbery_b joined,
StephenPollei joined,
[particle]1 joined,
Whiteknight joined,
xinming joined,
pdcawley joined,
avar joined,
Aisling joined,
szabgab joined,
nipotan joined,
buu joined,
baest joined,
ingy joined,
jjore joined,
lisppaste3 joined,
zostay joined,
cotto joined,
AzureStone joined,
Helios joined,
literal joined,
moritz_ joined,
pasteling joined,
silug joined
00:56
araujo joined,
REPLeffect joined,
ft joined,
sjn joined,
orafu joined,
alanhaggai joined
00:58
km2 joined,
km2 left
00:59
lumi joined
01:00
hercynium joined
01:01
|jedai| left
01:02
|jedai| joined,
LimbicRegion joined
01:03
cj joined,
hercynium left
01:04
icwiener left
01:05
Limbic_Region left,
r0bby joined
01:06
Limbic_Region joined
01:15
c9s_ is now known as c9s
01:20
hercynium joined
01:23
LimbicRegion left
01:30
mberends left
01:40
aindilis left
01:43
aindilis joined
01:44
[particle] joined
01:52
_jedai_ joined
01:53
Whiteknight is now known as wknight8111
01:54
|jedai| left
02:01
[particle]1 left
|
|||
TimToady | @tell ruoso they're all multi subs, including the unaries, except the .fooish ones; this is so the language is in charge of the meaning of operators, not the object | 02:03 | |
lambdabot | Consider it noted. | ||
02:08
cognominal left
02:19
PZt joined
02:35
Helios left
02:36
Helios joined,
cognominal joined
02:40
aindilis left,
|jedai| joined
02:44
wknight8111 left,
_jedai_ left
02:47
shinobi-cl joined
02:50
legis joined
02:54
chrisdolan joined
|
|||
chrisdolan | rakudo: my Int $n = +"1"; | 02:55 | |
p6eval | rakudo 35875: OUTPUT«Type mismatch in assignment.current instr.: 'die' pc 16793 (src/builtins/control.pir:204)» | ||
shinobi-cl | hi..... anyone knows where can i find info about reading binary files? (seek, and that kind of stuff) | 02:56 | |
chrisdolan | That's surprising to me. But if I say "Num" instead of "Int", it's OK. | ||
Is that a Rakudo limitation or have I misunderstood numification? | 02:57 | ||
02:59
mtve joined
03:01
|jedai| left,
|jedai| joined
03:05
dduncan joined
03:08
araujo left,
araujo joined
03:16
agentzh left
|
|||
pugs_svn | r24995 | putter++ | [elfparse] New std.pm layout (pods instead of commenting) to simplify staying in sync with STD.pm. | 03:33 | |
03:45
shinobi-cl left
03:48
alanhaggai left
03:50
SamB joined
03:55
Limbic_Region left
03:56
shinobi-cl joined
03:59
agentzh joined
04:04
[particle]1 joined
04:19
[particle] left
05:00
agentzh left
05:01
agentzh joined
05:02
kisu_ joined
05:06
alester_ joined
05:07
kisu left
05:19
shinobi-cl left
05:25
|jedai| left
05:26
|jedai| joined
05:28
meppl joined
05:34
smallfish joined
|
|||
alester_ | nslookup git.petdance.com | 05:38 | |
05:44
spinclad joined
05:53
kanru left
05:56
agentzh left,
agentzh joined
06:07
mberends joined
06:21
agentzh left
06:24
agentzh joined
06:30
[particle]1 left
06:33
eternaleye joined,
eternaleye left
06:34
eternaleye joined
06:44
smallfish left
06:46
[particle] joined
06:51
ashizawa joined
06:52
[particle] left
06:54
DemoFreak joined
07:06
bahaa2008 left
07:12
justatheory joined
|
|||
pugs_svn | r24996 | moritz++ | [t/spec] don't pick 'tempfile' as file name, we might be bitten by race | 07:17 | |
r24996 | moritz++ | conditions. | |||
07:18
jhuni joined
|
|||
moritz_ | chrisdolan: I think it's a bug | 07:22 | |
07:27
justatheory left
07:30
hercynium left
07:31
dduncan left
07:53
alester_ left
07:56
spinclad left
07:58
bahaa2008 joined
08:01
araujo left
08:22
bahaa2008 left,
bahaa2008 joined
08:23
spx2 joined
08:24
spx2_ left
08:27
maerzhase joined
08:28
mberends left
|
|||
jhuni | rakudo: say; | 08:38 | |
p6eval | rakudo 35875: OUTPUT«say requires an argument at line 1, near ";"current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)» | ||
jhuni | rakudo: my Scalar $x = 512; $x.WHAT.say; | 08:39 | |
p6eval | rakudo 35875: OUTPUT«Scope not found for PAST::Var '$x' in current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)» | ||
jhuni | pugs: my Scalar $x = 512; $x.WHAT.say; | 08:40 | |
p6eval | pugs: OUTPUT«Int» | ||
moritz_ | pugs doesn't do type enforcements at all | ||
pugs: my Int $x = [1, 2]; say $x.perl | |||
p6eval | pugs: OUTPUT«\\(1, 2)» | ||
moritz_ | obviously that should die | ||
jhuni | ya | 08:41 | |
I just noticed | |||
moritz_ | and since Scalar is a container type, 'my Scalar $x' doesn't really make sense | 08:42 | |
'my $x is Scalar' should work, though | |||
jhuni | What is wrong with the rakudo version? | 08:43 | |
moritz_ | I guess that the type Scalar isn't implemented | ||
which leads to a weird mis-parse | |||
rakudo: eval 'my Scalar $x'; say $! | 08:44 | ||
p6eval | rakudo 35875: OUTPUT«Scope not found for PAST::Var '$x' in » | ||
jhuni | I don't know what that means | 08:45 | |
moritz_ | I guess that should give a nicer error message instead, for example 'No type name Scalar' | ||
std: my UnknownTypName $x; say $x.WHAT | |||
p6eval | std 24996: OUTPUT«Unknown routines: UnknownTypName called at 1  my called at 1 00:06 87m» | 08:46 | |
jhuni | That is better | ||
moritz_ | afk | 08:47 | |
08:48
jferrero joined
08:50
kanru joined
|
|||
Matt-W | Morning | 08:52 | |
09:10
moritz_ left,
cotto left,
literal left,
zostay left,
lisppaste3 left,
AzureStone left,
silug left,
pasteling left
09:11
lisppaste3 joined,
zostay joined,
cotto joined,
AzureStone joined,
literal joined,
moritz_ joined,
pasteling joined,
silug joined
09:13
masak joined
09:15
jhuni left
|
|||
viklund | masak: hey | 09:17 | |
masak | viklund: aloha | ||
do we dare announce the upgrade here? :) | 09:18 | ||
viklund thinks so | 09:19 | ||
masak | ok. | ||
moritz_ looks at the page - cool! | |||
masak | the page in question is november-wiki.org | ||
it's a bit slow... | 09:20 | ||
...but worth waiting for. | |||
moritz_ | "Perl 5 was my rewrite of Perl. I want Perl 6 to be the community's rewrite of Perl and of the community." — Larry Wall | ||
that — could use some fixing | |||
masak | indeed. | ||
I'm surprised the tests don't catch that. | |||
investigating. | 09:21 | ||
09:22
schmalbe joined
09:23
maerzhase left
09:30
duke_leto joined
|
|||
Matt-W | So november-wiki.org is running on November on Rakudo? Cool! | 09:32 | |
masak | we like to think so, yes. | 09:33 | |
khatar | :) | ||
Matt-W | That's great | ||
khatar | using mod_parrot ? | ||
masak | khatar: no, not yet. | ||
Matt-W | I assume those * under "Why use Perl 6" should have been rendered as a <ul>, but I know it's not perfect | ||
masak | we're planning to deploy it on mod_perl6 | ||
khatar | ok | ||
masak | Matt-W: checking. | ||
Matt-W: oh. yes. | 09:34 | ||
hopefully get that fixed within the week. | |||
Matt-W | Excellent | ||
masak | we aim to please. | ||
Matt-W | I'd say I'd take a look at it, but I've not got time for the next few days | ||
masak | Matt-W: no worries. it'll be there for you when you have the time. | 09:35 | |
Matt-W | In a concert on Sunday so I've got to spend a moderately excessive amount of time rehearsing | ||
Music's a lot like software, that last bit of polish seems to take all the time... | 09:36 | ||
masak | :) | 09:38 | |
moritz_ | another software + music geek | 09:39 | |
Matt-W | There are a lot of us | ||
khatar | masak, is november based on a wiki grammar or a classical tons of regex approach | ||
Matt-W | Seems to work somehow | ||
khatar | ? | ||
masak | khatar: neither, in fact. | ||
khatar | ok :) | ||
masak | khatar: I do use a grammar, but only for tokenizing. | ||
khatar: see my blog posts from last year. | 09:40 | ||
this one especially: use.perl.org/~masak/journal/37988 | 09:41 | ||
jnthn | morning! | ||
khatar | thx | ||
masak | jnthn: dobru... morning! | ||
jnthn | masak: "dobre rano" | 09:42 | |
masak | hahah, "rano" :) | ||
that's "frog" in Esperanto. | |||
jnthn | nice! | ||
moritz_ | jnthn: your blog post is so last year... *SCNR* | 09:43 | |
erm, I meant masak | |||
sorry | |||
masak | moritz_: it is. I've since moved on. :P | ||
nowadays I'm mostly doing 3D work in abstract board games. | |||
moritz_ | you program abstract board games? | 09:44 | |
jnthn | masak: Seems the bullet points on the november wiki page don't render? | ||
masak | moritz_: I program Druid. | ||
jnthn | masak: But full marks for the pretty picture at the top of the page! | ||
masak | jnthn: I'm about to fix the bullet points. | ||
jnthn: thanks! | |||
looks count. | 09:45 | ||
jnthn | masak: Is it running under mod_perl6? | ||
viklund | masak: do we have any tests for the bullet-points? | ||
jnthn: no, not yet | |||
masak | jnthn: no. | ||
viklund: no. | |||
I don't seem to have implemented that yet. | 09:46 | ||
shouldn't be too hard. | |||
Matt-W | masak: that post about your tokeniser has just given me the solution to a problem of my own! | ||
masak | just one snag: a contiguous set of <li> paragraphs need to be post-processed to have an <ul> around them. | ||
jnthn | masak: Ah. When it can be, that should get a speed-up. As it is, it's not awefully slow. :-) | ||
masak | Matt-W: I'll send you the invoice. :P | 09:47 | |
Matt-W | masak: you can have a picture of a banknote | ||
masak | jnthn: I think caching by the application itself might help in the short term. | ||
the markup parser currently sucks up a lot of load time. | |||
jnthn | sub render is cached { ... } # ;-) | 09:48 | |
moritz_ | can we conditionally load modules already? | ||
masak | jnthn: I wish. | ||
jnthn | masak: It's spec'd. ;-) | ||
masak | jnthn: oh :) | 09:49 | |
but not implemented, I take it? | 09:51 | ||
rakudo: sub foo($n) is cached { for ^1e6 {} }; say time; foo(7); say time; foo(7); say time | 09:53 | ||
p6eval | rakudo 35875: OUTPUT«1232618023.5415» | ||
masak | rakudo: sub foo($n) is cached { for ^1e4 {} }; say time; foo(7); say time; foo(7); say time | 09:54 | |
p6eval | rakudo 35875: OUTPUT«1232618053.336691232618055.601391232618058.60821» | ||
masak | not implemented, then. | ||
jnthn: but it will not work anyway before we start using mod_perl6 or equivalent... | 09:55 | ||
jnthn | masak: Not implemented, no. | 09:56 | |
moritz_: On those sometimes-failing tests - I haven't been running them in parallel. | 10:05 | ||
So that's probably why. | |||
10:10
iblechbot joined
|
|||
masak | (use MONKEY_PATCHING)++ | 10:16 | |
how many other languages have that, I ask? :) | |||
moritz_ | maybe we should propose it for LOLCODE | 10:18 | |
masak shudders | |||
moritz_ | but first we'd have to mis-spell it | ||
masak | I AM IN UR CLASS PATCHING UR MONKIS | 10:19 | |
moritz_ | s/I AM/IM/ | ||
masak | oops, yes of course. | 10:20 | |
jnthn | IM A CLASS Cat EXTENDIN UR Animal | 10:21 | |
Not sure lolcode even has OO syntax...yet. | |||
masak | brainfuck can do OO, so why not LOLCODE? | 10:22 | |
jnthn | Parametric roles for LOLCODE? ;-) | ||
10:24
xinming_ joined
|
|||
moritz_ | perhaps CLAZ instead of CLASS? :-) | 10:27 | |
masak | ooh, classy. | 10:28 | |
moritz_ | jnthn: parametric roles for lolcode would give us a certain advantage over other implementors :-) | ||
masak | IMA CLAZ Cat EXTENDIN UR Animal | ||
10:29
xinming_ left
|
|||
moritz_ | IMA CLAZ Animal ... GOAWAY | 10:30 | |
10:30
pdcawley left
|
|||
jnthn | moritz_: Maybe in another few months...when my brainz can take it again. :-) | 10:39 | |
masak | jnthn: oh, you're finished with parametric roles? | ||
jnthn: what's next? | |||
jnthn | masak: I'm not 100% there, but mostly. | 10:40 | |
masak is not 100% there, either | |||
:) | |||
moritz_ | rakudo: my Int @x = (1, "2"); say @x.perl | ||
p6eval | rakudo 35875: OUTPUT«get_iter() not implemented in class 'Integer'current instr.: '_block14' pc 54 (EVAL_17:39)» | ||
jnthn | Yeah but I was talking about the parametric roles. ;-) | ||
masak | jnthn: I know. :) | ||
moritz_ | rakudo: my @x = (1, "2"); say @x.perl | ||
p6eval | rakudo 35875: OUTPUT«[1, "2"]» | ||
masak | what was that first error? | 10:41 | |
rakudobug material? | |||
jnthn | Basically, the remaining task is to make Array and Hash (well, Mapping and List) into roles. | ||
10:41
xinming left
|
|||
jnthn | I guess postcircumfix:[ ] is gonna be one too. | 10:41 | |
Thing is, I really don't want to hand-role parametric roles in PIR. | |||
moritz_ | masak: typed arrays are a TODO feature... | ||
masak: so I don't think a bug report is appropriate | 10:42 | ||
jnthn | So I'm waiting for Perl 6 prelude until this. | ||
masak | moritz_: fair enough. | ||
moritz_ | masak: but chrisdolan posted an example of another bug earlier | ||
Matt-W | jnthn: I believe there's still a ticket on making @.someattribute[*-1] work | ||
(hint hint) | |||
masak | oh yes. that one. | ||
jnthn | Once we have that, Array and Hash can become the parametric roles, and then it'll be a small bit of work to make typed arrays and hashes. | 10:43 | |
That said, I might now get my Int @x is MyArray { } sorta working. | |||
masak | .oO( in MY day, we had neither array attributes nor whatever indexing... and we were happy ) |
||
jnthn | So I can prototype it all in there. | ||
moritz_ | masak: can you submit the 'my Int $x = +"2"' bug please? | ||
masak submits | |||
jnthn | rakudo: my Int $x = +"2"; | 10:44 | |
p6eval | rakudo 35875: OUTPUT«Type mismatch in assignment.current instr.: 'die' pc 16793 (src/builtins/control.pir:204)» | ||
masak | rakudo: my Int $x = +'2' | ||
p6eval | rakudo 35875: OUTPUT«Type mismatch in assignment.current instr.: 'die' pc 16793 (src/builtins/control.pir:204)» | ||
jnthn | rakudo: say WHAT +"2"; | ||
p6eval | rakudo 35875: OUTPUT«Num» | ||
jnthn | meh. | ||
That's why. | |||
moritz_ | it should be a bit smarter | ||
masak | moritz_: + numifies. | ||
it doesn't intify. | |||
jnthn | masak: I know, but it's not the most helpful behavior... | 10:45 | |
masak | true. | ||
jnthn | Well, the most dwim anyway. | ||
10:46
_jedai_ joined
|
|||
moritz_ | masak: right. But since Int conforms to the Num type, it's more DWIM if it does int directly, where appropriate | 10:46 | |
rakudo: my Int $x = int "2"; | |||
p6eval | rakudo 35876: RESULT«2» | ||
10:46
|jedai| left
|
|||
masak | right. | 10:47 | |
jnthn | moritz_: Int ~~ Num, but not Num ~~ Int. | ||
moritz_ | jnthn: that's what I meant :-)) | ||
jnthn | :-) | ||
masak | that's how I understood you. | ||
jnthn looks at his Hague grant task list | 10:48 | ||
moritz_ | that looks visually similar to "Huge task list" somehow :-) | ||
masak | haha | ||
10:48
DemoFreak left
|
|||
jnthn | moritz_: It used to be, but with auto-threading, type registry, parametric roles, the 'of' keyword (apart from on subs), submethods and most of the 'handles' trait verb all done now, it's a lot smaller... | 10:49 | |
masak | jnthn++ | 10:50 | |
jnthn is optimistic of finishing his grant on time | 10:51 | ||
10:54
ruoso joined
|
|||
ruoso | TimToady, does that mean that $foo{$bar} actually calls "multi postcircumfix:<{ }>($foo, $bar)" ? | 10:55 | |
that was unexpected.. | 10:56 | ||
moritz_ | I'd also expect a method, because methods don't have to be exported into every package | 10:57 | |
jnthn | $foo.postcircumfix:<{ }>($bar) # is what I thought... | 10:58 | |
ruoso | that actually causes a circularity problem in the bootstrap | 11:02 | |
because a multi must receive the postcircumfix:<( )> call | |||
and if postcircumfix:<( )> is a multi | |||
how do you call it on a multi? | 11:03 | ||
I was assuming that for every postcircumfix operator, actually | |||
as well as every prefix and postfix, with less certain | |||
(actually with some certain, after I found out that ++$i and $i++ are not prefix and postfix | 11:04 | ||
masak | they're not? | 11:07 | |
ruoso | std parses them specially | ||
masak | because of the lvalue thing? | ||
ruoso | because it actually replaces the value inside $i | ||
masak | right. | 11:08 | |
that's what I meant. | |||
rakudo_svn | r35878 | jonathan++ | [rakudo] Remove unused @?PACKAGE and $?NS (we init the first and never use it, then use the second but never init it, thus I guess it was useless). | 11:10 | |
ruoso | jnthn, does rakudo implements prefix:<=> already? is it a multi sub or a method? | ||
jnthn | ruoso: checking | 11:11 | |
ruoso: multi sub | |||
ruoso | hmm | 11:12 | |
I was guessing it would be | |||
a mehtod | |||
jnthn | why? | ||
ruoso | because it's an unary | 11:13 | |
the same way as postcircumfix | |||
jnthn | Hmm | 11:14 | |
But S13 shows things like | |||
multi prefix:<~> is deep {...} | |||
That's the only unary example I can ee in S13 unless I'm missing something though. :-| | 11:15 | ||
pugs_svn | r24997 | jnthn++ | [t/spec] Rename nested.t for roles to crony.t, to reflect what it's actually testing. | 11:17 | |
ruoso | jnthn, I don't understand the 'is deep' in S13 at all | 11:18 | |
jnthn | ruoso: I wasn't really showing it for the is deep | ||
More that it shows a unary operator being declared as a multi sub. | |||
ruoso | I know... | ||
jnthn | Not a multi method. | ||
ruoso | but in fact... | 11:19 | |
it only shows that example to show it is a bad example | |||
that must mean something | |||
;) | |||
jnthn | I guess for unary ops, multi-dispatch is rather less useful. | 11:20 | |
So it's not really a hardship if they're methods. | |||
11:25
maerzhase joined
11:30
mberends joined
|
|||
ruoso | jnthn, so... let's lobby with TimToady so he changes his mind? :) | 11:33 | |
jnthn | ruoso: Is it actually a problem if they are multis? | ||
There's something to be said for consistency... | |||
ruoso | well, current scheme seems inconsistent | 11:34 | |
postcircumfix are methods (in S13) | |||
what's the fundamental difference between postcircumfix and prefix and postfix? | |||
but there is a fundamental difference between them and infix | |||
jnthn, but the bigger problem is that returning an Iterator for a list | 11:35 | ||
my $iterator = =@list | |||
is supposed to return something that is private to the list | |||
sorry, that line was wrong | 11:36 | ||
my $item = =@list | |||
jnthn | Hmm, yes. | ||
But of course, you could write it as a multi-method *and* export it. | |||
ruoso | which looks like 99% of the cases | 11:37 | |
so, why not making it just a method? | |||
jnthn | But it still leaves the inconsistency with postcircumfix... | ||
ruoso | it is already going to be dispatched based on the type of one object | ||
that looks like a method | |||
11:38
kanru left
|
|||
jnthn | Aye. | 11:38 | |
Well, TimToady's call really. :-) | |||
The reasoning whichever way he calls it, will be interesting. | |||
But yes, method makes sense to me too. | 11:39 | ||
mberends | jnthn, could I bug you to try to fix $*ERR ? RT#62540, I miss my debugging friend | ||
pugs_svn | r24998 | jnthn++ | [t/spec] Roles on .WHAT should stringify to name, like classes do, rather than Role. | 11:40 | |
11:46
kanru joined
|
|||
jnthn | mberends: Hmm. It's not obvious why it's broken... | 11:46 | |
11:46
kanru left
|
|||
jnthn | (As in, I can reproduce it. I just can't see why it's happening...) | 11:46 | |
masak | mberends: oh, and a third thing: SVG.pm -- I'm working on it. slowly. might have something to show by the weekend. | 11:47 | |
11:50
chrisdolan left
|
|||
masak | having SVG.pm will open up a vista of possibilities for Perl 6 web programming. | 11:51 | |
ruoso | masak, why would anyone want a vista if there's the beta 7 already ;) ? ;) | 11:53 | |
masak | ruoso: it was with some trepidation I used that word, yes. | ||
it's a pity. used to be a positive word. | 11:54 | ||
ruoso | heh | ||
11:54
pmurias joined
|
|||
masak | Microsoft is in decline. the only reason it hasn't fallen yet is because it's so huge. | 11:55 | |
ruoso | just wait for it to get momentum | ||
;) | |||
masak | one of my better decisions in the past decade is not waiting for Microsoft to do anything. | 11:56 | |
that way, I'm never disappointed. | 11:57 | ||
jnthn | moritz_: An easy one to close maybe ;-) rt.perl.org/rt3/Public/Bug/Display.html?id=61978 | 11:59 | |
rakudo_svn | r35879 | jonathan++ | [rakudo] What's installed in the namespace for a role should probably act like a proto-object a bit more; this makes it stringify in the same kinda way. | 12:00 | |
12:01
|jedai| joined
12:02
_jedai_ left
|
|||
rakudo_svn | r35881 | bernhard++ | [codingstd] trailing_space.t | 12:10 | |
12:15
pmurias left
12:17
ejs joined
|
|||
jnthn tests a patch that may clsoe many masakbugs | 12:23 | ||
Well, 3 of 'em. | |||
12:25
|jedai| left,
|jedai| joined
|
|||
mberends | masak: sorry, afk for a while. looking forward to SVG.pm | 12:27 | |
12:28
maerzhase left
|
|||
jnthn -> lunch | 12:28 | ||
12:42
ashizawa left
12:45
drbean_ is now known as drbean
12:59
bahaa2008 left
|
|||
rakudo_svn | r35884 | jonathan++ | [rakudo] Improve support for nested packages; gets the issues in various RT tickets resolved. | 13:10 | |
pugs_svn | r24999 | jnthn++ | [t/spec] Tests for nested classes. | 13:12 | |
r25000 | jnthn++ | [t/spec] Tests for grammars nested in classes. | 13:15 | ||
13:18
DJ-DONGDOT joined
|
|||
Matt-W | masak: SVG.pm being a library for generating SVG graphics? | 13:31 | |
masak | Matt-W: a minimal version of the CPAN equivalent. | ||
Matt-W: I already have semi-concrete plans for another module that uses SVG.pm but is much more DWIMmy. | 13:32 | ||
Matt-W | nice | ||
I keep thinking, wouldn't it be cool if we had GTK bindings, but I'm not sure we're up to that yet :) | |||
masak | Matt-W: there's nothing stopping you from trying. | ||
Matt-W | just time | ||
masak | I've never ventured into that kind of programming. | 13:33 | |
Matt-W | GObject Introspection does make the whole thing much easier | ||
masak | otherwise I might have attempted it also. | ||
Matt-W | In theory, you can generate the entire binding automatically | ||
A simple one, anyway | |||
I might try it one day | |||
mberends | very well done on november-wiki.org/ ! | 13:34 | |
masak | gracias. | ||
as they say, people don't react until you update the GUI :) | 13:35 | ||
ruoso | Matt-W, SMOP might be specially interesting to experiment with Glib, since it started with "representation polymorphism" as its core... | ||
mberends plans to create a pod6 -> mediawiki translator | |||
Matt-W | ruoso: oh? | ||
masak | mberends: is there a pod6 -> plaintext translator? | 13:36 | |
mberends | yes, in the current perl6-examples | ||
ruoso | Matt-W, you just need to implement a ResponderInterface for Glib objects, that implements Glib introspection | ||
masak | mberends: excellent. will play with it this weekend. | 13:37 | |
Matt-W | ruoso: ooooh | ||
ruoso: so it generates bindings at runtime? | |||
ruoso | Matt-W, it doesn't need to generate | ||
it can just use it | |||
in theory, a Glib responder interface would provide the needed introspection so that you could | 13:38 | ||
my $x = Int.bless(Glib.CREATE, :value(1)); and you would have an Perl 6 Int as a Glib object | 13:39 | ||
jnthn afk - slovak | 13:41 | ||
moritz_ | ruoso: and what is the 1 in your example? | 13:43 | |
ruoso | a native int? | ||
moritz_ | perl6: say 1.WHAT | 13:44 | |
p6eval | elf 25000, pugs, rakudo 35888: OUTPUT«Int» | ||
masak | they agree! \o/ | ||
moritz_ | they all seem to think that 1 is an Int, not an int | 13:45 | |
SamB is a bit surprised that that parses | |||
masak | SamB: why? | ||
SamB | I'd have expected the . to be mistaken for part of the numeric literal | ||
moritz_ | SamB: it's actually quite hard to produce a snytax error in Perl 6 :-) | ||
masak | SamB: ah. no, it's special-cased. | ||
ruoso | moritz_, but it can be autoboxed into a native int while being bound in the signature | 13:46 | |
that considering | |||
masak | moritz_: unless you like to put spaces before parens and stuff. | ||
ruoso | role Int { has int $.value } | ||
moritz_ | masak: right | ||
std: while (my $x = <STDIN>) { print } | 13:47 | ||
p6eval | std 25000: OUTPUT«############# PARSE FAILED #############This appears to be Perl 5 code at /tmp/m6RbkwCql6 line 1:------> while (my $x = <STDIN>) { print } expecting whitespace00:04 71m» | ||
moritz_ | std: while (my $x = <STDIN> ) { print } | ||
p6eval | std 25000: OUTPUT«############# PARSE FAILED #############This appears to be Perl 5 code at /tmp/hAAHLy76Qy line 1:------> while (my $x = <STDIN> ) { print } expecting whitespace00:05 71m» | ||
moritz_ | the "expecting whitespace" is a bit weird IMHO | ||
masak | aye. | ||
SamB | what's that | ||
masak | the rest is good. | 13:48 | |
SamB: coloring. | |||
SamB | eh ??? | ||
masak | ANSI. | ||
SamB | oh, that's ESC | ||
masak | aye. | ||
SamB | why isn't it translated to mIRC format ? | ||
moritz_ | because nobody implemented it :-) | ||
masak | SamB: because you haven't implemented an ANSI->mIRC translator yet, silly :P | ||
moritz_ | SamB: patches welcome :) | 13:49 | |
afk | |||
masak | (but please don't belch mIRC colors into the #perl6 channels. that makes baby Jesus cry.) | ||
it's bad enough with the ESC codes. | |||
SamB | but I heard he was all growed up | ||
masak | SamB: nevertheless. | 13:50 | |
13:53
lsyx joined
13:54
lsyx left
13:56
Lunchy_ left
13:57
Lunchy joined
14:02
DJ-DONGDOT left
14:04
jferrero left
14:10
ejs left
14:11
duke_leto left
14:13
Exodist joined
14:18
vixey joined
14:21
sjn left
14:23
zamolxes joined
14:25
[particle] joined
14:36
ejs joined
14:38
ejs1 joined
14:47
Patterner left
14:49
ejs left
14:54
bahaa2008 joined
14:55
bahaa2008 left
15:00
kcwu joined
15:08
[particle] left
|
|||
masak | this .pick[0] thing -- could it also be solved by defining .pick as a multimethod? | 15:08 | |
15:08
[particle] joined
|
|||
masak | letting .pick() return an Any and .pick($n) return a List | 15:09 | |
since that seems to be an obvious solution, I suppose there's something wrong with it -- but I can't really see what. | |||
moritz_ | what's the problem? | 15:11 | |
masak | moritz_: I don't know, but something made people in the know reach for a solution involving returning a Capture. | 15:12 | |
so I guess I'm also wondering what's the problem. | 15:13 | ||
the obvious problem, of course, is the current behaviour of .pick() :) | |||
(it returns a List of 1 element) | |||
moritz_ | if all List methods are in Any, there's no harm in returning a single item | 15:14 | |
masak | right. | ||
but there is sufficient harm in not doing it. | 15:15 | ||
moritz_ | it would be consistent, because <foo> is also a Str, not a List | 15:17 | |
masak | indeed. | ||
moritz_ | rakudo: say list(1|2|3).WHAT | 15:18 | |
p6eval | rakudo 35888: OUTPUT«List» | ||
moritz_ | rakudo: say list(1|2|3).perl | ||
p6eval | rakudo 35888: OUTPUT«[any(1, 2, 3)]» | ||
masak | rakudo: say <foo>.WHAT | ||
p6eval | rakudo 35888: OUTPUT«Str» | ||
moritz_ | rakudo: sub f(*@a) { @a }; say f(1|2|3).perl | 15:19 | |
p6eval | rakudo 35888: OUTPUT«[any(1, 2, 3)]» | ||
moritz_ | it's correct that slurpy args don't autothread | ||
ruoso | rakudo: my Float $x = +"1"; | 15:20 | |
p6eval | rakudo 35888: OUTPUT«Scope not found for PAST::Var '$x' in current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)» | ||
moritz_ | but should the junction flatten into a list? or remain as an item? | ||
ruoso | isn't there a Float? | ||
moritz_ | not in Rakudo | ||
spack Float\b | 15:21 | ||
ruoso | what other type of Num there is, then | ||
moritz_ | spack: Float\b | ||
what's the spec-ack command? | |||
ruoso | buubot, spack Float\b | ||
buubot | ruoso: Sorry, I couldn't find any matches for: Float\b | ||
ruoso | buubot, spack Float | ||
buubot | ruoso: Sorry, I couldn't find any matches for: Float | ||
ruoso | rakudo: my Rat $x = 1; | 15:22 | |
p6eval | rakudo 35888: OUTPUT«Scope not found for PAST::Var '$x' in current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)» | ||
moritz_ | I also did it on the command line => no match | ||
ruoso | buubot, spack Rat\b | ||
buubot | ruoso: S02-bits.pod:4 S03-operators.pod:4 | ||
ruoso | does rakudo support any other type of Num? | 15:23 | |
moritz_ | no. | ||
Complex, Num, Int, no more numeric types (afaik) | 15:24 | ||
ruoso | ah.. it supports comples | ||
complex | |||
rakudo: my Complex $x = 1; | |||
p6eval | rakudo 35888: OUTPUT«Type mismatch in assignment.current instr.: 'die' pc 16815 (src/builtins/control.pir:204)» | ||
moritz_ | rakudo: say 1i ~~ Complex | 15:25 | |
p6eval | rakudo 35888: OUTPUT«1» | ||
masak | rakudo: say 1 ~~ Complex | ||
p6eval | rakudo 35888: OUTPUT«0» | ||
moritz_ | ruoso: I think your example should autopromote to Complex | ||
ruoso | in Math, isn't Int a subset of the Complex numbers? | ||
rakudo: my Complex $x = 1 + 2i; | 15:26 | ||
moritz_ | it is, but class relations aren't subset relations | ||
p6eval | rakudo 35888: RESULT«1+2i» | ||
ruoso | moritz_, that probably means the classes are miss-related then | ||
moritz_ | A isa B means "objects of A behave the same as B" | 15:27 | |
ruoso | not at all | ||
masak | moritz_: well, almost. | ||
ruoso | A isa B means " A extends B" | ||
where extends might mean replace behavior | 15:28 | ||
moritz_ | ruoso: we've known for long that our concept of classes doesn't fit well into the mathematical world (which bothers me) | ||
Matt-W | "A can be spoken to in the same way as B", I would think | ||
moritz_ | ruoso: "same" in a very liberal sense | ||
Matt-W++ # much better phrasing | |||
ruoso | Matt-W, moritz_, that is what .does does | ||
not .isa | |||
Matt-W | this is true, my definition doesn't require them to be part of the same inheritance tree | 15:29 | |
which isa generally does | |||
ruoso | that's the point | ||
Matt-W | because otherwise they could just be two things that implement the same role | ||
ruoso | 1 ~~ Complex should be true | 15:30 | |
as well as 1 ~~ Rat | |||
and 1 ~~ Int | |||
but 1.1 ~~ Int should be false | |||
15:30
duke_leto joined,
duke_leto left
|
|||
Matt-W | one would hope 1.1 !~ Int, yes :) | 15:30 | |
masak | actually, I can't think of a good reason why 1 ~~ Complex shouldn't be true... | 15:31 | |
ruoso | there isn't | ||
because in the Math world | |||
you have sets | |||
and subsets | |||
Int is a subset of Rat | |||
and Rat is a subset of Complex | |||
masak | no, I meant besides that. | ||
I don't necessarily buy into the subset idea of class hierarchies. | |||
because objects have methods. | 15:32 | ||
Matt-W | it doesn't mean we should model the class heirarchy that way, but the numbers need to behave that way... | ||
ruoso | exactly... | ||
masak | Matt-W: yes, that's another good point. | ||
ruoso | including being able to call methods of complex in 1 | ||
masak | ~~ doesn't need to behave like isa | ||
ruoso | it doesn't behave like isa at all | ||
masak | ruoso: I suggest you submit a rakudobug for '1 ~~ Complex' | 15:33 | |
and see what happens. :) | |||
moritz_ | rakudo: say 1 ~~ Num | ||
p6eval | rakudo 35888: OUTPUT«1» | ||
15:36
_jedai_ joined
15:38
|jedai| left
|
|||
ruoso | maybe this is all solved by "all built-ins are roles" | 15:39 | |
and then 1 is composed as does Int does Rat does Complex | 15:40 | ||
Matt-W | Maybe | 15:41 | |
moritz_ | but is still of class Int, because that's what the user expects | 15:42 | |
Matt-W | I'm envisaging horrible method collisions | ||
15:42
SamB left
|
|||
masak | Matt-W: such as...? | 15:42 | |
Matt-W | Well I don't know, do Int and Rat and Complex have any same methods? | 15:43 | |
infix:<+> perhaps? | |||
moritz_ | Matt-W: since I'm not an implementor in the strict sense, I'll leave that to those who have to worry about it :-) | ||
Matt-W | or is that a multi sub | ||
moritz_ | those are all multis | ||
Matt-W | ah k | ||
so that should be okay then | |||
masak | multis solve all our problems :) | ||
15:43
SamB joined
|
|||
Matt-W | and we'd get ~~ for free | 15:43 | |
Is our multiple dispatch any different to the kind of thing C++ does with overloaded functions? | 15:44 | ||
I keep thinking it is, but then I'm not sure how | |||
moritz_ | basically there's a multi infix:<+>(Any, Any) that coerces both args to Num, and any num type may provide more specialized multis | ||
15:45
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
moritz_ | Matt-W: I think it's much more flexible, in many ways | 15:45 | |
Matt-W: iirc in C++ it's an error to call an overloaded function with an argument list that fits to two functions | |||
whereas in Perl 6 the narrowest wins | 15:46 | ||
PerlJam | C++ doesn't really do multiple dispatch does it? | ||
moritz_ | PerlJam: no, it resolves at compile time | ||
Matt-W | C++ resolves the narrowest at compile time | 15:48 | |
I know Perl 6 does it at runtime, which does change things a bit | |||
moritz_ | it changes in so far as dispatch happens wrt actual type, not declared type | 15:50 | |
in C++ if foo() returns Any, Any is used to dispatch, even if the actual value is a Foo which inherits from Any | |||
15:53
samlh joined
|
|||
Matt-W | aaaah | 15:56 | |
yes, that's definitely requiring runtime resolution | |||
16:03
maerzhase joined
16:08
justatheory joined
16:10
nihiliad joined
16:11
eternaleye left
16:26
stephenlb joined
16:29
spx2 left,
spx2 joined
16:35
ejs1 left
16:36
REPLeffect left
|
|||
rakudo_svn | r35891 | pmichaud++ | [rakudo]: spectest-progress.csv update: 294 files, 6500 passing, 11 failing | 16:40 | |
r35891 | pmichaud++ | Failure summary: | |||
r35891 | pmichaud++ | S12-role/namespaced.t aborted 3 test(s) | |||
r35891 | pmichaud++ | integration/99problems-21-to-30.rakudo aborted 8 test(s) | |||
16:41
zamolxes left
16:42
ejs joined
16:45
[particle]1 joined
16:50
[particle] left
16:51
km2 joined
|
|||
ruoso | moritz_, notice that now we have "multi infix:<+>(*@args)" instead | 16:52 | |
making it look more like lisp | |||
16:55
pmurias joined
|
|||
moritz_ | has + list associativity? | 16:58 | |
ruoso | all infex gained list associativity in a recent change in STD | 16:59 | |
pmurias | ruoso: hi | 17:00 | |
ruoso | hi pmurias | ||
moritz_, that doesn't seem to have made to the specs yet, but TimToady was very happy with the idea | |||
(and I'm happy too, actually) | |||
pmurias, in use Foo:from<perl5>, you could make the p5 package available (as the p5 string) as the type in Perl 6 | 17:02 | ||
then you could simply call Foo.method | |||
it's just making it bind | |||
&Foo := sub { $P5Interpreter.eval("Foo") }; | 17:03 | ||
Foo := $P5Interpreter.eval("Foo"); | |||
Foo:: := $P5Interpreter.eval("Foo"); | |||
(of course that can be simplified | |||
pmurias | would Foo:: work? | 17:04 | |
ruoso | yes, Foo:: is how the packages are stored in mildew | ||
they keep the sufix "::" | |||
while the type doesn't have it | |||
pmurias | $Foo::bar would end up "Foo"->{'bar'} in perl5 land | ||
ruoso | right... that means it isn't so simple | 17:05 | |
but at least the other two should work | |||
moritz_ | ruoso: and what about infix:</> and infix:<**> and all the like? | ||
where associativity actually matters? | |||
17:05
mberends left
|
|||
ruoso | moritz_, I'm not 100% sure, maybe it's better to look at std source | 17:06 | |
moritz_, but I could say that the order of the arguments could make the difference | 17:07 | ||
17:08
sjn joined
|
|||
pmurias | ruoso: is class Foo {} defining &Foo actually specced somewhere? | 17:08 | |
ruoso | pmurias, in STD... ;) | ||
even Array.new is parsed as Array().new() | 17:09 | ||
and Array is a type known by STD | 17:10 | ||
pmichaud | not all infix are list associative | ||
at least, not according to STD.pm. | |||
all list_infix are list associative. | |||
17:11
_jedai_ left
|
|||
ruoso | pmichaud, could you enumerate them? | 17:11 | |
pmichaud | constant %multiplicative = (:prec<u=>, :assoc<left>, :assign); | ||
constant %additive = (:prec<t=>, :assoc<left>, :assign); | |||
17:11
|jedai| joined
|
|||
pmurias | ruoso: you have seen all the is_types sprinkled around to forbid things such as Array 1,2,3? | 17:13 | |
ruoso | pmurias, yes, but that doesn't include Array.new | 17:14 | |
pmurias | TimToady: does class Foo {} declare a &Foo? | 17:15 | |
ruoso | if you try to do Foo.new STD will warn about unknown Foo routine | 17:16 | |
and return a parse tree exactly equal as Array.new | |||
pmichaud | that's not what I see. | 17:18 | |
I.e., I don't see that Array is treated as a listop. | |||
ruoso | hm? | 17:19 | |
I tried to parse "Foo.new" and "Array.new" | |||
and the result was considerably the same | 17:20 | ||
pmichaud | sure, they should be the same. | ||
I'm saying that Array.new isn't the same as Array().new() | |||
ruoso | pmichaud, right... but blabs.blobs should work if blabs is a sub | 17:21 | |
pmichaud | sure, in that case it's a listop. | ||
17:22
pbuetow joined
|
|||
ruoso | I've just outputted the parse tree for "Array.new" and "Fooey.new" | 17:22 | |
and ran a diff on the output of them | |||
and the only difference is the actual text | |||
pmichaud | where Fooey is a bareword or it's also a class? | ||
ruoso | where STD complains it is an unknown routine | 17:23 | |
pmichaud | I suspect a bug in STD.pm. | ||
I haven't see anything to suggest that typenames are listops. | |||
std: Array 1,2,3 | 17:24 | ||
p6eval | std 25000: OUTPUT«############# PARSE FAILED #############Syntax error (two terms in a row?) at /tmp/SKEr7flaQB line 1:------> Array 1,2,3 expecting any of: infix or meta-infix infix stopper standard stopper statement modifier loop terminator00:05 85m» | ||
ruoso | that's a parse failure because STD knows Array is a type | ||
std: Fooey 1,2,3 | 17:25 | ||
p6eval | std 25000: OUTPUT«Unknown routines: Fooey called at 0 00:06 104m» | ||
pmichaud | sure, barewords are treated as listops. | ||
17:25
araujo joined
|
|||
pmichaud | std: xyz 1,2,3 | 17:25 | |
p6eval | std 25000: OUTPUT«Unknown routines: xyz called at 0 00:06 104m» | ||
ruoso | pmichaud, the reason I think it's not a bug in STD is that TimToady is aware of the way it is parsed... | 17:27 | |
this issue was raised before | |||
pmichaud | okay, I'll ask a different question: Why do you think that Array.new is equivalent to Array().new ? | ||
17:28
ejs left
|
|||
ruoso | because it would require me to eventually make two lookups to tell what it is | 17:29 | |
so I make only one | |||
pmichaud | I don't understand. | ||
"make two lookups"? | |||
ruoso | Array.new in mildew currently renders into | ||
pmichaud | we know at parse time if what we have is a type. | ||
ruoso | LexicalScope<&Array>.postcircumfix:<( )>().new() | ||
pmichaud | that sounds like a bug in mildew then. | 17:30 | |
17:31
ejs joined,
mberends joined
|
|||
pmichaud | it's entirely possible that an implementation could choose to do it that way, however. | 17:32 | |
haven't thought about it much. | |||
17:32
sjn left
|
|||
ruoso | pmichaud, it allows me to make Array(Int) easily, tho | 17:34 | |
pmurias | pmichaud: the main problem is "if class Foo {};say &Foo" works? | ||
pmichaud | I don't think that "class Foo" should define &Foo, no. | 17:35 | |
std: class Foo {}; say &Foo; | |||
p6eval | std 25000: OUTPUT«00:05 83m» | ||
pmurias | ruoso: we have to make a lookup at compile time to check if &Array is defined too | ||
pmichaud | I wonder if that means something other than &Foo. | ||
[particle]1 | just because that parses doesn't mean it'll find &Foo | 17:36 | |
17:36
[particle]1 is now known as [particle]
|
|||
ruoso | std: &Foo # will it issue a warning? | 17:36 | |
pmichaud | ruoso: I can make Array(Int) easily also -- I just define a postcircumfix:<( )> on protoobjects. | ||
p6eval | std 25000: OUTPUT«00:05 87m» | ||
pmichaud | but postcircumfix on protoobjects is handled specially anyway | 17:37 | |
pmurias | shouldn't Array(Int) be &Array.(Int) | ||
? | |||
s/be/be treated as/ | 17:39 | ||
17:40
masak left
17:41
hercynium joined
|
|||
rakudo_svn | r35893 | coke++ | Revert add of Range.pick; while the no argument version here does better for | 17:50 | |
r35893 | coke++ | the simple case of (1..10000000).pick; it fails to handle other variants, causing | |||
r35893 | coke++ | spec test regressions. | |||
mberends | please could someone explain this Rakudo message: Method 'ACCEPTS' not found for invocant of class 'PGE;Match' | ||
pmichaud | what were you doing that generated it? | 17:51 | |
moritz_ | shouldn't PGE;Match be hidden from the user these days? | 17:52 | |
pmichaud | moritz_: it's a parrot error message. | ||
within rakudo they're known as "Match", but Parrot generates the 'method not found' messages so it uses the internal type name. | |||
17:53
ejs left
|
|||
pmichaud | alas, I have to leave for a while -- bbiaw | 17:53 | |
17:53
aindilis joined
17:54
spinclad joined
|
|||
mberends | within Pod::Parser from perl6-examples, not able to pinpoint the line because $*ERR is broken. Probably a $string ~~ / <Grammar::regex> / test, or passing the $/ from that as a method parameter. | 17:54 | |
TimToady | Type() is a special form, it is not a function call | 17:55 | |
likewise Type{}, in fact, they're somewhat related | |||
moritz_ | std: my UnknownType $x; | ||
p6eval | std 25000: OUTPUT«Unknown routines: UnknownType called at 1  my called at 1 00:05 85m» | 17:56 | |
TimToady | hmm, that's an interesting buglet | ||
moritz_ | that could be much more helpful ;-) | ||
TimToady | probably from backtracking too aggresively | 17:57 | |
let's see. not all infix are list assoc, as pmichaud pointed out | |||
all non methodcall operators are multi in the abstract, but the optimizer can know at compile time what the list of candidates is | 17:58 | ||
therefore if the candidates are known to implement in terms of a method, the method can just be called directly | 17:59 | ||
and at the moment I'm thinking that the '.' of .foo is an abstract multi call to the dispatcher, and the 'foo' is an argument to that dispatcher | |||
but that will certainly want to get optimized away whenever possible | 18:00 | ||
likewise it will be rare for a language to override any postcircumfix multi, so most of those disappear | |||
but if a lexical scope *does* override postcircumfix:<{ }>, we have to respect the new language | 18:01 | ||
pugs_svn | r25001 | pmurias++ | [mildew] | 18:02 | |
r25001 | pmurias++ | prefix:<=> is a method call | |||
r25001 | pmurias++ | accessor have a correct signature | |||
r25001 | pmurias++ | fixed AST::If.pretty | |||
r25001 | pmurias++ | [Multi.pm] | |||
r25001 | pmurias++ | &ROUTINE.back.lexical is traversed if exists | |||
r25001 | pmurias++ | we don't overwrite a named param | |||
r25001 | pmurias++ | changed @variables to $variables | |||
TimToady | ahem. prefix:<=> is *not* a method call | 18:03 | |
++ and -- are also multi, just on an lvalue, not an rvalue | |||
pmurias: see discussion above | 18:04 | ||
pmurias | seen it after commiting | ||
TimToady | :) | 18:05 | |
ruoso | TimToady, you're just breaking my legs | ||
;) | |||
pmurias | mildew doesn't implement multis yet so we can safely optimize prefix:<=> to a method call ;) | ||
TimToady | heh | ||
ruoso | SMOP is too much object oriented for we to think about dot as a multi | 18:06 | |
pmurias | maybe SMOP should have been multi oriented from the start... | 18:07 | |
ruoso | yeah... let's throw it away and restart it ;) | ||
ruoso needs to think how that will change the state of things... | 18:12 | ||
ruoso later & | |||
18:13
Maghnus left
|
|||
TimToady | ruoso: note you already have to be able to handle ."$foo" as a kind of argument to the '.' dispatcher | 18:14 | |
moritz_ | perl6: class A is Str { method b ($x) { say "{self}:$x" } }; my $y = A.new; b($y: 'foo'); | 18:19 | |
p6eval | pugs: OUTPUT«<obj:A>:foo» | 18:20 | |
..elf 25001: OUTPUT«Undefined subroutine &GLOBAL::infix_58_58 called at (eval 126) line 11. at ./elf_h line 4333» | |||
..rakudo 35894: OUTPUT«Statement not terminated properly at line 1, near "($y: 'foo'"current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)» | |||
18:20
rindolf joined
|
|||
pmurias | TimToady: the method call opcode takes the method name from a register in smop | 18:20 | |
18:22
maerzhase left
|
|||
TimToady | so semantically the "." is already a separate notion | 18:26 | |
the question is whether we allow a lexical scope to override the meaning of ".' | |||
moritz_ | perl6: sub f ($x as Str) { say $x.WHAT }; f(2) | ||
p6eval | pugs: OUTPUT«***  Unexpected "as" expecting "?", "!", trait, "=", default value, "-->" or ")" at /tmp/qSmmPVmqet line 1, column 11» | ||
..elf 25001: OUTPUT«Parse error in: /tmp/g8S06O31Bxpanic at line 1 column 0 (pos 0): Can't understand next input--giving upWHERE: sub f ($x as Str) { say $x.WHAWHERE:/\<-- HERE STD_red/prelude.rb:99:in `panic' STD_red/std.rb:76:in `scan_unitstopper' STD_red/std.rb:224:in `comp_unit' | |||
..STD_r... | |||
..rakudo 35894: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 1, near "as Str) { "current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)» | |||
18:27
jhorwitz joined
|
|||
TimToady | arguably . .* .? etc are all different dispatcher operators | 18:27 | |
pmurias | it wouldn't be very hard to handle overwriting on the compiler level | 18:30 | |
TimToady | well, that's throwing the control knob the other way completely | 18:32 | |
but multi dispatch gives a way to finesse overriding on a type basis | |||
so some types might use the overridden . while others use the base . | |||
and again, if there is no multi override, the compiler knows this, and can optimize the multi dispatch away entirely | 18:33 | ||
this is why we no longer look for multi defs in any package | 18:34 | ||
only in lexical scopes | |||
(including outer preludey scopes) | |||
if you want to increase the dynamism of multi dispatch to include run-time-modifiable packages, that would have to be a lexically scoped pragma | 18:35 | ||
which then calls the pessimizer on your code :) | |||
18:36
maerzhase joined
18:40
DemoFreak joined
18:42
Psyche^ joined
18:46
Patterner left,
Psyche^ is now known as Patterner
|
|||
moritz_ | std: sub f(:@a) { @a } | 18:52 | |
p6eval | std 25001: OUTPUT«00:05 84m» | ||
18:55
maerzhase left
18:57
spx2_ joined
|
|||
moritz_ | perl6: sub f(:@a) { say @a.WHAT }; f(:a<b c>); | 19:03 | |
p6eval | rakudo 35894: OUTPUT«Array» | ||
..pugs: OUTPUT«Array::Const» | |||
..elf 25001: OUTPUT«Can't locate object method "b" via package "c" (perhaps you forgot to load "c"?) at (eval 122) line 5. at ./elf_h line 4333» | |||
19:06
[particle]1 joined
19:10
spx2 left,
[particle] left
19:15
meltingwax left,
rob joined,
rob is now known as Guest34178
19:39
icwiener joined
19:47
Maghnus joined
19:50
|jedai| left
19:51
|jedai| joined
19:57
schmalbe left
20:24
|jedai| left
20:28
On left,
On joined
|
|||
ruoso | TimToady, pmurias, I think I'll leave unary ops override to be implemented after compiler bootstrap | 20:35 | |
so, for starts, mildew presumes there is no multi override for the unary ops | 20:36 | ||
even after we implement multi | 20:41 | ||
ruoso later & | 20:57 | ||
20:58
ruoso left
21:17
Eaglexx joined
|
|||
Eaglexx | Good evening to all User ;-) | 21:17 | |
mberends | howdy Eaglexx, wotcha doin' with perl6? | 21:18 | |
21:18
Eaglexx left
|
|||
mberends | somethin' I said? | 21:19 | |
21:20
pdcawley joined
21:21
Casan joined
21:25
eric256 joined
21:27
[particle] joined
21:28
eric256 left
21:37
bcallis joined,
bcallis left
21:43
bcallis joined
21:45
[particle]1 left
22:04
ejs joined
22:05
ejs left
|
|||
meppl | good night | 22:09 | |
22:09
wknight8111 joined
22:12
meppl left
22:15
ovid joined
22:18
pbuetow left
22:21
pbuetow joined
22:31
donaldh joined
|
|||
moritz_ | perl6: say eval q[my $x = 3; END { $x *= 4 }; $x]; | 22:52 | |
p6eval | pugs, rakudo 35896: OUTPUT«3» | ||
..elf 25001: OUTPUT«Unknown rule: statement_control:ENDIt needs to be added to ast_handlers. at ./elf_h line 2036» | |||
moritz_ | how do I test the availability of lexicals in an END block if I can't use outer lexicals? | 22:53 | |
22:59
spx2_ left
|
|||
mberends | pmichaud: ping | 22:59 | |
23:01
spx2 joined
23:02
donaldh left
|
|||
pugs_svn | r25002 | moritz++ | [t/spec] test that outer lexicals are visible in END { .. } blocks | 23:03 | |
23:03
hercynium left
23:05
pbuetow left,
zamolxes joined
|
|||
moritz_ | rakudo: say eval 'my $x = 3; END { 2 * $x }' | 23:08 | |
p6eval | rakudo 35896: OUTPUT«_block37» | ||
moritz_ | rakudo: say (eval 'my $x = 3; END { 2 * $x }').() | 23:09 | |
p6eval | rakudo 35896: OUTPUT«6» | ||
moritz_ | pugs: say eval 'my $x = 3; END { 2 * $x }' | ||
p6eval | pugs: OUTPUT«3» | ||
rakudo_svn | r35898 | moritz++ | [rakudo] add tests for RT #62260 (outer lexicals in END) to t/spectest.data | 23:10 | |
23:12
ovid left
|
|||
pugs_svn | r25003 | moritz++ | [t/spec] unfudge @.a[*-1] tests for rakudo | 23:12 | |
23:21
ovid joined,
ovid left,
alester left
23:29
pmurias left
23:48
[particle]1 joined
23:52
mberends left
23:53
iblechbot left,
vixey left
|