»ö« 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:00
lestrrat left
00:01
lestrrat joined
00:03
derrazo joined
00:05
Araq left
|
|||
moritz | sorear: no, p6eval is on feather3 | 00:49 | |
sorear: but the compilers are built on feather1 and rsync'ed to feather3, because feather3 doesn't have enough memory for building stuff | |||
01:18
benabik joined
|
|||
sorear | ah. | 01:18 | |
01:22
wolfman2000 joined
01:27
tokuhiro_ left,
mucker joined,
tokuhiro_ joined
01:32
tokuhiro_ left
01:38
fgomez joined,
fgomez left,
fgomez joined
01:43
mucker left,
xinming left
01:44
fgomez left
01:49
fgomez joined
|
|||
timotimo | is creating instances in rakudo especially slow? how about math with floating points i'd get from sin/cos? | 01:50 | |
01:58
whiteknight left
02:22
leprevost joined
02:25
orafu left,
orafu joined
02:29
derrazo left
02:50
sporous left,
sporous joined
03:14
sftp left
03:39
libertyprime left
03:41
libertyprime joined,
envi_ left
04:04
thou joined
04:09
drbean joined,
havenn joined
04:29
kaleem joined
04:46
fgomez left
|
|||
moritz | \o/ new HPMoR chapter | 05:03 | |
05:03
rsimoes left
05:04
thou left
05:09
birdwindupbird joined
05:15
liuchong joined
|
|||
tadzik | good morning :) | 05:16 | |
moritz | good morning tadzik | 05:17 | |
dalek | ast: 58512ac | moritz++ | S32-exceptions/misc.t: test index out of range exception |
05:21 | |
05:22
kaare_ joined
05:26
havenn left,
leprevost left
05:30
mdupont left
|
|||
moritz | p6 | 05:31 | |
p6: say "foo"[2..*] | |||
p6eval | niecza v15-6-gefda208: OUTPUT«(timeout)» | ||
..pugs, rakudo 4373f0: OUTPUT«» | |||
05:46
rsimoes joined
05:52
wtw joined
05:53
JimmyZ joined
|
|||
Teratogen | p6 say 1..10; | 05:54 | |
p6: say 1..10; | 05:55 | ||
p6eval | pugs: OUTPUT«12345678910» | ||
..rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«1..10» | |||
Teratogen | WHOOP! | ||
wait, what? | |||
dalek | ast: 87dea8d | moritz++ | S02-types/lists.t: RT #112216 |
05:57 | |
06:01
lestrrat left
06:02
lestrrat joined
06:09
vlixes joined
06:15
NamelessTee joined
06:21
tarch joined,
SHODAN left
06:25
lestrrat left
06:26
SHODAN joined
06:27
lestrrat joined
06:54
JimmyZ left
06:56
fhelmberger joined
07:00
lestrrat left
07:01
lestrrat joined
07:08
brrt joined
07:20
fglock joined
07:32
ggoebel left
07:35
NamelessTee left
07:44
hillu_ is now known as hillu
07:50
bbkr1 left
08:01
vlixes left
08:07
ggoebel joined
08:21
kaleem left
08:24
kaleem joined
08:28
lestrrat left
08:30
lestrrat joined
|
|||
masak | good now, #perl6. | 08:35 | |
Teratogen: pugs listifies (and doesn't put in spaces in between). Niecza and Rakudo are more up to current spec, and print the .gist of the Range, a succinct description of it. | |||
Teratogen | cool | 08:37 | |
p6: say 1..; | 08:38 | ||
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===Confusedat /tmp/rV7yfvhrZe:1» | ||
..pugs: OUTPUT«*** unknown parse error at /tmp/cTRVS0Pv7S line 1, column 9» | |||
..niecza v15-6-gefda208: OUTPUT«===SORRY!===Bogus term at /tmp/TWlJRHkesD line 1:------> say 1..⏏;Parse failed» | |||
Teratogen | p6: say 1..inf; | ||
p6eval | niecza v15-6-gefda208: OUTPUT«===SORRY!===Undeclared routine: 'inf' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33)  at /home/… | ||
..pugs: OUTPUT«*** No such subroutine: "&inf" at /tmp/t_7JAk0dvc line 1, column 5-11» | |||
..rakudo 4373f0: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&inf' called (line 1)» | |||
Teratogen | baw | ||
masak | Teratogen: it's "Inf". | ||
Teratogen | p6: say 1..Inf; | ||
ooooooooh | 08:39 | ||
p6eval | pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.Use `+RTS -Ksize -RTS' to increase it.» | ||
..rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«1..Inf» | |||
masak | Teratogen: and once upon a time the syntax was actually '1...' with three dots. but we found a better use for three dots :) | ||
08:47
fhelmberger left
08:48
fhelmberger joined
|
|||
masak | pugs dies there for the same reason it outputs the finite list :) | 08:48 | |
slurping and infinity -- often a bad combo. | |||
08:49
mishin__ joined
|
|||
masak | phenny: tell lichtkind ask on p6l about $=POD vs $=pod. TheDamian hangs out there, and he's likely to reply. | 08:51 | |
phenny | masak: I'll pass that on when lichtkind is around. | ||
08:53
dakkar joined
08:56
envi_ joined
|
|||
masak | nice: areweslimyet.com/ | 09:09 | |
we should do something like that. | |||
moritz | you mean, other than simply showing a "no"? :-) | ||
masak | graphing things. it's an efficient way of (1) paying attention to leanness (2) showing you pay attention to leanness. | 09:10 | |
s/efficient/effective/ | |||
09:11
netstar_ left
|
|||
masak | on HN one of the first comments is 'Our engineering team's motto is "if you measure it, it will improve".' | 09:11 | |
09:13
netstar joined
09:14
netstar left
09:16
max___ joined
09:18
max___ left
09:19
netstar joined
|
|||
netstar | is there a perl6 dev book published yet? | 09:19 | |
moritz | netstar: there are PDF snapshots of "Using Perl 6" available for download | 09:21 | |
netstar | who is the author? | ||
moritz | masak, jnthn, pmichaud, me, PerlJam | ||
netstar | cool | ||
moritz | and there are several other contributors | ||
like Util | 09:22 | ||
netstar | thanks | ||
moritz | if you have any feedback on the PDF, please let us know | 09:23 | |
netstar | ok | ||
moritz | (it's not yet ready for printing, and several pieces are still missing) | ||
netstar | I remember talking to the barefoot professor in 2007 about perl6 how much closer is it to deployment now 5 years on? | ||
moritz | we have two usable compilers that have monthly releases. | 09:24 | |
netstar | Okay...that's cool | ||
moritz | they aren't feature complete, and the module infrastructure still is very sparse, but it's fun to use for early adopters | ||
netstar | so u want modules written i guess | 09:25 | |
moritz | and occasionally we get reports that someone or another used Perl 6 in production | ||
yes | |||
and more docs | |||
netstar | I fell for the parrot joke | 09:26 | |
moritz | and better module installers, faster compilers, more robust compilers and IDE support, and... :-) | ||
netstar | IDE support as in syntax highlighting or as in delphi | ||
moritz | I didn't do any programming back then, so I only heard about it afterwards | ||
netstar: well, vim and emacs already have Perl 6 syntax hilighting | 09:27 | ||
netstar | that's cool | ||
moritz | netstar: but that's not the same as context sensitive autocompletion, jumping to error locations and so on | ||
I usually don't use those features, but others do | |||
netstar | sorry i have been in hospital for 1 year | 09:28 | |
i'm trying to catch up | |||
moritz | oh, I hope you're better now | ||
and no need to apologize | |||
netstar | I'm kinda wondering if i am stuck in 2005 | ||
moritz | perl6.org/compilers/features should give you a basic overview over what's implemented in which compiler | 09:29 | |
netstar | no peers to verify my skills | ||
sounds cool | |||
09:36
renormalist left,
renormalist joined
09:37
gianlucadv joined,
renormalist left,
renormalist joined
09:38
renormalist left,
renormalist joined
09:40
renormalist left,
renormalist joined
09:43
kaleem left
09:45
kaleem joined
10:03
pernatiy left,
mcero joined
10:11
mucker joined
10:18
y3llow_ joined
10:21
xenu__ joined,
sporous left
10:22
sporous joined,
wooden_ joined
10:27
y3llow left,
PZt left,
xenu left,
Vlavv_ left,
wooden left,
silug left,
y3llow_ is now known as y3llow,
SHODAN left,
pomysl left
10:33
Vlavv_ joined,
silug joined
10:35
pomysl joined,
pomysl left,
pomysl joined
10:36
zipf joined
10:43
iHerb joined
10:45
iHerb left
|
|||
colomon | r: say 4 < 5 < 6 < 7 | 10:46 | |
p6eval | rakudo 4373f0: OUTPUT«True» | ||
colomon | r: say 4 < 5 < 6 < 4 | ||
p6eval | rakudo 4373f0: OUTPUT«False» | ||
colomon | std: say 4 < 5 < 6 < 4 | 10:50 | |
p6eval | std 1ad3292: OUTPUT«ok 00:00 41m» | ||
10:50
zipf left
|
|||
tadzik | std: say "foo" << "bar" | 10:52 | |
p6eval | std 1ad3292: OUTPUT«===SORRY!===Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at /tmp/3a8BnvPYSv line 1:------> say "foo" <<⏏ "bar"Check failedFAILED 00:00 41m» | ||
tadzik | heh, almost like C++ ;) | ||
masak | r: enum A <e1 e2 e3>; multi infix:<< < >>(A, A) { False }; multi infix:<< < >>(e1, e2) { True }; multi infix:<< < >>(e2, e3) { True }; multi infix:<< < >>(e3, e1) { True }; say e1 < e2 < e3 < e1 | ||
p6eval | rakudo 4373f0: OUTPUT«False» | ||
masak | aww :) | ||
why doesn't the above work? | 10:53 | ||
tadzik | masak: doesn't it? | ||
masak | no. read carefully what it does. | ||
tadzik | oh, right, it doesn't | ||
masak | r: enum A <e1 e2 e3>; multi infix:<< < >>(e1, e2) { True }; say e1 < e2 | ||
p6eval | rakudo 4373f0: OUTPUT«True» | ||
masak | r: enum A <e1 e2 e3>; multi infix:<< < >>(e3, e1) { True }; say e3 < e1 | 10:54 | |
p6eval | rakudo 4373f0: OUTPUT«False» | ||
masak | there we go. | ||
that's the bit that's failing. | |||
tadzik | r: enum A <e1 e2 e3>; multi infix:<< < >>(A, A) { False }; multi infix:<< < >>(e1, e2) { True }; multi infix:<< < >>(e2, e3) { True }; multi infix:<< < >>(e3, e1) { die "LOL"; True }; say e1 < e2 < e3 < e1 | ||
p6eval | rakudo 4373f0: OUTPUT«False» | ||
tadzik | yep | ||
masak | right. | ||
it's never run at all. | |||
10:54
NamelessTee joined
|
|||
masak | r: enum A <e1 e2>; sub foo(e1) { die "MATCHED" }; foo e1 | 10:55 | |
p6eval | rakudo 4373f0: OUTPUT«MATCHED in sub foo at /tmp/E03yKbC5Z_:1 in block <anon> at /tmp/E03yKbC5Z_:1» | ||
masak | seems to be related to operators, then. | ||
tadzik | r: enum A <e1>; multi prefix:<->(e1) { die "AWW" }; say -e1 | ||
p6eval | rakudo 4373f0: OUTPUT«AWW in sub prefix:<-> at /tmp/LdnFrauMSw:1 in block <anon> at /tmp/LdnFrauMSw:1» | ||
colomon | r: enum A <e1 e2 e3>; multi infix:<< < >>(e1, e2) { say "hello!" }; say e1 < e2 | ||
p6eval | rakudo 4373f0: OUTPUT«True» | ||
tadzik | r: enum A <e1, e2>; multi infix:<->(e1, e2) { die "AWW" }; say e1 - e2 | ||
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===Invalid typename in parameter declaration at line 1, near ", e2) { di"» | ||
tadzik | r: enum A <e1 e2>; multi infix:<->(e1, e2) { die "AWW" }; say e1 - e2 | ||
p6eval | rakudo 4373f0: OUTPUT«AWW in sub infix:<-> at /tmp/tvYdwSv0aA:1 in block <anon> at /tmp/tvYdwSv0aA:1» | ||
tadzik | hmm | ||
colomon | n: enum A <e1 e2 e3>; multi infix:<< < >>(e1, e2) { say "hello!" }; say e1 < e2 | 10:56 | |
p6eval | niecza v15-6-gefda208: OUTPUT«===SORRY!===Lexical e1 is not a package at /tmp/yiM14bThI6 line 1:------> num A <e1 e2 e3>; multi infix:<< < >>(e1⏏, e2) { say "hello!" }; say e1 < e2A type must be provided at /tmp/yiM14bThI6 line 1:------> n… | ||
colomon | n: enum A <e1 e2 e3>; multi infix:<< < >>(A::e1, A::e2) { say "hello!" }; say e1 < e2 | ||
p6eval | niecza v15-6-gefda208: OUTPUT«===SORRY!===GLOBAL::A::e1 names a non-package at /tmp/qS5DPEXHih line 1:------> A <e1 e2 e3>; multi infix:<< < >>(A::e1⏏, A::e2) { say "hello!" }; say e1 < e2A type must be provided at /tmp/qS5DPEXHih line 1:-----… | ||
colomon | r: enum A <e1 e2 e3>; multi infix:<< < >>(A, A) { say "hello!" }; say e1 < e2 | 10:57 | |
p6eval | rakudo 4373f0: OUTPUT«True» | ||
colomon | r: enum A <e1 e2>; multi infix:<< - >>(e1, e2) { die "AWW" }; say e1 - e2 | 10:58 | |
p6eval | rakudo 4373f0: OUTPUT«-1» | ||
colomon | think that's your problem | 10:59 | |
std: enum A <e1 e2>; multi infix:<< - >>(e1, e2) { die "AWW" }; say e1 - e2 | |||
p6eval | std 1ad3292: OUTPUT«ok 00:00 45m» | ||
colomon | r: enum A <e1 e2 e3>; multi infix:«<»(A, A) { say "hello!" }; say e1 < e2 | 11:00 | |
p6eval | rakudo 4373f0: OUTPUT«hello!True» | ||
colomon | yup | ||
masak submits rakudobug | 11:02 | ||
tadzik++ colomon++ # golfing | |||
colomon | n: enum A <e1 e2 e3>; multi infix:«<»(A, A) { say "hello!" }; say e1 < e2 | ||
p6eval | niecza v15-6-gefda208: OUTPUT«hello!True» | 11:03 | |
colomon | n: enum A <e1 e2 e3>; multi infix:«<»(e1, e2) { say "hello!" }; say e1 < e2 | ||
p6eval | niecza v15-6-gefda208: OUTPUT«===SORRY!===Lexical e1 is not a package at /tmp/vQoBtcaOdU line 1:------> enum A <e1 e2 e3>; multi infix:«<»(e1⏏, e2) { say "hello!" }; say e1 < e2A type must be provided at /tmp/vQoBtcaOdU line 1:------> enum… | ||
colomon | n: enum A <e1 e2 e3>; multi infix:<< < >>(A, A) { say "hello!" }; say e1 < e2 | ||
masak | n: enum A <e1 e2 e3>; multi infix:«<»(A where { $_ === e1 }, A where { $_ === e2}) { say "hello!" }; say e1 < e2 | ||
p6eval | niecza v15-6-gefda208: OUTPUT«hello!True» | ||
niecza v15-6-gefda208: OUTPUT«===SORRY!===Multiple prefix constraints not yet supported at /tmp/sdI3ZwnXCU line 1:------> >; multi infix:«<»(A where { $_ === e1 }⏏, A where { $_ === e2}) { say "hello!" }Unhandled exception: Unable to resolve met… | |||
colomon | n: enum A <e1 e2 e3>; multi infix:<< < >>(A, A) { say "hello!" }; say e1 < e2 | 11:04 | |
p6eval | niecza v15-6-gefda208: OUTPUT«hello!True» | ||
masak | n: enum A <e1 e2 e3>; multi infix:«<»(A $ where { $_ === e1 }, A $ where { $_ === e2}) { say "hello!" }; say e1 < e2 | ||
p6eval | niecza v15-6-gefda208: OUTPUT«hello!True» | ||
11:04
lestrrat left
11:05
lestrrat joined
11:12
xenu__ is now known as xenu
|
|||
masak | r: multi infix:<< < >>(2, 7) { die "whoops!" }; say 2 < 7 | 11:13 | |
p6eval | rakudo 4373f0: OUTPUT«True» | ||
masak | r: multi infix:«<»(2, 7) { die "whoops!" }; say 2 < 7 | ||
p6eval | rakudo 4373f0: OUTPUT«True» | ||
masak | hrm. | ||
tadzik | r: enum A <e1 e2 e3>; multi infix:«<»(A, A) { False }; multi infix:«<»(e1, e2) { True }; multi infix:«<»(e2, e3) { True }; multi infix:«<»(e3, e1) { True }; say e1 < e2 < e3 < e1 | 11:15 | |
p6eval | rakudo 4373f0: OUTPUT«True» | ||
11:19
jerome_ left
11:23
jerome_ joined
|
|||
masak | \o/ | 11:25 | |
for great justice! | 11:26 | ||
r: enum A <e1 e2 e3>; multi infix:«<»(A, A) { False }; multi infix:«<»(e1, e2) { True }; multi infix:«<»(e2, e3) { True }; multi infix:«<»(e3, e1) { True }; say e1 < e2 < e3 < e2 | |||
p6eval | rakudo 4373f0: OUTPUT«False» | ||
masak | \o/ | ||
less-than comparison: now also on circular domains :D | 11:27 | ||
11:29
pernatiy joined
11:30
agentzh joined
|
|||
moritz comes back from lunch, and masak has already submitted a rakudobug | 11:30 | ||
masak | couldn't resist... | 11:31 | |
11:31
snearch joined
|
|||
moritz | did you even try? :-) | 11:31 | |
masak | r: try { resist } | ||
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&resist' called (line 1)» | ||
masak | r: try resist; sub resist { die "I... I can't!" }; say $! | 11:32 | |
p6eval | rakudo 4373f0: OUTPUT«I... I can't! in sub resist at /tmp/k9Lz31F6B_:1 in block <anon> at /tmp/k9Lz31F6B_:1» | ||
masak | "I generally avoid temptation unless I can't resist it." -- Mae West | ||
that's not really an autopun, but it still feels like something fairly classifiable. | 11:33 | ||
it's like when we say "...except when they don't" about rules and exceptions here on the channel. | |||
brrt | r: sub foo { if (True) { say "hoi"; } else { say "doei"; } } | 11:34 | |
p6eval | rakudo 4373f0: ( no output ) | ||
masak | brrt: don't need parens around True. | ||
also, consider calling foo if you want to see it execute ;) | |||
tadzik | it's like this "an exception proves the rule" proverb | ||
I never understood it | |||
masak | yeah, but it's more like, it's funny because the addendum undermines the whole thing. | 11:35 | |
tadzik | maybe it means "the fact that there is an exception to it makes it a rule", but I still find it an autopun of some sort :) | ||
masak | it's like "It's always nice weather around here. Except the days when it's bad weather." | ||
it's not an autopun, because there's no use/mention mixing. | |||
tadzik | I don't always eat junk food, but when I do, it's every single day | ||
I see | 11:36 | ||
masak | this would be both such a joke and an autopun: "I'm always inconsistent, in fact, I'm inconsistent right now. No, wait." | ||
tadzik | hehe | 11:37 | |
lunch & | 11:38 | ||
masak | (probably stolen from some Hofstadter opus or other. any sufficiently self-referent joke is indistinguishable from something Hofstadter's already written.) | 11:39 | |
moritz | the famous "don't parse HTML with regexes" SO post is a nice autopun | 11:41 | |
stackoverflow.com/questions/1732348...54#1732454 # this one | |||
11:41
NamelessTee left
|
|||
arnsholt | Yeah, that's a classic | 11:42 | |
Oh, wait. Different one from what I thought you meant | |||
moritz | there's another classic one? | 11:43 | |
arnsholt | There's a pretty good one by tchrist where he first says "Don't do that", and then goes on to do it anyways | ||
au | yes. stackoverflow.com/questions/4231382...91#4234491 | 11:44 | |
arnsholt | Yeah, what au said | ||
moritz | I never liked it | ||
brrt | masak: thanks, in rakudo using parens usually doesn't work in fact :-) | 11:45 | |
moritz | because he uses a loop for tokenizing and progressing, so it's not really "parsing with a regex", but rather "parsing with the help of regexes" | 11:46 | |
brrt: note that if you use parens, you need a whitespace between the if and the ( | |||
brrt: if you find a case where the parens cause it to not work, and you've correctly added that space, please submit a bug report | 11:47 | ||
brrt | i will check, but it probably my error | ||
masak | heh, "Phenomenally Exquisite Regex Language" | ||
moritz | though rakudo's error message could really be better | ||
rakudo: if(True) { } | 11:48 | ||
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===Confusedat /tmp/TZ9FdRfgZk:1» | ||
moritz | std: if(True) { } | ||
p6eval | std 1ad3292: OUTPUT«===SORRY!===Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens at /tmp/WKBOrOuOgl line 1:------> if⏏(True) { }Unexpected block in infix position (two terms in a row) at /tmp/WKBOrOuOgl line 1… | ||
brrt | my error indeed :-) did not know that | ||
11:51
plutoid joined
|
|||
masak | brrt: generally, in Perl 6, things have different meanings if you write them together or if you write them apart. | 11:59 | |
brrt: like in %h<foo>, the '<' introduces a hash lookup. but in %h < 5, it's just the regular comparison op. | 12:00 | ||
12:00
xinming joined
|
|||
tadzik | r: my $h = 3; $h < 5 > 6 | 12:02 | |
p6eval | rakudo 4373f0: ( no output ) | ||
tadzik | r: my $h = { 5 => sub { say $^a + 1 } }; $h < 5 > 6 | 12:03 | |
p6eval | rakudo 4373f0: ( no output ) | ||
tadzik | r: my $h = { 5 => sub { say $^a + 1 } }; $h<5> 6 | ||
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===Confusedat /tmp/sJj5bRUmgm:1» | ||
tadzik | r: my $h = { 5 => sub { say $^a + 1 } }; $h <5> 6 | ||
p6eval | rakudo 4373f0: ( no output ) | ||
cognominal_ read Pheromonally instead of Phenomenally in masak statement | |||
pmichaud | good morning, #perl6 | 12:04 | |
moritz | good am, pm | 12:05 | |
Juerd | I'll keep it in mind for tomorrow :) | ||
(afternoon here) | |||
Good localtime | |||
tadzik | heh, in au example, are those regexes even Regular Expressions? :) | 12:06 | |
pmichaud | moritz: (rt #112216) What my last comment was trying to say (however badly) is that I don't have an opinion what the (consistent/inconsistent) behavior should be... only that I wouldn't make any further changes until we had agreement and spectests. :) | 12:08 | |
moritz | pmichaud: ok :-) | 12:09 | |
pmichaud: my opinion is that we should be consistent, one way or another. And currently we aren't. | |||
pmichaud | the current behavior is consistent with what I've been told in the past, even if it's not self-consistent with other parts of the Perl 6 spec :) | ||
au! o/ | 12:12 | ||
12:14
PacoAir joined
|
|||
brrt | hmm i have a case of sigil confusion... if I have declared an array attribute on an object, what sigil do i use to access it? | 12:19 | |
$ works, btw, but it seems... wrong | |||
moritz | brrt: use @ | 12:20 | |
pmichaud | brrt: if you declared the attribute as @xyz, it should be accessed via @xyz | ||
moritz | brrt: thing is, attributes are named @!foo (or also @foo, though I find it confusing). If you write 'has @.foo', the attribute is still called @!foo | ||
brrt: but the form with the dot also gives you an accessor, which is a very normal method | 12:21 | ||
and $.foo is short for $( self.foo ), just as @.foo is short for @( self.foo ) | |||
tadzik | TIL | ||
moritz | though rakudo ignores the sigils for the method calls | ||
niecza doesn't, I think | |||
tadzik | r: class A { method foo { return 5 }; method bar { @.foo } }; say A.new.foo.perl | 12:22 | |
p6eval | rakudo 4373f0: OUTPUT«5» | ||
tadzik | r: class A { method foo { return 5 }; method bar { @.foo } }; say A.new.bar.perl | ||
p6eval | rakudo 4373f0: OUTPUT«5» | ||
moritz | p6: class A { has @.a; method sayit { .say for $.a } }; A.new(a => (2, 3, 4)).sayit | ||
p6eval | pugs, rakudo 4373f0: OUTPUT«234» | ||
..niecza v15-6-gefda208: OUTPUT«2 3 4» | |||
moritz | niecza++ is correct here | ||
tadzik | indeed | 12:23 | |
masak | tadzik: if you think about it, it makes perfect sense? what's a public attribute? it's a private attribute with an (auto-generated) accessor method. so we just conflate the syntax of methods and public attributes. | ||
pmichaud | does that have a rakudobug ? | ||
12:23
tarch_ joined,
tarch left
|
|||
masak | pmichaud: hm, I think so. | 12:23 | |
I think I submat it last time we tulk about it. | |||
tadzik | masak: Sure it is, but I'm amused nonetheless :) | 12:24 | |
pmichaud | that should be really easy to fix | ||
since we already handle $( ) and @( ) | |||
12:24
tarch_ left
|
|||
moritz | is @( foo ) short for foo.list or for list(foo) ? | 12:24 | |
pmichaud | foo.list | ||
masak | pmichaud: rt.perl.org/rt3//Public/Bug/Displa...?id=111914 | ||
pmichaud | masak: that bug seems different than this one | 12:25 | |
masak | yeah, I'm thinking the same. | 12:26 | |
masak submits this one | |||
12:26
brrt left
12:27
jaldhar left,
brrt joined
|
|||
brrt | thanks :-) from outside the object, obviously there is no way to access it w/o the method | 12:27 | |
moritz | ... unless you go meta | ||
or cheat | |||
brrt | www.youtube.com/watch?v=AGBpIqROW9c | 12:28 | |
masak | rt.perl.org/rt3/Ticket/Display.html?id=112236 | ||
brrt | daskfj | ||
pmichaud | masak++ | ||
brrt | oh, it was not my intention to post that, i'm sorry | 12:29 | |
i thought my client was still disconnected | |||
moritz | any students here who would like to get paid for hacking on rakudo this summer? | 12:31 | |
brrt | oh yes, me me :-) | ||
pmichaud | paid? students? how do I become a student then? ;-) | ||
moritz | pmichaud: enroll at your university of choice | ||
brrt | although i probably do not have nearly the required skills | ||
masak | aw, don't say that. | 12:32 | |
moritz | brrt: there's the Google Summer of Code project | ||
masak | I don't speak for anyone else here, but personally I get lots done out of the depths of my incompetence :P | ||
brrt | i'm aware :-) i was actually hoping to implement bioperl6 | ||
masak | oh, you're that guy! | ||
brrt | the same | 12:33 | |
masak | brrt++ | ||
moritz | brrt: the Parrot folks are offering to do some Rakudo projects through the parrot foundation, so if you're interested, talk to to the #parrot folks on irc.perl.org | ||
specifically whiteknight | |||
pmichaud | in my case, a lot of what I've accomplished was based on suspending any idea of what could(n't) be achieved :) | ||
moritz | brrt: and do it quick, because the student application deadline is Friday | ||
brrt | :-) thanks, i will | ||
masak | pmichaud: "in order to clear this level, you have to disregard all obstacles" :D | 12:34 | |
moritz | what does &.foo mean, precisely? | 12:35 | |
masak | hm. | 12:36 | |
by extension, it means &( self.foo ) :P | |||
moritz | and what does &( TERM ) mean? | ||
masak is such a big help | |||
I have no idea. | 12:37 | ||
pmichaud | perhaps not the correct answer, but S13 has: | ||
The expected semantics of C<&.()> is that of a type coercion which may | |||
or may not create a new object. | |||
I think that's something different though. | |||
masak | it is. | ||
moritz | pmichaud: in that case, &.() is a short name for postcircumfix:<( )> | ||
masak | it's a short form of postcircumfix:<( )> | ||
tadzik | to it's a long, not a short ;) | 12:38 | |
pmichaud | S12 has: | ||
&.foo(1,2,3); # calls self.foo under & context | |||
&.foo.(1,2,3); # &.foo().(1,2,3), call .() on closure returned by .foo | |||
which is what masak++ said :) | |||
and equally helpful, at that. :) | |||
moritz | and what the heck does "under & context" mean? | ||
masak | it means under the context of something callable. | 12:39 | |
I mean, "I don't know"... :) | |||
moritz | masak.helpfulness == p6l.helpfulness # at least right now | ||
pmichaud | S03-operators mentions &() without any description of what it does :) | 12:40 | |
moritz tries to patch $.foo to DWIS | 12:41 | ||
12:43
liuchong left
12:46
netstar left
|
|||
pmichaud | afk for a while | 12:46 | |
moritz | patch compiles. Good. | ||
[Coke] sees pmichaud and au almost have a conversation on irc. | 12:47 | ||
moritz | and seems to do what it should. Great | ||
[Coke] | *boggle* | ||
PerlJam | Coke: Is that like a "crossing the streams" moment? :) | 12:49 | |
masak | [Coke]: that can't have been the first time, though. pm was doing PGE at the time Pugs broke into the physical universe. | ||
PerlJam | (gutenTag btw) | 12:50 | |
masak | moritz: in a slightly more helpful vein, wouldn't it be enough to go as-strict-as-possible and say that only callable thingies (trivially) cast to callable, and everything else is an error? | ||
moritz | more like recrosssing the streams | ||
masak | at least until we know what the heck &(42) means. | 12:51 | |
PerlJam | masak: +1 | 12:52 | |
12:52
jferrero left
|
|||
moritz | ok, what's the method call for that? | 12:53 | |
$ => item, % => hash, @ => list, & => code? | 12:54 | ||
masak | wfm | ||
they're all 4lw, which is cute. | |||
PerlJam | indeed | 12:55 | |
masak wants a t-shirt with those four pairs | |||
12:55
mucker left
|
|||
moritz | "and I heard you said that code is just a four-letter word" -- Joan Baez. Very nearly. | 12:55 | |
au | rehi pmichaud! \o </timeDilatedConversation> | ||
12:56
Araq joined
|
|||
PerlJam | YAPC 2008 (?) in Chicago had t-shirts with stars from the Chicago flag replaced with $ @ % & IIRC | 12:56 | |
Adding the method names seems like fodder for a future YAPC :) | 12:57 | ||
12:57
jferrero joined
|
|||
moritz | eeks. Lots of fallout from the patch. | 12:58 | |
n: class A { has %.h; method x { %.h<a> } }; say A.new(h => {a => 1 }) | 13:00 | ||
p6eval | niecza v15-6-gefda208: OUTPUT«A.new(...)» | ||
moritz | n: class A { has %.h; method x { %.h<a> } }; say A.new(h => {a => 1 }).x | ||
p6eval | niecza v15-6-gefda208: OUTPUT«1» | ||
13:04
benabik left
|
|||
masak | r: say Date.new("2012-02-25") | 13:05 | |
p6eval | rakudo 4373f0: OUTPUT«2012-02-25» | ||
masak | r: say Date("2012-02-25") | ||
p6eval | rakudo 4373f0: OUTPUT«Method 'Date' not found for invocant of class 'Str' in <anon> at src/gen/BOOTSTRAP.pm:800 in any <anon> at src/gen/BOOTSTRAP.pm:797 in block <anon> at /tmp/q7LAlDjKnF:1» | ||
masak | r: .say for Date.new("2012-02-25") .. Date.new("2012-03-02") | ||
p6eval | rakudo 4373f0: OUTPUT«2012-02-252012-02-262012-02-272012-02-282012-02-292012-03-012012-03-02» | ||
masak | r: .say for Date.new("2011-02-25") .. Date.new("2011-03-02") | 13:06 | |
p6eval | rakudo 4373f0: OUTPUT«2011-02-252011-02-262011-02-272011-02-282011-03-012011-03-02» | ||
masak | \o/ | ||
moritz | oh, I see why my patch has this much fallout | 13:10 | |
$.foo desugaring to self.foo.item | |||
masak | yes? | ||
moritz | think about rw accessors | ||
masak | oh! | ||
:/ | |||
moritz | oh. | ||
masak | wouldn't the other forms, like @.foo, suffer from this as well? | 13:11 | |
moritz | aye | ||
masak | because sometimes you want to @.foo = 1, 2, 3 | ||
except no-one ever does that. | |||
moritz | n: class A { has $.x; method set { $.x = 5 } }; given A.new { .set; say .x } | 13:13 | |
p6eval | niecza v15-6-gefda208: OUTPUT«5» | ||
masak | waitaminnit. | 13:14 | |
moritz | n: class A { has $.x; method set { $.x.item = 5 } }; given A.new { .set; say .x } | ||
p6eval | niecza v15-6-gefda208: OUTPUT«5» | ||
masak | that's a non-rw attribute. | 13:15 | |
moritz | masak: niecza simply doesn't do ro/decontainerization | ||
13:15
agentzh left
|
|||
masak | ah. | 13:15 | |
moritz | iirc it's even in the feature matrix | ||
so, design problem. | |||
I can see two solutions | 13:16 | ||
1) $.foo doesn't desugar to $.foo.item, but rather to some itemize primitive that doesn't affect rw-ness. Same for % and @ | 13:17 | ||
2) methods .item on Any and .list on Positional / .hash on Associative declare their invocant as rw, and their return value too | |||
for efficiency reasons I'd prefer 1 | 13:18 | ||
maybe we can extend that to @(...) in general | |||
and if you use @(...) on something that isn't a Positional container, it could still call .list | 13:19 | ||
whereas $(...) could always itemize without requiring a method call | |||
13:20
thou joined
|
|||
PerlJam | fwiw, #1 is how I imagined such things would work in general. | 13:21 | |
moritz | hm, it might be that the $( ... ) -> ....item translation is indeed a rakudoism | 13:23 | |
dalek | kudo/nom: f607966 | moritz++ | tools/build/check-versions.pl: [build] recommend --with-parrot with absolute paths, because the build system does not like relative paths |
13:24 | |
kudo/accessor-sigils: 0082372 | moritz++ | src/Perl6/Actions.pm: @.foo, $.foo and %.foo now enforce context Note that this breaks rw attributes |
|||
kudo/accessor-sigils: 915e0da | moritz++ | src/core/ (2 files): be more careful with sigils in the setting |
|||
moritz | when in doubt, branch | ||
13:27
sftp joined
|
|||
moritz | branch, fork and spoon :-) | 13:29 | |
masak | :) | 13:33 | |
moritz++ | 13:34 | ||
13:37
thou left
|
|||
gianlucadv | moritz: I would like to ask you about irclog.perlgeek.de/ | 13:39 | |
moritz | gianlucadv: sure. Feel free to /msg me if it's not related to this channel in particular | ||
13:42
thou joined
13:47
_ilbot left,
_ilbot joined
13:51
agentzh joined
13:52
thou left,
agentzh left
14:04
wolfman2000 left
14:14
benabik joined
14:31
snearch left
14:40
JimmyZ joined,
mcero left
14:44
plutoid left
14:46
benabik left,
benabik joined
14:48
wtw left
|
|||
[Coke] | p: say (1,2,3).pick(); | 14:50 | |
p6eval | pugs: OUTPUT«2» | ||
14:53
derrazo joined
|
|||
masak | r: say (1,2,3).roll(); | 14:54 | |
p6eval | rakudo 4373f0: OUTPUT«2» | ||
masak | p: say (1,2,3).roll(); | ||
p6eval | pugs: OUTPUT«*** No such method in class Array: "&roll" at /tmp/_N8HlqN5AA line 1, column 5-19» | ||
masak gets an itch in his programming fingers | |||
moritz | p: say (1,2,3).pick(5, :repl); | ||
p6eval | pugs: OUTPUT«*** No compatible multi variant found: "&pick" at /tmp/9I63TFPJHH line 1, column 5-27» | ||
moritz | p: say (1,2,3).pick(5, :rep); | ||
p6eval | pugs: OUTPUT«*** No compatible multi variant found: "&pick" at /tmp/QFO4ASpe45 line 1, column 5-26» | ||
masak | I mean, how hard could it be, to just add a .roll method? :) | ||
colomon | p: say (1,2,3).pick(5, :replace) | ||
p6eval | pugs: OUTPUT«*** No compatible multi variant found: "&pick" at /tmp/UhrIPeY7P4 line 1, column 5 - line 2, column 1» | ||
masak | could be that Pugs predates that named parameter. | 14:55 | |
colomon | either that or it had a different name then. | 15:00 | |
[Coke] | masak: I just fudged that spec test for you. have fun. ;) | 15:04 | |
You'll want to implement "so" first, though. | |||
dalek | ast: 30d3be9 | coke++ | S32- (2 files): pugs fudge |
15:05 | |
moritz | [Coke]: I had a branch for 'so'; did you try that? | ||
dalek | gs.hs: e5911bf | coke++ | t/spectest.data: run (fudged) tests |
||
[Coke] | moritz: ISTR it failed to work. | ||
moritz | (or am I misremembering stuff?) | ||
:( | |||
[Coke] | I can try it again. momentito. | ||
perl6: say so 3 | 15:06 | ||
p6eval | pugs: OUTPUT«*** No such subroutine: "&so" at /tmp/jnJDVKvLCj line 1, column 5 - line 2, column 1» | ||
..rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«True» | |||
[Coke] | urk. I cannot build your so branch on feather. | 15:07 | |
Preprocessing executable 'pugs' for Pugs-6.2.13.20120203... | |||
<command line>: cannot satisfy -package-id FindBin-0.0.5-c1291d79cbf3e04ef6f8304a7717f332: | |||
doing a clean, a cabal update, and a rebuild, now I'm getting pages of things like: | 15:09 | ||
package terminfo-0.3.2.3 is broken due to missing package | |||
15:09
birdwindupbird left
|
|||
masak | :/ | 15:09 | |
still work to do on getting a working dev environment for Pugs, in other words. | 15:10 | ||
[Coke] | haven't done a build in weeks. I assume, perhaps, that ghc was updated. | ||
moritz | I get the same error on master | ||
15:10
fsergot joined,
spider-mario joined
|
|||
fsergot | hi o/ | 15:10 | |
:) | |||
[Coke] | yah. I reinstalled, e.g. coke@feather:~/sandbox/Pugs.hs/Pugs$ cabal install text-0.11.1.13 | ||
.. and now that error is gone from the build. | 15:11 | ||
jlaire | ' | ||
[Coke] wishes for a "cabal rebuild everything" | 15:18 | ||
moritz | [Coke]: you're right, the 'so' branch doesn't work :/ | 15:20 | |
masak | fsergocie! \o/ | 15:21 | |
[Coke] | moritz: sorry, man. | ||
I can't build master or so on feather for pugs. | 15:25 | ||
No instance for (MonadIO (InputT IO)) | |||
moritz | I did a git clean -xdf | 15:26 | |
rm -rf ~/.ghc/ | |||
and then cabal install 'mtl < 2' | |||
then typed 'make', and then cabal install <all the packages it complained about> | |||
masak | I recognize that error. I think that's what I got in my attempts to get a working dev env on feather. | 15:27 | |
jlaire | \ | 15:29 | |
[Coke] | so, how did our cabals get screwed up? | ||
15:32
fglock left
15:39
mucker joined
|
|||
[Coke] | blowing away ~/.ghc helped. | 15:40 | |
build succeeds now. | |||
masak | \o/ | 15:42 | |
15:47
Psyche^ joined
15:51
Patterner left,
Psyche^ is now known as Patterner
15:53
kaleem left
15:55
jferrero left
15:57
derrazo left
15:58
jferrero joined
16:00
JimmyZ left
16:07
brrt left
16:14
wolfman2000 joined
16:20
DAA2WSX joined,
VAAD1KD joined
16:24
fglock joined
16:27
vlixes joined
16:40
pernatiy left
16:47
tokuhirom joined
16:54
dakkar left
17:02
PZt joined
17:11
tokuhirom left,
tokuhirom joined
|
|||
timotimo | are there any tools for profiling in rakudo? i've got some code that runs much faster than i feel it should | 17:12 | |
runs much slower* | |||
benabik | There's a profiling run core in Parrot, but I'm not familiar with how to use it and don't know if it works well with Rakudo. | 17:13 | |
17:14
lichtkind joined
17:15
tokuhirom left
|
|||
timotimo | should i be expecting slowness if i create many short-lived instances of a class? the class in question is my XYZ class that does a little bit of vector arithmetic. i use it as key into hashes a lot. | 17:16 | |
it's an immutable class so any arithmetic on it would create new instances, sometimes instances that will be thrown away instantly | 17:17 | ||
17:19
Chillance joined
|
|||
lichtkind | any clue why thies doesnt work locally? | 17:20 | |
phenny | lichtkind: 08:51Z <masak> tell lichtkind ask on p6l about $=POD vs $=pod. TheDamian hangs out there, and he's likely to reply. | ||
lichtkind | r: say '\\' | ||
p6eval | rakudo 4373f0: OUTPUT«\» | ||
lichtkind | k | ||
geekosaur | works for me locally... but if you;re using perl6 -e, be aware of shell quoting shenanigans | 17:21 | |
specifically, the naive: perl6 -e "say '\\'" # will fail because the shell interprets \\ inside the doublequotes, so perl6 receives: say '\' | 17:22 | ||
lichtkind | ah | ||
thanks | |||
\\\\ worked :) | |||
17:24
gianlucadv left
|
|||
colomon | So, is someone going to implement Notch's DCPU-16 in Perl 6? | 17:28 | |
0x10c.com/doc/dcpu-16.txt | |||
;) | 17:29 | ||
17:29
derrazo joined
|
|||
benabik | Wait, wait... Mars Effect is a real game? | 17:32 | |
17:32
wolfman2000 left
|
|||
[Coke] | benabik: as opposed to Mass Effect ? | 17:33 | |
benabik | [Coke]: @notch posted that information about a game called "Mars Effect" on 4/1, with the note that the name was carefully chosen to avoid any lawsuits like over Scrolls. | ||
I hadn't heard that it's actually a game. Although, obviously, not called Mars Effect | 17:34 | ||
derrazo | doo hoo hoo | 17:53 | |
it's like what | 17:54 | ||
0x10c now? | |||
benabik | derrazo: Yup | ||
17:55
mucker left
17:57
simcop2387 left
17:59
skids joined
18:00
simcop2387 joined
18:01
havenn joined
18:04
spaceships joined
18:06
fhelmberger left
|
|||
spider-mario | r: constant $x = m/42/ | 18:10 | |
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'Mu'» | ||
spider-mario | r: constant $x = /42/ | ||
p6eval | rakudo 4373f0: ( no output ) | ||
spider-mario | why does this happen? | ||
benabik | r: $_ = 'test'; say m/es/ | 18:11 | |
p6eval | rakudo 4373f0: OUTPUT«=> <es>» | ||
benabik | r: $_ = 'test'; say /es/ | ||
p6eval | rakudo 4373f0: OUTPUT«_block1011» | ||
spider-mario | p6: constant $x = m/42/ | ||
PerlJam | the first one tries to match against $_ and store the result in $x. The second one just stores the pattern in $x | ||
p6eval | niecza v15-6-gefda208: OUTPUT«Unhandled exception: Unable to resolve method match in class Any at /tmp/VGKyKPUmD7 line 1 ($x init @ 2)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/src/NieczaBackendDotnet.pm6 line 0 (downcall @ 1)  at /home/p6eval/niecza/src/Nie… | ||
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) { unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20120203/blib6/pugs/perl5/lib'; eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;}'Pugs::Runtime::Match::HsBridge'"*** Can't locate P… | |||
..rakudo 4373f0: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'Mu'» | |||
spider-mario | oh, ok | ||
thanks | |||
18:11
derrazo left
|
|||
PerlJam | r: m/42/ | 18:11 | |
p6eval | rakudo 4373f0: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <anon> at /tmp/oMhkcncqcx:1» | ||
PerlJam | that's interesting. | 18:12 | |
PerlJam wonders where the divide is between Any and Mu there | |||
spider-mario | r: given 'there is a 42 in here' {m/42/; $/.perl.say} | ||
p6eval | rakudo 4373f0: OUTPUT«Match.new(orig => "there is a 42 in here", from => 11, to => 13, ast => Any, list => ().list, hash => EnumMap.new())» | ||
spider-mario | nice | ||
PerlJam | (How did $_ become either an Any or a Mu?) | ||
spider-mario | r: given 'there is a 42 in here' {m/42/.perl.say} | 18:13 | |
p6eval | rakudo 4373f0: OUTPUT«Match.new(orig => "there is a 42 in here", from => 11, to => 13, ast => Any, list => ().list, hash => EnumMap.new())» | ||
masak | good eve, #perl6. | 18:16 | |
lichtkind | hai hai | ||
spider-mario | o/ | ||
masak | はいはい | 18:17 | |
spider-mario | .ui coi | ||
masak | wow, Lojban. | 18:20 | |
18:20
mishin__ left
|
|||
spider-mario | I’d like to actually be able to speak in it | 18:21 | |
I barely know a few constructs and words | 18:22 | ||
masak | I hear it's possible to become fluent in it, though not that common. | ||
masak settles down for the evening, with a beer and Ch. 82 of HPMoR | |||
spider-mario | what is your native language, btw? | 18:23 | |
(if I may ask) | |||
masak | phenny: "Svenska"? | ||
phenny | masak: "Swedish" (sv to en, translate.google.com) | ||
spider-mario | ok :) | ||
I didn’t know about phenny, what is it? | 18:24 | ||
masak | bot that keeps messages for us, and knows Unicode, and translates using GT. | ||
spider-mario | oh :) | ||
phenny: "merci pour l’explication"? | 18:25 | ||
phenny | spider-mario: "thank you for the explanation" (fr to en, translate.google.com) | ||
masak | phenny: tell spider-mario if you ever need to leave a message, this is how to do it. it's triggered with your next utterance on the channel. | ||
phenny | masak: I'll pass that on when spider-mario is around. | ||
spider-mario | great :D | ||
phenny | spider-mario: 18:25Z <masak> tell spider-mario if you ever need to leave a message, this is how to do it. it's triggered with your next utterance on the channel. | ||
masak | .u smiling | ||
phenny | U+263A WHITE SMILING FACE (☺) | ||
spider-mario | .u pile | ||
phenny | spider-mario: Sorry, no results for 'pile'. | ||
spider-mario | and yet there is www.fileformat.info/info/unicode/ch.../index.htm | 18:26 | |
masak | yeah, phenny doesn't have the latest silliness from the Unicode Consortium. | ||
also, I don't know why that character is everyone's favorite when there's WOMAN WITH BUNNY EARS. | |||
arnsholt | spider-mario: BTW, did I see you mentioning that you're in Rouen? | 18:27 | |
spider-mario | yes | ||
arnsholt | Cool. I lived there, some years back | ||
spider-mario | oh :) | ||
arnsholt | Almost ten years actually, now that I think about it | ||
18:27
pernatiy joined
|
|||
lichtkind | sir what is your opinion about my latest peace - U+1F4A9 | 18:28 | |
nuff said :) | |||
masak: any pointer to things i aybe not adressed ? | 18:29 | ||
18:31
thou joined
|
|||
[Coke] | # 04/04/2012 - rakudo++ ; niecza (95.44%); pugs (38.82%) | 18:32 | |
niecza slips a bit, pugs gains. | 18:33 | ||
benabik | Wasn't pugs at like 5% a few weeks ago? | ||
[Coke] | gist.github.com/1476841#file_perl6_pass_rates | 18:34 | |
# 02/21/2012 - niecza++ ; pugs (14.83%); rakudo (99.04%) | |||
thou | o/ everyone | 18:35 | |
[Coke] | pugs has gone from 3009 passes on 2/21 to 8229 today. | ||
masak | lichtkind: I don't understand the context of your question? _all_ the things? | ||
benabik | Ah, %15. Still awesome to see its meteoric rise. | ||
lichtkind | hi thou | ||
[Coke] | benabik: eh. mainly just fudging tests. hop on. ;) | ||
thou | hallo, lichtkind. long time no see :-) | ||
lichtkind | masak: some dirty corners of perl 6 i might not know | 18:36 | |
[Coke] | though au++, moritz++, and masak++ have all poked at things to make it do a little more. | ||
lichtkind | yes | ||
[Coke] | er, whoops. 8276 today | ||
lichtkind | masak: we should get camelia into unicode | ||
thou | lichtkind: i've been out of perl6 land for a long time, still finding other things are higher on the list right now in my life | ||
[Coke] | (pushed) | ||
benabik | [Coke]: Brushing off the bit rot from tests is still progress. :-) | ||
18:36
brrt joined
|
|||
thou | but i still love it :-) | 18:36 | |
lichtkind | thou: yes but i try to cataloge the lang | 18:37 | |
[Coke] | I imagine I can hit 10K without writing more haskell. | ||
lichtkind | thou: im maybe longer there thatn you and when i come back so much has changed | 18:40 | |
masak | lichtkind: I'll have a look. | ||
lichtkind: by the way, providing a URL helps whenever you want others to look at something on the web ;) | 18:41 | ||
thou | i'm still there (or not fully here, that is). i'm occasionally peeking in to see where things are at. | ||
lichtkind | thou: may wanna help (its easy) :) | 18:42 | |
masak | things are at: awesome, and improving. | 18:45 | |
r: $_ = "The answer seems to be 2 + 40"; s[\d+ \s* '+' \s* \d+] = eval ~$/; .say | |||
p6eval | rakudo 4373f0: OUTPUT«The answer seems to be 42» | ||
masak | \o/ | ||
flussence | how much of pugs is written in plain perl6? | 18:46 | |
masak | relatively little, IIRC. | ||
most of the parsing stuff and the runtime are in Haskell. | |||
18:47
tyatpi joined,
brrt left,
brrt joined
|
|||
flussence wonders if various core bits written as perl6 could be separated out into a standard library that all impls can share | 18:48 | ||
lichtkind | allright my task for today sanitising all the contextualizers | ||
masak | lichtkind: you still haven't provided a URL. | 18:50 | |
lichtkind | wick lacks like an old toilet | ||
masak: for what? | |||
masak | lichtkind: you asked me if anything was obviously missing. | ||
lichtkind: I'm trying to access www.perlfoundation.org/perl6/index....ics_tablet but I can't get through. | |||
getting "could not connect to www.perlfoundation.org" | 18:52 | ||
[Coke] | flussence: I think that's a stretch goal. so far whenever we've tried to do that, different niecza & rakudo have implemented different other things, so it's never a straight copy. | ||
writing the perl6 parts that you can in perl6 cross-implementationally would require a lot of effort to figure out which stuff is core. | 18:53 | ||
lichtkind | masak right i thought ti was obvious mom | ||
[Coke] | (or CORE::, I suppose) | ||
masak is not lichtkind's mom :) | |||
PerlJam | maybe lichtkind has become british? but then it would be "mum", wouldn't it? | 18:54 | |
arnsholt | flussence: Common Lisp has parts of that I think. Apparently there's one implementation of the LOOP macro, and noone but the author really understands how it works =) | ||
18:55
voraratis joined
|
|||
masak | lichtkind: my point isn't that it's not obvious where the information you want me to look at can be found. my point is that providing a URL makes it unambiguous where it can be found, and saves me work guessing. | 18:55 | |
lichtkind: besides, it may make others click through as well. | |||
thirdly, it provides context in the IRC logs. | |||
18:55
voraratis left
|
|||
lichtkind | masak: i understood it from staart i just wrestling for wiki access myself | 18:55 | |
[Coke] | is this work still happening under auspices of a grant, also? Having a URL would help in that case, too. ;) | ||
18:56
voraratis joined
|
|||
lichtkind | that would be even better :) | 18:56 | |
masak | lichtkind: why is providing a URL contingent on getting wiki access? don't you know where the stuff you're working with is located? | ||
18:57
voraratis_ joined,
voraratis left
|
|||
lichtkind | masak: becasue i was nervously fiddling to save my changes and was not paying full attention to the channel let alone copy the url | 18:57 | |
masak | ok. | 18:59 | |
let me know when you are ready. | |||
lichtkind | www.perlfoundation.org/perl6/index....dex_tablet | 19:02 | |
plus my precious clipboars was filled with data i had to store first | |||
benabik | TPF's site seems to be non-responsive. :-/ | 19:03 | |
masak envisions a wild hog in the forest, keeping sheets of paper together | |||
benabik | masak++ | ||
19:06
tyatpi left
|
|||
lichtkind | the call frame method "line" tells me count of lines or first line of a sub? | 19:07 | |
brrt | p6eval: say [max] <39 29 10 48> | 19:09 | |
masak | what method is that? where did you read about it? | ||
brrt: 'r' or 'n' or 'p6' | |||
Araq | are there any efforts to provide a luajit backend for perl6? | ||
brrt | p6: say [max] <39 28 40 11> | ||
p6eval | rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«40» | ||
..pugs: OUTPUT«***  Unexpected "28" expecting operator, ":" or "," at /tmp/esyiVW2dvF line 1, column 15» | |||
lichtkind | masak: in the synopsis for routines :) | ||
masak | r: say [max] <2 11> | ||
p6eval | rakudo 4373f0: OUTPUT«2» | 19:10 | |
masak | n: say [max] <2 11> | ||
p6eval | niecza v15-6-gefda208: OUTPUT«11» | ||
masak | inneresting. | ||
masak submits rakudobug | |||
brrt | max compares them as strings, seems to be the explanation | ||
masak | lichtkind: ok, I'll just find that synopsis myself then, and try to find the reference in question. | ||
brrt: they are strings. | 19:11 | ||
[Coke] | buubot_backup: say 3 | ||
buubot_backup | [Coke]: Couldn't match input. | ||
masak | brrt: actually, they are weird Str/Int hybrids, and the Int aspect should probably win when sorting. | ||
19:12
voraratis_ left
|
|||
brrt | i would hope so | 19:12 | |
19:14
wolfman2000 joined
|
|||
lichtkind | masak: feather.perl6.nl/syn/S06.html#The_c..._functions | 19:15 | |
masak | thank you ;) | ||
brrt | p6: say <9 10 200>.sort | 19:16 | |
p6eval | rakudo 4373f0: OUTPUT«10 200 9» | ||
..pugs: OUTPUT«102009» | |||
..niecza v15-6-gefda208: OUTPUT«9 10 200» | |||
masak | lichtkind: I take it as meaning "the current line", where we're running right now. | ||
lichtkind | masak: but its underspacced | ||
masak | brrt: aye, same problem. | 19:17 | |
lichtkind: granted. but you asked what it meant, and that's my interpretation. | |||
lichtkind: I find neither "count of lines" or "first line of a sub" makes much sense. | |||
lichtkind | masak: but on the searchlight, this is a case for toady-man | ||
masak: true | 19:18 | ||
spider-mario | the behavior varies between (rakudo, pugs) and niecza | 19:19 | |
r and p sort as strings | 19:20 | ||
(+ pugs does’n insert spaces when it stringifies) | |||
niecza sort them as integers | |||
sorts* | |||
brrt | masak: is there a way to convert them to ints | ||
19:20
envi_ left
|
|||
spider-mario | ».Int | 19:20 | |
masak | p6: say <9 10 200>».Int.sort | 19:21 | |
p6eval | pugs: OUTPUT«910200» | ||
..rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«9 10 200» | |||
masak | spider-mario++ | ||
spider-mario | :) | ||
19:21
birdwindupbird joined,
wolfman2000 left
|
|||
masak | I still can't determine whether (1) we're in the middle of things, and stuff like this is shining through and making Str/Int duality seem like a really bad idea, or (2) the Str/Int duality is a really bad idea. | 19:22 | |
Araq | (2) | ||
brrt | i'm not sure either | 19:23 | |
i usually like it | |||
geekosaur | I had the notion we were trying to get away from it, as one of the more annoying p5-isms | ||
having it suddenly come back still seems like something is wrong somewhere | 19:24 | ||
flussence | reminds me of Scalar | ||
masak | geekosaur: no, Perl 6 has never been trying to get away from it. the Cool type sort of manifests the fact that we still like auto-casting between various scalar types. | 19:25 | |
benabik | n: <5 6>[0].WHAT.say | ||
p6eval | niecza v15-6-gefda208: OUTPUT«Unhandled exception: Attempted to access slot $!value of type object for IntStr at /home/p6eval/niecza/lib/CORE.setting line 0 (Str.say @ 1)  at /tmp/1t0SRx5NAI line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3)  at … | ||
[Coke] | I would love to see more explanations of things like this next to the spec. "here's why this was added in" | ||
benabik | ... That's not what I was expecting. | ||
n: <5 6>».WHAT.say | |||
p6eval | niecza v15-6-gefda208: OUTPUT«IntStr() IntStr()» | ||
masak | geekosaur: but the <1 2 3> syntax, along with command-line arguments, is special in that it tries to "guess" what type things "really" are, besides being ordinary strings. | 19:26 | |
flussence: I never understood what Scalar is doing in the spec. I think I've had it explained to me a few times. it's something like a scalar container, analogously with Array or Hash. | 19:27 | ||
spider-mario | I didn’t know there was actually such a thing as IntStr | ||
masak | flussence: but it just seems to be that it means a hundred things and nothing whenever it's used in the spec. | ||
brrt | p6: <5 6>>>.WHAT.say | ||
masak | spider-mario: there isn't. that's just Niecza's name for it. | ||
p6eval | rakudo 4373f0: OUTPUT«Parcel()» | ||
..niecza v15-6-gefda208: OUTPUT«IntStr() IntStr()» | |||
..pugs: OUTPUT«StrStr» | |||
spider-mario | ok | 19:28 | |
masak | r: say <5 6>[0].^name | ||
p6eval | rakudo 4373f0: OUTPUT«Str» | ||
masak | r: say <5 6>[0].WHAT | ||
p6eval | rakudo 4373f0: OUTPUT«Str()» | ||
masak | hm. | ||
19:29
NamelessTee joined
|
|||
masak | r: say 5 ~~ Int | 19:29 | |
p6eval | rakudo 4373f0: OUTPUT«True» | ||
masak | r: say <5 6>[0] ~~ Int | ||
p6eval | rakudo 4373f0: OUTPUT«False» | ||
masak | huh :) | ||
brrt | anyway... you could probably solve by modifying max to convert to int | ||
but what happens then, if you use [max] <9 10 200 foobar> | 19:30 | ||
spider-mario | 'foobar'.Int = 0 | 19:32 | |
r: <9 10 200 foobar>».Int.perl | |||
p6eval | rakudo 4373f0: ( no output ) | ||
spider-mario | r: <9 10 200 foobar>».Int.perl.say | ||
p6eval | rakudo 4373f0: OUTPUT«(9, 10, 200, 0)» | ||
masak | spider-mario: no, it's a conversion error. | ||
brrt: right. we remind ourselves of this problem once in a while. same with &sort, for example. | 19:33 | ||
spider-mario | not in rakudo, appearently | ||
masak | spider-mario: no, rakudo is lagging. | ||
spider-mario | n: <9 10 200 foobar>».Int.perl.say | ||
p6eval | niecza v15-6-gefda208: OUTPUT«Unhandled exception: Cannot parse number: foobar at /home/p6eval/niecza/lib/CORE.setting line 1366 (die @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3405 (ANON @ 10)  at /home/p6eval/niecza/lib/CORE.setting line 3407 (NumSyntax.str2num @ 4)  a… | ||
spider-mario | indeed | ||
brrt | p6: { my $input = "9 10 200"; my @data = $input.split(' '); say @data.sort } | ||
spider-mario | that’s a good thing | ||
p6eval | rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«10 200 9» | ||
..pugs: OUTPUT«102009» | |||
spider-mario | I’d have disliked it being the expected result | ||
masak | brrt: converting to a number won't fly, because &sort and [min] and [max] aren't numeric by default. they adapt to the type they're comparing. | 19:34 | |
brrt: and if two objects in the list can't be compared, they fail. | |||
spider-mario | p6: <9 10 200 foobar>.sort.perl.say | ||
p6eval | niecza v15-6-gefda208: OUTPUT«(val("9"), val("10"), val("200"), "foobar").list» | ||
..pugs, rakudo 4373f0: OUTPUT«("10", "200", "9", "foobar")» | |||
spider-mario | p6: <9 10 200 foobar>.max(*.Int).perl.say | 19:35 | |
p6eval | rakudo 4373f0: OUTPUT«"200"» | ||
..pugs: OUTPUT«1797693134862315907729305190789024733617976978942306572734300811577326758055009631327084773224075360211201138798713933576587897688144166224928474306394741243777678934248654852763022196012460941194530829520850057688381506823424628814739131105408272371633505106845862982399472… | |||
..niecza v15-6-gefda208: OUTPUT«Unhandled exception: Cannot parse number: foobar at /home/p6eval/niecza/lib/CORE.setting line 1366 (die @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3405 (ANON @ 10)  at /home/p6eval/niecza/lib/CORE.setting line 3407 (NumSyntax.str2num @ 4)  a… | |||
spider-mario | whence pugs’ output? | ||
19:35
havenn left
|
|||
spider-mario | p: 'foobar'.Int | 19:35 | |
p6eval | pugs: ( no output ) | ||
spider-mario | p: 'foobar'.Int.say | ||
p6eval | pugs: OUTPUT«0» | ||
spider-mario | I can’t see where it could possibly come from | 19:36 | |
p: <9 10 200 foobar>.map(*.Int).perl.say | |||
p6eval | pugs: OUTPUT«*** Cannot cast from VList [VInt 1797693134862315907729305190789024733617976978942306572734300811577326758055009631327084773224075360211201138798713933576587897688144166224928474306394741243777678934248654852763022196012460941194530829520850057688381506823424628814739131105… | ||
spider-mario | hm | ||
p: <9 10 200 foobar>».Int.perl.say | 19:37 | ||
p6eval | pugs: OUTPUT«(9, 10, 200, 0)» | ||
19:37
pernatiy left
|
|||
spider-mario | p: <9 10 200 foobar>.map({.Int}).perl.say | 19:37 | |
p6eval | pugs: OUTPUT«(9, 10, 200, 0)» | ||
benabik | p: say *.Int | ||
p6eval | pugs: OUTPUT«1797693134862315907729305190789024733617976978942306572734300811577326758055009631327084773224075360211201138798713933576587897688144166224928474306394741243777678934248654852763022196012460941194530829520850057688381506823424628814739131105408272371633505106845862982399472… | ||
spider-mario | Whatever causes stranges issues | ||
oh | |||
appearently, it’s as simple as that | |||
. | |||
masak | yeah. | 19:38 | |
benabik | I think pugs doesn't do WhateverCode | ||
masak | probably some sort of MAXINT, albeit with arbitrary precision. | ||
Pugs does indeed not do WhateverCode. it predates it. | |||
brrt | predates, as in eats? | 19:39 | |
spider-mario | :D | ||
benabik | pre-date is a palm tree | ||
TimToady | Araq: diakopter was doing something with a lua backend, but I think he gave up on it | 19:42 | |
Araq | ok thanks, TimToady | 19:43 | |
19:44
pernatiy joined
19:46
tt joined
|
|||
tt | hello | 19:46 | |
19:46
tt is now known as Guest2724
|
|||
Guest2724 | hello | 19:47 | |
brrt | hello | ||
sjohnson | 8hello | ||
spider-mario | hello | ||
sjohnson | oops | ||
i blew it | |||
spider-mario | after a non-prime number of occurrences | 19:48 | |
:( | |||
(unless mine has come too late) | |||
lichtkind | hurray wiki works | 19:52 | |
masak: please check just that table www.perlfoundation.org/perl6/index....xtualizers | |||
moritz | \o | 19:53 | |
19:53
Guest2724 left
|
|||
lichtkind | hai moritz | 19:54 | |
19:57
nebuchadnezzar left
19:58
nebuchadnezzar joined
|
|||
masak | lichtkind: it's too bad things don't line up well since it's not a monospaced font. | 20:03 | |
lichtkind: &() => code() | 20:04 | ||
lichtkind | im working on formating | ||
that will come s soon | |||
thatnk i missed code() | |||
thanks | |||
thatswhy i asked | |||
masak | apart from that, it looks fine. | 20:05 | |
lichtkind | thank you | 20:06 | |
cognominal_ | is there a bug filed about the nqp/nqpq shell being broken? | 20:11 | |
brrt | whats the best mailing list to subscribe to | ||
for dev discussions | 20:12 | ||
moritz | [email@hidden.address] | ||
cognominal_ | I answer my own quesiton yes, I filed it code.activestate.com/lists/perl6-compiler/7620/ | ||
20:17
xenu left
|
|||
lichtkind | masak: formating is fixed and code to main index added too | 20:20 | |
tadzik | good evening! | 20:23 | |
flussence | ooh, I just found www.mono-project.com/Mono_LLVM - anyone tried it on niecza? | 20:24 | |
20:24
fglock left
20:25
tyatpi joined
|
|||
flussence | (and I just realised gentoo's mono doesn't seem to have llvm support at all, bah) | 20:25 | |
lichtkind | tadzik: hai | 20:29 | |
20:31
localhost left
20:33
localhost joined
|
|||
lichtkind | hope to scratch the 800 this weak | 20:36 | |
tadzik | 800? | ||
moritz | didn't we already have 1000 this week? | 20:37 | |
whatever those numbers mean :-) | |||
20:38
derrazo joined
|
|||
lichtkind | moritz: i mean entires in index A and no we just past 700 5 days ago | 20:38 | |
i just wondered if there are 1000 possible | 20:39 | ||
20:40
spaceships left
20:41
derrazo left,
brrt left
20:43
birdwindupbird left
20:44
fsergot left
20:52
tadzik is now known as iDzik
|
|||
jnthn home | 21:04 | ||
iDzik | hello jnthn | ||
[Coke] | jnthn: yay, safe travels. | 21:05 | |
jnthn: how was the 80 hour flight? ;) | |||
jnthn | [Coke]: It departed 8 hours late. | ||
iDzik | ohh | ||
jnthn | [Coke]: Then the bus (this is crazy) from the plane to the terminal at Frankfurt that I was on got in an accident. :/ | ||
jnthn only got a few cuts | |||
huf | that's like a 2minute bus ride, what :/ | 21:06 | |
jnthn | Right. | ||
How the hell did they screw that up. :/ | |||
huf | what did the bus hit? another bus? one of those flat towy things? | ||
[Coke] | jnthn: YIKES | 21:07 | |
jnthn | The latter, and it actually managed not to hit it, but braked sharply enough to send everyone who was standing up flying. :/ | ||
huf | oh :( | ||
jnthn | Anyway, I'm basically fine. Just tired, and home quite a bit later than planned. | 21:08 | |
21:08
bbkr left,
bbkr joined
|
|||
jnthn | $dayjob were kind enough to cancel tomorrow morning's meeting though. :) | 21:08 | |
[Coke] | \o | 21:09 | |
er, \o/ | |||
colomon | o/ | ||
iDzik | gosh, glad you're ok | 21:10 | |
jnthn | Anyways, the rest of the vacation was all very nice. :) | 21:12 | |
Once I'm caught up on sleep, I look forward to digging back in to Rakudo. | 21:13 | ||
21:14
kaare_ left
|
|||
jnthn | ooh, pmichaud++ dropped by with another patch :) | 21:16 | |
cognominal_ | I can't wait to see you both on track to see rakudo dev back to cruise speed | 21:26 | |
masak | jnthn! \o/ | 21:27 | |
jnthn | o/ masak | ||
masak | jnthn: I guess you're about to go to sleep. | 21:28 | |
jnthn: glad to hear you're safe, and not mortally wounded in the bus accident. | |||
jnthn | masak: Will sleep soonish, just having a little snack first. My body thinks it's dinner time... | 21:29 | |
masak: You managed to post from the future again on Planetsix :P | |||
cognominal_ | :) | ||
masak | yeah :/ | ||
cognominal_ | wish he could send patch from the future | 21:30 | |
masak | moritz++ suggests I put in a check for this in my blogging tool. I will do this. | ||
cognominal_: all of Perl 6 is a patch from the future ;) | |||
cognominal_ | except the future is slow to percolate back into the present. | 21:31 | |
jnthn | At least we'll be leaving the PAST behind soon... | 21:32 | |
21:32
jaldhar joined
|
|||
masak | \o/ | 21:33 | |
maybe even tomorrow. | |||
cognominal_ | jnthn++ | ||
jnthn | masak: I think the transition will take more than a day :P | ||
iDzik | will we be using FUTURE now? ;) | ||
cognominal_ | we will be QAST in the future? | ||
jnthn | .oO( QAST::Lots ) |
21:34 | |
masak .oO( the PAST wasn't abandoned in a single day ) | 21:36 | ||
jnthn | .oO( the PAST was slowly QAST away ) |
||
lichtkind | r: %h = 1=>2, 3=>4; say %h.end | 21:41 | |
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===Variable %h is not declaredat /tmp/IBjgGEYRrO:1» | ||
lichtkind | r: %h = 1=>2, 3=>4; say @(%h).end | ||
p6eval | rakudo 4373f0: OUTPUT«===SORRY!===Variable %h is not declaredat /tmp/26cSF_71x6:1» | ||
lichtkind | r: my %h = 1=>2, 3=>4; say @(%h).end | ||
p6eval | rakudo 4373f0: OUTPUT«1» | ||
lichtkind | r: my %h = 1=>2, 3=>4; say %h.end | ||
p6eval | rakudo 4373f0: OUTPUT«1» | ||
lichtkind | thats strange | 21:42 | |
i expected a pair | |||
jnthn | r: my %h = 1=>2, 3=>4; say @(%h).perl | 21:43 | |
p6eval | rakudo 4373f0: OUTPUT«("1" => 2, "3" => 4).list» | ||
jnthn | r: my @a = <foo bar baz>; say @a.end | ||
p6eval | rakudo 4373f0: OUTPUT«2» | ||
jnthn | lichtkind: .end doesn't give you the item at the end, it gives you the end index | ||
masak | I also once thought .end would give you the last item. it doesn't. | 21:44 | |
.end is the Perl 6 equiv of $#array | |||
so often it simply corresponds to .elems - 1 | 21:45 | ||
lichtkind | yes thathow i wrote it but i was curious how reacts on hashes | ||
was not thinking that clear | 21:46 | ||
Araq | masak: what do you mean "often .elems-1" ? | ||
lichtkind | elems is amount of elements of a list | ||
21:46
IngisKahn joined
|
|||
masak | Araq: well, you can declare arrays to have other indexing schemes. | 21:47 | |
lichtkind | do +@a or @a.elems | ||
TimToady | only by using .{} instead of .[] | ||
.[] is always 0-based | |||
masak | right. | ||
lichtkind | $[ finally died hurayyyyy :) | 21:48 | |
i mean in perl 5 too | |||
masak | I also don't quite remember how multi-dim arrays declare their .end | ||
TimToady | eval: say $[ | ||
buubot_backup | TimToady: ERROR: Can't locate arybase.pm in @INC (@INC contains:) at (eval 20) line 2. BEGIN failed--compilation aborted at (eval 20) line 2. | ||
masak | hopefully in a sensible way :) | ||
21:48
IngisKahn left
|
|||
TimToady | the sensible way might be to refuse to honor .end :) | 21:50 | |
masak | well, even a multidimensional array has a first dimension. | 21:54 | |
21:58
benabik left
|
|||
TimToady | the problem is that a multi-dim array has more than one end | 22:03 | |
and multi-dim array subscripts are rather like surreal numbers | 22:04 | ||
masak | I don't immediately see the connection. | 22:05 | |
masak .oO( sorear numbers ) | 22:06 | ||
Araq | nothing in computing is like surreal numbers; computing is all about *discrete* math | 22:09 | |
TimToady | Perl 6 has many indiscretions :) | 22:10 | |
TimToady wonders if there will be a better way to write rosettacode.org/wiki/Identity_matrix after S09 is implemented | 22:12 | ||
spider-mario | S09 looks really promising | 22:13 | |
TimToady | well, other than turning @id[$i][$j] into @id[$i;$j] | 22:14 | |
spider-mario | I wish I were able to contribute to one of its implementations | ||
(I could say that for a lots of things) | |||
TimToady | realistically, it's probably faster to clear a batch of memory to 0's and then set @id[$i;$i] = 1 | 22:15 | |
Araq | TimToady: just make it another built-in operator \\??&56 # produce identity(65) | ||
spider-mario | :D | ||
Araq | or perhaps |\| 56 | 22:17 | |
22:17
Trashlord left
|
|||
Araq | that even looks like ascii art for an identity matrix | 22:17 | |
masak | TimToady: en.wikipedia.org/wiki/Kronecker_delta | 22:18 | |
Tene | @id .= δ; | 22:19 | |
TimToady | perl6: .say for ([1, 0 xx 5-1], *.rotate ... *)[^5] | ||
p6eval | niecza v15-6-gefda208: OUTPUT«1 0 0 0 00 0 0 0 10 0 0 1 00 0 1 0 00 1 0 0 0» | ||
..rakudo 4373f0: OUTPUT«1 0 0 0 00000» | |||
..pugs: OUTPUT«*** unknown parse error at /tmp/GaIyoJuBrC line 1, column 41» | |||
TimToady | whoops | ||
perl6: .say for ([1, 0 xx 5-1], *.rotate(-1) ... *)[^5] | |||
masak | off-by-some :) | ||
p6eval | niecza v15-6-gefda208: OUTPUT«1 0 0 0 00 1 0 0 00 0 1 0 00 0 0 1 00 0 0 0 1» | ||
..pugs: OUTPUT«*** unknown parse error at /tmp/_y5HmFAdUO line 1, column 45» | |||
..rakudo 4373f0: OUTPUT«1 0 0 0 00100» | |||
TimToady | um... | 22:20 | |
rakudobug? | |||
masak | seemingly. | ||
masak submits it | |||
TimToady | perl6: .say for ([1, 0 xx 5-1], *.rotate(-1).Array ... *)[^5] | 22:21 | |
p6eval | niecza v15-6-gefda208: OUTPUT«Unhandled exception: Unable to resolve method Array in class Parcel at /tmp/fjGCQhWYb3 line 1 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3115 (ANON @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 3122 (ANON @ 17)  at <unknown> line … | ||
..pugs: OUTPUT«*** unknown parse error at /tmp/vYNECUwYYn line 1, column 51» | |||
..rakudo 4373f0: OUTPUT«1 0 0 0 00100» | |||
TimToady | perl6: .say for ([1, 0 xx 5-1], { [.rotate(-1)] } ... *)[^5] | ||
p6eval | niecza v15-6-gefda208: OUTPUT«===SORRY!===Method call found where infix expected (change whitespace?) at /tmp/jJEchhwcQ9 line 1:------> .say for ([1, 0 xx 5-1], { [⏏.rotate(-1)] } ... *)[^5]Parse failed» | ||
..rakudo 4373f0: OUTPUT«1 0 0 0 00 1 0 0 00 0 1 0 00 0 0 1 00 0 0 0 1» | |||
..pugs: OUTPUT«*** unknown parse error at /tmp/v7DYQRMOSF line 1, column 50» | |||
TimToady | huh, niecza is trying to parse it as a reduction | 22:22 | |
perl6: .say for ([1, 0 xx 5-1], { [ .rotate(-1) ] } ... *)[^5] | |||
p6eval | rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«1 0 0 0 00 1 0 0 00 0 1 0 00 0 0 1 00 0 0 0 1» | ||
..pugs: OUTPUT«*** unknown parse error at /tmp/3jJwelWhrj line 1, column 52» | |||
masak submits nieczaissue | |||
spider-mario | -> $n {.say for ([1, 0 xx $n - 1], {[.rotate: -1]} ... *)[^$n]}.(5) | ||
oops | |||
r: -> $n {.say for ([1, 0 xx $n - 1], {[.rotate: -1]} ... *)[^$n]}.(5) | |||
p6eval | rakudo 4373f0: OUTPUT«1 0 0 0 00 1 0 0 00 0 1 0 00 0 0 1 00 0 0 0 1» | ||
spider-mario | r: -> $n {([1, 0 xx $n - 1], {[.rotate: -1]} ... *)[^$n]}.(5).perl.say | 22:23 | |
p6eval | rakudo 4373f0: OUTPUT«([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1])» | ||
TimToady | yes, Array.rotate is specced to return Array, not list, so rakudobug | 22:24 | |
masak | it's now in RT. | ||
rt.perl.org/rt3/Ticket/Display.html?id=112256 | |||
TimToady | RT is short for rotate, right? | ||
masak | :P | 22:25 | |
colomon | std: .say for ([1, 0 xx 5-1], { [.rotate(-1)] } ... *)[^5] | ||
p6eval | std 1ad3292: OUTPUT«===SORRY!===Method call found where infix expected (change whitespace?) at /tmp/GMpwlVpWB1 line 1:------> .say for ([1, 0 xx 5-1], { [⏏.rotate(-1)] } ... *)[^5] expecting infix or meta-infixParse failedFAILED 00:00 43m»… | ||
spider-mario | std: -> $n {([1, 0 xx $n - 1], {[.rotate: -1]} ... *)[^$n]}.(5).perl.say | 22:27 | |
p6eval | std 1ad3292: OUTPUT«ok 00:00 45m» | ||
spider-mario | std: -> $n {([1, 0 xx $n - 1], {[.rotate(-1)]} ... *)[^$n]}.(5).perl.say | ||
p6eval | std 1ad3292: OUTPUT«===SORRY!===Method call found where infix expected (change whitespace?) at /tmp/wwhCTNvJK_ line 1:------> -> $n {([1, 0 xx $n - 1], {[⏏.rotate(-1)]} ... *)[^$n]}.(5).perl.say expecting infix or meta-infixParse failedFAILED… | ||
spider-mario | oh | ||
masak | TimToady: anyway, my ideal way of spec'ing I($n) would be mapping δ($i, $j) with some variant of &map that respected the shape of arrays :) | ||
sub I($n) { shape-map -> $i, $j { δ($i, $j) }, (^$n X ^$n) } | 22:29 | ||
one can dream. | |||
TimToady | that's a bit too APLish for my Poohbrane | 22:32 | |
Araq | make 'shape-map' a type inspecting macro and it should work | ||
er, sorry, my brain was thinking in another programming language | 22:33 | ||
masak | well, I'm wondering whether the ordinary &map shouldn't be made to respect shape. | ||
22:34
tyatpi_ joined
|
|||
jnthn -> sleep | 22:34 | ||
catch y'all tomorrow | |||
TimToady | respect in the sense of ignore, maybe | 22:35 | |
22:35
wolfman2000 joined
|
|||
masak | respect in the sense of shape(out) === shape(in) | 22:35 | |
TimToady | that's what I meant :) | ||
masak | ok. in maths, we call "ignore" "respect" :P | ||
TimToady | but also as in applying the mapping to each leaf regardless of its location | 22:36 | |
masak | right. | ||
much like »op, I guess. | 22:37 | ||
timotimo | FWIW, perf helped me see what's wrong with my program. it's 10% pool_allocate from Parrot_perl6_box_int_p_i | 22:38 | |
TimToady | except that it might be more tightly tracked to the actual declared shape | ||
masak | anyway. I'll sleep now, and dream of maps over shaped data structures. 'night | ||
TimToady | o/ | ||
lichtkind | buy buy :) | 22:39 | |
timotimo | 5% from parrot_hash_get_bucket_string and 50% of that is from Parrot_sub_find_pad | ||
22:39
spider-mario left
|
|||
timotimo | not sure what exactly that is, but i believe it has to do with lots of hash accesses? | 22:40 | |
dalek | d: 3d13d53 | larry++ | STD.pm6: fix [.rotate] parse problem |
22:43 | |
22:50
NamelessTee left
22:51
vlixes left
22:59
Chillance left
23:08
Araq left
23:30
tokuhirom joined
23:34
envi_ joined
|
|||
timotimo | how come if 0 <= ($x + 1) <= 2 and 0 <= ($y + 1) <= 2 and 0 <= ($z + 1) <= 2 { | 23:38 | |
is a thousand times faster than | |||
if $x & $y & $z == -1 | 0 | 1 | |||
-1 <= $x & $y & $z <= 1 is equally slow | |||
the difference is really, really, really huge | |||
23:39
fgomez joined
23:43
tyatpi_ left
23:46
tyatpi left
|
|||
lichtkind | i think only jnthn can answer that | 23:51 | |
23:55
thou left
|