»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot: perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 27 June 2009. |
|||
pmichaud | Good evening, #perl6 (from OSCON) | 00:00 | |
00:12
Whiteknight joined
00:13
pyrimidine joined
|
|||
pyrimidine | pmichaud: Hi! Have fun at OSCON. | 00:15 | |
pmichaud | I plan to do so :-) | ||
00:15
jhuni joined
|
|||
pyrimidine | Great to hear about the -G bugs clearing up as well (and that last min. fix for hash ordering) | 00:16 | |
(for class attributes) | |||
pmichaud | yes, I was pleased I could get that one in place. | 00:19 | |
Teratogen | I want Perl 6 now! | 00:27 | |
00:27
pyrimidine is now known as Perl
00:28
Perl is now known as pyrimidine
|
|||
pyrimidine | rakudo: my StrInt $foo = 1; say $foo; | 00:29 | |
p6eval | rakudo 415514: ( no output ) | ||
pyrimidine | rakudo: subset StrInt of Any where { .does('Int') || .does('Str') }; my StrInt $foo = 1; say $foo; | ||
p6eval | rakudo 415514: OUTPUT«1» | ||
pyrimidine | there's some of your perl 6 | ||
(and isn't a Teratogen a chemical agent that causes birth defects?) | 00:31 | ||
Teratogen | not just chemical | ||
any | |||
pyrimidine | ah | ||
I should know that, being a biologist | |||
Teratogen | I read an article about Perl and the sequencing of the human genome | 00:32 | |
pyrimidine | by Lincoln Stein | 00:33 | |
I collaborate with him on BioPerl | |||
though these days he's pretty focused on Gbrowse | 00:34 | ||
rakudo: my Int|Str $foo = 1; say $foo; | |||
p6eval | rakudo 415514: OUTPUT«Malformed declaration at line 2, near "Int|Str $f"Null PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | ||
pyrimidine | guess this version of polymorphic types is NYI | 00:36 | |
00:37
pyrimidine left
00:45
jhuni left
00:46
jhuni joined
00:51
dukeleto joined
00:52
dukeleto left,
dukeleto joined
00:59
explorer left
01:06
Casan joined
01:14
unitxt joined
01:18
alester joined
01:20
lichtkind left
01:21
justatheory joined
01:22
justatheory left
01:26
Chillance left
01:30
jhorwitz left,
dukeleto left
01:31
Whiteknight left
01:44
jhuni left
01:58
test34 left
02:04
justatheory joined
02:07
szabgab left
02:08
szabgab joined
02:11
missingthepoint_ joined
|
|||
missingthepoint_ | hi all... as discussed with moritz++, i'm trying to document my learning process vis-a-vis perl 6 | 02:15 | |
and I thought I'd write a newbies FAQ of sorts, comprised of questions I've had while learning | |||
It would be great to get answers to some of these questions from people here | 02:16 | ||
Some of the questions I can even answer myself, but there's a great chance I'm missing a lot | 02:17 | ||
02:18
jhuni joined
|
|||
missingthepoint_ | I'd appreciate anyone answering some random P6/Parrot questions, here or in privmsg | 02:18 | |
s{P6/Parrot}{P6/Parrot/Rakudo...} | 02:19 | ||
so let me know | |||
:) | 02:22 | ||
perhaps a better approach is for me to write up some Qs + As, then request comments | 02:23 | ||
02:23
zamolxes_ joined
|
|||
missingthepoint_ | if that makes more sense, say so | 02:23 | |
Casan | so | 02:26 | |
missingthepoint_ | :) | ||
i'll start writing | |||
check the pugs repo in a few hours :) | 02:27 | ||
pmichaud | I'll answer random questions | 02:29 | |
the channel is often a good place for random Q+A's, but possibly not on a Sunday afternoon (the night before OSCON) | |||
lots of folks are on vacation, traveling, or otherwise occupied :-) | |||
but truthfully, if you just write the FAQ and it has errors, someone will likely point them out quickly :-) | 02:30 | ||
02:34
zamolxes left
02:37
Casan left
|
|||
Tene | missingthepoint_: just ask the questions in here. | 02:39 | |
skids around for an hour for questions. | 02:42 | ||
Not that I'm an authority on anything :-) | 02:43 | ||
02:49
FCO left
03:00
dukeleto joined
|
|||
missingthepoint_ | skids: i'll appreciate your input nonetheless; you're likely more of an authority than I :) | 03:03 | |
pmichaud: ah, wasn't aware of OSCON :) | |||
pmichaud: i'm a little far away -> not an option for me -> not really aware of such things :) | 03:04 | ||
Tene: i'll ask and write simultaneously | |||
03:04
FCO joined
03:06
ihrd joined,
ihrd left
03:10
pochi left
03:11
meppl left
03:26
agentzh joined,
SmokeMachine joined
03:28
FCO left
03:36
molaf joined
03:41
bacek joined
03:51
sri_kraih left
03:52
ihrd joined
|
|||
missingthepoint_ | is there a canonical place where the P6 implementations are listed? | 03:54 | |
ha, timing palindrome :) | |||
(sorry, ignore that) | |||
03:55
synth left
|
|||
missingthepoint_ | www.perlfoundation.org/perl6/index....mentations ? | 03:56 | |
04:05
justatheory left
04:15
ihrd left
04:22
ihrd joined,
ihrd left
04:35
PZt joined
04:54
szabgab left,
szabgab joined
05:02
xinming_ joined
05:03
xinming left
|
|||
skids | missingthepoint_: there's something called "elf" that's missing there. | 05:06 | |
05:09
ihrd joined
05:10
ihrd left
|
|||
missingthepoint_ | skids: thanks :) | 05:13 | |
05:17
finanalyst joined
|
|||
finanalyst | good morning. is anyone here or is it a $day? | 05:17 | |
sjohnson | i'm here | 05:18 | |
finanalyst | i have a fairly long program with an array. first time through the iteration, there is an array that can be written to. the second time through, rakudo says it is read-only. how do i monitor where the trait changed? | 05:20 | |
05:24
zamolxes_ left
05:35
simcop2387 is now known as me,
me is now known as simcop2387
05:39
synth joined
05:47
justatheory joined
05:53
dukeleto left
05:58
justatheory left
06:09
skids left
06:17
alester left
06:22
nihiliad left
06:27
wayland76 joined,
rfordinal left,
yves left
06:28
rfordinal joined
|
|||
moritz_ | missingthepoint_: the "canonical" list of Perl 6 implementations and other projects is on perl6-projects.org | 06:35 | |
06:37
iblechbot joined
|
|||
missingthepoint_ | moritz_: thanks. i'm debating whether to just link there or include the list from there, and expand on it (re projects and their statuses) | 06:40 | |
moritz_ | status is intionally not included on that page, because in general it changes much more often than the list itself | 06:42 | |
and I wanted to create a page that's kept up to date, far too many Perl 6 pages are somewhat outdated | 06:43 | ||
missingthepoint_ | hmm, i should probably rethink things a bit... writing some Beginner's FAQs as promised | 06:45 | |
06:46
rfordinal left,
azawawi joined
|
|||
azawawi | pmichaud: ping | 06:46 | |
missingthepoint_ | moritz_: ... and wanted to give overview of the projects and "what fits where" | ||
moritz_: but status may not be an appropriate part of that overview | 06:47 | ||
moritz_ | "use rakudo; other compilers exists in various stages; see $link or find out yourself" ;-) | 06:48 | |
missingthepoint_ | moritz_: i see what you mean. lots of pages on p6wiki are outdated, and a fair bit of docs/ in pugs svn | ||
moritz_: hehe :) | 06:49 | ||
moritz_: i'll probably end up saying something close to that :) | |||
06:52
azawawi left
07:03
rfordinal joined
07:17
pochi joined
07:24
dakkar joined
07:25
chid left
|
|||
Matt-W | Good morning | 07:30 | |
wayland76 | Good evening :) | 07:31 | |
sjohnson | y0 | 07:32 | |
Matt-W | Aaah, the joy of time zones | ||
wayland76 | phenny: tell pmichaud Can you comment on rt.perl.org/rt3/Ticket/Display.html?id=63360 to indicate whether it's accurate, or leave me a message via phenny or something? | ||
phenny | wayland76: I'll pass that on when pmichaud is around. | ||
Matt-W | Later today I will inevitably say 'good afternoon' to somebody who says 'good morning' | ||
And chuckle | 07:33 | ||
Such amusement as can be found on a Monday should be cherished | |||
wayland76 | phenny: tell pmichaud (ie. I want to know whether my most recent comments are accurate) | ||
phenny | wayland76: I'll pass that on when pmichaud is around. | ||
wayland76 | (for others in the IRC channel wondering what I'm asking pmichaud to have a look at, it's a ticket to do with getting Rakudo working on a preinstalled parrot | 07:35 | |
07:47
NewOrder left
|
|||
Matt-W | Aaah | 07:50 | |
That'd be nice | |||
Particularly for people who track the monthly releases | 07:51 | ||
wayland76 | I had something that worked for me, but pmichaud didn't like it, so he's tried something, but I doubt it works for Windows people | 07:53 | |
07:53
agentzh left,
agentzh joined
08:01
ssm left
08:03
xinming_ left,
tann joined
08:08
xinming joined
08:10
missingthepoint_ left
08:14
tann left
08:19
kane_ left
08:22
rfordinal left
08:23
payload left
08:32
bpetering joined
08:38
bpetering is now known as missingthepoint,
missingthepoint is now known as bpetering
08:41
bpetering is now known as missingthepoint,
missingthepoint left
08:45
masak joined
|
|||
masak | greetings, gathercamels! | 08:47 | |
lambdabot | masak: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
masak | @massage | ||
lambdabot | literal said 4d 10h 17m 18s ago: gah, sorry I couldn't make it tonight :( | ||
Matt-W raises an eyebrow | |||
'gathercamels'? | 08:48 | ||
masak | Matt-W: um, as in gather/take. | ||
Matt-W | yes I figured that | ||
masak | :) | ||
moritz_ is more of a takecamel | |||
Matt-W | lol | ||
Matt-W is trying to spontaneously learn sparc assembly | |||
moritz_ | or is that cameltake then? | ||
Matt-W | gather for @camels -> $camel { take $camel } | 08:49 | |
It's the coolest way to do an identity transform on a list! | |||
masak really likes 'gather for' | |||
Matt-W does too | |||
moritz_ | rakudo: say gather for 1 { take 2 } | 08:50 | |
p6eval | rakudo 415514: OUTPUT«2» | ||
literal | hey masak | ||
masak | ...and 'gather while', and 'gather given'... | ||
Matt-W | however, there's some stuff I'm doing with it I would probably be better off doing with map | ||
moritz_ | I didn't even know it worked :-) | ||
masak | literal: hey. | ||
literal | masak: will you be here in 20 minutes time? | ||
masak | literal: aye. | ||
literal | ok, gonna head to work, will catch up with you there | ||
masak | nod. | ||
08:52
explorer joined
08:55
agentzh left,
finanalyst left,
szabgab left,
bacek left,
mdxi left,
eternaleye left,
Teratogen left,
tarbo2_ left,
rjh left,
stepnem left,
pmichaud left,
gbacon left,
estrabd left,
Trey left,
leedo left
08:56
pmichaud joined,
agentzh joined,
finanalyst joined,
szabgab joined,
bacek joined,
Teratogen joined,
mdxi joined,
eternaleye joined,
tarbo2_ joined,
rjh joined,
stepnem joined,
gbacon joined,
estrabd joined,
spx2 joined,
omega joined,
Trey joined,
leedo joined,
irc.freenode.net sets mode: +oo pmichaud Trey
08:58
stepnem left
09:02
stepnem joined
|
|||
pugs_svn | r27622 | moritz++ | [t/spec] fudge test that TimToady++ corrected and now does not pass on Rakudo anymore | 09:02 | |
09:03
stepnem left
|
|||
masak | moritz_: is it entirely kosher to fudge regressions? | 09:05 | |
moritz_ | masak: it's not a rakudo regression | ||
masak | oh, I see now. | ||
then it's probably the right thing to do, yes. | |||
09:12
Guest33554 joined
|
|||
literal | masak: since the rest of my gsoc schedule is concerned with writing/assimilating docs, what type of documentation do you think I should focus on? | 09:19 | |
moritz_ | first of all blog about your progress so far. | 09:20 | |
literal | ok | ||
masak | literal: what moritz_ said. | 09:21 | |
wayland76 | literal: And then post a link to your blog here :) | 09:29 | |
(literal: especially since I don't even know what your project is :) ) | |||
moritz_ | IMHO the next step would perlintro for Perl 6 | 09:30 | |
literal | I had started fixing up the perlintro that's in the pugs repo | ||
09:32
donaldh joined
|
|||
masak | rakudo: sub foo { return }; say foo.WHAT; say ?(foo ~~ Nil) | 09:39 | |
p6eval | rakudo 415514: OUTPUT«Nil()0» | ||
masak | rakudo: sub foo { return }; say foo.WHAT; say ?(foo() ~~ Nil) | ||
p6eval | rakudo 415514: OUTPUT«Nil()1» | ||
masak | dang, I still screw up wrt listop precedence sometimes. | ||
KyleHa++ # tests for RT tickets | 09:41 | ||
09:41
patmat joined
|
|||
dakkar | rakudo: sub foo { return }; say &foo.WHAT | 09:42 | |
p6eval | rakudo 415514: OUTPUT«Sub()» | ||
literal | how optional are parens around function arguments? are they only needed when the name might clash with a builtin or operator? | ||
masak | rakudo: sub next() { say "OH HAI" }; next | 09:47 | |
p6eval | rakudo 415514: OUTPUT«OH HAI» | ||
masak | literal: seems user-defined subs take precedence. | ||
09:49
Jedai left
10:01
damyan joined
10:05
sparc_ left,
CorpX joined
10:06
CorpX left
10:07
synth left
10:13
[particle] left
10:14
[particle] joined
|
|||
moritz_ | next; is also implemented as a sub | 10:24 | |
literal | it's weird that I can't fetch or update rakudo from github, yet I can do the same with other github repos | 10:25 | |
some firewall issue here perhaps | 10:26 | ||
Matt-W | that would be a weird firewall issue | 10:28 | |
literal | yeah | 10:29 | |
I ended up pulling the repo from a machine in another country, then fetching a tarball of it to my computer | |||
moritz_ | ouch | 10:30 | |
literal: did you use git:// or http:// | |||
literal | git:// | ||
10:32
Jedai joined
|
|||
literal | after doing "perl ./Configure.pl --gen-parrot", at one point it tries to display a couple of Pod files with perldoc(1) instead of converting them, then fails when it can't find "ops/bit.pod" | 10:34 | |
anyone had this problem? | |||
lisppaste3 | literal pasted "Parrot build failure" at paste.lisp.org/display/83841 | 10:35 | |
10:36
icwiener_ joined
|
|||
wayland76 | Might be worth asking on #parrot | 10:37 | |
literal | yeah | ||
wayland76 | (on irc.parrot.org ) | ||
pmichaud | good (early) morning, #perl6 | ||
phenny | pmichaud: 07:32Z <wayland76> tell pmichaud Can you comment on rt.perl.org/rt3/Ticket/Display.html?id=63360 to indicate whether it's accurate, or leave me a message via phenny or something? | ||
pmichaud: 07:33Z <wayland76> tell pmichaud (ie. I want to know whether my most recent comments are accurate) | |||
wayland76 | Good evening :) :) | ||
Actually, since I'm here now, feel free to just discuss it in-channel, if you've time at the moment :) | 10:38 | ||
moritz_ | literal: that's weird, it shouldn't even convert PODs | ||
literal | well, there are som perldoc lines in there, like "/usr/bin/perldoc -ud packfile-c.pod ../src/packfile.c | 10:39 | |
moritz_ | literal: could you please run cd parrot; make realclean; perl Configure.pl && make | ||
literal | ok | ||
moritz_ | oh wait | ||
it will come out the same | |||
wayland76 | moritz_: It seems to me like it's trying to extract pod from C files | 10:40 | |
Matt-W | Wheee! | ||
Matt-W had a 70 minute meeting in which we mostly complained about the state of the source tree at work | |||
moritz_ | literal: if you are lucky, 'cd parrot; make -k' builds enough of parrot to run rakudo | 10:41 | |
wayland76 | ...and did anyone say "fair squeeze of the source bottle"? :) | ||
literal | if I manually execute the "/usr/bin/perldoc -ud packfile-c.pod" command while in docs/ I can call "make" again and it will continue until it fails on the next such Pod extraction | 10:44 | |
the Makefile is somehow executing "/usr/bin/perloc /usr/bin/perldoc -ud packfile-c.pod" | 10:45 | ||
which gives me the same error | |||
wayland76 | That's pretty much the conclusion I just came to | 10:46 | |
moritz_ | perloc? | ||
wayland76 | He means perldoc | ||
literal | I meant to write perldoc | ||
moritz_ | ok | ||
wayland76 | it's running perldoc on itself | ||
literal | this is from a fresh pull of Rakudo and Parrot, so there hasn't been any tampering by me | 10:47 | |
moritz_ | so, it's a Configure.pl FAIL | ||
please open a trac ticket for that | 10:48 | ||
trac.parrot.org/parrot/newticket (you need to log in first) | 10:49 | ||
10:51
M_o_C joined
10:52
icwiener left
10:55
meppl joined
10:58
Front_slash joined
11:00
szabgab left
11:05
szabgab joined
11:17
nErVe joined,
Guest33554 left
11:20
donaldh left,
stepnem joined
11:21
donaldh joined
11:24
rindolf joined
11:28
ihrd joined
11:29
mikehh joined
11:33
jhuni left
11:34
payload joined
11:35
ihrd left
|
|||
wayland76 | phenny: tell pmichaud OK, I'm leaving the channel now (see previous comments from me) | 11:36 | |
phenny | wayland76: I'll pass that on when pmichaud is around. | ||
11:36
wayland76 left
11:39
nErVe left,
damyan left
11:40
damyan joined
11:48
synth joined
11:50
sri_kraih joined
11:54
dukeleto joined
12:11
payload left
|
|||
moritz_ | rakudo: class A { has Int $.x where { $_ < 23 } }; A.new(x => 1) | 12:12 | |
p6eval | rakudo 415514: ( no output ) | ||
moritz_ | rakudo: class A { has Int $.x where { $_ < 23 } }; A.new(x => 42) | ||
p6eval | rakudo 415514: ( no output ) | ||
masak | I remember that one. :) | ||
moritz_ | so how do I declare an anonymous subtype on a parameter? | 12:13 | |
masak | sub foo($param where { ... }) | ||
moritz_: like that? | |||
moritz_ | erm, I meant attribute | ||
but I just couldn't think. | |||
masak | moritz_: like you did above? | 12:14 | |
(except it isn't enforced in Rakudo) | |||
12:14
rindolf left
|
|||
masak | moritz_: I thought you were reiterating an old masakbug. | 12:14 | |
moritz_ | rakudo: class A { has Int where { $_ < 0 } $.x }; A.new(x => 42) | ||
p6eval | rakudo 415514: OUTPUT«Malformed declaration at line 2, near "Int where "Null PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | ||
masak | whoa. | ||
moritz_: submit! | 12:15 | ||
seems like a Null PMC Access during error reporting. | |||
moritz_ | submitted. | 12:21 | |
Matt-W blinks | 12:22 | ||
Did I just see masak tell someone else to submit a bug?? | |||
masak | Matt-W: I'm just back from a four-day vacation. I haven't re-revved up the engines. :P | 12:30 | |
12:31
jonathanturner joined
|
|||
masak | but it's not that uncommong that I ask people to submit bugs they discovered. | 12:31 | |
s/ong/on/ | |||
moritz_ | when I ask people to write tests for bugs they discover I don't have as much success | ||
masak | writing tests feels like a bigger task. | 12:32 | |
'sides, it's more rewarding to complain than to standardize. :) | 12:33 | ||
moritz_ | I'm glad that KyleHa++ has taken it up | 12:34 | |
masak | yes, that's awesome. | ||
I once called November the biggest Perl 6 application, but it really isn't if you count the test suite. | 12:35 | ||
and the test suite needs devs just as much as November does. | |||
moritz_ | it's not what you'd usually call an application | 12:36 | |
masak | just a matter of definitions, I think. | ||
it's not a coherent whole, but a lot of small parts. | |||
still, it's a large chunk of Perl 6 code. | |||
moritz_ | aye | ||
over the weekend I found a STD bug (er NYI) while writing tests | 12:37 | ||
masak | \o/ | ||
moritz_ | s[foo] x= 2 | ||
std: s[foo] x= 2 | |||
literal | huh, tried checking out parror separately and building there, and it works | ||
p6eval | std 27622: ( no output ) | ||
literal | so it's a Rakudo build problem somehow | ||
moritz_ | should be the same .subst(/foo/, { $/ x 2 }) | ||
bah, what's wrong with p6eval now? | 12:38 | ||
12:38
p6eval left
12:39
p6eval joined
12:48
dukeleto left
12:58
explorer left
|
|||
masak just discovered perlgeek.de/blog-en/perl-6/rakudo-overview.html | 12:59 | ||
moritz_++ | |||
moritz_ | thanks | ||
I spend some fun hours trying to learn inkscape | 13:00 | ||
13:00
Avada joined
|
|||
moritz_ | s/spend/spent/ | 13:00 | |
grammar is hard. | |||
masak | let's go shopped! | 13:05 | |
13:11
M_o_C left
|
|||
masak | std: alarm | 13:20 | |
p6eval | std 27622: OUTPUT«Undeclared routine: alarm used at 1 ok 00:02 36m» | ||
13:21
skids joined
13:22
maja joined
|
|||
moritz_ | std: s[foo] x= 2 | 13:22 | |
p6eval | std 27622: OUTPUT«##### PARSE FAILED #####Missing '=' at /tmp/fngP746itL line 1:------> s[foo] x= 2FAILED 00:04 37m» | ||
moritz_ | it doesn't allow modified assignment ops, even though S05 explicitly does | 13:23 | |
masak | STD-bug! | ||
moritz_ | aye. I'm sure sombody[tm] will notice on running 'make test' | ||
masak | oh, new tests? | 13:24 | |
moritz_ | aye | 13:27 | |
I looked over t/spec/TODO on Friday and Saturday and came up with some s[], s/// and ss/// tests | |||
masak | the Makefile in src/perl6 still uses gimme5, but gimme5 is being phased out in favour of viv, right? | ||
moritz_ | slowly, yes | 13:28 | |
13:28
xiaoyafeng joined
|
|||
masak | why? what's the difference between them? | 13:28 | |
moritz_ | gimme5 uses a hackish, regexp-based parser to translate 6 to 5 | 13:29 | |
13:29
iblechbot left
|
|||
moritz_ | viv uses STD.pm to parse the Perl 6 | 13:29 | |
and nothing but STD.pm can parse Perl 6, or so they say :-) | |||
masak | and gimme5 fakes it? | 13:30 | |
moritz_ | yes | ||
masak | viv++ | ||
moritz_ | if you ++ viv, it give vivi | 13:33 | |
masak | :) | 13:34 | |
moritz_ | which I'd like to have | ||
6 on 6, the bootstrapped Perl 6 compiler... /me floats away in his dreams | 13:35 | ||
masak | rakudo: $viv = 'ⅵⅴ'; $viv++; say $viv | ||
p6eval | rakudo 415514: OUTPUT«Symbol '$viv' not predeclared in <anonymous> (/tmp/vTLWQTfxuV:2)in Main (src/gen_setting.pm:3340)» | ||
masak | rakudo: my $viv = 'ⅵⅴ'; $viv++; say $viv | ||
p6eval | rakudo 415514: OUTPUT«ⅵⅵ» | ||
masak | \o/ | ||
13:36
Rolo joined
|
|||
dakkar | *why* does it work??? | 13:36 | |
moritz_ | masak: care to submit that as a test? :-) | ||
dakkar is scared of rakudo, sometimes | 13:37 | ||
moritz_ | dakkar: because rakudo knows about the Unicode roman number literals | ||
dakkar | ow, it's two characters | ||
13:37
Avada left
|
|||
moritz_ | aye | 13:37 | |
and it increments the lasts | |||
masak | moritz_: I would, but I'm kinda working... | ||
13:37
takadonet joined
|
|||
dakkar | ok, it's less scary that I thought at first | 13:37 | |
takadonet | morning everyone | ||
moritz_ | and if there's an overflow, it increments the next-to-last etc | ||
masak | dakkar: glad I succeeded in freaking you out. :) | 13:38 | |
moritz_ | masak: don't hurry, you can do it tonight when you've stopped working :-) | ||
masak | moritz_: I might. | ||
but the sand I write my mental notes in is a bit slippery. | |||
13:38
zamolxes joined
13:39
Rolo left
13:40
Avada joined
|
|||
xiaoyafeng | good night everyone ;) | 13:43 | |
13:44
xiaoyafeng left
13:46
PacoLinux joined
13:49
gbacon_ joined
13:50
Avada is now known as Rolo
13:51
Rolo is now known as Avada,
nihiliad joined
13:58
gbacon_ left
13:59
jhorwitz joined,
ruoso joined
14:07
fridim_ joined
14:11
ironcamel1 left
14:14
maja left,
maja joined
14:22
finanalyst left
14:24
lollan joined
14:28
iblechbot joined,
pmurias joined
|
|||
pmurias | ruoso: hi | 14:28 | |
14:32
arejay joined
14:35
frew joined
14:37
cbk left
|
|||
ruoso | hi pmurias | 14:43 | |
15:02
KyleHa joined
15:07
masak left
15:14
M_o_C joined
15:16
Front_sl1sh joined
15:20
donaldh left,
donaldh joined
|
|||
pmurias | ruoso: do you think it ok if we treat yeast frames as lexical scope (that is they will handle lookup etc.)? | 15:27 | |
15:30
Front_slash left
15:31
Woody2143 left
|
|||
Lorn | dev.perl.org/perl6/doc/apocalypse.html these documents are updated? | 15:31 | |
pmichaud | Good morning, #perl6 | 15:32 | |
phenny | pmichaud: 11:36Z <wayland76> tell pmichaud OK, I'm leaving the channel now (see previous comments from me) | ||
15:32
lollan left
|
|||
pmichaud is coming to you live from Damian's "Perl 6: Why? What? How?" tutorial :-) | 15:33 | ||
moritz_ | phenny: so, tell us. Why? What? How? | ||
erm, I meant pmichaud ;-) | 15:34 | ||
Lorn | pmichaud: oscon? /me envy | ||
pmichaud | I can't say "Why? What? How?" yet -- we just started. Ask me again in three hours :-) | ||
15:36
iblechbot left
15:40
justatheory joined
15:45
Woody2143 joined
|
|||
TimToady | blear | 16:02 | |
16:05
dakkar left
|
|||
moritz_ | did you mean "blech"? ;-) | 16:06 | |
TimToady | blear : eyes :: blech : throat | ||
moritz_ | masak++ # that newest blog post | 16:09 | |
PerlJam | FWIW, feather.perl6.nl/~duff/scriptinglan...nkings.pdf | 16:12 | |
I wonder how "true" these surveys are thouth | |||
er, though | |||
16:13
payload joined
|
|||
pugs_svn | r27623 | hinrik++ | [docs] perlintro.pod: Fill in more sections, add one on smart matching | 16:20 | |
16:25
kane_ joined
|
|||
ruoso | pmurias, my point was to avoid the lookup calls, not delegate it to some other obhet | 16:26 | |
*object | 16:27 | ||
pugs_svn | r27624 | hinrik++ | [docs] perlintro.pod: Syntax fix in some code examples | 16:28 | |
16:30
donaldh left
|
|||
spx2 | arnsholt: what's your data structure book called ? | 16:36 | |
ruoso | pmurias, the lexical scope is still usefull as an object on its own | 16:39 | |
pmurias | ruoso: something we call might use CALLER, even if we store the variable in a register we might want to enable using lookup in the worst case | 16:44 | |
ruoso | pmurias, exactly... the lexical scope still needs to exist | ||
but the code needs to be smart enough to avoid doing a lookup when it's not needed | |||
16:45
azawawi joined
|
|||
azawawi | hi | 16:45 | |
pmurias | azawawi: hi | ||
ruoso | pmurias, for instance... | 16:46 | |
in the code generated by: my $a { my $b { my $c { say $a, $b, $c } } } | 16:47 | ||
the outermost block can know that the inner block needs the variable '$a' | |||
the second knows the inner needs '$a' and '$b' | |||
and so on... | |||
azawawi | std: regex anint { <digit>+ $ };proto infix:<add> (@left,@right) { ... }; | ||
p6eval | std 27624: OUTPUT«ok 00:03 38m» | 16:48 | |
ruoso | pmurias, so you simply install the container on the inner yeast frame | ||
azawawi | std:proto infix:<add> (@left,@right) { ... }; regex anint { <digit>+ $ }; | ||
ruoso | and avoid the lookup... while the lexical scope is still initialized | ||
pmurias | and if something block rebinds the variable? | 16:49 | |
s/block// | |||
azawawi | std: . | 16:50 | |
p6eval | std 27624: OUTPUT«##### PARSE FAILED #####Obsolete use of . to concatenate strings; in Perl 6 please use ~ instead at /tmp/9XcRGHB61G line 2:------> ;FAILED 00:02 36m» | ||
azawawi | std:proto infix:<add> (@left,@right) { ... }; regex anint { <digit>+ $ }; | ||
ruoso | pmurias, it means you need to store the bvalue in the yeast frame | 16:51 | |
16:51
cdarroch joined
|
|||
dalek | ok: 4d74916 | (Hinrik Örn Sigurðsson)++ | script/grok: Add note about =table problems |
16:51 | |
TimToady | azawawi: I have not yet fixed the bug that makes that run out of memory | 16:52 | |
ruoso | pmurias, but indeed, that would still do the lookup | ||
azawawi | TimToady: no problem im just following up :) | ||
ruoso | TimToady, can the use of CALLER or $*foo be used to re-bind a container? or just fetch/store values? | 16:53 | |
pmurias, a bind can be detected, I guess... | |||
TimToady, if that question is not yet answered, I'd say that forbidding that rebind would be a great improvement in the room for future optimizations | |||
16:54
Psyche^ joined
|
|||
TimToady | I'm inclined to agree, as an extension to the "lexical scopes are immutable" principle | 16:54 | |
(once closed) | |||
ruoso | great... that means re-binds are always visible to the compiler | ||
and can pessimize on that | 16:55 | ||
*the compiler can | |||
16:55
azawawi left
|
|||
ruoso | i.e.: both "$*foo := something()" and "CALLER::<$foo> := something()" to result in a failure | 16:55 | |
TimToady, does that apply to eval'ed strings as well? | 16:57 | ||
i.e.: my $foo; eval '$foo := something()'; | |||
TimToady | can argue that one both ways | 16:58 | |
eval already massively pessimizes | |||
ruoso | ah.. right.. indeed.. | ||
TimToady | but the fact that it's inline means it's the intention of the surrounding scope | 16:59 | |
ruoso | right... but that's a naive example | ||
my $a = '$foo := something()'; { my $foo; { eval $a } } | 17:00 | ||
pmurias | ruoso: re CALLER:<$foo> := something(), one can only see contextuals via CALLER right? | ||
ruoso | yes | ||
17:02
molaf left
|
|||
pugs_svn | r27625 | lwall++ | [STD] allow any assignop after s[], moritz++ | 17:03 | |
r27625 | lwall++ | lexical alias of "our" should also alias the stash, not just package object | |||
r27625 | lwall++ | other minor tweakages | |||
17:05
molaf joined
17:06
fridim_ left
17:07
payload left
17:08
kane_ left,
tann_ joined
|
|||
pmurias | ruoso: i'm not sure where to put the 'does not rebind' and 'needs those lexicals' info | 17:09 | |
17:10
Patterner left,
Psyche^ is now known as Patterner
|
|||
ruoso | pmurias, we're going to need to fiddle with STD stash | 17:10 | |
pmurias, you can check where some specific variable comes from using STD information | 17:11 | ||
and then reverse that information so that the outer yeast passes the containers to the inner yeast | |||
maybe TimToady could help a bit on how to get that data from STD | 17:12 | ||
pmurias | does the data exist in our old snapshot? | 17:13 | |
ruoso | I guess it does, since it already rejects undeclared variables, doesn't it? | 17:14 | |
moritz_ | std: s[a] + 4; | ||
p6eval | std 27624: OUTPUT«##### PARSE FAILED #####Missing '=' at /tmp/VjIPAZq3Ux line 1:------> s[a] + 4;FAILED 00:04 37m» | ||
pmurias | ruoso: it warns about undeclared variables yes | 17:15 | |
ruoso | pmurias, so it knows where the variables come from | ||
17:20
tomyan joined
|
|||
TimToady | std: 25 | 17:26 | |
p6eval | std 27625: OUTPUT«ok 00:02 36m» | ||
TimToady | std: s[a] + 4; | ||
p6eval | std 27625: OUTPUT«##### PARSE FAILED #####Malformed assignment operator at /tmp/dowhSoTZF7 line 1:------> s[a] + 4;FAILED 00:04 37m» | ||
moritz_ | std: s[1] += 4 | ||
p6eval | std 27625: OUTPUT«ok 00:04 36m» | ||
pmurias | ruoso: but the lexical pads in STD exist only during the parse and we get our AST afterwords | 17:30 | |
17:36
zamolxes left
17:37
FCO joined
17:38
mj41_ joined
|
|||
TimToady | pmurias: you can always poke pad links into the AST at reduce time | 17:46 | |
17:47
Solarion joined
17:48
xomas_ is now known as xomas,
xomas is now known as xomas_
|
|||
pmichaud | std: my @a; say @a[-1]; | 17:49 | |
p6eval | std 27625: OUTPUT«##### PARSE FAILED #####Obsolete use of [-1] subscript to access final element; in Perl 6 please use [*-1] instead at /tmp/jAKzU6kdEa line 1:------> my @a; say @a[-1];FAILED 00:02 39m» | ||
17:52
dukeleto joined
|
|||
TimToady | pmichaud: was that a Q from the tutorial? :) | 17:53 | |
17:54
SmokeMachine left
17:55
mj41 left
|
|||
pmichaud | TimToady: Yes -- Damian's slides are out of date there. I think he'll be looking for you. :-) :-) | 17:56 | |
TimToady | I'm hiding at home :) | 17:57 | |
pmichaud | I suspected as much. | 17:58 | |
KyleHa | Do I need a github acct to commit to Rakudo? | 18:01 | |
pmichaud | KyleHa: yes. And a commit bit. And for that you need a CLA :-) | ||
KyleHa | Conjugated Linoleic Acid ? | 18:02 | |
18:02
dukeleto_ joined
|
|||
pmichaud | Contributor License Agreement | 18:03 | |
www.perlfoundation.org/contributor_..._agreement | |||
KyleHa | Oh, I have to sign something? Far out. | ||
pmichaud | and you'll need some existing committers to sponsor you.... but I think we can come up with that fairly easily. :-) | 18:05 | |
18:05
cbk joined
|
|||
KyleHa | Thanks for the pointers. I had been wondering about that for a while. | 18:06 | |
I think I'll stay with git-format-patch for now. | 18:07 | ||
PerlJam | Does rakudo have a contributers guide in the repo somewhere? | ||
tann_ | does the subject of a patch submitted to an rt ticket contain [patch] [perl #xyz]? thanks | ||
pmichaud | It's called "README" | ||
pmurias | ruoso: one other way we could cut startup time would be to freeze/thaw objects instead of recreating them | 18:08 | |
PerlJam | pmichaud: the README doesn't say anything about a CLA | 18:09 | |
ruoso | pmurias, any idea on how to do it in a sane way? | ||
pmurias | ruoso: having a .c method which would return code to create the object | 18:11 | |
? | |||
ruoso | pmurias, that's what we do now | 18:12 | |
18:13
dukeleto left
|
|||
pmichaud | PerlJam: patch or commit welcome for fixing the README | 18:13 | |
or even adding a contributors guide to docs/ | 18:14 | ||
18:15
icwiener_ left
18:19
jonathanturner left
18:21
clintongormley joined
|
|||
KyleHa | Is "A.foo" the same as "A::foo"? | 18:21 | |
18:22
clintongormley left
|
|||
pmichaud | No. | 18:22 | |
The first is a method call. | |||
KyleHa | OK, I get it. | 18:23 | |
Thanks. | |||
pmurias | ruoso: and how will the lexicals be passed into Code.new? | 18:31 | |
18:32
dukeleto_ left
18:33
kane_ joined
|
|||
pugs_svn | r27626 | kyle++ | eval_dies_ok now checks for "fairly_conclusive_platform_error" | 18:38 | |
r27627 | kyle++ | Test for RT #64566 | |||
ruoso | pmurias, it's not to Code.new... we need to be able to create the closure clone and feed the variables there | ||
18:40
Jedai left
18:41
Front_sl1sh left
|
|||
pmurias | doesn't Code.new create the closure clone? | 18:44 | |
s/closure clone/a new closure/ | |||
18:49
skids left
18:50
masak joined
18:51
athomason joined
|
|||
KyleHa | std: sub foo-bar {} | 19:00 | |
p6eval | std 27627: OUTPUT«ok 00:02 36m» | ||
19:00
tomyan left
|
|||
KyleHa | std: sub sub-marine { $torp++ } | 19:00 | |
p6eval | std 27627: OUTPUT«Potential difficulties: Variable $torp is not predeclared at /tmp/rmjw0Q2peN line 1:------> sub sub-marine { $torp++ }ok 00:02 36m» | ||
KyleHa | std: sub a-b {}; a-b(); | 19:01 | |
p6eval | std 27627: OUTPUT«ok 00:02 36m» | ||
19:01
kane_ left
|
|||
KyleHa | Is it true that I should be able to define a sub with a hyphen in the name? | 19:01 | |
PerlJam | rakudo: sub foo-bar { say "hi"; }; foo-bar; | 19:02 | |
p6eval | rakudo 415514: OUTPUT«hi» | ||
PerlJam | not only does STD say so, but so does rakudo. | 19:03 | |
KyleHa | PerlJam: Thanks. That was clearly too obvious for me to see. 8-) | ||
[particle] | kyleha: and apostrophe, too! | 19:04 | |
rakudo: sub isn't { return Nil(); } | |||
p6eval | rakudo 415514: ( no output ) | ||
KyleHa | Oddly enough, I find that stranger than utf8 characters. | 19:05 | |
PerlJam | heh | ||
ruoso | pmurias, right... maybe code.new needs a :feed-registers(...) | 19:07 | |
KyleHa | rakudo: sub foo-bar { say 'hi'; }; foo-bar; | 19:11 | |
p6eval | rakudo 415514: OUTPUT«hi» | ||
KyleHa | rakudo: eval "sub foo-bar { say 'hi'; }; foo-bar;"; say "$!" | ||
p6eval | rakudo 415514: OUTPUT«hiMalformed routine definition at line 1, near "foo-bar 1;"» | ||
KyleHa | What is that? | 19:12 | |
TimToady | you interpolated {...} | 19:13 | |
KyleHa | Oh. The braces interpolate. | ||
TimToady: Just when I figured it out. Thanks. 8-) | 19:14 | ||
rakudo: eval "sub foo-bar \{ say 'hi'; \}; foo-bar;"; say "$!" | |||
p6eval | rakudo 415514: OUTPUT«hiUse of uninitialized value» | ||
KyleHa | Better. | ||
TimToady | rakudo: eval q/sub foo-bar { say 'hi'; }; foo-bar;/; say $! | 19:15 | |
p6eval | rakudo 415514: OUTPUT«hiUse of uninitialized value» | ||
TimToady | rakudo: eval q{sub foo-bar { say 'hi'; }; foo-bar;}; say $! | 19:16 | |
p6eval | rakudo 415514: OUTPUT«Syntax error at line 2, near "}; say $!"Null PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | ||
TimToady | kerblooey :) | ||
KyleHa | Ouch. | ||
In my real code, I want to interpolate, so backslashing is the way I'm going. | 19:17 | ||
TimToady | std: eval q{sub foo-bar { say 'hi'; }; foo-bar;}; say $! | ||
p6eval | std 27627: OUTPUT«ok 00:03 37m» | ||
TimToady | rakudo: eval qq:s/sub foo-bar { say 'hi'; }; foo-bar;/; say $! | ||
p6eval | rakudo 415514: OUTPUT«Syntax error at line 2, near "eval qq:s/"Null PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | ||
TimToady | rakudo: eval Q:s/sub foo-bar { say 'hi'; }; foo-bar;/; say $! | 19:18 | |
p6eval | rakudo 415514: OUTPUT«Syntax error at line 2, near "eval Q:s/s"Null PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | ||
tann_ | rakudo: say 1.Str | 19:23 | |
p6eval | rakudo 415514: OUTPUT«Int()<0xb6892660>» | ||
tann_ | rakudo: say '1.5'.Num | 19:24 | |
p6eval | rakudo 415514: OUTPUT«Method 'Num' not found for invocant of class 'Str'» | ||
tann_ | rakudo: 1.5.int | ||
p6eval | rakudo 415514: ( no output ) | ||
tann_ | rakudo: say 1.5.int | ||
p6eval | rakudo 415514: OUTPUT«1» | ||
tann_ | rakudo: say 1.5.Str | 19:25 | |
p6eval | rakudo 415514: OUTPUT«Num()<0xb6864450>» | ||
tann_ | pugs: say 1.5.Str | 19:26 | |
p6eval | pugs: OUTPUT«*** No such method in class Rat: "&Str" at /tmp/HEvD96fvzR line 1, column 5 - line 2, column 1» | ||
pugs_svn | r27628 | kyle++ | Test for RT #64656 | 19:29 | |
19:31
masak left
19:33
pmurias left
19:34
Guest19957 joined
|
|||
Guest19957 | hey | 19:35 | |
KyleHa | Ahoy. | ||
Guest19957 | i am newbie to perl and i would like to get some pointers on coding. | 19:36 | |
KyleHa | Do you program in some other language already? | ||
std: map { say "$^a - $^b"}, 1..10 Z 1..10 | 19:37 | ||
Guest19957 | yes python | ||
p6eval | std 27627: ( no output ) | ||
KyleHa | Okeydoke. | ||
perlmonks.org has a wealth of information and search facilities. | 19:38 | ||
std: map { say "$^a - $^b"}, (1..10 Z 1..10) | 19:39 | ||
p6eval | std 27627: ( no output ) | ||
Guest19957 | what does that mean? | ||
KyleHa | In Perl, 'map' is similar to what you'd call a list comprehension. | 19:40 | |
Guest19957 | Can you explain that further please | ||
KyleHa | perldoc.perl.org/functions/map.html | ||
Guest19957 | reading | 19:41 | |
KyleHa | You're probably interested in learning about Perl 5, which is what's most commonly used out in the wild. This channel is really about Perl 6. | ||
Guest19957 | but perl 6 has not come out yet | ||
and yes perl 5 | |||
KyleHa | If you're looking for IRC-based help with Perl 5, you might look here: www.irc.perl.org/channels.mhtml | 19:42 | |
Guest19957 | k | ||
KyleHa | You can get incomplete implementations of Perl 6 now. | ||
Guest19957 | na i lie perl 5 | 19:43 | |
but is perl 6 more advanced? | |||
KyleHa | The language as specified is more advanced. The language as implemented is a bit more scattershot. | ||
19:45
lucs_ joined
|
|||
Guest19957 | join me in email | 19:45 | |
19:46
Guest19957 left
|
|||
arejay | anyway to load a perl module from a local dir | 19:46 | |
KyleHa | Sounds straight forward, but I don't know how that's done. | 19:47 | |
lisppaste3 | rj pasted "IRCLog.pm" at paste.lisp.org/display/83875 | ||
arejay | if i put it in /usr/local/lib/perl5/5.8.9/mach it works fine, but then if i want to run another version.. it fails | 19:48 | |
cause it reads database.conf | |||
:[ | |||
PERL5LIB | 19:50 | ||
hrm | |||
got it EXPORT | 19:51 | ||
19:52
kane_ joined,
Jedai joined
19:56
takadonet left
19:57
kane___ joined
19:58
sri_kraih_ joined,
kane_ left
19:59
nihiliad left,
tomyan joined
|
|||
moritz_ | KyleHa: I'd prefer it if regression tests went into existing test file | 20:05 | |
after all regression tests are only the secondary task of the spectest suite | 20:06 | ||
KyleHa | I looked for something appropriate, and I didn't find. Where do you think do-bug.t should go? | ||
20:07
integral left
|
|||
moritz_ | if it's related to do { }, in S04-statements/do.t | 20:07 | |
if it's about identifiers... S02 somewhere, let me take a look... | 20:08 | ||
KyleHa | It's not really related to do {} | ||
moritz_ | S02-names/identifiers perhaps | ||
oh wait | |||
KyleHa | It's this ticket: rt.perl.org/rt3/Ticket/Display.html?id=64656 subnames starting with do- can't be called. | 20:09 | |
moritz_ | S02-names_and_variables/names.t smartlinks to the right section at least | ||
hm | |||
let's just move it to S02-names/identifier.t | |||
KyleHa | OK. I'll do that. | 20:10 | |
Thanks! | |||
moritz_ | thank you for writing the tests! | ||
KyleHa | I don't see an identifier.t | 20:11 | |
moritz_ | yes, let's create that | ||
KyleHa | Oh, OK. | ||
moritz_ | just git mv | ||
and later on add more general tests, not necessarily related to this ticket | |||
it seems we also don't test for ' in names | 20:12 | ||
KyleHa | Yeah, I thought of that too. | ||
moritz_ | ack "\$\w+'\w" gives no result | ||
shall I, or will you? (moving) | |||
KyleHa | I'm doing it. | ||
moritz_ | great! | 20:13 | |
pugs_svn | r27629 | kyle++ | move S06-other/do-bug.t to S02-names/identifier.t | ||
KyleHa | I was looking for a place to stick 64814 tests too. S06-signature/type* or S06-signature/slurpy-* | 20:14 | |
20:14
sri_kraih left
20:15
Guest24823 left
|
|||
KyleHa | Is there a tool for showing test coverage like Devel::Cover in Perl 5? | 20:15 | |
PerlJam | not yet | ||
20:16
bigpresh_ joined
|
|||
moritz_ | I'd prefer S06-signature/slurpy-params.t, but either is OK | 20:16 | |
KyleHa | OK, thanks. | ||
20:22
kane___ left
20:23
tomyan left
20:24
kane_ joined,
hoelzro joined
|
|||
pugs_svn | r27630 | moritz++ | [t/spec] more tests for identifier names; fudged for Rakudo | 20:25 | |
dalek | kudo: 3a2c5e2 | moritz++ | t/spectest.data: add S02-names/identifier.t to spectest.data |
20:31 | |
kudo: 0cdcc88 | (Bob Kuo)++ | README: fixes typo in README file, 'git-format-patch' is actually 'git format-patch' |
|||
20:31
tomyan joined
20:32
icwiener joined
|
|||
pugs_svn | r27631 | kyle++ | Test for #64814 | 20:36 | |
r27632 | lwall++ | [Cursor] fix infinite recursion bug, finanalyst++, azawawi++ | 20:37 | ||
frettled | Hmm, was infinite recursion bugging? ;) | 20:45 | |
pugs_svn | r27633 | kyle++ | [t/spec] Match descriptions to tests | ||
moritz_ | pmichaud: so, do you know what, why and how? | 20:48 | |
pmichaud | I do! | 20:49 | |
well, I know .WHAT and .HOW. .WHY got skipped over a bit :-) | 20:50 | ||
20:50
pjscott joined,
pjscott left
|
|||
moritz_ | that would have been the really interesting part for us. | 20:51 | |
TimToady | "because it's not there" | ||
20:51
payload joined
|
|||
moritz_ | I meant more like, how do POD variables work in detail, get attached to objects etc. | 20:51 | |
20:51
mncharity joined
|
|||
moritz_ | KyleHa++ # cleaning up after me | 20:53 | |
mncharity | hi all. random thought: the rosettacode.org/ page for Perl 6 rosettacode.org/wiki/Category:Perl_6 is largely empty. There are a variety of tasks rosettacode.org/wiki/Category:Solut...mming_Task one might code to show p6 idioms. | 20:54 | |
cheers & | |||
M_o_C | are there usually video recordings of OSCON talks? | ||
20:54
mncharity left
|
|||
pmichaud | video recording of oscon talks is often spotty. Depends on the speaker. | 21:01 | |
M_o_C | hm, ok | 21:02 | |
21:04
explorer joined
|
|||
hoelzro | quick question about Perl 6. I attended Damien Conway's talk at OSCON earlier today (very inspiring, by the way!), and he mentioned the "$high max= $value" construct. I was wondering why a max= shortcut operator was added when you could do something like "$high .= max($value)"? | 21:15 | |
ruoso | hoelzro, max= wasn't added... it's just a natural use of the = metaoperator... | 21:16 | |
pmichaud | Also, max isn't a method. | ||
ruoso | hoelzro, it works the same way as +=, but for whatever operator you want | ||
pmichaud | at least, it's not a method that compares the invocant against another value | ||
hoelzro | ruoso: so max='s existence isn't explicit, it's just created automatically when you create a binary operator? | ||
pmichaud | $high max= $value is $high = $high max $value; | 21:17 | |
moritz_ | modulo precedence | ||
ruoso | hoelzro, it's not even created automatically... the parser is a bit smarter than that | ||
hoelzro | alright | ||
ruoso | it's an operator and a meta operator | ||
frettled | Who's going to Lisbon, BTW? | ||
ruoso not | 21:18 | ||
even If I used to live there ;) | |||
pmichaud | <- going to lisbon | ||
moritz_ would love to, but can't | |||
frettled | pmichaud: yay | ||
21:18
jrtayloriv joined
|
|||
frettled | moritz_: aw :( | 21:18 | |
hoelzro | ok, so max isn't a method...is + implemented as a method? (aka. how special are operators?) | 21:19 | |
pmichaud | most operators tend to be multi subs | ||
(which often turn around and call methods or do things method-like) | 21:20 | ||
hoelzro | pmichaud: so max is a multi sub that calls a method? | 21:21 | |
I just think a max method on Number would be good | |||
3.max(4) # 4 | |||
KyleHa | rakudo: sub infix:<+>{ $^a * $^b }; say 2 + 3; | ||
hoelzro | just another way to do it | ||
p6eval | rakudo 0cdcc8: OUTPUT«6» | ||
KyleHa | Nyuck nyuck nyuck. | ||
pmichaud | actually, there's a .max method, but it's list-like and not operator like | 21:22 | |
rakudo: say (3,5,4).max; | |||
p6eval | rakudo 0cdcc8: OUTPUT«5» | ||
pmichaud | rakudo: say 4.max; | ||
p6eval | rakudo 0cdcc8: OUTPUT«4» | ||
hoelzro | I see | ||
frettled | pretty neat, anyway. | 21:23 | |
pmichaud | so infix:<max> is actually somewhat different from Any.max | ||
hoelzro | ok | ||
pmichaud | What Damian didn't show is that there's a max function as well. | ||
rakudo: say max (3,5,4); | |||
p6eval | rakudo 0cdcc8: OUTPUT«No applicable candidates found to dispatch to for 'max'in Main (/tmp/N3uTDXsIE1:2)» | ||
pmichaud | oops | 21:24 | |
rakudo: say max 3,5,4 | |||
p6eval | rakudo 0cdcc8: OUTPUT«No applicable candidates found to dispatch to for 'max'in Main (/tmp/0dceAXEbHi:2)» | ||
21:24
nihiliad joined
|
|||
pmichaud | hmmmm. | 21:24 | |
moritz_ | rakudo: say [max] 2, 5, 4 | ||
p6eval | rakudo 0cdcc8: OUTPUT«5» | ||
pmichaud | moritz_: yes, that's a different one. | ||
KyleHa | Heh. | ||
pmichaud | There *was* a max function as well at one time. | ||
21:24
Whiteknight joined
|
|||
moritz_ | I'm not very familiar with the history of Perl 6 ;-) | 21:25 | |
pmichaud | I guess it's gone now. | ||
21:25
jrtayloriv left
|
|||
pmichaud | (the synopsis says to use [max]) | 21:25 | |
21:26
jrtayloriv joined
|
|||
M_o_C | "[max] 1, 2, 3" is equal to "1 max 2 max 3", right? | 21:29 | |
moritz_ | right | 21:30 | |
21:31
molaf left
21:36
kane_ left
21:41
pochi left
21:42
maja_ joined
21:50
ruoso left
21:52
maja left
21:54
hudnix joined
|
|||
hudnix | Is there a way for a parametric role to create method names composed from its parameters? | 21:56 | |
PerlJam | hudnix: that seems ... weird. | ||
21:57
KyleHa left
|
|||
moritz_ | if the parameter of the role appears in the signature of the method, it's already part of the long name | 21:57 | |
hudnix | something like: role foo[Str $meth] {method $meth {say $meth}}; | 21:58 | |
21:58
integral joined
|
|||
PerlJam | hudnix: why? | 21:58 | |
hudnix | because I want to create multidimensional doubly linked lists, and I only want to implement the inserts/deletes once, and then have a class do the role with different parameters, e.g.: does List["left", "right"]; does List["up","down"], then the methods will be insertup, deleteleft, etc. | 22:01 | |
moritz_ | I think it would be better to have the updown and leftrigh linkage as attributes | 22:02 | |
and then you can use 'handles' to delegate to that | |||
'has Linking $.updown handles<up down>' | 22:03 | ||
'has Linking $.leftright handles<left right>' | |||
or something along these lines | |||
hudnix | yes that would work too | ||
moritz_ | with more magic and less confusion, I think ;-) | 22:04 | |
erm, less magic | 22:05 | ||
hudnix | But I would have to define the up, down left and right methods in the Linking role right? | ||
moritz_ | actually you can rename the methods with 'handles' | ||
ie $.updown handles left => 'up', right => 'down' | 22:06 | ||
hudnix | ah! | ||
ok, that'll work | |||
moritz_ | (I don't knwo if I got the syntax right, but S12 should help you there) | ||
hudnix | But I still think parametric method names would be cool :) | 22:07 | |
22:08
SmokeMachine joined
|
|||
moritz_ | variable method names look like design smell to me, just like variable variable names | 22:08 | |
22:10
FCO left
|
|||
hudnix | They would be constant, no? Just specified at composition time. | 22:10 | |
22:12
icwiener_ joined
22:14
icwiener_ left
22:17
tomyan left
22:19
olaf397 joined
22:20
mj41_ left
22:25
icwiener left
22:27
tomyan joined
22:31
hoelzro left
22:33
olaf397 left
22:38
cdarroch left
22:56
jrtayloriv left
22:57
chid joined
22:58
jrtayloriv joined
23:00
hoelzro joined
23:05
colomon joined
23:09
c1sung_ joined
23:10
justatheory_ joined
23:11
justatheory left
23:16
M_o_C left
23:21
Jedai left
|
|||
tann_ | rakudo: say "1".Int | 23:22 | |
p6eval | rakudo 0cdcc8: OUTPUT«1» | ||
tann_ | rakudo: say "1.5".Int | ||
p6eval | rakudo 0cdcc8: OUTPUT«1» | ||
tann_ | rakudo: say 1.Str | 23:23 | |
p6eval | rakudo 0cdcc8: OUTPUT«Int()<0xb68a9660>» | ||
tann_ | rakudo: my Int ($x, $y); | ||
p6eval | rakudo 0cdcc8: ( no output ) | ||
tann_ | rakudo: my Int ($x, $y) = 1, 2; say "$x : $y" | 23:24 | |
p6eval | rakudo 0cdcc8: OUTPUT«1 : 2» | ||
tann_ | rakudo: my (Int $x, Num $y) = 1, 1.2; say "$x : $y" | 23:25 | |
p6eval | rakudo 0cdcc8: OUTPUT«1 : 1.2» | ||
tann_ | rakudo: my Int @a = 1, 1.1, 1.2, 1.3; say @a.perl | ||
p6eval | rakudo 0cdcc8: OUTPUT«Array assignment type check failed; expected Int, but got NumNull PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | 23:26 | |
tann_ | rakudo: my @a = 1..10; @a.map: { $_ % 2}; say @a.perl | 23:28 | |
p6eval | rakudo 0cdcc8: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]» | ||
tann_ | rakudo: my @a = 1..10; @a.map: { $_ % 2 }; say @a.perl | ||
p6eval | rakudo 0cdcc8: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]» | ||
tann_ | rakudo: my @a = 1..10; @a.=map: { $_ % 2 }; say @a.perl | 23:29 | |
p6eval | rakudo 0cdcc8: OUTPUT«[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]» | ||
tann_ | rakudo: my @a = 1..10; @a.map: { $_ = $_ % 2 }; say @.perl | 23:30 | |
23:30
justatheory_ left
|
|||
p6eval | rakudo 0cdcc8: OUTPUT«Lexical 'self' not found» | 23:30 | |
TimToady | rakudo: my @a = 1..10; @a.map: { $_ = $_ % 2 }; say @a.perl | 23:31 | |
p6eval | rakudo 0cdcc8: OUTPUT«[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]» | ||
TimToady | rakudo: my @a = 1..10; @a.map: { $_ %= 2 }; say @a.perl | ||
p6eval | rakudo 0cdcc8: OUTPUT«[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]» | ||
TimToady | rakudo: my @a = 1..10; @a »%=» 2; say @a.perl | 23:32 | |
p6eval | rakudo 0cdcc8: OUTPUT«Statement not terminated properly at line 2, near "\x{bb}%=\x{bb} 2; sa"Null PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | ||
TimToady | rakudo: my @a = 1..10; @a >>%=>> 2; say @a.perl | 23:33 | |
p6eval | rakudo 0cdcc8: OUTPUT«Statement not terminated properly at line 2, near ">>%=>> 2; "Null PMC access in get_pmc_keyed()current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)» | ||
pmichaud | I don't think Rakudo hyperizes assignment yet | ||
TimToady | std: my @a = 1..10; @a >>%=>> 2; say @a.perl | ||
p6eval | std 27633: OUTPUT«##### PARSE FAILED #####Can't hyper a multiplicative because it's too fiddly at /tmp/kpDmL75bAx line 1:------> my @a = 1..10; @a >>%=>> 2; say @a.perlFAILED 00:02 37m» | ||
TimToady | aww | ||
sjohnson | :( | 23:34 | |
TimToady | and it has nothing to do with the multiplicativeness... | ||
std: my @a = 1..10; @a >>%>> 2; say @a.perl | |||
p6eval | std 27633: OUTPUT«ok 00:02 37m» | 23:35 | |
sjohnson | you broketed it | ||
23:38
c1sung_ left
23:39
c1sung left
23:41
skids joined
23:50
hoelzro left
23:53
tomyan left
23:54
hoelzro joined,
c1sung joined
23:55
Whiteknight left
|
|||
pugs_svn | r27634 | pmichaud++ | [t/spec]: Unfudge a test for Rakudo. | 23:56 | |
23:57
bacek left
|