Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-04-15

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 justatheory joined perl6
00:08 pbuetow joined perl6
00:24 mr_ank_ joined perl6
00:45 vel joined perl6
00:48 sri_ joined perl6
01:29 bonesss joined perl6
01:58 mako132 joined perl6
02:07 justatheory joined perl6
02:11 devogon joined perl6
03:27 just joined perl6
03:27 just http://www.codigolibre.org/modules.php?name=Downloads&d_op=viewdownload&cid=1
03:27 just left perl6
03:28 lb Title: Fundación Código Libre Dominicano - Descargas, http://tinyurl.com/2lfdpx
04:05 svnbot6 r15912 | diakopter++ | reverting the previous 1-char change.
04:12 pasteling "evalbot_r15911" at 194.145.200.126 pasted "Pugs build failure" (336 lines, 19.1K) at http://sial.org/pbot/24231
04:18 diakopter well, http://perlcabal.org/syn/S26.html is up there now...   afk.
04:18 lb Title: S26
05:16 kanru joined perl6
05:17 esstone joined perl6
05:21 jisom joined perl6
05:43 gaal yes, .methods gives what you expect on MO objects/classes
05:43 gaal ?eval vv("moose").methods
05:43 evalbot_r15911 is now known as evalbot_r15912
05:43 evalbot_r15912 Error: No such subroutine: &methods
05:43 gaal ?eval vv("moose").WHAT.methods
05:44 evalbot_r15912 (no output)
05:44 gaal huh.
05:44 TimToady ?eval vv("moose").HOW.methods
05:45 evalbot_r15912 ["","reverse","chop","index","quotemeta","join","chars","bytes","LIST","ITEM","_split_str","bless"]
05:45 gaal oh indeed
05:45 gaal thanks. I wonder why that "" is there...
05:46 gaal also .methods should perhaps filter out internals funcitons such as _split_str
05:46 gaal *functions
05:47 TimToady I rather liked funcitons...
05:47 gaal a competitor to iTunes?
05:48 gaal funkyTones
05:48 gaal or particles of lambda binding
05:48 TimToady I was thinkin' more the latter
05:49 gaal why not, fp already has its moose in metaphysics (monads)...
05:50 gaal though really the Leibnitz association is not helpful to understand those
05:55 SubStack joined perl6
06:14 BooK_ joined perl6
06:21 mj41__ joined perl6
06:35 devogon joined perl6
06:48 Aankhen`` Perl 6 formats are tasty. =)
06:59 jisom joined perl6
07:16 jisom_ joined perl6
07:47 xinming_ joined perl6
07:49 iblechbot joined perl6
08:17 dolmans joined perl6
08:18 franck__ joined perl6
08:34 SubStack joined perl6
08:35 integral joined perl6
08:46 svnbot6 r15913 | Darren_Duncan++ | ext/QDRDBMS/ : updates to Language.pod, AST.pm, PhysType.pm
08:50 mtve joined perl6
08:53 dunstabulos joined perl6
08:58 SubStack joined perl6
09:09 dduncan left perl6
09:16 bernhard joined perl6
09:16 larsen_ joined perl6
09:23 the_dormant joined perl6
09:30 penk joined perl6
09:46 mr_ank joined perl6
09:55 masak @tell fglock kudos on https://feather.perl6.nl/~fglock/kp6-environment.jpg -- I semi-understand it, but would perhaps need some verbal guidance too. do I parse the colours as indicating compiler versus runtime? or is it compiler versus parser? what's the difference between the two levels of small boxes? exactly what does the faded box signify? ditto lines crossing between large yellow and blue boxes.
09:55 masak lambdabot: @tell fglock kudos on https://feather.perl6.nl/~fglock/kp6-environment.jpg -- I semi-understand it, but would perhaps need some verbal guidance too. do I parse the colours as indicating compiler versus runtime? or is it compiler versus parser? what's the difference between the two levels of small boxes? exactly what does the faded box signify? ditto lines crossing between large yellow and blue boxes.
09:56 masak hello? lambdabot?
10:06 moritz perlbot: seen lambdabot
10:32 lumi Bots on strike?
10:32 pbuetow joined perl6
10:33 moritz we should strike hard against them ;-)
10:33 moritz perlbot: karma lumi
10:33 perlbot Karma for lumi: 12
10:33 moritz not fully on strike it seems ;-)
10:33 Southen joined perl6
11:03 toshinori joined perl6
11:06 the_dormant joined perl6
11:12 gaal there was an "lb" here previously...
11:12 gaal > 42 + 0
11:14 chris2 joined perl6
11:14 dmq hi
11:14 lumi Seems to have left two hours ago
11:18 penk joined perl6
11:32 dunstabulos joined perl6
11:34 dmq timtoady: if i do \v and \V and \h and \H in p5 would you agree i dont need to make them locale sensitive?
11:53 svnbot6 r15914 | kudra++ | Placeholders
11:54 Geeb joined perl6
11:54 Geeb left perl6
12:01 kanru joined perl6
12:01 svnbot6 r15915 | kudra++ | Placeholders
12:01 svnbot6 r15916 | kudra++ | Threads added
12:01 pasteling "evalbot_r15914" at 194.145.200.126 pasted "Pugs build failure" (10 lines, 418B) at http://sial.org/pbot/24235
12:07 agentzh joined perl6
12:07 agentzh diakopter: smartlinks.pl is run every hour by the cron program on feather :)
12:09 agentzh diakopter: feather has been reporting this error these days to me: "Can't locate Perl6/Perldoc/Parser.pm in @INC".
12:09 agentzh seems like we need to install Perl6::Perldoc on feather. np, i will do.
12:09 agentzh Juerd++ has given me the root access ;)
12:18 agentzh is there any plan to convert all the synopses to Perl6 POD format (like S26.pod)?
12:19 gaal agentzh: are you sure that's what the error means? who's issuing it? Perl6::Perldoc's a pretty new module
12:19 agentzh gaal: feather
12:19 gaal agentzh: the computer speaks to you? :)
12:19 agentzh gaal: yes.
12:19 agentzh via emails ;)
12:20 gaal it must be some script, or part of the make process; but what made you conclude you need the module installed?
12:20 agentzh i get one mail from feather's cron every 1 hour.
12:20 gaal maybe the make just needs to be fixed.
12:20 agentzh gaal: make?
12:21 gaal whatever it is that's looking for that module
12:21 bernhard joined perl6
12:21 agentzh that error is generated by /usr/bin/perl while trying to run smartlinks.pl :)
12:21 agentzh *was
12:22 gaal and smartlinks is depending on the new Perl6::Perldoc? then it should probably take it from blib/lib, not the system
12:22 gaal since it appears we're hosting Perl6::Perldoc now.
12:22 agentzh it makes sense :)
12:23 agentzh are we?
12:23 * agentzh goes to look into the pugs tree.
12:24 moritz diakopter++ added Perl6::Perldoc to ext/
12:24 agentzh gaal: ah, i didn't know.
12:24 agentzh moritz: thanks for the info
12:24 the_dormant joined perl6
12:24 gaal how did smartlinks come to depend on it?
12:25 agentzh i don't know.
12:25 agentzh i was not looking.
12:25 agentzh maybe diakopter has patched smartlinks.pl?
12:25 agentzh looking now
12:26 agentzh i think right now it shouldn't depend on it.
12:26 moritz I think the plan was to convert S26 from the pod6 sources to html
12:26 gaal ah: it's a soft dependency; there's a warning if it's not installed.
12:27 agentzh moritz: Hmm, that should have been done via a cron entry, not smartlinks.pl, i'm afraid.
12:28 * agentzh is going to remove docs/feather/syn/
12:28 gaal okay, looks like that's cleared up. back to work &
12:28 moritz agentzh: it wasn't me ;-)
12:29 agentzh moritz: np :) it's apparently my fault because i was not here when diakopter was asking.
12:29 * moritz thinks "fault" is a faulty concept ;-)
12:30 agentzh fixing
12:32 agentzh (if @larry decides to convert all the synopses to Perl 6 POD, smartlinks.pl will need almost a thorough rewrite.)
12:36 agentzh does pugs have somethings as nice as http://svn.jifty.org/index.cgi/jifty/browse/jifty ?
12:36 agentzh *something
12:37 agentzh if yes, tracking rev diff will be easier for me.
12:37 gaal sure
12:37 gaal http://dev.pugscode.org/browser
12:37 agentzh gaal: thanks!
12:37 gaal np
12:46 agentzh Trac++ # very handy
12:48 agentzh i think i should document how feather updates http://perlcabal.org/syn/*.html in pugs's docs/feather/README
12:48 agentzh the syn directory is a symbolic link per se.
13:04 agentzh interesting, the YAPC::Beijing committee says audreyt is their "default guest" :)
13:04 agentzh she is the only one that i'm aware of. :)
13:10 gaal agentzh: if you ever do get the tuits, a version of the synopses that has test results autogenerated in them would be very useful
13:13 svnbot6 r15917 | kudra++ | All threads which were not corrupted in the mbox have now been covered
13:15 agentzh gaal: what do you mean by "autogenerated" ?
13:15 agentzh let smartlinks.pl itself run the smoke?
13:16 agentzh or like those on the smoke server?
13:17 agentzh you mean grabbing a particular version of the smoked synopses from the smoke server onto feather?
13:17 nathanael joined perl6
13:18 agentzh or let the HTML outputs have the errors (if any) generated while running smartlinks.pl itself?
13:18 agentzh (the last one is a bit tricky ;))
13:19 gaal agentzh: I mean either adding 'make smoke' to the current auto pugs build used for evalbot, or if we don't want to slow down evalbot turnaround, add a new autopugs instance, which does 'make smoke'.
13:20 agentzh ah
13:20 gaal then have the process that runs smartlinks on feather use the output of that
13:20 agentzh what if the "make smoke" hangs?
13:20 gaal we've had the technology for test cross-reffing for ages now, it's a pity we don't actually use it
13:21 agentzh gaal: i see. you mean use the smoke results on feather.
13:21 svnbot6 r15918 | kudra++ | Started reconstructing from Google
13:21 gaal on feather, specifically, we can just kill pugs instances that get too old
13:21 gaal (probably not a bad idea anyway)
13:21 agentzh *nod*
13:22 gaal in general fixing the smoke target to timeout.. well, that's an open task that's proved harder than it looked
13:22 gaal because the execution of tests is ultimately handled by Test::Harness::Straps and we don't want to fork that
13:22 agentzh that's the #1 obstacle.
13:23 agentzh we surely don't want someone to watch that closely everyday.
13:23 gaal well, like I said, on feather specifically we can have a hacky watchdog that runs ps |grep |kill or something...
13:23 agentzh gaal: gotcha
13:24 agentzh how long does "make smoke" usually take on feather?
13:24 agentzh (normally)
13:25 * agentzh guesses the answer is "it depends!"
13:25 gaal I don't know: but the watchdog should limit pugs, not smoke.
13:25 agentzh gaal: *nod*
13:26 gaal if the build takes place under a dedicated user, then ps can easily be filtered
13:26 * agentzh has never run "make smoke" himself because...
13:26 agentzh gaal: that's right!
13:27 agentzh i'll have a cut on this task tonight if i have enough time :)
13:27 agentzh ssh is not terribly fast here :(
13:28 agentzh gaal: thanks for the idea and solution.
13:28 agentzh it looks practical to me.
13:28 gaal "ps -o time,pid,args" will give cputime
13:29 agentzh thanks for the tip.
13:29 agentzh fortunately i'm currently on linux. :)
13:29 gaal agentzh++
13:29 agentzh gaal++
13:34 agentzh i'll use my pugs tree instead of audreyt's so as to prevent potential conflicts with evalbot6.
13:45 agentzh can anyone help me with this warning on feather while running 'svk pull' ?   "(in cleanup) Svndiff data ends unexpectedly: Unexpected end of svndiff input"
13:47 agentzh svk hangs after showing up this error. :(
13:49 pasteling "agentzh" at 221.131.67.67 pasted "error output from 'svk pull' on feather" (6 lines, 219B) at http://sial.org/pbot/24239
13:51 gaal does it happen every time?
13:52 gaal hmmm, svk 2.0.0 on feather
13:52 clkao agentzh: what version?
13:53 clkao oh.. should use 2.0.1 ...
13:53 agentzh clkao: This is svk, version v2.0.0 (using Subversion bindings 1.004002)
13:53 agentzh should i do a cpan install on feather?
13:54 moritz agentzh: why?
13:54 moritz agentzh: you should install dh-make-perl
13:54 agentzh gaal: it happens everytime.
13:54 agentzh moritz: dh-make-perl?
13:54 moritz agentzh: and then fakeroot dh-make-perl --build --cpan My::Module
13:55 moritz agentzh: builds debian packages from cpan modules
13:55 moritz automagically
13:55 dunstabulos joined perl6
13:55 agentzh oh
13:55 agentzh i'll try the commands you've given. :)
13:56 moritz that will create a libmy-module-perl_$verision-all.deb that you can install with dpkg -i
13:56 * moritz loves debian ;-)
13:56 agentzh it seems cool.
13:56 * agentzh loves debian too.
13:57 mr_ank joined perl6
13:58 agentzh clkao: thanks
13:58 * agentzh is so glad to get "vendor support"
13:58 clkao ;)
14:01 diakopter !afk.  agentzh: sorry for destroying smartlinks.pl...
14:02 diakopter (I had assumed that smartlinks.pl was run by audreyt and would use blib under audreyt/
14:02 agentzh diakopter: np :)
14:04 agentzh diakopter: you created ~audreyt/pugs/docs/feather/syn manually?
14:04 diakopter nope; I dropped S26.html in /home/agentzh/syn/
14:04 agentzh ah
14:04 diakopter to temporarily pretend that smartlinks.pl was working
14:05 agentzh i see why i'm getting "Can't open /home/agentzh/syn/S26.html for writing: Permission denied" :)
14:06 diakopter try now
14:06 agentzh it's working now :)
14:07 agentzh diakopter: please run ~agentzh/update the next time you want to debug things.
14:07 diakopter oky doky
14:07 * agentzh goes to change the permission of the update script
14:08 agentzh ~agentzh/update is now 777 :)
14:09 agentzh diakopter++ # HTML-fying S26 when i was away
14:10 agentzh diakopter: i was thinking about doing this on my way home hours ago. glad to see you've already had a cut on it :)
14:10 moritz did somebody add an xhtml header for the perldoc2xhtml output?
14:11 diakopter moritz: no for now it's just copy/pasted in, based on what Pod::* does for the others
14:12 diakopter there needs to be a Perl6::Spec module that uses Perl6::Perldoc and the other Pod::* modules, and does what smartlinks.pl does... imho.
14:14 marmic joined perl6
14:16 ingy hola
14:16 agentzh hi, ingy
14:17 agentzh ingy: FYI, the last time i checked, Test::Base was failing tests on some platforms.
14:17 agentzh ingy: fortunately i could bundle Test::Base to my CPAN modules via Module::Install.
14:22 TimToady dmq: I don't see any reason to make \h\v locale dependent.  whitespace is pretty well characterized in Unicode.  (and /me dislikes the locale mechanism anyway...)
14:23 TimToady @foo
14:24 TimToady still no \bot, seemingly
14:24 * agentzh noticed that feather is now much much slower than his core2duo box.
14:25 agentzh sigh. feather is still running the SVK test suite...
14:28 DarkWolf84 joined perl6
14:33 ingy agentzh: thanks
14:33 agentzh ingy: my pleasure
14:33 the_dormant_ joined perl6
14:38 agentzh moritz: i'm having dependency problems with get-apt on feather :(
14:38 svnbot6 r15919 | diakopter++ | fixing my terminology errors.
14:40 moritz agentzh: is feather running etch? or still sarge?
14:40 agentzh moritz: how to check that?
14:41 * agentzh is still a ubuntu newbie.
14:41 diakopter agentzh: it's sid
14:41 moritz ok :)
14:41 agentzh moritz: http://perlcabal.org/agent/error.log
14:42 agentzh diakopter: sid?
14:42 moritz agentzh: unstable
14:42 moritz in that case just install the packages via cpan ;-)
14:42 tibbetts joined perl6
14:43 moritz there's a reason for "unstable" beeing called "unstable"
14:43 agentzh moritz: k
14:43 moritz though "conflicting" would be more apropriate ;-)
14:43 agentzh *nod*
14:45 * agentzh wonders why feather is now so slow. (because the Trac is suboptimal?)
14:48 diakopter agentzh: /home/audreyt/pugs/perl5/PIL2JS/../../pugs -Ilib6 -Iblib6/lib -I../../blib6/lib -CPIL1-Perl5 -I /home/audreyt/pugs/perl5/PIL2JS/lib6 -e use Prelude::JS; -e ''   is using lots of cpu at the moment
14:52 diakopter agentzh: oh, feather is doing a backup of itself.
14:53 agentzh diakopter: thanks for the info
14:54 * agentzh is still running SVK's tests. :(
14:57 alecc joined perl6
14:58 svnbot6 r15920 | agentz++ | added docs/feather/README to clarify some hidden details regarding http://perlcabal.org/syn
15:03 pasteling "evalbot_r15919" at 194.145.200.126 pasted "Pugs build failure" (330 lines, 18.8K) at http://sial.org/pbot/24241
15:03 moritz ?eval 1
15:03 evalbot_r15912 is now known as evalbot_r15920
15:03 evalbot_r15920 1
15:09 Limbic_Region joined perl6
15:15 lb joined perl6
15:16 Limbic_Region .seen audreyt
15:16 Limbic_Region ?seen audreyt
15:16 lb audreyt is in #perl6 and #haskell. I don't know when audreyt last spoke.
15:16 agentzh @seen audreyt
15:16 lb audreyt is in #perl6 and #haskell. I don't know when audreyt last spoke.
15:17 agentzh Limbic_Region: i talked to audreyt the day before yesterday on IRC.
15:17 Limbic_Region I talked to her not too long ago myself, things seemed to have stabalized for her again, and she was working on slides
15:18 agentzh Limbic_Region: that's great
15:18 Limbic_Region well, yeah
15:18 agentzh she said she might go to YAPC::Beijing
15:19 offby1 wow, Perl in Beijing.  Hard to imagine.
15:19 agentzh offby1: why?
15:19 Limbic_Region in any case, I was just checking up on her
15:19 * Limbic_Region wanders off again
15:19 offby1 agentzh: because I have a weak imagination.
15:19 agentzh hehe
15:21 agentzh oh no, the latest SVK on feather is still having problems :(
15:22 agentzh this time the error messages are different.
15:22 * agentzh tries to paste them somewhere.
15:24 agentzh http://perlcabal.org/agent/error.log
15:24 agentzh 'svk pull' quits immediately after printing out these errors.
15:24 agentzh "This is svk, version v2.0.1 (using Subversion bindings 1.4.2)"
15:25 agentzh clkao?
15:26 rashakil_ joined perl6
15:26 offby1 agentzh: works for me :-|
15:26 offby1 This is svk, version v2.0.0 (using Subversion bindings 1.003001)
15:26 agentzh offby1: you are not on feather?
15:26 offby1 ah, no
15:26 offby1 on my machine at home.
15:27 agentzh yes, my machine at home also works fine.
15:27 agentzh weird.
15:29 agentzh maybe my ~/.svk has screwed somehow.
15:29 audreyt agentzh: sorry, not going to YAPC::Beijing :/
15:29 agentzh audreyt: ah :(
15:30 agentzh audreyt: maybe the next time? hehe :)
15:30 audreyt agentzh: yeah :) see /msg
15:32 clkao agentzh: uhm, i guess your local mirror is polluted by old svk a bit
15:37 agentzh clkao: okay, i'll throw my pugs tree aways and copy over audreyt's
15:37 agentzh *away
15:44 diakopter agentzh: the backup finished - also, you've got an orphaned cpan/MakeMaker process churning away somewhere I think
15:45 agentzh diakopter: thanks. i've seen that job.
15:48 asdlfasdfj joined perl6
15:48 svnbot6 r15921 | agentz++ | fixed failing tests in util/t/01-smartlinks.t
15:49 asdlfasdfj is now known as tuna
15:57 lichtkind joined perl6
16:07 iblechbot joined perl6
16:13 offby1 clkao: do you know how to get svk 2 working on Windows?  I've not found anything that works
16:18 esstone joined perl6
16:20 perlmonkey2 joined perl6
16:26 the_dormant joined perl6
16:28 toshinor_ joined perl6
16:33 dunstabulos joined perl6
16:38 alecc left perl6
16:39 elmex joined perl6
16:42 agentzh wow, audreyt's ~/.svk takes years to copy :(
16:43 diakopter agentzh: is this what you did?  http://planet.pugscode.org/svk.html
16:43 lb Title: SVK on Feather
16:45 amnesiac joined perl6
16:47 agentzh diakopter: no. ;)
16:47 agentzh i'm copying .svk directly.
16:50 gaal welcome back lambdabot!
16:51 moritz moose
16:51 agentzh diakopter: thanks. i was apparently doing something stupid
16:53 agentzh oh no...audreyt's .svk has been polluted also.
16:53 agentzh anyone is having the same svk issue on feather?
16:54 * agentzh has wasted a whole night on this trouble. :(
16:55 agentzh gaal: sorry, can't even take the first step on feather. have to do the auto-smoke stuff another day :/
16:57 agentzh G'night everyone &
16:57 agentzh left perl6
17:00 bonesss joined perl6
17:26 Psyche^ joined perl6
17:39 Psyche^ is now known as Patterner
17:57 esstone joined perl6
18:06 chris2 joined perl6
18:17 Loro_ joined perl6
18:22 larsen_ joined perl6
18:28 justatheory joined perl6
18:32 franck__ joined perl6
18:41 xinming_ is now known as xinming
18:45 devogon joined perl6
19:06 buetow joined perl6
19:12 kcwu joined perl6
19:13 kcwu joined perl6
19:30 jisom joined perl6
19:30 larsen__ joined perl6
19:47 buetow joined perl6
19:51 larsen_ joined perl6
19:51 Toby3 joined perl6
19:54 jisom joined perl6
19:55 tibbetts joined perl6
20:01 larsen___ joined perl6
20:03 mako132 joined perl6
20:05 mr_ank joined perl6
20:06 larsen__ joined perl6
20:12 larsen_ joined perl6
20:12 tuna joined perl6
20:16 pbuetow joined perl6
20:17 Aankhen`` joined perl6
20:22 toshinori joined perl6
20:23 larsen___ joined perl6
20:30 Aankhen`` is now known as Aankhen
20:30 larsen__ joined perl6
20:31 Aankhen is now known as Aankhen``
20:31 jisom_ joined perl6
20:38 larsen_ joined perl6
20:45 dduncan joined perl6
20:46 larsen___ joined perl6
20:54 larsen__ joined perl6
21:00 larsen_ joined perl6
21:06 larsen__1 joined perl6
21:12 larsen___ joined perl6
21:23 jisom joined perl6
21:44 devogon joined perl6
21:49 nelhage joined perl6
21:50 mj41 joined perl6
21:50 riffraff joined perl6
21:50 riffraff hi
21:51 riffraff ?eval <a b c> X <c d e>
21:51 evalbot_r15920 is now known as evalbot_r15921
21:51 evalbot_r15921 (("a", "c"), ("a", "d"), ("a", "e"), ("b", "c"), ("b", "d"), ("b", "e"), ("c", "c"), ("c", "d"), ("c", "e"))
21:52 riffraff oh cool, didnìt work on my box, I need to update :)
21:52 demq joined perl6
21:52 moritz or downgrade ;-)
21:53 bonesss joined perl6
21:53 Jedai joined perl6
21:54 riffraff eheh
22:13 fridim is now known as fridim_bot
22:14 riffraff mh.. are placeholder vars supposed to work with for statement modifer?
22:14 riffraff ?eval say($^a+$^b) for 1..2 X 1..2
22:14 fridim_bot is now known as fridim
22:14 evalbot_r15921 OUTPUT[4␤4␤] undef
22:15 moritz riffraff: that's because (1, 2) in numeric context gives 2
22:15 moritz = number of elements
22:15 riffraff mh.. should have been @(foo X bar) ?
22:16 moritz I don't think so
22:16 moritz ?eval say $_[0]+$_[1] for 1..x X 1..2
22:16 evalbot_r15921 Error: No such subroutine: &x
22:16 moritz ?eval say $_[0]+$_[1] for 1..2 X 1..2
22:16 evalbot_r15921 OUTPUT[2␤3␤3␤4␤] undef
22:17 Jedai ?eval say($^a + $^b) for (1..3) X (1..3)
22:17 evalbot_r15921 OUTPUT[4␤4␤4␤4␤2␤] undef
22:17 Jedai ?eval (1..3) X (1..3)
22:17 evalbot_r15921 ((1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3))
22:17 moritz is there a flatten() method or something
22:18 riffraff ok, I understand moritz' output with $_ works as expected, still don't understand what happens with $^a + $^b
22:18 Jedai Normally @() should work (I think) but in pugs it don't
22:18 moritz riffraff: they will both contain a list
22:18 riffraff yes, but which list?
22:18 moritz you are iterating over a list of lists
22:19 riffraff ah, twice at the time
22:19 Jedai ?eval say($^a[0] + $^a[2]) for (1..3) X (1..3)
22:19 evalbot_r15921 OUTPUT[1␤1␤1␤2␤2␤2␤3␤3␤3␤] undef
22:19 Jedai ?eval say($^a[0] + $^a[1]) for (1..3) X (1..3)
22:19 evalbot_r15921 OUTPUT[2␤3␤4␤3␤4␤5␤4␤5␤6␤] undef
22:19 moritz ?eval say $^a.join(":"), " ", $^b.join("|") for 1..2 X 1..2
22:19 evalbot_r15921 OUTPUT[1:1 1|2␤2:1 2|2␤] undef
22:19 riffraff I thought they would unpack $_ and instead I'm getting two subsequent elements
22:19 moritz riffraff: right
22:20 riffraff yes, now I remember I've hit this before.. not sure I like it but I have to learn it :)
22:20 moritz riffraff: at least it's consequent
22:21 moritz ?eval for 1..2 X 1..2 -> my [$a, $b] -> { say $a+$b }
22:21 evalbot_r15921 Error: ␤Unexpected "my"␤expecting subroutine parameters, trait or block
22:21 moritz ?eval for 1..2 X 1..2 -> [$a, $b] -> { say $a+$b }
22:21 evalbot_r15921 Error: ␤Unexpected "[$"␤expecting subroutine parameters, trait or block
22:21 Jedai In Perl6 you should be able to do something like : for (1,2) X (1,2) -> [$a, $b], shouldn't you ?
22:21 moritz ?eval for 1..2 X 1..2 -> ($a, $b) -> { say $a+$b } # that will not work
22:21 evalbot_r15921 Error: ␤Unexpected "->"␤expecting trait or block
22:22 moritz ?eval for 1..2 X 1..2 -> ($a, $b)  { say $a+$b } # that will not work
22:22 evalbot_r15921 OUTPUT[4␤4␤] undef
22:22 moritz Jedai: no, because [...] is not an lvalue
22:22 moritz ?eval for 1..2 X 1..2 -> [$a, $b]  { say $a+$b } # that will not work
22:22 evalbot_r15921 Error: ␤Unexpected "[$"␤expecting subroutine parameters, trait or block
22:23 Jedai So you can't do that...
22:23 riffraff I remember trying this things when solving one of the 99problems.. I ended up just using explicit references to $_[0] too
22:23 riffraff but it's very nice to know that it was not just my ignorance :)
22:24 moritz riffraff: maybe you can explicitly faltten the array before, but I wouldn't know how
22:24 Jedai riffraff: Yeah I had one (the 90th one) like that to
22:24 Jedai moritz: There's a response in the 7th 99problem I think
22:24 moritz so are there still nice ones left?
22:25 riffraff a flatten builtin would be quite useful, maybe an operator :)
22:25 Jedai @() normally does that
22:25 lb Maybe you meant: . bf ft id pl rc v wn
22:25 riffraff moritz, I think there is a lot of space for alternative solutions
22:25 moritz that flatten uses $x.isa(Array)...
22:25 Jedai my $flatten = -> $x { $x.isa(Array) ?? ( map $flatten, $x ) !! $x };
22:26 moritz wouldn't "$x ~~ List" be more Perl6ish?
22:26 riffraff Seq maybe?
22:26 avar yep
22:26 Jedai Yeah, that's because @@() and @() aren't really available in Pugs
22:27 moritz http://nopaste.snit.ch:8001/9977
22:27 Jedai Am I correct in believing @() will flatten anything ?
22:27 moritz I get weird errors executing the problems
22:28 Jedai ?eval my $flatten = -> $x { $x.isa(Array) ?? ( map $flatten, $x ) !! $x }; for $flatten(1..2 X 1..2) -> ($a, $b)  { say $a+$b }
22:28 evalbot_r15921 Error: ␤Unexpected "X"␤expecting operator, ":" or ")"
22:29 Jedai ?eval my $flatten = -> $x { $x.isa(Array) ?? ( map $flatten, $x ) !! $x }; for $flatten.((1..2) X (1..2)) -> ($a, $b)  { say $a+$b }
22:29 evalbot_r15921 Error: ␤Unexpected "X"␤expecting operator, ":" or ")"
22:29 eden_c joined perl6
22:29 riffraff joined perl6
22:30 moritz somehow my pugs tries to parse strict.pm from my perl 5.8
22:30 moritz which means that the debian builds are broken :(
22:30 moritz not again
22:31 Jedai ?eval my $flatten = -> $x { $x.isa(Array) ?? ( map $flatten, $x ) !! $x }; for $flatten.([1..2 X 1..2]) -> ($a, $b)  { say $a+$b }
22:31 evalbot_r15921 OUTPUT[2␤3␤3␤4␤] undef
22:33 moritz ?eval my $flatten = -> $x { $x ~~ List ?? ( map $flatten, $x ) !! $x }; for $flatten.([1..2 X 1..2]) -> ($a, $b)  { say $a+$b }
22:33 Jedai So this flatten still works... (Which is rather good for me since one of my test use it)
22:33 moritz ?eval my $flatten = -> $x { $x ~~ List ?? ( map $flatten, $x ) !! $x }; for $flatten.([1..2 X 1..2]) -> ($a, $b)  { say $a+$b }
22:33 evalbot_r15921 OUTPUT[2␤3␤3␤4␤] undef
22:33 Jedai That's more Perlish :D
22:36 svnbot6 r15922 | moritz++ | problem07.t: substitutede .isa(Array) with ~~ List
22:36 moritz does it still work? I can't test it right now :(
22:36 Jedai Anyway we shouldn't have to use such a subroutine, it should be a builtin, and my guess was that @() would be it
22:37 Jedai Can anybody confirm ?
22:38 moritz that would make it a rather pointless problem ;-)
22:39 Jedai moritz: I think that's the idea :) Most of the first problems are pointless in Perl6
22:41 moritz hey, we could write a core module called Problems, and then 'use Problems 4.. 23'; p20(...); ;-)
22:50 avar use Problems 99;
23:11 TimToady @() only flattens List of Capture, so you'd still need a deep flattener sub
23:17 lb Maybe you meant: . bf ft id pl rc v wn
23:26 dunstabulos joined perl6
23:32 demq timtoady: thanks for clarifing that.
23:32 demq is now known as dmq
23:33 charsbar joined perl6
23:35 Jedai Yeah, thanks :) Well, maybe we'll get a flatten builtin ? In the List role ?
23:36 * dmq meant something timtoady said earlier
23:51 bsb joined perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo