»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 25 June 2010. |
|||
drake1 | nice | 00:00 | |
is the name of the subclass still passed to the parent class? | 00:01 | ||
as the first argument | |||
00:01
Psyche^ joined
|
|||
jnthn | drake1: No, the type object of the subclass is, but since it's a method the first argument goes in self | 00:01 | |
So you can write a constructor that knows what to do with subclasses by writing like method new() { self.bless(*) } | 00:02 | ||
drake1 | so self don't even have to be blessed? | ||
TimToady | everything is blessed in Perl 6 | ||
jnthn | It kinda already is. | ||
drake1 | sweet | ||
TimToady | "Everything is an object." | ||
rakudo: say 42.WHAT | 00:03 | ||
p6eval | rakudo 819e2c: OUTPUT«Int()» | ||
drake1 | then it's fully integrated object orientation | ||
TimToady | we want Perl 6 to be fully OO, fully FP, etc. | 00:04 | |
to the extent they can be all of those things at once | |||
00:04
rgrau_ left,
rgrau_ joined
|
|||
drake1 | then it's more easy to write clean packages | 00:04 | |
TimToady | they're usually called modules and classes now | 00:05 | |
and grammars | |||
00:05
Patterner left,
Psyche^ is now known as Patterner
|
|||
drake1 | dot pm | 00:05 | |
TimToady | grammars and classes are just fancy modules | ||
but they all have their own keyword to declare them now, to document them better | 00:06 | ||
and to make it clear what the semantics are in the scope | |||
drake1 | and arbitrary constructors are still allowed | ||
TimToady | but they're still packages at the bottom | ||
sure | |||
drake1 | strong concept | 00:07 | |
TimToady | good defaults, but the flexibility is hidden under that | ||
in OO, Perl 5 maked hard things possible, but didn't make easy things easy | |||
*made | |||
that's a fascinating typo... | 00:08 | ||
drake1 | overall nice | ||
TimToady | I've never had my typing muscles regularize an irregular verb without my planning it consciously | 00:09 | |
drake1 | im used to code with processes like objects instead though | ||
jnthn | TimToady: The lolspeak. You learns it. | ||
drake1 | and inherit though file descriptor capabilities | ||
TimToady | sounds like something that would naturally be more like delegation in Perl 6 | 00:10 | |
drake1 | the parent processes are typically roots | 00:11 | |
TimToady | or a prototyping system | ||
00:11
mikehh_ is now known as mikehh
|
|||
drake1 | it's nice enough to fix things up, thats for sure | 00:12 | |
TimToady | we thought we'd sneak in a few high-powered features at the same time | ||
especially where they help the cleanup | 00:13 | ||
drake1 | it's very comprehensible code imo | ||
TimToady | I'm sure we'll find new ways to make it obscure :) | ||
drake1 | yes | ||
00:13
rgrau_ left
|
|||
TimToady | rakudo: say (map * * *, 1...*)[^10] | 00:14 | |
p6eval | rakudo 819e2c: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode' in 'Cool::Numeric' at line 1745:CORE.setting in 'Cool::Numeric' at line 1746:CORE.setting in 'infix:<->' at line 6760:CORE.setting in 'infix:<...>' at line 777:CORE.setting in main program body at line | ||
..22:/tmp/Z7… | |||
TimToady | rakudo: say (map * * *, (1...*))[^10] | ||
p6eval | rakudo 819e2c: OUTPUT«212305690132182240306380» | ||
TimToady | rakudo: say ~(map * * *, (1...*))[^10] | ||
p6eval | rakudo 819e2c: OUTPUT«2 12 30 56 90 132 182 240 306 380» | ||
TimToady | right, * * * doesn't square anymore | 00:15 | |
rakudo: say (map * ** 2, (1...*))[^10] | 00:16 | ||
p6eval | rakudo 819e2c: OUTPUT«149162536496481100» | ||
TimToady | rakudo: say ~(map * ** 2, (1...*))[^10] | 00:17 | |
p6eval | rakudo 819e2c: OUTPUT«1 4 9 16 25 36 49 64 81 100» | ||
TimToady | rakudo: say ~(* ** 2 for 1...*)[^10] | ||
drake1 | just wrote a test script for the new module pastebin.ca/1923815 is it any different? | ||
p6eval | rakudo 819e2c: OUTPUT«(timeout)» | ||
00:17
drbean joined
|
|||
TimToady | rakudo: say ~($_ ** 2 for 1...*)[^10] | 00:18 | |
p6eval | rakudo 819e2c: OUTPUT«(timeout)» | ||
TimToady | rakudo: say ~(for 1...* { $_ * $_ })[^10] | ||
p6eval | rakudo 819e2c: OUTPUT«(timeout)» | 00:19 | |
drake1 | not exactly: LIBS = -lpsf\n^Dmake psf_print, but close | ||
TimToady | hmm, I thought for turned into a map now | 00:20 | |
00:20
risou left,
rlb3_ joined
|
|||
jnthn | TimToady: I thought it did too | 00:23 | |
TimToady: Oh, maybe the postfix form doesn't yet | 00:24 | ||
TimToady | the last one was prefix form | 00:25 | |
rakudo: say ~(for 1..* { $_ * $_ })[^10] | 00:26 | ||
p6eval | rakudo 819e2c: OUTPUT«(timeout)» | ||
TimToady | maybe it thinks the inside of () is a sink context, and turns eager? | 00:27 | |
rakudo: say ~(for 1..* { .say; $_ * $_ })[^10] | 00:28 | ||
p6eval | rakudo 819e2c: | ||
..OUTPUT«(timeout)6789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | |||
jnthn | TimToady: Yeah, it's not just the evalbot, it hangs here too | ||
TimToady | it's doing 1..* lazily, or say wouldn't work there | 00:29 | |
jnthn | TimToady: Oh | ||
TimToady: Yeah, it's doing something wrong for sure | |||
$P102 = $P79."map"($P101) | |||
$P103 = "&eager"($P102) | |||
It's eagering it before it even gets to the postcircumfix. | 00:30 | ||
TimToady | rakudo: my @list := do for 1..* { .say; $_ * $_ }; say @list[^10] | 00:31 | |
p6eval | rakudo 819e2c: | ||
..OUTPUT«(timeout)6789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | |||
TimToady | same problem there | ||
maybe the sink inside of gather was overgeneralized | |||
00:31
lest_away is now known as lestrrat
|
|||
TimToady | star: my @list := do for 1..* { .say; $_ * $_ }; say @list[^10] | 00:32 | |
p6eval | star 2010.07: | ||
..OUTPUT«(timeout)6789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | |||
TimToady | star: my @list := { for 1..* { .say; $_ * $_ }}(); say @list[^10] | 00:33 | |
p6eval | star 2010.07: | ||
..OUTPUT«(timeout)6789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | |||
TimToady | rakudo: my @list := { for 1..* { .say; $_ * $_ }}(); say @list[^10] | ||
p6eval | rakudo 819e2c: | 00:34 | |
..OUTPUT«(timeout)6789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | |||
TimToady | rakudo: my @list := { map { .say; $_ * $_ }, 1..* }(); say @list[^10] | 00:35 | |
p6eval | rakudo 819e2c: OUTPUT«12345678910149162536496481100» | ||
00:35
rlb3_ left
00:38
drake1 left
|
|||
colomon | rakudo: my $list := { for 1..* { .say; $_ * $_ }}(); say $list[^10] | 00:41 | |
p6eval | rakudo 819e2c: | 00:42 | |
..OUTPUT«(timeout)6789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | |||
dalek | odel: 1fbc73b | jnthn++ | dotnet/ (9 files): Big refactor of lexpads to do something rather smarter than just using a Dictionary<string, RakudoObject>. Not taking advantage of it yet anywhere, but this should enable good things. |
00:43 | |
colomon | jnthn++ | 00:47 | |
Tene | I'm always pleased when I see a commit message for a codebase I've never looked at and can successfully predict the character of the changes. :) | 00:48 | |
rakudo: my $list := gather { for 1..* { .say; take $_ * $_ }}; say $list[^10] | 00:49 | ||
p6eval | rakudo 819e2c: OUTPUT«12345678910149162536496481100» | ||
00:50
lestrrat is now known as lest_away
00:52
justatheory left
00:53
lest_away is now known as lestrrat
|
|||
dalek | odel: afb4abf | jnthn++ | dotnet/runtime/Runtime/Signatures/ (2 files): Bind parameters into the lexpad using a positional index rather than a hash index. Wins us a bit. :-) |
00:56 | |
jnthn | Need to teach a Parrot that trick... | ||
TimToady: I have a first form of the proto-controls multi-dispatch working in 6model for lexical multis. | 00:57 | ||
TimToady: I didn't work out how to optimize it yet, so it sucks up about 15% of the runtime in a simple integer-loopy benchmark at the moment. And that's actually before we consider any wins from inlining. | 00:58 | ||
Plus the multi-dispatcher is cheating like hell on comparing types. | 00:59 | ||
Part of the fun is I want to work out a way to optimize it that I can implement in Parrot too. | 01:00 | ||
Rather than having to re-invent a new approach there. | |||
TimToady | yay | 01:01 | |
01:02
jferrero left
|
|||
jnthn | Suspect the optimizations will come after my vacation anyways. :-) | 01:02 | |
(Going on Wed, laptop stays at home...) | 01:03 | ||
TimToady | er, yay, I guess... :) | ||
jnthn | Think I worked out a way to handle :D and :U efficiently, if only we define them the right way. | ||
colomon | jnthn++ | ||
jnthn | TimToady: It's yay in the long run. | ||
TimToady | I'm all in favor of people pacing themselves. | 01:04 | |
jnthn | TimToady: I need the break; my concentration span has become appauling over the last couple of weeks. | ||
[Coke] | who's paul? | ||
TimToady | I could not have lasted ten years if I hadn't learned that. | ||
mberends | jnthn: are you perhaps feeling paurly? | 01:05 | |
jnthn | Nothing that some days hiking in the Alps, and some hearty central European food washed down with good beer won't fix. :-) | ||
TimToady | "I find Paul appealing, but Peale appalling." --Adlai Stevenson | ||
jnthn | My spelling is appalling too :P | ||
Sadly, my Redgate ANTS profiler trial will have run out when I get back from vacation. | 01:07 | ||
colomon | oh noez! | ||
jnthn | Will talk to $dayjob, they're a Redgate partner. | ||
It is a *wonderful* tool. | 01:08 | ||
colomon | I keep on thinking about trying to get a profiler running on Rakudo. | ||
jnthn | Yes, Parrot has made a start in that area at least, but we just don't have it as good there yet. | 01:09 | |
What would be really cool is figgering out how to be able to step through Perl 6 code in Visual Studio. | 01:11 | ||
colomon | +1 | 01:12 | |
01:14
BlueT_ left
01:21
ggoebel left
01:22
BlueT_ joined
01:24
whiteknight left
01:34
thundergnat joined
01:40
mberends left
01:41
thundergnat left
01:44
eternaleye left
01:45
eternaleye joined
|
|||
dalek | odel: 0e96b52 | jnthn++ | dotnet/runtime/Runtime/ (3 files): Inline lexpads into contexts by making them structs, and a couple of related cleanups to make sure we're not needlessly shuffling data around. |
01:45 | |
odel: 50be0ea | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm: Change missed from earlier commit to refactor signature parameter binding. |
|||
01:45
eternaleye left
01:46
eternaleye joined
01:47
eternaleye left,
melte left,
eternaleye joined
01:49
melte joined
01:50
gfx joined
01:51
am0c left
|
|||
dalek | odel: dcf5ee5 | jnthn++ | common/NQP/NQPSetting.pm: Make our != rather more efficient. |
01:51 | |
jnthn | Enough twiddling...time to sleep. | 01:52 | |
01:58
crythias left
02:07
hercynium joined
02:18
tylercurtis joined
02:33
lue joined
02:40
justatheory joined,
Pavlz left
02:41
justatheory left,
justatheory joined
|
|||
[Coke] | phenny: tell moritz_ that I added a .revision file, and fixed --gen-parrot for partcl-nqp | 02:58 | |
phenny | [Coke]: I'll pass that on when moritz_ is around. | ||
03:06
draxil left
03:08
molaf joined,
shade\ left
03:10
shade\ joined
03:14
plainhao left
03:30
wooden joined,
wooden left,
wooden joined
03:40
justatheory left
03:56
meppel joined
03:59
meppl left
|
|||
sorear | std: 1 >>+<<= 2 | 04:04 | |
p6eval | std 32094: OUTPUT«ok 00:01 116m» | ||
tylercurtis | std: 1 = 2 | 04:07 | |
p6eval | std 32094: OUTPUT«ok 00:02 116m» | ||
sorear | std: sub infix_circumfix_meta_operator:<« »>() {}; 1 «*» 2; | 04:11 | |
p6eval | std 32094: OUTPUT«===SORRY!===Confused at /tmp/ufCub9pfD1 line 1:------> ircumfix_meta_operator:<« »>() {}; 1 «*»⏏ 2; expecting any of: bracketed infix infix or meta-infix postfix postfix_prefix_meta_operatorParse failedFAILED 00:01 | ||
..121m» | |||
04:12
sftp left
04:16
draxil joined
|
|||
tylercurtis | What's a postfix_prefix_meta_operator? | 04:21 | |
04:22
azert0x left
|
|||
sorear | @foo»++ | 04:30 | |
it's a prefix to the postfix | 04:31 | ||
tylercurtis | Ah, right. | ||
sorear is adding metaops to niecza | 04:32 | ||
04:33
molaf left
04:51
gfx left
05:14
NOTevil left
05:15
Snowclone left
05:16
itz left,
breinbaas left,
itz joined
05:17
breinbaas joined
|
|||
dalek | ecza: 7bd8e6a | sorear++ | / (4 files): Implement += metaoperators |
05:19 | |
05:22
m6locks left
|
|||
tylercurtis | rakudo: role A { method a {...} }; class B does A { has $.b handles <a>; }; say "alive" | 05:22 | |
p6eval | rakudo 819e2c: OUTPUT«===SORRY!===A method named 'a' already exists in class 'B'. It may have been supplied by a role.» | ||
tylercurtis | That doesn't work. But this does: | 05:23 | |
rakudo: role A { method a {...} }; class B does A { has $.b; method a { $.b.a; } }; say "alive" | |||
p6eval | rakudo 819e2c: OUTPUT«alive» | ||
tylercurtis | Shouldn't the "handles <a>" be treated as defining a method a in the class, and thus override the role method a? | ||
05:24
x3nU_ joined
|
|||
dukeleto | perl6: eval q<<< sub { my grammar A { regex TOP { \d+ } } }; >>>; eval q<<<grammar A { regex TOP { \s+ } } >>>; | 05:30 | |
p6eval | pugs, rakudo 819e2c: ( no output ) | ||
05:31
Guest23195 joined,
shade\ left,
bbkr left,
pnu left,
moritz_ left,
simcop2387 left
05:32
shade\ joined,
bbkr joined,
pnu joined,
moritz_ joined,
simcop2387 joined,
thebzu joined,
x3nU left
05:33
shade\ left
|
|||
dukeleto | that is odd. that eval gives me this from the commandling perl6 binary: (datura)(~)$ perl6 -v | 05:33 | |
This is Rakudo Perl 6, version 2010.08-13-g819e2ce built on parrot 2.7.0 r48587 | |||
Copyright 2008-2010, The Perl Foundation | |||
(datura)(~)$ perl6 | |||
> sub { my grammar A { regex TOP { \d+ } } }; grammar A { regex TOP { \s+ } } | |||
!class_init_61 | |||
> eval q<<< sub { my grammar A { regex TOP { \d+ } } }; >>>; eval q<<<grammar A { regex TOP { \s+ } } >>>; | |||
===SORRY!=== | |||
Illegal redeclaration of symbol 'A' | 05:34 | ||
oops, sorry, meant to paste a gist | |||
gist is at gist.github.com/547021 | |||
dukeleto shakes fists at having multiple paste buffers | |||
i ran into this issue when attempting to declare a package scope grammar in PL/Perl6 and then use it later on | 05:35 | ||
tylercurtis | dukeleto: In that gist, the error looks to be because in the first line, you declare a "grammar A". Then again in the second eval, it attempts to create another "grammar A". | ||
dukeleto | if someone could shed light on whether that is the expected behavior or not, that would be awesome | 05:36 | |
sorear | dukeleto: I expect it | ||
down to 100 sorries | |||
dukeleto | tylercurtis: oh, i see. the commandline used to have each input line with it's own scope | ||
05:36
shade\ joined
|
|||
dukeleto | tylercurtis: yes, you are right :) | 05:37 | |
tylercurtis | dukeleto: I'm going to guess that that doesn't solve your original problem, though, no? | ||
sorear | dukeleto: 'grammar' without 'my' is global, it doesn't care about scopes | 05:40 | |
(technically only package global, but there are no packages there) | |||
tylercurtis | sorear: What exactly will it mean when you get that 100 sorries figure down to 0? | 05:42 | |
sorear | It'll mean I'll start having to deal with frontend exceptions | 05:43 | |
hopefully that phase won't last long | |||
niecza tries to generate error messages for code it can't handle... but not always | |||
after that will be dealing with undefined stuff, like &return | 05:44 | ||
tylercurtis | The N sorries count is for attempting to compile STD? | 05:50 | |
sorear | yes | 05:51 | |
there are a few things not caught at compile time that I know I'll need... like Cursor.at-key, the business end of $<foo> | |||
tylercurtis | sorear: do the tests in test.pl and test2.pl pass? | 05:58 | |
tylercurtis is beginning to consider using Niecza for his planned Bennu rewrite. | 06:00 | ||
06:05
uniejo joined
|
|||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27); | 06:08 | |
p6eval | rakudo 819e2c: OUTPUT«(timeout)» | ||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(5); | 06:09 | |
p6eval | rakudo 819e2c: OUTPUT«5 16 8 4 2 1» | ||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(10); | ||
p6eval | rakudo 819e2c: OUTPUT«10 5 16 8 4 2 1» | ||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(20); | ||
p6eval | rakudo 819e2c: OUTPUT«20 10 5 16 8 4 2 1» | ||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27); | ||
p6eval | rakudo 819e2c: OUTPUT«src/string/api.c:3335: failed assertion 'pos <= res->strstart + Buffer_buflen(res) + 1'Backtrace - Obtained 24 stack frames (max trace depth is 32)./home/p6eval//p1/lib/libparrot.so.2.7.0 [0x2aacfc933d73]/home/p6eval//p1/lib/libparrot.so.2.7.0(Parrot_confess+0x87) | 06:10 | |
..[0x2aacfc933ea… | |||
06:10
wtw joined
|
|||
TimToady | star: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27); | 06:10 | |
p6eval | star 2010.07: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 | ||
..3644 1… | |||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27); | 06:11 | |
p6eval | rakudo 819e2c: OUTPUT«src/string/api.c:3335: failed assertion 'pos <= res->strstart + Buffer_buflen(res) + 1'Backtrace - Obtained 24 stack frames (max trace depth is 32)./home/p6eval//p1/lib/libparrot.so.2.7.0 [0x2b565746ed73]/home/p6eval//p1/lib/libparrot.so.2.7.0(Parrot_confess+0x87) | ||
..[0x2b565746eea… | |||
TimToady | on my machine, that prints out the array, but some of the entries are garbage | ||
something like named repr_P6opaque repr_P6opaque repr_P6opaque $!llsig $!llsig scalar scalar scalar scalar scalar scalar named named named named scalar scalar $!llsig $!llsig 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 44 | 06:12 | ||
sorear | tylercurtis: everything in test.pl passes and is tested before push (xbuild /t:Test) | 06:14 | |
tylercurtis: the stuff in test2 often doesn't; I use that for TDD | |||
when a feature is working, it's moved to the main testg | |||
06:16
constant left
06:17
constant joined,
constant left,
constant joined
|
|||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone('27'); | 06:18 | |
p6eval | rakudo 819e2c: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 | 06:19 | |
..3644 1… | |||
TimToady | oddly, if I pass $n as a string, it works fine | ||
sorear | possibly issues of %% function on Num? | 06:20 | |
or Rat rather | |||
TimToady | rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n div 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27); | ||
p6eval | rakudo 819e2c: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 | ||
..3644 1… | |||
TimToady | works better with div than with / | 06:21 | |
so you could be right | |||
tylercurtis | sorear: I'm now growing increasingly confident that Niecza is be the implementation I want to use to run the rewritten Bennu (at least until the distant (assuming it ever happens) point at which I implement enough to be able to compile STD and Bennu with Bennu). | ||
sorear | Bennu is written in Perl 6? | 06:22 | |
TimToady | funny it causes memory corruption on my machine though | ||
tylercurtis | The current version is, with a very small runtime in C. The rewrite will be written entirely in Perl 6. The runtime will be in ugly bootstrappy-pragma C in Perl 6 syntax. | 06:24 | |
sorear | are you pllaning to fork it, or scrape --stop-after output, or something else entirely? | 06:26 | |
dalek | ecza: f6e0c6a | sorear++ | / (2 files): Implement :foo«x y» |
06:27 | |
ecza: 7a1ca98 | sorear++ | / (3 files): Silently ignore type constraints on parameters |
|||
06:32
snearch joined
|
|||
sorear | 52 | 06:33 | |
tylercurtis | It sounds like you're making considerable progress towards being at the point where Niecza can compile STD. So, once that's possible, I'm hoping to essentially have a Bennu::Actions and do "STD.parse($foo, :actions(Bennu::Actions));" and then, of course, actual compilation and code-generation. | 06:34 | |
sorear | The big features I know I'm still missing are roles, multimethods, and control exceptions | 06:39 | |
06:42
Guest23195 is now known as _kaare
06:43
agentzh joined
|
|||
tylercurtis | I think I can get by without those until you have them implemented as long as STD doesn't use them. If STD does use them, then I can just wait until you have them implemented. | 06:45 | |
sorear | s/still missing/$/ & STD still needs/ | 06:46 | |
TimToady | STD uses roles for its mixins, and multimethods to the extent demanded by LTM | 06:51 | |
doesn't really do anything with control exceptions beyond what Perl 5 can do | 06:52 | ||
sorear | multi method tweak | ||
TimToady | ah, yes, that too | 06:53 | |
though that can be faked the way gimme5 did; does viv still turn them into conditionals? | |||
tylercurtis | I'm off to bed now, but I'm going to try building and playing around with Niecza a little tomorrow. | 06:55 | |
Good night, #perl6. | |||
TimToady | ah, I see what viv does now, nevermind | 06:56 | |
06:59
pnate joined
07:02
tylercurtis left
|
|||
sorear should probably get rid of the # DO NOT ERASE comments at some point | 07:05 | ||
I'm planning to do basically the same thing in niecza | 07:06 | ||
it won't be possible to sort alternatives anyway until the class hierarchy is generated at compile time | |||
most of the 'interesting' issues in current niecza concern infix:<but> | 07:07 | ||
(which I guess slangs will have to use) | |||
07:07
flatwhatson left
|
|||
moritz_ | how can you get rid of them if you're not supposed to erase them? :-) | 07:10 | |
phenny | moritz_: 02:58Z <[Coke]> tell moritz_ that I added a .revision file, and fixed --gen-parrot for partcl-nqp | ||
dalek | kudo: f8763b8 | moritz++ | src/Perl6/Grammar.pm: add word boundary assertion after alphabetic infix operators Fixes RT #77218 |
07:13 | |
07:28
alanhaggai left
07:33
drbean left,
zulon joined,
wamba joined,
simcop2387 left
07:36
simcop2387 joined
07:52
constant left
07:53
constant joined,
constant left,
constant joined
07:54
payload joined,
payload left
07:56
thebird joined
|
|||
mathw discovers a class in a C++ project which is quite definitely really a role | 08:12 | ||
\o/ multiple inheritance allowing me to use it almost like one | |||
08:12
Snowclone joined
08:18
dakkar joined
08:43
cogno joined
|
|||
pugssvn | r32095 | moritz++ | [t/spec] tests for RT #77218, identifiers that start with an operator name | 08:47 | |
08:55
achromic left
08:56
drbean joined,
cogno left
08:58
tadzik1 joined,
cogno joined
08:59
tadzik left,
tadzik1 is now known as tadzik
|
|||
moritz_ | www.perlmonks.org/?node_id=856849 another junctions-as-set abuse | 09:00 | |
09:04
kiffin joined
|
|||
sorear | Does it make any sense at all to have attributes in a grammar? | 09:04 | |
moritz_ | I don't see why not | 09:05 | |
09:05
Baggio_ joined
|
|||
moritz_ | you'd have to instantiate before parsing to use them | 09:05 | |
09:06
Baggio_ left
|
|||
moritz_ | maybe in some cases that's saner than keeping all state in dynamic variables | 09:06 | |
osfameron | moritz_: are junctions not *built on* sets? | 09:07 | |
moritz_ | osfameron: no, they are not sets | ||
at least no in the sense that most people think | 09:08 | ||
osfameron | ah | ||
moritz_ | any(1, 2) could be seen as an infinite set | ||
because all sets that contain 1 or 2 match it, and there are infinitely many of those | |||
osfameron | the superficially set-like properties aren't deep enough to be interesting, basically ? | ||
09:09
cogno left
|
|||
moritz_ | well, they are interesting, but that shouldn't let us forget separation of concerns | 09:10 | |
they are specifically outside of the normal type hierarchy to allow type-based autothreading | 09:11 | ||
09:11
Baggio_ joined
|
|||
moritz_ | now if we add set methods to junctions, they need to be exceptions to the autothreading rules | 09:11 | |
and having many exceptions contradicts the design goal of junction being an intuitive thing to match against | 09:12 | ||
09:12
Mowah joined
09:14
Baggio_ left
|
|||
moritz_ | osfameron: does that make some kind of sense to you? | 09:16 | |
rakudo: {...}; say "alive" | |||
p6eval | rakudo f8763b: ( no output ) | ||
09:17
BaggioKwok joined
09:19
masak joined
|
|||
moritz_ | rakudo: (sub { ... }).(); say "alive@ | 09:19 | |
rakudo: (sub { ... }).(); say "alive" | |||
p6eval | rakudo f8763b: OUTPUT«===SORRY!===Confused at line 22, near "say \"alive"» | ||
rakudo f8763b: OUTPUT«alive» | |||
osfameron | moritz_: hmmm, I understand that junctions /do/ too much for them to be seen as sets. I was just wondering whether a junction object was in fact built on top of a simpler "set" object that it'd be easier to point people at when they start using junctions for it | ||
moritz_ | rakudo: (sub { ... }).() + 1; say "alive" | ||
p6eval | rakudo f8763b: OUTPUT«Method 'Bridge' not found for invocant of class 'Failure' in 'infix:<+>' at line 3427:CORE.setting in main program body at line 22:/tmp/Qfy3kvoSLL» | ||
moritz_ | osfameron: hm... we have a Set type in rakudo, but it's poorly documented and tested | 09:20 | |
rakudo: (sub { ... }).() ~ 1; say "alive" | |||
p6eval | rakudo f8763b: OUTPUT«Stub code executed in 'infix:<~>' at line 1 in main program body at line 22:/tmp/NtTzlMvGZi» | ||
moritz_ | rakudo: use fatal; (sub { ... }).() | 09:21 | |
p6eval | rakudo f8763b: OUTPUT«Stub code executed in <anon> at line 1 in main program body at line 22:/tmp/7l7y5B7Dx5» | ||
pugssvn | r32096 | moritz++ | [t/spec] some stub code tests; should eventually be moved to a file on its own | 09:22 | |
09:24
drbean left
|
|||
pugssvn | r32097 | moritz++ | [t/spec] test for RT #75828, series operator after comma is caught | 09:24 | |
masak | <x3nU> seriously, perl6 *really* needs a good tutorial, it would bring a lot of supporters | ||
nuh, yah. | 09:25 | ||
09:25
BaggioKwok left
09:26
BaggioKwok joined
|
|||
phenny | masak: 23 Aug 20:28Z <mberends> tell masak oha++'s Socket.pm and INET.pm patch in gist.github.com/543580 tests out OK on all the webservers unmodified in github.com/mberends/http-server-sim.../examples/ so it looks good to commit it. This does not prove binary file I/O yet however, that requires some rewriting. | 09:26 | |
moritz_ | well, we're writing a book that will be available as a PDF for free - isn't that a good start? :-) | 09:27 | |
masak | it is. | ||
mathw | :) | ||
masak | mberends: I'll see about applying tonight or tomorrow. | ||
09:28
BaggioKwok left
|
|||
masak | interesting comments at linuxfr.org/~darkhad/29968.html -- Perl 6 the Soap Opera? | 09:29 | |
I did not intend to give that impression when writing the original post, but I guess presenting the road as sufficiently non-straight gives some people such an impression anyway. | 09:30 | ||
Rakudo Star release on Thursday? | 09:31 | ||
moritz_ | I thought tonight? | ||
masak | oh. that sounds right, actually. | 09:32 | |
mathw | If only I spoke French | ||
masak | mathw: there's something called "the Internet" which can translate for you nowadays. quite neat. | ||
masak wipes the sarcastic smirk off his face :P | 09:33 | ||
moritz_: was there a "cpan6" meeting today as well? | |||
moritz_ | masak: let's ask sorear about it | ||
09:34
lichtkind joined
|
|||
frettled | mathw: "Show romanization | 09:34 | |
urghle | |||
lichtkind | hai | ||
frettled | mathw: "Monsieur, vous êtes une peau de vache!" | ||
mathw | masak: usually with quite amusing levels of mistranslation | ||
masak | because if it's 3 hours before #phasers, I'm afraid I can not attend today. I can in general, but due to my exam, I can't today. | ||
frettled | mathw: (a classic insult) | ||
moritz_ | rakudo: say (False, &prefix:<!> ... *).[^10].perl | ||
masak | mathw: still a very good help to grasping what is being said. | ||
09:34
fod left
|
|||
p6eval | rakudo f8763b: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub' in 'infix:<...>' at line 1 in main program body at line 22:/tmp/JDT_MAk9ME» | 09:34 | |
frettled | ‘ | ||
masak | lichtkind: hi, child of light. | ||
lichtkind | masak: :) | 09:35 | |
frettled | masak: what kind of exam? | ||
masak | lichtkind: ...with a warm smile befitting of #perl6 :) | ||
09:35
zag joined
|
|||
masak | frettled: Organisk Kemi med Analytiska Tekniker | 09:35 | |
moritz_ | sounds like fun | ||
lichtkind | masak: i just came to bully moritz_ :) | ||
frettled | masak: ooh. There must be a use for Perl 6 there! | 09:36 | |
masak | frettled: stress falls on the penultimate syllable of the last word :P | ||
frettled: I'm sorely tempted to make a full-featured IUPAC <-> molecule converter. | |||
frettled | masak: Just as well, I wouldn't want to do that kind of chemistry with an analytic technician | ||
masak: ooh, that would be immensely cool | 09:37 | ||
masak | moritz_: it's an interesting course. quite a bit of orbital theory in it. | ||
moritz_ | masak: I've heard that theoretical chemistry is close to some branches of applied quantum mechanics :-) | ||
masak | moritz_: also, I know my brain has been warped by the course. yesterday while reviewing a chapter, I found myself looking at a reaction, thinking "no wai! show me the mechanism for that!". wouldn't have happened a few weeks ago. :) | ||
frettled | Can you confirm that orgchem students often sniff (CH3)2CO? :D | 09:38 | |
(re "brain warped by the course") | |||
masak | frettled: unless that compound exudes from the book, I haven't been sniffing it in the past week. | ||
sorear | masak: moritz++ has apparently decided that it's today, yes | 09:39 | |
09:39
thebird left,
wamba left,
_kaare left,
lue left,
barika left,
nadim left,
huf left,
phenny left,
renormalist left,
aesop left
|
|||
moritz_ | have I? :-) | 09:39 | |
masak | go on an have it without me. I'll read the logs. | ||
I only have one datum to contribute anyway. | |||
09:39
ggoebel joined
|
|||
masak | give me a moment, and I'll remember what it was. :) | 09:39 | |
sorear | ggoebel: have you reported the mono 2.6.7 bug yet? | ||
frettled | masak: good, good, I hope your brain survives | 09:40 | |
09:40
thebird joined,
wamba joined,
_kaare joined,
lue joined,
barika joined,
nadim joined,
huf joined,
phenny joined,
renormalist joined,
aesop joined,
card.freenode.net sets mode: +v phenny
|
|||
sorear | I'm hoping that having a meeting this week, even a tiny unproductive one, will act as a leader to some big lightning bolt of a discussion next week | 09:40 | |
09:41
timbunce joined
|
|||
moritz_ | hugme: add lichtkind to book | 09:45 | |
hugme hugs lichtkind. Welcome to book! | |||
tadzik | oh oh, tonight? | 09:46 | |
moritz_ | did we say 1600 UTC? | 09:47 | |
masak | moritz_++ # "OH NOEZ!" in #77394 :) | ||
moritz_ | whoa there, somebody reads my tickets | ||
sorear | moritz_: yes | 09:48 | |
masak | they land on p6c, and I tend to brief through them. | ||
mainly so as to avoid unnecessarily double-submitting. | 09:49 | ||
moritz_ tends to grief about them | 09:50 | ||
sorear | griefing tickets? | 09:51 | |
moritz_ | oh, I meant grieve | ||
moritz_ can't spell | 09:52 | ||
grieving RT - a hacker's lament | |||
masak | Rt tickets are love. no need to grieve. | 09:53 | |
sorear | a lament? really? | 09:54 | |
tadzik | Parrot needs a LOLCODE compiler | 09:59 | |
mathw | I thought it already had one | 10:00 | |
moritz_ | parrot had a lolcode compiler | ||
no idea if it's still working | |||
mathw | bring it back! | ||
compiler necromancy! | |||
tadzik | I'd love writing in LOLCODE using e.g. Perl 6's Web | ||
moritz_ | trac.parrot.org/parrot/wiki/Languages lists it as "Inactive, retired or dormant" | 10:01 | |
builds against parrot 2.4.0 | |||
shouldn't be too hard to resurrect | 10:02 | ||
jnthn | Afternoon | ||
tadzik | fixing it sounds like fun | ||
o/ jnthn | |||
moritz_ | \o jnthn | ||
mathw | \o/ jnthn | ||
| | |||
\ | |||
bah | |||
tadzik | trac.parrot.org/languages/browser/lolcode/trunk # how do I clone this one? | ||
sorear out | |||
moritz_ | git svn clone trac.parrot.org/languages/browser/lolcode/trunk | 10:03 | |
or svn co $url | |||
masak | \o/ jnthn | ||
tadzik | moritz_: the thing is it's not an svn url | 10:04 | |
moritz_ | oh | ||
tadzik | I can't see the real one | ||
moritz_ | svn.parrot.org/languages/lolcode/trunk/ | ||
tadzik | moritz_++ | 10:05 | |
hey, it actually works | |||
or maybe it doesn't | 10:06 | ||
yes, it does :) | |||
moritz_ | indeed | 10:07 | |
fascinating | |||
might need switchting to nqp-rx in the long run | 10:08 | ||
unless somebody did that already | |||
tadzik | it passes all tests, and is quite fast :) | ||
10:08
azert0x joined
|
|||
moritz_ | tadzik: yapc.tv/2008/ye/lt/lt2-09-pmichaud-...-compiler/ if you don't know it yet | 10:09 | |
tadzik | never seen it, thanks moritz_++ | 10:10 | |
10:12
BaggioKwok joined
|
|||
masak | this is it, folks. see you on the other side. | 10:12 | |
10:12
masak left
10:14
snearch left
10:25
tadzik left
10:26
lestrrat is now known as lest_away
10:27
BaggioKwok left
|
|||
bbkr | STD eval is down? | 10:29 | |
std: 1; | 10:30 | ||
p6eval | std : ( no output ) | ||
moritz_ | msg <bbkr> std: say "a" ~~ m:i:i/A/ | ||
Can't chdir to '../../src/perl6/snap': No such file or directory at lib/EvalbotExecuter.pm line 134 | |||
+ 4 screen pages of enterprise-grade stack traces | 10:31 | ||
bbkr | rakudo: say "a" ~~ m:i/:i A/ # this should die in the same way as m:i:i/A/, am I right? | 10:32 | |
p6eval | rakudo f8763b: OUTPUT«a» | ||
bbkr | rakudo: say "a" ~~ m:i:i/A/ | ||
p6eval | rakudo f8763b: OUTPUT«duplicate named argument in call in main program body at line 22:/tmp/FjoThAtxNU» | ||
moritz_ | hm | 10:33 | |
I'm not sure if that's correct | |||
bbkr | I'll wait for STD eval to confirm | ||
moritz_ | even if m:i:i// should die, I'm not sure if m:i/:i/ should | 10:34 | |
10:34
ggoebel left
|
|||
moritz_ | looks to me like the regex starts something like a new scope | 10:34 | |
and my $x; { my $x } isn't forbidden either | |||
10:34
ruoso left
10:37
agentzh left
10:46
felipe joined
|
|||
bbkr | std: "a" ~~ m:i:i/A/ | 10:50 | |
p6eval | std 32097: OUTPUT«ok 00:01 118m» | ||
bbkr | std: "a" ~~ m:i/:iA/ | ||
p6eval | std 32097: OUTPUT«===SORRY!===Unrecognized regex modifier :iA at /tmp/neu2wc9gMj line 1:------> "a" ~~ m:i/:iA⏏/Check failedFAILED 00:01 118m» | ||
bbkr | std: "a" ~~ m:i/:i A/ | ||
p6eval | std 32097: OUTPUT«ok 00:01 118m» | ||
bbkr | then it looks like Rakudo is too restrictive about m:i:i/A/ form | ||
bbkr reports | 10:51 | ||
10:53
zulon left,
pnate left
10:55
shade\ left
10:56
shade\ joined
11:00
Mowah left,
zag left
11:02
zag joined,
Mowah joined
11:06
daxim joined
11:08
pmurias joined
11:12
am0c joined
|
|||
bbkr | rakudo: say "a" ~~ m:nth(Mu)/a/ # bang! | 11:13 | |
p6eval | rakudo f8763b: OUTPUT«maximum recursion depth exceeded in 'EnumMap::Capture' at line 4869:CORE.setting in 'EnumMap::Capture' at line 4873:CORE.setting in 'prefix:<|>' at line 677:CORE.setting in 'Cool::match' at line 2406:CORE.setting in 'Cool::match' at line 2406:CORE.setting in | ||
..'Cool::matc… | |||
11:14
pmurias left
|
|||
bbkr | why recursion? I thought nth match is just plain iteration... | 11:15 | |
anyway, doesn't look good | |||
bbkr reports | |||
rakudo: say "a" ~~ m:nth(Any)/a/ # how about this one? it is correct on STD but i'm not sure about result produced | 11:20 | ||
p6eval | rakudo f8763b: OUTPUT«a» | ||
11:25
c9s left
11:31
meppel is now known as meppl
|
|||
moritz_ | the code tests the presence with .defined | 11:36 | |
which is a sensible thing to do, if you ask me | 11:37 | ||
std: 1 | 11:38 | ||
p6eval | std 32097: OUTPUT«ok 00:01 114m» | ||
11:42
envi^home joined
|
|||
bbkr | rakudo: say "aa" ~~ m:nth(Any, Any)/aa/ # then this one should not warn, right? | 11:42 | |
p6eval | rakudo f8763b: OUTPUT«Use of uninitialized value in numeric context0» | ||
moritz_ | that's something different | ||
there the $nth parameter is defined | 11:43 | ||
it's a list | |||
and the implementation is free to assume it's a list of ints | |||
bbkr | moritz_: right. I keep forgetting that (1) === 1 in P6 | 11:44 | |
11:45
jferrero joined
|
|||
bbkr is back to bughunt | 11:45 | ||
moritz_ thinks we should switch roles for a while... masak, cognominal and bbkr fix bugs, and jnthn and pmichaud report them :-) | 11:46 | ||
bbkr | I have to say I like P6 team attitude towards RT. most of programmers consider bug ticket as attack to their skills, not a information of how to improve code. P6 will be awesome piece of software :) | 11:49 | |
11:49
lichtkind left
11:52
dangbinghoo joined
11:53
ggoebel joined
|
|||
dangbinghoo | hello | 11:54 | |
is there any book about learning perl6? | |||
moritz_ | yes | 11:55 | |
github.com/perl6/book/downloads | |||
11:55
Siddy joined
|
|||
moritz_ | not yet finished, but should be usable | 11:55 | |
bbkr | rakudo: say "me" ~~ m:i/<[M]>/ # quick question - should :i modifier also ignorecase ranges, or is that given up P5ism? | 11:56 | |
p6eval | rakudo f8763b: OUTPUT«» | ||
bbkr | s/ranges/character-classes/ | ||
moritz_ | bbkr: I guess they should be case ignoran too | ||
bbkr reports | |||
dangbinghoo | moritz_: thank you! | 11:57 | |
11:57
Trashlord left
|
|||
moritz_ | dangbinghoo: you're welcome; you can also find most perl 6 related links somewhere on perl6.org | 11:57 | |
ggoebel | phenny: tell sorear just reported the mono bug. I'm wondering if anyone will agree that failure to compile hello world is a critical failure? (bugzilla.novell.com/show_bug.cgi?id=634017) | 11:59 | |
phenny | ggoebel: I'll pass that on when sorear is around. | ||
dangbinghoo | moritz_: yeah, thanks | ||
pugssvn | r32098 | moritz++ | [t/spec] tests for RT #77356, lexicals in subset declaration; also fix a few tests that made wrong assumptions about the scope of symbols (related to eval_dies_ok) | ||
moritz_ | ggoebel: it'll probably be useful to include a backtrace from gdb in that bug report | 12:00 | |
12:09
snearch joined
12:10
ruoso joined
12:11
bluescreen joined,
bluescreen is now known as Guest82435
12:13
Cyrus left
|
|||
ggoebel | moritz: added a backtrace... note if you assume complete ignorance on my part, you'll not overestimate my knowledge of mono, c#, .Net, or most other things. | 12:14 | |
moritz: the good news I've heard is that ignorance can be cured... | |||
12:14
lest_away left
|
|||
moritz_ | it can indeed | 12:14 | |
through a process called "learning" | |||
bbkr | yep, by removing :i modifier :D | ||
12:16
smash_ joined
|
|||
smash_ | hello everyone | 12:16 | |
moritz_ | oh hai | ||
smash_ | moritz_: sorry, haven't had time to push my CGI-Cookie to github yet | 12:18 | |
moritz_ | smash_: no worries, I've been busy with other projects anyway | ||
smash_ | PaFo elections took all my spare time this weekend | 12:19 | |
12:20
sftp joined
12:21
Italian_Plumber joined
|
|||
pugssvn | r32099 | moritz++ | [t/spec] basic test for --help | 12:22 | |
moritz_ | that's a disadvantage of having yet another foundation | 12:23 | |
[Coke] | moritz_: hio | 12:24 | |
smash_ | moritz_: anyway i already created the repo on github and set you up as collaborator, i'll upload what i have later | ||
dalek | kudo: 82c9e96 | moritz++ | t/spectest.data: run test(s) for --help |
12:25 | |
moritz_ | hi [Coke]. I've installed a cron job that rebuilds partcl-nqp every date at 0330 UTC | 12:29 | |
12:30
mdxi joined
|
|||
moritz_ | running that now, and will look at the generated .revision file once it's finished | 12:31 | |
12:31
Cyrus joined
|
|||
[Coke] | moritz_++ ! | 12:31 | |
12:31
lest_away joined,
lest_away is now known as lestrrat
|
|||
[Coke] | moritz_: it's the full SHA1. (I just grabbed the git command from rakudo that was pulling the revision). Is that sufficient? | 12:33 | |
moritz_ | [Coke]: I'll patch p6eval to extract the first 6 digits | ||
would be a bit spammy to use all the digits in the evalbot output | 12:34 | ||
12:34
drbean joined
12:36
hercynium left
|
|||
moritz_ | took about 6.5 minutes to rebuild parrot and partcl | 12:36 | |
[Coke] | @git log -1 --pretty=format:%H > .revision | 12:37 | |
(If you want, I can change that. evalbot is the only thing using it am.) | |||
*atm | |||
moritz_ | no, currently I have a quite evil hack in the rakudo build script to get a shorter revision number | ||
and now I have the perfect reason to remove that hack, and put the shortening code into p6eval | 12:38 | ||
12:38
ggoebel left
|
|||
pugssvn | r32100 | moritz++ | [evalbot] report partcl-nqp revision | 12:40 | |
12:42
ruoso left
|
|||
dangbinghoo | so perl6 released? | 12:43 | |
moritz_ | dangbinghoo: a Perl 6 compiler named Rakudo had several releases so far | ||
12:43
Mowah left
|
|||
[Coke] | We need to add that to the faq in the release. :| | 12:43 | |
12:43
Mowah joined
12:44
slavik joined
|
|||
dangbinghoo | moritz_: Rakudo Star is the Perl 6 release? | 12:44 | |
moritz_ | dangbinghoo: Rakudo Star is *a* Perl 6 release | 12:45 | |
12:45
p6eval joined,
ChanServ sets mode: +v p6eval
|
|||
[Coke] | dangbinghoo: /a/ perl 6 release. | 12:45 | |
moritz_ | and not a production release | ||
[Coke] | but yes. | ||
12:47
Mowah left,
Mowah joined
|
|||
dangbinghoo | moritz_: but it seems that Rakudo Star is the most complete Perl 6 implemention. I'm reading blogs on pugs.blogs.com, says that Rakudo Star is the new start of Perl 6 | 12:49 | |
moritz_ | yes, it's probably the most usable and most complete compiler at the meoment | ||
dangbinghoo | it says that Perl 6 is now ready because of Rakudo Star. | 12:50 | |
pugssvn | r32101 | moritz++ | [evalbot] s/partcl-nqp/partcl/ for Coke++ | 12:51 | |
12:51
p6eval left,
p6eval joined,
ChanServ sets mode: +v p6eval
|
|||
moritz_ | it is ready for some things, and not for others | 12:52 | |
for example rakudo is mightily slow | |||
if that is a problem for you, then it's not ready for you | |||
12:53
dangbinghoo left
12:54
perlygatekeeper joined
|
|||
mathw | I guess it's a problem | 12:57 | |
takadonet | hehe | ||
[Coke] | partcl: namespace eval moritz { puts moritz++ } | 12:58 | |
p6eval | partcl d55427: OUTPUT«moritz++» | ||
[Coke] | partcl: namespace eval moritz { puts moritz_++ } ;# use right nick. =-) | ||
p6eval | partcl d55427: OUTPUT«moritz_++» | ||
moritz_ | a _ more or less doesn't impair my happiness | 12:59 | |
hey, that was almost a rhyme | |||
12:59
zulon joined
|
|||
jnthn | You're a poet but didn't know it ;-) | 12:59 | |
moritz_ | I accidentally a poet! | 13:00 | |
13:02
ruoso joined
|
|||
[Coke] | moritz_: looks like the short version is just a format of %h instead of %H. | 13:02 | |
(so let me know if you want me to fix it. Thanks again. =-) | |||
13:03
javs joined
13:06
drake1 joined
|
|||
drake1 | hello, how do you do something like line 37 in www.gangsterfreak.com/file:paste ? | 13:07 | |
13:08
zulon left
|
|||
drake1 | simply exchanging -> with `.' ? | 13:08 | |
PerlJam | drake1: @psf_read[$psf].($.csize, $.font, $char); # probably. | ||
13:08
orafu left
|
|||
drake1 | alright | 13:09 | |
13:09
orafu joined
|
|||
drake1 | that's actually nicer | 13:09 | |
PerlJam: so dots are not only for methods? | |||
moritz_ | $.font is the same as self.font | 13:10 | |
PerlJam | drake1: what moritz said | ||
13:10
pmurias joined
|
|||
moritz_ | so it is a method call | 13:10 | |
drake1 | ok | ||
pmurias | hello | ||
moritz_ | but you usually write accesses to public attributes that way | ||
hi pmurias | |||
13:13
x3nU_ is now known as x3nU
|
|||
cognominal | bbkr, on attitude about bug reports. This goes even further than you say, because I whine about stuff that may be important for a user. But fixing them may steal time better used on long term architectural stuff. jnthn++ and pmichaud++ for their patience. | 13:13 | |
13:14
kirillm joined
13:15
kirillm left
13:16
peters_mops left,
peters_mops joined,
kirillm joined
|
|||
PerlJam | drake1's question got me thinking about contexts a little. "$.foo" is really the same as "item self.foo" and "@.foo" is really the same as "list self.foo" and "%.foo" is really the same as "hash self.foo". Right? That's the wordy way to provide context. | 13:18 | |
If that's all true, what's the wordy contextualizer for "&.foo" ? | 13:19 | ||
moritz_ | none; there's no operation that coerces a non-code object to a code object | 13:20 | |
btw 15:09 < drake1> that's actually nicer | |||
sorry | |||
ridiculousfish.com/blog/archives/20...treachery/ is what I wanted to share - nice read | |||
drake1 | moritz_: then whats the 6y alternative? | 13:21 | |
the array index should be cast to a function | 13:23 | ||
moritz_ | WHY? | 13:24 | |
drake1 | because the psf version has special read algorithms | ||
eg. version 1 and 2 use different algorithms | 13:25 | ||
mapped to different index's | |||
moritz_ | I'm not sure we're talking about the same thing | ||
15:19 < PerlJam> If that's all true, what's the wordy contextualizer for "&.foo" ? | 13:26 | ||
why would one want a callable context? | |||
drake1 | I mean about line 37 in that paste | ||
moritz_ | huh - din't PerlJam answer that question already? | 13:27 | |
drake1 | not very clear | ||
PerlJam | what was unclear? | ||
drake1 | whether dots is for methods or values | 13:28 | |
PerlJam | moritz_: consistency. (a foolish one perhaps :) | ||
moritz_ | drake1: then it's good style to ask for clarificaion, not just ask the same question again | ||
didn't I answer that too? | |||
15:10 < moritz_> $.font is the same as self.font | |||
15:10 < moritz_> so it is a method call | 13:29 | ||
drake1 | but self.font seems like some other language | ||
PerlJam | drake1: really? which one? :) | ||
moritz_ | it's also Perl 6 :-) | ||
drake1 | PerlJam: struct objects in C | ||
PerlJam | I assure you, it is Perl 6. | 13:30 | |
drake1 | ok | ||
[particle] | there's plenty of clarification in the spec on that matter. | ||
drake1 | so the non dollar dot strings return a void object? | ||
PerlJam | er, what? | 13:31 | |
drake1 | if you don't prefix with the dollar, what's the return value? | ||
jnthn | whatever the thing you call returns | ||
without any context applied | |||
drake1 | hmm | ||
PerlJam | drake1: whatever the return value is of the method you're calling | ||
moritz_ | (fwiw currently rakudo doesn't force the context as it should | 13:32 | |
jnthn | (In Perl 6, there's no wantarray or anything like that.) | ||
moritz_ | ) | ||
jnthn | (So it's no problem to not know the context.) | ||
moritz_ | rakudo: class A { has @.b = (1, 2); method check { say %.b.perl } }; A.new.check | ||
p6eval | rakudo 82c9e9: OUTPUT«[1, 2]» | ||
PerlJam | drake1: $.foo is the same as self.foo, .foo is the same as $_.foo Is that your difficulty? | 13:33 | |
moritz_ | that's wrong | ||
(rakudo's output, not PerlJam :-) | |||
drake1 | PerlJam: sounded like you were unsure | ||
PerlJam | drake1: so far today, I've only been unsure about a wordy contextualizer for subroutines. | ||
moritz_ | rakudo: sub curry($x) { { $x } }; my $c = curry 3; say $c() | 13:34 | |
drake1 | ``self'' is similar to the former symbol table, then? | ||
p6eval | rakudo 82c9e9: OUTPUT«invoke() not implemented in class 'Integer' in main program body at line 22:/tmp/y1dYLQTu9o» | ||
moritz_ | no; self is a lexical that holds the invocant | 13:35 | |
drake1 | ok | ||
moritz_ | rakudo: sub curry($x) { sub { $x } }; my $c = curry 3; say $c() | ||
p6eval | rakudo 82c9e9: OUTPUT«3» | ||
moritz_ | PerlJam: you can write a callable contextualizer like that, if you want :-) | ||
jnthn | moritz_: -> { $x } too if you really just want a block. | 13:36 | |
moritz_ | or {; $x } | ||
jnthn | I think that'd still be taken as an inline block | 13:37 | |
(It's inline vs closure that's the tripping point here, not block vs hash) | |||
moritz_ | oh. | ||
right | |||
13:38
Siddy left,
ruoso left
|
|||
pmichaud | good morning, #perl6 | 13:40 | |
phenny | pmichaud: 23 Aug 19:38Z <moritz_> ask pmichaud it seems that the p6regex tests in nqp-rx assumes that nqp-rx should support the :x($count) modifier -- is that sitll a valid assumption? | ||
jnthn | morning, pmichaud | 13:41 | |
pmichaud | moritz_: no, those tests are left over from the pge days... | ||
moritz_ | ok, I'll get rid of them (and of the :nth tests too) | ||
pmichaud | wfm | ||
cognominal | rakudo: sub curry($x) { * }; my $c = curry 3; say $c() | ||
p6eval | rakudo 82c9e9: OUTPUT«invoke() not implemented in class 'Whatever' in main program body at line 22:/tmp/7oynNW6Ys_» | ||
moritz_ | fyi, 'make test' in nqp-rx now runs the p6regex tests too | 13:42 | |
pmichaud | does it pass all of them? | ||
13:42
pmurias left
|
|||
pmichaud | I had them separate because not all of the p6regex tests were passing yet. | 13:42 | |
cognominal | should that work? | ||
pmichaud | cognominal: no. | ||
moritz_ | well, I did some fudging | ||
to make them all pass | |||
pmichaud | moritz_: okay, I'll take a look. | 13:43 | |
moritz_ | I also updated some to the new regex syntax | ||
pmichaud | all of the rx_backtrack tests are being skipped? | 13:44 | |
[Coke] | wasn't someone saying a few days ago "but surely those parrot strings would get freed in the first GC anyway?" | 13:45 | |
moritz_ | pmichaud: yes; many of them tested ::, which was too much of a hassle for me to fudge | ||
pmichaud | oh. | ||
[Coke] | (because about the same time, someone in parrot noticed that that was in fact not the case.) | ||
pmichaud | but the rx_backtrack tests (the ones that do work) are pretty important. | 13:46 | |
[Coke] ponders trying to pick pmichaud's brain. | |||
pmichaud | [Coke]: pick my brane about what? ;-) | ||
moritz_ | pmichaud: should I split the :: tests off into another file? | ||
pmichaud | moritz_: that might be better. | ||
13:46
uniejo left
|
|||
moritz_ | oh, not so many as I thought... maybe I'll just fudge them in-place | 13:47 | |
dalek | p-rx: f32c0d3 | moritz++ | t/p6regex/rx_modifiers: get rid of some regex modifier tests that are (intentionally) no longer supported |
13:48 | |
pmichaud | another possibility is that we could change the p6regex harness to be nqp, now. | 13:49 | |
instead of .pir | |||
but that's a longer-term change, I suspect. | |||
in general, I'd like to see that spectests and p6regex and <other engine> can all live from the same body of tests. | |||
that's a little hard to do with the S05-* tests written as p6 scripts, though. | 13:50 | ||
13:52
dangbinghoo joined
|
|||
pmichaud | [Coke]: still pondering? ;-) | 13:53 | |
[Coke] | pmichaud: trying to make a past::var in package scope go for the get_hll_global instead of just get_global. | ||
pmichaud | coke: oh... just specify :namespace([]) | 13:54 | |
that makes it look in hll_global | |||
[Coke] | github.com/partcl/partcl-nqp/blob/m...ns.pm#L176 | ||
pmichaud: ... Oy. Danke. | |||
That almost seems obvious, thank you. =-) | 13:57 | ||
pmichaud | afk for ~1h | 13:58 | |
[Coke] | pmichaud++ | ||
dalek | p-rx: c7b2af5 | moritz++ | t/p6regex/ (2 files): fudge backtracking tests, and run them again |
14:00 | |
14:08
lala left
14:10
pmurias joined
|
|||
drake1 | how do you return the "errno" of a failed system call? | 14:10 | |
maybe just return undef and specify that errno has the condition | 14:11 | ||
14:12
wtw left
14:13
drbean left,
ggoebel joined
|
|||
ggoebel | hello perl6 | 14:14 | |
colomon | o/ | ||
takadonet | ggoebel: morning | ||
14:16
wtw joined
|
|||
drake1 | then what about intermixed high level abstractions | 14:16 | |
return value from constructor: undef - get the error code from $! or internal class property would be thread unsafe | 14:19 | ||
14:20
pmurias left,
zag left
|
|||
moritz_ | the idea is to return a Failure object which is undefined, but contains information about the failure | 14:21 | |
drake1 | then how would the call know how to distinguish an error object from the object it's trying to construct? | 14:22 | |
14:23
alester joined
|
|||
moritz_ | drake1: it's a different type for once | 14:23 | |
drake1 | so they have to type check | ||
moritz_ | and if you try to call your normal methods on a Failure, it will blow up violently | ||
so when you write | |||
my $fh = open 'filename.txt'; | |||
for $fh.lines { .say } | |||
then the $fh.lines blows up, telling you that the open() failed | 14:24 | ||
or you can say | |||
jdv79 | open doesn't throw itself? | ||
moritz_ | my $fh = open 'filename.txt'; | ||
if $fh.defined { say "open worked" } | |||
and it will not blow up | |||
jdv79: no, unless you 'use fatal;' | |||
drake1 | moritz_: then it's better to pass the $file pointer | ||
from the caller | 14:25 | ||
moritz_ | huh? | ||
jdv79 | weird. i'd like to see the motivation for that. | ||
drake1 | because then you don't have to intermix with system codes | ||
moritz_ | jdv79: parallelization | ||
jdv79: you don't want some parallel operation to abort, just because 1 of the 5 million operations died | |||
jdv79 | oh, laziness? | ||
moritz_ | perlgeek.de/blog-en/perl-6/failing-softly.html | 14:26 | |
drake1 | open $file, "filename" |die "$!"; my $obj = new CLASS $file | ||
moritz_ | that's not Perl 6 code | 14:27 | |
and I don't see why you should write something like that | |||
drake1 | but then you still need to have an error code for the read and write calls, damnit | ||
moritz_ | why? | 14:28 | |
jdv79 | ah, ok | ||
moritz_ | drake1: did you read the link? | ||
drake1 | moritz_: for proper error messaging | ||
moritz_: im about to | |||
moritz_ | drake1: why? the failure object knows what went wrong | ||
drake1 | moritz_: yes, but how would the caller see whether it's a failure object or a good one? | 14:30 | |
moritz_ | drake1: why should it care? | ||
drake1 | if $obj.error | ||
moritz_ | drake1: it can just use it as if its a normal object | ||
and if it's an error, it blows up | |||
or it can check for .defined | |||
but I wrote tha already | |||
drake1 | I don't think it's a good idea to blow it up | 14:31 | |
gfldex | did you try? | ||
drake1 | that's what I do atm | ||
heheh | 14:32 | ||
moritz_ | well, you can always check, and don't blow up | ||
gfldex | is there a nice way to branch on the type of a value | 14:33 | |
beside MMD | |||
drake1 | something like: my $object = new PACKAGE "filename"; die if $object.error ? | ||
gfldex | die unless $object.defined | 14:34 | |
jdv79 | pretty neat. i did not know about soft exceptions. | ||
thx! | |||
drake1 | gfldex: yeah | ||
TimToady | more like lazy exceptions | ||
moritz_ | drake1: if you want it to die, why not just use it, and let it blow up during the usage? | ||
drake1 | moritz_: because it's unethical | 14:35 | |
moritz_ | drake1: it's not unethical in Perl 6 | ||
drake1 | ok then | ||
TimToady | it is a way to achieve clarity | ||
the advantages of 'use fatal' without the disadvantages | |||
drake1 | moritz_: no. because that would kill the application who use it | ||
moritz_ | drake1: and calling die() wouldn't? | 14:36 | |
gfldex | if you die by hand you tell somebody that reads that code that you expect stuff to go wrong at this place in the code | ||
moritz_ | every open() can go wrong | 14:37 | |
TimToady | every print can go wrong | ||
moritz_ | and if the reader knows that it might blow up later on, it's just as good as die() | ||
gfldex | # bla bla bla horribly dies <-- would do the same :) | ||
drake1 | I think Im going to do like this (with in constructor): if(open() == undef) { $self{error} = $cantopen; return undef; } | ||
moritz_ | if you like.... | ||
drake1 | then everyone is happy | 14:38 | |
TimToady | except that's not Perl 6 | ||
at least two different ways | |||
moritz_ | std: undef | ||
drake1 | you cant address an object property like a hash? | ||
TimToady | std: if(open() == undef) { $self{error} = $cantopen; return undef; } | ||
p6eval | std 32101: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, :!defined as a matcher, Any:U as a type | ||
..constraint or fail() as… | |||
std 32101: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, :!defined as a matcher, Any:U as a type | |||
..constraint or fail() as… | |||
drake1 | if(!defined open... | ||
TimToady | std: if(!defined open()) { $self{error} = $cantopen; return Mu; } | 14:39 | |
p6eval | std 32101: OUTPUT«===SORRY!===Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens at /tmp/vYsukWStqc line 1:------> if⏏(!defined open()) { $self{error} = $cantUnexpected block in infix position (two terms in a row) at | ||
../tmp/vY… | |||
drake1 | hmm | ||
TimToady | std: if !defined open() { $self{error} = $cantopen; return Mu; } | ||
p6eval | std 32101: OUTPUT«===SORRY!===Variable $self is not predeclared at /tmp/dkey4eeObx line 1:------> if !defined open() { $self⏏{error} = $cantopen; return Mu; }Variable $cantopen is not predeclared at /tmp/dkey4eeObx line 1:------> efined open() { | ||
..$self{er… | |||
ingy | morning | ||
o/ | |||
colomon | \o | 14:40 | |
TimToady | std: if !defined open() { self.{error} = $cantopen; return Mu; } | ||
p6eval | std 32101: OUTPUT«===SORRY!===Variable $cantopen is not predeclared at /tmp/Zwwdo1qcLb line 1:------> efined open() { self.{error} = $cantopen⏏; return Mu; }Undeclared routine: 'error' used at line 1Check failedFAILED 00:03 118m» | ||
drake1 | heheh | ||
TimToady | std: if !defined open() { self.{error} = 'cantopen'; return Mu; } | ||
p6eval | std 32101: OUTPUT«===SORRY!===Undeclared routine: 'error' used at line 1Check failedFAILED 00:01 118m» | ||
ingy is at a beach house on the new jersey shore | |||
TimToady | std: if !defined open() { self.error = 'cantopen'; return Mu; } | ||
ingy | good wifi here | ||
p6eval | std 32101: OUTPUT«ok 00:03 117m» | ||
drake1 | what's the Mu? | ||
14:40
Holy_Cow joined
|
|||
huf | the best looking version is the one that works so far. nice | 14:40 | |
TimToady | but that's terrible to read, and doesn't return any useful info the caller | 14:41 | |
moritz_ | drake1: I suggest you read S02 | ||
drake1 | moritz_: alright | ||
instead of blowing up, maybe it's allowed to print to stderr ? | 14:42 | ||
TimToady | open() // fail("Here's your problem") | ||
moritz_ | that would be a warning | ||
drake1 | nice | ||
before calling open, I just use ``test'' to set the self{error} then | 14:44 | ||
system("test","-f",$filename) || $self{error} = 'dont exist' | 14:46 | ||
14:46
plobsing joined
|
|||
moritz_ | you're writing Perl 5 code | 14:46 | |
drake1 | im trying to learn the new | 14:47 | |
TimToady | and it's wrong Perl 5 | ||
system takes && in Perl 5 | |||
moritz_ | unless $filename.IO ~~ :e { fail 'does not exist' } | ||
drake1 | yeah perl5 requires the arrow for single dimensional hash | ||
fail causes application do die? | 14:48 | ||
moritz_ | see S04 | ||
and my blogpost about unthrown exceptions | |||
drake1 | ok | 14:49 | |
14:51
bjarneh joined
|
|||
daxim | moritz_, I've been pondering. this soft failing compares directly to <backpan.perl.org/authors/id/T/TO/TO...ar.gz>, <use.perl.org/comments.pl?sid=44521&...=71693> and <p3rl.org/Return::Value> | 14:52 | |
dangbinghoo | is rakudo written using Perl 5 ? | ||
daxim | rjbs writes there: "Objects that are false are just a dreadful idea in almost every circumstance, especially when the object has useful properties." | ||
moritz_ | dangbinghoo: no, it's mostly written in Perl 6 | ||
gfldex | drake1: www.presentingperl.org/ye2010/perl-...ull-story/ | ||
drake1: www.jnthn.net/papers/2010-yapc-eu-signatures.pdf | 14:53 | ||
tells the story _why_ Failure is cool :) | |||
dangbinghoo | moritz_: what is perl-5.12? | ||
daxim | moritz_, what is better in this newer design compared to the 3 things I pointed above? | ||
moritz_ | dangbinghoo: a new version of Perl 5 | ||
14:53
tadzik joined
|
|||
tadzik | hello again | 14:53 | |
moritz_ | daxim: that you don't have to check for the return value; you can just use it | 14:54 | |
and if you use it as if it were not a failure, but it is one, no information is lost | |||
dangbinghoo | moritz_: I'm installing rakudo, but gentoo is installing perl-5.12 first . is that true? Does rakudo need perl version over 5.10 ? | 14:55 | |
tadzik | hell no | ||
drake1 | thanks gfldex | ||
moritz_ | another problem with Return::Value is that it tries to be type sensitive, but Perl 5 has no user-visible types beside scalar/hash/array | ||
tadzik | I was running it with 5.10 since I remember (which is like a few months :)) | ||
moritz_ | dangbinghoo: no; rakudo needs perl5 for configuration, but 5.8.8 is also fine | ||
14:56
jferrero left
|
|||
dangbinghoo | moritz_: so, rakudo need perl5 , and gentoo is now just updating my perl 5 (5.8-->5.12). | 14:56 | |
14:57
kiffin left
|
|||
moritz_ | yes | 14:57 | |
dangbinghoo | updating perl 5 makes my vim crashed.:-( | 14:59 | |
colomon | my rakudo builds are done with perl 5.8.9 | 15:00 | |
moritz_ | dangbinghoo: complain to the gentoo developers | ||
dangbinghoo | moritz_: sorry.;-) | 15:01 | |
moritz_ | no problem | ||
BinGOs | And the moral of the story is, always build your own perl5 independent of your vendors. | ||
moritz_ | (or chose a better vendor :-) | 15:02 | |
if such a thing exists | |||
daxim | perl on gentoo is a lost cause, alas | ||
the responsible team is well-meaning, but understaffed | 15:03 | ||
moritz_ | for some years I was rather happy with Debian's perl, but installing modules which require newer core modules is still a PITA | ||
so I'm slowly drifting towards self-compiled perls too | |||
dangbinghoo | moritz_: gentoo developer would not notice this. gentoo is for someone who is developers . the answer is to reinstall the vim yourself, never ask questions. | 15:04 | |
15:04
zostay joined
|
|||
moritz_ | well, if you're not happy with that attitude, you shouldn't be using gentoo | 15:04 | |
BinGOs | First thing I do on any new system ( like CPAN Tester boxes ), install a non-threaded perl-5.12.1 under /opt | ||
dangbinghoo | moritz_: well , I'm trying to design a system like gentoo , but more easier to use. | 15:05 | |
15:05
Holy_Cow left
|
|||
dangbinghoo | moritz_: but it is only my thought , well , a dream | 15:07 | |
diakopter | BinGOs: urp; first thing I do on machines at $work is to install a threaded perl-5.12.1 since the system one is non-threaded (and old) | 15:08 | |
15:09
zulon joined
|
|||
diakopter | I write new scripts with Thread::Pool::Simple often | 15:11 | |
BinGOs | I don't want the threads tax. | 15:12 | |
diakopter | oh | ||
I don't want the other-15-cores idle overhead. these machines are not under high load. | 15:13 | ||
er, other 7 cores. | 15:14 | ||
tadzik | star comes out today? | 15:15 | |
15:16
Holy_Cow joined
|
|||
drake1 | pretty sweet with signatures | 15:22 | |
mov 4(%ebp), %eax alike | 15:24 | ||
just runtime instead | 15:26 | ||
15:29
tylercurtis joined
|
|||
diakopter | TimToady: www.ccs.neu.edu/home/dimvar/papers/...-10-01.pdf | 15:31 | |
tadzik | hah, pmichaud++ LOLCODE talk is hilarous | 15:32 | |
gfldex | tadzik: where do you see that one? | 15:36 | |
tadzik | gfldex: yapc.tv/2008/ye/lt/lt2-09-pmichaud-...-compiler/ | 15:37 | |
15:38
Siddy joined
|
|||
dangbinghoo | perl6: say 3 | 15:40 | |
p6eval | pugs, rakudo 82c9e9: OUTPUT«3» | ||
dangbinghoo | rakudo: say "4" | ||
p6eval | rakudo 82c9e9: OUTPUT«4» | 15:41 | |
drake1 | to specify the grammar for my own parser object, it's enough to specify where each sub branch may occur | 15:48 | |
through symbolic class abbreviations | 15:49 | ||
moritz_ | drake1: see the chapters on regexes and grammars in github.com/downloads/perl6/book/2010.08.a4.pdf | 15:51 | |
drake1 | then it's up to the parent branch how to handle unwelcome ones | ||
thanks for all the good pointers | |||
15:52
molaf joined,
tadzik left
|
|||
drake1 | is the infix [max] locale compatible or numeric only? | 15:55 | |
15:57
zulon left
|
|||
tylercurtis | It appears to use infix:<cmp>, so it's generic to whatever cmp does for the arguments. | 15:59 | |
drake1 | ah, >> is like the `map' func with object methods instead? | 16:00 | |
tylercurtis: ok | |||
16:00
macroron joined
16:01
dangbinghoo left
16:02
risou joined
|
|||
TimToady | drake1: yes, it's all really just higher-order programming underneath; methods are really just first-class functions that put themselves where a dispatcher can find them | 16:04 | |
moritz_ | hugme: add kthakore to book | ||
hugme hugs kthakore. Welcome to book! | |||
16:05
kuzuha left
|
|||
TimToady | diakopter: I'm glad there are people in the world who like to think about such things, and I'm glad I'm not one of 'em. :) | 16:05 | |
drake1 | TimToady: very smart | ||
almost like MMX cache force | 16:06 | ||
TimToady | which is why we can export a method and turn it into a multi sub, and it works the same; it just has a different dispatcher | ||
drake1 | is it possible to say: @array>>normal_func ? (without the dot) | 16:07 | |
TimToady | not that way | ||
drake1 | so >> is only for object methods of the array? | 16:08 | |
TimToady | but prefix operators are also meta-able, and a listop is a prefix | ||
drake1 | oh | ||
TimToady | so normal_func« @array ought to work | ||
drake1 | nice | 16:09 | |
TimToady | not sure it does in rakudo though | ||
16:09
cogno joined
|
|||
moritz_ | I'm pretty sure it doesn't | 16:09 | |
TimToady | rakudo: say sin« (0,1,2) | ||
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Confused at line 22, near "say sin\x{ab} ("» | ||
moritz_ | (and it's the first time I've read that it shoudl work :) | ||
TimToady | rakudo: say -« (0,1,2) | 16:10 | |
p6eval | rakudo 82c9e9: OUTPUT«0-1-2» | ||
16:10
envi^home left
|
|||
TimToady | std: say sin« (0,1,2) | 16:10 | |
p6eval | std 32101: OUTPUT«===SORRY!===Unable to parse quote-words subscript; couldn't find right double-angle quote at /tmp/VSiSMXT3Vp line 1 (EOF):------> say sin« (0,1,2)⏏<EOL>Other potential difficulties: Unsupported use of bare 'sin'; in Perl 6 please use .sin | ||
..i… | |||
TimToady | o_O | ||
tylercurtis | std: [+]<<(0, 1, 2) | 16:11 | |
TimToady | I though 'sin' was an operator | ||
p6eval | std 32101: OUTPUT«ok 00:01 117m» | ||
drake1 | then with an array of home made `sin' capable objects, it's just to @array>>.sin too? | ||
TimToady | std: say abs« (0,1,2) | 16:12 | |
p6eval | std 32101: OUTPUT«ok 00:03 118m» | ||
TimToady | rakudo: say abs« -«(0,1,2) | 16:13 | |
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Could not find sub &prefix:<abs>» | ||
TimToady | STD has abs as a prefix operator | ||
drake1 | std: sub sin2 { return sin(2); }; @array = (1,2,3); say @array>>.sin2 | ||
p6eval | std 32101: OUTPUT«===SORRY!===Variable @array is not predeclared at /tmp/WDUyVswZPj line 1:------> sub sin2 { return sin(2); }; @array⏏ = (1,2,3); say @array>>.sin2Variable @array is not predeclared at /tmp/WDUyVswZPj line 1:------> sin(2); }; @array = | ||
..… | |||
drake1 | oh | 16:14 | |
16:14
Siddy left
|
|||
TimToady | strict is the default now | 16:15 | |
16:15
Trashlord joined
|
|||
TimToady | and .sin2 won't work like that, because it's the wrong dispatcher. however .&sin2 turns out to work | 16:16 | |
(recently discovered) | |||
drake1 | ok | ||
TimToady | std: sub sin2 { return sin(2); }; my @array = (1,2,3); say @array>>.&sin2 | ||
p6eval | std 32101: OUTPUT«ok 00:01 124m» | ||
TimToady | rakudo: sub sin2 { return sin(2); }; my @array = (1,2,3); say @array>>.&sin2 | ||
p6eval | rakudo 82c9e9: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'sin2' at line 22:/tmp/Sm9fuaOhP5 in main program body at line 22:/tmp/Sm9fuaOhP5» | ||
drake1 | so arrays values are not automatically subclassing the parent class | 16:17 | |
TimToady | rakudo: sub sin2($x) { return sin(2); }; my @array = (1,2,3); say @array>>.&sin2 | ||
p6eval | rakudo 82c9e9: OUTPUT«0.9092974268256820.9092974268256820.909297426825682» | ||
drake1 | cute | ||
TimToady | rakudo: say (1,2,3)».&prefix:<-> | 16:18 | |
p6eval | rakudo 82c9e9: OUTPUT«-1-2-3» | 16:19 | |
TimToady | \o/ | ||
moritz_ | rakudo: sub sin2($x) { return sin($x); }; my @array = (1,2,3); say ~@array».&sin2 | ||
p6eval | rakudo 82c9e9: OUTPUT«0.841470984807897 0.909297426825682 0.141120008059867» | ||
moritz_ | TimToady: that's a neat trick | ||
[particle] | rakudo: say (1,2,3)».&postfix:<!> | ||
p6eval | rakudo 82c9e9: OUTPUT«Could not find sub &postfix:<!> in main program body at line 22:/tmp/T19MM3BnyW» | ||
tylercurtis | rakudo: say([0], [1, 2], [3, 4, 5])>>.&prefix:<[+]> | 16:20 | |
moritz_ | [particle]: that's the one you have to define yourself :-) | ||
TimToady | rakudo: say (1,2,3)».&( * + 42 ) | ||
[particle] | feh :( | ||
p6eval | rakudo 82c9e9: OUTPUT«01 23 4 5» | ||
rakudo 82c9e9: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 22, near "&( * + 42 "» | |||
TimToady | aww | ||
std: say (1,2,3)».&( * + 42 ) | |||
p6eval | std 32101: OUTPUT«ok 00:01 122m» | ||
jnthn | rakudo: sub add($x, $y) { $x + $y }; say (1,2,3)».&add(2); | ||
TimToady | rakudobug | ||
p6eval | rakudo 82c9e9: OUTPUT«345» | ||
jnthn | TimToady: Ewww. | 16:21 | |
TimToady: How's it parsed? | |||
moritz_ | rakudo: say ~(1, 2, 3).&prefix:<+>(2) | ||
rakudo: say ~(1, 2, 3).&infix:<+>(2) | |||
jnthn | rakudo: &( * + 42 ) | ||
p6eval | rakudo 82c9e9: OUTPUT«too many positional arguments: 2 passed, 1 expected in main program body at line 6760:CORE.setting» | ||
rakudo 82c9e9: OUTPUT«5» | |||
rakudo 82c9e9: ( no output ) | |||
TimToady | same as $() or @() | ||
jnthn | Hmm, seems to parse it alone. | ||
Yeah | |||
TimToady | rakudo: say (1,2,3)».$( * + 42 ) | 16:22 | |
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 22, near "$( * + 42 "» | ||
jnthn | Maybe we're missing something in variable | ||
16:22
snearch left
|
|||
drake1 | im used to the less friendly while(i=*p++)sin2(i); where the inheritance chain is associated by the `ld' command. different story | 16:22 | |
moritz_ | jnthn: yes, we also don't parse @$a | ||
jnthn | Ah, ok | 16:23 | |
tylercurtis | rakudo: say (1,2,3)>>."{ * + 2}" | ||
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Quoted method name requires parenthesized arguments at line 22, near ""» | ||
moritz_ thought ld did linking, not inheritance | |||
tylercurtis | rakudo: say (1,2,3)>>."{ * + 2 }"() | ||
p6eval | rakudo 82c9e9: OUTPUT«Method '_block131' not found for invocant of class 'Int' in main program body at line 22:/tmp/5J9Y09Mndo» | ||
tylercurtis | Ah, right. | 16:24 | |
drake1 | ld is all about overloading the methods | ||
TimToady | it's parsed by the line in token variable that reads: | 16:25 | |
| <sigil> <?before '('> <postcircumfix> [<?{ $*IN_DECL }> <.panic: "Can't declare a contextualizer">]? | |||
methodop calls variable calls postcircumfix | |||
rakudo: my $a; @$a; | 16:27 | ||
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 22, near "@$a;"» | ||
16:27
macroron left
16:28
pyrimidine joined
|
|||
jnthn | Ah, yes, I think we are missing that case. | 16:28 | |
16:30
Mowah left
|
|||
tylercurtis | rakudo: class A { method defined { True; } }; say A.defined | 16:30 | |
p6eval | rakudo 82c9e9: OUTPUT«0» | ||
tylercurtis | Ah, nice. | ||
jnthn | Hmm. | 16:31 | |
moritz_ kinda thinks it's a bug | |||
jnthn | I don't think that behavior is going to survive the meta-model refactor. | ||
tylercurtis kinds thinks it's possibly a bug, too, now. | 16:32 | ||
jnthn | I also suspect anyone overriding defined is going to really want to write multi method defined($self:D:) { True } too | ||
So they only override the behavior not on the type object | 16:33 | ||
(I'm increasingly suspecting that :D and :U care about the repr's idea of definedness rather than any higher-level one.) | |||
moritz_ | but :D won't check .defined, but rather a lower-level test, no? | ||
ah, jnthn++ is faster than me | 16:34 | ||
jnthn | moritz_: Right, so overriding defined wrongly won't mess up dispatch that is relying on :D and :U | ||
It'll just confuse people. :-) | |||
TimToady | it could well be one of those two-level distinctions like ~ vs .Str | ||
drake1 | where's the best place to download parrot? | ||
moritz_ | the internet! | ||
TimToady | no, that's where you download it *from* | ||
moritz_ | ah. Then "a computer" | 16:35 | |
tylercurtis | parrot.org | ||
TimToady | the best place to download parrot is someone else's computer, because it uses too many resources. :) | ||
16:35
cogno left
|
|||
moritz_ | drake1: do you want to build it from source? do you want a release, or a source repo? | 16:35 | |
jnthn | TimToady: Yeah, I think it kinda needs to be. | ||
TimToady: We get away with various things in Rakudo today because of the type object being of a different type to the type it represents. | 16:36 | ||
TimToady: Unfortunately, that way also rather hurts in other places. | |||
TimToady: smop++ called that one right. | |||
TimToady | yes, cheaters usually get caught :P | ||
drake1 | moritz_: from source | 16:37 | |
moritz_ | drake1: svn co svn.parrot.org/parrot/trunk/ parrot | ||
drake1 | nice | 16:38 | |
TimToady | or just use the --gen-parrot option when you configure rakudo | ||
drake1 | I need to play with it | 16:40 | |
got a grammar to try to make parrot compatible | 16:41 | ||
16:44
molaf left
|
|||
pyrimidine | moritz_: isn't parrot migrating to github? I hazily recall dukeleto doing something related to that... | 16:44 | |
or maybe just a mirror? | 16:45 | ||
moritz_ | pyrimidine: yep, but the github mirror isn't official yet | ||
pyrimidine | ok | ||
TimToady contemplates a "Useless use of bare block" in sub curry($x) { { $x } } | 16:46 | ||
16:47
kirillm left
|
|||
[Coke] | ah, there's our ddaily parrot snipe! | 16:49 | |
drake1 | just fixed the PSF.pm with an -f $file_name || return undef; so now the test: pastebin.ca/1924348 is pretty OK | ||
TimToady | [Coke]: glad you noticed :) | 16:50 | |
[Coke] | oh, i always do. :( | ||
drake1 | how do you create a signature for the "main" function arguments in perl6? | ||
moritz_ | rakudo: sub MAIN($x = 5) { say $x } | 16:51 | |
pmichaud | no #cpan6sketch ? | ||
p6eval | rakudo 82c9e9: OUTPUT«5» | ||
16:51
jferrero joined
|
|||
moritz_ | pmichaud: I was only one in there | 16:51 | |
pmichaud | hmmm. | ||
I had errands to run. | |||
oh well, maybe next week. | |||
moritz_ hopes so too | |||
TimToady | speaking of resources, I noticed that rakudo seems to have a small memory leak with rosettacode.org/wiki/Hailstone_sequence#Perl_6 | 16:58 | |
which I was planning to leave running overnight to see if it completes, but decided I'd run out of memory first | |||
moritz_ | TimToady: it has a memory leak for every loop you can think of | 16:59 | |
a simple while 1 { }; leaks already | |||
TimToady | gotcha | ||
do we know why? | |||
16:59
dakkar left
|
|||
moritz_ | I have no idea | 16:59 | |
x3nU | what are editors that do syntax highlighting for perl6? | 17:00 | |
[Coke] | we just had a new committer fix a long standing leak, so if you can golf that, I'm sure we can get him on this one too. | ||
moritz_ | x3nU: vim | ||
[Coke] | (assuming its parrot) | ||
moritz_ | [Coke]: I'll rebuild on newest parrot before continuing to experiment | ||
x3nU: also padra | |||
TimToady | might not be <-- vague anti-snipe :) | ||
moritz_ | *padre | ||
tylercurtis | x3nU: There's also a cperl-mode.el that supports Perl 6 in the pugs repo. | ||
x3nU | vim is a bit strange for me | 17:01 | |
and i don't want padre because i don't want install strawberry perl ;p | |||
TimToady | sounds like you get to write your own then :) | ||
[Coke] | par for the course around here! | ||
TimToady | though installing strawberry might be *slightly* less work | 17:02 | |
[Coke] | perma-rant: lack of named tests in tap. (or maybe my rant is that prove doesn't tell you the description.) | 17:03 | |
TimToady | well, the tests are supposed to pass, not fail :P | ||
moritz_ | [Coke]: prove --verbose shows me the test names | ||
x3nU | it looks like that i must use vim ;/ | 17:04 | |
moritz_ | nobody forces you :-) | ||
tylercurtis | x3nU: how do you feel about emacs? | ||
x3nU | good operating system but... ;) | 17:05 | |
TimToady | performance aside, I was rather pleased that we can write the hailstone sequence as a series | ||
sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 } | |||
17:06
rgrau_ joined
|
|||
TimToady | rakudo: sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }; say ~hailstone(7) | 17:06 | |
p6eval | rakudo 82c9e9: OUTPUT«7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1» | ||
colomon | "my $m max= +hailstone($_) => $_ for 1..99_999;" feels very unperl6ish to me. | ||
TimToady | though I encountered abject failure in trying to cache results and return a list from the generator | ||
in what sense is it unperl6ish? | 17:07 | ||
sure won't work in Perl 5... | |||
and relies on the fact that 'after' works on pairs | 17:08 | ||
colomon | not conforming to my sense of how things should be done in perl 6 :) | ||
TimToady | we are not Steve Jobs | ||
colomon | actually, does it even work? | ||
TimToady | yes, it does | ||
colomon | afk | 17:09 | |
TimToady | though I don't recommend running it that many times if you're worried about your air-conditioning bill. | 17:10 | |
moritz_ | [Coke]: still leaks on newest parrot | ||
about 1MB per second | |||
wolverian | how does the statement modifier for scope in perl 6? is it "do { my ... } for ..." or "my $m = do { ... for ... }"? | ||
in the above statement, that is. | |||
TimToady | the while 1 ? | ||
moritz_ | yes | ||
17:10
ruoso joined
|
|||
TimToady | statement modifiers modify a whole statement | 17:10 | |
so the my is inside it | 17:11 | ||
however, there are no {...}, so the my scopes to the outer block's lexpad | |||
it doesn't carp about undefinedness the first time because assignops aren't supposed to | |||
wolverian | ah, I was just wondering if the statement was supposed to make sense or not. | 17:12 | |
tylercurtis | max works on pairs? | ||
TimToady | yes, it both works and makes sense (fsdo) | ||
max works on anything that defines cmp/before/after | |||
rakudo: say 1 => 2 before 3 => 4 | 17:13 | ||
p6eval | rakudo 82c9e9: OUTPUT«1 1 4» | ||
TimToady | er, hmm | ||
moritz_ | rakudo: say (1 => 2) before (3 => 4) | ||
drake1 off to workingset | |||
17:13
drake1 left
|
|||
p6eval | rakudo 82c9e9: OUTPUT«1» | 17:13 | |
TimToady | there you go | ||
moritz_ | rakudo: say (3 => 2) before (3 => 4) | ||
17:13
dual left
|
|||
p6eval | rakudo 82c9e9: OUTPUT«1» | 17:13 | |
tylercurtis | rakudo: say (1 => 4) before (3 => 2) | 17:14 | |
p6eval | rakudo 82c9e9: OUTPUT«1» | ||
moritz_ | rakudo: say (3 => 5) before (3 => 4) | ||
p6eval | rakudo 82c9e9: OUTPUT«0» | ||
TimToady | so it's a convenient trick for attaching an extra datum to something you want to use min or max on | 17:15 | |
a mini schwartzian transform, basically | |||
tylercurtis | rakudo: my @array = 1, 2, 3, 4, 5; say "\n", @array.max(:by(-> $n { say "$n"; $n })); | 17:18 | |
p6eval | rakudo 82c9e9: OUTPUT«213243545» | ||
tylercurtis | Shouldn't a unary :by be called only once per element? | 17:19 | |
rakudo: my @array = 1, 2, 3, 4, 5; say "\n", @array.sort(:by(-> $n { say "$n"; $n })); | |||
p6eval | rakudo 82c9e9: OUTPUT«12345» | ||
[Coke] | moritz_: so, while 1 {} -> 192 lines of PIR; hopefully that's golfable. | 17:20 | |
colomon | TimToady: My particular worry about it working was the "my $m" part of it. Is "my" there treated roughly like "while my $a = ..." ? | 17:22 | |
TimToady | yes, it scopes to outside the loop | ||
except that we really are using it once as undefined here, unlike in the while | 17:23 | ||
S03:3927 talks about op= in relation to undefined targets | 17:25 | ||
colomon | My objection to the line in (my understanding of) a perl 6 idiomatic approach is using an iterated max= rather than just taking .max of the entire array. | 17:26 | |
17:26
mikehh left
|
|||
TimToady | well, there's the little matter of storing 100_000 pairs in memory | 17:26 | |
17:27
mikehh joined
|
|||
colomon | shouldn't happen due to laziness | 17:27 | |
TimToady | I s'pose | 17:28 | |
colomon | my $m = (^10000).map({ +hailstone($_) => $_ }).max | ||
whoops, missed a 0 | |||
TimToady | and you probably don't want to run it with 0 | ||
probably loops forever | 17:29 | ||
colomon | ah, yes, read the conditional wrong for 0 | ||
TimToady | rakudo: sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }; say ~hailstone(0) | ||
p6eval | rakudo 82c9e9: OUTPUT«(timeout)» | ||
TimToady | yep | ||
colomon | my $m = (1..^10000).map({ +hailstone($_) => $_ }).max | 17:30 | |
17:31
mikehh left
|
|||
TimToady | still missing that 0 :) | 17:31 | |
colomon | damn you, cut-n-paste! | 17:33 | |
my subconscious doesn't want to melt the computer of anyone actually trying the code, that's the ticket... | |||
TimToady | anyway, even 10000 is gonna run a goodly long time | ||
colomon | true, just 100 was disturbingly slow. | ||
TimToady | feel free to optimize it :) | 17:34 | |
anyway, in the rosettacode I was more interested in blowing people's branes than doing a standard FPish solution | 17:36 | ||
17:37
cogno joined
|
|||
TimToady | working on rosettacode examples is Too Much Fun | 17:37 | |
17:38
c9s joined
|
|||
colomon | TimToady: I have been indeed pondering how to optimize the series operator for some time now. ;) | 17:40 | |
(and well, I think the my $m max= thing did indeed short a few circuits in my brane...) | 17:41 | ||
17:43
mberends joined
|
|||
PerlJam | colomon: don't you just look at the output of the profiler and spend time hacking on those things that are run often or take too long? what's to ponder? ;) | 17:46 | |
[Coke] | moritz_: Think I found the leak. | ||
tylercurtis just had his brane blown by the slides from jnthn++'s Signatures talk. | |||
[Coke] | Looks like each time through the loop, a new copy of $_, $/, and $! are created. | ||
colomon has to remember to look at jnthn++'s slides sometime soon | |||
[Coke]++ | 17:47 | ||
pmichaud | why is that a leak? | ||
[Coke] | I'm assuming something is holding on the old copies. | ||
pmichaud: trying to figure out why "while 1 {}" leaks. | |||
let me post my golfed PIR... | |||
pmichaud | [Coke]: yes, but the fact of creating new $_, $/ and $! at each iteration doesn't explain a leak | ||
I mean, the contexts should eventually get gc'ed | 17:48 | ||
jnthn | It'd only be incidental to the whole context PMC that references them leaking, no? | ||
pmichaud | (or they're supposed to be gc'ed) | ||
pmichaud awaits the golfed pir | |||
17:48
wtw left
|
|||
[Coke] | feather.perl6.nl/~coke/leak.pir? | 17:50 | |
17:50
molaf joined
|
|||
[Coke] | if I uncomment out the "##" block there, it leaks. | 17:50 | |
17:50
cogno left
|
|||
[Coke] | with it as it, it holds steady. | 17:51 | |
pmichaud | are you sure it's not leaking with the ## block? | ||
seems to me it would simply leak more slowly | |||
[Coke] | I'll leaving it running for a few minutes. | ||
if it's slower, it's MUCCCCCCCCCCCCCCCCCh slower. | 17:52 | ||
holding steady at 414M after a minute. | |||
pmichaud | what if you uncomment one of the declarations.... say, $! ? | 17:53 | |
17:53
rurban joined
|
|||
jnthn | If you change | 17:53 | |
## find_lex_skip_current $P86, "$_" | |||
## $P87 = new ['Perl6Scalar'], $P86 | |||
to just | |||
$P87 = find_lex_skip_current $P86, "$_" | |||
Does it still leak? | |||
[Coke] | avoiding the new? checking... | 17:54 | |
having just the find_lex_skip_current line is fine. | 17:55 | ||
jnthn | arrrrghhhh!!! | 17:56 | |
pmclass ObjectRef dynpmc group perl6_group manual_attrs { | |||
...which is fine and... | |||
[Coke] | andding in the .lex also seems fine... | ||
jnthn | pmclass Perl6Scalar extends ObjectRef dynpmc group perl6_group auto_attrs { | ||
[particle] | #perl6: where every day is "talk like a pirate" day | ||
jnthn | auto_attrs?! | ||
Shoudln't that me manual like its parent? | 17:57 | ||
[Coke] | auto_attrs == "please make parrot manage my memory for attributes." | ||
pmichaud | Perl6Scalar doesn't have any attrs of its own | ||
at least, not that I recall | |||
jnthn | pmichaud: Yes, but it inherits from something that has one. | ||
pmichaud: And allocates its own | |||
pmichaud | I bet the source is one of those patches submitted from folks updating the PMC attribute storage | ||
jnthn | pmichaud: We may have a situation where it allocates space due to auto_attrs, but then our init_pmc also allocates space | 17:58 | |
And we lose the pointer to the first. | |||
[particle] | btw built rakudo last night in <360MB with msvc | ||
*ram | |||
tylercurtis | Is there any particular reason ObjectRef is manual_attrs? | ||
jnthn | tylercurtis: Yes | ||
Well | |||
It's that because we allocate the space outselves | |||
[Coke] | yup. it's the new Perl6Scalar ... add one of those 3 back in, it starts leaking again. | ||
jnthn | *ourselves | ||
[Coke]: Try s/auto_attrs/manual_attrs/ there | 17:59 | ||
(src/pmc/perl6scalar.pmc) | |||
[Coke] | hokay. | ||
tylercurtis | jnthn: right. But is there any benefit to doing that? | ||
jnthn | tylercurtis: Dunno | 18:00 | |
[Coke] | I'll get back to you in a few hours after core.pir builds. ;) | ||
jnthn | tylercurtis: It was probably written before auo_attrs existed. | ||
*auto_attrs | |||
We may be able to get it to use auto_attrs. It may even be a performance win. | |||
pmichaud | the commit that added "auto_attrs and manual_attrs" is github.com/rakudo/rakudo/commit/961...7b8#diff-8 | ||
[Coke] | jnthn: want me to try that instead? ;) | ||
pmichaud | looks like it came from cotto | ||
tylercurtis is going to see what happens if he makes it auto_attrs. | |||
[Coke] lets tc try that. | 18:01 | ||
jnthn | [Coke]: I'd be curious to if see the manual_attrs change fixes the leak too. | ||
18:01
javs left
|
|||
jnthn | Though feel free to fix the leak and make it faster. ;-) | 18:01 | |
TimToady likes "and" | 18:03 | ||
tylercurtis | Switching to autoattrs made the memory stabilize for me. | 18:04 | |
jnthn | Nice | 18:05 | |
pmichaud | I don't quite understand the meaning of "manual_attrs" and "auto_attrs", fwiw | ||
tylercurtis runs a spectest and goes for a walk to see if it breaks anything somehow. | 18:06 | ||
[Coke] | jnthn: 30s in, I don't see the leak. | ||
jnthn | \o/ | ||
[Coke] | pmichaud: they refer to the memory management for attributes. | ||
pmichaud | [Coke]: okay, I knew that mnuch. | ||
*much | |||
what's the difference between them? | |||
jnthn | pmichaud: auto_attrs has Parrot allocate the thingy that hangs off the PMCs data pointer for you. | ||
[Coke] | basically, "unless you're doing something clever, use auto" | ||
jnthn | pmichaud: manual_attrs = you malloc and free it yourself | 18:07 | |
pmichaud | jnthn: as in, it allocates and initializes the pointers automatically? | ||
jnthn | pmichaud: Right | ||
[Coke] | tylercurtis: you have a patch? | ||
pmichaud | what does it initialize them to? | ||
PMCNULL ? | |||
jnthn | pmichaud: It allocates a struct with fields for all of the ATTR declarations. | ||
pmichaud | but leaves the fields uninitialized? | 18:08 | |
jnthn | I believe so yes | ||
Probably zeroed | |||
pmichaud | you're saying that auto_attrs allocates the struct, then. | ||
jnthn | Maybe PMCNULL | ||
Right | |||
pmichaud | when would we (Rakudo) want to be using manual_attrs, then? | ||
tylercurtis | [Coke]: spectesting right now. Want me to nopaste a patch before I go walking? | ||
jnthn | And what seems to have happened here is that objectref was correctly marked manutal_attrs | ||
(because it did its own allocation) | |||
But the subclass of it was marked auto_attrs | 18:09 | ||
18:09
sftp left
|
|||
jnthn | So Parrot allocated it, but we inherited the pmc_init that did the manual allocation too. | 18:09 | |
pmichaud | right now we have a mixture of both auto_attrs and manual_attrs in our pmcs | ||
jnthn | pmichaud: I suspect our usage of it mostly dates back to before auto_attrs existed. | ||
pmichaud: Or at least in this case. | |||
pmichaud | I'd like to have a reason for using one or the other in each case. | ||
18:09
sftp joined
|
|||
[Coke] | tylercurtis: no worries. | 18:09 | |
jnthn | pmichaud: We likely don't have a consistent approach for now. | 18:10 | |
sorear | good * #perl6 | ||
phenny | sorear: 11:59Z <ggoebel> tell sorear just reported the mono bug. I'm wondering if anyone will agree that failure to compile hello world is a critical failure? (bugzilla.novell.com/show_bug.cgi?id=634017) | ||
jnthn | pmichaud: We should really use auto_attrs consistently unless we can't. | ||
pmichaud | jnthn: yes, that's what I'm thinking. | ||
but most of our active pmcs appear to be manual_attrs | |||
18:12
justatheory joined
|
|||
jnthn | pmichaud: We could probably change that for most if not all of them. | 18:12 | |
pmichaud | agreed | ||
tylercurtis: I'd like to see the patch, if you're still here. | |||
[Coke] | even if his patch causes issues, jnthn's suggestion works also. | 18:14 | |
szabgab | good evening ppl | 18:15 | |
I just got the approval for a Perl booth at T-Dose in Eindhoven, Holland | |||
pmichaud | szabgab++ | ||
szabgab | They can also let us have some space for a Perl 6 hackathon | 18:16 | |
jnthn | szabgab: Nice | ||
szabgab | they told me they won't have a separate room but we can be in one side of the common space | ||
pmichaud | that works | ||
szabgab | I wonder if that would be ok for such thng | ||
pmichaud | in some sense being in the vicinity of others is a good thing :) | ||
jnthn | szabgab: Date? | ||
pmichaud | i.e., we want people to see us working and come and ask questions :) | ||
szabgab | I thought it could be even nice to show work and maybe get some people interested | 18:17 | |
pmichaud | jnthn: 6-7 Nov 2010 | ||
jnthn | ok | ||
szabgab | now I need to go out and ask for sponsorship | ||
[Coke] will be there, pending funding. =-) | |||
szabgab | but I'd like to get such commitments :) | ||
pmichaud | [Coke]: really, that's likely? | ||
[Coke] | pmichaud: that I get funding? hell no. | ||
pmichaud | [Coke]: if you had funding, you'd make it? | 18:18 | |
[Coke] | but "I won't go because I can't afford it" sounds much more negative. ;) | ||
18:18
am0c left
|
|||
szabgab | [Coke]: I am trying to organize funding for some people | 18:18 | |
PerlJam | pmichaud: do you have a way to fund him? :) | ||
pmichaud | PerlJam: I might.... but more to the point, szabgab is also looking for funding for such things. | 18:19 | |
szabgab | I have no idea if I mangage t get any money at all but I'd like to know who might come if we had the money :) | ||
jnthn | Heh. It's like, almost exactly a month after I'll be in that part of the world. | ||
szabgab | and how much funding they might need | ||
[Coke] | there are other hackers who should get funding before I do, but yah, I'd definitely consider it if money were no object. | ||
pmichaud | wow, I can get round-trip airfare for $730 | ||
jnthn | The date sounds weirdly familiar to me. I don't know why. | 18:20 | |
pmichaud | jnthn: I think it's been mentioned before here | ||
jnthn | Maybe that's why | ||
dalek | ok: 7af1026 | kthakore++ | README: added cache trick to readme |
18:21 | |
jnthn | It's a weekend. | ||
So unless I have to do stuff later on the Friday afternoon or first thing the Monday morning I could make it. | |||
18:21
Mowah joined
|
|||
jnthn | I think. | 18:21 | |
Ooh...this is why the date rings a bell. 2010.useperl.at/apw2010/ | 18:23 | ||
pmichaud | yes, that would do it. :) | ||
szabgab | oh my | ||
is that now their good date or bad date? | 18:24 | ||
jnthn | I hadn't particularly made plans to go beyond "ooh, there's a Perl event in a city I like" though :-) | ||
jdv79 | will there be any p6 action at ppw? | ||
pmichaud | looks like round-trip airfare is $830 for me after taxes and such | ||
18:24
risou_ joined
|
|||
jnthn | For me, I can probably get sleeper train tickets for < 100 EUR each way, then it's just somewhere to crash on the Saturday night. | 18:25 | |
pmichaud | I'll talk to my sponsors and see if they can get me there, if other p6'ers would be likely to make it :) | ||
18:25
risou left
|
|||
pmichaud | (or maybe szabgab++ will pull something off :) | 18:25 | |
18:26
amkrankruleuen joined,
Mowah left
|
|||
amkrankruleuen | Hello. | 18:26 | |
jnthn | pmichaud: I probably *can* arrange to be there. | ||
pmichaud | if any($masak, $moritz, $mberends) can also make it then it'd very likely worthwhile :) | ||
*it's | |||
that might be a good time for planning and seeing where things stand with the object-model changes | 18:27 | ||
jnthn | Aye | ||
TimToady | I'm planning to go the Hacker's Conference that weekend | ||
pmichaud | ...Hacker's Conference? | ||
moritz_ | highly doubtful; I'd love to, but I probably won't leave my pregnant wife alone | ||
colomon | moritz_++ | ||
jnthn | pmichaud: Yeah. I can likely make it without funding, but funding would make it easier. | 18:28 | |
pmichaud | I'll keep it in mind and see how things develop. | 18:29 | |
18:29
saaki joined
|
|||
szabgab | jnthn: 100 EUR funding I already have , if that's all what you need | 18:30 | |
and in Holland we can find space to sleep, I am sure | |||
moritz_ | wow, this is *very* old news, but still nice: www.theperlreview.com/Interviews/mj...50407.html MJD says "Sometimes I wish Perl's syntax were less verbose." | 18:31 | |
jnthn | szabgab: I can look into it a bit more after my vacation. | 18:32 | |
tylercurtis | O.o, git is being weird. It shows src/pmc/objectref.pmc as being unchanged, even though it is changed. | ||
pmichaud | objectref.pmc is a generated file | 18:33 | |
jnthn | tylercurtis: Oh...er...it may be a ...yes that :-) | ||
pmichaud | you likely want to change objectref_pmc.template | ||
jnthn | szabgab: I have a 25% discount card for the sleeper train to get me somewhere in Holland, even if it doesn't go through Eindhoven. | ||
szabgab: So can probably do it within not too much over that...the prices fluctuate. | 18:34 | ||
jnthn starts to make some noms | 18:35 | ||
tylercurtis is wondering whether he should run a spectest with the changes in objectref_pmc.template as well as directly changing objectref.pmc. | |||
pmichaud | yes | ||
in fact, should probably remove objectref.pmc and spectest from there. | |||
depending on how "safe" you want to be :) | 18:36 | ||
szabgab | jnthn, pmichaud [Coke] etc could you please add info about your possible participation to the wiki page at www.socialtext.net/perl5/index.cgi..._eindhoven ? | ||
18:37
dual joined,
jferrero left
|
|||
tylercurtis is remaking with objectref_pmc.template changed and objectref.pmc deleted. | 18:37 | ||
I'll make sure it still doesn't leak and then spectest. | |||
18:38
ruoso left
18:39
Mowah joined
|
|||
pmichaud | tylercurtis++ | 18:40 | |
18:41
jferrero joined
|
|||
jnthn | tylercurtis: Thanks :-) | 18:41 | |
tylercurtis | It doesn't appear to leak. Spectest time. | 18:43 | |
szabgab | T-Dose is a 150-200 ppl event, www.t-dose.org/t-dose/photos | ||
jnthn, pmichaud [Coke] CFP ends on 31 Aug www.t-dose.org/node/210 it would be nice to see a few Perl 6 related talks as well | 18:44 | ||
pmichaud | szabgab: noted, on my calendar | 18:45 | |
tylercurtis | Are there any good benchmarks (that take less time than spectesting with and without the change) I can run to make sure that it doesn't hurt performance? | ||
18:46
masak joined
|
|||
tylercurtis afk. | 18:46 | ||
masak | exalutations, #perl6! | 18:47 | |
avuserow | hallo masak! | 18:48 | |
jnthn | I'm sure you can a-test to it having been an eventful day. ;-) | ||
masak | jnthn: the day has indeed had events. | 18:49 | |
pmichaud | These are puns, right? Why is this channel so full of puns? ;-) | ||
masak | pmichaud: it's punful to read, isn't it? | ||
pmichaud | masak: especially using Parrot's current I/O implementation :-P :-P | 18:50 | |
[Coke] | szabgab: I find the thought of funding extremely unlikely so I'm just going to pass on that. Thanks, though. | ||
pmichaud | [Coke]: how about attending ppw in early october, ooc? | ||
masak | pmichaud: :) | ||
[Coke] | ppw is muuuch easier to swing out of pocket. | ||
18:51
Lorn left
|
|||
pmichaud | I know that kid51++ was interested in putting together an east-coast-ish event this fall, and rblackwell has also expressed strong interest in having something happen at ppw | 18:51 | |
szabgab | [Coke]: just for my education, how much financing would you need to be able to get there ? | 18:52 | |
to T-Dose | |||
18:53
Lorn joined
|
|||
masak | judging by irclog.perlgeek.de/cpan6sketch/2010-08-24 , there wasn't much interest in a #cpan6sketch today... :/ (or people forgot, or they were unable to come like I was) | 18:54 | |
but it's #phasers in ~5, right? | |||
jnthn | Yes, it appears so | ||
Well remembered! | |||
avuserow | what's #phasers? | 18:55 | |
aside from a channel | |||
jdv79 | set to stun | ||
avuserow | pew pew | ||
masak | avuserow: it's a weekly meeting for Perl 6 people. | ||
avuserow: you can come too if you're interested :) | |||
jnthn | We present the stunning work we've done in the previous week, and get each other fired up for the week to come. | ||
18:56
pmurias joined
|
|||
avuserow | sure, why not. I've been rumored to have written Perl 6 before :) | 18:56 | |
masak | jnthn++ # putting puns to good use! | ||
avuserow: you can write Perl 6 both <?before> and <?after> :) | 18:57 | ||
[Coke] | szabgab: nearest airport to endhoven? | ||
oh. there's one there. my travel site doesn't know it, though. ;) | |||
szabgab | maybe try Amsterdam | 18:58 | |
pmichaud | amsterdam or brussels are closest | ||
[Coke] | szabgab: ENOFLIGHTS. | ||
[Coke] finds that the difference between cost and total cost on the international flight is much greater than domestic. | 19:00 | ||
19:01
masak` joined
|
|||
[Coke] | looks like airfare alone is $850 mininum to get to amsterdam. if that helps. | 19:01 | |
sorear | I do not like <?before> | ||
19:02
masak`` joined
19:03
masak` left
19:04
masak`` left
19:05
masak left
|
|||
[Coke] | (I can get to PPW for 250 non-stop, which is a little nicer, and I can probably handle out of pocket.) | 19:05 | |
19:06
daxim left
|
|||
jdv79 | in the error trace "5071:CORE.setting" is referring what file? | 19:06 | |
*to | |||
sorear | src/gen/core.pm | ||
[Coke] | oooh, 102$ for a 13 hour train ride. ;) | 19:07 | |
szabgab | [Coke]: what train ride? | 19:10 | |
[Coke] | from albany NY to pittsburgh PA by way of NYC. | ||
szabgab | ah | ||
and yes, that filght ticket cost helps | |||
19:11
risou_ left
|
|||
szabgab | you might not be used to that but I constanltly have to pay similar prices from .il even to .eu | 19:11 | |
ok maybe "only" $600 | |||
pugssvn | r32102 | pmurias++ | [mildew-hoopl] transforming the AST into a hoopl graph | ||
pmurias | sorear: did you remove .gitignore files from src/perl6? | 19:14 | |
19:15
amkrankruleuen left,
bjarneh left,
bjarneh joined
19:17
amkrankruleuen joined
|
|||
moritz_ | sorear: do you think niecza should be added to the list of implementions that are run when you say 'perl6: say 1'? | 19:22 | |
tylercurtis is back and still spectesting. | 19:26 | ||
moritz_ | tylercurtis: do you run the tests in parallel? | 19:29 | |
tylercurtis | moritz_: I do not. How do I do that? | 19:30 | |
moritz_ | export TEST_JOBS=3 | 19:31 | |
tylercurtis will need to remember that in the future. | |||
moritz_ | and you need Test::Harness 3.16 or newer | ||
I just have it in my .bashrc | |||
19:35
bjarneh left
19:39
drake1 joined
|
|||
drake1 | Now the little (two days) perl program is complete. Preview: www.gangsterfreak.com/file:preview.png | 19:40 | |
x3nU | >gangsterfreak | 19:41 | |
lol | |||
19:42
am0c^ left
|
|||
tylercurtis | ooc, what modules are going to be in Rakudo (*+1)? | 19:42 | |
19:42
Mowah left
19:43
masak joined
|
|||
masak | jnthn: going on vacation tomorrow? whither? | 19:46 | |
jnthn | Night train to Munich, there for a night to hang out in beergardens, then on to the Austrian alps for several days, then on to Slovenia for several days there. :-) | 19:47 | |
moritz_ | sounds like good fun | 19:48 | |
jnthn | Central Europe FTW \o/ | ||
moritz_: Yes, those are some of my favorite bits of the world. :-) | |||
masak | jnthn: sounds very good indeed. enjoy. | ||
jnthn | Thanks, it should be very refreshing. :-) | 19:49 | |
szabgab | jnthn: will you be still in that area in the 2nd half of September? | 19:50 | |
jnthn | szabgab: No | ||
szabgab | :) | ||
jnthn | szabgab: Will be back in Sweden then | ||
szabgab | or :( | ||
we are trying to have a perl get together in Budapest with szbalint | 19:51 | ||
jnthn | Were I still in Blava, I'd have been able to pop down to that pretty easily. | ||
Sadly, ratehr further away now. | 19:52 | ||
19:53
slavik left
|
|||
drake1 | is pastebin.ca/1924527 perl6 compatible? | 19:55 | |
masak enjoys TimToady++'s hailstone sub in the backlog | 19:56 | ||
PerlJam | drake1: what does that mean? | ||
drake1: that looks like perl 5, so I'd say "no, it's not perl 6 compatible" | |||
drake1 | PerlJam: it means to project a character to a canvas | 19:57 | |
scaled times 10 | 19:58 | ||
time ten in both directions | 19:59 | ||
19:59
Italian_Plumber left
20:01
masak left
20:02
masak joined
|
|||
jnthn | .oO( masak's network is really uu.seless |
20:02 | |
masak | rakudo: say ~$_(5) given { $_, { $_ %% 2 ?? $_ / 2 !! $_ * 3 + 1 } ... 1 } | 20:03 | |
p6eval | rakudo 82c9e9: OUTPUT«5 16 8 4 2 1» | ||
20:04
Guest82435 left
|
|||
masak | jnthn: there used to be a file-sharing network called uu.suger.nu. various political forces made it change its name. it's now called du.suger.nu. :) | 20:04 | |
20:04
am0c^ joined
|
|||
jnthn | :) | 20:05 | |
masak | [backlog] we need to improve/nativize the set class to the point where we can answer all junction-as-set abuse FAQs/non-FAQs with "no, do this with a Set instead". | ||
tylercurtis | We can at least tell them to do hash-as-set abuse if Set isn't up to the task. | 20:06 | |
20:07
patrickas joined
|
|||
jnthn | masak: folks on #parrot are wondering about you :-) | 20:09 | |
moritz_ | 22:08 < nwellnhof> dukeleto: do you know if masak tried an unoptimized build? | ||
tylercurtis | About TT #1746 to be specific. | 20:10 | |
masak | in Perl 5, there's a nice pattern for creating "local APIs": one 'local'-declares a type glob with an anonymous sub in it. (grep cpansearch.perl.org/src/MIYAGAWA/We...Scraper.pm for 'local' for an example.) I miss this pattern in Perl 6 -- is there any way to do that, and still make the sub calls not look like &*ugly() ? | ||
jnthn: oh noes, one more IRC server to time out on... :/ | |||
masak heads over there | |||
TimToady | write a lexical pretty() that calls dynamic &*ugly() | 20:11 | |
moritz_ | rakudo: my &*x = -> {say 3 }; x() | ||
p6eval | rakudo 82c9e9: OUTPUT«Could not find sub &x in main program body at line 22:/tmp/IL01HhjZ00» | ||
masak | TimToady: the goal is to have the user of the library not add any boilerplate code. | 20:12 | |
TimToady | the library can define a routine and export it | 20:13 | |
masak | ooh | 20:14 | |
TimToady++ | |||
20:14
timbunce left
|
|||
masak | wicked. | 20:14 | |
20:14
xinming_ joined
|
|||
masak | I think &pretty would qualify as a trampoline. | 20:14 | |
20:14
_kaare left
|
|||
TimToady | someday it's probably just a macro | 20:15 | |
masak | because it jumps into itself, and then directly out to something else. | ||
TimToady | unless inlining gets good enough that you don't care | ||
masak | it's a dispatching adapter. | ||
20:16
timbunce joined
|
|||
jnthn | TimToady: I've concluded that I probably need to get Rakudo/NQP to inline protos sooner rather than later if I actually want to build primitive stuff in terms of Perl 6-ish multi dispatch, fwiw. | 20:16 | |
20:16
Guest82435 joined,
xinming left
|
|||
jnthn | TimToady: The extra invocation overhead only to immediately delegate kinda sucks. | 20:17 | |
masak | timbunce++ # twitter.com/carlmasak/status/22024364894 | ||
TimToady | a proto is sort of a wannabe macro | 20:18 | |
masak | TimToady: I'm not sure I like the {*} syntax in protos. I don't have any suggestions, just a general sense of too-much-magic uneasiness. | 20:19 | |
(I never liked the {*} in grammars either) | 20:20 | ||
TimToady | it's encapsulated magic | 20:21 | |
masak | lately, Perl 6 has shifted over from "eveybody wants the colon" to "everybody wants the asterisk" | ||
and TimToady seems to get it far more often than he got the colon. :P | |||
jnthn | Let's use {:} | ||
moritz_ | I guess they balance out these days | ||
jnthn | std: {:} | ||
p6eval | std 32102: OUTPUT«===SORRY!===Preceding context expects a term, but found infix : instead at /tmp/B0W4J11Qss line 1:------> {⏏:}Parse failedFAILED 00:01 116m» | ||
jnthn | It's free \o/ | ||
;-) | |||
masak | jnthn: :D | 20:22 | |
moritz_ | std: : | ||
p6eval | std 32102: OUTPUT«===SORRY!===Preceding context expects a term, but found infix : instead at /tmp/m4itHnwemv line 1:------> <BOL>⏏:Parse failedFAILED 00:01 116m» | ||
masak | I know it's encapsulated magic. and I see that its point is to avoid boilerplate as much as possible. | ||
moritz_ | what is infix : ? | ||
rakudo: say 1 : 2 | |||
TimToady | invocant marker | ||
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Confused at line 22, near "say 1 : 2"» | ||
masak | I'm just thinking if I don't actually prefer 'proto method bar { &?ROUTINE.multi-dispatch }' or some such. | ||
jnthn | masak: Not if you have to write it in every proto | 20:23 | |
tylercurtis | -1 to that. | ||
jnthn | masak: Take a look at | ||
TimToady | {*} if huffman coded | ||
*is | |||
and doesn't commit to the mechanism | |||
masak | yes, I acknowledge that. | ||
jnthn | the protos in github.com/jnthn/6model/blob/master...Setting.pm | ||
masak | TimToady: what happens if one does a {*} body with a multi or an only? | 20:24 | |
jnthn | I know i'd much rather type something shorter. :-) | ||
I'm not mad on {*} though. Unless we can add it as a single term. | |||
(or maybe that already happened) | |||
TimToady | STD more or less does that, though the block for a proto is specialer | ||
tylercurtis | +(0,1).pick to possibly replacing {*} with something else short. | ||
masak | {[+]} | 20:25 | |
jnthn | :P | ||
masak | :P | ||
TimToady | I kinda like the "call whatever" | ||
moritz_ | proto foo($a, $b) \o/; | ||
tylercurtis | masak: but how will I say that my proto ignores its multis and just returns 0 without making it too obvious, then? | 20:26 | |
masak | TimToady: maybe there could be a syntax wherein all multies are specified within the body of the proto? proto foo { multi foo(...) {...}; multi foo(...) {...}; ... } | ||
TimToady | how does that distribute over multiple lexical scopes? | 20:27 | |
especially if the proto is in the setting? | |||
masak | multies can still be added in lower lexical scopes, as usual. | ||
drake1 | shouldn't the console be able to render >> is the little unicode euivalent single numbered >> sequence? | ||
[particle] | {:P} | ||
masak | s/can/could/ | ||
drake1: sorry, I didn't understand the question? having rendering problems on the console? | 20:28 | ||
TimToady | drake1: you mean just arbitrarily convert every occurrence of >> to »? | ||
masak | drake1: that sounds like a problem with your console. | ||
drake1 | perl6 seems to understand the unicode for two >> in a single character | ||
TimToady | other way around | ||
the >> is a circumlocution that it takes to mean » most of the time | 20:29 | ||
but not everywhere | |||
drake1 | and the console could render two 8bit >'s in a row as xBB | ||
TimToady | std: $_ >> 3 | ||
p6eval | std : ( no output ) | ||
TimToady | I wouldn't want that | 20:30 | |
I'd rather know what's really there | |||
drake1 | me either | ||
TimToady | std: $_ >> 3 | ||
p6eval | std : ( no output ) | ||
PerlJam | $_ is much greater than 3? :) | ||
TimToady | why is std misbehaving regularly these days? | ||
moritz_ | TimToady: last time it did, there was no 'snap' subdirectory in src/perl6/ | 20:31 | |
drake1 | I don't even use " alot | ||
'' seems better | |||
moritz_ | they mean quite different things in perl | ||
drake1 | also in shell | ||
moritz_ | TimToady: ah, 'make clean' deletes snap. That's probably a bad idea | 20:32 | |
TimToady | that would do it | ||
drake1 | oh, this window renders '' and " exactly the same | ||
TimToady | as I said, you really want to know what's there underneath | ||
tylercurtis | rakudo: multi infix:«<<» ($a, $b){ $a ~ $b }; say 1 << 2; say 1 « 2; | ||
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at line 22, near "2; say 1 \x{ab}"» | ||
pugssvn | r32103 | moritz++ | [std] do not delete snap on "make clean" | 20:33 | |
masak | jnthn: I see you do lexpad indexing in github.com/jnthn/6model/commit/1fbc...5d610fca6c -- seems to be you're only using half of the benefits of doing so, though. | ||
TimToady | std: $_ >> 3 | ||
p6eval | std 32102: OUTPUT«===SORRY!===Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at /tmp/L2GV_4XKS_ line 1:------> $_ >>⏏ 3Check failedFAILED 00:01 117m» | ||
tylercurtis | rakudo: multi postfix:«<<» ($a){ $a ~ '<<'}; say 2<<; say 2«; | ||
jnthn | masak: I'm only ever using it in the binder ATM | ||
p6eval | rakudo 82c9e9: OUTPUT«===SORRY!===Confused at line 22, near "say 2\x{ab};"» | ||
jnthn | masak: Just didn't get to doing the rest yet. | 20:34 | |
tylercurtis | rakudo: multi postfix:«<<» ($a){ $a ~ '<<'}; say 2<<; | ||
p6eval | rakudo 82c9e9: OUTPUT«2<<» | ||
masak | jnthn: oh, ok. | ||
jnthn | masak: You're welcome to a commit bit though. ;-) | ||
masak | jnthn: I'm still in shock after a week of studying. but thanks :) | ||
jnthn | .oO( take the bait, take the bait... :-) ) |
||
:-) | |||
drake1 | IFS=.;echo \`''$*"\' | 20:35 | |
20:35
drake1 left
|
|||
masak .oO( nice to see other implementation catching up with Yapsi... :P ) | 20:36 | ||
20:36
Holy_Cow left
|
|||
jnthn | I don't KnowHOW I'll ever catch up with the official implementation though. | 20:36 | |
;-) | 20:37 | ||
TimToady | you just have to be officious | ||
moritz_ will be glad for a pun respite in jnthn's absence :-) | |||
masak | moritz_: don't count on it :P | ||
jnthn | Maybe I should set up a cron job that runs a Perl 6 script that visits IRC each day, makes a pun and leaves. :-) | 20:39 | |
TimToady | we'd have to break into your machine and perform an ap-pun-dectomy. | ||
masak .oO( puns, shoots and leaves ) | |||
tylercurtis | A hit-and-pun bot? | 20:41 | |
TimToady | .oO(shoot happuns...) |
||
.oO(if you haven't got a punny, and ha'punny will do...) |
20:42 | ||
pmurias | perl6: say 1 | 20:43 | |
p6eval | pugs, rakudo 82c9e9: OUTPUT«1» | ||
pmurias | masak: you could add niecza conditionally that is print out the output if it compiles | ||
PerlJam | TimToady: you've given more than your tuppunce today. | 20:44 | |
pmurias | masak: meant moritz_ | ||
TimToady | I've also got my come-uppunce. | ||
20:44
pmurias left
|
|||
masak | 'conditionally that [it] print out the output if it compiles' -- how is this different from any other p6eval target? | 20:45 | |
it's not like it can print out output if it doesn't compile. | |||
20:46
molaf left
|
|||
TimToady | std: say barf | 20:46 | |
masak | and it's not like it doesn't print out output when it compiles. | ||
p6eval | std 32103: OUTPUT«===SORRY!===Undeclared routine: 'barf' used at line 1Check failedFAILED 00:03 115m» | ||
[particle] | did you hear the one about the guy who walked into a bar and said, "foo!'? | ||
masak | [particle]: no. do tell. | ||
TimToady | did you hear about the marine that was rotten to the corps? | 20:47 | |
jnthn | Is it different from the one where a guy walked into a bar and said "ouch"? | ||
masak | that's odd, the sea is supposed to be good for you... | ||
jnthn | TimToady: <groan> :-) | ||
20:48
kirillm joined
|
|||
tylercurtis | Note to self: always pull before spectesting. | 20:48 | |
masak | let me change my mind: I like the {*} in protos. | 20:49 | |
it's very pretty. | |||
20:49
Italian_Plumber joined
|
|||
tylercurtis | patch for manual_attrs -> auto_attrs nopaste.snit.ch/23082: passes all spectest that Rakudo passed before I made the change. I'm going to spectest with HEAD + the patch now. | 21:01 | |
21:02
whiteknight joined
|
|||
diakopter | std: say | 21:08 | |
p6eval | std 32103: OUTPUT«Potential difficulties: Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/6by9whABnw line 1:------> say⏏<EOL>ok 00:02 114m» | ||
masak | \o/ dynamically scoped subs! it works! -- gist.github.com/548328 | 21:09 | |
diakopter | masak: does that mean man_or_boy.t can work? | 21:10 | |
masak | diakopter: oh, this is not Yapsi. this is still Rakudo. | ||
diakopter: just testing a feature I learned about today. | |||
diakopter | oh | ||
21:11
sftp left
|
|||
tylercurtis | Hmm... I'm getting "Did you run make in src/perl6? at STD.pm line 3." errors in the "perl viv --boot --clear-inc --inc lib --inc . -5 -o STD.pm5 STD.pm6" portion of STD's make at r32055. | 21:11 | |
masak | basically, we have more support for nice APIs/little langauges than I previously knew. | ||
diakopter | tylercurtis: did you run make in src/perl6? | 21:13 | |
oh, you're saying that's what you ran | |||
tylercurtis | Indeed. | ||
diakopter | hrm | 21:14 | |
tylercurtis: what os? | |||
tylercurtis | OS X 10.5 | ||
masak | [backlog] moritz_: re switching roles in fixing/reporting bugs... I think such an exercise would lead to many interesting results. I don't think greater throughput would be one of them, though. | 21:18 | |
21:18
Holy_Cow joined
|
|||
masak | Holy_Cow! \o/ | 21:18 | |
Holy_Cow: your nice suggests you're from .in -- are you? :) | 21:19 | ||
s/nice/nick/ | |||
Holy_Cow | no :( | ||
masak | ok. do you know Perl 6's top-level object type is called Mu? :) | 21:20 | |
PerlJam | don't scare away the spiritual bovine :) | 21:21 | |
21:22
timbunce left
|
|||
masak | it's interesting to note that both Data::Decycle (a fairly new CPAN module) and KiokuDB use a "protect these objects from going out of scope" refcount-increasing object pattern. | 21:26 | |
Perl 6 won't need that. | |||
21:28
timbunce joined
|
|||
sorear | masak: ip2location.com is your friend | 21:29 | |
masak tries | 21:30 | ||
21:30
jferrero left
|
|||
tylercurtis | sorear: ooc, why does viv --boot put $FindBin::Bin ~ "/boot" (obviously not the actual code) in @INC? | 21:32 | |
masak | Holy_Cow: ah. Kansas. never been there, but I can see cows being quite revered there too. | ||
sorear | tylercurtis: because the bootstrap versions of STD.pmc and Cursor.pmc are kept in src/perl6/boot | 21:33 | |
tylercurtis | Ah, I see why STD wasn't building for me, now. | 21:34 | |
Holy_Cow | in a very different way | 21:35 | |
tylercurtis | Well, actually, I don't really understand. But I'm pretty sure I know how to fix it. | ||
21:35
Guest82435 left
21:36
timbunce left
21:39
azert0x left
|
|||
tylercurtis | $FindBin::Bin was being set to ~/bin where I had a script named "viv" that set up the necessary environment variables and ran viv. | 21:39 | |
21:42
rgrau_ left
21:43
wamba left
|
|||
masak | in 'enum Month <January February ...>', it'd be kinda nice to be able to define a cyclical range such that 'December .. February :wrap' (modulo the name of :wrap) gave (December, January, February). | 21:55 | |
though Rakudo doesn't have operator adverbs yet. | 21:56 | ||
sorear | range :to is gone | ||
why :wrap | |||
jnthn | masak: 1..12 xx * | 21:57 | |
21:57
tadzik joined
|
|||
tadzik | 'evening | 21:57 | |
jnthn | May cut it | ||
[particle] | True .. False | ||
masak | sorear: because an ordinary range of that kind would be empty. | ||
jnthn | masak: Or something like that. | ||
masak | jnthn: not as short/nice syntactically. | ||
this is a case where I'd actually like an adverb. it doesn't have to be core, though. | 21:58 | ||
21:58
Holy_Cow left
|
|||
masak | there will be modules. | 21:58 | |
jnthn | :-) | ||
masak | I could also picture the .. :wrap construct being of good use in array slices. | 22:00 | |
once we can parameterize arrays over enums a la S09, I mean. | 22:01 | ||
22:02
pyrimidine left
|
|||
masak | I tend to think of S09 as The Last Big Unrealized (Original) Synopsis. | 22:04 | |
jnthn | Yes, there's quite a lot to take on in there. | 22:05 | |
masak | quite a lot of sugar that would lead to nicer scripts/programs. | ||
a bit like typing does/will. | |||
22:06
shade\ left
|
|||
jnthn | I really need to the whole S09 again sometime soon. | 22:06 | |
22:07
tadzik left
|
|||
masak | I should try and write some code that assumes S09 is here. would make for an interesting exercise. | 22:07 | |
22:08
shade\ joined
22:09
am0c^ left
22:21
xinming joined
22:22
jferrero joined
22:23
xinming_ left
22:30
alester left
22:31
patrickas left
|
|||
tylercurtis | Wow. Niecza supports threads. | 22:37 | |
masak | sorear++ | 22:38 | |
jnthn | I can't wait to get Rakudo on a VM that does that too. | ||
masak | I'd like to add www.cs.ubc.ca/local/reading/proceed...e063ah.pdf to @interesting-papers and also point out that I'd consider it a privilege and a pleasure to do grant work at some point in the future optimizing the heck out of nqp-rx or equiv with techniques like this. | 22:39 | |
22:42
shade\ left
22:45
awwaiid joined
22:46
Italian_Plumber left
22:47
shade\ joined
|
|||
jnthn | masak: Looks interesting. | 22:58 | |
TimToady | star: sub dif (@all [$, *@tail]) { @tail Z- @all }; say ~dif([1,2,3,4]) | ||
p6eval | star 2010.07: OUTPUT«1 1 1» | ||
masak | ooh | ||
TimToady | "forward difference" | 22:59 | |
old one used map and slicing | |||
masak | TimToady: is there a source/reason for all of these all of a sudden? | ||
TimToady | I'm trying to avoid working on important stuff :) | ||
so I thought I'd take a pass through the rosettacode site | |||
masak | that nested signature trick is worth remembering. | 23:00 | |
it's quite Prolog-y. | |||
jnthn | Hey, neat. | 23:01 | |
I hadn't thought of using them for that. :-) | |||
TimToady | rosettacode.org/wiki/Forward_difference#Perl_6 | ||
but the hilighting is a bit lame | |||
tylercurtis | looks like the auto_attrs patch passes all the tests that HEAD does. | 23:04 | |
masak | TimToady: yeah, someone ought to write a Perl 6 parser. :P | ||
TimToady | tylercurtis: \o/ | 23:05 | |
masak | rakudo: &f = {say $^s, $^s.perl;}; f "\&f = \{say \$^s, \$^s.perl;}; f " # quine | 23:06 | |
p6eval | rakudo 82c9e9: OUTPUT«Could not find sub &f in main program body at line 22:/tmp/KM5_7LUBzo» | ||
23:06
amkrankruleuen left
|
|||
masak | rakudo: my &f = {say $^s, $^s.perl;}; f "my \&f = \{say \$^s, \$^s.perl;}; f " # quine | 23:06 | |
p6eval | rakudo 82c9e9: OUTPUT«my &f = {say $^s, $^s.perl;}; f "my \&f = \{say \$^s, \$^s.perl;}; f "» | ||
masak updates rosettacode.org/wiki/Quine#Perl_6 | |||
23:07
thundergnat joined
|
|||
masak | ...and for 'most impressive and anticlimatic nick of the day', I nominate... thundergnat! :) | 23:09 | |
TimToady | star: sub dif (@all [$, *@tail]) { @tail Z- @all }; sub difn2 ($a, $n) { ($a, &dif ... *)[$n] }; say ~difn2([1,2,3,4],2) | ||
p6eval | star 2010.07: OUTPUT«0 0» | ||
23:11
smash_ left,
smash_ joined
|
|||
thundergnat | rakudo: my ($i, $j); for (1..5) {print $i //= $j+=5; $i++; print ",$j "} | 23:11 | |
p6eval | rakudo 82c9e9: OUTPUT«5,5 6,10 7,15 8,20 9,25 » | ||
thundergnat | Is that a bug or a feature? | 23:12 | |
masak | looks like a feature. | ||
could you be more specific? :) | |||
thundergnat | I would have expected 5,5 6,5 7,5 8,5 9,5 | ||
masak | why? you're not resetting $j between iterations. | 23:13 | |
thundergnat | It is not short circuiting the || | ||
TimToady | looks like a bug to me | ||
masak | oh! | ||
thundergnat | er // | ||
masak | thundergnat++ | ||
masak submits rakudobug | |||
TimToady | pugs: my ($i, $j); for (1..5) {print $i //= $j+=5; $i++; print ",$j "} | ||
thundergnat | actually, same for || | ||
p6eval | pugs: OUTPUT«5,5 6,5 7,5 8,5 9,5 » | ||
TimToady | pugs has it correct | ||
masak | aye, those should be thunks. | ||
23:13
flatwhatson joined
|
|||
masak | thundergnat: you've just contributed to the Perl 6 effort. +1 level. :) | 23:14 | |
thundergnat | glee!! | ||
masak | \o/ | ||
TimToady | you now have 3 hit points | ||
masak | wow, that's... not a lot. | ||
23:14
lestrrat is now known as lest_away
|
|||
masak | we need to be nice to the newbie. | 23:14 | |
TimToady | go easy on the thundergnat | 23:15 | |
23:17
smash_ left,
smash_ joined
23:21
smash_ left
23:22
fod joined
23:25
ispeak_ joined
23:27
dual left
|
|||
TimToady | rakudo: my @a = 1,2,3,4; say @a[1..*] | 23:31 | |
p6eval | rakudo 82c9e9: OUTPUT«(timeout)» | ||
TimToady | rakudobug | ||
masak submits | 23:32 | ||
23:33
Italian_Plumber joined
23:34
rgrau_ joined,
dual joined
|
|||
TimToady | kills the 99 bottles of beer example :) | 23:36 | |
jnthn | OH NOES! | ||
Wait, does this bug mean the beer goes on infinitely? :-) | |||
TimToady | it means you never get to the beer | 23:37 | |
masak | jnthn: no, because of the timeout the beer... what TimToady said. | ||
TimToady | always winter, and never christmas | ||
jnthn | :'( | ||
rakudo: my @a = 1,2,3,4; say @a[1..Inf] | 23:39 | ||
masak | rakudo: my ($i, $j); for (1..5) {print $i ||= $j+=5; $i++; print ",$j "} | ||
p6eval | rakudo 82c9e9: OUTPUT«(timeout)» | ||
rakudo 82c9e9: OUTPUT«5,5 6,10 7,15 8,20 9,25 » | |||
jnthn | rakudo: my @a = 1,2,3,4; say @a[1..*-1] | ||
p6eval | rakudo 82c9e9: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode' in 'Cool::Numeric' at line 1745:CORE.setting in 'Cool::Numeric' at line 1746:CORE.setting in 'Range::new' at line 4676:CORE.setting in 'infix:<..>' at line 4739:CORE.setting in main program body at line | ||
..22:/tmp/W… | |||
jnthn | ew er | ||
masak | :/ | ||
jnthn | Why on earth does Cool::Numeric show up twice in the backtrace? | 23:40 | |
masak | multi delegation? | ||
masak submits rakudobug for that, too | 23:43 | ||
jnthn | Doesn't look very delegatory to me. | 23:46 | |
masak | then I have no idea why. | ||
backtrace printer bug? | |||
jnthn | yeah, that's what I'm fearing | 23:47 | |
Feel free to file it, I can take a look when I'm back. | |||
23:55
ispeak_ left
23:57
risou joined
|