»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:12
whiteknight joined
00:17
thou left
00:22
aloha left
00:24
replore joined
00:25
hugme left
00:26
Juerd left
00:27
[Coke] left,
masak left,
Util left,
tadzik left,
PerlJam left,
thou joined
00:29
aloha joined
00:31
jaldhar left
00:32
Sarten-X left
00:39
abercrombie joined,
Sarten-X joined
01:07
envi_ joined
01:09
jaldhar joined
01:16
Util joined,
masak joined,
[Coke] joined
01:17
PerlJam joined
01:20
Entonian left
01:29
Juerd joined
01:43
tadzik joined
|
|||
japhb | phenny ask moritz now that [Coke] has confirmed I have a CLA filed with TPF, what do I need to do next to apply for a Rakudo commitbit? | 02:03 | |
02:06
whiteknight left
02:40
packetknife joined
02:41
envi_ left
02:42
wolfman2000 joined
02:44
tokuhiro_ joined
03:25
cooper left
03:31
cooper joined
|
|||
sorear | good * #perl6 | 03:36 | |
moritz | good morning | ||
sorear | I need to find a way to /ignore comments directed to or from p6eval | ||
03:36
japhb_ joined
|
|||
sorear | I'm doing the ?sorear|iecza search and it's mostly GlitchMr | 03:36 | |
japhb_ | sorear, I'm at my Perl Mongers meeting, and someone just asked about bindings to native libraries from Perl 6, and I remembered someone had connected to GTK using niecza. Do you remember who it was, and (pushing my luck here) where that project is? | 03:38 | |
moritz | japhb_: niecza repo, examples/gtk-* | 03:39 | |
03:39
Yappoko___ left,
PZt left,
apejens left,
apejens joined
|
|||
moritz | japhb_: mostly mberends++ | 03:39 | |
japhb_ | moritz++ # Thank you! | ||
03:40
Yappoko___ joined,
Trashlord left,
domidumont left,
lue left,
domidumont1 joined
|
|||
sorear needs to make time to drop by sandiego.pm some time | 03:40 | ||
03:41
lue joined,
Trashlord joined
03:42
thou left
|
|||
abercrombie | Does lines() read from $*ARGFILES or @*ARGS? | 03:44 | |
moritz | $*ARGFILES | 03:45 | |
03:46
cooper left
|
|||
moritz | japhb_: as for the commit bit, you don't need to do anything. If pmichaud agrees, you'll get one. I've contacted him by email | 03:46 | |
abercrombie | Thanks. But I found if I modify @*ARGS, then the subsequent lines() will read from what I set | ||
03:46
cooper joined
03:47
packetknife left
|
|||
moritz | well, $*ARGFILES does take it list of filenames from @*ARGS (and if empty defaults to $*IN) | 03:47 | |
so the two are connected, and it's this connection you are seeing | |||
japhb_ | moritz, thank you again (re: commitbint) | 03:48 | |
*commit bit | |||
abercrombie | Gotcha. Thank you. | ||
03:48
molaf joined
03:59
PZt joined
04:05
molaf left,
alc joined
04:07
cooper left
|
|||
PerlJam | re commit bit for japhb_ -- +1 | 04:09 | |
japhb_ | PerlJam, thank you. :-) | 04:10 | |
04:11
soh_cah_toa_ left
04:27
abercrombie left
04:31
lue left,
Yappoko___ left,
apejens left,
overrosy left,
pochi left,
japhb left
04:34
overrosy joined
04:37
lue joined,
Yappoko___ joined,
apejens joined,
pochi joined,
japhb joined
04:46
colomon left
04:49
colomon joined
05:06
wolfman2_ joined
05:08
wolfman2000 left
05:12
orafu left,
orafu joined
05:13
uniejo joined
05:15
uniejo left
05:17
SHODAN joined
05:19
japhb_ left
05:38
daniel-s left
05:53
daniel-s joined
06:05
wtw joined
|
|||
moritz | japhb: welcome as a rakudo committer! | 06:12 | |
oops, accidentally sent the mail to rakudobug, not to pmichaud | 06:13 | ||
sorear was wondering about that :D | |||
How confused would perl6-ers be if niecza started producing files with names like Run.Test.dll instead of Test.dll? | 06:14 | ||
moritz | moritzfail | ||
not more than that it generates .dll files at all :-) | |||
.exe and .dll on linux take some time to get used to | 06:17 | ||
japhb | moritz, excellent, thanks! | 06:18 | |
06:20
koban joined
|
|||
masak | moritz: I forwarded Robert's reply about RT not finding anything on "given". | 06:25 | |
apparently, since "given" is a registered user, RT assumes that was what we were searching for and produces nothing. | |||
moritz | masak: thanks, seen it | ||
masak | also apparently, this is a "feature", but at least Robert puts it in quotes and says that it might change in later versions. | 06:26 | |
06:27
finanalyst joined
|
|||
moritz | I hope it does, it makes the search DOSable | 06:27 | |
masak | how do you mean, "DOSable"? | 06:28 | |
finanalyst | rakudo: class D {has $.a = 9; has $.b = $.a eq 0 or $.a gt 20 ?? $.a !! 20 } | ||
p6eval | rakudo 97aa73: OUTPUT«Use of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:syntax error, unexpected COMMA (',') in file '(file unknown)' line 240» | ||
masak | finanalyst: 'eq' is for strings. | ||
finanalyst | rakudo: class E {has $.a = 9; has $.b = ($.a eq 0 or $.a gt 20) ?? $.a !! 20 } | ||
p6eval | rakudo 97aa73: ( no output ) | ||
masak | finanalyst: 'or' has loose precedence, as opposed to '||' | 06:29 | |
moritz | simply by registering the $n most common search terms as user names | ||
finanalyst | masak: i thought it was general and for numbers too | ||
masak | moritz: oh, I wasn't even thinking of it in terms of that; I just figgered it's in no way a feature and just Wrong. | ||
finanalyst: what made you think that? | |||
finanalyst | any way, it works with brakets and when not in a class, but not in a class definition | ||
masak: now you ask, I can't remember | 06:30 | ||
masak | rakudo: class E { has $.a = 9; has $.b = $.a }; say E.new.b | ||
p6eval | rakudo 97aa73: OUTPUT«9» | ||
masak | rakudo: class E { has $.a = 9; has $.b = $.a ?? $.a !! 20 }; say E.new.b | ||
p6eval | rakudo 97aa73: OUTPUT«9» | ||
finanalyst | masak: trying to keep up with changes is difficult | ||
masak | finanalyst: worksforme | ||
finanalyst: yeah but in this case nothing changed :) | 06:31 | ||
finanalyst | masak: class E works, class D creates an error | ||
masak | finanalyst: 'eq' is for strings in perl 5 too. | ||
finanalyst: that's because you used 'or'. | |||
finanalyst: which has loose precedence. | |||
that is, looser than '=' | |||
finanalyst | masak: when the expression is used in a normal expression, I got what i expected | 06:32 | |
masak | so it parses as '(has $.b = $.a eq 0) or $.a gt 20 ?? $.a !! 20' | ||
finanalyst | when in a class definition, i got a funny IMCC error | ||
ah, now I see | |||
masak | finanalyst: if you get what you wanted with '=' and 'or', it's by luck and you're not testing all cases. | 06:33 | |
sorear | o/ masak! | ||
finanalyst | masak: i'm not trying to test all cases. I got an error that was strange, so I tried to reproduce it | ||
masak | sorear: \o | ||
finanalyst: as far as that goes, it's great. keep it up :) | 06:34 | ||
finanalyst: I should be explicit about separating my thanks for your bug reporting from my critique of your choice of operators. :) | |||
finanalyst | masak: although my syntax was wrong, it seems to me that somehow the error should be trapped better | 06:35 | |
masak | definitely. | ||
sorear | masak: how foolish would I be to merge /serialize in the weekend before the release? | ||
masak: do you think I have enough users to care about waiting for it to stablize? :) | |||
finanalyst | masak: is == still the test operator for numbers, as in perl5? | ||
masak | sorear: not sure, but I'm willing to test it against my mid-sized application before you merge. I'm sure mberends et all will do the same. | 06:36 | |
finanalyst: yes. | |||
finanalyst | masak: thanx. for some reason I thought that == had been eliminated in favour of a more general operator | ||
sorear | masak: maybe we need something like plumage-smoke for Perl6land | 06:37 | |
masak | finanalyst: '== < > <= >=' is for numbers, 'eq lt gt le gt' is for strings. | ||
sorear: yes. | |||
finanalyst: there are these interesting "phantom improvements" that people think have happened to Perl 6 but that haven't. yours is a bit unusual. | |||
sorear | finanalyst: it's sort of the other way around. Str/Num allomorphism means you have to be clear what comparison type you're using | 06:38 | |
masak | the most common phantom improvement is where people believe that bareword keys in hashes are outlawed. we tell them "no, that's still fine" and they go "O RLY?" | ||
sorear | finanalyst: Perl 6's version of the allomorphism is a bit weaker and we have an === operator that can compare anything | ||
masak | Perl 6's allomorphism is cool. :) | 06:39 | |
finanalyst | i'm at a stage where i understand perhaps over 50% of perl6, but nowhere near everything. I'm also anxious to use perl6 for all the cool things. But I keep getting tripped up by changes | ||
sorear | TimToady++ # introducing me to the concept of allomorphism. Took longer to "get" than, say, monads | 06:40 | |
I'm an old Perl5 hand, and I like to think of 42 and "42" as fundamentally the same, so I don't use === much | |||
finanalyst | so when i've misunderstood something, i'm not sure whether its because i never did understand it, or i understood it once, and the language changed | ||
sorear | I know my code isn't careful to keep them straight | ||
It's possible Perl 6 is ultimately a simpler language than Perl 5. It's certainly much easier to parse. | 06:41 | ||
finanalyst | allomorphism????? wooo what?? where can i read up on it | ||
sorear | I've long since forgotten, if I got you a link it would be from Google | 06:42 | |
finanalyst | ok | ||
masak | finanalyst: you'll find that it's a fancy term for something that you already know. :) "scalar" is the allomorphic thing in Perl 5 for strings, ints, floats. | 06:46 | |
sorear | well yeah | 06:48 | |
all good ideas are the same as things I already know ;) but knowing the terms helps a lot just the same. | 06:49 | ||
masak | "allomorphic, n, Linguistics. one of the alternate contextually determined phonological shapes of a morpheme, as I<en> in I<oxen>, which is an allomorph of the English plural morpheme." | ||
sorear: agreed. | |||
sorear | oh hey | 06:50 | |
masak | oh, sorry. that was the entry for "allomorph". | ||
sorear plunks on'yomi/kun'yomi into a more general mental bucket. | |||
masak | I wonder what the exact relation between allomorphy and type punning is. | 06:57 | |
07:26
xinming joined
|
|||
masak uses @AoA»[0] in real code and feels pretty great about it | 07:36 | ||
07:37
wk left
|
|||
moritz | www.perlmonks.org/?node_id=933807 that rakudo dog would be called "Null PMC Access", no? :-) | 08:00 | |
08:03
agentzh joined
|
|||
sorear | InvalidCastException here I'm sure :-) | 08:06 | |
moritz | aye :-) | ||
niecza: +'a' | |||
p6eval | niecza v10-61-gbacff10: OUTPUT«Unhandled Exception: System.FormatException: Unknown char: a at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0  at System.Double.Parse (System.String s, IFormatProvider provider) [… | ||
moritz | or this one as second candidate :-) | ||
08:08
mj41_nb joined,
mj41 joined
08:16
koban left
|
|||
dalek | ast: be0ff5f | moritz++ | S12-construction/new.t: test nextwith() in .new method |
08:22 | |
moritz | rakudo: try { die 1; CATCH { die 2 } } | 08:23 | |
p6eval | rakudo 97aa73: OUTPUT«2 in block <anon> at /tmp/ke9dCRSykE:1 in block <anon> at /tmp/ke9dCRSykE:1 in block <anon> at /tmp/ke9dCRSykE:1 in <anon> at /tmp/ke9dCRSykE:1» | ||
08:26
dakkar joined
|
|||
dalek | ast: c3c9fb7 | moritz++ | S04-exception-handlers/catch.t: test throwing exceptions in CATCH blocks |
08:27 | |
moritz closes another 2-year old bug | |||
nom: ...('foo') | 08:28 | ||
p6eval | nom 97aa73: ( no output ) | ||
moritz | nom: !!!('foo') | ||
p6eval | nom 97aa73: OUTPUT«Stub code executed in block <anon> at /tmp/kKGKvghO_P:1 in <anon> at /tmp/kKGKvghO_P:1» | ||
moritz | rakudo: try { die 'omg!'; CATCH { say '$!'; } } | 08:38 | |
p6eval | rakudo 97aa73: OUTPUT«$!omg! in block <anon> at /tmp/oCb_62sHiz:1 in block <anon> at /tmp/oCb_62sHiz:1 in <anon> at /tmp/oCb_62sHiz:1» | ||
dalek | ecza/serialize: 9083142 | sorear++ | / (7 files): Switch to single-AppDomain execution As I thought, remote method invocation seems to have been the major bottleneck in /serialize. Using a lighter-weight isolation protocol has improved performance: (time mono-sgen run/Niecza.exe -C CORE) master: user 0m30.898s before: user 1m26.453s now: user 0m29.246s The new procedure uses only Assembly-level isolation: runtime assemblies are renamed to have names starting with Run.; so CORE.dll is the compiler's CORE and Run.CORE.dll is the user's. This seemed preferable over the reverse to avoid name clashes with perversely named user modules. |
08:45 | |
sorear | this is the "one big optimization" I was talking about yesterday. glad to see numbers confirming my hunches | ||
moritz | \o/ | 08:46 | |
rakudo: my %a; %a{ CATCH{} } | |||
p6eval | rakudo 97aa73: ( no output ) | ||
sorear | interestingly, the time required for 'mono-sgen run/Niecza.exe -e "say 2 + 2"' is statistically significant faster (3.8s vs 6.0s) | 08:47 | |
diakopter: ^^^ | |||
moritz | what about niecza startup time? | ||
dalek | ast: af82544 | moritz++ | S04-exception-handlers/catch.t: RT #80864 |
08:48 | |
sorear | moritz: won't be affected until I redo the bootstrap at the end of the month | ||
moritz | sorear: ok | ||
perl6: do { CATCH { }; CATCH { } } | |||
p6eval | niecza v10-61-gbacff10: OUTPUT«===SORRY!===Limit one CATCH phaser per block, please. at /tmp/udH7y94R5a line 1:------> do { CATCH { }; CATCH { } ⏏}Unhandled Exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE … | ||
..rakudo 97aa73: OUTPUT«===SORRY!===only one CATCH block allowed at line 1, near "}"» | |||
..pugs b927740: ( no output ) | |||
sorear | I now have the challenge of getting "make reboot" working again before Oct31 | ||
moritz | sorear: that error message doesn't match my understanding of English | 08:49 | |
sorear | moritz: it's a pun off a phrase commonly seen on advertisements in the USA - Great deal!!! Limit one $ITEM per customer. | 08:50 | |
moritz | ie I'm missing either a verb (if Limit is a noun), or a subject (if 'Limit' is a verb) | ||
sorear | the implied verb is "is" | ||
moritz | sorear: ah | ||
sorear | aka "sorear being too cute" | ||
dalek | ast: 7bf7582 | moritz++ | S04-exception-handlers/catch.t: only one CATCH per block, please |
08:52 | |
moritz is pleased to announce that all but one rakudobugs related to 'try' or 'CATCH' have been closed. mls_++ | 08:54 | ||
sorear -> sleeeep | 08:55 | ||
jnthn | moritz: \o/ | 08:56 | |
mls_++ indeed! | |||
moritz: Which one remains? | 08:57 | ||
moritz | jnthn: one related to warn | 08:58 | |
jnthn: which currently just cheats, and writes to $*ERR | |||
jnthn | ah, that may be resolved by an mls patch I didn't get to yet. | ||
moritz | nom: -> { return 1 } | 09:00 | |
p6eval | nom 97aa73: ( no output ) | ||
moritz | shouldn't we be able to catch that at compile time, since return is supposed to be lexotic? | 09:01 | |
nom: -> { return 1 }.() | |||
p6eval | nom 97aa73: OUTPUT«Attempt to return outside of any Routine in block <anon> at /tmp/buE64W0CCC:1 in block <anon> at /tmp/buE64W0CCC:1 in <anon> at /tmp/buE64W0CCC:1» | ||
jnthn | moritz: We could | 09:04 | |
moritz | otoh ... return isn't special syntax, so it's just a call | 09:05 | |
moritz did want to override return occasionally | |||
erm, on exactly one occasion so far | |||
nom: sub f { my sub return($x) { nextwith(2*x) }; return 5 }; say f | 09:06 | ||
p6eval | nom 97aa73: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&x' called (line 1)» | ||
moritz | nom: sub f { my sub return($x) { nextwith(2*$x) }; return 5 }; say f | ||
p6eval | nom 97aa73: OUTPUT«No dispatcher in scope in sub return at /tmp/r_CL9MbfVW:1 in sub f at /tmp/r_CL9MbfVW:1 in block <anon> at /tmp/r_CL9MbfVW:1 in <anon> at /tmp/r_CL9MbfVW:1» | ||
moritz | ah, because &return isn't a proper sub, but rather defined as my &return := BLOCK | 09:07 | |
jnthn | Well, also because...where are you going to nextwith to in a sub? :) | ||
(an only sub, that is) | |||
moritz | right :-) | ||
should be more like &OUTER::return() | 09:08 | ||
jnthn | oh, I see what you were trying to do | 09:10 | |
CORE::return perhaps :) | |||
moritz | is that implemented? | ||
nom: say CORE | 09:11 | ||
p6eval | nom 97aa73: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&CORE' called (line 1)» | ||
moritz | nom: say CORE::return | ||
p6eval | nom 97aa73: OUTPUT«Could not find symbol 'CORE::&return' in block <anon> at /tmp/wVyNz17DDv:1 in <anon> at /tmp/wVyNz17DDv:1» | ||
moritz | seems not :-) | ||
jnthn | ah, no, didn't do that yet | ||
moritz | nom: sub f { my sub return($x) { pir::find_outer_lex__PS('&return').(2*$x) }; return 5 }; say f | 09:12 | |
p6eval | nom 97aa73: OUTPUT«Use of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:syntax error, unexpected PREG, expecting '(' ('$P100') in file '(file unknown)' line 77177405» | ||
jnthn | That won't work because return in outer is...the return you're currently defining :) | ||
You'd have to look 2 frames out. :) | |||
moritz | nom: sub f { my sub return($x) { pir::find_caller_lex__PS('&return').(2*$x) }; return 5 }; say f | ||
p6eval | nom 97aa73: OUTPUT«maximum recursion depth exceeded in sub infix:<*> at src/gen/CORE.setting:2306 in sub return at /tmp/b7ZCXDD4yx:1 in sub return at /tmp/b7ZCXDD4yx:1 in sub return at /tmp/b7ZCXDD4yx:1 in sub return at /tmp/b7ZCXDD4yx:1 in sub return at /tmp/b7ZCXDD4yx:1 … | 09:13 | |
moritz | nom: sub f { my sub return($x) { pir::find_caller_lex__PS('&return').(10) }; return 5 }; say f | ||
p6eval | nom 97aa73: OUTPUT«(signal SEGV)maximum recursion depth exceeded» | ||
moritz | nom: sub f { my sub return($x) { callframe(1).my<&return>.(10) }; return 5 }; say f | ||
p6eval | nom 97aa73: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Any' in <anon> at src/gen/Metamodel.pm:3177 in sub return at /tmp/NJ0ewLo9ph:1 in sub return at /tmp/NJ0ewLo9ph:1 in sub f at /tmp/NJ0ewLo9ph:1 in block <anon> at /tmp/NJ0ewLo9ph:1 in <anon> at … | ||
moritz | nom: sub f { my sub return($x) { callframe(2).my<&return>.(10) }; return 5 }; say f | 09:14 | |
p6eval | nom 97aa73: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Any' in <anon> at src/gen/Metamodel.pm:3177 in sub return at /tmp/WCTRCwHqoW:1 in sub f at /tmp/WCTRCwHqoW:1 in block <anon> at /tmp/WCTRCwHqoW:1 in <anon> at /tmp/WCTRCwHqoW:1» | ||
moritz | meh | ||
jnthn | one more :) | ||
moritz | nom: sub f { my sub return($x) { callframe(3).my<&return>.(10) }; return 5 }; say f | ||
p6eval | nom 97aa73: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Any' in <anon> at src/gen/Metamodel.pm:3177 in sub return at /tmp/RxihKxF1K9:1 in sub f at /tmp/RxihKxF1K9:1 in block <anon> at /tmp/RxihKxF1K9:1 in <anon> at /tmp/RxihKxF1K9:1» | ||
jnthn | hmm. | ||
oh, wait... | |||
is callframe lexical or caller chain? | |||
moritz | caller chain | ||
jnthn | Well, the setting isn't in the caller chain :) | 09:15 | |
It's in the lexical one. | |||
moritz | right | ||
jnthn should implement CORE, OUTER etc. | |||
mls_ | nom: sub f { my sub return($x) { pir::find_lex_skip_current__PS('&return').(10) }; return 5 }; | 09:22 | |
p6eval | nom 97aa73: ( no output ) | ||
mls_ | (morning!) | ||
09:23
envi_ joined,
Vlavv_ joined
|
|||
moritz | nom: sub f { my sub return($x) { pir::find_lex_skip_current__PS('&return').(10) }; return 5 }; say f | 09:23 | |
p6eval | nom 97aa73: OUTPUT«(signal SEGV)maximum recursion depth exceeded» | ||
moritz | still finds my return, not the outer | ||
nom: sub f { my $r := pir::find_lex_skip_current__PS('&return'); my sub return($x) {$r(2 * $x) }; return 5 }; say f | 09:24 | ||
p6eval | nom 97aa73: OUTPUT«10» | ||
moritz | \o/ | ||
09:25
Vlavv` left
|
|||
moritz | nom: class A is int { has $.x } | 09:28 | |
p6eval | nom 97aa73: OUTPUT«===SORRY!===Method 'parrot_vtable_mappings' not found for invocant of class 'Perl6::Metamodel::NativeHOW'» | ||
jnthn | Well, that's LTA... | 09:29 | |
jnthn wonders if you should be allowed to do that. | |||
moritz | no | 09:30 | |
jnthn | nom: native A is int { } | ||
p6eval | nom 97aa73: ( no output ) | ||
jnthn | nom: native A is int { has $.x } | ||
p6eval | nom 97aa73: OUTPUT«===SORRY!===A native cannot have attributes at line 1, near " }"» | ||
moritz | I remember that deriving from native types may not change storage | ||
jnthn | right. | ||
It should fail but currently it fails for the wrong reasons. | |||
09:31
alc left
09:32
kfo_ joined
|
|||
moritz | akshually I found a small fail in the error message that is supposed to show up, and wanted to demonstrate that :-) | 09:33 | |
I guess I'll just commit it (after testing) | 09:34 | ||
nqp::bindattr(1, '$!foo', int, 3) | |||
nom: nqp::bindattr(1, '$!foo', int, 3) | 09:35 | ||
p6eval | nom 97aa73: OUTPUT«get_string() not implemented in class 'int' in block <anon> at /tmp/4cCrXBqNSA:1 in <anon> at /tmp/4cCrXBqNSA:1» | ||
09:35
kfo left
|
|||
moritz | nom: nqp::bindattr(1, int, '$!foo', 3) | 09:35 | |
p6eval | nom 97aa73: OUTPUT«Can not bind non-existant attribute '$!foo' on class 'int' in block <anon> at /tmp/lPj9ip4WsN:1 in <anon> at /tmp/lPj9ip4WsN:1» | ||
dalek | p: fd63797 | moritz++ | src/6model/reprs/P6 (2 files): fix copy&pastos |
09:36 | |
moritz | nom: int.^add_attribute(int, 1) | 09:37 | |
p6eval | nom 97aa73: OUTPUT«Method 'dispatch:<.^>' not found for invocant of class 'int' in block <anon> at /tmp/bx5Gs5aHcn:1 in <anon> at /tmp/bx5Gs5aHcn:1» | ||
moritz fails to show the failing fail :-) | |||
masak | I had a "caught exceptions too happily" situation today. one day it will sink in that I can't just check for failure, period. | 09:39 | |
moritz: the sooner your exception work lands, the better :) | |||
moritz | masak: agreed | 09:40 | |
but it must be done before it can land :/ | |||
nom: say X::Base.new | |||
p6eval | nom 97aa73: OUTPUT«Base.new(message => Mu)» | ||
moritz has been plowing his way through nqp/src/6model/reprs/ | 09:46 | ||
and all the .h files and most .c files look pretty understandable | |||
but P6opaque.c... wow. | |||
jnthn | :) | 09:48 | |
moritz: Well, it is basically computing C structure layouts along its way :) | |||
Then making sure we can efficiently GC-mark the appropriate parts of them. :) | |||
mls_ | it creates a entry->offset table | ||
jnthn | It's more fiddly than hard, really. | 09:49 | |
moritz | jnthn: I noticed the struct building. Which is why it does the crazy casting to char and then back to a void pointer and then back to a PMC pointer | ||
jnthn | crazy code is crazy | 09:50 | |
mls_ | (btw, why is the "hint" not simply called "slot"?) | ||
jnthn | mls_: We may not always be able to use it. | 09:51 | |
moritz | hysterical raisins, it seems | ||
jnthn | No, I still find hint fairly sane | ||
mls_ | yes, but in that case UNKNOWN_SLOT (aka -1) | 09:52 | |
jnthn | It conveys "here's a clue that you may be able to use to lookup faster" | ||
mls_: No, it's more than that. | |||
mls_: We can only rely on those to work out in SI situations. | |||
moritz | jnthn: so far it complains that the attribute doesn't exist if hint == 0 | ||
does that mean that some MI situations are still NYI? | |||
jnthn | No | 09:53 | |
MI works | |||
It just means we can't do that particular optimization in the case of MI. | |||
mls_ | see: slot = hint >= 0 && !(repr_data->mi) ? hint : ... | ||
jnthn | MI is still way better now than in the original way I was going to do P6opaque though :) | 09:54 | |
moritz | ah, I see(-ish) | 09:55 | |
in MI we have the additional try_get_slot call | |||
jnthn | nod | ||
tadzik | jnthn: btw, did you notice the time jump in settings compilation/spectests after the optimizer merge? | ||
jnthn | tadzik: Yeah | 09:56 | |
tadzik: The spectests are about the worst case for the optimizer. | 09:57 | ||
tadzik: No real loops or anything. | |||
tadzik: Setting compilation - it's worth the time spent there. | |||
tadzik | oh, so that's the reason for what I noticed recently | ||
sure | |||
jnthn | yeah but...for me it's not actually a huge jump. | ||
tadzik | :) | ||
I can imagine | |||
jnthn | Well but I mean as a percentage. | 09:58 | |
tadzik | hmm | ||
jnthn | It wasn't like "add optimizer, now it's twice as slow" | ||
tadzik | for me, it was | ||
moritz eagerly awaits his 12-core $work machine | |||
jnthn | OK, that's...odd. | 09:59 | |
jnthn wonders why there are such different relative differences. | |||
09:59
que joined
|
|||
tadzik | irclog.perlgeek.de/perl6/2011-10-19#i_4590435 | 09:59 | |
que | hi perl6 | 10:00 | |
10:00
replore left,
envi_ left
|
|||
tadzik | there is a possibility that there were many, many more tests though :) | 10:00 | |
hello que | |||
10:00
envi_ joined
|
|||
tadzik | I should check out flussence++'s graphs from those dates | 10:00 | |
que | I have a small question about mutable immutable | ||
tadzik | that's like a month | ||
que | my Int $i =5;$i =6; $i.say ; #6 | 10:01 | |
moritz hopes that immutables are not mutable :-) | |||
tadzik | well, it's not that dramatic it seems (number of tests) | ||
jnthn | tadzik: S05-rx/mass.t can be time consuming | ||
lunch - bbs | |||
tadzik | . o O ( launch ) | 10:02 | |
que | Int is a immutables type ,but it mutable | ||
moritz | que: the variable $i is mutable | ||
nom: 5 = 6 | |||
p6eval | nom 97aa73: OUTPUT«===SORRY!===Method 'lvalue' not found for invocant of class 'Float'» | ||
moritz | wow, didn't we have better error messages for that? | ||
que | $i is Int object? | ||
tadzik | yes | 10:03 | |
moritz | que: $i is a variable which holds an Int object | ||
nom: my $i := 5; $i = 6 | |||
que | Int is immutables? | ||
tadzik | hmm | ||
p6eval | nom 97aa73: OUTPUT«Cannot assign to a non-container in block <anon> at /tmp/G3JOnQW7KY:1 in <anon> at /tmp/G3JOnQW7KY:1» | ||
tadzik | true. Int is immutable, $i can hold one immutable object, and then another | ||
the object doesn't get changed, the value of $i does | |||
it's not like it's a constant | 10:04 | ||
que | can you show me a example ? immutable's example | ||
moritz | num: my $i := 3; $i = 6 | 10:05 | |
nom: my $i := 3; $i = 6 | |||
tadzik | num num num :) | ||
p6eval | nom 97aa73: OUTPUT«Cannot assign to a non-container in block <anon> at /tmp/QPGSxc4U7M:1 in <anon> at /tmp/QPGSxc4U7M:1» | ||
moritz | que: there you go | ||
que: $i is bound to an Int, so you can't assign a new value to it | |||
que | thanks moritz | ||
moritz | que: does that make sense to you? | ||
nom: 5++ | |||
p6eval | nom 97aa73: OUTPUT«Cannot assign to a non-container in sub postfix:<++> at src/gen/CORE.setting:2270 in block <anon> at /tmp/mWTnM2GQzP:1 in <anon> at /tmp/mWTnM2GQzP:1» | ||
moritz | another example | ||
que | not ? | ||
moritz can't parse that line | 10:06 | ||
que: the other important thing is that there are no methods in class Int which modify an Int instance | |||
tadzik | Date is immutable, you can't change the month. But keeping a Date in $a, you can assign a different Date to $a, and Date does not get changed, $a does. It's the same with Int, iiuc | ||
moritz | compare | 10:07 | |
nom: my @a = 3, 4; @a.push(5); say @a # the push mutates @a | |||
p6eval | nom 97aa73: OUTPUT«3 4 5» | ||
moritz | there aren't any comparable methods in Int | ||
10:08
lue left
10:09
saaki left
10:10
MayDaniel joined
|
|||
que | moritz:my $i := 5 ,$i must be 5 can't assign it 6,but can the example show Int is immutable? | 10:13 | |
moritz | que: no. The absense of a feature (mutability) can never be proven by examples | 10:14 | |
que: I can just show you examples how other objects mutate, and show that they don't work for Int. Maybe that convinces you, maybe not | |||
que | show me | 10:15 | |
moritz | I did | 10:16 | |
10:16
envi_ left
|
|||
que | Oh?? thanks | 10:16 | |
10:17
[Sec] joined
|
|||
moritz | masak: re gist.github.com/1293853, in role R[ {{{$foo}}}] { }, what does $foo contain? the AST of a parameter list? | 10:17 | |
10:18
saaki joined
10:19
envi_ joined
10:21
lue joined
10:24
grondilu joined
|
|||
grondilu | rakudo: my int $n; say $n = 42; | 10:24 | |
p6eval | rakudo 97aa73: OUTPUT«Method 'gist' not found for invocant of class 'Integer' in sub say at src/gen/CORE.setting:5281 in block <anon> at /tmp/0oeqA8MH_x:1 in <anon> at /tmp/0oeqA8MH_x:1» | ||
moritz | and if yes, does that mean that arbitrary parts of syntax can be replaced with a {{{ }}} block? | 10:25 | |
std: my $name; quasi { class {{{$name}}} { } } | |||
grondilu | I thought native integer were implemented? | ||
p6eval | std 580b69a: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/kVz_Nl_DW5 line 1:------> my $name; quasi { class {{{$name}}} ⏏{ } } expecting infix or meta-infixParse f… | ||
moritz | grondilu: yes, just probably not every case | ||
nom: my int $x = 3; say $x | |||
p6eval | nom 97aa73: OUTPUT«3» | ||
moritz | nom: my int $x = 3; say $x = 4 | ||
p6eval | nom 97aa73: OUTPUT«Method 'gist' not found for invocant of class 'Integer' in sub say at src/gen/CORE.setting:5281 in block <anon> at /tmp/kjpskFwLvE:1 in <anon> at /tmp/kjpskFwLvE:1» | ||
grondilu | oh, ok | 10:26 | |
moritz | that's a parrot Integer leaking through | ||
jnthn: ^^ | |||
nom: sub f($x) { $x * 2 }; say f(my int $a = 3) | 10:27 | ||
p6eval | nom 97aa73: OUTPUT«6» | ||
moritz | nom: sub f($x) { $x * 2 }; my int $a; say f($a = 3) | ||
p6eval | nom 97aa73: OUTPUT«6» | ||
moritz | nom: sub f($x) { $x * 2 }; my int $a; say f(($a = 3).gist) | ||
p6eval | nom 97aa73: OUTPUT«Method 'gist' not found for invocant of class 'Integer' in block <anon> at /tmp/S3WY55l0dR:1 in <anon> at /tmp/S3WY55l0dR:1» | ||
moritz | nom: my int $x = 2; $x.gist | ||
p6eval | nom 97aa73: ( no output ) | ||
moritz | nom: my int $x = 2; say $x.gist | ||
p6eval | nom 97aa73: OUTPUT«2» | ||
moritz sighs. We had such a nice insulation between parrot and rakudo types, and now they leak through when using native types :/ | 10:30 | ||
10:35
alc joined
|
|||
dalek | ast: 4cafc7d | moritz++ | S02-types/native.t: RT #102244, native ints leaking through in assginment |
10:35 | |
10:39
Trashlord left
|
|||
jnthn | moritz: It's just PAST::Compiler trying to be helpful and failing. | 10:48 | |
moritz: File ticket (if you didn't already); it's probably something in assign_op | 10:49 | ||
(Like it doesn't call box_native_if_needed on the PAST tree it produces) | |||
Another thing to deal with in QAST - let the language configure its box/unbox regime. | 10:51 | ||
10:56
grondilu left
|
|||
masak would like a guide for pronouncing "QAST" | 10:57 | ||
jnthn | .oO( d e qast ) |
11:01 | |
masak | :) | ||
11:02
que left
11:09
ab5tract joined
|
|||
masak | moritz: I think a lot of people who have the wrong expectations on junctions really want the amb special form from Lisp: community.schemewiki.org/?amb -- and IIRC a year or so back nothingmuch stopped by, had those expectations, and then implemented amb as a CPAN module. | 11:09 | |
maybe that should go in the FAQ :) | |||
ah, here's his blog post about it: blog.woobling.org/2009/08/abstracti...guity.html | 11:14 | ||
but I seem to misremember about the CPAN module. | |||
perl6: sub foo { our $a = 5 }; sub bar { say our $a }; bar; foo; bar | 11:17 | ||
p6eval | rakudo 97aa73, niecza v10-61-gbacff10: OUTPUT«Any()5» | ||
..pugs b927740: OUTPUT«» | |||
masak | \o/ | ||
...wonder what model Pugs has for 'our' variables... | |||
11:34
finanalyst left
11:36
DataLinkDKT joined
11:41
Patterner left
|
|||
moritz | jnthn: ticket filed | 11:42 | |
11:43
Psyche^ joined,
Psyche^ is now known as Patterner
11:56
JimmyZ joined
|
|||
moritz | masak: fix it :-) | 11:58 | |
masak | Pugs? yeah, in time... :) | 11:59 | |
I still haven't dived into setting up a Pugs development environment, but thanks to ingys explorations and yours, it feels quite approachable now. | |||
12:03
que joined,
replore_ joined
|
|||
que | moritz: can you give me an example about mutable | 12:04 | |
moritz | que: did you like my example with .push on the Array? | ||
que | I need to read it again | 12:05 | |
moritz wonders why he does all the typing when his examples are ignored anyway | |||
masak hugs moritz | |||
moritz | thanks | 12:06 | |
masak | moritz: just saw your question at irclog.perlgeek.de/perl6/2011-10-26#i_4616492 | 12:07 | |
moritz: when I wrote it I pictured it as one single parameter, not a parameter list. but yes, AST. | |||
moritz: I think it makes more sense to pass in lists of ASTs, not ASTs of lists, into macros. | |||
moritz | masak: now I'm mightily confused | ||
masak | let's hear it. | 12:08 | |
moritz | masak: because I thought that you can only substitute terms with {{{ $var }}} holes | ||
12:08
colomon left
|
|||
masak | aye. (btw, I prefer "placeholder" to "hole" nowadays) | 12:08 | |
moritz | std: my $op; quasi { 1 {{{ $op }}} 2 } | ||
p6eval | std 580b69a: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/g5MaPfOhaW line 1:------> my $op; quasi { 1 ⏏{{{ $op }}} 2 } expecting infix or meta-infixParse failedFA… | ||
masak | right. | ||
that will never work. | |||
moritz | masak: but the inside of role R[...] is parsed as a signature, not as a list of terms | 12:09 | |
masak | almost right. | ||
12:09
Trashlord joined
|
|||
masak | it *is* parsed as a signature. | 12:09 | |
but terms are part of a signature, in the form of type names. | |||
so it's OK there. | |||
moritz | std: my $thing; quasi { role R[{{{$thing}}}] { } } | 12:10 | |
p6eval | std 580b69a: OUTPUT«===SORRY!===Unable to parse generic role at /tmp/FDHAuBs39A line 1:------> my $thing; quasi { role R⏏[{{{$thing}}}] { } }Couldn't find final ']'; gave up at /tmp/FDHAuBs39A line 1:------> my $thing; quasi { role R[⏏… | ||
moritz | seems not very OK there | ||
que | moritz:another small question | ||
> my int $x =5 Use of uninitialized value in string context Use of uninitialized value in string context Use of uninitialized value in string context Use of uninitialized value in string context ===SORRY!=== Lexical '$x' is of wrong register type in lexical lookup | |||
masak | moritz: I don't think STD's quasi parsing handles that. | ||
moritz | masak: even if you could, that would only allow injection of constraints, not of parameters, right? | 12:11 | |
masak | moritz: also, I might simply be wrong about terms being OK there. | ||
moritz waits for the question | |||
masak | moritz: right, but the rest of the signature could be put outside of the placeholder as usual. | ||
moritz | oh, it seems that the REPL doesn't like native lexicals yet | 12:12 | |
masak: well, if terms are allowed, than only in the form of multi fib(0) { 1 } | |||
masak: so as a constraint, not as a declaration | 12:13 | ||
12:13
pernatiy joined
|
|||
moritz | so I don't see a big problem here | 12:13 | |
(hey, that's new, isn't it? *I* don't see a problem with something macro-related where masak sees a problem :-) | 12:14 | ||
masak | :-P | 12:15 | |
I'm not sure what arbitrary distinction you draw between constraints-as-types and constraints-as-values here... | 12:16 | ||
both are terms. | |||
12:16
molaf joined
|
|||
que | thanks | 12:16 | |
12:16
que left
|
|||
moritz | que: I've sent a bug report | 12:16 | |
masak | and in both cases, we're prevented from actually creating the role until macro-call o'clock. | 12:17 | |
12:17
alc left
|
|||
moritz | masak: constraints-as-types are optionally followed by *another* term-like thing (the parameter), so they need special parsing | 12:17 | |
hm, are we? do we need the constraints on an anonymous formal parameter to build the role? | 12:18 | ||
in analogy: sub f(0) { the body here doesn't need to know about the 0 } | |||
12:19
alc joined
|
|||
masak | true, but there are conceptual problems with building the signature (and therefore the sub) before we've filled in the placeholders. | 12:20 | |
these are immutable things, so it's hard to fake it and go back and fill in afterwards. | |||
moritz | right | ||
jnthn | But we don't parse term in the sub f(0) { case | 12:21 | |
We parse value. | |||
masak | clearly more research is needed in this area. | ||
right, it can't be term because that would get '$x' wrong. | |||
moritz | so by current understanding that means that no quasi placeholder can appear in the signature, except in where BLOCK clauses maybe | 12:22 | |
jnthn | Not quite true | 12:23 | |
Defaults are parsed as term. | |||
moritz | std: my $h; quasi { sub f($x = {{{$h}}}) { say $x } } | 12:24 | |
p6eval | std 580b69a: OUTPUT«ok 00:01 133m» | ||
JimmyZ | nom: my num $num; say $num++; | 12:25 | |
p6eval | nom 97aa73: OUTPUT«Cannot assign to a non-container in sub postfix:<++> at src/gen/CORE.setting:2697 in block <anon> at /tmp/snsnzj7U8Z:1 in <anon> at /tmp/snsnzj7U8Z:1» | ||
jnthn | std: my $h; quasi { sub f({{{$h}}}) { say $x } } | ||
p6eval | std 580b69a: OUTPUT«===SORRY!===Unable to parse signature at /tmp/n3DtpymxwY line 1:------> my $h; quasi { sub f⏏({{{$h}}}) { say $x } }Couldn't find final ')'; gave up at /tmp/n3DtpymxwY line 1:------> my $h; quasi { sub f(⏏{{{$h}… | ||
jnthn | Right, that's what I was expecting. | ||
(sorry if you already did it - I kinda skim-backlogged after a long meeting :)) | |||
JimmyZ: rw native parameters nyi | 12:26 | ||
(so we can't have native ++ yet) | |||
moritz | jnthn: are they even specced? | ||
jnthn | moritz: Well, they aren't outlawed by the spec... :) | ||
moritz isn't sure how much sense they make | 12:27 | ||
jnthn | Well, I'm not sure saying "you can't $i++ if $i is a native int" is going to fly | ||
moritz neither, but OTOH "we want that feature, so make it happen" makes sense and is possible in all cases | 12:28 | ||
the very point of int (vs. Int) is that it does *not* pass a reference, but the value | 12:29 | ||
jnthn | yeah | ||
Maybe it only works in the static case. | |||
moritz | static case? | ||
jnthn | e.g. we have to statically know it's going to bind to an rw parameter | ||
As in | |||
moritz | ah | ||
jnthn | If you don't statically know what you're calling, it won't work out. | 12:30 | |
JimmyZ | $num is not NaN, so what will $num++ be? | ||
1? | |||
jnthn | heh | ||
moritz | JimmyZ: the same as NaN + 1 | ||
jnthn | NaN ;) | ||
moritz | perl6: say NaN + 1 | ||
p6eval | pugs b927740, rakudo 97aa73, niecza v10-61-gbacff10: OUTPUT«NaN» | ||
JimmyZ | I'm curious, why my int $int default is 0, and my num $n default is NaN | 12:32 | |
moritz | JimmyZ: the idea is to mimic "undefined" as good as possibles | ||
JimmyZ: but 'int' doesn't have anything close to "undefined", so something else must be used. 0 is an obvious choice | 12:33 | ||
JimmyZ | maybe NaI | ||
moritz | JimmyZ: but floating point numbers support NaN, so it makes sense to use them | ||
JimmyZ: how would you store that in an integer register of your CPU? | |||
JimmyZ | perl6: say NaN ~ 1 + 1; | 12:38 | |
p6eval | pugs b927740, rakudo 97aa73, niecza v10-61-gbacff10: OUTPUT«NaN2» | ||
12:38
benabik left
|
|||
dalek | kudo/nom: cbc652c | moritz++ | docs/ChangeLog: add some ChangeLog entries |
12:38 | |
flussence | moritz: ever seen how javascript does it? it's scary :) | ||
moritz | flussence: javascript, or v8? | 12:39 | |
flussence | the one I read was about mozilla's implementation - they put the type data and the value in a single register... | ||
moritz | iirc using the highest bit to indicate "not a real int, interpret as a reference" or something | ||
masak | yuck. | 12:40 | |
JimmyZ | nom: my Num $num; say $num++ | 12:41 | |
p6eval | nom 97aa73: OUTPUT«0» | ||
mux | GHC (haskell) does something similar for optimisation purposes, albeint in a totally different context obviously | ||
(taking one or two bits our of an int) | 12:42 | ||
JimmyZ | my Num $num default is 0? | ||
moritz | JimmyZ: no | ||
jnthn | Default is the type object there. | ||
moritz | nom: my Num $num; say $num.perl | ||
p6eval | nom 97aa73: OUTPUT«Num» | ||
jnthn | If you succ on a Num, it becomes a 1 | ||
.oO( that sounded weird out loud ) |
12:43 | ||
JimmyZ | num $num ++ is different from Num $num ++ | ||
moritz | if you left out that 'on', it would've been much less weird :-) | ||
JimmyZ: num is different from Num in that num-typed variables can't hold a type object | |||
not sure if NaN is the best default though | |||
JimmyZ | nom: my Num $num = NaN; say $num++ | 12:44 | |
p6eval | nom 97aa73: OUTPUT«NaN» | ||
moritz | nom: say num ~~ num | ||
p6eval | nom 97aa73: OUTPUT«Method 'ACCEPTS' not found for invocant of class 'num' in block <anon> at /tmp/X4fqoPFeNW:1 in <anon> at /tmp/X4fqoPFeNW:1» | ||
moritz | nom: say num ~~ Num | ||
p6eval | nom 97aa73: OUTPUT«Bool::False» | ||
moritz | nom: say num ~~ Mu | ||
p6eval | nom 97aa73: OUTPUT«Bool::False» | ||
moritz | woah. | ||
JimmyZ | nom: my Num $num = NaN; say $num++; say $num++; say $num++ | ||
p6eval | nom 97aa73: OUTPUT«NaNNaNNaN» | ||
JimmyZ | nom: my Num $num; say $num++; say $num++; say $num++ | 12:45 | |
p6eval | nom 97aa73: OUTPUT«012» | ||
JimmyZ | nom: my num $num; say $num + 1; say $num + 2; | 12:46 | |
p6eval | nom 97aa73: OUTPUT«===SORRY!===Confused at line 1, near "say $num +"» | ||
jnthn | nom: say int ~~ Mu | ||
p6eval | nom 97aa73: OUTPUT«Bool::False» | ||
jnthn | hm :) | ||
JimmyZ | nom: my num $num; say $num+1; say $num+2; | ||
p6eval | nom 97aa73: OUTPUT«===SORRY!===Confused at line 1, near "say $num+1"» | ||
jnthn | Well, it's a native, not an object but... :) | ||
moritz | nom: say num.defined | ||
p6eval | nom 97aa73: OUTPUT«Method 'defined' not found for invocant of class 'num' in block <anon> at /tmp/IlMbHkpIGO:1 in <anon> at /tmp/IlMbHkpIGO:1» | ||
jnthn | Yeah, that's wrong | ||
nom: say num | |||
p6eval | nom 97aa73: OUTPUT«Method 'gist' not found for invocant of class 'num' in sub say at src/gen/CORE.setting:5281 in block <anon> at /tmp/VOY_dFDZTm:1 in <anon> at /tmp/VOY_dFDZTm:1» | ||
jnthn | huh | 12:47 | |
I'm sure that used to work. | |||
nom: say int | |||
p6eval | nom 97aa73: OUTPUT«Method 'gist' not found for invocant of class 'int' in sub say at src/gen/CORE.setting:5281 in block <anon> at /tmp/Q89tPGJ8Lj:1 in <anon> at /tmp/Q89tPGJ8Lj:1» | ||
moritz | jnthn: it even says 'class' in the error message, so if it's a class, it must be ~~ Mu :-) | ||
jnthn | I'm really sure that one did. | ||
nom: say int.^methods | |||
p6eval | nom 97aa73: OUTPUT«Method 'dispatch:<.^>' not found for invocant of class 'int' in block <anon> at /tmp/9kTKsV5nJE:1 in <anon> at /tmp/9kTKsV5nJE:1» | ||
moritz writes more tests | |||
JimmyZ | nom: my Num $num = NaN; say $num.WHAT | ||
jnthn | nom: say int.HOW.mro(int) | ||
p6eval | nom 97aa73: OUTPUT«Num()» | ||
nom 97aa73: OUTPUT«Method 'gist' not found for invocant of class 'int' in method gist at src/gen/CORE.setting:3680 in sub say at src/gen/CORE.setting:5281 in block <anon> at /tmp/Bi4RGUq83a:1 in <anon> at /tmp/Bi4RGUq83a:1» | |||
jnthn | oh | ||
that'll do it. | 12:48 | ||
masak | bug? | ||
jnthn | yeah, looks like | ||
masak submits | |||
jnthn | somehow it's not building the MRO properly. | ||
And since method dispatch and type checking are all done by MRO...yeah, not surprising. | |||
ENEEDMOARTESTS ;) | |||
moritz | really? I thought the problem is that .mro returns a Parcel, and Parcel.gist recurses into the elements | ||
and hits int.gist, and dies | 12:49 | ||
at least that's what the p6eval output tells me | |||
JimmyZ | anyway, (my Num $num)++ is deferent from (my num $num)++ is a little strange to me | 12:50 | |
moritz | nom: my int $x = 3; say $x.gist | ||
p6eval | nom 97aa73: OUTPUT«3» | ||
JimmyZ | s/deferent/different/ | 12:51 | |
12:54
im2ee joined
|
|||
moritz | masak: got a ticket number for the bug you just submitted? | 12:54 | |
im2ee | Hi. :) | 12:55 | |
moritz | hi im2ee | ||
masak | hi im2ee | ||
moritz: not yet; still looking for the start of the bug in the logs :) | 12:56 | ||
...and I got derailed into finding out whether irssi has search functionality... :/ | |||
dalek | ast: 29a84dc | moritz++ | S02-types/native.t: basic tests for native type objects |
||
moritz | masak: there's /lastlog, but it might not be flexible/nice enough for your needs | ||
masak | thanks. | 12:58 | |
the relevant log is longish, so this will take a few minutes. | |||
I'll post the URL when I've sent the email. | |||
13:01
alc left
13:04
bluescreen10 joined
|
|||
masak | moritz: rt.perl.org/rt3/Ticket/Display.html?id=102256 | 13:04 | |
jnthn | moritz: oh... | ||
moritz: I read the wrong live of p6eval output | 13:05 | ||
nom: say int.HOW.mro(int).elems | |||
p6eval | nom cbc652: OUTPUT«1» | ||
jnthn | ok, *that* is a problem :) | ||
moritz | aye :-) | ||
masak | ok, that goes into the ticket. | ||
moritz | masak: tested in S02-types/native.t | 13:07 | |
dalek | ast: 45800f1 | moritz++ | S02-types/native.t: label and extend tests for RT #102256 |
||
masak | moritz++ | ||
moritz | ah, I can add that note myself :-) | ||
moritz adds the 'testcommitted' tag | 13:08 | ||
13:11
tokuhiro_ left,
tokuhiro_ joined
|
|||
PerlJam | Have you guys seen www.infoq.com/presentations/Simple-Made-Easy ? | 13:11 | |
masak | yep :) | 13:12 | |
I mentioned it here the other day. | |||
PerlJam | yeah, I'm looking at it again and picking out things I missed the first time :) | ||
masak | irclog.perlgeek.de/perl6/2011-10-22#i_4601445 | ||
13:13
molaf left
|
|||
PerlJam | Perl 6 fares well as a language that allows for Simplicity as Hickey defines it. | 13:14 | |
masak | I should hope so! :P | ||
PerlJam: you probably saw this when I wrote it, but I like this example of Perl 6 simplifying my life: gist.github.com/1149245 | 13:15 | ||
PerlJam | yes, that is awesome. :) | ||
masak | it's like the Perl 6 code only focuses on delivering content, with all the fat trimmed. | 13:16 | |
that bit will definitely go in my Dancing Links reprise in London next month. :) | |||
moritz | :-) | 13:17 | |
moritz likes it | |||
masak | now, in terms of complecting things... you might argue that the Perl 5 version is long because it complects the circular list traversal and finding the smallest item. | 13:18 | |
moritz reads that blog post as "TLAs are LTA" :-) | 13:19 | ||
masak | because if you took those apart, you could at least use List::Util's &min | ||
moritz | does &min from List::Util support the equivalent of &by? | 13:20 | |
13:20
sayu joined
|
|||
masak | no :( | 13:21 | |
PerlJam | no, but there's List::UtilsBy | ||
masak | :P | ||
this will make a great set of slides... :) | |||
"...and here's the Perl 6 version..." | |||
PerlJam | it literally adds the "by" for all of min, max, uniq, zip, sort, etc. | 13:22 | |
moritz | zip_by ? | ||
hm, nope :-) | 13:23 | ||
masak | PerlJam++ | ||
PerlJam | LeoNerd++ (for writing the module so that Perl 5 can sort of compete with Perl 6 ;) | 13:24 | |
masak | note that Perl 6 de-complects out of the box. | 13:25 | |
I remember looking at the loop I had written, getting the realization that it could be made into a sequence operator. | |||
13:27
MayDaniel left
|
|||
masak | lazy lists rock. they allow you to decouple things and make them co-routine-like almost without thinking about it. | 13:27 | |
13:27
benabik joined
|
|||
PerlJam | Like past perls, once people get used to using these "higher level" constructs, they'll wonder how they ever got along without them :) | 13:29 | |
I just wonder how much of the Awesome Perl 6 will export outside of Perl | 13:30 | ||
masak | well, I think Perl 5 has shown so far that it adapts pretty nicely to the new tricks that Perl 6 provides. sometimes 'smartmatch' turns into 'psychoticmatch' along the way, but by and large, Perl 5 adapts. | 13:31 | |
what Perl 6 provides is something of a "full immersive experience". | |||
flussence ... installs ghc | 13:33 | ||
arnsholt | PerlJam: I think grammars as the natural next step to regexes will catch on (eventually) | 13:34 | |
13:34
abercrombie joined
|
|||
arnsholt | The full range of awesome in P6 grammars might be hard to put into some languages, but grammars are a more natural way to express these things, on the whole | 13:34 | |
PerlJam | arnsholt: I tend to agree, but only time will tell. | 13:36 | |
13:36
im2ee left
|
|||
arnsholt | Oh yes, definitely | 13:36 | |
13:36
im2ee joined
|
|||
arnsholt | Lazy lists are likely as well. The growing interest in Haskell and friends points in that direction as well | 13:37 | |
PerlJam | I wonder if Perl 6 feature adoption in Perl 5 could be used as an indicator about Perl 6 feature adoption in the wild | ||
masak | probably not. Perl 5 people are usually a bit ahead of any such curve. | ||
so maybe it's a good predictor ;) | 13:38 | ||
PerlJam | maybe | ||
arnsholt | Yeah, it's not a perfect model, but as a proxy it's probably not entirely useless | ||
(To first order, and all that =) | |||
PerlJam | lazy lists will be hard for most other languages to adopt because to be useful, they need to be pervasive. | 13:39 | |
masak | aye. | 13:40 | |
jnthn | The hard thing was getting them to be eager enough in the right places so as to avoid surprises. | ||
Which got a bunch easier to do when pmichaud++ came up with the immutable iterator model. | 13:41 | ||
moritz wonders if it's possible to make a for 1..100 { } in sink context about as fast as iterating with native ints | 13:42 | ||
masak | if you can compile it into a while loop, why not? | 13:44 | |
moritz | I was more thinking along the lines of haviing hash.map produce some "intelligent" iterator that, when in sink contest, does it at run time | 13:45 | |
jnthn | The thing is that you have a block at runtime. | ||
The cost is muchly in that invocation too | 13:46 | ||
Whereas the while loop tends to flatten out. | |||
Well, with --optimize=3 at the moment | |||
moritz | well, that's still much better than the call chain we have now | ||
jnthn | But maybe we should try brining that one into level 2 for the November release | ||
moritz | with eager, eager, gimme, reify, reify, reify or so | ||
13:46
SHODAN left
|
|||
masak | jnthn: no rush :) | 13:46 | |
jnthn | Yeah, I mentioned to Pm that I suspect we have one too many layers. | ||
masak: well, it's only changing a number to do it ;) | 13:47 | ||
The next thing the optimizer needs to do is learn that variables exist. | |||
Today it lives in mostly blissful ignorance of them :) | |||
moritz | :-) | ||
moritz thinks an NQP optimizer would be more important for now | 13:48 | ||
masak | quite possibly. | ||
jnthn | Well, it needs that variable analysis. | ||
In many senses, I need to solve the same kind of analysis problem for both. | 13:49 | ||
masak | similar-ish languages, are they? :P | ||
jnthn | Apparently :P | ||
13:52
darkop joined
13:55
mikemol left
|
|||
arnsholt | I'm getting an urge to make something better than make. Someone whack me =) | 13:56 | |
13:56
mikemol joined
|
|||
moritz hugs arnsholt | 13:56 | ||
arnsholt | Or that =D | ||
masak tickles arnsholt with a goose feather | |||
flussence | have a look at redo before you go doing that | ||
masak | or rake. | ||
benabik | cmake? | 13:57 | |
flussence | github.com/apenwarr/redo - I haven't used it, but it looks nicest of the alternatives I've seen | ||
moritz | cmake just creates Makefiles, no? | ||
.oO( Module::Build ) |
13:58 | ||
benabik | moritz: No idea. | ||
arnsholt | flussence: Oooh, never heard of redo before | ||
moritz | benabik: at least that's a project I used handled it | ||
arnsholt | Sounds shiny from the opening paragraph | ||
masak | I was just thinking the same :) | ||
13:59
thou joined
|
|||
moritz remembers reading the original notes, being excited for a minute, and then discarding it | 14:00 | ||
arnsholt | I've had this idea of a better make several times, but each time I'm reminded of a quote from someone I had a chat with at Opera: "make sucks. It's just too bad all the alternatives suck even more." | 14:01 | |
PerlJam | People have been trying to create a better make for *decades* | ||
mux | did you mean, people have been creating better makes for decades, /6xB0 | 14:02 | |
make that ? :-) at the end | |||
PerlJam | heck ... one of the first disucsisons I had on IRC about programming stuff was how much make sucked and that it needed to be replaced with something better. | 14:03 | |
moritz | ah well, no Windows support | ||
PerlJam | That was in 1992 or so. | ||
benabik | moritz: The problem with Windows support is that you either reinvent shell syntax or miss some power of Make because you don't support shell syntax. :-/ | 14:04 | |
mux | scons is not bad at all | ||
masak | ah! 'scons' was the name I was looking for. | ||
mux++ | |||
moritz | benabik: I'm well aware of the problems. It's solutions I'm looking for :-) | ||
mux | I wish it didn't allow full python syntax however, that's quite dumb since people are now able to create SConstruct files that won't work with some python versions | 14:05 | |
PerlJam has heard of "cons", but not "scocs" | |||
er, scons | |||
mux | they definitely didn't need the full power of the language | ||
PerlJam: well, it's supposed to be cons successor | |||
moritz | mux: but I'm sure it made the implementation much easier :-) | ||
[Coke] | why are we talking about improving make? don't we have better things to do? | ||
mux | moritz: yeah :-) | ||
benabik | [Coke]: #perl6 distracted? That never happens. | 14:06 | |
[Coke] | I have to use ANT regularly, don't get me started. :P | ||
mux | oh man, ant | ||
stupid XML configuration files for builds | |||
benabik | moritz: I've found Rake to be reasonable since I get the power of Ruby instead of sh. But like everything else, it has its problems. | ||
mux | ant is such a nightmare | ||
moritz | ah right, I wanted to fix feather for [Coke]++ | ||
masak | Ant definitely uses XML in a way no-one ever should. | ||
benabik | Hm. Redo really is fascinating. | 14:07 | |
mux | I wish people understood how XML /may/ be approrpiate for exchanging data between possibly very different systems, but that there's no way in hell it's appropriate to present a XML configuration file to a human | ||
moritz | [Coke]: trouble is, feather has only about 1G of RAM, and rakudo build on amd64 needs about 1.5G :( | ||
mux: and it was never meant to be a data exchange format, just a markup language | 14:08 | ||
jnthn wishes he knew where it all went | |||
moritz | it's a nice markup language for sure | ||
benabik | Although I think a .do file only fails if the last command failed. :-/ | ||
moritz | can't you do a set -x or so? | ||
[Coke] | moritz: to increase the limit? not past the system default. | 14:09 | |
moritz | [Coke]: sorry, that was to benabik | ||
mux | moritz: it's not so bad as an interchange format, because thanks to the huge number of XML related standards and nearly ubiquitiuous language support, you get something that you can use to store data/parse data/validate data for nearly free | ||
[Coke] | moritz: ah, yes. | ||
benabik | moritz: Yes, although I dislike systems that have "all your files should include ___ at the beginning". Make the default safe. | 14:10 | |
benabik will stop pretending this is #redo instead of #perl6 now. | |||
mux | oh, and it gives you structure and deals with character encodings itself. | ||
moritz | ... which partially relies on autodetection | 14:11 | |
mux | yeah but that's because OSes didn't catch up and fail to give applications proper MIME types for files :-) | ||
moritz stops pretending this is #xml-rant instead of #perl6 :-) | 14:12 | ||
mux stops pretending | |||
masak | ooh, #xml-rant! | 14:13 | |
14:13
cognomore left,
cognomore joined
|
|||
dalek | ast: c3a585e | (Solomon Foster)++ | S16-filehandles/filetest.t: Fudged for niecza. |
14:14 | |
ast: 6a5a339 | (Solomon Foster)++ | S32-num/complex.t: Fudge for Niecza. |
|||
ast: 016a50f | (Solomon Foster)++ | S32-num/exp.t: Fudge for Niecza. |
|||
ast: 7560a7a | (Solomon Foster)++ | S32-num/int.t: Make Niecza-friendly: don't assume Rats stringify the same as Nums, and fudging. |
|||
14:15
tokuhiro_ left
|
|||
masak | perl6: say 5/4 | 14:16 | |
p6eval | niecza v10-61-gbacff10: OUTPUT«5/4» | ||
..pugs b927740, rakudo cbc652: OUTPUT«1.25» | |||
masak | isn't that a Nieczabug? | ||
moritz | it is | 14:17 | |
masak submits it | |||
any relevant synopsis I can quote? | 14:18 | ||
PerlJam | masak: hey ... supposedly the TPF voted (or whatever) on your grant proposal ... have you heard anything? | ||
moritz | masak: you can cite roast :-) | ||
masak | PerlJam: haven't heard anything yet, no. | 14:19 | |
moritz | masak: S02: say 1/5; # 0.2 exactly (not via Num) | ||
masak | moritz++ | 14:20 | |
PerlJam | masak: bummer. Maybe it's time to ping Karen again :) | 14:21 | |
masak | perl6: say 1/3 | ||
moritz | ... though by latest spec that's .gist, and not .Str | ||
p6eval | rakudo cbc652: OUTPUT«0.333333333333333» | ||
..pugs b927740: OUTPUT«0.3333333333333333333333333333333333333333» | |||
..niecza v10-61-gbacff10: OUTPUT«1/3» | |||
moritz | perl6: say (1/2).Str | ||
p6eval | niecza v10-61-gbacff10: OUTPUT«1/2» | ||
..rakudo cbc652: OUTPUT«0.5» | |||
..pugs b927740: OUTPUT«*** No such method in class Rat: "&Str" at /tmp/JaZi9iv517 line 1, column 5 - line 2, column 1» | |||
moritz | ok, that is wrong at least | ||
masak | PerlJam: feel free. in the meantime, I'm finding a few macro tuits here and turning them into commits or design gists. | 14:22 | |
moritz: you mean Rat.gist isn't defined in the spec? sounds like something that should be spec'd if you ask me. | 14:23 | ||
dalek | ast: 47573c5 | (Solomon Foster)++ | S32-num/exp.t: Fix niecza fudging. |
14:24 | |
moritz | masak: no. I mean that the 'say 1/2' line invokes .gist on the Rat | ||
dalek | ecza: e4121a3 | (Solomon Foster)++ | lib/CORE.setting: Add log subs and log10 sub and method. |
||
ecza: 9b24a83 | (Solomon Foster)++ | lib/CORE.setting: Add unpolar and cis. |
|||
ecza: 9b9d1c0 | (Solomon Foster)++ | lib/CORE.setting: Add exp($x, $base). |
|||
ecza: 519e0b6 | (Solomon Foster)++ | lib/CORE.setting: Add Complex.polar. |
|||
ecza: 71325b0 | (Solomon Foster)++ | t/spectest.data: Turn on S32-num files that now work. |
|||
moritz | masak: and not .Str. So the spec doesn't talk about .Str stringification there | ||
masak | moritz: yes, I understand. | 14:25 | |
maybe that bit of spec just needs clarifying. | |||
moritz | well, it is very silent on most .gist'ifications, and on many .Str'ifications | 14:26 | |
14:26
JodaZ left
|
|||
moritz | S02 is a weird mixture of "bits and pieces" and incomplete API documentation | 14:26 | |
masak | perfect for someone to just guerrilla-spec at some point. | 14:35 | |
moritz | quick straw poll: should Rat.new(2, 1) stringify to 2.0 or to 2? | 14:36 | |
and should 2e0 stringify to 2 or 2e0? | |||
PerlJam | 2.0 | ||
masak | 2.0 | ||
moritz: what does 2e1 stringify to? | |||
moritz | masak: 20 or 20e0 | ||
[Coke] | coming from tcl, I'd prefer the .0 on the end. | ||
flussence | perl6: say (eval '2.0').perl | 14:37 | |
masak | moritz: scientific notation feels like Num to me, but if they're Int then maybe they can stringify like Int. | ||
p6eval | pugs b927740, rakudo cbc652, niecza v10-66-g71325b0: OUTPUT«2/1» | ||
flussence likes round-tripping | |||
rakudo: say (eval '2.0').Str.eval.perl | |||
p6eval | rakudo cbc652: OUTPUT«2» | ||
flussence | hm | ||
perl6: say (eval '2.0').Str.eval.perl | |||
p6eval | rakudo cbc652: OUTPUT«2» | ||
..pugs b927740: OUTPUT«*** No such method in class Rat: "&Str" at /tmp/mivPVyzw7Y line 1, column 5 - line 2, column 1» | |||
..niecza v10-66-g71325b0: OUTPUT«Unhandled Exception: Unable to resolve method eval in class Str at /tmp/6bZqfMADY_ line 1 (MAIN mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 2193 (CORE C1051_ANON @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 2194 (CORE module-CO… | |||
14:38
cognomore left,
cognominal_ joined,
cognomore joined
|
|||
flussence | perl6: say eval((eval '2.0').Str).perl | 14:38 | |
p6eval | niecza v10-66-g71325b0: OUTPUT«2/1» | ||
..rakudo cbc652: OUTPUT«2» | |||
..pugs b927740: OUTPUT«*** No such method in class Rat: "&Str" at /tmp/0q2Ojup5PN line 1, column 10-26» | |||
PerlJam | moritz: I'm with masak on scientific notation | ||
though I never think of a number in scientific notation as "integer"; they're always some floating point thing in my head. | 14:39 | ||
(at least historically) | |||
moritz will regret this one | 14:40 | ||
14:41
cognominal left
|
|||
masak | 'what will 2e0 stringify to?' might be the wrong question. 'what type does it parse to?' sounds like a more immediate question. | 14:42 | |
moritz | Num | 14:43 | |
the spec is pretty clear | |||
14:43
im2ee left
|
|||
flussence | (do we even have any types that stringify to scientific notation?) | 14:43 | |
moritz | on this account | ||
PerlJam | flussence: I hope not | 14:44 | |
14:44
im2ee joined
|
|||
moritz | flussence: strings which contain numbers in scientific notation :-) | 14:44 | |
14:46
skangas joined
|
|||
[Coke] | hurm. so, I change my mind: Floats should stringify with .0 even if they're intable. Rats should stringify to ints if they can. | 14:49 | |
masak | agreed. | 14:50 | |
dalek | ecs: 660b108 | moritz++ | S02-bits.pod: [S02] define .Stringy and .gist for Num and Rat leave a bit of wiggle room in the Num stringification fow now. |
||
moritz | then please change the spec too, not just your mind :-) | 14:51 | |
masak | actually, I don't mind if 4/1 stringifies to 4/1 either. | ||
moritz | pugs: say 1/7 | ||
p6eval | pugs b927740: OUTPUT«0.1428571428571428571428571428571428571429» | ||
moritz | it used to answer with 1/7 at one point | ||
I hated it | |||
masak | yeah. | ||
moritz | I *knew* that I asked it for the value of 1/7. | ||
masak | Rats should stringify to their decimal expansion. | ||
we're just talking about the Int case here. | 14:52 | ||
moritz | you mean where .denominator == 1? | ||
masak | or rather, the "denominator in the reduced fraction is 1" case. | ||
right. | |||
[Coke] | should 4/2 stringify the same as 2/1 ? | 14:53 | |
moritz | masak: so what changed your mind? | ||
[Coke]: yes | |||
[Coke] | ah, catching up, reduced, aye. | ||
14:53
nornagest joined
|
|||
[Coke] | rat's aren't floats. | 14:53 | |
masak | moritz: correctly understanding the domain we were moving in. | 14:54 | |
moritz: I don't like for pi to stringify to something with 'e0' at the end, for example. | |||
moritz | masak: and it won't | 14:55 | |
S02:3543 constant pi is export = 3.14159_26535_89793_23846_26433_83279_50288; | |||
that's a Rat, not a Num | |||
masak | fair enough. | ||
it makes things a bit better... | |||
...but I think I still prefer Rats and Nums to stringify the same, rather than to have Nums append 'eN' to stuff. | 14:56 | ||
Num is a sort of inaccuracy fallback for Rat, after all. | |||
moritz doesn't care too strongly either way, as long as it's specced and consistent | |||
perl6: say 2e0 ** 35 | 14:57 | ||
p6eval | pugs b927740, rakudo cbc652, niecza v10-66-g71325b0: OUTPUT«34359738368» | ||
moritz | perl6: say 2e0 ** 65 | ||
p6eval | pugs b927740: OUTPUT«36893488147419103232» | ||
..niecza v10-66-g71325b0: OUTPUT«3.68934881474191E+19» | |||
..rakudo cbc652: OUTPUT«3.68934881474191e+19» | |||
masak | I'll have a look at the spec tonight after $dayjob, unless someone beats me to it. | ||
14:57
sivoais left
14:59
slavik1 left,
slavik2 joined
|
|||
masak | std: if 42 { say "A" } else if 5 { say "B" } | 15:01 | |
p6eval | std 580b69a: OUTPUT«===SORRY!===Please use 'elsif' at /tmp/kf213KjczR line 1:------> if 42 { say "A" } else if ⏏5 { say "B" }Confused at /tmp/kf213KjczR line 1:------> if 42 { say "A" } else if ⏏5 { say "B" } expecting stat… | ||
masak | perl6: if 42 { say "A" } else if 5 { say "B" } | 15:02 | |
p6eval | rakudo cbc652: OUTPUT«===SORRY!===Missing block at line 1, near "if 5 { say"» | ||
..niecza v10-66-g71325b0: OUTPUT«===SORRY!===Please use 'elsif' at /tmp/fgP25RSzdE line 1:------> if 42 { say "A" } else if ⏏5 { say "B" }Two terms in a row at /tmp/fgP25RSzdE line 1:------> if 42 { say "A" } else if ⏏5 { say "B" }… | |||
..pugs b927740: OUTPUT«***  Unexpected "if" expecting "=" or bare or pointy block construct at /tmp/TEvJkbeeLF line 1, column 24» | |||
masak | rakudo-- pugs-- niecza++ | ||
[Coke] occasionally wonders: if we have to recognize "else if" to complain about it, why not just support it instead. | 15:04 | ||
(instead of complaining, not instead of elsif) | |||
moritz | [Coke]: it introduces the dangling-else ambiguty again | ||
15:04
sayu left
|
|||
moritz | if 1 { } else if 2 { } else { } # does the 'else' belong to 1 or to 2? | 15:05 | |
that's a pitfall that Perl generally avoids by requiring blocks after if/elsif/else, and by having 'elsif' separate from 'else if' | |||
JimmyZ | how does C do it? | 15:06 | |
[Coke] | I would expect it to work the same as if you had used elsif. | ||
moritz | iirc it just disambiguates one way or another | ||
JimmyZ would like to else if = elsif | |||
mux | yeah, that's why you often have to wrap macros inside do { ... } while (0); blocks | 15:07 | |
to avoid unexpected problems when your macro is used as: if (foo) MACRO; | |||
in moritz's example, I believe C intreprets it as if 1 { } else { if 2 { } else { } } | |||
not sure though | 15:08 | ||
moritz wonders if the two cases are actually semantically distinct | |||
flussence | I don't see any way for that to be ambiguous, unless the language allows one `if` to have multiple `else` blocks attached, which doesn't make sense to me | 15:09 | |
JimmyZ hates elsif :) | |||
masak | JimmyZ: tell me why. | ||
mux | moritz: mmm, I think you're right, it doesn't matter one way or the other :-) | 15:10 | |
JimmyZ | because I use PHP too. when I use else if in perl, I always got a unexpected wrong | ||
or switch from other languages | 15:11 | ||
jnthn | decommute & | ||
flussence | if/else if/else is just a longer way of writing `$if-clause ?? ... !! $else-if-clause ?? ... !! ... # else`, and that's well-defined (well, in most languages...) | ||
masak | JimmyZ: if you have that as a reason, you must also respond to moritz's reason for having 'elsif'. | ||
JimmyZ | elseif is ok to me too. | 15:12 | |
flussence | (of course, in PHP, nested ternaries behave as uselessly as possible...) | 15:14 | |
(wow, ghc takes a *long* time to compile...) | 15:16 | ||
15:18
fsergot left
15:20
sivoais joined,
sivoais left
|
|||
sorear | good * #perl6 | 15:21 | |
15:21
sivoais joined,
wtw left
|
|||
masak | hi sorear | 15:23 | |
masak decommutes | |||
JimmyZ | what's different between 'if 1 { } else { if 2 { } else { } } ' and 'if 1 { } elsif 2 { } else { } ' | ||
the first is C and the second is Perl6 | 15:25 | ||
abercrombie | no difference | 15:27 | |
JimmyZ | 'if 1 { } else if 2 { } else { } ' in C and 'if 1 { } else { if 2 { } else { } } ' ? | 15:28 | |
'if 1 { } else if 2 { } else { } ' in C and 'if 1 { } elsif 2 { } else { } ' in Perl 6? | 15:29 | ||
abercrombie | still no difference since those 2 forms in C are the same. | 15:30 | |
moritz | I was wrong earlier | ||
the difference really comes from forcing blocks | |||
sorear | JimmyZ: the elsif version has fewer braces | ||
moritz | not from the 'elsif' vs. 'else if' distinction | 15:31 | |
geekosaur | blah. mono-sgen cores on my Air w/latest Mono... (mono works but seems like it's slower?) | ||
geekosaur shouldn't be doing this, probably, but wished he'd had a p6 over the weekend | 15:32 | ||
JimmyZ | sorear: but why disallowed 'else if' | 15:33 | |
abercrombie | In C, if {} else if {} else {} is the same as if {} else { if {} else {} } | ||
moritz | because we consistently force blocks after 'if' and 'else' | 15:34 | |
JimmyZ | why not 'else if' = 'elsif' ? | 15:35 | |
moritz | because we consistently force blocks after 'if' and 'else' | ||
and we want to avoid exceptions | |||
15:36
am0c joined
|
|||
JimmyZ | does C have this issues? | 15:36 | |
these | 15:37 | ||
15:37
darkop left
|
|||
abercrombie | JimmyZ: you know, in C actually there isn't a seperate "else if" but really just a simple style for else { if } | 15:37 | |
moritz | C doesn't force blocks after 'if' and 'else', hence it has the dangling else problem. | ||
JimmyZ | i know it | ||
moritz | which has a rather arbitrary disambiguation rule, which bites you if happen to have formatted your code the other way round | 15:38 | |
15:41
wamba joined
15:50
agentzh left
|
|||
JimmyZ would like to suggest that 'else if' is a exception, hehe | 15:50 | ||
moritz | it is. It throws one :-) | 15:51 | |
SCNR | |||
JimmyZ | is a exception that not consistently force blocks after else :) | ||
jnthn hope | 15:54 | ||
er | |||
jnthn home | |||
geekosaur | perl 6 is trying not to be the crazed bundle of exceptions that perl 5 is | 15:55 | |
it's perceived as a slippery slope; allow one, then others start to creep in... | |||
15:56
bluescreen10 left
16:03
bluescreen10 joined
16:04
worr joined
|
|||
geekosaur | also, perl 6 is hardly unique here; sh has elif, and IIRC Algol68 also used elif in preference to else if (for a slightly different reason: the syntax unambiguously ends ifs, so you can't have dangling else-s, but you would then have a bunch of fi-s which can be avoided by using elif | 16:04 | |
JimmyZ sleeps | 16:06 | ||
16:10
molaf joined
|
|||
sorear | goodie, the single-domain change didn't increase #failing-spectest-files | 16:15 | |
niecza: say <a b c d>[2,3] | 16:17 | ||
p6eval | niecza v10-66-g71325b0: OUTPUT«c d» | 16:18 | |
sorear | apparently I broke this...? | ||
16:19
wolfman2_ left
16:20
im2ee left
16:21
im2ee joined
16:24
JimmyZ left
|
|||
TimToady | how is it broke? | 16:40 | |
sorear | TimToady: confusingly | 16:41 | |
it says "c" locally | |||
TimToady | ah | ||
arity of array maybe? | |||
sorear | if I copy the definition of Parcel.postcircumfix:<[ ]> into an augment, it works fine | ||
it's being miscompiled but only if it's in CORE.setting | |||
TimToady | it's acting like [+(2,3)] maybe? | 16:42 | |
sorear | maybe | 16:43 | |
but I'm hunting the difference in the compilation now | |||
16:46
im2ee left
16:47
im2ee joined
16:53
donri joined
16:59
dakkar left,
mberends joined
|
|||
dalek | kudo/nom: 6b78ad0 | jnthn++ | src/Perl6/Actions.pm: Fix code-gen for assignment to native types. |
17:03 | |
17:05
im2ee left
17:06
im2ee joined
17:09
REPLeffect left
|
|||
tadzik | #phasers in 20? | 17:10 | |
jnthn | yes | ||
mberends | hi tadzik, jnthn, * | 17:11 | |
jnthn | o/ mberends | ||
tadzik | hello mberends | ||
btw, now #phasers happens to be during my classes | |||
17:12
slavik2 left
17:14
Kivutarrr joined
17:15
pernatiy left,
daniel-s left
17:17
GlitchMr joined
17:18
mj41_nb left,
mj41 left
|
|||
dalek | ast: 11b1be0 | jnthn++ | S02-types/native.t: Unfudge a couple of tests for natives. |
17:19 | |
kudo/nom: a4602de | jnthn++ | src/Perl6/Metamodel/NativeHOW.pm: Helps to actually compute the MRO before using it. :-) This fixes various issues with native types. |
|||
jnthn | That's who of today's tickets dealt with. :) | 17:20 | |
*two | 17:21 | ||
17:21
Kivutarrr left
17:23
jdv79 joined
|
|||
jdv79 | jnthn: thx for the blog post! | 17:23 | |
17:23
packetknife joined
|
|||
jnthn | jdv79: Blog...oh, it was a little while back though. :) | 17:23 | |
17:23
aber joined
|
|||
jnthn should create something else exciting so he can write another one :) | 17:23 | ||
17:24
abercrombie left
|
|||
dalek | ecza/serialize: 87fff3b | sorear++ | lib/CORE.setting: Rearrange setting to make inlining work better Also adds missing \s to non-inlined versions of &postcircumfix ops. Fixes <a b c d>[2,3]. |
17:24 | |
17:26
slavik1 joined
17:27
abercrombie joined
|
|||
jnthn | tadzik: I just ran setting compilation through the sub profiler and got a curious result. The optimizer seems to account for only 4% of time spent in compiling CORE.setting here. | 17:27 | |
tadzik | jnthn: right, I measured it today and it's still about 3 minutes | ||
wonder what caused that back then, weird | 17:28 | ||
I must keep better track of those results | |||
compiling of the Optimizer.pm itself can't be that long, it's just nqp | |||
17:30
packetknife left,
aber left
|
|||
dalek | ecza/serialize: 0271633 | sorear++ | lib/CodeGen.cs: Implement SubInfo.transparent required for &?BLOCK |
17:34 | |
17:34
buubot_backup left
|
|||
diakopter | . | 17:36 | |
sjohnson | , | 17:37 | |
sorear | ! | 17:39 | |
geekosaur | ∭ | 17:41 | |
sjohnson | heh | ||
dukeleto | [~~] | 17:44 | |
mberends | ⌨ | 17:48 | |
sjohnson | (='.'=) | 17:49 | |
dalek | ecza/serialize: 9ee80cd | sorear++ | lib/Kernel.cs: Fix GLOBAL/PROCESS in indirect name usage (how did this ever work?) |
17:53 | |
17:54
buubot_backup joined
|
|||
dalek | ecza/serialize: 09b8ac7 | sorear++ | lib/CodeGen.cs: Actually report errors from C3 inconsistency... |
18:00 | |
diakopter | std: 4 +| 5 | 18:01 | |
p6eval | std 580b69a: OUTPUT«ok 00:01 120m» | ||
diakopter | rakudo: say 4 +| 5 | ||
p6eval | rakudo a4602d: OUTPUT«5» | ||
18:09
Reaganomicon joined
|
|||
[Coke] | rakudo: my $¢=32; | 18:13 | |
p6eval | rakudo a4602d: OUTPUT«===SORRY!===Confused at line 1, near "my $\x{a2}=32;"» | ||
dalek | ecza/serialize: 4c49318 | sorear++ | lib/ObjModel.cs: Fix stubbing of modules |
18:14 | |
TimToady | perl6: [[1,2,3],[4,5,6],[7,8,9]]»[0].say | 18:17 | |
p6eval | rakudo a4602d, niecza v10-66-g71325b0: OUTPUT«1 2 3 4 5 6 7 8 9» | ||
..pugs b927740: OUTPUT«decodeUTF8': bad data: '\187'***  Unexpected "\187[" expecting term postfix or operator at /tmp/F3bf2NksVb line 1, column 26» | |||
TimToady | pugs: [[1,2,3],[4,5,6],[7,8,9]]>>[0].say | ||
p6eval | pugs b927740: OUTPUT«***  Unexpected ">>[" expecting term postfix or operator at /tmp/6rI8WNnHT_ line 1, column 26» | ||
TimToady | pugs: [[1,2,3],[4,5,6],[7,8,9]]>>.[0].say | 18:18 | |
p6eval | pugs b927740: OUTPUT«» | ||
TimToady | b: [[1,2,3],[4,5,6],[7,8,9]]»[0].say | ||
p6eval | b 1b7dd1: OUTPUT«147» | ||
TimToady | masak: I'm trying to figure out what you mean by "real code" in irclog.perlgeek.de/perl6/2011-10-26#i_4616132 | ||
only b is close to currently specced semantics for ».[0] | 18:19 | ||
diakopter | TimToady: is "It is not necessary to type any of the unicode symbols. They all have an equivalent that is plain ASCII" still valid? (sorear pointed out $¢) | 18:21 | |
moritz | masak: does markdown support something like meta data/annotations? | 18:23 | |
masak | not explicitly. | ||
but it supports arbitrary XML... | 18:24 | ||
18:24
bluescreen10 left
|
|||
masak | TimToady: code that I wrote for a purpose other than just fun. in Niecza. | 18:25 | |
moritz wonders what format to write the FAQs in | 18:26 | ||
PerlJam | pod6 | ||
sorear | moritz: iambic pentameter | ||
masak | Klingon. | ||
PerlJam | all of the above? | ||
sorear | masak: does that count as a format? | ||
moritz doesn't know any Klingon, and doesn't see much advantage in using it | 18:28 | ||
PerlJam | masak: that code you wrote for purposes other than fun ... you also wrote it for fun too, right? | ||
masak | Pod6 could use the exercise, I guess. | 18:29 | |
Markdown is less hassle for you. | |||
jdv79 | jnthn: yeah, i only remember to check once in a while. | 18:30 | |
TimToady | masak: my point is that it doesn't work in niecza, unless maybe in /serialize | 18:31 | |
it still has the old semantics | |||
which preclude using » and .[0] together, other than as a nop on the leaves | |||
sorear | Is there a connection here between ».[0] and masak's real code? | 18:32 | |
TimToady | irclog.perlgeek.de/perl6/2011-10-26#i_4616132 | ||
perl6: [[1,2,3],[4,5,6],[7,8,9]]»[1].say | 18:33 | ||
p6eval | niecza v10-66-g71325b0: OUTPUT«Use of uninitialized value in string context at /home/p6eval/niecza/lib/CORE.setting line 641 (CORE warn @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 21 (CORE Mu.Str @ 12)  at line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.setting… | ||
..rakudo a4602d: OUTPUT«.[1] out of range for type 1 in method at_pos at src/gen/CORE.setting:1013 in method postcircumfix:<[ ]> at src/gen/CORE.setting:991 in method reify at src/gen/CORE.setting:4052 in method reify at src/gen/CORE.setting:3959 in method reify at src/gen/CORE.… | |||
..pugs b927740: OUTPUT«decodeUTF8': bad data: '\187'***  Unexpected "\187[" expecting term postfix or operator at /tmp/b9Rijo08qs line 1, column 26» | |||
TimToady | b: [[1,2,3],[4,5,6],[7,8,9]]»[1].say | ||
p6eval | b 1b7dd1: OUTPUT«258» | ||
[Coke] | b,nom: say "be nice if this worked." | ||
18:34
mberends_ joined
|
|||
TimToady | diakopter: $¢ is just experimental error :P | 18:35 | |
18:35
mberends left
|
|||
moritz | [Coke]: not too hard to do, I guess | 18:35 | |
18:35
mberends_ left
|
|||
[Coke] | then we can remove "pugs" from perl6 and easily add it back in if we want it. | 18:36 | |
18:36
slavik1 left
|
|||
moritz | well, that's just a one-line patch anyway :-) | 18:36 | |
18:37
slavik1 joined
|
|||
TimToady | well, obviously someone just needs fix pugs | 18:37 | |
*to fix | |||
masak | :) | ||
18:38
molaf left
|
|||
TimToady | it's easy, just add 6model, and STD parser, and fix all the hacky parts to work around the absence of regexes, and maybe another minor thing or two... | 18:39 | |
18:39
fsergot joined
|
|||
moritz | and the compiler middleware, I guess | 18:39 | |
masak | sounds like fun! | 18:40 | |
TimToady | or just backend one of the other implementations to emit .hs, and call it pugs | ||
PerlJam | TimToady: would it be $ɛ or something if it were experimental error? :) | ||
18:41
bluescreen10 joined
|
|||
TimToady | no, it would be $ε instead :P | 18:42 | |
moritz | .u ε | ||
phenny | U+03B5 GREEK SMALL LETTER EPSILON (ε) | ||
sorear | hrrm. seems I've broken return-pass | 18:43 | |
TimToady | .u ɛ | ||
phenny | U+025B LATIN SMALL LETTER OPEN E (ɛ) | ||
PerlJam | I did say "or something" | ||
18:45
Chillance joined
18:48
mberends joined
|
|||
sorear needs to write some kind of debug dumper for .ser files | 18:49 | ||
18:49
ksi joined
|
|||
cognominal_ | This may interest jnthn. A mere use of github.com/ihrd/uri/blob/master/li...Grammar.pm triggers Malformed $*PKGDECL at line 46, near "=> $init_g" | 18:51 | |
this package contains a require, but that should be runtime... | 18:52 | ||
I would not be surprised if that was related to the serialization stuff | 18:53 | ||
PerlJam | it looks to me like it's treating "grammar => $init_grammar" as a grammar declaration. | 18:55 | |
(or trying to anyway) | |||
moritz | :grammar($init_grammar) would be a workaround | ||
masak | we have an RT ticket about such behavior. | 18:56 | |
I don't remember if we closed it. I think we did. | |||
dalek | q: 6a76d0b | moritz++ | answers.md: link to source |
||
[Coke] | now if I could just get moritz to work on this java for me. | 18:58 | |
moritz | masak: that ticket is still open in nom | 18:59 | |
cognominal_ | Perljam, moritz. indeed this keyword is not protected by an <end_keyword> | ||
PerlJam | Is that a LHF? Sounds like it. | 19:00 | |
masak | moritz: ah. thank you. | ||
PerlJam: wouldn't surprise me if t'were tied to LTM somehow. | |||
moritz | nom: say (trusts => 1) | ||
p6eval | nom a4602d: OUTPUT«"trusts" => 1» | ||
PerlJam | masak: ah, could be. | 19:01 | |
moritz | I'll try it with end_keyword | ||
nom: say (grammar => 1) | |||
p6eval | nom a4602d: OUTPUT«===SORRY!===Malformed $*PKGDECL at line 1, near "=> 1)"» | ||
moritz | cognominal_: the <.end_keyword> is at the start of package_def | 19:02 | |
cognominal_ | I dream of a proto token package_declarator is keyword{ <...> } | ||
19:03
slavik1 left
|
|||
cognominal_ | that would append a <end_keyword> after the <sym> | 19:03 | |
moritz | how does STD do it? | 19:04 | |
GlitchMr | print STDERR "lol" | ||
How can I do it in Perl 6? | |||
PerlJam | GlitchMr: just like that? | ||
well, not quite like that I guess | 19:05 | ||
GlitchMr | Could not find sub &STDERR | ||
... | |||
PerlJam | use $*ERR | ||
cognominal_ | moritz, meaning it appears to late because the 'grammar' token is already reduced at that stage? | ||
sorear | print $*ERR: "lol" | ||
19:05
slavik1 joined
|
|||
GlitchMr | perl6: print $*ERR: "There is something wrong on line .\n"; | 19:05 | |
p6eval | niecza v10-66-g71325b0: OUTPUT«===SORRY!===Invocant handling is NYI at /tmp/xXoPnwelMx line 1:------> : "There is something wrong on line .\n"⏏;Unhandled Exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die… | ||
..rakudo a4602d: OUTPUT«===SORRY!===Confused at line 1, near "print $*ER"» | |||
..pugs b927740: OUTPUT«There is something wrong on line .» | |||
GlitchMr | ... | 19:06 | |
sorear | why do you ... so much | ||
use words, they're clearer | |||
moritz | sorear++ | ||
GlitchMr | :) | ||
Yeah. Right. | |||
sorear | also pugs++ | ||
GlitchMr | I don't know English. | ||
[Coke] | also, please don't use "perl6:" unless you mean it. it's quite verbose. | ||
moritz | GlitchMr: then don't use ... either. It doesn't tell us anything | ||
PerlJam | GlitchMr: $*ERR.print: "foo" | 19:07 | |
cognominal_ | anyway you gave me the workaround | ||
GlitchMr | rakudo: $*ERR.print "There is something wrong on line .\n"; | ||
p6eval | rakudo a4602d: OUTPUT«===SORRY!===Confused at line 1, near "$*ERR.prin"» | ||
jnthn | Need the colon | ||
GlitchMr | rakudo: $*ERR.print: "There is something wrong on line .\n"; | ||
p6eval | rakudo a4602d: OUTPUT«There is something wrong on line .» | ||
GlitchMr | Thanks :) | ||
PerlJam | I wonder why the dative form didn't work. | 19:08 | |
maybe my brain is just comingling perl 5 and perl 6 too much | |||
TimToady | perl6: note "lol" | 19:09 | |
p6eval | pugs b927740: OUTPUT«*** No such subroutine: "¬e" at /tmp/o3IAVDLOm5 line 1, column 1 - line 2, column 1» | ||
..rakudo a4602d, niecza v10-66-g71325b0: OUTPUT«lol» | |||
sorear | PerlJam: print $*ERR: "foo" is *supposed* to work but only implmeneted by pugs atm. | 19:10 | |
TimToady | perl6: note lol "lol" | ||
p6eval | niecza v10-66-g71325b0: OUTPUT«===SORRY!===Undeclared routine: 'lol' used at line 1Unhandled Exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2)  at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36)  … | ||
..pugs b927740: OUTPUT«*** No such subroutine: "¬e" at /tmp/MYhSSs7gma line 1, column 1 - line 2, column 1» | |||
..rakudo a4602d: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&lol' called (line 1)» | |||
sorear | TimToady++ # I didn't think of that at all | ||
TimToady: say eval '&?BLOCK.WHAT' # this has just come up | 19:11 | ||
GlitchMr | (\N*) ::: { fail "Invalid diff hunk: $1" } | 19:12 | |
What is \N? | |||
sorear | not a newline | ||
TimToady | not \n | ||
GlitchMr | OK :) | ||
TimToady | and \R is not \r, unlike in p5 | ||
p5's \R is just \n in p6 | 19:13 | ||
moritz | GlitchMr: read S05 for more info on regexes | ||
jnthn | sorear: Guess it's Block since eval implies a lexical scope | 19:14 | |
moritz | cognominal_: I have a patch for the <.end_keyword> things, spectest now... | ||
TimToady | is there any reason it needs to be differentiated from Block? | ||
GlitchMr: perhaps if you translated the synopses into Polish you wouldn't have to read them in English :) | 19:15 | ||
sorear | well, it's got to provide $! $/ lexicals | ||
GlitchMr | :P | ||
dalek | q: 2695668 | moritz++ | / (2 files): answer another question |
19:16 | |
TimToady | seriously, you keep asking questions that could be answered with a grep of the synopses | ||
[Coke] ponders a nicely formatted hardcopy of the SYN. | 19:17 | ||
cognominal_ | TimToady, maybe there should be a keyword "keyword" used in place of "token" that would imply an implit <.end_keyword>. | 19:18 | |
*implicit | |||
TimToady | and where would .end_keyword go? | ||
moritz | [Coke]: it would be out of date before the printing press spit out the last page :-) | ||
[Coke] | moritz: sometimes it's nice to read things on paper. | 19:19 | |
jnthn actually met somebody with a printed copy of the Perl 6 synopses once :) | |||
jnthn tries to recall who/where | |||
GlitchMr | m:P5/(?mi)^(?:[a-z]|\d){1,2}(?=\s)/ | ||
... ok... | |||
masak | GlitchMr: if you don't say more, we don't know what you mean. | 19:20 | |
GlitchMr | :) | ||
cognominal_ | jnthn, you need to buy a RV or a truck to carry the synopses? | ||
or an iPad? :) | |||
TimToady, the <.end_keyword> would be implied after the declared token within the rule that define it. | 19:22 | ||
GlitchMr | | (.**1..10) | ||
{ | |||
$*ERR.print: "There is something wrong near " ~ (~$0).perl ~ ".\n"; | |||
return 0.42 # just to end parsing of grammar | |||
} | |||
(I wanted to type ...) | |||
moritz | GlitchMr: please don't paste more than one line of code here. Use a pastebin | 19:23 | |
GlitchMr | That's probably bad coding... yeah... I guess I cannot make good code... | ||
masak | GlitchMr: gist.github.com is one. | ||
cognominal_ | token terminator:sym<when> { 'when' <.end_keyword> } would be keyword terminator:sym<when>; | ||
because the block that defines it would be redundant. | |||
moritz is not sure that use case is general enough, but it reads nicely | 19:24 | ||
sorear | moritz: macro! :D | ||
TimToady | that is currently written: token terminator:sym<when> { <sym> } with an implied .endsym | 19:25 | |
cognominal_ | going that way on want to be wild and do write keyword terminator:sym<if when unless while…> | ||
when a factorization lead to another, that a good sign. | |||
TimToady: in nom, the .endsym is currently explicit | 19:26 | ||
TimToady | in which case you'd *have* to use use <sym> since it's generic, not 'when' | ||
so the current way is more powerful, if we allow slices | |||
19:27
chromis joined
|
|||
TimToady | .oO(sliced declarations, sheesh...) |
19:27 | |
dalek | ecza/serialize: 3c4b14d | sorear++ | src/NieczaGrammar.pm6: Prevent mainline Routines from eating return exceptions |
||
TimToady | well, more like hyper declarations | ||
dalek | ast: 7f92c99 | moritz++ | S02-literals/pairs.t: unfudge passing tests |
||
kudo/nom: 158bd07 | moritz++ | src/Perl6/Grammar.pm: protect "grammar" etc with <.end_keyword> cognominal++ noted that it is applied too late (after the package_declarator:sym<...> action method has fired) |
|||
TimToady | but a slice is a sort of hyper-y thing, I guess | 19:28 | |
sorear | niecza should be down to 10 failing files | ||
TimToady | don't want to distract you, but it'd be nice if duck mapping S03:4276 could get in before your relase | 19:30 | |
*lease | 19:31 | ||
nom too, for that matter | |||
jnthn | Do we have an RT for it? If not, plesae somebody make one...RT is my extra memory at the moment :) | ||
TimToady | then masak++'s Real Code™ would work | ||
masak | it *did* work... | 19:32 | |
TimToady | on nom? | ||
I don't see how | |||
I showed ^^ that it doesn't work | |||
masak | on Niecza. | ||
19:32
bluescreen10 left
|
|||
TimToady | doesn't work there either | 19:33 | |
masak | with Match objects. | ||
moritz submits rakudotodo | |||
TimToady | niecza: [[1,2,3],[4,5,6],[7,8,9]]»[1].say | ||
p6eval | niecza v10-66-g71325b0: OUTPUT«Use of uninitialized value in string context at /home/p6eval/niecza/lib/CORE.setting line 641 (CORE warn @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 21 (CORE Mu.Str @ 12)  at line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.setting… | ||
TimToady | I'd say Match objects are only working accidentally | 19:34 | |
masak | niecza: "oh %foo% and %bar% but %baz% too".comb(/ '%' (\w+) '%' /)>>[0].perl | ||
p6eval | niecza v10-66-g71325b0: ( no output ) | ||
masak | niecza: say "oh %foo% and %bar% but %baz% too".comb(/ '%' (\w+) '%' /)>>[0].perl | ||
p6eval | niecza v10-66-g71325b0: OUTPUT«["%foo%", "%bar%", "%baz%"].list» | ||
masak | \o/ | ||
nothing accidental about it ;) | |||
sorear | looks like niecza is checking ~~ List | Parcel | Range | ||
TimToady | niecza: say "oh %foo% and %bar% but %baz% too".comb(/ '%' (\w+) '%' /).list»[0].perl | 19:35 | |
p6eval | niecza v10-66-g71325b0: OUTPUT«["%foo%", "%bar%", "%baz%"].list» | ||
TimToady | niecza: say "oh %foo% and %bar% but %baz% too".comb(/ '%' (\w+) '%' /).list».perl | 19:36 | |
p6eval | niecza v10-66-g71325b0: OUTPUT«"%foo%" "%bar%" "%baz%"» | ||
TimToady | anyway, it's supposed to try the [0] before checking for recursion (and ignore the [0] from Any somehow) | 19:38 | |
masak | I can't decide if I like or dislike the discontinuity of recursing for some things and not for others... :) | 19:39 | |
19:40
zamolxes left,
zamolxes joined
19:41
manildomin joined
|
|||
manildomin | hi | 19:41 | |
moritz | hello manildomin | 19:42 | |
dalek | ast: 918275a | moritz++ | S02-types/hash.t: unfudge another test for rakudo |
||
masak | manildomin! \o/ | ||
manildomin | hi | ||
masak | manildomin: how's it going with Perl 6? | 19:43 | |
moritz -> sleep | 19:44 | ||
manildomin | it's giving me some difficulties but I think Perl6 is interesting so I keep learning it | ||
masak | 'night, moritz | 19:45 | |
manildomin: if you have any favourite difficulties, we're here to help. | |||
manildomin | thanks | ||
I assume that Rakudo compiles perl6 code to bytecode for parrot, am I right? | |||
cognominal_ | TimToady: the problem with the hyperop-y syntax to fold a proto regex is that is conflict with the multitokenish convention used for circumfix. | 19:46 | |
masak | manildomin: right. | 19:47 | |
well, at least to PIR. | |||
cognominal_ | I seee this hyperop-y syntax would apply in many places in the grmmar. | ||
manildomin | ok, then is it possible asking rakudo not to run the program but to give a pir output file instead? | 19:48 | |
19:48
chromis left
|
|||
masak | manildomin: been a while since I tried it -- but yes. | 19:48 | |
manildomin: why -- are you experiencing long compile times? | |||
manildomin | I was just wondering if it was possible | 19:50 | |
cognominal_ | token circumfix:sym<[ ]> { '[' <semilist> ']' } # on the other hand, there would be no hyperoperated sym here | ||
19:50
bluescreen10 joined
|
|||
masak | wah, ok. | 19:50 | |
PerlJam | manildomin: perl6 --target=pir -e 'say "hi"' | ||
manildomin | ok, thanks | ||
I have an issue with a code found in the book "Using Perl6" (again :)) | 19:58 | ||
masak | which one? | ||
nom: given sqrt -1 -> $_ is copy { .=subst(/N$/, "m!"); say .subst("N", "Wh"); say .subst("N", "B"); say .subst("N", "Thank you M") } | |||
p6eval | nom a4602d: OUTPUT«Wham!Bam!Thank you Mam!» | ||
masak | :) | 19:59 | |
nom: given sqrt -1 -> $_ is copy { .=subst(/N$/, "m!"); say .subst("N", "Wh"); say .subst("N", "B"); say .subst("N", "Thank you M").subst("am", "a'm" } | |||
p6eval | nom 158bd0: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1» | ||
masak | nom: given sqrt -1 -> $_ is copy { .=subst(/N$/, "m!"); say .subst("N", "Wh"); say .subst("N", "B"); say .subst("N", "Thank you M").subst("am", "a'm") } | ||
p6eval | nom 158bd0: OUTPUT«Wham!Bam!Thank you Ma'm!» | ||
manildomin | this one : pastebin.com/nbnhhrrZ | 20:00 | |
masak looks | |||
PerlJam | nom doesn't grok that syntax yet, does it? | 20:01 | |
masak | nom: my @a; my :($first, *@rest) := \(|@a); | ||
p6eval | nom 158bd0: OUTPUT«===SORRY!===Malformed my at line 1, near ":($first, "» | ||
masak | seems not. | ||
b: my @a; my :($first, *@rest) := \(|@a); say "alive" | |||
PerlJam | (I'm not even sure b did :) | ||
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Malformed my at line 22, near ":($first, "» | ||
masak | seems not :) | ||
jnthn | std: my @a; my :($first, *@rest) := \(|@a); say "alive" | 20:02 | |
p6eval | std 580b69a: OUTPUT«===SORRY!===Malformed my at /tmp/FTwI75S8RI line 1:------> my @a; my ⏏:($first, *@rest) := \(|@a); say "alive" expecting scoped declaratorParse failedFAILED 00:01 120m» | ||
manildomin | my version of Rakudo is Rakudo Perl 6, version 2011.04 built on parrot 3.8.0 0 | ||
maybe it's too old? | |||
jnthn | not even STD :P | ||
masak | uhm. | ||
maybe the colon simply shouldn't be there? | |||
PerlJam | then why do I remember that syntax? | 20:03 | |
masak | yeah, good question. | ||
jnthn doesn't think it should be there | 20:04 | ||
masak checks S06 | |||
S06:1480: my (@a,@b,@c) := |$foo; | |||
S06:1732: my Dog ($fido, $spot) := twodogs(); | 20:05 | ||
PerlJam | S03:280L Signature literal :(Dog $self:) | ||
masak | S06:3220: :(:who($name), :why($reason)) := (why => $because, who => "me"); | ||
PerlJam | s/L/:/ | ||
masak | PerlJam: I don't think :() works with, my, is all. | 20:06 | |
s/,// | |||
20:06
cooper joined
|
|||
masak | 'night, #perl6 | 20:06 | |
PerlJam | masak: S03:4882: my :(Dog $foo is woof = 123); # same thing (full Signature form) | ||
manildomin | 'night | ||
20:07
jlaire left
|
|||
PerlJam | The text starting from S03:4952 too | 20:07 | |
especially where it says "Signatures are expected after declarators such as C<my>, C<sub>, C<method>, C<rule>, etc. In such declarators the colon may be omitted. But it's also legal to use it" :-) | 20:08 | ||
manildomin | if I remove it the code works flawlessly | 20:09 | |
20:15
GlitchMr left
|
|||
im2ee | Good night! :) | 20:16 | |
20:17
im2ee left
20:20
jlaire joined
20:25
MayDaniel joined
20:32
Je joined
20:35
Je left
20:38
dorlamm joined
20:39
MayDaniel left,
envi_ left
20:44
jlaire left,
jlaire joined
20:52
pat____ joined
|
|||
pat____ | hi | 20:52 | |
have been playing around with "but" and some questions arose. | |||
20:52
manildomin left
20:54
y3llow_ joined,
pothos_ joined
20:56
pothos left,
pothos_ is now known as pothos,
y3llow left,
y3llow_ is now known as y3llow
|
|||
pat____ | if I do “my $foo = *+* but role {method Str {"+"}}” | 20:57 | |
20:57
kaare_ joined
|
|||
pat____ | it seems to me that it get Stringified to early when I try it on interactive perl | 20:58 | |
benabik | pat____: It may be that the REPL is using either .gist or .perl to perform the output instead of .Str | 20:59 | |
pat____ | yeah let me specify | ||
I want a variable ($foo) that returns e.g. 7 if called with $foo(3,4) and "+" if called ~$foo | 21:00 | ||
benabik | Oh that's interesting... | 21:01 | |
pat____ | yeah | ||
benabik | nom: my $foo = *+* but role {method Str {"+"}}; say $foo(3,4); say $foo | ||
p6eval | nom 158bd0: OUTPUT«+WhateverCode.new()» | ||
21:01
DataLinkDKT left
|
|||
pat____ | interesting, my nom here at home says "+" | 21:02 | |
benabik | b: my $foo = *+* but role {method Str {"+"}}; say $foo(3,4); say $foo | ||
p6eval | b 1b7dd1: OUTPUT«7_block1093» | ||
benabik | I would say that both b and nom are wrong here... | 21:03 | |
21:03
DataLinkDKT joined
21:04
DataLinkDKT left,
wamba left
|
|||
pat____ | nom: my $foo = *+* but role {method Str {"+"}}; say "{~$foo} || {$foo(4,3)}" | 21:04 | |
p6eval | nom 158bd0: OUTPUT«_block1411 || +» | ||
jnthn | You need a method gist in the role, not a method Str | 21:05 | |
pat____ | what's gist, don't know that | ||
jnthn | nom: my $foo = *+* but role { method gist {"+"}}; say $foo(3,4); say $foo | ||
p6eval | nom 158bd0: OUTPUT«+WhateverCode.new()» | ||
pat____ | it's the same | ||
jnthn | hmm | 21:06 | |
oh | |||
nom: my $foo = (*+*) but role { method gist {"+"}}; say $foo(3,4); say $foo | |||
p6eval | nom 158bd0: OUTPUT«+WhateverCode.new()» | ||
jnthn | no, not that. | ||
pat____ | yeah though about that, but if the brackets were wrong they would be *+(* but role{…}) | 21:07 | |
jnthn | Yes, that's what I was wondering about. | ||
pat____ | so, can we say that wasn't considered yet in the implementation, but my intetion was right | 21:09 | |
? | |||
or am I missing something with that "but" | |||
jnthn | pat____: Looks like it should work. Not quite sure what the underlying bug is - I can't think of any reason off hand why it would fail to work. | ||
benabik | I'm also curious about the fact that $foo(3+4) actually returns "+" | 21:10 | |
jnthn | Right. :) | ||
pat____ | me too | ||
jnthn | I really want to know what on earth is going on there. | ||
pat____ | that's why I came here | ||
jnthn | Given I did the mixins implementation, guess that's one for me to fathom... :) | ||
benabik | pat____: If jnthn doesn't know what's happening, then us mere mortals are doomed. ;-) | ||
jnthn | OH! | 21:11 | |
jlaire | nom: my $foo = { ($^a + $^b) but role { method gist {"+"} }; say $foo(3,4); say $foo | ||
jnthn | bwaha | ||
p6eval | nom 158bd0: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 1» | ||
jlaire | nom: my $foo = { ($^a + $^b) but role { method gist {"+"} } }; say $foo(3,4); say $foo | ||
p6eval | nom 158bd0: OUTPUT«+Block.new()» | ||
jnthn | nom: my $foo = *+*; $foo = $foo but role { method gist {"+"}}; say $foo(3,4); say $foo | 21:12 | |
p6eval | nom 158bd0: OUTPUT«7+» | ||
jnthn | Yeah, currying gone wild | ||
jlaire | .oo( $foo but= ... ) | ||
jnthn | The whatever currying is transitive. | ||
Thus | |||
* + * but blah | |||
becomes | |||
-> $x, $y { $x + $y but blah } | 21:13 | ||
benabik | !! | ||
PerlJam | rakudo needs a --deparse option :) | ||
jnthn | e.g. it actually sucks the but into the closure too :) | ||
jlaire | yay, I guessed right | ||
jnthn | Well, when you do * + * / 2 or something it's what you want :) | ||
benabik | There's no way to limit the extent of *, is there? | ||
jnthn | But given it just took me 5 minutes to realize what on earth was going on, maybe we should shove does and but on the exclude list for * currying... | ||
Opinions welcome. | |||
TimToady: ^^ | 21:14 | ||
benabik: Don't think so | |||
OK, so at least it's not actually a bug in mixins. *phew* :) | |||
jlaire | maybe we'll be able to define a special type of parens that does that as a macro some day | ||
pat____ | sorry for even considering that | 21:15 | |
benabik | I wonder if * should stop at {}s. | 21:16 | |
jnthn | pat____: Don't worry, it surprised me too. | ||
benabik | my $foo = {*+*} but "+" | ||
jnthn | benabik: Well, but now you have a closure that returns a closure... | ||
jlaire | you need to call it twice | ||
tadzik | 'evening | 21:17 | |
PerlJam | jlaire: nah, just call the result of calling it | ||
benabik | jnthn: That's what it does _now_ sure. | ||
jnthn | o/ tadzik | ||
benabik: I don't think I want to break that, or so goes my initial reaction. | |||
21:17
cooper left
|
|||
jnthn | benabik: I agree some mechanism for saying "that's quite enough curry for today, thanks" could be handy. | 21:17 | |
But then you could always just write it another way. | |||
PerlJam | jnthn: I like your idea about does/but | 21:18 | |
jnthn: and will would have to be on that list too | |||
jnthn | nom: my $foo = {$^a + $^b} but role { method gist {"+"}}; say $foo(3,4); say $foo | ||
benabik | jnthn: My thought was that {} already generated a closure, so why do a closure inside a closure? If you still needed it you could do {{*+*}} | ||
p6eval | nom 158bd0: OUTPUT«7+» | ||
jnthn | PerlJam: will? | ||
PerlJam: There's a will infix? | 21:19 | ||
benabik | nom: my $foo = {$^a + $^b} but "+"; say ~$foo; say $foo(3,4) | ||
p6eval | nom 158bd0: OUTPUT«+7» | ||
jnthn | I thought that was just a trait... | ||
PerlJam | oh, maybe. | ||
jnthn | PerlJam: I can happily add does/but to the list. Want to give @other time to ponder the issue first though. | ||
benabik | pat____: {$^a + $^b} but "+" seems to DTRT, although you'll still need the role { method gist {}} if you want to change how it responds to say instead of just ~. | 21:20 | |
pat____ | okay, thanks a lot, so there's no way to do that with the whatever “*”? | 21:21 | |
benabik wonders if $foo but "foo" should override .gist in addition to .Str | |||
pat____: Apparently only the two statement way (although that may change): my $foo = *+*; $foo = $foo but "+" | 21:22 | ||
jnthn | $foo but= role { ... } should work too | ||
benabik | nom: my $foo = *+*; $foo but= '+'; say ~$foo | 21:23 | |
p6eval | nom 158bd0: OUTPUT«+» | ||
benabik | golfing is fun | 21:24 | |
pat____ | nom: my $foo; ($foo = *+*) but= "+" | ||
p6eval | nom 158bd0: ( no output ) | ||
pat____ | nom: my $foo; ($foo = *+*) but= "+"; say ~$foo, $foo(2,3) | 21:25 | |
p6eval | nom 158bd0: OUTPUT«+5» | ||
pat____ | got it | ||
benabik | nom: (my $foo = *+*) but= '+'; say ~$foo, $foo(2,3) | ||
p6eval | nom 158bd0: OUTPUT«+5» | ||
jnthn | oh, cute. :) | ||
yeah, = is on the no-curry list. | |||
benabik | Cute is one word for it. :-D | 21:26 | |
21:26
bluescreen10 left
|
|||
jnthn | Cute is good :) | 21:27 | |
benabik | I can't think of a situation where $foo = {*+*} needing $foo()(1,1) is useful. | 21:28 | |
I can see why it's the case, but I don't see why that would be intended. | |||
21:29
soh_cah_toa joined
|
|||
pat____ | maybe some "stop currying brackets= | 21:29 | |
like 《》 | 21:30 | ||
I can't think of a way macros could do that in an easy way | 21:31 | ||
oh | |||
21:31
pat____ left
|
|||
benabik | Rewrite 《foo》to {my $temp = foo; $temp}() ? | 21:32 | |
21:35
cooper joined
|
|||
benabik | nom: $_ = {*+*}; .()(1,1).say; $_ = {{*+*}}; .()(1,1).say; $_ = { {*+*} }; .()(1,1).say | 21:36 | |
p6eval | nom 158bd0: OUTPUT«222» | ||
benabik | Strange to me that any number of {}s only produce one additional closure. | 21:37 | |
jnthn | Well, it's an inline block inside the next one. | ||
Same reason that | |||
nom: { say 1 }; { say 2 } | |||
p6eval | nom 158bd0: OUTPUT«12» | ||
jnthn | does that. | ||
benabik | But the first ones in an assignment create a closure. Okay. :-/ | 21:38 | |
$_ = {my $a={*+*}}; .()()(1,1).say | 21:39 | ||
nom: $_ = {my $a={*+*}}; .()()(1,1).say | |||
p6eval | nom 158bd0: OUTPUT«2» | ||
benabik | Okay, enough (ab)using that. | ||
21:47
pernatiy joined
21:53
benabik left
21:57
ab5tract left
22:01
kaare_ left
22:17
MayDaniel joined
22:20
dorlamm left
22:21
whiteknight joined
22:22
cooper left
22:23
ksi left
|
|||
cognominal_ | in nqp/src/NQPQ/Grammar.pm, I can't parse the <?[<[]> in | <sigil> <?[<[]> <postcircumfix> | 22:23 | |
from the context, I understand it is a zero width assertion that is true is the current char is either '<' or '[' but nevertheless I can't visually parse it | 22:24 | ||
ho, noe I can! | 22:25 | ||
*now | 22:26 | ||
with the '?', I was unable to recognize the character class | |||
jnthn | heh, it looks...weird :) But yes :) | 22:27 | |
std: / <?[<[]> <postcircumfix> / | |||
p6eval | std 580b69a: OUTPUT«===SORRY!===Couldn't find terminator ] at /tmp/zUvDuqCkCw line 1 (EOF):------> / <?[<[]> <postcircumfix> /⏏<EOL>Parse failedFAILED 00:01 121m» | 22:28 | |
jnthn | hm | ||
too weird for STD... | |||
Which probably means nqp's parser is being a bit too liberal. | |||
Time for some rest & | 22:36 | ||
22:39
replore_ left
22:41
envi_ joined
22:43
wolfman2000 joined
|
|||
TimToady | perl6: ({ say "hi"}) | 22:51 | |
p6eval | rakudo 158bd0, niecza v10-66-g71325b0: ( no output ) | ||
..pugs b927740: OUTPUT«hi» | |||
TimToady | ({ * + * }) ought to work, since {} should be bare brackets | ||
22:53
jlaire left
|
|||
sjohnson | TimToady: that sorta looks like a emoticon of someone with starry eyes kissing | 23:09 | |
donri | or an owl | 23:13 | |
23:14
jlaire joined
23:15
jlaire left
23:16
jlaire joined
|
|||
sorear | good * #perl6 | 23:20 | |
nornagest | Good night. | 23:25 | |
23:25
nornagest left
23:27
aindilis left
23:28
MayDaniel left
23:29
aindilis joined
|
|||
dalek | ecza/serialize: 05b5bb6 | sorear++ | / (2 files): Fix crashes when trying to compile CORE:: name references |
23:30 | |
23:31
Chillance left
23:35
thou left
23:37
envi_ left
|
|||
dalek | ecza/serialize: 878afab | sorear++ | src/niecza: Fix compile-time references to OUTER etc |
23:38 | |
23:48
aindilis left,
aindilis joined
23:52
thou joined
23:59
japhb_ joined
|