»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
masak | 'night, #perl6 | 00:08 | |
TimToady | o/ | 00:09 | |
00:22
MayDaniel left
00:23
benabik joined
00:31
PacoAir left
00:37
alester left
00:48
fridim_ joined
00:50
leprevost joined
01:02
scott__ joined,
leprevost left
01:06
woosley joined
01:19
Patterner left
01:20
Psyche^ joined
01:22
Psyche^ is now known as Patterner
01:26
packetknife left
01:41
lestrrat joined
|
|||
sorear | good * #perl6 | 01:47 | |
araujo | sorear, o/ ! | 01:54 | |
02:22
Patterner left
02:30
leprevost joined,
leprevost left,
lestrrat left
02:31
lestrrat joined
02:35
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
colomon | \o | 02:43 | |
03:09
whiteknight left
03:32
orafu joined
03:34
wolfman2000 joined
03:47
lutok left
03:48
pernatiy joined
03:54
jtpalmer joined
04:07
y3llow left,
y3llow joined
04:32
mucker joined
04:41
wolfman2000 left
04:57
Trashlord left
04:58
Trashlord joined
05:03
birdwindupbird joined
05:26
sftp left
05:29
birdwindupbird left
05:54
birdwindupbird joined
|
|||
moritz | \o | 05:57 | |
TimToady | yo | ||
araujo | o/ | 05:58 | |
moritz | nqp: 1.?foo(); | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "1.?foo();"current instr.: 'nqp;HLL;Grammar;panic' pc 23433 (src/stage2/gen/NQPHLL.pir:6734) (src/stage2/gen/NQPHLL.pm:329)» | ||
Teratogen | nqp: say 1 + 1 | 06:02 | |
p6eval | nqp: OUTPUT«Confused at line 1, near "say 1 + 1"current instr.: 'nqp;HLL;Grammar;panic' pc 23433 (src/stage2/gen/NQPHLL.pir:6734) (src/stage2/gen/NQPHLL.pm:329)» | ||
Teratogen | what the | ||
moritz | nqp doesn't parse listops | 06:03 | |
needs parens around a sub call | |||
Teratogen | nqp: (say 1+1) | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "(say 1+1)"current instr.: 'nqp;HLL;Grammar;panic' pc 23433 (src/stage2/gen/NQPHLL.pir:6734) (src/stage2/gen/NQPHLL.pm:329)» | ||
Teratogen | I give up | ||
benabik | Teratogen: Around the arguments | ||
nqp: say(1+1) | |||
p6eval | nqp: OUTPUT«2» | ||
Teratogen | oh | 06:04 | |
=D | |||
06:07
Tarmvred joined
06:10
kaleem joined
06:12
mikemol left,
amirite joined
|
|||
sorear | (say 1+1) | 06:13 | |
sorear hugs Teratogen, good Lisp user | |||
Teratogen | haha | ||
nqp: (say (1+1) | 06:14 | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "(say (1+1)"current instr.: 'nqp;HLL;Grammar;panic' pc 23433 (src/stage2/gen/NQPHLL.pir:6734) (src/stage2/gen/NQPHLL.pm:329)» | ||
Teratogen | nqp: (say (1+1)) | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "(say (1+1)"current instr.: 'nqp;HLL;Grammar;panic' pc 23433 (src/stage2/gen/NQPHLL.pir:6734) (src/stage2/gen/NQPHLL.pm:329)» | ||
Teratogen | baw | ||
06:14
amirite left
06:16
Woodi joined
|
|||
benabik | nom: (say ([+] 1, 2, 3)) | 06:17 | |
p6eval | nom f9fcb2: OUTPUT«6» | ||
moritz | nom: (say (&infix:<+> 1, 2, 3)) | 06:21 | |
p6eval | nom f9fcb2: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2» | ||
moritz | nom: (say (infix:<+> 1, 2, 3)) | ||
p6eval | nom f9fcb2: OUTPUT«===SORRY!===CHECK FAILED:Calling 'infix:<+>' will never work with argument types (int, int, int) (line 1) Expected any of: :(Any $x = { ... }) :(Any \$a, Any \$b) :(Real \$a, Real \$b) :(Int:D \$a, Int:D \$b) :(int $a, int $b) :(Num:D \$a… | ||
moritz | nom: (say (infix:<+> 1, 2)) | ||
p6eval | nom f9fcb2: OUTPUT«3» | ||
benabik | moritz++ | 06:22 | |
sorear | niecza: (say (infix:<+> 1, 2)) # cuirous | 06:24 | |
p6eval | niecza v14-42-g1d02da9: OUTPUT«3» | ||
Teratogen | can you do postfix in perl? | 06:27 | |
err, perl 6? | 06:28 | ||
moritz | Teratogen: yes, see S03 | ||
sorear | "no, you would need async I/O and better socket support to emulate postfix in perl 6" | ||
++ is a postfix operator | |||
moritz | I thought ++ was a prefix operator :-) | 06:29 | |
sorear | niecza: my $x = 3; say postfix:<++> $x; say $x | ||
p6eval | niecza v14-42-g1d02da9: OUTPUT«34» | ||
sorear | it's that too | ||
Teratogen | cool | ||
perl 6 does everything | |||
it's like perl + lisp + forth | |||
TimToady | .oO(+ Java + Haskell + BASIC + JS + ...) |
06:30 | |
sorear | meh, without homoiconicity perl 6 will never be lisp, and without the ability to run on PIIs (never mind 8085s) Perl 6 will never be Forth | ||
TimToady | if homoiconicity were the right thing, we'd work directly with DNA, not proteins :P | ||
sorear | oh, TimToady, that reminds me - JavaScript "var foo", Perl5 "my $foo" have strikingly similar semantics. Who stole what from whom? | 06:31 | |
TimToady | we certainly didn't steal it from them | ||
sorear | (apologies if I asked this earlier and forgot) | ||
sorear expects to get an answer like "both got it from $obscure_60s_mainframe_scripting_language" | 06:32 | ||
TimToady | well, Pascal had 'var', if I recall | ||
sorear | did pascal allow you to use "var" as an expression? | 06:33 | |
Teratogen | speaking of obscure mainframe, I used to do multics pl/1 when I was at the Pentagon. | 06:34 | |
sorear | what I really picked up on was that Perl 5 and JS don't really have initializers. "my $foo" is an lvalue expression | ||
Teratogen: then you'll fit right in here. | |||
Teratogen | I had an honest to god VT-100 terminal on my desk. | ||
and I set it to 132 column mode! | |||
I also had a Tektronix 4014 next to my desk, and I used pl/1 to write fractal programs to display on the 4014. | 06:35 | ||
sorear | likewise "var foo = 5" means "(var foo) = 5" | ||
Teratogen | Those were the days! | ||
TimToady | in Pascal, var just introduce the section where you declare variables | 06:36 | |
benabik | In my uni machine room, we have a VT-100 that's a serial terminal to all the servers. | ||
TimToady | *duced | ||
Teratogen | benabik, yes but is it an actual DEC VT-100, or some knockoff clone? | ||
TimToady | how fancy; my first CRT was a VT05 | ||
72x20, uppercase only | 06:37 | ||
benabik | Teratogen: I think it's a real one... I'll have to check when I work next. | ||
Teratogen | Before the VT-100 was the VT-52 I think. | ||
It's bell was a bzzzzzzzzzzzt noise. | |||
TimToady | the VT05 was much longer than it was wide | 06:38 | |
Teratogen | TimToady, I also worked with Decwriters. | ||
They were great serial terminal/printers. | |||
And built like a tank. You could probably drop one off a cliff and it would still work. | |||
sorear | vt100 probably wouldn't survive much of a fall, being made of glass and all that... | 06:39 | |
TimToady | well, the VT05 was much nicer than the ASR33 I used before that... | 06:40 | |
the benefits of actually working for the computer center | |||
sorear is, erm, 2e1 | 06:41 | ||
TimToady | I thought you were 2.1e1 | ||
moritz | O(2e1) :-) | ||
sorear | closer to 2.13e1, but that's just precision | ||
Teratogen | ASR33 was a teletype with a side order of paper tape, right? | 06:42 | |
TimToady | yup, 10 characters per second | ||
and LOUD | |||
Teratogen | We had those in high school, along with 300 baud modems with cups on them. | 06:43 | |
When we ran out of paper we'd steal rolls of paper towels from the bathroom. | |||
sorear | did people ever use hearing protection in your computer installation(s)? | ||
TimToady | eh, what did you say? | ||
sorear | you said LOUD not BRIGHT :P | ||
Teratogen | We used the 300 baud modems to connect to an HP 2000 minicomputer downtown. | 06:44 | |
They would run HP timesharing basic during the day then shut that down so they could run card fortran at night. | |||
HP timesharing basic had the coolest name for the substring function: SST. =D | 06:45 | ||
TimToady | used to be, when the lights flickered, I'd call up the computer's modem bank and whistle at it; if it whisled back, I knew the computer was still up; if not, I knew I'd better head to the computer center | ||
Teratogen | The Concorde SST was just making its maiden flight around then, I think, so that was pretty cool. | ||
TimToady | our boss in the computer center used to work for HP, but had to switch to DEC when he came :) | ||
sorear | TimToady: you could hit a tone the modems understood? | 06:46 | |
TimToady | I could warble the tone appropriately enough by poking my cheek | ||
sorear is quite impressed | 06:47 | ||
TimToady | a 110 baud modem is not difficult to fool | ||
Teratogen | I wrote an hp timesharing basic program that would print large letters on paper tape, some idiot from central high school broke into our account, stole my program, and put his name on it. | ||
plagiarization! | |||
so one of my friends broke into central high school's account, and deleted all their files. | 06:48 | ||
TimToady | you should be flattered | ||
Teratogen | BUT HEY IT WAS ALL IN GOOD FUN! | ||
high school rivalry you know | |||
Let's see what else, I was an explorer scout that was hosted by Honeywell so I got to play around with GCOS. | 06:49 | ||
And in college we had a hulking Univac 1108. | 06:50 | ||
sorear | Teratogen: where in the world was this? | 06:51 | |
Teratogen | Arizona | ||
TimToady | the first time I played adventure was on a DECSYSTEM-20 in the lobby of the DECUS convention in Las Vegas at the MGM Grand Hotel that eventually burned and kill 85 people | ||
sorear | I suppose there is probably more than one "Central High" in the US, huh | ||
Teratogen | and later on, I was stationed at the Pentagon (those were the Multics years) | ||
06:51
takesako joined
|
|||
TimToady | where I grew up it meant Central Kitsap County | 06:51 | |
06:52
replore_ joined
|
|||
sorear | Did it do the burning and the killing during DECUS? | 06:52 | |
TimToady | I've programmed in Pascal on an Amdahl, and in Algol on a Burroughs mainfraim | ||
Teratogen | Although I also got to play around with the first 16 bit computers to arrive at the Pentagon, the Zenith Z-100 and Z-150. | ||
TimToady | sorear: nah, that wasn't till 1980 | 06:53 | |
sorear | first computer I used ... | ||
a 486 running Windows 3.11 *lameness* | |||
Teratogen | Let's see, I was in high school in the early 1970s, my first computer was the HP-2000. | ||
My first personal computer was an Atari ST. | 06:54 | ||
TimToady, there was an Algol compiler for the HP-2000, I never fooled around with it, but my friend (the one who deleted central high school's files) wrote a few programs for it. | 06:55 | ||
06:57
takesako left,
wtw joined
06:58
takesako joined
|
|||
TimToady | the first thing I ever programmed had nixie tubes for a display | 06:58 | |
Teratogen | sorear, Windows 3.1 with Trumpet Winsock and Netscape Navigator on a 28.8k modem was actually pretty peppy back in the day. | 06:59 | |
06:59
zby_home left
|
|||
dalek | kudo/sink: 5081a51 | moritz++ | src/ (3 files): Apply traits in sink context ... except in Perl6::World, where if pir::can__IPs($ret, 'sink') { $ret.sink } mysteriously dies because it can't find method sink in Associative. WTF. Also doesn't fix 'use Test;'. Not sure what else is missing. |
07:00 | |
TimToady is looking forward to seeing "Useless use of" warnings from rakudo soon | 07:01 | ||
Teratogen | Or, "Usage is deprecated" ? | ||
TimToady | those aren't so useful | 07:02 | |
eval: use warnings; 1 + rand; 0 | |||
buubot_backup | TimToady: Useless use of addition (+) in void context at (eval 20) line 1. 0 | ||
TimToady | eval; print (1+2),3 | 07:03 | |
buubot_backup | TimToady: 33 | ||
TimToady | eval: print (1+2),3; 0 | 07:04 | |
buubot_backup | TimToady: 30 | ||
TimToady | eval: use warnings; print (1+2),3; 0 | ||
buubot_backup | TimToady: print (...) interpreted as function at (eval 20) line 1. Useless use of a constant (3) in void context at (eval 20) line 1. 30 | ||
TimToady | eval: use warnings; my $a = 1,2; 0 | 07:05 | |
buubot_backup | TimToady: Useless use of a constant (2) in void context at (eval 20) line 1. 0 | ||
TimToady | very much more useful than mere deprecations; Useless use warnings often point out a misunderstanding of syntax or precedence | 07:06 | |
Teratogen | I that's right, it is Java that has all of those deprecated classes. =) | ||
07:08
raoul joined
|
|||
moritz | if we want to be able to generate such useelss use warnings, we need purity annotations or analysis | 07:12 | |
TimToady | but you need that for constant folding anyway | ||
moritz | well | 07:13 | |
07:13
Woodi left
|
|||
moritz | it's not that easy | 07:13 | |
what would you expect from class A { ... }; A.new() + 1 ? | 07:14 | ||
07:14
Woodi joined
|
|||
moritz | always warn? only warn if A.Numeric can be determined to be pure? never warn? | 07:14 | |
TimToady | I would expect + to know it's pure, even if A isn't | ||
moritz | then it doesn't use the same kind of purity information as the constant folder | 07:15 | |
TimToady | the constant folder needs to know more, sure | ||
07:16
mucker left
|
|||
TimToady | but the purity of + is one of things it needs to know | 07:16 | |
moritz | well, not all + candidates are really pure, which is what I'm trying to say :-) | 07:17 | |
TimToady | then they probably violate the purity declared on the proto, assuming it's declared there, and assumed part of the API of all + operations | ||
sorear | writing impure .Numeric methods is erroneous, so the compiler sould warn | 07:18 | |
after all, nowhere do we spec the number of times .Numeric is called by a given compound operation | |||
moritz | sorear: that doesn't make writing an impure .Numeric operation errornous | ||
just very stupid | |||
TimToady | I'm fine with outlawing impure operations derived from pure protos | 07:19 | |
or at least, forcing the declarator of such to work harder | |||
like, by providing a less pure proto | |||
I much prefer people to come up with new operators than to overload existing ones with bogus and unexpected semantics | 07:20 | ||
Teratogen | <@-^-@> | 07:21 | |
I have no idea what that does. | |||
But it would be a cool operator. | |||
moritz | nom: say <@-^-@> | ||
p6eval | nom f9fcb2: OUTPUT«@-^-@» | ||
sorear | Teratogen: <...> is quote syntax, trampling on that with an operator is considered mildly unkind | 07:23 | |
moritz | well | ||
there's also < as an infix | |||
and < ... > as a postcircumfix | |||
TimToady | perl6: sub infix:['<@-^-@>'] ($a, $b) { @$a (^) @$b }; say <a b c> <@-^-@> <b c d> | 07:24 | |
moritz | so we already have 3 uses; adding more would be quite confusing | ||
p6eval | rakudo f9fcb2: OUTPUT«===SORRY!===Preceding context expects a term, but found infix ^ instead at line 1, near ") @$b }; s"» | ||
..niecza v14-42-g1d02da9: OUTPUT«set(a, d)» | |||
..pugs b927740: OUTPUT«***  Unexpected ":['<@-^-@>']" expecting "::", "handles", "is", bare trait, subroutine parameters, trait or block at /tmp/hmRx5XM_7K line 1, column 10» | |||
TimToady | niecza++ | ||
Teratogen | yikes! | ||
moritz | in rakudo you currently need to write infix:«...» for that | ||
TimToady | perl6: sub infix:«<@-^-@>» ($a, $b) { @$a (^) @$b }; say <a b c> <@-^-@> <b c d> | ||
p6eval | pugs b927740: OUTPUT«decodeUTF8': bad data: '\171'decodeUTF8': bad data: '\187'***  Unexpected "(^)" expecting operator or "}" at /tmp/Vznq2HX7wJ line 1, column 36» | ||
..niecza v14-42-g1d02da9: OUTPUT«set(a, d)» | |||
..rakudo f9fcb2: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2» | |||
TimToady | but rakudo doesn't have the Set op yet, alas | 07:25 | |
moritz | and maybe it also doesn't LTM enough | ||
TimToady | I think it probably does... | ||
perl6: sub infix:«<@-^-@>» ($a, $b) { @$a ~ " and " ~ @$b }; say <a b c> <@-^-@> <b c d> | 07:26 | ||
p6eval | pugs b927740: OUTPUT«decodeUTF8': bad data: '\171'decodeUTF8': bad data: '\187'*** No such subroutine: "&infix:@-^-@" at /tmp/ow_srTtqa4 line 1, column 59 - line 2, column 1» | ||
..rakudo f9fcb2: OUTPUT«===SORRY!===Non-declarative sigil is missing its nameat /tmp/fiKr62pYu9:1» | |||
..niecza v14-42-g1d02da9: OUTPUT«a b c and b c d» | |||
TimToady | well, maybe not | ||
Teratogen: but you see why LTM (longest token matching) is so essential to the extensibility of Perl 6 | 07:27 | ||
Teratogen | Not really, because I don't know what LTM is. =) | ||
TimToady | which is why I defined it in parens | ||
Teratogen | is it like greedy regular expression matching? | ||
TimToady | yes, like that | 07:28 | |
whenever the grammar has a set of alternative tokens, it picks the longest first | |||
so more to do with what it does over | than it does with * | |||
but similar notion | |||
Teratogen | Maybe I am old fashioned and showing my age here, but I wish Perl 6 would have included a plain old text preprocessor, like the one C language has. *sigh* | 07:29 | |
TimToady | when we say "infix" it is really identifying an alternation that happens to be named rather than using | | ||
Teratogen | I know Perl 6 has a super duper macro preprocessor of some sort. | 07:30 | |
TimToady | well, yes, except for the "pre" part, which is evil | ||
Perl 6 is very strict about doing one-pass parsing | |||
sorear | Perl 6 is supposed to include everything but the kitchen sink ... that includes a Filter::Util::Call replacement | ||
s/include/make possible/ | 07:31 | ||
TimToady | the problem with multi-pass parsing is that the input language and the output language are two different languages, which confuses people no end | 07:32 | |
not to mention theparser | 07:33 | ||
the only way for a parser to know exactly which language it's parsing at any point is to do it one pass | 07:34 | ||
anything else ends up being a form of russian roulette | |||
jnthn | morning, #perl66 | 07:35 | |
TimToady | you think you're getting away with it, and having fun, till you don't, and aren't | ||
o/ | |||
07:35
mj41 joined
|
|||
jnthn | ooh, sticky 6 key... | 07:36 | |
TimToady | as long as it doesn't stick more than that, nobody will mistake you for the antichrist | ||
hmm | 07:38 | ||
perl6: sub infix:«<\@-^-\@>» ($a, $b) { @$a ~ " and " ~ @$b }; say <a b c> <@-^-@> <b c d> | |||
p6eval | rakudo f9fcb2: OUTPUT«===SORRY!===Non-declarative sigil is missing its nameat /tmp/d2oEDh6Vxa:1» | ||
..niecza v14-42-g1d02da9: OUTPUT«a b c and b c d» | |||
..pugs b927740: OUTPUT«decodeUTF8': bad data: '\171'decodeUTF8': bad data: '\187'*** No such subroutine: "&infix:@-^-@" at /tmp/5qdwbLarWE line 1, column 61 - line 2, column 1» | |||
TimToady | I guess it's not a problem of interpolating insice «», or a different problem | 07:39 | |
perl6: sub infix:<\<@-^-@\>> ($a, $b) { @$a ~ " and " ~ @$b }; say <a b c> <@-^-@> <b c d> | 07:40 | ||
p6eval | niecza v14-42-g1d02da9: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at /tmp/dSv3zN2sS9 line 1:------> ) { @$a ~ " and " ~ @$b }; say <a b c> <⏏@-^-@> <b c d>Use of uninitialized value in string context at /home/p6eval/niecza/b… | ||
..pugs b927740: OUTPUT«***  Unexpected "infix" expecting "=", subroutine parameters, trait or block at /tmp/txZxhMdPBl line 1, column 5» | |||
..rakudo f9fcb2: OUTPUT«===SORRY!===Non-declarative sigil is missing its nameat /tmp/KxFGJ0mcUH:1» | |||
jnthn | yay, my favorite coffee machine is working again today... | ||
TimToady | hmm, that oughta work, methinks | ||
cognominal___ | Tdratogen: one of the problem with preprocessors is that you can't stack them because they suppose they parse a instance of the original language.when the very purpose of them is to change it. | ||
TimToady | perl6: sub infix:<< <@-^-@> >> ($a, $b) { @$a ~ " and " ~ @$b }; say <a b c> <@-^-@> <b c d> | 07:42 | |
cognominal___ | the fashion for source filters did not last in Perl 5 | ||
p6eval | pugs b927740: OUTPUT«*** No such subroutine: "&infix:@-^-@" at /tmp/TkcixSjT5y line 1, column 63 - line 2, column 1» | ||
..rakudo f9fcb2: OUTPUT«===SORRY!===Non-declarative sigil is missing its nameat /tmp/6GVRdsDUit:1» | |||
..niecza v14-42-g1d02da9: OUTPUT«a b c and b c d» | |||
sorear | o/ jnthn | 07:44 | |
Teratogen | perl 5 had -P =P | ||
I wonder who added THAT | |||
sorear | most likely TimToady sometime around Perl 2.0 | 07:45 | |
Teratogen | actually | ||
sorear | several other languages from Perl's ecological niche support using the C pre-processor even when nothing like C | ||
Teratogen | Perl 5 HAS -P. | ||
sorear | right, Perl 5 people hate removing features. | 07:46 | |
Teratogen | Of course it usually doesn't work on Windows, because there is no C Preprocessor on Windows (usually). | ||
sorear | there was a riot earlier this week over the fact that 5.16 removes defined(@array) | ||
do you want to guess when it was formally deprecated? | |||
jnthn | Last millenium? :) | 07:47 | |
doy | $ perl -P # Unrecognized switch: -P (-h will show valid options). | ||
? | |||
sorear | jnthn: very good! 1998, 5.005_something | ||
Teratogen | doy, what the | 07:48 | |
-P has been removed from Perl!? | |||
sorear | my Debian-shipped 5.12.0 also fails -P | ||
sorear half-guesses doy is on 5.16 or bleadperl | 07:49 | ||
doy | looks like it was deprecated in 5.10 and removed in 5.12 | ||
(i'm on 5.14.2) | |||
we're really trying to start removing things these days | |||
convincing people is hard, but we're trying | 07:50 | ||
(: | |||
Teratogen | Why not integrate a text preprocessor into Perl 5.10+? | ||
It would make it two-pass, but hey, preprocessors are fun! | 07:51 | ||
sorear | because you could just use Filter::Simple and a pure-Perl cpp | ||
and it would be more portable that way | |||
? | |||
Teratogen | is Filter::Simple a core module? | ||
doy | yes | ||
Teratogen | Nifty. | ||
doy | we haven't gotten rid of source filters yet, unfortunately | ||
sorear | how *would* you get rid of source filters without breaking D::D? | 07:52 | |
doy | by getting rid of d::d | ||
sorear | you think people can live without mx:d et al? | ||
:) | |||
wait, this isn't #moose, I should probably write the module names in full | 07:54 | ||
Devel::Declare, MooseX::Declare | |||
doy | no, i mean - we have better non-source-filtery options in the works | ||
sorear | ah | ||
doy | lots of work to make the lexer and parser more pluggable directly | 07:55 | |
sorear | \o/ | ||
doy | the p5-mop syntax is actually using one of the new prototypes for that | 07:58 | |
moritz | can I see the p5-mop syntax somewhere? | 08:02 | |
nom: pir::say pir::can__IPs(Associative, 'sink') | 08:03 | ||
p6eval | nom f9fcb2: OUTPUT«1» | ||
doy | github.com/stevan/p5-mop/blob/mast...-example.t | ||
moritz | nom: Assocative.sink | ||
p6eval | nom f9fcb2: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&Assocative' called (line 1)» | ||
doy | it's still very much in progress, but that's what it looks like currently | ||
moritz | doy: thanks | 08:04 | |
doy | the test suite covers a decent range of things | 08:05 | |
moritz | though it's really class syntax, not MOP syntax | 08:06 | |
doy | what would 'mop syntax' even mean? | 08:07 | |
08:07
replore_ left
|
|||
doy | i was just using 'p5-mop' as the name of the project | 08:08 | |
moritz | well, Perl 6 has the $class.^meta_method syntax for accessing the MOP | ||
erm, s/class/object/ | |||
08:08
replore joined
08:09
replore left
08:15
replore_ joined
08:18
Patterner left
08:19
pomysl_ joined
08:29
fridim_ left
08:34
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
au | whee, got a PD strategy that reliably wins over all other strategies in rakudo (not yet tested niecza). | 08:37 | |
moritz | PD? | 08:38 | |
au | iterated prisoner's dilemma | ||
moritz | \o/ | ||
au: then submit away :-) | |||
au | nah :) | ||
I'll just post here instead: gist.github.com/1851858 | 08:39 | ||
you'll see why I won't submit :) | |||
sorear | \o/ au \o/ | ||
colomon | :p | ||
moritz | :-) | ||
sorear | long time no see | ||
au | # 792 au 600 bad good random 502 evil-tit-for-tat tit-for-tat | 08:40 | |
sorear: indeed! | |||
moritz | wait, WHAT? :-) | ||
ah, now I understand | 08:41 | ||
au: it does deserve a dishonorable mention :-) | |||
au | then mention away :) | 08:42 | |
sorear | au: What do the numbers mean? | 08:43 | |
au | sorear: they're respective scores from each strategy | ||
output from moritz++'s gist.github.com/1710688 | |||
sorear | Why are there numbers before only some strategies? | 08:44 | |
I haven't been playing this game. | |||
au | it's 600 bad, 600 good, 600 random | ||
I just merged them a bit | |||
moritz | that solution does unify the numbers a bit :-) | 08:45 | |
au | the-monkey-ministry-of-truth.p6 | ||
moritz | au: I expected a submission somewhat like yours (though I expected fiddling with the harnesses lexicals), but not from you :-) | 08:47 | |
au | well, the aim of this strategy is precisely to game against harness lexicals | ||
since I expect they'll just tweak truth value but not the .does'ness | 08:48 | ||
sorear | why does gaming .Stringy affect anything? | 08:49 | |
au | sorear: the lookup table is %scoring{"$current-a $current-b"}. | ||
moritz | I thought more along the lines of pir::find_caller_lex__PS('@scores') = (1000, 0); | ||
sorear | ah | ||
au | moritz: *nod* though that's rakudo specific | ||
sorear | au: how've things been for yu? | ||
moritz | au: right | ||
sorear | @CALLER::scores = (1000, 0); # (: | 08:50 | |
moritz | sorear: yeah, but according to spec that's only allowed if @scores is declared as contextual, no? | ||
au | also that kinda depends on the lexical order of your strategy | 08:51 | |
sorear | moritz: the specs seem to be very confused about what contextual means | ||
au | so you'd need to call your strategy name something like "\x00" | ||
sorear | but I concede that | ||
moritz | au: well, it'd need to check &a and &b too, to do it the right way | 08:52 | |
au | sorear: things are good. I've been @Paris this week and staying for two more weeks. | ||
sorear | TimToady has made clear that most variables are supposed to be protected from monkeying by default | ||
au | moritz: yup. tbh I started with that but couldn't quite get it to work without using rakudo internals | ||
sorear | awesome | 08:53 | |
sorear wants to be a world traveller someday | |||
moritz | @CALLER::scores = &Caller::a === $?ROUTINE ?? (1000, 0) !! (0, 1000) # though NYI in rakudo | ||
au | exactly. | ||
moritz | oh wait | ||
using === on closures is also a bad idea | 08:54 | ||
sorear | &CALLER::, ne? | ||
moritz | yes | ||
and &?ROUTINE | |||
so, clearly untested code :-) | |||
rakudo now has .static-id to compare closures while disregarding their clonedness | |||
nom: sub gen($x) { sub () { $x } }; say gen(3) == gen(5); say gen(3).static_id === gen(5).statid_id | 08:55 | ||
p6eval | nom f9fcb2: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu:U \$v, Mu %_!) in method Numeric at src/gen/CORE.setting:657 in sub infix:<==> at src/gen/CORE.setting:2297 in block <anon> at /tmp/nyvUb6opy7:1» | ||
moritz | nom: sub gen($x) { sub () { $x } }; say gen(3) === gen(5); say gen(3).static_id === gen(5).statid_id | ||
p6eval | nom f9fcb2: OUTPUT«FalseMethod 'statid_id' not found for invocant of class 'Sub' in block <anon> at /tmp/c_rpT6JxfG:1» | ||
moritz | nom: sub gen($x) { sub () { $x } }; say gen(3) === gen(5); say gen(3).static_id === gen(5).static_id | ||
p6eval | nom f9fcb2: OUTPUT«FalseTrue» | ||
sorear | cute, although I still think there should be a way to talk about subs without talking about *any* instantiation | ||
moritz | meh. Helps to spell | ||
sorear: probably, yes | 08:56 | ||
(fwiw I've needed that for the internals of the backtrace printer) | |||
au | -> breakfast + more touristy stuff & | 08:57 | |
08:57
replore_ left
|
|||
sorear | -> sleep | 08:58 | |
09:01
replore_ joined
|
|||
au | moritz: another won't-submit-and-please-don't-mention strategy is this... | 09:07 | |
Evil => -> *% { for %strategies.keys.sort -> $k { print 1 if $k eq 'Evil'; say "0\t$k" }; exit } | |||
but I'm sure you've thought of that already : | |||
:) | |||
moritz | au: :-) | 09:08 | |
I did think of fiddling with %strategies, though not in that way | |||
au | I guess this is a bit faster. maybe put it in an INIT block for additional performance gains :) | 09:09 | |
au goes afk for real to refrain from turning a simple friendly PD game into CoreWars | 09:10 | ||
jnthn | moritz: Not got a build handy to ry this but 6guts.wordpress.com/2012/01/29/this...omment-148 | ||
*try | |||
moritz | jnthn: I'll try it | 09:11 | |
nom: pir::say pir::can__IPs(Associative, 'sink') | |||
p6eval | nom f9fcb2: OUTPUT«1» | ||
moritz | nom: Associative.sink | 09:12 | |
p6eval | nom f9fcb2: OUTPUT«Method 'sink' not found for invocant of class 'Associative' in <anon> at src/gen/Metamodel.pm:1163 in block <anon> at /tmp/vmOvXm44UM:1» | ||
09:12
Trashlord left
|
|||
moritz | jnthn: that one currently blocks me from properly sinking traits | 09:12 | |
jnthn | moritz: er, associate is a role... | ||
*Associative | |||
moritz | ... and? | ||
jnthn | Just wondering where it's showing up | 09:13 | |
In its type object form | |||
moritz | jnthn: it's a return value from a trait | ||
09:13
replore_ left
|
|||
jnthn | oh. | 09:13 | |
moritz | probably from 'does Associative' or so (while compiling the setting) | 09:14 | |
jnthn | nom: role Foo { }; pir::say pir::can__IPs(Foo, 'bar') | 09:15 | |
p6eval | nom f9fcb2: OUTPUT«1» | ||
jnthn | ah | ||
yeah, pir::can calls find_method. On a role this always returns something that when invoked puns the role | |||
It would probably pun and then check. | 09:16 | ||
And only then return something. | |||
moritz | eeks. | ||
jnthn | s/would/should/ | ||
nom: say so Associative.can('sink') | 09:17 | ||
p6eval | nom f9fcb2: OUTPUT«False» | ||
jnthn | That is more honest :) | ||
I can probably fix it so the pir::can is honest too :) | 09:18 | ||
moritz | I'd prefer that to emitting .can('sink') calls | ||
jnthn | github.com/rakudo/rakudo/blob/sink...Punning.pm | 09:20 | |
the find_method in there wants a tweak | |||
instead of just returning the closure, do | |||
pir::can__IPs($!pun, $name) ?? ...the closure... !! nqp::null() | |||
(by "the closure" I mean the pointy at the end) | |||
09:21
kaleem left,
kaleem joined
|
|||
moritz | I'll try that | 09:23 | |
09:26
ab5tract left
09:27
ab5tract joined
|
|||
moritz | fwiw I can't reproduce the hang in the UP6 example | 09:30 | |
with newest rakudo, that is (haven't tried with the release) | |||
and I've checked various typical errors (additinal newline at the end, file not found) and none gave me a hang | 09:35 | ||
jnthn | oddness | 09:38 | |
moritz | also I don't understand "Program stop on: for $file.lines -> $line" | 09:39 | |
where does he get that information? | |||
09:39
cogno joined
|
|||
jnthn | Maybe by putting print statement befoer that line and seeing it outputs? :) | 09:40 | |
09:50
woosley left
09:51
cogno left
10:12
scott__ left
10:23
noam left,
noam joined
10:30
tarch joined
10:33
noam left,
JimmyZ_ joined,
noam joined
10:34
noam left
10:35
noam joined
|
|||
masak | good almost-noon, #perl6. | 10:47 | |
moritz | good lunchtime, masakist | 10:48 | |
masak | vimeo.com/36579366 has exceeded all my expectations. you must now all watch it. | ||
moritz | if that's the one from Mr. Victor, I must disappoint you | 10:49 | |
I've already watched it :-) | |||
masak | then you don't have to watch it again. | 10:50 | |
everyone else does, though. | |||
moritz | and yes, it is very inspiring. | ||
it made me want to write Term::ReadKey in Perl 6, so that we can get closer to interactivity | |||
10:51
Tarmvred left
|
|||
Teratogen | noscript is saying no to so many sites on that vimeo url | 10:52 | |
I give up. It's just not going to play. | |||
moritz | yes, it's quite a hassle. But well worth it | ||
you can just make a temporary excpetion for all sites. | 10:53 | ||
Teratogen | is it on youtube? | ||
masak | not that I know of. | 10:54 | |
Teratogen | ok let me try "allow all scripts" | 10:55 | |
although I normally don't do that | |||
masak | moritz: when I watch this, I feel like he's successfully written a lot of tools that have only been a glimmer in my eye, or even less than that. | 10:58 | |
JimmyZ_ can't viist vimeo.com/36579366 | 10:59 | ||
*visit | |||
masak | vimeo is petty-bourgeoise and must be suppressed! | 11:00 | |
JimmyZ_ | I can't search "学习" in google too | 11:02 | |
masak | wtf | 11:03 | |
JimmyZ_ | I don't think study in google should be suppressed :( | 11:04 | |
moritz | I think China has a political interest to make Google less useful than Baidu | ||
masak | to be honest, I don't think anything should be suppressed. :( | ||
JimmyZ_ | well, baidu search result is filterd by polity | 11:06 | |
*filtered | 11:08 | ||
11:11
tarch_ joined
11:12
tarch left
11:15
tarch__ joined,
tarch_ left
|
|||
moritz | niecza: class A { method x($y) { say $y }; method call-x() { $.x(3) } }; A.new.call-x | 11:15 | |
p6eval | niecza v14-42-g1d02da9: OUTPUT«Unhandled exception: No value for parameter '$y' in 'A.x' at /tmp/6atFpM7H7T line 0 (A.x @ 1)  at /tmp/6atFpM7H7T line 1 (A.call-x @ 3)  at /tmp/6atFpM7H7T line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 3773 (ANON @ 3)  at /h… | ||
moritz | that one totally messes up XML::Writer on niecza | ||
moritz submits nieczabug | 11:16 | ||
masak | why is it that all software feels like crap after watching someone like Bret Victor? | ||
moritz | because he spends an highly above-average effort on polishing his stuff | 11:17 | |
and not just polishing | |||
11:18
daxim joined
|
|||
masak | sure it's polished. but even the underlying ideas should have more recognition and be more commonly known. | 11:18 | |
moritz | perl6: class A { method x($y) { say $y }; method call-x() { $.x(3) } }; A.new.call-x | ||
p6eval | niecza v14-42-g1d02da9: OUTPUT«Unhandled exception: No value for parameter '$y' in 'A.x' at /tmp/G8ufQvzFQQ line 0 (A.x @ 1)  at /tmp/G8ufQvzFQQ line 1 (A.call-x @ 3)  at /tmp/G8ufQvzFQQ line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 3773 (ANON @ 3)  at /h… | ||
..rakudo f9fcb2: OUTPUT«3» | |||
..pugs b927740: OUTPUT«***  Unexpected "-" expecting "::", "handles", "is", bare trait, subroutine parameters, trait or block at /tmp/3xe7cdqicc line 1, column 47» | |||
11:21
MayDaniel joined
11:27
Tarmvred joined
11:37
birdwindupbird left
11:38
birdwindupbird joined
11:42
am0c joined
11:48
pernatiy left
|
|||
masak | nom: sub step($s) { $s.subst(/^(\(+)(\)+)\(/, -> $/ { [~] "()" x ($1.chars - 1), "(" x ($0.chars - $1.chars + 2), ")" }) }; .say for "()()()", &step ... "((()))" | 11:54 | |
p6eval | nom f9fcb2: OUTPUT«()()()(())()()(())(()())((()))» | ||
masak | niecza: sub step($s) { $s.subst(/^(\(+)(\)+)\(/, -> $/ { [~] "()" x ($1.chars - 1), "(" x ($0.chars - $1.chars + 2), ")" }) }; .say for "()()()", &step ... "((()))" | ||
p6eval | niecza v14-42-g1d02da9: OUTPUT«()()()(())()()(())(()())((()))» | ||
masak | \o/ | ||
11:54
ab5tract left
|
|||
Teratogen | masak, can I ask why you used a sigil on step (&step) | 11:57 | |
masak | because I talk about the function as an object. | 11:58 | |
without the sigil, it's a function call. | |||
Teratogen | I thought in Perl 5 at least supposed to be moving away from using sigils for subroutines | ||
masak | yes, but Perl 5 has a different convention there. | ||
Teratogen | ok | ||
Don't get me wrong, I love sigils. | |||
masak | basically, in older Perls you had to use the '&' sigil to make a function call. | ||
Teratogen | And I think sigil invariance (is that what it is called) is a big mistake. | 11:59 | |
masak | there were syntaxes such as '&foo()' and 'do foo' to make calls. | ||
sigil invariance is what Perl 6 does. where @array is always @array, even when you @array[$index]. | |||
I've met others who think it's a bad idea too. it's a small minority, though. | 12:00 | ||
Teratogen | Yes, I don't like sigil invariance. | ||
masak | feel free to load a pragma to make things interesting for you, then :) | ||
Teratogen | to me, $array[$index] makes a lot more "sense". | ||
Maybe that's because I have never tried to program in Perl 6. | |||
masak | ok. | ||
we won't change it just for you. :) | 12:01 | ||
Teratogen | baw | 12:02 | |
12:07
snearch joined
12:08
ab5tract joined,
cogno joined
|
|||
masak | eval: my $L = 13; my $s = "[]" x $L; my $t = 1; until ($s eq "[" x $L . "]" x $L) { $s =~ s/ ^ ( \[+ ) ( \]+ ) \[ / "[]" x (length($2) - 1) . "[" x (length($1) - length($2) + 2) . "]" /xe; $t++ }; print $t | 12:11 | |
buubot_backup | masak: 7429001 | ||
masak | eval: my $L = 13; my $s = "[]" x $L; my $t = 1; until ($s eq "[" x $L . "]" x $L) { $s =~ s/ ^ ( \[+ ) ( \]+ ) \[ / "[]" x (length($2) - 1) . "[" x (length($1) - length($2) + 2) . "]" /xe; $t++ }; $t | 12:12 | |
buubot_backup | masak: 742900 | ||
masak | that's better :) | ||
this takes 3 seconds in the Linux VM on my laptop. | |||
12:12
jferrero left
|
|||
Teratogen | Speaking of VMs, I am thinking about getting a VPS. | 12:12 | |
masak | the corresponding Perl 6 program (based on those above) is still running, and will probably run for an hour. | ||
so, for this particular use case, with just a lot of strings being generated, and no IO in the middle, there's a factor of 20 difference between Perl 5 and Perl 6. | 12:13 | ||
12:14
fsergot joined
|
|||
masak | fsergot! \o/ | 12:15 | |
fsergot | hi o/ :) | ||
jnthn | masak: Would be interesting to profile it. | 12:16 | |
fsergot | how are You masak? :) | ||
masak | fsergot: I am good fsergot how are you_ | 12:17 | |
? | |||
fsergot | masak: I'm good too. :) | 12:18 | |
12:20
whiteknight joined
12:21
noam left,
noam joined
|
|||
masak | fsergot: written anything cool in Perl 6 yet? | 12:24 | |
jnthn | nom: say "ice" | 12:25 | |
p6eval | nom f9fcb2: OUTPUT«ice» | ||
jnthn | It's easy to write cool things in Perl 6 \o/ | ||
masak | nom: say Cool | ||
p6eval | nom f9fcb2: OUTPUT«Cool()» | ||
12:27
pmurias joined
12:31
noam left
12:32
noam joined
|
|||
moritz works on prisoner's dilemma visualizations | 12:35 | ||
it seems that generating the visualizations takes about 10x more time than running the strategies :-) | |||
12:37
cogno left
|
|||
fsergot | masak, not yet. I'm still learning p6 :) | 12:42 | |
moritz | the two don't contradict :-) | ||
fsergot | masak: i hope it'll change in the near future. :) | 12:43 | |
:) | |||
Right :) | 12:44 | ||
masak | fsergot: it's not possible to learn Perl 6 well without writing it. at least not for me. | 12:51 | |
by which I mean "writing Perl 6 code", not necessarily "implementing Perl 6 itself" | |||
fsergot | masak: I write a lot of code. :) | 12:52 | |
but this code isn't cool :P | 12:54 | ||
masak | hehe | 12:57 | |
perl6: say "This code ", <is isn't>.pick, " cool." | |||
p6eval | rakudo f9fcb2: OUTPUT«This code isn't cool.» | ||
..pugs b927740, niecza v14-42-g1d02da9: OUTPUT«This code is cool.» | |||
masak | :) | ||
see? whether code is cool or not is a matter of perspective :) | 12:58 | ||
flussence | perl6: say <solid liquid gas plasma handwavey-sciencey-stuff>.pick; # annual vapourware status check :) | 12:59 | |
p6eval | rakudo f9fcb2: OUTPUT«liquid» | ||
..niecza v14-42-g1d02da9: OUTPUT«gas» | |||
..pugs b927740: OUTPUT«plasma» | |||
moritz | :-) | 13:00 | |
fsergot | :) | ||
masak | Niecza is clearly vapourware. | ||
probably because it doesn't have a homepage :P | |||
flussence | it's cookin'! | ||
masak .oO( this implementation's a gas! ) | |||
Teratogen | o/~ hey good lookin' / whatchya got cookin'? o/~ | ||
13:02
GlitchMr joined
13:05
noam left
13:07
noam joined
13:11
bluescreen10 joined
|
|||
masak | nom: sub foo { my $value = "HAHAHA DISREGARD THAT"; our sub bar { say $value } }; our &bar; bar() | 13:20 | |
p6eval | nom f9fcb2: OUTPUT«Any()» | ||
moritz | perl6: sub foo { my $value = "HAHAHA DISREGARD THAT"; our sub bar { say $value } }; our &bar; bar(); foo; bar | 13:21 | |
p6eval | niecza v14-42-g1d02da9: OUTPUT«Any()Any()» | ||
..pugs b927740: OUTPUT«*** Cannot use Undef as a Code object at /tmp/Rcrpv9o_AR line 1, column 88-93» | |||
..rakudo f9fcb2: OUTPUT«Any()HAHAHA DISREGARD THAT» | |||
moritz | I'd submit a bug report if I knew which one is wrong :-) | ||
masak | rakudo is correct here. | 13:22 | |
&bar gets re-bound upon &foo entry. | |||
13:24
shinobicl_ joined
|
|||
[Coke] | (multics years) weird, I know someone whose nickname is multics. | 13:30 | |
shinobicl_ | perl6: class D is Date { has Bool $.ok is rw; multi method new(Str $datespec, Bool $ok) { $.ok = $ok; nextwith($datespec) } }; my D $var = D.new("2010-01-01", Bool::False); | 13:42 | |
p6eval | rakudo f9fcb2: OUTPUT«Cannot look up attributes in a type object in method ok at src/gen/CORE.setting:1392 in method new at /tmp/eVkxdjuy2k:1 in block <anon> at /tmp/eVkxdjuy2k:1» | 13:43 | |
..niecza v14-42-g1d02da9: OUTPUT«===SORRY!===Unhandled trait Date for this context at /tmp/khN8rum5Ql line 1:------> class D is Date ⏏{ has Bool $.ok is rw; multi method new(Potential difficulties: $var is declared but not used at /tmp/khN8rum5Q… | |||
..pugs b927740: OUTPUT«*** Class prototype occured where its instance object expected: D at /tmp/5KDykIpPlf line 1, column 84-94 /tmp/5KDykIpPlf line 1, column 84-94» | |||
shinobicl_ | i'm not sure how should i use "nextwith" | ||
masak | perl6: sub foo { constant value = "OH HAI"; our sub bar { say value } }; our &bar; bar() | 13:44 | |
p6eval | niecza v14-42-g1d02da9: OUTPUT«Potential difficulties: &foo is declared but not used at /tmp/AsRm9qPC9W line 1:------> sub foo ⏏{ constant value = "OH HAI"; our sub barOH HAI» | ||
..rakudo f9fcb2: OUTPUT«OH HAI» | |||
..pugs b927740: OUTPUT«***  Unexpected "=" expecting ":" or "(" at /tmp/Lz81jx2WOV line 1, column 26» | |||
masak | perl6: sub foo { constant $value = "OH HAI"; our sub bar { say $value } }; our &bar; bar() | ||
p6eval | niecza v14-42-g1d02da9: OUTPUT«Potential difficulties: &foo is declared but not used at /tmp/3HoPPSo5BX line 1:------> sub foo ⏏{ constant $value = "OH HAI"; our sub baOH HAI» | ||
..rakudo f9fcb2: OUTPUT«OH HAI» | |||
..pugs b927740: OUTPUT«*** Cannot use Undef as a Code object at /tmp/iBo9fGxXXM line 1, column 79 - line 2, column 1» | |||
moritz | shinobicl_: first you can't assign to $.ok in method new, because no object has been created yet | 13:45 | |
masak | shinobicl_: .new is usually a "static method" (or "class method") in Perl 6. | ||
shinobicl_: generally, a constructor in Perl 6 is just a method that calls .bless on a type object. | 13:46 | ||
(which is why, as moritz++ said, you can't access the attributes, because 'self' is the type object and not the new instance) | 13:47 | ||
moritz | nom: class D is Date { has $.ok; method new(Str $datespec, $ok) { my $new = self.Date::new($datespec); $new.MYBUILD($ok) }; submethod MYBUILD($ok) { $!ok = $ok } }; say D.new('2012-02-12', True); | ||
p6eval | nom f9fcb2: OUTPUT«Nominal type check failed for parameter '$datespec'; expected Str but got Int instead in method new at /tmp/3IQniH5cEy:1 in method new at src/gen/CORE.setting:8967 in method dispatch:<::> at src/gen/CORE.setting:784 in method new at /tmp/3IQniH5cEy:1 in bloc… | ||
shinobicl_ | if the object does not exists yet, how can i use "self" then? | 13:48 | |
moritz | shinobicl_: in a class method, 'self' refers to the type object | ||
13:49
Trashlord joined
|
|||
moritz | nom: class D is Date { has $.ok; method new(Str $datespec, $ok) { my $new = callwith($datespec); $new.MYBUILD($ok) }; submethod MYBUILD($ok) { $!ok = $ok } }; say D.new('2012-02-12', True); | 13:49 | |
p6eval | nom f9fcb2: OUTPUT«Nominal type check failed for parameter '$datespec'; expected Str but got Int instead in method new at /tmp/mvhbMEHl6n:1 in method new at src/gen/CORE.setting:8967 in <anon> at src/gen/Metamodel.pm:2533 in call_with_args at src/gen/Metamodel.pm:2530 in block… | ||
moritz | why Int? | ||
masak | no idea. | 13:50 | |
jnthn | And, uh, why is your new ABOVE a new method in CORE.setting in the backtrace? | ||
[Coke] | moritz: (self refers to class in class method) Ew. | 13:51 | |
[Coke] would prefer it were spelled "class" then. | |||
jnthn | [Coke]: It refers to the type object. | ||
There IS no class object in Perl 6. | |||
[Coke] | moritz: (self refers to type in class method) Ew. | 13:52 | |
moritz | it is consistent with the rest of the p6 OO model | 13:53 | |
jnthn | It works out pretty well in general. | ||
[Coke] tries to find the code snippet moritz was commenting on. | |||
jnthn | I do miss it being this way in toher languages. | ||
*other | |||
13:54
bluescreen10 left
|
|||
[Coke] | ah, this is related to the distinction between BUILD and new, which is also ew. | 13:55 | |
[Coke] looks forward to reading the "perl6 for java programmers" guide that explains all of this to Coke et al. ;) | |||
moritz | something is very Ew in the whole example | ||
dalek | kudo/sink: f9e18ea | moritz++ | src/Perl6/ (2 files): fix pir::can on roles. jnthn++ |
13:56 | |
moritz | but I'm a bit distracted | ||
perl6: my @a = [1, 2], [3, 4]; say @a.map({.reverse.item}).perl | 13:58 | ||
p6eval | rakudo f9fcb2, niecza v14-42-g1d02da9: OUTPUT«([2, 1], [4, 3]).list» | ||
..pugs b927740: OUTPUT«(2, 1, 4, 3)» | |||
masak | [Coke]: +1 on what moritz and jnthn is saying. 'self' referring to the type object is perfectly a-OK with the rest of Perl 6. | 14:00 | |
[Coke]: if you want the invocant of a "class method" to be called '$class', consider naming the invocant in the method signature. | 14:01 | ||
also, cf. Perl 5, where exactly the same rules apply (except that Perl 5 doesn't even have a default term 'self'). | |||
shinobicl_ | class D { has $.x; has $.y; multi method new(:x!, :y!) { my $ret = self.bless(*, :x, :y) } }; my D $var = D.new(x=>100, y=>200); say $var.perl; | 14:05 | |
oops sorry didnt meatn to post that here | |||
masak | thanks anyway. looks good. :) | 14:06 | |
the only reason you're declaring your own .new there is because your nameds are required, I guess? | |||
shinobicl_ | rakudo: class D { has Int $.x; has Int $.y; multi method new(:$x!, :$y!) { my $ret = self.bless(*, :$x, :$y); return $ret } }; my D $var = D.new(x=>100, y=>200); say $var.perl; | 14:07 | |
p6eval | rakudo f9fcb2: OUTPUT«D.new(x => 100, y => 200)» | ||
masak | hm, if you make it multi, does that mean that a call without the required named arguments dispatches to the .new in Mu? | ||
moritz | yes | ||
masak | rakudo: class D { has Int $.x; has Int $.y; multi method new(:$x!, :$y!) { my $ret = self.bless(*, :$x, :$y); return $ret } }; my D $var = D.new(x=>100); say $var.perl | ||
p6eval | rakudo f9fcb2: OUTPUT«D.new(x => 100, y => Int)» | ||
masak | \o/ | ||
shinobicl_ | i want to have a subclass of Date, and i want to implement as many constructors as Date has | ||
masak | ah. | ||
PerlJam | multis++ | 14:08 | |
14:09
bluescreen10 joined
|
|||
moritz | it might be a bit harder than necessary because the Date constructors aren't writen with inheritance in mind | 14:09 | |
it is often not a good idea to inherit from value types; if you do, you have to take extra care | 14:10 | ||
shinobicl_ | so, my problem now is that i want to have a Date plus the x and y members.... so i must call "nextwith" and "glue" it the x and y values | ||
and i'm not sure how to do that | |||
PerlJam | shinobicl_: Why do you want a Date to also have and X and Y ? | 14:12 | |
14:12
tokuhirom joined
|
|||
shinobicl_ | ok X and Y is just an example, but what i want to do is to add a _complex_ attribute to a date. This attribute is an object itself | 14:13 | |
14:13
kaleem left
|
|||
shinobicl_ | i want to represent a date PLUS a "calendar" object | 14:13 | |
class Workdate is Date { has WorkdayCalendar $.calendar is rw ........ | |||
so i can have a constructor liek this: | 14:14 | ||
my Workdate $w_date = Workdate.new(year=>2011, month=>12, day=>09, calendar=>WorkdayCalendar.new($calendar)); | |||
moritz | shinobicl_: also Date objects are immutable. If you make a mutable subclass, make sure to override the WHICH method | ||
otherwise you'll break a whole lot of assumptions | |||
14:14
kaleem joined
|
|||
shinobicl_ | moritz: noted | 14:14 | |
so... if i want a constructor like that, i should overload the new methoids in "Date" so they accept the $.calendar attribute, or use a 'default' new calendar if not specified. Something like this: | 14:16 | ||
(defined inside Workdate class...) multi method new(:$year!, :$month, :$day, :$calendar = WorkdayCalendar.new) { $.calendar = $calendar; return nextwith(year=>$year, month=>$month, day=>$day); } | 14:17 | ||
well i know that this is not gonna work... is just to express the general idea | |||
moritz | nom: class D is Date { method new(|$args) { nextwith(|$args) } }; say D.new('2011-01-14'); | 14:21 | |
p6eval | nom f9fcb2: OUTPUT«2011-01-14» | ||
moritz | nom: class D is Date { method new(|$args) { nextwith(|$args) } }; given D.new('2011-01-14') {say .WHAT; .say }; | ||
p6eval | nom f9fcb2: OUTPUT«D()2011-01-14» | ||
moritz | nom: class D is Date { method new(|$args) { my $obj = callwith(|$args); $obj } }; given D.new('2011-01-14') {say .WHAT; .say }; | ||
p6eval | nom f9fcb2: OUTPUT«D()2011-01-14» | ||
moritz | nom: class D is Date { has $.x is rw; method new(|$args) { my $obj = callwith(:$x, |$args); $obj.x = $x; $obj } }; given D.new('2011-01-14') {say .WHAT; .say }; | 14:23 | |
p6eval | nom f9fcb2: OUTPUT«===SORRY!===Variable $x is not declaredat /tmp/3fPKg8BDkK:1» | ||
moritz | nom: class D is Date { has $.x is rw; method new(:$x, |$args) { my $obj = callwith(|$args); $obj.x = $x; $obj } }; given D.new('2011-01-14') {say .WHAT; .say }; | ||
p6eval | nom f9fcb2: OUTPUT«D()2011-01-14» | ||
moritz | nom: class D is Date { has $.x is rw; method new(:$x, |$args) { my $obj = callwith(|$args); $obj.x = $x; $obj } }; given D.new('2011-01-14', :x<foo>) {say .WHAT; .say .x.say}; | ||
p6eval | nom f9fcb2: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2» | ||
moritz | nom: class D is Date { has $.x is rw; method new(:$x, |$args) { my $obj = callwith(|$args); $obj.x = $x; $obj } }; given D.new('2011-01-14', :x<foo>) {say .WHAT; .say; .x.say}; | ||
p6eval | nom f9fcb2: OUTPUT«D()2011-01-14foo» | ||
moritz | shinobicl_: is that something you can work on? | 14:24 | |
s/on/with/ | |||
shinobicl_ | yes :D thanks... i just don't understand the |... IIRC that was the "flatten" operator... | ||
moritz | correct | 14:25 | |
in the signature, it captures all the rest of the argument list | |||
and in the paramter list, it interpolates everthing from $args in the parameter list | |||
shinobicl_ | oh, so instead of bless, you create a new object with callwith (that calls the parent 'new'). Now that the object exists you can assign $.x | ||
moritz | yes (though inside new it's not called $.x) | 14:26 | |
shinobicl_ | (brb) | ||
14:28
am0c left
|
|||
shinobicl_ | cool... it now works as i expected... thanks moritz... now i think i can finish my Workdaycalendar library :D | 14:30 | |
thank you very much! going back to work... bye! | |||
moritz thinks that mutable subclasses of value types are a kind of a Liskov violation | 14:32 | ||
shinobicl_ | i'm not sure if i understand that whole sentence... hehehe, but i think you are suggesting that i should look for another way to implement that | 14:33 | |
moritz | shinobicl_: I'd use delegation | ||
ie your object has a date, and not is a date | 14:34 | ||
shinobicl_ | i used to have workdate as a parametric role ($calendar was the parameter). I | 14:35 | |
. | |||
masak | moritz: odd -- I feel Liskov is so much easier to uphold if the objects are read-only. :) | ||
no way to call .setWidth and .setHeight on the derived Square, etc. | |||
14:36
ab5tract left
|
|||
moritz | masak: yes, that's why it feels weird to introduce mutability in subclasses | 14:36 | |
shinobicl_ | i'm not familiar with "delegation"... i'll read about that, and maybe return with another few questions :) | ||
moritz | nom: class A { has $.str handles <Str split>; } say A.new(str => 'a sentence with spaces).split(' ').perl | ||
p6eval | nom f9fcb2: OUTPUT«===SORRY!===Confusedat /tmp/_9p47gi072:1» | ||
shinobicl_ | the mutability is about the "is rw" part of the $.calendar member? | 14:37 | |
moritz | nom: class A { has $.str handles <Str split>; }; say A.new(str => 'a sentence with spaces).split(' ').perl | ||
p6eval | nom f9fcb2: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2» | ||
moritz | shinobicl_: yes | ||
nom: class A { has $.str handles <Str split>; }; say A.new(str => 'a sentence with spaces').split(' ').perl | |||
p6eval | nom f9fcb2: OUTPUT«("a", "sentence", "with", "spaces").list» | ||
14:37
PacoAir joined
|
|||
shinobicl_ | oh i'll remove that part then. i'm, not expert on p6 oop yet :) i put "is rw" in all my class members hehe | 14:38 | |
because until now i didn't understand clearly how to make constructors of that 'bless' part | |||
now i think i got it | 14:39 | ||
masak | I avoid "is rw" on anything whenever I can. | 14:40 | |
that's why it isn't the default :) | |||
shinobicl_ | nom: class D is Date { has $.x is rw; method new(:$x, |$args) { my $obj = callwith(|$args); $obj.x = $x; $obj } }; given D.new('2011-01-14', x=>"foo") {say .WHAT; .say; .x.say}; | 14:41 | |
p6eval | nom f9fcb2: OUTPUT«D()2011-01-14foo» | ||
[Coke] | moritz++ # handles example | ||
shinobicl_ | nom: class D is Date { has $.x; method new(:$x, |$args) { my $obj = callwith(|$args); $obj.x = $x; $obj } }; given D.new('2011-01-14', x=>"foo") {say .WHAT; .say; .x.say}; | ||
p6eval | nom f9fcb2: OUTPUT«Method 'static_id' not found for invocant of class 'Mu'» | ||
moritz | oops, that's an error from within the backtrace printer | ||
shinobicl_: wihtout 'is rw' you can't simply assign to $obj.x | 14:42 | ||
shinobicl_: you could for example add a private method that sets $!x, and call that from within .new | |||
shinobicl_ | ok... seems fine to me. | 14:43 | |
14:46
jferrero joined
|
|||
masak | for those morbidly interested in macros: my latest musings -- gist.github.com/1853560 | 14:48 | |
14:53
birdwind1pbird joined
14:54
PacoAir left
|
|||
dalek | kudo/nom: 1e966bb | moritz++ | src/core/Backtrace.pm: fix thinko in backtrace printer |
14:54 | |
14:55
PacoAir joined
|
|||
moritz | masak: good read. It sounds as if you've understood macros now. | 14:59 | |
(well, that part of macros) | |||
moritz managed not to include a "finally" in that sentence o/ | |||
masak | :) | 15:00 | |
jnthn | masak has FINALLY understood macros?! | ||
:P | |||
masak | the fixup at B was something I hadn't understood until this Sunday. | ||
jnthn | All this "Let's talk about X" is making me expect a "WAT" somewhere in here soon :P | 15:03 | |
ooh, there'll be a ninaskajp tomorrow | 15:07 | ||
crap, wrong window! | |||
moritz | masak++ # macro post | ||
jnthn | masak: nitpick: B need not happen either... | ||
(that is, potentially a macro may be unused) | 15:08 | ||
moritz | and thus boring :-) | ||
jnthn is also pondering how well this will fall out of the closure handling he's doing in the serialization work already | 15:09 | ||
(for the pre-compiled case) | |||
If it's done by actually have a dummy closure being taken and passed in to the quasi incarnation, then we steal the context from that at fixup time, it probably works out very easily. | 15:11 | ||
...to the extend that closure serialization is easy. :) | 15:12 | ||
*extent | |||
moritz | well, it's not easy, but jnthn++ does it. So easy for masak++ ;-) | ||
jnthn | :P | 15:13 | |
Sadly, we can't yet serialize ASTs, since they're PAST nodes. Another reason we need QAST. | 15:14 | ||
masak | jnthn: I pondered mentioning that B needn't happen either. since you saw it, I'll point it out. | 15:18 | |
15:20
pomysl_ left,
pomysl joined,
pomysl left,
pomysl joined
15:22
noam left
15:26
noam joined
15:27
pernatiy joined,
birdwind1pbird left
15:28
snearch left,
mtk joined
15:29
cogno joined
15:32
whiteknight left,
whiteknight joined
15:37
wtw left
15:39
kaare_ joined
15:40
colomon joined
15:41
ab5tract joined
15:43
Psyche^ joined
15:45
kst joined
15:46
thou joined
|
|||
jnthn | time for the long journey home & | 15:47 | |
15:47
Patterner left,
Psyche^ is now known as Patterner
15:50
cogno left
15:51
sivoais joined
|
|||
gfldex | nom: my @a 1,2,3; say [+]@a; | 15:54 | |
p6eval | nom 1e966b: OUTPUT«===SORRY!===Confusedat /tmp/fAcbghOfZs:1» | ||
gfldex | nom: my @a 1,2,3; say [+] @a; | ||
p6eval | nom 1e966b: OUTPUT«===SORRY!===Confusedat /tmp/pM8afx1sOf:1» | ||
gfldex | nom: my @a=1,2,3; say [+]@a; | ||
15:54
cosimo joined
|
|||
p6eval | nom 1e966b: OUTPUT«===SORRY!===Confusedat /tmp/N8kuFNoBKZ:1» | 15:54 | |
gfldex | nom: my @a=1,2,3; say [+] @a; | ||
p6eval | nom 1e966b: OUTPUT«6» | ||
gfldex | std: my @a=1,2,3; say [+]@a; | 15:55 | |
p6eval | std 52f3895: OUTPUT«===SORRY!===Two terms in a row (listop with args requires whitespace or parens) at /tmp/df5cE2jCJ6 line 1:------> my @a=1,2,3; say [+]⏏@a; expecting any of: POST argument list bracketed infix infix or meta-infix | ||
..postfix… | |||
gfldex | i like std's error message a lot better :) | ||
15:57
MayDaniel left
16:00
tarch__ left
16:01
am0c joined
16:02
sftp joined
16:05
tarch__ joined,
cogno joined
|
|||
masak | we all do :) | 16:06 | |
16:06
tokuhirom left
16:07
tokuhirom joined
16:11
tokuhirom left
16:12
tarch__ left
16:13
birdwindupbird left
16:14
cogno left,
GlitchMr42 joined
16:18
GlitchMr left
16:21
MayDaniel joined
|
|||
moritz | on my way home I realized why some stuff in the sink branch fails | 16:23 | |
traits often return type objects | |||
and I'm putting them in sink context | |||
and List.sink wasn't safe when called on the type object | |||
dalek | ast: 2b82f29 | (Solomon Foster)++ | S03-operators/set.t: Add proper subset tests. |
16:24 | |
ast: 9c421d3 | (Solomon Foster)++ | S03-operators/set.t: Add superset tests. (with a little help from Rop!) |
|||
masak | moritz: in other words, the method was written not taking type object invocation into account? | 16:26 | |
16:27
tarch__ joined
16:28
kst left,
emss joined
16:29
kst joined
16:32
tarch__ is now known as tarch,
kaleem_ joined
16:34
kaleem left
16:35
kaleem_ left
|
|||
masak | $ ./perl6 -e 'macro foo { my $a = "OH HAI"; quasi { say $a } }; foo' | 16:39 | |
Null PMC access in find_method('gist') in sub say at src/gen/CORE.setting:5932 | |||
(this is locally, on the macros2 branch) | |||
I just had a look at the PIR, and to me it *looks* as though the block from the quasi has the correct OUTER. | 16:40 | ||
16:40
MayDaniel left
|
|||
masak | does anyone have a good way to explain the Null PMC access? | 16:40 | |
TimToady | does it have it at the right time? | 16:41 | |
16:41
emss left
16:42
slavik1 joined
|
|||
TimToady | till bs lands, rakudo still has phase issues | 16:42 | |
masak | well, the PIR is the product of the compilation, so the macro should've done all it wants by then. | ||
I can nopaste the PIR if that helps. | 16:43 | ||
TimToady | won't help me :) | ||
masak | :) | ||
16:43
MayDaniel joined
|
|||
TimToady has too few braincells to waste any on PIR | 16:43 | ||
masak | hardly helps me either. I find PIR harder to read under nom. | ||
moritz | masak: try with --ll-exception | 16:44 | |
masak | oh! | 16:45 | |
moritz | jnthn: regarding github.com/rakudo/rakudo/blob/nom/...ld.pm#L764 how can the invocation of $precomp ever work if $precomp is false? | ||
masak | I always forget about --ll-exception :) | 16:46 | |
moritz | jnthn: it seems to be that it should be if $precomp { $precomp(|@pos, |%named) } else { $compiler_thunk() } | 16:47 | |
16:48
GlitchMr42 is now known as GlitchMr
|
|||
moritz | I'm getting a failure while trying to invoke Any | 16:49 | |
16:50
am0c_ joined,
am0c left
|
|||
masak | moritz: stacktrace doesn't tell me much, I think: gist.github.com/1854332 | 16:51 | |
16:52
aoeuhtns joined
|
|||
moritz | masak: most likely $a ends up being the Null PMC | 16:53 | |
lines 4 and 5 are the mainline | |||
masak: am I right in guessing that the macro application just pushes PAST nodes onto the current scope (and doesn't enclose anything in a PAST::Block or so)? | 16:54 | ||
TimToady | masak: re irclog.perlgeek.de/perl6/2012-02-17#i_5162698 maybe we need 'use MONKEY_VALUES;' to turn on mutability :) | 16:57 | |
masak | moritz: I don't remember whether the PAST::Block gets included or not. I can check. | 16:58 | |
yes, clearly the Null PMC is related to $a somehow. | |||
TimToady | moritz: re irclog.perlgeek.de/perl6/2012-02-17#i_5162590 I wish we could find some systematic way of detecting when someone has written a method that should be a submethod | ||
masak | or rather, to the failed lookup of $a. | ||
TimToady: heh, I don't find 'is rw' as horrible as monkey patching :P | 16:59 | ||
TimToady | the average Haskell programmer would classify them in the same bucket :) | ||
maybe we should change 'is rw' to 'is mutable-under-monad(IO)' :) | 17:00 | ||
masak locks TimToady inside a monad until he lets go of his axes to grind :P | 17:01 | ||
TimToady | you're think of it inside out; it's not a monadstery, but a monadic tribal existence | 17:02 | |
*ing | |||
au | "wow, all these tourists live behind iron bars!" | 17:04 | |
-- monadic monkey | 17:05 | ||
pmurias | -/exit | 17:06 | |
17:06
pmurias left,
mikemol joined
17:07
pmurias joined
|
|||
masak .oO( the OOK monad ) | 17:07 | ||
moritz | is that related to OOKness? | ||
TimToady | noodnood | ||
17:09
raoul left
17:12
mj41 left
17:15
pernatiy left
17:16
kst left
17:19
kst joined
17:23
lateau_ joined
17:26
daxim left
17:27
JimmyZ_ left
17:30
lateau_ left,
pyrimidine left
17:32
whiteknight left
17:36
pyrimidine joined
17:38
lateau_ joined
17:39
pmurias left
17:41
Chillance joined
17:43
mucker joined
17:44
mucker left
17:48
whiteknight joined
17:50
pyrimidine left
17:54
kst left
17:55
simcop2387 joined
|
|||
[Coke] | # 02/17/2012 - niecza at 99.88% | 17:57 | |
"niecza", 20055, 8, 751, 1573, 22387, 23257 | |||
"rakudo", 20078, 28, 610, 1863, 22579, 23267 | |||
(no change) | |||
17:58
kst joined
|
|||
masak | interesting how, as Niecza and Rakudo started comparing test pass numbers, they "got stuck" only a few dozen tests apart. :) | 17:59 | |
[Coke] | observational bias? | ||
masak | not if you count actual spectests passed. Niecza hasn't been passing this many for more than a month or so. | 18:00 | |
whereas Rakudo's level has been much more stable in the past months. | |||
18:00
pyrimidine joined
18:03
kst left,
lateau_ left
|
|||
[Coke] | yes. we started observing when niecza's growth was stable, I thought. then observation, then rapid growth to match rakudo, now stability. | 18:06 | |
colomon | [Coke]: ... hmm, I added over 100 new tests at about 11am this morning... | 18:08 | |
18:09
kst joined
|
|||
masak | hm, I didn't notice before about www.lispcast.com/modern-language-wishlist -- that's a really weak definition of "homoiconic". | 18:10 | |
my definition is much stronger: *all* code is also available as data. | 18:11 | ||
18:14
whiteknight left
|
|||
PerlJam | why do all venn diagrams seem to relate 3 things? | 18:16 | |
masak | because that's the maximum venn diagram that doesn't hurt to look at? | 18:17 | |
PerlJam | perhaps | 18:18 | |
masak | you quickly run up against planarity. | ||
[Coke] | colomon: that was probably after my run. | 18:19 | |
PerlJam | ah, that makes more sense | ||
and I guess it'a another variation on "doens't hurt" | |||
colomon | my all-time favorite venn: flowingdata.com/2011/10/28/venn-dia...-a-keytar/ | ||
18:24
sivoais left
18:27
sivoais joined
18:29
fridim_ joined
|
|||
masak | colomon: :D | 18:33 | |
18:35
whiteknight joined
|
|||
TimToady | masak: the schedule of school terms has much more to do with niecza's progress curve than anything else | 18:40 | |
sorear++ for not blowing off school *all* the time :) | |||
masak | oh, indeed. | 18:41 | |
18:41
revdiablo joined,
revdiablo left,
revdiablo joined
|
|||
masak | I wasn't implying being anything less than utterly impressed by the progress in Niecza of late. | 18:41 | |
18:42
kst left,
lateau_ joined
|
|||
masak | just remarking on my expectations that once Niecza and Rakudo got very similar test pass numbers, either implementation would quickly overtake the other. | 18:42 | |
18:43
y3llow left
|
|||
moritz is stuck with sink | 18:43 | ||
18:43
y3llow joined,
lateau_ left
18:44
birdwindupbird joined
|
|||
TimToady | and pmichaud++ for keeping his family first, and au++ for learning to pace herself | 18:44 | |
flussence | .oO( Perl 6: everything, but the kitchen sink's clogged ) |
||
18:45
kst joined
|
|||
TimToady | "Sink me!" -- the Scarlet Pimpernel | 18:45 | |
18:46
preflex left
|
|||
masak | "Frankly, my dear, I don't give a sink." | 18:46 | |
18:47
revdiablo left,
preflex_ joined,
revdiablo joined
18:48
preflex_ is now known as preflex
|
|||
PerlJam | TimToady++ for being our fearless language designer | 18:49 | |
:) | |||
[Coke] | Iunno, a little more fear might be a good thing. :) | 18:50 | |
18:51
lateau_ joined
|
|||
masak | have the appropriate amound to fear. | 18:51 | |
amount* | |||
TimToady | maybe a mound is the appropriate amount | 18:52 | |
but don't be afraid of me, just be afraid of what I might do :) | |||
moritz | now that it turns out that we rarely write Mu as a smart-matcher, can we rename it to Object again? | ||
18:53
am0c_ left
|
|||
masak | oh yes please yes | 18:54 | |
TimToady | well, it's really Any that fills the role of Object; I think of objects as something other than concepts like junctions or failure | ||
18:54
am0c joined
|
|||
PerlJam | Calling something "Object" doesn't seem very perlish ;) | 18:54 | |
moritz | it was perl6ish about 8 years long | ||
PerlJam | yeah, but that was just a first approximation and everyone knows those are always wrong | 18:55 | |
TimToady | Illuminati...Nomenclatura...the Cosmic All...non-OO OO... | ||
but it's still "most undefined" | 18:56 | ||
commuting & | |||
19:01
GlitchMr left
19:02
GlitchMr joined,
fridim_ left
19:04
pernatiy joined
19:09
fridim_ joined
19:26
pyrimidine left
|
|||
TimToady | & computing | 19:27 | |
19:27
fridim_ left
19:29
kst left
19:42
lateau_1 joined
19:45
lateau_ left
19:46
lateau_ joined
19:47
alester joined
19:48
lateau_1 left
19:51
kst joined
19:56
zby_home_ joined
|
|||
PerlJam watches DHH's "Why Ruby?" talk and it sounds like he's talking about Perl | 19:57 | ||
20:01
lateau_ left
|
|||
masak | url? | 20:06 | |
PerlJam | vimeo.com/17420638 | ||
rubyconf 2010 | |||
masak | dz | ||
20:07
lateau_ joined,
lateau_ left
20:11
raoul joined
|
|||
PerlJam | argh ... he says monkey patching is the one thing that makes him happy about ruby | 20:14 | |
20:14
Patterner left
|
|||
masak | I've heard people wax lyrical about '5.times { ... }' too. :) | 20:16 | |
20:17
mj41 joined
|
|||
moritz | that was stolen from smalltalk, no? | 20:18 | |
20:19
ksi_ joined
|
|||
moritz | whenever I see that, I wonder "is control flow really the task of an integer"? | 20:19 | |
20:19
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
doy | i feel that way about python's "'+'.join(['a', 'b'])" too | 20:21 | |
20:22
snearch joined
|
|||
moritz | looks like somebody did a pass over the perl 5 builtins, and then used the first argument as invocant :-) | 20:24 | |
Teratogen | cutting and pasting code is never a good idea | 20:25 | |
but it comes in handy sometimes | |||
except in python | |||
if someone uses a different indentation scheme than you do | 20:26 | ||
good luck cutting and pasting their code | |||
moritz | as a vim user I can just say gg=G | 20:27 | |
doy | that doesn't work if the changing indentation is meaningful | 20:28 | |
Teratogen | oh, I use vim, but I don't know what that does | ||
what does gg=G do? | |||
20:28
alester left
|
|||
moritz | gg goes to the start of the file | 20:29 | |
= re-indents code | |||
and G stands for the end of the file | |||
TimToady | sometime soon we need to start working on py2p6 and rb2p6 translators :) | ||
moritz | so it re-indents the whole file | ||
Teratogen | how is p52p6 going? | 20:32 | |
20:33
localhost left
20:34
localhost joined,
GlitchMr42 joined
|
|||
Teratogen | not going? | 20:37 | |
going once... | |||
going twice... | |||
20:37
kst left
|
|||
masak | no-one is working on that right now. | 20:37 | |
Teratogen | I thought Perl 6 was supposed to be able to run Perl 5 code | 20:38 | |
masak | it is. | ||
20:38
GlitchMr left
|
|||
[Coke] | Teratogen: If that's an itch you want to scratch, awesome! | 20:38 | |
masak has been thinking about it recently | 20:39 | ||
[Coke] wonders if there is currently a better plan than "embed perl5" | |||
masak | Perl 5 on Parrot would be nice. | 20:40 | |
PerlJam | "embed perl 5" seems like the best plan to me. | ||
[Coke] | masak: No comment! | ||
masak | please elaborate :) | 20:41 | |
moritz wants a Ponie! | |||
masak too! | |||
au | uh, there is a working p5top6 compiler if I'm not mistaken... | ||
...that doubles as p5tojs: perlcabal.org/~fglock/perlito5.html | 20:42 | ||
masak | right, perlito. | ||
moritz | au: but that only does a tiny subset of p5 | ||
awwaiid | yummy perlito | ||
masak | I sjould look into perlito, to get a handle on what it can and can't do. | 20:43 | |
should* | |||
awwaiid | recent commits, github.com/fglock/Perlito | ||
au | moritz: concurred. it's somewhat useful though, if one'd like to write javascript in perl syntax (instead of, say, in coffeescript syntax) | ||
moritz | au: aye | ||
masak | I'm coming up on such a project. | ||
20:44
ksi_ left
|
|||
PerlJam likes coffeescript | 20:44 | ||
well ... except for making the ternary op more wordy | 20:45 | ||
[Coke] might be odd, but I'd rather write JS in JS. ;) | |||
au | yeah. that ternary thing (among a lot other things) was apparently lifted straight from haskell. | ||
20:46
kst joined
|
|||
[Coke] would like to get pugs running on his feather login so he can add it to the daily spectest runs! | 20:47 | ||
(speaking of sends from au ~~ /haskell/) | 20:48 | ||
au | set PATH to a dist/pugs built on some other home directory? :) | ||
[Coke] | to get at /a/ running copy, or to somehow bootstrap my own? | 20:49 | |
au | to get at a running copy | ||
PerlJam | au: btw ... are you "back" or just visiting? :) | ||
[Coke] | au: any idea why this failure? gist.github.com/1827728 | ||
au | PerlJam: yes :) | 20:50 | |
PerlJam | good answer :) | ||
au | [Coke]: I had no idea; haskeline should've defined that instance. | ||
[Coke] has, btw, checked out Pugs.hs, cd'd to Pugs, and run "make". (each time running cabal install as it complained). wondering if there's a step that isn't documented. | 20:53 | ||
20:53
birdwindupbird left
|
|||
au | [Coke]: have you tried just "cabal install Pugs"? | 20:54 | |
(affter a "cabal update", of course) | |||
[Coke] | I /think/ that's what make does. I just reset the git repo, trying that. | 20:56 | |
(does .../Pugs require a pre-built pugs for bootstrapping?) | 20:57 | ||
au | no. it was designed after Hugs, a stand-alone interpreter. | ||
masak | oh, good. leveraging au to get a working Pugs.hs -- [Coke]++ | 20:58 | |
masak does a 'cabal update', Justin Case | 20:59 | ||
[Coke] | masak: it feels like cheating, but I'm not above that. ;) | ||
au: once I get it running, I'm going to spend some time refudging the spectest suite, i think. You see any issues there? | 21:00 | ||
au marvels at how a complete Pugs compilation with recursive dependencies took just 10min here | |||
(it used to take ~3hrs.) Moore++ | |||
[Coke]: sounds good. | 21:01 | ||
21:01
GlitchMr42 left
|
|||
[Coke] | lining! | 21:02 | |
*linking! | |||
flussence | .oO( silver linking! ) |
||
au | . o O ( slivers linking! ) | ||
[Coke] | linking slooww | 21:03 | |
colomon | . o O ("Lowered him down on a silver chain") | ||
[Coke] | $ /home/coke/.cabal/bin/pugs -e "'woot'.say" | 21:04 | |
woot | |||
so, I'm guessing the Makefile is broken. | |||
make is running "cabal build", but au said "cabal install Pugs" | |||
au | it's like "cpanm" vs "cpanm Pugs". | 21:05 | |
one is building local checkout, one is fetching from hackage. | |||
geekosaur | yeh, that just means "do the build phase in the current directory" | ||
au | (fwiw, both worked for me on feather with fresh github audreyt/Pugs.hs checkout.) | 21:08 | |
[Coke]: mind if I run "make" in your ~coke/sandbox? | 21:10 | ||
[Coke] | NOOOOOO, go right ahead. ;) | 21:11 | |
(but now that I did the build, it might ack differently. Iunno) | |||
au: how would you normally run the spectests? | 21:12 | ||
sorear | good * #perl6 | ||
au | uh, the last time I hacked perl6, it was before spectests :) | ||
PerlJam | Is someone going to update perl6.org/compilers/features.html with pugs info? :) | ||
au | [Coke]: /home/coke/sandbox/Pugs.hs/Pugs/dist/build/pugs/pugs built just fine. | 21:13 | |
(under "sudo su - coke") | |||
so maybe the cabal update picked up a good haskeline release version, or some such. | |||
[Coke] | au - might be because I had a successful install already. *shrug* | ||
right. | |||
no matter, it works now. | 21:14 | ||
au | \o/ | ||
masak | sorear! \o/ | ||
PerlJam idly wonders if all of the Perl 6 implementors have ever been in #perl6 simultaneously | |||
masak | [Coke]: whatdidyoudo whatdidyoudo!? | ||
au | PerlJam: it'll be yellow ± on pretty much all rows :) | 21:15 | |
so, not exactly informative | |||
masak | we'll change that :) | ||
PerlJam | au: sure it will ... as people update it, those rows will change color | ||
au | *nod* | 21:16 | |
[Coke] | masak: try "cabal install Pugs" instead of "make" | 21:17 | |
masak | ooh | ||
masak tries | |||
[Coke] | github under attack again? :( | ||
21:18
ksi_ joined
|
|||
sorear | o/ masak | 21:18 | |
o/ o/ au | |||
au | hey sorear :) | ||
flussence | [Coke]: cat thing says yes. status.github.com/ | 21:19 | |
well yes as in "our five nines are under attack!" | |||
au | wow, it's past 10pm already... have a good localtime hackers. -> {sleep} | 21:20 | |
flussence | eek, page just went red | 21:21 | |
21:23
kst left
21:25
bluescreen10 left
|
|||
masak | \o/ # Pugs built! | 21:26 | |
au++ | |||
[Coke]: we should do something about the instructions in INSTALL, though. | 21:27 | ||
[Coke] | masak: I'll let you. I'm glaring at spectests. | ||
masak | oh wait, INSTALL is full of 'cabal install Pugs' | ||
huh! | |||
had I only read this properly, instead of trying to run 'make', it'd probably have worked the first time... | 21:28 | ||
PerlJam | reading++ | ||
[Coke] | masak: one of the things does say to run make, though. | 21:29 | |
gist.github.com/1855576 | |||
masak | running 'make' still doesn't work. | ||
same error. | |||
21:30
kst joined
|
|||
masak | yes, .gist is very new. | 21:30 | |
au | masak: try "rm -rf Pugs ; git reset --hard"? | ||
masak does so | 21:31 | ||
[Coke] | the spectest cleanup is going to be monumental. ;) | 21:34 | |
[Coke] will get something committed this weekend that has at least enough so folks can say "make spectest" and run /something/ | |||
s/cleanup/refudge | 21:35 | ||
sorear | au: do you know about git clean -dfx ? | ||
masak | au: same error after "rm -rf Pugs ; git reset --hard" | ||
the one saying 'No instance for (MonadIO (InputT IO))' | |||
[Coke]: aren't you getting this error any more? | |||
au | sorear: I didn't. thanks! | 21:36 | |
masak: I'm reinstalling haskeline for you, a sec. | 21:39 | ||
masak | thanks. I had an error message about haskeline, so I did 'cabal install haskeline' two 'make's ago. | 21:40 | |
maybe that wasn't enough, though. | |||
21:44
pomysl_ joined,
pomysl left,
Tarmvred left
21:46
mj41 left
|
|||
au | yeah. I ended up doing | 21:46 | |
"ghc-pkg unregister haskeline; cabal install --reinstall haskeline" | |||
and that worked. | |||
masak: you have an entirely unoptimized build of pugs in ~/Pugs.hs/Pugs/dist/build/pugs/pugs now -- share & enjoy :) | 21:47 | ||
21:47
thou left
|
|||
au | (might want to git clean -dfx and rebuild again to get optimized version instead of the fast-building-slow-running "cabal install -O0" one.) | 21:47 | |
g'localtime for real :) & | |||
jnthn home :) | 21:53 | ||
masak | au++! | 21:55 | |
au: thanks! | |||
[Coke] | moritz++ - very easy to copy over the t/* utilities I need from niecza/rakudo | 21:59 | |
jnthn | masak: #110918 is a dupe | ||
[Coke] | (and quite a few spectests still pass in pugs with no additional fudging!) | ||
au++ | 22:00 | ||
22:01
pmurias joined
|
|||
masak | jnthn: hm -- it felt a little like one when I submat it. | 22:01 | |
22:02
shinobicl_ left
|
|||
[Coke] | if I want a t, t/spec hierarchy in pugs, where do I put it? top level? .../Pugs subdir? | 22:04 | |
[Coke] thinks toplevel. | |||
masak | +1 | 22:05 | |
[Coke] | "pugs", 637, 0, 1, 0, 638, 22744 | 22:07 | |
... that's with about 10m of effort. | |||
PerlJam | Coke++ | 22:08 | |
masak | \o/ | ||
this'll be fun! | |||
Coke++ | |||
[Coke]: don't forget to push whatever you create in t/spec :) | 22:09 | ||
(the rest of us want to play, too!) | |||
[Coke] | masak: commuting shortly. You'll have something to play with in the morning, OK? | 22:10 | |
22:10
kst left
|
|||
masak | deal. | 22:13 | |
jnthn: tickets merged, thanks. | |||
jnthn | asbra :) | ||
masak | phenny: sv en "asbra"? | 22:14 | |
phenny | masak: "asbra" (sv to en, translate.google.com) | ||
masak | translator I am disappoint. | ||
phenny: sv en "bra"? | |||
phenny | masak: "good" (sv to en, translate.google.com) | ||
masak | phenny: sv en "as-bra"? | ||
phenny | masak: "as- well" (sv to en, translate.google.com) | ||
jnthn | fail :) | 22:15 | |
masak | phenny: sv en "så jävla bra"? | ||
phenny | masak: "so damn good" (sv to en, translate.google.com) | ||
masak | :) | ||
jnthn | Ain't jävla a place just a bit north of Stockholm? :) | 22:16 | |
22:16
MayDaniel left
|
|||
[Coke] | masak: hurm. I changed my mind. Here you go: | 22:16 | |
dalek | gs.hs: 466f840 | coke++ | / (5 files): Run (some) spectests. This commit adds in a bunch of tools from niecza/rakudo to run the spectests, as well as a small list of known-to-pass spectests in t/spectest.data |
||
[Coke] | I added some directions/caveats in HACKING. | 22:17 | |
Please do not eat ALL the low hanging fruit. ;) | |||
22:18
kst joined
|
|||
[Coke] | Should be possible to bump that 637 number up to several thousand this evening. | 22:18 | |
(with only minimal fudging) | 22:19 | ||
22:19
lestrrat left
|
|||
[Coke] | ping me with any problems on the HACKING notes. back online in a few hours. | 22:19 | |
22:20
lestrrat joined
|
|||
masak | [Coke]++ | 22:20 | |
jnthn: no, that's "Gävle" :) | 22:21 | ||
but I can see the possibility of confusion there. | |||
pmurias | sorear: what's the slow part of compiling NieczaActions.pm? | 22:22 | |
sorear: or generally what slows down the compilation the most? | 22:23 | ||
22:33
aoeuhtns left
22:34
rgc joined
|
|||
sorear | pmurias: I don't really have a clue. | 22:35 | |
I think the memory usage could probably be cut some by hacking in a method to throw away branches of the parse tree that we're done with | 22:36 | ||
sorear checks calendar ... good, a whole week until release day | |||
pmurias | sorear: should 2GB of ram be enough? | 22:38 | |
sorear: for the memory usage not to be a problem? | 22:39 | ||
22:39
arlinius joined
|
|||
sorear | absolutely | 22:40 | |
remember, my dev box has 0.375GB :D | |||
jnthn | You can even compile *RAKUDO* with 2GB and it's currently a memory pig. | ||
pmurias | sorear: is the command flag to show time use per compilation phase still present? | 22:42 | |
sorear: do you recompile niecza with make after making a change or just the file? | 22:43 | ||
sorear | I use make | 22:45 | |
if you have a sufficiently new mono (2.8.1+), use MONO_ENV_OPTIONS=--gc=sgen | 22:46 | ||
that activates the Mono native GC, which saves a bit of memory per object | |||
pmurias | does that speed up stuff? | 22:50 | |
sorear | usually | ||
it makes allocations a lot faster, but slows down writes (write barrier) | |||
niecza makes a lot of garbage... | 22:51 | ||
diakopter | gigo :P | 22:52 | |
masak .oO( Affirming the Consequent ) | 22:58 | ||
23:00
ilogger2 joined,
ChanServ sets mode: +v ilogger2
|
|||
diakopter | wb ilogger2 | 23:00 | |
masak | ilogger2 is the silent, stoic kind of bot. | ||
ilogger2: aren't you? aren't you the silent, stoic kind? yes, you are! yes, you are! | 23:01 | ||
ilogger2 | masak: I am a logger bot. Lines starting with [off] won't be logged. Extra help available at colabti.org/irclogger/irclogger_logs. | ||
masak ruffles ilogger2's fur | |||
whoa :) | |||
not so silent, I guess. but polite :) | 23:02 | ||
pmurias | sorear: niecza doesn't seem to print the time usage per compiler part anymore | ||
with the --verbose flag | |||
sorear | pmurias: yeah, there are no stages anymore | 23:04 | |
pmurias: stuff had to be interleaved to make BEGIN work | |||
23:05
kst joined
|
|||
pmurias | the stack traces from exceptions are getting annoying :( | 23:10 | |
diakopter | lol [off] the magic dragon | 23:13 | |
masak | I thought you might like that one :) | ||
but you just blew our cover :P | |||
diakopter | oops | ||
maybe it means off not [off] | 23:14 | ||
no | |||
pmurias | sorear: why do we need Run.*.dll? | 23:22 | |
benabik | Otherwise it won't know how to run? | ||
pmurias | benabik-- | 23:23 | |
benabik | awh | 23:24 | |
pmurias | benabik: there's both Run.Kernel.dll and Kernel.dll | ||
sorear | pmurias: Run.Kernel.dll is compiled from the current version of lib/*.cs | ||
Kernel.dll is copied from niecza-14.zip | |||
by giving them different names, they don't interfere with each other | 23:25 | ||
pmurias | sorear: eval(:from<perl5>,...) throws a casting C# exception when run from NieczaActions.pm6 | ||
sorear: could it have anything to do with it? | |||
sorear | yes | 23:26 | |
I do not endorse calling eval from within the compiler | |||
the idea is that there are two sandboxed spaces - you can have NieczaActions in user code, and it won't interfere with the compiler | 23:27 | ||
(this is necessary for bootstrapping) | |||
eval(:from<perl5>,...) doesn't make the switch from compiler space to user space, so even if it worked, it would be wrong | 23:28 | ||
pmurias | i understand | 23:32 | |
so how can i call the user space eval? | |||
sorear | I'd probably do it by adding a new method to $*unit | 23:38 | |
$*unit.foo calls the "unit_foo" method in lib/CodeGen.cs in user space | |||
that is fundamentally the only way the transition happes | |||
23:44
kst left
23:57
kst joined
|