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