»ö« 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! | Rakudo Star Released! Set by diakopter on 6 September 2010. |
|||
00:02
tadzik joined
|
|||
tadzik | 'evening | 00:02 | |
TimToady | like y's | 00:03 | |
00:04
patspam left
00:06
Italian_Plumber left
|
|||
TimToady | does rakudo HEAD use gc_massacre now? | 00:10 | |
tadzik | I think so | ||
btw, where is recent Rakudo on feather? | |||
TimToady professes complete ignorance | 00:11 | ||
00:18
eternaleye left,
eternaleye joined
|
|||
TimToady | ooh, my hofstadter-conway $10000 sequence got further than it's ever gotten before, so it looks like the old GC limit is gone | 00:20 | |
maybe I'll be able to take the caveat out of RC | |||
00:21
Italian_Plumber joined
|
|||
lue | ohai o/ | 00:24 | |
00:24
risou joined
|
|||
lue | How would I get a website that can run Perl 6? .oO[ Please don't say home server, please don't say home server... :) ] | 00:26 | |
TimToady | define "get" | ||
sorear | google VPS | 00:27 | |
00:27
ash____ joined
|
|||
TimToady | for instance, try.rakudo.org/ is a website that can run Perl 6... | 00:28 | |
ash____ | rakudo master has the gc_massacure in it | ||
00:28
ash____ is now known as ash_gti
|
|||
lue | [rephrase] What would the best way be to have a website running Perl 6 code? [I tried coding a website again, and I can't help but notice how much better Perl 6 would be over JS :)] | 00:29 | |
ash_gti | you'd need to have some way of interfacing with your http requests | ||
like CGI | |||
or FCGI | |||
or a standard gateway of interacting with the request like wsgi | |||
and a server that can hand off the request to your code | 00:30 | ||
most web server's allow cgi (if not all) | |||
you just need to have a host that allows you to compile code | |||
tools.ietf.org/html/rfc3875 is a detailed description of the CGI interface | 00:31 | ||
i don't think anyone has written a perl6 based library for it yet | 00:32 | ||
well actually masak had something called Web.pm that might do it | |||
tadzik | website running Perl code, you mean a website written in Perl? | ||
lue | I want to use Perl 6 over JavaScript, that's what I'm getting at. I know full well it can't be *exactly* like JS, considering browsers don't come with P6 implementations :) | 00:34 | |
ash_gti | it might be worth asking masak++ aobut web.pm | ||
oh, you want it in the browser? | 00:35 | ||
not on the server side? | |||
tadzik | please define: Perl6 over JavaScript | ||
00:35
perlygatekeeper left
|
|||
lue | ash_gti: I know it won't be browser side. I just want to use it for the same stuff you tend to use Javascript for. | 00:36 | |
tadzik: I would much rather code in Perl 6 than JavaScript :) | 00:37 | ||
tadzik | well, you usually use JS for the browsers' side, won't you? | ||
s/wo/do/ | |||
jnthn | c7808c3...wtf. *sigh* | ||
TimToady: Dislike. Suggestion: make the default :local. | 00:38 | ||
Everytime we add something like this, we add an extra expectation on anyone implementing their own meta-objects (or at least, those that implement the HOW API). | 00:40 | ||
Plus from my experience so far, I often *want* :local | |||
(by default) | |||
tadzik | en.wikipedia.org/wiki/Diamond_problem # I see a nice room for Perl 6 | 00:41 | |
lue | *cough* I would like to use Perl 6 for coding various things on my site that one normally uses Javacript for (such as navigation, easy updating of stuff that appears on every page, etc.). I do not care if it's client-side or server-side [I actually expect it to be server-side]. | 00:42 | |
00:44
QinGW joined
00:49
raiph joined
00:50
eternaleye_ joined,
eternaleye left
|
|||
TimToady | jnthn: local doesn't make much sense in the presence of mix-ins | 00:55 | |
jnthn | Hmm, true. | 00:58 | |
Excluding Any/Cool/Mu just feels like a hack though. | |||
TimToady | there are good linguistic reasons | 00:59 | |
jnthn | If you want it, please introduce a general "hidden from introspection" trait or something that can be looked at rather than hardcoding type names. | ||
Fine, but the current technical solution is sub-optimal. | |||
If I'm reading correctly, we have Mu/Any/Cool just being magically excluded. | 01:00 | ||
TimToady | I know, we'll name the hidden classes with a '.' on the front :) | ||
jnthn | ...I was hoping for something better. ;-) | ||
:-) | |||
TimToady | we can certainly have a bit somewhere | ||
jnthn | I can go with the linguistic arguments, I just have a knee-jerk "oh noes" against "these types are magical". | 01:01 | |
OK, if we can make exclusion boil down to a property on the meta-object, I'm OK with it. | 01:02 | ||
I just don't want all meta-objects to have to start hard-coding type names. | |||
01:07
plobsing left
01:09
plobsing joined
01:10
jferrero left
|
|||
jnthn tries to catch up on sleep a bit | 01:15 | ||
01:15
patspam joined
|
|||
raiph | . o O ( \o/ ) | 01:18 | |
01:19
plobsing_ joined
01:20
plobsing left
01:24
Italian_Plumber left
01:28
patspam left
01:45
molaf_ joined
01:46
cdarroch left
01:47
envi^home joined
01:48
molaf_ left,
LaVolta joined
01:49
molaf left
01:51
molaf joined
01:53
mikehh left
01:57
mikehh joined
02:04
nymacro joined
02:16
agentzh joined
02:20
redicaps joined
02:25
nymacro_ joined
02:27
rrgau_`` joined
02:28
nymacro left,
nymacro_ is now known as nymacro
02:30
rrgau_` left
02:34
meppl left
02:37
proller_ left
02:40
proller joined
02:41
jaldhar joined,
jaldhar left
02:42
jaldhar joined
02:54
nymacro left
02:58
nymacro joined
03:02
molaf left
03:09
redicaps left
03:14
rrgau_`` left
|
|||
araujo tests new code for his language | 03:18 | ||
03:20
kid51 left
03:32
eternaleye_ is now known as eternaleye,
LionMadeOfLions joined
|
|||
LaVolta | wait...what?! REPL now accept directly input of unicode chars! | 03:38 | |
03:39
PZt joined
|
|||
LaVolta | i ❤ you guys :D | 03:40 | |
nymacro | xoxo | 03:41 | |
call me | |||
araujo | fact -> { :n if <= n 1 { 1 } { * n fact - n 1 } } | 03:48 | |
:) | |||
03:49
leprevost joined
03:55
DemoFreak left
04:01
DemoFreak joined,
DemoFreak left
04:02
DemoFreak joined
04:13
ash_gti left
04:14
smosher joined
04:26
justatheory left
04:54
mfollett joined
05:10
jaldhar left
05:12
jaldhar joined
05:15
risou left,
risou joined
05:20
risou left
05:30
risou joined
05:33
risou left,
risou joined
05:38
risou left
|
|||
araujo | ideone.com/ZLLHx | 05:44 | |
06:01
mfollett left,
mfollett joined
06:04
Guest23195 joined,
raiph left
06:07
nymacro left
06:11
satyavvd joined
06:19
satyavvd left
06:32
molaf joined
06:48
plobsing_ left
06:49
icwiener joined
|
|||
sorear | I'm a little confused by how the type system interacts with binding. | 06:51 | |
I'm thinking about "sub foo(Int $x is rw) { $x = 1 }" | 06:52 | ||
what can I call foo on? | |||
my Int $k; obviously | |||
what about my $k; ? | |||
what about my $k = 5; ? | |||
what about subtype Even of Int where * !%% 2; my Even $z; ? | 06:53 | ||
or class SubclassOfInt is Int { }; my SubclassOfInt $z; ? | |||
How much of this changes if 'is rw' is removed? | 06:54 | ||
Does Perl 6 have anything like an InvalidArrayStoreException? | |||
06:56
mfollett left
07:06
nymacro joined,
Ross joined,
Ross left,
Ross joined,
nymacro left
08:08
schpey joined
|
|||
moritz_ | good morning | 08:09 | |
08:11
nymacro joined
08:12
nymacro left
08:18
xinming left
08:19
xinming joined
08:36
Trashlord left
08:39
Trashlord joined
|
|||
sorear | hello moritz_ | 08:45 | |
08:45
dual left
08:54
molaf left
|
|||
cosimo | hi everyone | 09:13 | |
moritz_ | o/ | 09:15 | |
09:16
Grrrr joined
|
|||
tadzik | good morning | 09:30 | |
cosimo | rakudo: my $x = Mu; my $y = 42; my $z = $x // $y; say $z; | ||
p6eval | rakudo 13c8a2: OUTPUT«42» | ||
09:35
icwiener left,
icwiener joined
09:36
icwiener left
09:42
clintongormley joined
|
|||
clintongormley | Hi all - anybody have any idea what has happened to Adriano Ferreira? | 09:43 | |
I see that none of his many CPAN modules has received any loving in the last year or so | |||
i haven't tried emailing him yet, but anybody seen him recently? | |||
moritz_ | clintongormley: do you happen to remember his nick? | 09:47 | |
clintongormley | hi moritz_ - no, no idea i'm afraid | ||
on cpan he is just 'ferreira' | |||
sorear | You might have better luck asking on #toolchain or #p5p or #perl (all MAGnet) | 09:48 | |
moritz_ | clintongormley: and here too... last activity in Dec 2007: irclog.perlgeek.de/search.pl?channe...ira&q= | ||
clintongormley | hmm, wonder if he is ok | 09:49 | |
sorear: yes? | |||
actually, i'll just email him and see if i get a response | |||
thanks all | |||
moritz_ | blog.rafaelferreira.net/ # last blog post from June 08 | ||
09:50
kjeldahl joined
|
|||
sorear | clintongormley: FERREIRA/Compress-unLZMA-0.04 uploaded 17 July | 09:50 | |
(2010) | |||
clintongormley | ah interesting! so he is alive and releasing | ||
good to know | |||
moritz_ | www.perlmonks.org/?node_id=861938 any Perl 6 solutions? | 09:56 | |
sorear | for @array.natatime(3) { .say } | 09:58 | |
moritz_ | is that specced? | ||
cosimo | rakudo: my $x = False; say $x.perl; | 09:59 | |
p6eval | rakudo 13c8a2: OUTPUT«Bool::False» | ||
10:00
icwiener joined
|
|||
sorear | not explicitly, but I was under the impression all of List::'More'?Utils was going to be brought into core as methods | 10:01 | |
araujo adds support for nested lists | 10:02 | ||
10:04
QinGW left
|
|||
tadzik | where is the newest Rakudo on feather? | 10:06 | |
moritz_ | rakudo: say (0, 3 ...^ 10) | ||
tadzik: problably nowhere | |||
p6eval | rakudo 13c8a2: | ||
..OUTPUT«(timeout)821242730333639424548515457606366697275788184879093969910210510811111411712012312612913213513814114414715015315615916216516817117417718018318618919219519820120420721021321621922222522823123423724024324624925225525826126426727027327627928228528829129429730030330630931231531… | |||
tadzik | hm | 10:07 | |
mind if I build some? | |||
moritz_ | no | ||
sorear | What is Rakudo build memory usage like these days? | 10:10 | |
moritz_ hasn't monitored it after The Big GC Merge | |||
sorear top(1)s feather1 looking for tadzik | 10:11 | ||
tadzik | there's htop, don't be so spartan | 10:12 | |
sorear | hmm, tadzik not in who | ||
tadzik | :) | ||
NYLI | |||
10:15
somebody joined
10:19
LaVolta left
|
|||
moritz_ | rakudo: my @l = <a bb c d e f g h>; sub chunky(@l, $len) { (@l Z (' ' xx $len - 1, "\n") xx *).join.substr(0, -1) ~ "\n"; | 10:23 | |
p6eval | rakudo 13c8a2: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
moritz_ | rakudo: my @l = <a bb c d e f g h>; sub chunky(@l, $len) { (@l Z (' ' xx $len - 1, "\n") xx *).join.substr(0, -1) ~ "\n"; }; print chunky(@l, 3) | ||
p6eval | rakudo 13c8a2: OUTPUT«a bb cd e fg h» | ||
araujo | ideone.com/iLZ1V | 10:24 | |
10:24
agentzh left
|
|||
araujo | I guess [ ] is sane enough :P | 10:24 | |
sorear | niecza: say "@@L1" # Oops. | 10:27 | |
p6eval | niecza eb45fca: OUTPUT«===SORRY!===Invalid hard reference syntax at /tmp/P10UPdLYXL line 1:------> say "@⏏@L1" # Oops. expecting any of: desigilname twigilParse failed» | ||
sorear | niecza: say '@@L1' # Oops. | ||
p6eval | niecza eb45fca: OUTPUT«Use of uninitialized value in substitution iterator at /home/p6eval/niecza/src/CodeGen.pm line 850.Use of uninitialized value in substitution iterator at /home/p6eval/niecza/src/CodeGen.pm line 850.» | ||
10:29
somebody left
|
|||
tadzik | Parrot VM: PANIC: Out of mem! | 10:30 | |
moritz_ | tadzik: please file a parrot bug | ||
tadzik | crap, I have to register? | 10:32 | |
sorear | tadzik: trac sucks | ||
tadzik | :F | ||
sorear | the alternative is getting ~10 spam bugs /hr | ||
tadzik | well, on github you have to register too | 10:33 | |
10:33
plobsing joined
|
|||
sorear | ok, rakudo on gc_massacre is still using an egregious amount of memory | 10:34 | |
I killed src/Perl6/Grammar.pm at 350mb | |||
(parrot-nqp even, not rakudo) | |||
10:38
clintongormley left
|
|||
sorear | tadzik: sure that's a bug? | 10:44 | |
tadzik | moritz_ | tadzik: please file a parrot bug | ||
sorear | also, why is Parrot allocating memory in chunks of 4096 bytes | 10:45 | |
moritz_ | why shouldn't it? | 10:46 | |
sorear | because quite a few mallocs like to allocate memory in round numbers of bytes | 10:47 | |
since free(p) needs to know how many bytes to free, malloc(4096) needs to allocate the nearest round number above 4100 bytes | 10:48 | ||
moritz_ | where does that magic number come from? | 10:49 | |
sorear | which one? | ||
4096 or 4? | |||
moritz_ | 4 | 10:50 | |
sorear | 4 is sizeof(int) and thus the minimum possible malloc overhead on a system that can run Parrot | 10:51 | |
*minimum sizeof(int) | |||
in practice malloc overhead is almost always sizeof(double) due to alignment concerns; 16 bytes is the traditional amount to leave before 2^n | 10:52 | ||
(or you just include your own allocator, like perl5 does) | 10:53 | ||
plobsing | sorear: I must have a magical malloc then, because perl6 -e '' seems to be running brk at increments of 4K | 10:54 | |
10:56
rgrau_ joined
|
|||
sorear | plobsing: what libc do you have? I should run a proper survey some time instead of sharing conventional wisdom | 10:58 | |
plobsing | glibc 2.12.1-1 | 10:59 | |
11:03
schpey left
|
|||
sorear | I have libc 2.11.2-2 | 11:14 | |
allocating 2 bytes 1M times -> 15708kb | 11:15 | ||
colomon | sorear: been a long time since I thought about it, but a smart memory allocator theoretically doesn't need more than one bit overhead per allocation, does it? though that doesn't deal with alignment issues. | 11:17 | |
sorear | colomon: if I could go back in time and change one thing... free(void*, int) wouldn't be #1 but it would be high up there | 11:18 | |
dalek | ok: a6b8fdd | moritz++ | src/grammars.pod: [grammars] try to simplify an explanation |
11:19 | |
sorear | testing locally allocations of 4093 through 4100 bytes use the same amount of real memory | ||
glibc 2.11.2-2 appears to round up allocations to 8n+4 | |||
(i386) | |||
setting the chunk size to 4096 increases brk 4k at a time (plobsing), although it's using 4104 bytes; my libc isn't magic but it's smarter than I gave it credit for | 11:21 | ||
11:21
satyavvd joined
|
|||
sorear | actually it seems to be 8n+12; 4 and 5 bytes are same allocation | 11:23 | |
a little weird | |||
colomon | 32-bit or 64-bit? | 11:24 | |
sorear | 32 | 11:25 | |
colomon | huh. maybe some sort of buffer at the end to provide primitive overrun protection? | 11:26 | |
sorear out | 11:28 | ||
11:35
araujo left
11:38
zulon joined
|
|||
colomon | Did Rakudo release on Thursday? My impression from github is yes, but I haven't seen a release announcement anywhere yet... | 11:46 | |
moritz_ | yes; announcement went to p6c | ||
plobsing | I'm eager to see the r* benchmark graph after this release. | ||
tadzik | R* is today? | 11:49 | |
moritz_ | colomon: the new policy is to not send the Rakudo compiler announcement to too many places, to avoid confusion with the R* releases | 11:50 | |
colomon | ah | ||
colomon remembers he hasn't checked one of his e-mail addresses in a full week now... | 11:55 | ||
moritz_ just explained the second solution in www.perlmonks.org/?node_id=861941 to my wife | 11:58 | ||
(in detail, and with detours to named arguments) | |||
mberends | wife++ | 11:59 | |
and maybe, moritz_++ ;) | 12:00 | ||
moritz_ | :-) | ||
12:00
meppl joined
|
|||
plobsing | karma wife | 12:03 | |
aloha | wife has karma of 1. | ||
12:07
rgrau_` joined
|
|||
moritz_ | and now we're producing SVG graphs, and because she wants a happy face I need to relearn SVG paths :-) | 12:09 | |
12:09
rgrau_ left
|
|||
moritz_ | moritz.faui2k3.org/tmp/happy-face.svg is the result | 12:11 | |
tadzik | :) | 12:15 | |
plobsing | contented H2O? | 12:17 | |
12:18
Ross left
|
|||
moritz_ | modern "art" :-) | 12:19 | |
12:20
Ross joined
12:22
zulon left
12:23
schpey joined
12:36
nymacro joined
12:51
araujo joined
13:11
satyavvd left
|
|||
jnthn | good afternoon, #perl6 | 13:12 | |
tadzik | good afternoon jnthn | ||
13:15
zulon joined
13:17
Patterner left
13:18
jest joined
|
|||
moritz_ | rakudo: my $x = 5; enum A b => $x; say b | 13:19 | |
p6eval | rakudo 13c8a2: OUTPUT«Could not find sub &A in main program body at line 22:/tmp/bVfK2UBm2y» | ||
moritz_ | rakudo: my $x = 5; enum A (b => $x); say b | ||
p6eval | rakudo 13c8a2: OUTPUT«===SORRY!===Symbol '$x' not predeclared in <anonymous> (/tmp/sUkVnkYaiT:22)» | ||
moritz_ | it's so easy to find LTA error messages while reading through Actions.pm :/ | ||
jest | hi | 13:27 | |
considering bug github.com/perl6/book/issues/issue/20, here is a fix: pastie.org/1180989 | |||
but I'm not sure if it should go to the book repo, or rather to Pod::PseudoPod::LaTeX | 13:28 | ||
13:29
Psyche^ joined,
Psyche^ is now known as Patterner
13:31
sasha joined
|
|||
moritz_ tries it in the book repo first | 13:33 | ||
jest: pushed to the fix_index branch of the book... I need to start another PC to check if it works (can't build the book on my laptop, the latex there is too old) | 13:34 | ||
jest | moritz_: ok; I just checked the change on my comp, the only diefference in TeX input is '!' replaced to '"!', and '!' appears in the index correctly (it wasn't previously) | 13:36 | |
13:36
sasha left
|
|||
moritz_ | indeed, works on my second machine too | 13:39 | |
jest++ | |||
dalek | ok: e76fe15 | moritz++ | lib/Perl6BookLatex.pm: fix index; patch courtesy by jest++ |
13:41 | |
13:41
sasha joined,
sasha left
13:43
sasha joined,
tadzik left
13:46
sasha left
|
|||
moritz_ | www.perlmonks.org/?node_id=861950 | 13:51 | |
jnthn | moritz_++ # it's nice to be able to tick things off lists like that :-) | 13:54 | |
moritz_ | if I were a user of logging frameworks, I'd now be tempted to write one | ||
I guess I'll rather work on my Sudoku solver instead :-) | 13:55 | ||
13:55
jest left
13:56
tadzik joined
13:58
rgrau_` left
14:02
miso_soup joined
|
|||
tadzik | what do you think about including a module manager with Star this month? | 14:08 | |
moritz_ | +1, if we have one :-) | 14:10 | |
TimToady | www.perlmonks.org/?node_id=861959 | 14:11 | |
tadzik | well, I can say we have once someone tests neutro on windows | 14:12 | |
moritz_ | tadzik: even linux-only would be great start | ||
tadzik | moritz_: it works on linux since the first commit ;P) | 14:13 | |
:) | |||
what an ugly face I made | |||
TimToady: I'm amazed | |||
btw, is there a way to, uhm, reset .munch? | 14:14 | ||
ah, create a new array | |||
colomon | TimToady++ | 14:17 | |
14:21
flussence joined
|
|||
TimToady | btw, if someone wants to work on my current favorite LTA message, it's "Use of uninitialized value in numeric context" with nary a mention of location. | 14:22 | |
moritz_ | rakudo: say Any + 3 | 14:24 | |
p6eval | rakudo 13c8a2: OUTPUT«Use of uninitialized value in numeric context3» | ||
TimToady | that gets more irritating as your program gets larger | 14:28 | |
14:29
Chillance joined
|
|||
TimToady | and as your data becomes less toylike and random | 14:29 | |
14:29
dual joined
|
|||
moritz_ | $ ./perl6 -e 'say Any +3 ' | 14:29 | |
Use of uninitialized value in numeric context at line 1372:CORE.setting | |||
3 | |||
fail :-) | |||
and inspecting the calling location would point to the definition of infix:<+> | 14:30 | ||
14:32
mfollett joined
|
|||
TimToady | rakudo: say callframe(2).line | 14:37 | |
p6eval | rakudo 13c8a2: OUTPUT«1» | ||
moritz_ | but how do we know how many callframes to walk? | 14:38 | |
TimToady | it's supposed to be able to do pattern matching | ||
14:38
wamba joined
|
|||
jnthn | Walk until not in CORE.setting? | 14:38 | |
moritz_ | jnthn: that's a good idea, I think | 14:39 | |
rakudo: my %h = a => 1, b => 2; say "a"trans(["a", "b"] => ["A", "B"]) | 14:41 | ||
p6eval | rakudo 13c8a2: OUTPUT«===SORRY!===Confused at line 22, near "say \"a\"tra"» | ||
moritz_ | rakudo: my %h = a => 1, b => 2; say %a.keys[0].trans(["a", "b"] => ["A", "B"]) | ||
p6eval | rakudo 13c8a2: OUTPUT«===SORRY!===Symbol '%a' not predeclared in <anonymous> (/tmp/fLta1M1iUA:22)» | ||
moritz_ | rakudo: my %h = a => 1, b => 2; say %h.keys[0].trans(["a", "b"] => ["A", "B"]) | ||
p6eval | rakudo 13c8a2: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected in main program body at line 22:/tmp/uBDci8MhTZ» | ||
colomon | not again.... | 14:44 | |
moritz_ | indeed not agian | 14:45 | |
I'm adding a few prefix:<~> to EnumMap.pm | |||
TimToady will be offline for most of today | 14:46 | ||
& | |||
Raynes | You will be missed. | 14:47 | |
TimToady | sorear: I think in-out parameters have to match type exactly in most language because of co-contravariant considerations; if we violate that, we have to do some kind of coercion somewhere. | ||
really & | |||
14:52
kid51 joined
|
|||
kid51 | In Perl 6, what is the equivalent to Perl 5's 'perl -c somefile'? | 14:53 | |
flussence | perl6 -c somefile | ||
it was broken and only fixed recently | |||
try rakudo 2010.09 | 14:54 | ||
kid51 | But I get (in August Rakudo Star release): | ||
$ perl6 -c multi.pl | |||
===SORRY!=== | |||
Unable to open filehandle from path '-c' | |||
flussence | yeah, it's been fixed since then | ||
a few days ago IIRC | |||
kid51 | Well, I'm in a study group which specifically focuses on Rakudo Star releases, so I can't use that yet. | ||
14:55
xabbu42_ left,
xabbu42 joined
|
|||
nymacro | they have Rakudo* study groups? | 14:59 | |
pmichaud | -c was only added a few days ago... it'll show up in the next Star release (on Tuesday) | 15:01 | |
15:07
zulon left
|
|||
kid51 | NYC Rakudo Star group: tech.groups.yahoo.com/group/perlsem...ssage/1016 | 15:07 | |
kid51 has to get ready to go to that now | |||
15:08
icwiener_ joined
15:09
icwiener left,
risou joined
|
|||
jnthn | kid51: Looks like fun event :-) | 15:09 | |
Enjoy | |||
flussence | of course you could always use parsefile() as a workaround until then... | 15:10 | |
15:18
risou_ joined
15:20
risou left,
jimk joined
15:22
kid51 left
|
|||
nymacro | now if only I could find some awesome groups in Brisbane, Australia ;) | 15:22 | |
15:23
icwiener_ left
|
|||
tadzik | you don't have a PM group there? | 15:23 | |
nymacro | not to my knowledge | 15:24 | |
actually, maybe there is | 15:25 | ||
wait. No. Past meetings: 2005 | |||
tadzik | start one :) | 15:26 | |
dalek | kudo: 2632afb | moritz++ | src/core/EnumMap.pm: fix EnumMap.keys and .kv to return proper Perl 6 strings |
||
jimk | nymacro: Find a pub with wireless access. Convene meeting. | 15:27 | |
Simple | |||
moritz_ | one step missing | 15:28 | |
find others interesting in the same topic | |||
tadzik | wireless access? We usually seek for pubs with beer access | ||
nymacro | ^ this ;) | ||
jimk | 'beer' is the 'interesting topic' | ||
tadzik | Rakudo Star meeting shows that a pub with beer access is not so obvious | ||
moritz_ | there are pubs without beer access? | ||
jimk | We have one ozzie coming to group today | 15:29 | |
15:29
justatheory joined
|
|||
nymacro | crikey! | 15:29 | |
tadzik | moritz_: when we came, there was a note "out of beer". We bought everything they had, and we were lucky it was enough | ||
15:30
ash_ joined
|
|||
nymacro | I might look into the viability of running such a group in Brisbane; if there is enough interested parties and I can find some mutually acceptable interests/topic areas it will be on ;) | 15:31 | |
15:31
jimk is now known as kid51
|
|||
pmichaud | even small groups (3-5 people) can be very worthwhile :) | 15:31 | |
kid51 | nymacro: 10 years ago, we started Perl Seminar NY in a very simple manner: I called the meeting. I presented the very first Perl 5 program I had ever put into production. | 15:32 | |
My ambition: To live long enough to translate *that* program into P6. | |||
15:33
PacoLinux left
|
|||
nymacro | well said :) | 15:33 | |
kid51 | pmichaud attends a Perl 6-focused group in DFW | ||
moritz_ | kid51: what did it do? | ||
15:34
PacoLinux joined
|
|||
kid51 | It was when I was working in state psych hospital and had to refer patients to other hospitals. | 15:34 | |
It translated patient's (extensive) medication history from downloaded-from-mainframe format to one requested by MDs at other hospital. | 15:35 | ||
Used Perl 5 formats! | |||
pmichaud | mmmmm, formats. I haven't used formats since.... Perl 4. :-P | 15:36 | |
15:49
icwiener joined
15:53
kid51 left
16:05
patspam joined
16:07
masonkramer joined
16:10
patspam left
16:16
engine joined
16:18
xabbu42 left
16:19
risou joined
16:20
engine left,
engine joined
16:21
risou_ left
16:22
whoever joined,
whoever is now known as Guest3416
16:25
engine left
|
|||
moritz_ | nqp: loop (my $x := 0; $x < 10; $x++) { if $x > 1 { last }; say $x } | 16:40 | |
p6eval | nqp: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.3.PackFile header failed during unpack» | ||
tadzik | (: | 16:46 | |
16:50
zulon joined
16:57
sjn left
17:00
sjn joined
17:12
nymacro left
17:15
aloha left
17:19
tadzik left
17:24
aloha joined
17:26
literal joined
17:27
ruoso left
17:32
zulon left
17:37
mfollett left
17:41
ruoso joined
17:48
patspam joined
|
|||
dalek | odel: a301155 | mberends++ | java/runtime/ (2 files): [java] add SignatureBinder |
17:49 | |
odel: 84b214c | mberends++ | / (4 files): [java] incomplete ports of PAST2JSTCompiler.pm and JST2Java.pm |
|||
17:53
uniejo joined
17:59
kjeldahl left,
hillu joined
18:00
Ross left
|
|||
masonkramer | Instant and Duration are builtin types, but Weight, Currency, Temperature aren't, right? | 18:03 | |
I'm trying to do the last chapter of Higher Order Perl in Perl6, and I thought maybe it deserves some polish and to be made available on CPAN6 | 18:04 | ||
flussence | rakudo: say Instant.WHAT; say Duration.WHAT; say Temperature.WHAT; | 18:05 | |
p6eval | rakudo 2632af: OUTPUT«Instant()Duration()Could not find sub &Temperature in main program body at line 22:/tmp/ptzgC6tXrQ» | ||
masonkramer | I thought we weren't going back to the implementation for a definitive answer about the language anymore :p | 18:07 | |
18:07
kjeldahl joined
18:09
M_o_C joined
|
|||
flussence | Google says they don't exist in the spec as builtins ;) | 18:09 | |
18:10
kid51 joined,
dha joined
|
|||
sorear | good * #perl6 | 18:10 | |
kid51 | patspam: file questions about PDF at github.com/perl6/book/issues/ | 18:11 | |
patspam | ta | ||
what git tag should I checkout to build the latest Rakudo Star release? | |||
18:11
heins57 joined
18:12
TheFox21 joined
|
|||
colomon | masonkramer++ | 18:14 | |
sorear | kid51++ # love for people like me with ancient boxes | 18:17 | |
18:17
Front_slash joined
|
|||
sorear makes the same change and tests Rakudo build again | 18:18 | ||
(it did not work AT ALL previously - ludicrous memory usage during the parrot-nqp stage) | |||
18:21
Front_slash left,
aindilis left
18:22
risou left,
aindilis joined
|
|||
kid51 | sorear: Ah, now I see what you're saying. | 18:26 | |
I'll have to try building Rakudo on this box again. | |||
18:29
aindilis left
18:30
aindilis joined
|
|||
patspam | star: sub x(Bool){} | 18:34 | |
p6eval | star 2010.07: ( no output ) | ||
patspam | that that valid? | ||
s/sub/multi/ | 18:35 | ||
star: multi x(Bool $x){}; multi x(Bool){}; x(True) | |||
p6eval | star 2010.07: OUTPUT«Ambiguous dispatch to multi 'x'. Ambiguous candidates had signatures::(Bool $x):(Bool ) in main program body at line 22:/tmp/k64hJX__5u» | ||
colomon | star: multi x(Bool){ say "indeed" }; x(True) | 18:36 | |
p6eval | star 2010.07: OUTPUT«indeed» | ||
jnthn | patspam: It's valid, but the dispatcher is correct to point out that they're ambiguous if you write both. | ||
patspam | hey jnthn! | ||
jnthn | o/ patspam | ||
patspam | so you'd never be able to call either? | ||
sorear | kid51: after 11 minutes cpu, setting build is now thrashing | 18:37 | |
360mb virt | |||
'pir' stage | |||
dha | Out of curiosity, is the p6eval bot actually running rakudo* 2010.07, as it seems to be saying? | 18:39 | |
18:40
schpey left,
aindilis left
|
|||
patspam | star: sub x(){ shift }; x() | 18:41 | |
p6eval | star 2010.07: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in 'shift' at line 2846:CORE.setting in 'x' at line 22:/tmp/AYG_6nuYF5 in main program body at line 22:/tmp/AYG_6nuYF5» | ||
patspam | sub x(){ shift }; x(1) | ||
star: sub x(){ shift }; x(1) | 18:43 | ||
p6eval | star 2010.07: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'x' at line 22:/tmp/jZAnUlSiVA in main program body at line 22:/tmp/jZAnUlSiVA» | ||
patspam | damned if I do, damned if I don't | ||
masonkramer | Say I have two class files in my @*INC: Wire.pm and Node.pm. Nodes have Wire attributes, and Wires have Node attributes. How do I declare the Node type in Wire.pm and vice versa? use Node;/user Wire; is infinitely recursive | 18:45 | |
patspam | shift: sub x($x){ shift }; x(1) | 18:46 | |
star: sub x($x){ shift }; x(1) | |||
p6eval | star 2010.07: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in 'shift' at line 2846:CORE.setting in 'x' at line 22:/tmp/Ufp2hUnnE2 in main program body at line 22:/tmp/Ufp2hUnnE2» | ||
patspam | is there a way to define the sub so that I can still use shift a la Perl5? | 18:47 | |
plobsing | star: sub x { .shift }; x(1) | ||
p6eval | star 2010.07: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'x' at line 22:/tmp/qz_V4icVSS in main program body at line 22:/tmp/qz_V4icVSS» | ||
flussence | sub x(*@a) maybe | ||
patspam | star: sub x(*@a) { shift }; x(1) | 18:48 | |
p6eval | star 2010.07: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in 'shift' at line 2846:CORE.setting in 'x' at line 22:/tmp/0ec9VED1xc in main program body at line 22:/tmp/0ec9VED1xc» | ||
plobsing | start: sub x { shift @_ }; x(1) | ||
patspam | that works | 18:49 | |
so what is shift doing when you don't give it @_ as an argument? | |||
plobsing | implicit use of @_ (and to a lesser extent $_) are changed/gone | ||
colomon | star: sub x { .shift }; x(1) | 18:50 | |
plobsing | patspam: shift without @_ is simply that: shift(). No arguments. | ||
p6eval | star 2010.07: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in 'x' at line 22:/tmp/GNnnBKqT3j in main program body at line 22:/tmp/GNnnBKqT3j» | ||
masonkramer | perhaps you could point me to a synopsis on this? | ||
I can't find much in the way of multi-file examples | |||
patspam | shift without arguments seems to be confusing signature checking | 18:51 | |
flussence | rakudo: sub x(*@_) { @_.shift }; x(1); | 18:53 | |
jnthn | patspam: There isn't a shift multi-candidate that takes no arguments. | ||
p6eval | rakudo 2632af: ( no output ) | ||
flussence | the error without that "@_." isn't very friendly though | ||
rakudo: sub x(*@_) { shift }; x(1); | |||
p6eval | rakudo 2632af: OUTPUT«(timeout)Not enough positional parameters passed; got 0 but expected 1 in 'shift' at line 2964:CORE.setting in 'x' at line 22:/tmp/0QphK_aKeB in main program body at line 22:/tmp/0QphK_aKeB» | 18:54 | |
flussence | eh | ||
it only gives me the first error line locally | |||
plobsing | masonkramer: class A {...}; class B { has A $.a }; class A { has B $.b } | 18:57 | |
masonkramer | that works because those classes are in the same lexical scope | 18:58 | |
My classes are in their own files | |||
if I have class Wire; need Node; # Wire.pm | 18:59 | ||
class Node; need Wire;# Node.pm | |||
I get all sorts of errors | |||
eg ./perl6 usr/lib/Wire.pm | 19:00 | ||
===SORRY!=== | |||
Illegal redeclaration of symbol 'Wire' | |||
19:00
envi^home left
19:02
mberends left
19:03
Ross joined,
Ross left,
Ross joined
|
|||
plobsing | masonkramer: A.pm - 'use B; class A { has B $.b }' | 19:03 | |
colomon | masonkramer: why do you think you need to do that? | ||
plobsing | B.pm 'class A {...}; class B { has A $.a }; use A;' | 19:04 | |
patspam | star: multi x(Bool $){}; multi x(Bool){}; x(True) | ||
plobsing | main.pm 'use A; use B' | ||
p6eval | star 2010.07: OUTPUT«Ambiguous dispatch to multi 'x'. Ambiguous candidates had signatures::(Bool ):(Bool ) in main program body at line 22:/tmp/exX1ngaDvV» | ||
plobsing | works fine for me | ||
masonkramer | ( working through replies... ) | 19:05 | |
colomon | (plobsing's approach is would be my first thought as well.) | 19:06 | |
masonkramer | colomon: wtr to why: Wires have Nodes and Nodes have Wires | 19:08 | |
so class A { ... }; is serving as the declaration of A here? | |||
colomon | yes | 19:09 | |
plobsing | predeclaration, yes | ||
19:09
masak joined
|
|||
masak | ahoj! | 19:09 | |
colomon | o/ | ||
masonkramer | where is the illegal redeclaration of symbol 'Wire' coming from? | 19:11 | |
colomon | when you load Wire, it loads Node, which loads Wire. | ||
masonkramer | This is a symmetrical dependency | 19:12 | |
so having one class predeclare the other - | |||
but second predeclare the first | 19:13 | ||
how can I chose which one does it? heh | |||
masak | rakudo: class A { ... }; class B { has A $.a }; class A { has B $.b }; say "alive! \o/" | 19:14 | |
p6eval | rakudo 2632af: OUTPUT«===SORRY!===Unrecognized backslash sequence: '\o' at line 22, near "/\""» | ||
masak | :P | ||
rakudo: class A { ... }; class B { has A $.a }; class A { has B $.b }; say "alive! \\o/" | |||
p6eval | rakudo 2632af: OUTPUT«alive! \o/» | ||
colomon | masonkramer: you could just as easily have both classes predeclare the other... | 19:15 | |
jnthn | masak: :P | 19:16 | |
plobsing | rakudo: 30.can('to-radians').signature.perl.say | 19:18 | |
p6eval | rakudo 2632af: OUTPUT«:(Numeric $x: Any $base;; *%_)» | ||
plobsing | what is Any $base? | ||
masak | enum TrigBase is export <Radians Degrees Gradians Circles>; | 19:19 | |
plobsing: it's a value of that enum type, according to S32/Numeric | 19:20 | ||
I don't find it extremely intuitive that that parameter be a required positional. | |||
plobsing | oic. My thought process was: "base... hmmm... well I want my answers in base 10..." | ||
masonkramer | predeclare each class in the other is giving me an illegal redeclaration error | ||
nopaste.snit.ch/23637 | |||
patspam | is there a practical difference between multi x(Int){} and multi x(Int $){}? | 19:21 | |
colomon | ah, right. | ||
patspam | maybe I'm not up to that part of the book yet | ||
kid51 | Do we have any pastebots here? | 19:23 | |
colomon | masonkramer: forgot about that annoying bit. | ||
masak | patspam: no, no practical difference. | 19:24 | |
masonkramer | I can't get plobsing's original suggestion to compile either | 19:25 | |
kid51 | nopaste.snit.ch/23640 | ||
19:25
wallberg joined
|
|||
plobsing | I like it, so long as I get to be player 1. | 19:26 | |
patspam | thanks masak | ||
we're working through the Using Perl 6 book atm, hence the barrage of questions | 19:27 | ||
19:27
miso_soup left
|
|||
masak | patspam++ | 19:27 | |
others++ | 19:28 | ||
patspam | kid51++ mostly | ||
19:32
lichtkind joined
|
|||
masonkramer | if main.pl6 only uses Wire *or* Node, then it basically works | 19:32 | |
19:33
mberends joined
|
|||
cosimo | I have a class. I didn't write any new() method. what if I need to do something to initialize the class? can i write a new(), or? is there something like Moose BUILD() method? how does that work? | 19:33 | |
jnthn | Yes, yes. | 19:34 | |
lichtkind | moritz_: did you install any chatbots here? | ||
phenny | lichtkind: 20 Sep 12:49Z <[Coke]> tell lichtkind - please give me the exact URL including the tag for your feed. | ||
lichtkind: 20 Sep 12:49Z <[Coke]> tell lichtkind to email me at [email@hidden.address] for that. | |||
lichtkind | ah thanks phenny | ||
jnthn | cosimo: perlgeek.de/blog-en/perl-6/object-c...ation.html | 19:35 | |
cosimo: That's a good article. | |||
cosimo | thanks jnthn | 19:36 | |
submethod BUILD. awesome. | 19:37 | ||
19:37
pmurias joined
|
|||
sorear | kid51: rakudo build finished; real time 70 minutes, max vsize 420MB; down from a best of 7min/350 (~July); but still better than the overnight run from March | 19:38 | |
kid51 | sorear: I'll try to build at home tonight: Were you using Rakudo Star or pulling from git? | 19:39 | |
masak | nothingmuch++ # blog.woobling.org/2010/09/moose-has-won.html | 19:43 | |
19:44
heins57 left
|
|||
sorear | kid51: got | 19:44 | |
git | |||
hmm, nothingmuch still hasn't relurked since the fake audrey incident | 19:45 | ||
19:48
ruoso left
|
|||
lichtkind | jnthn: cheers | 19:49 | |
jnthn | lichtkind: Na zdravie! | ||
19:49
szabgab joined
|
|||
lichtkind | jnthn: skoll :) | 19:49 | |
jnthn: i think now i officially to work on my grant :) | 19:50 | ||
jnthn | \o/ | 19:51 | |
kid51 | alright, let's go to the movies | ||
jnthn | lichtkind++ | ||
19:51
dha left
|
|||
patspam | is there an equivalent to perldoc in Perl6? | 19:51 | |
lichtkind | patspam: not yet | ||
patspam: there is a book some people here write | 19:52 | ||
patspam | heh yeah, that's what I'm working through :) | ||
lichtkind | patspam: and there are the tablets i write | ||
patspam | but say when I want to learn about "shift" in Perl6 | ||
19:52
kid51 left
|
|||
patspam | what's my spec/doc source? | 19:52 | |
lichtkind | specs are synopses | ||
www.perlfoundation.org/perl6/index.cgi?synopses | 19:53 | ||
but maybe your better served with my index A | |||
patspam | url? | ||
lichtkind | www.perlfoundation.org/perl6/index....dex_tablet | 19:54 | |
patspam | thanks | ||
we're wrapping up here, till next time! | |||
colomon | lichtkind++ | ||
19:54
patspam left
|
|||
lichtkind | colomon: thanks for what? | 19:55 | |
colomon | "i officially to work on my grant" # not thanks so much as applause and encourage | ||
*ment | 19:56 | ||
flussence | lichtkind++ for that index; I was looking for something like that | 19:57 | |
lichtkind | thanks its also included in grok | ||
colomon: it was more info because i had to delay that a bit and planet6 for me is broken since i get noone to redirect to my new blog | 20:00 | ||
sorear | Argh | 20:01 | |
I spent over an hour building this Rakudo, and it won't even start | |||
stefan@stefans:/tmp$ perl6 | |||
PackFile_unpack: This Parrot cannot read bytecode files with version 8.4. | |||
both parrot & rakudo were completely clean before the build | 20:02 | ||
masak | moritz_: working on a Sudoku solver? | ||
flussence | does "ldd perl6" point to the right libparrot? | 20:03 | |
sorear | flussence: No. Why not? | 20:04 | |
Who broke pbc2exe? | |||
masak | rakudo: my @l = <a bb c d e f g h>; while @l.munch(3) -> $_ { .say } | ||
20:04
ruoso joined
|
|||
p6eval | rakudo 2632af: OUTPUT«a bb cd e fg h» | 20:04 | |
sorear | Why is it linking stuff against Parrot 2.5? | ||
masonkramer | I want to use the default new and do some stuff afterwards...can I use .wrap for this and yet access private attributes? | 20:05 | |
flussence | sorear: what commands did you use to build? | ||
masonkramer | nopaste.snit.ch/23642 | ||
sorear | flussence: make | 20:06 | |
masonkramer | submethod BUILD, alright | 20:07 | |
flussence | on my system I'm using "rm parrot*/; make realclean; perl Configure.pl --gen-parrot; make all install"... you might need to re-run Configure.pl | 20:08 | |
sorear | goddamn Makefile wants to rebuild everything now that I've rebuilt Parrot | 20:09 | |
sorear deletes all the dependencies from Makefile | 20:10 | ||
20:12
M_o_C left
|
|||
sorear | after far too much manual work, I now have a working perl6 | 20:12 | |
masak | "far too much manual work" seems to be the era we're in so far. | 20:13 | |
sorear | sudo rm -rf /usr/local/src/parrot /usr/local/lib/parrot /usr/local/lib/libparrot* | ||
that, then reinstalling Parrot, then manually rebuilding Rakudo (the Makefile is useless), then installing, did it | 20:14 | ||
mberends | yes, over here it's mindlessly `rm -rf parrot parrot_install` whenever PARROT_REVISION shows up in a git pull. | 20:17 | |
masak | I just 'make realclean' on both my Parrot and Rakudo every time I rebuild. | 20:19 | |
20:21
TheFox21 left
|
|||
masonkramer | my @wires = gather for 1..10 { take Wire.new }; # is there a better way? | 20:22 | |
flussence | my @wires = Wire.new xx 10; ? | 20:24 | |
masak | nope | ||
that'll give you the same object ten times. | |||
my @wires = map { Wire.new }, ^10; | 20:25 | ||
masonkramer | I always forget about ^ | 20:26 | |
masak | my @wires = do for ^10 { Wire.new }; | ||
masonkramer | thanks masak | ||
is do for lazy? | |||
jnthn | It's lazy but list assignment is not. | 20:28 | |
masak | masonkramer: 'for' is lazy. 'do' is just making an expression out of what's normally a statement. | 20:29 | |
masonkramer | do for ^10 is exactly what I want, i'm not really transforming an integer into a Wire, so I don't want to say map | 20:30 | |
plobsing | rakudo: (do for ^3 { .say }).munch(1) | ||
p6eval | rakudo 2632af: OUTPUT«012» | ||
plobsing | not lazy ATM | ||
masak | masonkramer: I think you read too much into the difference, but that's all right. :) use whatever you're comfortable with. | 20:31 | |
sorear | masak: make realclean wasn't enough | 20:32 | |
I had to blow away the install too | |||
masak | sorear: you're probably using --gen-parrot. I'm not. | 20:33 | |
sorear | I thought I was the only one who wasn't, actually | ||
the install to blow away was in /usr/local | |||
masak | ok. | ||
I haven't tried rebuilding today, but it's always worked so far. | 20:34 | ||
sorear | anyways I now have a working perl6 again; I think I won't touch parrot or rakudo for a couple months | ||
flussence | rakudo: our multi sub infix:<**>(Block $thing, Int $count) { do for ^$count { $thing.() } }; say ~( { rand } ** 5 ); | ||
p6eval | rakudo 2632af: OUTPUT«0.378775026739703 0.40071641471344 0.964106152156951 0.42610601255463 0.0209936362079901» | 20:35 | |
20:37
Grimnir_ joined
|
|||
mberends forgot that nqp-rx (for 6model) is also blown away while rebuilding Parrot | 20:40 | ||
lichtkind | mberends: hai martin | 20:44 | |
20:45
wamba left
|
|||
moritz_ | nqp: loop (my $x := 0; $x < 10; $x++) { if $x > 1 { last }; say $x } | 20:47 | |
p6eval | nqp: OUTPUT«Confused at line 1, near "loop (my $"current instr.: 'parrot;HLL;Grammar;panic' pc 654 (src/cheats/hll-compiler.pir:206)» | ||
masak | moritz_: [backlog] writing on a Sudoku solver? | 20:53 | |
moritz_ | masak: yes | 20:54 | |
masak | moritz_: have you found (1) Peter Norvig's very nice solution, (2) Donald Knuth's inspiring solution? | ||
moritz_ | yes and yes | ||
masak | good. and good. | ||
moritz_ | :-) | ||
masak | just checking :) | ||
moritz_ | maybe I should really do dancing links | 20:55 | |
20:55
wallberg left
|
|||
masak | I don't know. maybe fsvo 'really'. | 20:55 | |
moritz_ | I've been wanting to do that for ages, but somehow the complexity deterred me | ||
and in C++, simple deduction + backtracking was good enough | |||
masak | it doesn't seem as obvious in Perl as in, say C. | ||
florz | moritz_: in perl6? | 20:56 | |
colomon | wait, there's a Knuth solution?! | ||
Grimnir_ | I have some problems with an example from an perl advent from december. either when I use the normal rakudo or the alpha branch, I get errors. the program is: pastie.org/1181554 | ||
moritz_ | florz: sure | ||
Grimnir_ | the alpha branch says: No applicable candidates found to dispatch to for 'prefix:=' | ||
the normal branch starts with the error message: Missing block at line 25, near ";\n my $" | 20:57 | ||
moritz_ | masak: where "good enough" = "can solve more sudokus in the Rakudo startup time than I can solve in a month" :-) | ||
masak | colomon: news.ycombinator.com/item?id=1160781 | ||
moritz_: aye. | |||
florz | moritz_: I gave up when rakudo didn't want to construct cartesian products for me ;-) | ||
sorear | ... There is no line 25 | ||
masak | florz: what about X? | 20:58 | |
Grimnir_ | sorry, 2 secs... | ||
masak | rakudo: .say for <1 2 3> X <a b c> | ||
colomon | masak++ | ||
Grimnir_ | Missing block at line 2, near ";\n my $" | ||
p6eval | rakudo 2632af: OUTPUT«1a1b1c2a2b2c3a3b3c» | ||
moritz_ | rakudo: say (<a b> X <c d>).perl | ||
p6eval | rakudo 2632af: OUTPUT«(("a", "c"), ("a", "d"), ("b", "c"), ("b", "d"))» | ||
Grimnir_ | I had some commented stuff in the beginning, but not in the pastie | ||
florz | masak: yeah, and then add another list ;-) | 20:59 | |
moritz_ | $ /perl6 foo.pl abc 2 | ||
"abc" rotated 2 characters gives "cde". | |||
with today's Rakudo | |||
Grimnir_ | oh... strange | ||
masak | florz: ah. aye, known deficiency. | ||
Grimnir_ | I'll try to get it again then | ||
masak | florz: I recommend you write your own custom sub for now. | ||
florz: do you want me to try and write it for you? | |||
florz | masak: well, yeah, wasn't sufficiently important - and after all the point was to write a succint perl6 solver, not to write a sudoku solver ;-) | 21:00 | |
dalek | p-rx/nom: 51b35b7 | jnthn++ | / (5 files): Implement P6int/P6num/P6str reprs so far as they are in the .Net version of 6model and add them to the build. |
||
moritz_ | github.com/moritz/perl6-Sudokubtw | 21:02 | |
github.com/moritz/perl6-Sudoku btw | |||
the initializer is still fixed on 9x9, but the rest is completely generic | |||
and the approach with using contraints means it's very easy to change the rules, or add constraints (like for the diagonals) | 21:03 | ||
blog.woobling.org/2010/09/moose-has-won.html might be of interest | 21:04 | ||
masak pasted that a while ago :) | |||
moritz_ hasn't backlogged yet | |||
ye know, #perl6 is a write-only channel :-) | |||
sorear ponders a perl 6 minimax demo | |||
21:06
Camille_B joined
|
|||
plobsing would like to see an LP and QP package in nqp - lpnqp (lp-nqp and lp n' qp) | 21:06 | ||
moritz_ | where LP = Long Playing phonograph record? | 21:07 | |
plobsing | linear programming | ||
moritz_ | ah | 21:08 | |
21:08
bobkare joined
|
|||
plobsing | although having perl 6 play outdated media would be cool too | 21:08 | |
moritz_ | and QP = quadratic programming? | 21:09 | |
plobsing | yes. | 21:10 | |
jnthn | Can't we just have a generic PP? :-) | ||
plobsing | sure, but it would ruin my pun and probably run slow as hell (IIRC, general QP is NP-hard) | 21:12 | |
masak | Quarter Pounder is NP-hard? | ||
moritz_ | "Royale with Cheese"! | 21:13 | |
plobsing | en.wikipedia.org/wiki/Quadratic_pro...Complexity | ||
masak | it better have quadratic complexity, or I'll be much disappointed :P | ||
moritz_ ponders programming with fractional dimenionality | 21:14 | ||
21:21
Camille_B left
|
|||
lue | ohai o/ | 21:23 | |
masak | \o | ||
flussence | lue: [backlog] perl6 for browser scripting sounds insane. might be doable though | 21:24 | |
I mean, it's all DOM manipulation in the end, so all you'd need is something that converts the p6 code into JS DOM API calls | 21:25 | ||
masak | converting arbitrary p6 code into js is no easy task. | 21:26 | |
lue | I tried coding in Javascript, but I think it was a combination of having to constantly look up stuff and liking P6 too much that made me not like it :) | ||
flussence | yeah, JS really could use inline documentation :| | 21:27 | |
masak | lue: learning to like JavaScript is a good investment for the future. | ||
moritz_ | lue: after you learned Perl 6, you'll have to accept that almost any other language is a major hassle :-) | ||
that shouldn't stop you from learning other languages though | 21:28 | ||
lue | I have used it quite enjoyably in the past. But that was before P6, and I had a place to put the results :P | ||
flussence | apparently I'm not the first person to think of this: wiki.mozilla.org/Labs/Bespin/Desig...umentation | 21:30 | |
lue | Ah well, looks like I'll resign to JS. [ until the W3C says it's OK to put P6 in <script> tags :) ] | 21:33 | |
flussence | (or someone implements P6 in JS...) | 21:34 | |
masak | lue: doesn't matter much what the w3c says in this case, as long as there's no client-side support for p6 in browsers. | ||
21:39
Chillance left
|
|||
lue attempts to switch gears before he continues displaying his !knowledge about the finer points of the web | 21:41 | ||
lue also can't wait for the IETF to finalize HTML5 | |||
moritz_ dislikes the word "finalize" | 21:43 | ||
21:44
Guest23195 left
|
|||
moritz_ | would you like to use a finalized human language? | 21:46 | |
masak | the requirements on computer standards aren't the same as on spoken languages for humans. | 21:47 | |
mberends | final*ze should be a banned word in #perl6 | ||
21:47
Italian_Plumber joined
|
|||
lue | does that mean P6.1 would never happen? | 21:47 | |
moritz_ | masak: and that's the problem | 21:48 | |
jnthn | .oO( I thought we called finalize "DESTROY" in Perl 6... ) |
||
masak | moritz_: wait, what? no. | ||
moritz_: stability has its place. | |||
mberends | lue: sure it will. But we have plenty of time before P6.0 is final*zed. | 21:49 | |
moritz_ | masak: and change too | ||
masak | of course. | ||
but I wouldn't consider the places in the computer industry where people have produced stable standards a "problem". | 21:50 | ||
to some extent, I understand p5p's adherence to backwards compatibility over almost all else. | 21:52 | ||
there are some definite advantages to not changing. Perl 6 just happens to be taking the other route, which has a number of advantages, too. | 21:53 | ||
21:54
Italian_Plumber left
|
|||
lue | In my mind, P6 is not a progression of Perl, but a 'fork' of sorts. | 21:56 | |
21:56
gabiruh joined,
Ross left
|
|||
moritz_ | right; it's way ahead in some areas, and way behind in others | 21:57 | |
masak | lue: it's a "new Perl". | ||
mberends | lue: true. P6 does not threaten P5, it offers an alternative Perl. | ||
masak | meme courtesy of jnthn++ | ||
jnthn | Surely I wasn't the first person to put it that way? :-) | 21:58 | |
masak | think so. | ||
lue | .oO(What would the next major step from P5 be called? P5v6?) |
22:00 | |
masak | lue: 5.14, 5.16, 5.18 ... | ||
masonkramer | when I try to run rakudo*'s perl6 interpreter using an absolute path to it, I get an unknown file error | 22:01 | |
if I cd to the directory containing perl6 and try again, it works | |||
pastie.org/1181654 | |||
known issue? | |||
masak | masonkramer: 'make install' | ||
flussence | ...what masak said :) | 22:02 | |
masonkramer | heh | ||
flussence is slow typist | |||
masonkramer | thanks :) | ||
masak | we should probably have a better error message there. | ||
flussence | I dunno, that one's pretty descriptive compared to the generic "Segmentation fault" I got | 22:03 | |
masak | :P | 22:04 | |
moritz_ | uhm, didn't we have a better error message for that? | ||
I mean, back in the days? | |||
masak | not that I recall. | ||
jnthn | Yes, alpha did. | ||
moritz_ | and I thought I had ported it to master at some point | 22:05 | |
jnthn | The code is copy-pasteable to latest, if anyone wants to do os. | ||
masak | wuhwait. "Divide by zero"? | ||
how does a non-installed Rakudo lead to a division by zero? o.O | |||
that's wrong on at least one level. | 22:06 | ||
plobsing | well division is denoted by /. which also is used in paths. so it makes sense ;-) | 22:07 | |
lue | .oO( maybe the end of the line (...../perl6), not finding perl6 was interpreted as ....../0 ? ) |
22:08 | |
moritz_ | src/Perl6/Compiler.pir lines 37-43 | ||
masonkramer: which version of rakudo are you using? | |||
masak | plobsing++ # disturbing rationalization :) | ||
masonkramer | moritz_: how can I tell? It's one of the * distributions (maybe the only one?) | 22:09 | |
./perl6 --version | |||
This compiler is built with the Parrot Compiler Toolkit, parrot revision 47310. | |||
moritz_ | masonkramer: must be the first R* release | ||
22:09
uniejo left
|
|||
moritz_ | the second reported it version probably | 22:09 | |
*its | |||
better error message added on Wed Jun 30 12:34:38 2010 +0200 | 22:10 | ||
masonkramer | ok, pulling the latest | ||
moritz_ | there'll be another release next Tuesday | 22:11 | |
masonkramer | I'll pull then too :)~ | ||
there it is right in the readme | 22:12 | ||
moritz_ | you'd be the first to read it :/ | 22:13 | |
22:14
cbk joined
|
|||
masonkramer | is there a way to really dump an object? I want more than .perl is giving me | 22:15 | |
22:15
Nosnam joined,
Nosnam left
|
|||
masak | masonkramer: could you be a bit more specific? | 22:16 | |
masonkramer | I would try to cook up a little example, but I have to wait for perl6 to build :) | ||
flussence | rakudo: say DateTime.now.perl; # not good enough? | 22:17 | |
p6eval | rakudo 2632af: OUTPUT«DateTime.new(year => 2010, month => 9, day => 25, hour => 21, minute => 54, second => 26.6693475246429, timezone => 0, formatter => { ... })» | ||
masonkramer | Oh, does it do that? | ||
Then I guess the problem is that my objects have no data somehow | |||
22:17
kjeldahl left
|
|||
masak | ".perl: does more than you'd think" :) | 22:17 | |
moritz_ | or maybe your rakudo is too old :-) | ||
rakudo: class A { has $.x = 5 }; say A.new(x => 17).perl | 22:18 | ||
p6eval | rakudo 2632af: OUTPUT«A.new(x => 17)» | ||
22:18
^Mike\b joined
|
|||
^Mike\b | Perl 5 docs say that -w not being mandatory is a bug. Will the equivalent be mandatory in perl 6? | 22:18 | |
22:19
mfollett joined
|
|||
masak | ^Mike\b: yes. it is. | 22:19 | |
^Mike\b | cool - what about strict? | ||
moritz_ | not mandatory, but default | ||
(both warnings and strict) | |||
masak | nod. | ||
and right now, there's no way to turn them off. | |||
^Mike\b | \o/ | 22:20 | |
masonkramer | class A { has @.things }; say A.new(things => <1 2 3>).perl | ||
masak | (and I suspect at least implementing turning off 'strict' will be difficult) | ||
moritz_ | rakudo: class A { has @.things }; say A.new(things => <1 2 3>).perl | ||
p6eval | rakudo 2632af: OUTPUT«A.new(things => ["1", "2", "3"])» | ||
moritz_ | masak: I don't think so, once we have enough compile time information | ||
masak | I hope you're right. | 22:21 | |
masonkramer | is there any difference between things => <1 2 3> and :things(<1 2 3>) ? | ||
lue | any reason you *wouldn't* want warnings and strict, besides being lazy about your programming? | ||
masak | masonkramer: I wouldn't say there is. | ||
flussence | the ()s make precedence a bit more obvious | ||
masak | lue: yes, I've been unable to do some -n and -p one-liners with strict at times. | 22:22 | |
moritz_ | you can even write it as :things<1 2 3> | ||
masonkramer | That's it? Both create Parcels? | ||
or Pairs? | |||
what's the difference? | |||
moritz_ | Pairs | ||
22:22
^Mike\b left
|
|||
masak | lue: and selectively turning off warnings is what one wants in some cases. | 22:22 | |
sorear | jnthn: I don't like DESTROY, fwiw | 22:29 | |
jnthn | sorear: Well, it's essentially guaranteeeless. | 22:30 | |
(as to when it'll get run) | |||
Wo as implementors we can do it however works. | |||
(as in, works well for the implementation) | |||
sorear | I mean, having finalizers as object methods feels very wrong | ||
masonkramer | rakudo: class F { has @.things; has $.foo; submethod BUILD { ... } }; say F.new(:things<1 2 3>, :foo<1>).perl | 22:31 | |
p6eval | rakudo 2632af: OUTPUT«F.new(things => [], foo => Any)» | ||
masak | sorear: why? | ||
sorear | the resurrection problem is a major symptom of the underlying wrongness | ||
jnthn | sorear: What would you want them to be? | ||
Resurrection isn't a problem as such. | |||
moritz_ | masonkramer: it's a known bug that BUILD interacts badly with the defualt constructor :( | 22:32 | |
jnthn | It *is* a pain that it may happen. | ||
sorear | jnthn: The least insane finalizers I've seen were in GHC Haskell, which basically has Mu.attach-finalizer($sub) | ||
(actually it's integrated with the weak reference system) | |||
masak | when would resurrection happen in DESTROY? | ||
sorear | in particular, $sub does *not* receive a reference to self | ||
masonkramer | moritz_: Yay! This one's not my fault | 22:33 | |
sorear | which means that objects with finalizers can be collected immediately | ||
only the data that the finalizer actually closes over needs to be retained | |||
jnthn | sorear: That is quite a nice design. | ||
masak: When you for example make another reference to self exist. | 22:34 | ||
masonkramer | moritz_: so if I want to do some more initialization, I currently need to do my own new()? | ||
masak | ah. submethod DESTROY { $global = self } ? | ||
sorear | yes | 22:36 | |
plobsing | S06 specifies that positional placeholder vars are arranged in "Unicode order". What does that mean? Graphemes? Codepoints? | ||
masak | sorear: I smell a spec patch coming up. | ||
many of the ingredients are there; no-one particularly likes DESTROY/DESTROYALL, there's no implementation of them, and there are known problems with the spec as-is. | 22:37 | ||
I didn't know about the resurrection problem until today. sorear++ for pointing that out. | 22:38 | ||
jnthn | masak: The scariest thing is code that depends on it. ;-) | ||
masak | :( | ||
jnthn | oh gah...once again I have to go chasing a Parrot change rather than doing useful stuff. | 22:39 | |
masak | why would DESTROY want to be a (sub)method in the first place? because of bottom-up destruction, it would have no attribute objects that one'd want to access anyway. | ||
jnthn: one almost wishes they'd finalize Parrot once and for all. :P | 22:40 | ||
plobsing | a finalized parrot would be a dead parrot. would still have lovely plumage though. | 22:43 | |
22:43
Italian_Plumber joined
|
|||
lue | .oO(And all of the internet would laugh from behind the fourth wall) |
22:43 | |
masak | "it's not finalized, it's pinin'" | 22:44 | |
mberends | "it's joined the Choir Eternal" # stability is overrated | 22:45 | |
lue | Now I feel the need to write the Parrot/P6 version of the dead parrot sketch... | ||
plobsing | look mate, this VM wouldn't voom if you put a million volts through it! | 22:46 | |
mberends | lue: you absoluetely should | ||
lue | "It's a pun" A pun? "No, one of those things that are backwards and forwards" Endianness? ... | 22:47 | |
masonkramer | rakudo: class A { sub new { say "hi" } }; A.new.perl | 22:48 | |
p6eval | rakudo 2632af: ( no output ) | ||
masak | lue: my golly, I think your wit is getting sharper... | ||
masonkramer | class A { sub new { say "hi" } }; say A.new.perl | ||
raaah | 22:49 | ||
masak | :P | ||
masonkramer | rakudo: class A { sub new { say "hi" } }; say A.new.perl | ||
p6eval | rakudo 2632af: OUTPUT«A.new()» | ||
masak | rakudo: say "RAAAH!" | ||
p6eval | rakudo 2632af: OUTPUT«RAAAH!» | ||
lue thinks it would be quite serendipitous if #parrot went down to 0 nicks and disappeared when this topic came up | 22:50 | ||
dalek | p-rx/nom: c295c00 | jnthn++ | build/Makefile.in: Need to put building the dynops/dynpmcs pretty early. |
22:51 | |
p-rx/nom: afeebf6 | jnthn++ | src/ops/nqp.ops: Make sure we don't double-init the meta-model / dynops. |
|||
p-rx/nom: d84b3db | jnthn++ | / (2 files): Bump to latest Parrot to get .loadlib on PAST blocks, and chase a Parrot NCI PMC API change. |
|||
masonkramer | is that supposed to happen? | ||
22:51
Italian_Plumber left
|
|||
masak | masonkramer: I think you think that defining a sub 'new' overrides the method '.new' from Mu. | 22:51 | |
masonkramer | if there's a method new and a sub new, how do I get the sub new? | 22:52 | |
masak | rakudo: class A { method foo { bar() }; sub bar { say "OH HAI" } }; A.new.foo | ||
p6eval | rakudo 2632af: OUTPUT«OH HAI» | ||
masak | does that answer your question? | 22:53 | |
.foo and &bar have different names here, but it'd work if they had the same name too. | |||
because the calling mechanisms are different. | |||
masonkramer | yes | 22:54 | |
sorry. I'm still in perl5 land | |||
sorear | interesting mini-survey of finalization: ftp://ftp.inf.puc-rio.br/pub/docs/techreports/04_30_leal.ps | ||
masak | masonkramer: you're not the first to be confused about this issue. | 22:55 | |
sorear: thanks for that reference. | |||
I'm more and more convinced that we should emulate GHC in this regard. | 22:57 | ||
jnthn | It'd have my +1 | 23:00 | |
plobsing | how does not giving finalizers an explicit reference to main solve the underlying issue? can't the same problems occur with cyclic datastructures? | 23:01 | |
s/main/self/ | |||
masak | plobsing: at first blush, it sounds like you're conflating two different problems with that question. | 23:02 | |
cyclic datastructures are a problem in e.g. refcounting GCs. | |||
23:02
icwiener left
|
|||
masak | which would preventing such a GC from ever calling DESTROY in the first place. | 23:03 | |
whereas resurrection occurs when a DESTROY submethod is called and creates a new surviving reference to self. | 23:04 | ||
plobsing | we prevent 'submethod DESTROY { $global = self }'. but what's to stop a user from 'submethod DESTROY { global = $^self-ref }'? | ||
oops. submethod DESTROY { global = $!self-ref } | 23:05 | ||
sorear | ah. *this* is what I was looking for | ||
research.microsoft.com/en-us/um/peo...weak.ps.gz | |||
plobsing: $!self-ref doesn't work without self. | |||
masak | plobsing: the solution is not letting it be a (sub)method. | ||
ah, good ol' simonpj | 23:06 | ||
plobsing | ok, sure it's not a submethod. but it still needs access to attributes somehow. and self can occur within the object graph of an attribute. | 23:07 | |
masak | plobsing: if it needs access to attributes, then the GHC solution (as I understand it) is out of the question. | 23:08 | |
but I must confess to having very little experience with destructors. | |||
does it actually need to access the attributes. | |||
s/\./?/ | |||
and if it does, how can it reliably do that? haven't they already been GC'd? | |||
plobsing | how do you destroy a filehandle without having access to the underlying fd? | 23:09 | |
masak | good question. | ||
that's certainly a use case we must factor in. | |||
masonkramer | so is there no way to use the default new constructor with BUILD? | 23:10 | |
masak | sure there is. | ||
rakudo: class A { has $.x }; say A.new(x => 42).x | 23:11 | ||
p6eval | rakudo 2632af: OUTPUT«42» | ||
masak | rakudo: class A { has $.x; submethod BUILD(:$x) { $!x = 5 } }; say A.new(x => 42).x | ||
p6eval | rakudo 2632af: OUTPUT«5» | ||
masak | hugme: hug p6eval | 23:12 | |
hugme hugs p6eval | |||
cbk | masak, how would you do that if x is a hash? | ||
masak | hm. | 23:13 | |
cbk | A.new( %x = "key", "value") | ||
just guessen' here | |||
I need something like this. | |||
nothing I try works. | |||
masak | rakudo: class A { has %.h }; say A.new(:h<1 a 2 b>).h.perl | 23:14 | |
p6eval | rakudo 2632af: OUTPUT«{"1" => "a", "2" => "b"}» | ||
cbk | now I just have a silly make() method | ||
masak | there are other ways, to be sure. but that one works. | ||
cbk | ok | ||
jnthn | rakudo: say (:h{ a => 1, b => 2}).perl | 23:15 | |
cbk | I was putting ,'s in there. | ||
p6eval | rakudo 2632af: OUTPUT«"h" => {"a" => 1, "b" => 2}» | ||
masak | rakudo: class A { has %.h }; say A.new(:h(a => 1, b => 2).h.perl | ||
p6eval | rakudo 2632af: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» | ||
masak | rakudo: class A { has %.h }; say A.new(:h(a => 1, b => 2)).h.perl | ||
p6eval | rakudo 2632af: OUTPUT«{"a" => 1, "b" => 2}» | ||
masak | rakudo: class A { has %.h }; say A.new(:h{a => 1, b => 2}).h.perl | 23:16 | |
p6eval | rakudo 2632af: OUTPUT«{"a" => 1, "b" => 2}» | ||
masak | \o/ | ||
cbk | what is the : in front of the h mean? | ||
masonkramer | rakudo: class F { has @.things; has $.foo; submethod BUILD { self } }; say F.new(:things<1 2 3>).perl | 23:17 | |
p6eval | rakudo 2632af: OUTPUT«F.new(things => [], foo => Any)» | ||
masak | cbk: 'this parameter is a named parameter' | ||
masonkramer | : is way of setting up a Pair here cbk | ||
masak | or what masonkramer said. | ||
rakudo: say (:h).WHAT | |||
p6eval | rakudo 2632af: OUTPUT«Pair()» | ||
masonkramer | masak: what am I doing wrong? things should have <1 2 3> | ||
cbk | I got the array to work but was having problems with the hash. | 23:18 | |
masak | masonkramer: you're misunderstanding BUILD. | ||
masonkramer: S12 is your reading task for tomorrow :) | |||
#perl6, I bid you good night. | 23:20 | ||
o/ | |||
23:20
masak left
|
|||
masonkramer | nite | 23:20 | |
All I want to do is use the default new() method and then call a method on the object after it's created | 23:21 | ||
*headdesk*. *headdesk*. *headdesk*. | |||
around new { my ($orig, @args); my $obj = $orig->(@args); $obj.id(++$count) } | 23:22 | ||
is there nothing like that? | |||
jnthn | rakudo: class Foo { method BUILD() { self.lol }; method lol() { say "oh lol" } }; Foo.new | 23:24 | |
p6eval | rakudo 2632af: OUTPUT«oh lol» | ||
jnthn | Like that? | ||
or | |||
rakudo: class Foo { method new() { my $obj = self.bless(*, *%_); $obj.lol; $obj }; method lol() { say "oh lol" } }; Foo.new | 23:25 | ||
p6eval | rakudo 2632af: OUTPUT«oh lol» | ||
dalek | p-rx/nom: 6addc8f | jnthn++ | src/NQP/Actions.pm: Load nqp_group and nqp_ops and initialize them at the start of an NQP program. |
||
p-rx/nom: ae7a992 | jnthn++ | src/NQP/Actions.pm: Don't have nqpop support yet, so use pirop for now. |
|||
p-rx/nom: 5a6ffa4 | jnthn++ | src/metamodel/knowhow_bootstrapper.c: Oops, last attempt to modify things to work on latest Parrot missed something. This works. |
|||
p-rx/nom: 9937ece | jnthn++ | src/NQP/ (2 files): knowhow declarations using the new meta-model now work. |
|||
masonkramer | jnthn: ( working through that ... ) | 23:26 | |
First way is not what I'm looking for. I want to use Mu.new() - that is, I want attributes to be set via Pairs. Then, I have another attribute that should be set automatically by a method - an autoincrementing ID. I don't want to rewrite Mu.new()'s behavior in order to extend Mu.new() with something else | 23:30 | ||
second way is also rewriting Mu.new(), I think | |||
not really sure what's going on there | 23:31 | ||
does that make sense? Is that possible? | 23:34 | ||
23:34
pmurias left
|
|||
jnthn | masonkramer: Sounds like what you want is the use case for BUILD | 23:35 | |
BUILD is designed for when you want to do some extra initialization per new instance. | |||
Though if you just want unique IDs... | |||
rakudo: class Foo { my $cur_id = 0; has $.id = $cur_id++; }; say Foo.new.id for 1..5; | 23:36 | ||
p6eval | rakudo 2632af: OUTPUT«01234» | ||
masonkramer | rakudo: class F { has @.things; has @.build_things; submethod BUILD { @!build_things = <A B C> } }; say F.new(:things<1 2 3>).perl | 23:38 | |
p6eval | rakudo 2632af: OUTPUT«F.new(things => [], build_things => ["A", "B", "C"])» | ||
masonkramer | things should have [1, 2, 3], afaict | ||
jnthn | Oh! | ||
Damm...that's a Rakudo bug. :/ | |||
masonkramer | alright :) | 23:39 | |
glad I'm on the same page now | |||
so this ability is specced but not quite there yet. A workaround would be to actually implement the behavior of the default Mu.new | 23:45 | ||
jnthn | masonkramer: Yes, it's not quite working as it should in Rakudo. | ||
The spec has it as you expect, so far as I recall. | |||
masonkramer | how do I slurp up all the pairs that are passed to new? I'm having some trouble figuring that out. new (@args) { } sets up positional parameters | 23:46 | |
*%_? | |||
jnthn | They're already slurped into *%_ for you | 23:47 | |
masonkramer | the interesting that is that, even while working around rakudobugs, my code is still nicer than perl 5's built in OO stuff | ||
jnthn | But you can delcare that explicitly | ||
Or give it a nice name | |||
*%attrs | |||
Or whatever you like :-) | |||
flussence | ...does *%_ work even if I stick non-pairs in between the pairs? | 23:48 | |
dalek | p-rx/nom: 771e2ba | jnthn++ | src/metamodel/how/NQPClassHOW.pm: Start to sketch out an NQP ClassHOW. |
||
jnthn | flussence: Well, it slurps up all the named arguments in the capture, which are stored separately to any positionals. | 23:50 | |
23:51
Patterner left,
Psyche^ joined,
Psyche^ is now known as Patterner
23:54
Guest3416 left
|