Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-08-16

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:00 dalek Heuristic branch merge: pushed 18 commits to panda/pod-installing by tadzik
00:00 dalek panda: 551cdc5 | tadzik++ | / (4 files):
00:00 dalek panda: First attempt at installing pod aside .pms and .pirs. Tests work, modules not really
00:00 dalek panda: review: https://github.com/tadzik/panda/commit/551cdc5393
00:00 dalek panda: 395943c | tadzik++ | ext/File/Find.pm:
00:00 dalek panda: Merge branch 'master' into pod-installing
00:00 tadzik eh, I'm a dalek-murderer today
00:01 dalek joined #perl6
00:01 diakopter dalek: wb
00:05 japhb_ dalek needs to be taught not to suicide, either by spacing out the commit reports, or by cutting them short even when they don't meet the threshold of "Heuristic branch merge"
00:05 dalek doc: e64715c | tadzik++ | META.info:
00:05 dalek doc: Add META.info
00:05 dalek doc: review: https://github.com/perl6/doc/commit/e64715c956
00:05 diakopter japhb_: it has a bit of flood prevention built in; it was based on the botnix framework
00:06 japhb_ nodnod
00:06 japhb_ Though it seems to need some tuning (or is there special dispensation we can get from Freenode for it?)
00:06 diakopter since my first iteration though, sorear has redone it completely at least once
00:06 dalek ecosystem: 27e7687 | tadzik++ | META.list:
00:06 dalek ecosystem: Add p6doc
00:06 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/27e768716c
00:07 tadzik yeah, I'm quite satisfied with panda now :)
00:07 tadzik maybe not quite code-wise, but at least feature-wise
00:08 japhb_ Good!
00:08 japhb_ What do I need to do to test your latest changes (the doc stuff)?  Or are you ready for that?
00:08 tadzik it's all in master
00:08 tadzik I went full hardcore :)
00:09 japhb_ heh
00:09 tadzik panda install p6doc should work now
00:09 tadzik and then 'p6doc Str' or so
00:09 japhb_ So need to pull and build rakudo, then run reboostrap.pl from panda, and then panda install p6doc?
00:09 tadzik yep
00:09 japhb_ OK, that first part is going to take a while.  ;-)
00:10 tadzik japhb_++ # testing my mad creations :)
00:10 tadzik oh, you need to install p6doc with --notests
00:10 tadzik it fails some
00:10 japhb_ tadzik++ # mad creations :-)
00:10 japhb_ OK, got it
00:11 japhb_ BTW, does one need to (in general) pull panda before running rebootstrap.pl, or does it download a fresh copy of panda to install in ~/.perl6?
00:12 japhb_ (I know the modules it needs are bootstrapped locally, I'm wondering about panda itself)
00:12 japhb_ Although I guess it would be silly to pull a new copy of just panda, it might need new copies of the dependent modules
00:12 japhb_ nm
00:13 tadzik japhb_: rebootstrap.pl uses bootstrap.pl, which uses the local files
00:14 japhb_ yeah, brain fizzle on my part
00:15 tadzik phenny: tell moritz one of the tests in p6doc/t/typegraph.t fails
00:15 phenny tadzik: I'll pass that on when moritz is around.
00:16 TimToady well, boarding time, see you on the flip side
00:16 tadzik fly safely TimToady
00:16 japhb_ TimToady, safe flight!
00:16 TimToady at least it'll be summer if we land in the arctic :)
00:16 TimToady afk &
00:18 tadzik japhb_: any further ideas for panda?
00:18 tadzik Aside from windows support existing at all :)
00:19 japhb_ tadzik, does this version work under both Rakudo and Niecza?
00:20 tadzik I don't think so :(
00:20 japhb_ That would be a biggie
00:20 tadzik colomon's been working on panda-niecza some time ago
00:20 tadzik yeah, that'd be cool
00:20 japhb_ Not needing an external program to fetch the projects list would be a nice item
00:20 colomon niecza doesn't have exceptions
00:21 tadzik oh
00:21 diakopter wat. http://news.stanford.edu/news​/2010/august/sun-082310.html you mean radioactive dating could be *way* off if solar activity was pretty different in the past 100k years?
00:21 diakopter darn, moritz's not around to give physics opinion
00:22 tadzik hm
00:22 diakopter linked from /. sorry
00:22 tadzik but maybe I could make panda run on rakudo, but compile modules using niecza ;>
00:22 japhb_ Being able to see just the installed modules (`panda list` variant showing just installed stuff) without needing to manually look at ~/.panda/state, especially if you can see whether they were installed normally or --notests or such.
00:24 tadzik omh
00:24 tadzik * omw
00:24 japhb_ ?
00:24 diakopter on my way?
00:24 tadzik japhb_: I have a locally lying getfile.pir, which could work instead of wget
00:24 tadzik yes, on my way
00:26 dalek panda: b37c702 | tadzik++ | bin/panda:
00:26 dalek panda: Add panda list --installed, listing only installed modules
00:26 dalek panda: review: https://github.com/tadzik/panda/commit/b37c7028ee
00:26 colomon tadzik: oh!  that might well work.  can't see any obvious reason it wouldn't...
00:27 bruges joined #perl6
00:27 tadzik it may be a matter of switching `env perl6` to point at niecza
00:27 tadzik and then explicitely running panda with rakudo
00:31 japhb_ Oh, clearly I'm slow to realize my own thought processes today -- In the face of rebootstrap, ~/.panda/state needs to know about --notests invocation, otherwise it will fail to reboostrap.  :-)
00:36 tadzik oh, indeed :)
00:36 japhb_ tadzik, all working well so far (including panda list --installed, tadzik++ for rapid turnaround!)
00:36 tadzik :)
00:36 japhb_ I'll see if I can fix that doc test fail
00:37 tadzik I'm now fighting Q:PIR and LWP/UserAgent from Parrot
00:37 japhb_ :P
00:37 tadzik it used to work. Like, few months ago, and as a standalone pir...
00:37 whiteknight joined #perl6
00:38 tadzik in file '(file unknown)' line 31400315
00:38 tadzik this is totally awesome :)
00:39 * japhb_ chuckles -- the test is just wrong
00:39 tadzik I looked at it, but I wasn't sure what's happening there :)
00:40 dalek doc: db7f995 | (Geoffrey Broadwell)++ | t/typegraph.t:
00:40 dalek doc: Fix out-of-date test
00:40 dalek doc: review: https://github.com/perl6/doc/commit/db7f995109
00:41 japhb_ I think he got unlucky and used a type with no explicit parent that actually did have a parent -- which had been missing from the source file early on.
00:42 tadzik is there any up-to-date module using Q:PIR?
00:42 japhb_ W00t!  # p6doc installed without --notest, and working
00:42 tadzik ...and parrot objects...
00:42 tadzik \o/ japhb_++
00:48 japhb_ Hmmm, I think we have enough real-world Pod documentation to start tweaking Pod::To::* to render more readable stuff
00:48 japhb_ .oO( Pod::To::ANSI )
00:49 tadzik I was considering teaching it to use Term::ANSIColor if available
00:51 japhb_ tadzik, another useful bit for 'panda list' might be showing the source url that something will fetch from (or *was* fetched from, plus perhaps its 'git describe', if installed)
00:51 tadzik something like 'panda info' for everything?
00:52 japhb_ tadzik, that might end up being a false economy (because what you need to do to highlight things well when you have pure text versus ANSI codes may be too different), but I can certainly see Pod::To::ANSI inheriting from Pod::To::Text ...
00:53 tadzik well volunteered :)
00:53 japhb_ tadzik, yeah, but in tabular form so we get one line per module (otherwise it will scroll away)
00:53 tadzik hm
00:53 japhb_ BTW, what does this line in 'panda info Pod::To::HTML' mean?
00:53 tadzik why would you want so many info in panda list?
00:53 japhb_ "Pod::To::HTML" => "*"
00:54 tadzik oh, that's version
00:54 tadzik most modules have version set to *
00:54 tadzik as in "no versioning, disregard"
00:54 japhb_ Ah!
00:54 japhb_ gotcha
00:55 japhb_ I meant, a well-used ~/.panda/state might have a lot of modules in it.  In 'panda info' format, each one takes 6 lines vertically; displaying them all would scroll.
00:55 japhb_ So I'm asking for the one-line-per-module of 'panda list', but the detail of 'panda info'
00:55 japhb_ :-)
00:57 tadzik hmm
00:57 tadzik panda info --short or such?
00:57 japhb_ Or 'panda list --verbose'  ;-)
00:57 japhb_ but yes
00:57 japhb_ That's what I mean
00:58 tadzik so, long story short: you want detailed, but readable list of installed modules?
00:59 japhb_ Yes, but I do like being able to do both 'panda list' and 'panda list --installed'.  But I'd settle for something that does just the latter with more detail.
01:01 tadzik okay. Want to implement it? :)
01:01 japhb_ Well, sure, I suppose I could give it a try.  :-)
01:03 tadzik argh, I can't PIR
01:03 tadzik /o\
01:03 benabik tadzik: Need helps?
01:03 tadzik benabik: oh yes
01:03 tadzik benabik: https://gist.github.com/3365227
01:04 tadzik r: https://gist.github.com/3365227
01:04 p6eval rakudo efde6e: OUTPUT«use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤==​=SORRY!===␤error:imcc:syntax error, unexpected '=', expecting '…
01:04 tadzik it doesn't like the 'new'
01:04 tadzik ua = new ['LWP';'UserAgent']
01:05 scott_ joined #perl6
01:06 gongyiliao joined #perl6
01:06 benabik tadzik: You never declared ua as a variable.
01:07 tadzik huh
01:07 tadzik <facepalm>
01:07 benabik .local pmc ua
01:07 tadzik yeah, but that still fails, same errors
01:07 benabik Yeah.
01:08 tadzik ok, same for response
01:08 tadzik and outfile
01:08 benabik Yeah.
01:08 tadzik and now it's Null PMC access in set_integer_native(), so at least PIR parser :)
01:08 tadzik s/parser/parses/
01:09 benabik I think that has something to do with the interface between Q:PIR and 6model-land
01:09 benabik That I dunno.
01:09 tadzik yeah
01:10 tadzik yes, works! \o/
01:10 tadzik benabik++
01:10 tadzik thank you
01:10 benabik NP
01:10 jeffreykegler joined #perl6
01:11 benabik I think it's not allocating a scalar or something.  Might want to do something like my $ret = Q:PIR and then $ret or die
01:13 tadzik I fixed it with %r = perl6_box_int $I0
01:13 tadzik rakudo expects %r to be a perl6 object
01:13 benabik Ah, right.  Boxing is good.
01:14 tadzik aye
01:14 tadzik interestingly, it didn't like nqp::p6box_i Q:PIR
01:14 benabik Probably because it's doing something between the Q:PIR and the p6box
01:15 tadzik yep
01:16 dalek panda: 02eb2a8 | tadzik++ | lib/Panda/Ecosystem.pm:
01:16 dalek panda: Use Parrot LWP::UserAgent instead of system wget. benabik++ for pir help
01:16 dalek panda: review: https://github.com/tadzik/panda/commit/02eb2a879b
01:16 tadzik and now panda doesn't need wget :)
01:16 benabik tadzik++
01:16 tadzik it's one step further from niecza compatibility though
01:22 tadzik I think I'll try to sleep a bit now
01:22 tadzik good night #perl6
01:24 japhb_ o/
01:25 dayangkun joined #perl6
01:27 gongyiliao joined #perl6
01:37 UncleFester6 joined #perl6
01:39 ranguard joined #perl6
01:41 UncleFester6 left #perl6
01:52 ranguard joined #perl6
01:54 cognominal joined #perl6
02:00 jaldhar joined #perl6
02:10 leprevost joined #perl6
02:14 [Coke] someone proposed working on pod2latex for p6 to the TPF.
02:14 [Coke] (if you want to see that, go comment on the proposal on the tpf site)
02:20 ranguard joined #perl6
02:31 JimmyZ joined #perl6
02:31 JimmyZ [Coke]: link ?
02:40 benabik http://news.perlfoundation.org/2012/0​8/2012q3-grant-proposal-improve.html
02:40 benabik I think
02:41 benabik It's expanding WriteAt, a p5 module built on top of Perl6::Pod.  No less useful for that though.
02:43 orafu joined #perl6
02:48 * JimmyZ doesn't care about p5
03:17 Circlepuller_ joined #perl6
03:17 [particle]1 joined #perl6
03:18 daniel-s joined #perl6
03:18 scott_ joined #perl6
03:21 dayangkun joined #perl6
03:21 [Coke] http://feather.perl6.nl/~coke/roast/
03:23 [Coke] (a chart of passing tests against time by the big 3)
03:25 sporous joined #perl6
03:27 woosley left #perl6
03:34 daniel-s joined #perl6
03:34 Vlavv_ joined #perl6
03:34 DarthGandalf joined #perl6
03:34 sudokode joined #perl6
03:34 geekosaur joined #perl6
03:37 ranguard joined #perl6
03:43 daniel-s joined #perl6
04:04 sudokode joined #perl6
04:15 funeral joined #perl6
04:15 funeral left #perl6
04:16 blabity joined #perl6
04:18 blabity Hi, I'm new to the Perl community. I'm really interested in the Parrot VM more than anything, so would it make more sense to learn Perl 6 over Perl 5 to start with?
04:22 telex joined #perl6
04:33 violent joined #perl6
04:35 telex joined #perl6
05:18 birdwindupbird joined #perl6
05:20 xinming joined #perl6
05:30 prammer joined #perl6
05:38 japhb uh, what happened to http://feather.perl6.nl:3000/projects.json ?  It's about 1/5 the size it was when I grabbed it last (a few hours ago, maybe?)
05:51 masak good morning, #perl6.
05:52 shachaf Good 22:52, masak.
05:52 masak hey, it's UGT morning everywhere. :)
05:53 shachaf Oh, I guess sorear is in .de by now?
05:54 shachaf Or .lu or something.
05:57 tadzik good morning
05:57 tadzik japhb: it seems that github is throwing up 503's
06:07 masak teaching &
06:07 kaleem joined #perl6
06:24 wtw joined #perl6
06:26 SamuraiJack joined #perl6
06:28 fhelmberger joined #perl6
06:30 UncleFester6 joined #perl6
06:34 fhelmberger joined #perl6
06:40 cognominal joined #perl6
06:41 moritz \o
06:41 phenny moritz: 00:15Z <tadzik> tell moritz one of the tests in p6doc/t/typegraph.t fails
06:41 moritz [Coke]++ # http://feather.perl6.nl/~coke/roast/
06:44 diakopter shachaf: no way... it's a 15-20 hour trip depending
06:45 * shachaf wasn't sure when he left.
06:46 shachaf My sense of time is a bit distorted recently. I guess he said ~12 hours not that long ago.
06:47 diakopter seen sorear
06:47 aloha sorear was last seen in #perl6 9 hours 31 mins ago saying "n: say "00" eqv "0"".
06:48 shachaf Yep.
06:50 arnsholt I'd guess he's about halfway
07:12 brrt joined #perl6
07:38 ObseLeTe joined #perl6
07:41 cognominal_ joined #perl6
07:48 japhb tadzik, I've gotten partway to implementing a couple of the changes I'd thought of for panda.  Unfortunately, until I can fetch a valid projects.json, I can't test them properly.  :-/
07:55 hoelzro morning perl6
07:56 brrt hi hoelzro
08:01 aloha joined #perl6
08:06 fgomez joined #perl6
08:06 fgomez joined #perl6
08:12 fgomez joined #perl6
08:12 kresike joined #perl6
08:12 kresike good morning all you happy perl6 people
08:14 jnthn morning
08:18 Psyche^ joined #perl6
08:25 dakkar joined #perl6
08:31 fgomez joined #perl6
08:40 sergot joined #perl6
08:40 sergot hi o/
08:45 fgomez joined #perl6
08:46 daxim joined #perl6
08:53 bbkr joined #perl6
09:01 brrt joined #perl6
09:09 thelazydeveloper joined #perl6
09:33 fhelmberger joined #perl6
09:35 broquaint joined #perl6
09:39 daxim joined #perl6
09:40 odoacre joined #perl6
09:41 larks joined #perl6
09:49 fridim_ joined #perl6
09:50 hoelzro does running 'make test' in Rakudo automatically checkout roast and run against it as well?
09:50 hoelzro hmm..guess not.
09:53 jnthn make spectest
09:54 hoelzro jnthn: I just saw that, thanks =)
10:00 * tadzik at Poznań airport
10:00 tadzik japhb: yeah, looking into that
10:02 tadzik japhb: it seems that github got mad at feather for some reason
10:02 brrt left #perl6
10:04 tadzik but it's still smaller for some reason :/
10:06 jnthn tadzik: Happy flying
10:06 * jnthn leaves for the airport in ~1h
10:11 felher hoelzro: If you have a multicore system, doing something like "TEST_JOBS=x make spectest", where x is a suitable number of jobs to be running in parallel, will make testing much faster :)
10:12 tadzik japhb: okay, the list seems ok now
10:12 tadzik thanks for noticing
10:15 tadzik bah, my battery's terrible. Good that the flight's soon
10:15 hoelzro felher: awesome, thanks for the tip!
10:16 felher hoelzro: you're welcome :)
10:19 UncleFester6 joined #perl6
10:34 spider-mario joined #perl6
10:45 DarthGandalf joined #perl6
10:55 jnthn airport &
10:55 dbr joined #perl6
10:58 tarch joined #perl6
10:58 tarch left #perl6
11:07 kaleem joined #perl6
11:13 leont joined #perl6
11:14 kaleem joined #perl6
11:15 leont Anyone have a phonenumber of Flavio Glock?
11:16 leont (if so, send it in pm please)
11:19 hoelzro leont: I happen to work a few dozen meters from him
11:19 hoelzro would you like me to relay a message?
11:21 leont It's been taken care of :-)
11:22 leont (and I'm pretty sure he's not at work right now ;-) )
11:29 hoelzro ah =)
11:30 hoelzro jnthn: that fix you suggested last night didn't work =(
11:30 hoelzro for the qualified + punning call
11:31 hoelzro here's the error I got: Nominal type check failed for parameter ''; expected R but got Consumer instead
11:49 MayDaniel joined #perl6
11:57 ObseLeTe joined #perl6
12:12 SamuraiJack joined #perl6
12:34 SamuraiJack joined #perl6
12:44 * [Coke] wishes every happy hacking at yapc:eu. I'll just sit here and keep writing java then, shall I? ;)(
12:44 [Coke] er, ;)
12:49 cognominal joined #perl6
12:56 UncleFester6 joined #perl6
12:59 PacoAir_ joined #perl6
13:04 cognominal joined #perl6
13:16 orafu joined #perl6
13:19 colomon [Coke]: solidarity! I'll just sit here and keep writing C++, a little Perl 6, and ABC coding up tunes for next week.
13:21 * PerlJam too  (though it's Perl 5 and a little Perl 6)
13:26 JimmyZ joined #perl6
13:28 bluescreen10 joined #perl6
13:29 * colomon hopes there's some wild p6 hacking at yapc::eu!
13:31 pmichaud good afternoon, #perl6
13:31 hoelzro o/ pmichaud
13:31 hoelzro or \o
13:31 hoelzro I'm not sure.
13:31 pmichaud either works :-)
13:31 PerlJam pmichaud: good ugt to you!
13:31 pmichaud \o/
13:33 erkan joined #perl6
13:33 erkan joined #perl6
13:34 skids joined #perl6
13:34 PerlJam Did you guys see that khanacademy now has a CS program?   http://www.khanacademy.org/cs
13:34 nodmonkey joined #perl6
13:36 daxim old hat.  http://news.slashdot.org/story/12/03/01/1459209/k​han-academy-chooses-javascript-as-intro-language
13:38 PerlJam yeah, but now they've done something with it :)
13:40 atrodo joined #perl6
13:43 daxim not CS  http://slashdot.org/comments.p​l?sid=3048703&amp;cid=40990295
14:12 kaleem joined #perl6
14:14 JimmyZ aloha
14:14 JimmyZ pmichaud is in eu now?
14:15 JimmyZ *at
14:17 fridim_ joined #perl6
14:21 pmichaud yes, I'm in .eu now
14:22 ObseLeTe joined #perl6
14:24 [Coke] pmichaud: I am slowly working my way towards your per test roast information: http://feather.perl6.nl/~coke/roast/ - next I'll add a per synopsis breakdown like I did on the old google doc page, then start getting into std and per test stuff.
14:24 JimmyZ there are four days before yapc:eu?
14:25 pmichaud Coke++
14:25 JimmyZ [Coke]: the hint is a bit wrong
14:27 [Coke] JimmyZ: the hint seems to be stuck on the first value in the series.
14:29 JimmyZ aye
14:30 sftp joined #perl6
14:32 thou joined #perl6
14:36 kaare_ joined #perl6
14:36 tokuhiro_ joined #perl6
14:45 [Coke] I change the tooltip so that it's least more obvious it's stuck.
14:55 localhost joined #perl6
14:57 [Coke] JimmyZ: fixed. also bumped off a few months of early data.
14:58 kresike bye all
14:59 [Coke] !!
14:59 [Coke] er, ~~
15:06 Tedd1 joined #perl6
15:09 araujo joined #perl6
15:12 jeffreykegler joined #perl6
15:12 dalek perl6-examples: 7d9c163 | (Ryan Connelly)++ | 99-problems/P (26 files):
15:12 dalek perl6-examples: Added my own solutions for 99-problems/P01-P26.
15:12 dalek perl6-examples:
15:12 dalek perl6-examples: All currently run correctly on both rakudo and niecza.
15:12 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/7d9c16311e
15:18 UncleFester6 joined #perl6
15:20 Tedd1 joined #perl6
15:25 _fall0ut_ joined #perl6
15:28 moritz \o
15:29 colomon o/
15:32 moritz short backlog is short
15:35 * colomon is wishing svn had a "stash"
15:36 shachaf git-svn does!
15:37 colomon yes, but git-svn does not work well for my needs.  :(
15:37 moritz http://swaggadocio.com/post/428927895 the 'tap' method is a K combinator. Do we want that in Perl 6 too?
15:38 moritz given that we already have several million methods in any, .tap wouldn't hurt IMHO :-)
15:38 moritz _sri++ for asking
15:38 _sri \o/
15:39 shachaf I wouldn't really call that the K combinator...
15:39 _sri ruby folks coined the term i believe
15:40 * leont finds .tap confusing because of TAP
15:40 colomon doesn't look like it would be too hard to implement...
15:40 shachaf It's a reasonable method for working with Ruby, but only incidentally similar to K. :-)
15:40 _sri it's fun syntax sugar
15:41 colomon if you were purely function, the K combinator would basically be a no-op, right?
15:41 _sri http://ruby-doc.org/core-1.9​.3/Object.html#method-i-tap # the documentation for it btw
15:41 colomon *functional
15:42 shachaf Well, not a no-op -- it would take two arguments and return the first one.
15:42 shachaf It would have no effects, but then again, nothing would "if you were purly functional". :-)
15:42 colomon ah, yes.  but it wouldn't do anything with the second argument
15:42 shachaf Right.
15:43 colomon whereas it appears to point of the Ruby version is for side effects
15:43 shachaf (Actually it would take an argument X and return a function that ignores its argument and returns X.)
15:43 japhb tadzik, BTW, given what happened when I ran panda after the projects.json was shortened ... I'm thinking reboostrap.pl should back up the state file before rebuilding things.  Because if the projects.json is incomplete, the installs after the local boostrap will fail ... but the local bootstrap has already written a fresh state file.
15:43 shachaf (It's called "const" in Haskell, and it's not useless.)
15:43 shachaf (Using K as well as another combinator, S, you can write any function. :-) )
15:43 PerlJam Why is it called tap?
15:44 pmichaud "tap into a method chain"
15:44 shachaf Hah, that post has a bug, I think.
15:44 shachaf def logger; @logger || Logger.new(STDOUT); @logger.blah; @logger; end
15:45 shachaf Er, ||=
15:45 shachaf Should become def logger; (@logger ||= Logger.new(STDOUT)).tap {|l| l.blah }; end
15:45 shachaf Oh, wait.
15:45 shachaf .blah is just initialization here, so it doesn't matter in this particular case.
15:45 pmichaud there have been a fair number of times where I've wanted to invoke a method for its side effects but return the original invocant; we even have a mechanism to do this in PAST
15:46 pmichaud although it's not nearly as straightforward as .tap  :-)
15:46 * colomon just implemented it for niecza.  ;)
15:46 colomon I think.
15:47 colomon nr: https://gist.github.com/3371209
15:47 p6eval rakudo efde6e, niecza v19-21-gc86e8e5: OUTPUT«11␤10␤»
15:47 colomon that's 10.tap({ say $_ + 1 }).say;
15:47 colomon is that the right idea?
15:48 PerlJam looks like it
15:49 * colomon 's little boy is experimenting with with derailers after 1) seeing a rail one in a museum last week 2) having a big piece break off some Thomas wooden railway track, making a natural derailer for the wooden railway.  :)
15:49 colomon if I've got it correctly, it would be very trivial to add to our p6 implementations.
15:49 pmichaud are there any arguments involved?
15:50 pmichaud i.e., perhaps   &block(self, |$capture) ?
15:50 pmichaud (just wondering a bit)
15:52 shachaf There's another name for it in the Ruby world, apparently: http://weblog.jamisbuck.org/2006/10/27​/mining-activesupport-object-returning
15:52 shachaf That's possibly nicer than a method.
15:54 PerlJam um ... but it is a method.  :)
15:58 colomon pmichaud: adding |$capture wouldn't actually let you do anything more, it just might make it more elegant, correct?
15:58 moritz also "returning" doesn't fit well in Perl 6, because 'return' is bound to routines, not blocks
15:59 PerlJam "tap" doesn't fit well IMHO because is has other connotations.
15:59 fhelmberger joined #perl6
16:00 moritz .oO( KitchenSink )
16:02 jeffreykegler joined #perl6
16:03 PerlJam $logger //= en-passant Logger.new: { $_.datetime_format '%c' }
16:03 PerlJam (yes, I know the name stinks, but that's kind of what's going on: create this object and while you're at it, do this other thing with it
16:03 PerlJam )
16:04 pmichaud .do
16:04 pmichaud $xyz.do( { block })
16:04 moritz $xyz.modify( { block } )
16:04 pmichaud modify implies a change to $xyz; makes me think of .=
16:05 * colomon likes .do best so far
16:05 PerlJam .btw
16:05 colomon .tee
16:05 moritz and you do it for the side effects, which are usually modifications
16:05 moritz PerlJam: .lol
16:05 moritz :-)
16:06 pmichaud interestingly, the example given in the ruby docs doesn't modify self :-)
16:06 pmichaud which is why I'm not so certain of "usually modifications"
16:06 colomon moritz: I've got to think the most common usage is going to be simply printing out something.
16:07 colomon it would be awesomely handy for debugging long chain statments.
16:07 moritz aye
16:07 pmichaud .aside
16:07 PerlJam .also
16:08 moritz @array.map(...).sort.also(&say).join('|')
16:08 shachaf .btw
16:08 PerlJam shachaf: yes, I said that already :)
16:08 shachaf Oh, yes.
16:08 PerlJam (that's still my favorite too :)
16:09 pmichaud .btw doesn't have the 'selfness' implication that I'd want to see
16:09 moritz btw always makes me think of comments in LOLCODE
16:10 pmichaud it could also be a metaoperator, similar to  .* .? etc
16:10 _sri .mesh
16:11 * colomon still likes .do
16:11 moritz pmichaud: meta operator on invocation?
16:11 colomon though there's something to be see for .also
16:11 PerlJam colomon: do Logger.new: { ... }  # even if used like this ?
16:11 pmichaud well, there's a statement:do  that we have to be aware of
16:11 _sri .also is neat
16:12 shachaf .don't
16:12 shachaf To be more honest to the K combinator.
16:12 PerlJam shachaf: heh!
16:12 colomon PerlJam: maybe there's something I don't understand here, but wouldn't do Logger.new: { ... } create a Logger, pass it a block, and then throw away the result?
16:13 pmichaud gee, if it's a k-combinator, then just  .k()  :-P
16:13 moritz 'do Logger.new: { ... }' is just indirect method syntax for 'Logger.new.do: { ... }'
16:13 colomon ah
16:13 shachaf Does it go both ways?
16:13 pmichaud ...except that there's already a "do" statement, iirc.
16:13 colomon pmichaud: right.
16:13 PerlJam which is why I don't like .do at all :)
16:14 moritz shachaf: the other way (using a sub with method syntax is) 'foo'.&say('bar')
16:14 shachaf moritz: Ah, OK.
16:14 moritz nr: 'foo'.&say('bar')
16:14 p6eval rakudo efde6e, niecza v19-21-gc86e8e5: OUTPUT«foobar␤»
16:15 shachaf .after()?
16:15 shachaf foo.after(&say)
16:15 pmichaud .apply(&say)  is close
16:15 colomon oooo, .apply ...
16:15 pmichaud but   $obj.apply(&block)  feels a bit backwards.
16:16 moritz .oh-my
16:16 geekosaur futz-with :p
16:17 PerlJam .btw is still my favorite (.also is a close-ish second, but doesn't feel right in prefix position)
16:18 PerlJam Where's a linguist when you need one?  ;)
16:18 shachaf .after() or .post() or something is declarative.
16:18 shachaf "it's still foo, just after we called this procedure"
16:19 pmichaud .btw bugs me a bit, btw
16:19 PerlJam we all have our quirks  :)
16:19 * colomon pitches .tee again -- it's unix-y but almost exactly right
16:19 pmichaud tadzik++ suggests ".inject"
16:20 colomon hmmm
16:20 PerlJam heh, we can confuse rubyists with that one
16:20 PerlJam IIRC inject is like reduce
16:20 PerlJam (in rubyland)
16:21 shachaf And Smalltalkland.
16:21 shachaf (Well, OK, no one lives in Smalltalkland.)
16:21 benabik en-passant?
16:21 pmichaud bypass
16:21 shachaf .detour
16:21 colomon .siding
16:22 PerlJam .detour kind of works
16:22 cognominal joined #perl6
16:23 PerlJam en-passant is "in passing" like "on your way to the store, stop by the post office"  the post office is en passant of the store journey (or something like that)
16:23 PerlJam which is why .detour kind of works for me.
16:24 PerlJam (and .btw)
16:24 cognominal joined #perl6
16:25 cognominal joined #perl6
16:25 _sri .btw or .also
16:26 dalek doc: 68c9352 | (Gabor Szabo)++ | lib/Str.pod:
16:26 dalek doc: add some Str examples
16:26 dalek doc: review: https://github.com/perl6/doc/commit/68c935246b
16:26 dalek doc: e7a4202 | (Gabor Szabo)++ | lib/Str.pod:
16:26 dalek doc: more Str examples
16:26 dalek doc: review: https://github.com/perl6/doc/commit/e7a4202fb9
16:26 dalek doc: 15eeda8 | (Gabor Szabo)++ | / (27 files):
16:26 dalek doc: Merge branch 'master' of github.com:perl6/doc
16:26 dalek doc: review: https://github.com/perl6/doc/commit/15eeda8f6d
16:26 pmichaud there's always .self :-P
16:27 pmichaud $obj.self({...})
16:27 pmichaud very declarative if done that way
16:28 _sri winner
16:28 pmichaud it's kind of like "sink" in that sense -- we evaluate for the side effect but then ignore the result.
16:28 colomon but sort of weird with self $obj: { ... }   ? # still think .self might be a winner, just trying to think it out
16:29 pmichaud well, have to again be careful with "self" in term position.
16:29 pmichaud it's like "do" in that sense.
16:31 broquaint joined #perl6
16:34 masak morning, #perl6.
16:38 PerlJam nr:  say lines $*IN:;
16:38 p6eval rakudo efde6e: OUTPUT«===SORRY!===␤Confused␤at /tmp/IzWwB5bkN2:1␤»
16:38 p6eval ..niecza v19-21-gc86e8e5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Invocant handling is NYI at /tmp/cPHKVF1Quj line 1:â�¤------> [32msay lines $*IN:[33mâ��[31m;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5) â�¤  at /home/p6eval/niecz…
16:38 leont joined #perl6
16:38 PerlJam Looks like we don't have to worry about that notation anyway as neither rakudo nor niecza grok it  ;)
16:43 moritz szabgab++ # Str examples
16:46 UncleFester6 r: use MIME::Base64;
16:46 p6eval rakudo efde6e: OUTPUT«===SORRY!===␤Could not find MIME::Base64 in any of: /home/p6eval/.perl6/lib, /home/p6eval/nom-inst/lib/parrot/​4.4.0-devel/languages/perl6/lib␤»
16:49 moritz star: use MIME::Base64;
16:50 p6eval star 2012.07:  ( no output )
16:50 UncleFester6 star: use MIME::Base64; my Buf $b .= new(0xe2, 0x80, 0xbe); say $b; my Str $s = $b.decode("utf-8"); say $s.chars; say $s;  MIME::Base64.encode_base64($s)
16:50 p6eval star 2012.07: OUTPUT«Buf:0x<e2 80 be>␤1␤‾␤FixedIntegerArray: index out of bounds!␤  in method encode_base64 at /home/p6eval/star/lib/parrot/4.6.0/la​nguages/perl6/lib/MIME/Base64.pm6:7␤  in block <anon> at /tmp/0Iskn9dcgx:1␤␤»
16:51 UncleFester6 was testing base64 on a w3 sample utf8 file ...
16:55 * tadzik in Perl
16:56 diakopter :)
16:56 * moritz will arrive there in 26 hours, didn't manage to get there earlier :/
16:57 * [Coke] should write something that pulls down RC samples and makes integration tests out of them.
16:58 moritz [Coke]: that would be very neat
16:58 dalek perl6-roast-data: 77b6294 | coke++ | / (4 files):
16:58 dalek perl6-roast-data: today
16:58 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/77b6294278
16:58 dalek doc: 2ecf87d | (Geoffrey Broadwell)++ | lib/Str.pod:
16:58 dalek doc: Fix an incorrect example and a whitespace error in Str.pod
16:58 dalek doc: review: https://github.com/perl6/doc/commit/2ecf87debf
16:58 PerlJam An RC smoker would be awesome too.
17:00 moritz most (all?) RC examples write to $*OUT
17:00 [Coke] well, if we had something that auto-updated rc tests, you'd see it in perl6-roast-data when it failed
17:00 moritz so we could just write a common wrapper that overwrites $*OUT with something that captures the output instead of printing that
17:01 [Coke] we'd need to have a way to mark off RC code in the .t, test its output (or expected result), and a script to pull down new versions of RC code when they changed.
17:03 bluescreen10 joined #perl6
17:07 crab2313 joined #perl6
17:12 moritz aye
17:22 [Coke] moritz: http://feather.perl6.nl/~co​ke/sierpinksi_triangle.txt
17:23 moritz [Coke]: wow, that looks nice
17:23 [Coke] so, there's (ugly) markers to denote which part is the code from RC, there's some boilerplate to save the output, there's our expected output when we run the RC code, and then boilerplate to run the test.
17:24 [Coke] (the hardest part was getting the right text for the triangle. we're generating trailing spaces! ;)
17:25 moritz $output.lines>>.trim-trailing.join("\n")
17:25 moritz :-)
17:25 [Coke] so, there's some potential there for automating creating the test, and then potential for automating the upkeep of the RC code.
17:26 [Coke] and I'd probably put the tests under a new roast dir, "rosettacode".
17:27 mucker joined #perl6
17:29 localhost joined #perl6
17:40 sftp joined #perl6
17:52 dalek roast: e488f73 | coke++ | S02-types/hash.t:
17:52 dalek roast: use *-1 to indicate from end of list.
17:52 dalek roast:
17:52 dalek roast: std++
17:52 dalek roast: review: https://github.com/perl6/roast/commit/e488f73946
17:52 dalek roast: 73f0563 | coke++ | rosettacode/ (3 files):
17:52 dalek roast: Add in some rosettacode tests and a plan.
17:52 dalek roast: review: https://github.com/perl6/roast/commit/73f05639e9
17:52 [Coke] moritz: there's 2 samples to start with.
17:53 moritz \o/
17:53 colomon [Coke]: I think the whole point of that test was that it was -1 instead of *-1?
17:54 colomon The test should maybe be rewritten to be dies_ok, or something like that.
17:54 [Coke] colomon: its on hash access.
17:55 [Coke] not array access.
17:55 [Coke] so, we can check both, but the intent as I read it was "you can't read from the end of a hash"
17:55 [Coke] (even if you do it the right way)
17:55 colomon ah
17:55 colomon [Coke]++
17:55 [Coke] also, the test didn't parse in std.
17:58 [Coke] (so, right, if that is the intent, we need to wrap it.)
18:10 odoacre joined #perl6
18:15 japhb tadzik, for panda do you prefer pull requests or to hand out a commit bit?
18:17 cognominal_ joined #perl6
18:23 birdwindupbird joined #perl6
18:49 spider-mario joined #perl6
18:51 masak I just found the best Chinese idiom ever: 瓜田不納履,李下不整冠
18:52 masak "don't tie your shoelaces in a melon field, and don't tidy your hat under a plum tree"
18:52 masak (meaning, avoid activities that make you *look* culpable)
18:55 japhb phenny, ask tadzik I'm making decent progress locally on panda fixes and improvements; would you prefer I send pull requests, or do you prefer to hand out commit bits?
18:55 phenny japhb: I'll pass that on when tadzik is around.
18:57 UncleFester6 joined #perl6
19:14 jaldhar joined #perl6
19:17 arnsholt masak: That was completely opaque to me, until I read your explanation on the next line; after which it was completely obvious =D
19:18 masak arnsholt: same here. :)
19:18 arnsholt Typical of idioms, really
19:18 arnsholt Either you get it, or you don't
19:19 masak Wikipedia says of it: "The literal meaning of the idiom is impossible to understand without the background knowledge of the origin of the phrase."
19:20 masak oh, but this seems to refer to the abbreviated version of the idiom: 瓜田李下 -- "melon field, beneath the plums".
19:20 masak how very Chinese. :)
19:22 arnsholt It's not the worst idiom in terms of grokkability
19:23 PerlJam Perl--either you get it, or you don't  ;)
19:23 arnsholt My favourite in terms of weirdness is in Norwegian
19:23 arnsholt "Ugler i mosen"
19:23 UncleFester6 eval: print "hello\n"
19:23 buubot_backup UncleFester6: hello 1
19:23 arnsholt Literal meaning is "owls in the moss" =D
19:24 UncleFester6 eval: use MIME::Base64 qw(encode_base64); use Encode qw(encode); $encoded = encode_bas64(encode("UTF-8", "\x{a2}")); print $encoded, $/;
19:24 buubot_backup UncleFester6: ERROR: Can't locate MIME/Base64.pm in @INC (@INC contains:) at (eval 20) line 1. BEGIN failed--compilation aborted at (eval 20) line 1.
19:24 PerlJam sounds like a warning
19:24 arnsholt Although it's somewhat improved by knowing that it's actually stolen from Danish, where it's "ulver på myren" (wolves on the moor)
19:25 masak arnsholt: oh! so that's where it's from.
19:25 masak arnsholt: Swedish has "ugglor i mossen", too.
19:25 masak I never asked myself where it came from.
19:25 arnsholt Yeah, it's really, really weird as far as idioms go
19:26 arnsholt Knowing the Danish origin helps a bit, but I still don't quite grasp how we went from wolves on a moor to owls in moss ^_^
19:26 UncleFester6 perll: use MIME::Base64 qw(encode_base64); use Encode qw(encode); $encoded = encode_bas64(encode("UTF-8", "\x{a2}")); print $encoded, $/;
19:26 UncleFester6 perl: use MIME::Base64 qw(encode_base64); use Encode qw(encode); $encoded = encode_bas64(encode("UTF-8", "\x{a2}")); print $encoded, $/;
19:26 PerlJam Are Danes and Swedes afraid of owls?
19:27 UncleFester6 Is there a way to run that little p5 script through evalbot?
19:27 masak arnsholt: mis-borrow, I guess.
19:27 masak arnsholt: you need to watch this: http://www.youtube.com/watch?v=_hM_mWG2Cbc :)
19:27 sirrobert joined #perl6
19:29 arnsholt "ser inte skogen för alla ben" =D
19:29 arnsholt (modulo Swedish spelling)
19:29 jaldhar joined #perl6
19:30 masak it came out correct :)
19:33 arnsholt But that was a delightfully absurd clip =D
19:34 masak "Nile City". way before its time.
19:34 arnsholt Oh, goody. Sometimes I can intuit the changes required for Swedish, and sometimes I'm just way off-target
19:34 masak it was possible to watch it years later, and find it hilarious.
19:34 arnsholt Yeah, that clip was very Monty Python
19:34 arnsholt Reminded me of some more recent Norwegian stuff as well
19:34 masak but at the time it came out, the reaction among Swedish viewers was a little "eeeeh. ok..."
19:35 arnsholt Team Antonsen
19:35 arnsholt I can imagine the reception was a bit cautious, yeah
19:36 UncleFester6 p: use MIME::Base64 qw(encode_base64); use Encode qw(encode); $encoded = encode_bas64(encode("UTF-8", "\x{a2}")); print $encoded, $/;
19:36 p6eval pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/U4JjUAdObb line 1, column 1␤»
19:38 arnsholt masak: I assume other Norwegians have shown you the Team Antonsen/Ut i vår hage takes on Swedish and Danish? =)
19:38 masak arnsholt: yes. :)
19:43 masak "kamelåså". :)
19:47 ChoHag I know this isn't strictly the right place to ask but I'm already in here - In þe old perl 5, how do I use split a row delimited by || and on each side 0 or more whitespace? The naiive \s*\|\|\s* doesn't work - the capture buffers keep their preceeding whitespace.
19:49 PerlJam eval: [ split /\s*\|\|\s*/, "foo   ||   bar ||  baz" ]
19:49 buubot_backup PerlJam: ["foo","bar","baz"]
19:50 masak PerlJam++
19:50 ChoHag Ah wait. not.
19:50 ChoHag The space is captured previously by another regex.
19:53 masak 'night, #perl6
19:54 PerlJam masak: sleep well!
20:04 [Coke] and dream of large macros.
20:05 * geekosaur still has nightmares about those...
20:05 colomon [Coke]++
20:05 geekosaur then again they were m4 macros
20:08 PerlJam Any contest where you can say "my macro is bigger than your macro" means that you've already lost.
20:10 sirrobert anyone know of a p6 javascript grammar?
20:11 sirrobert or, really... JSONP =)  but I guess that would have most of javascript
20:11 jeffreykegler joined #perl6
20:17 geekosaur PerlJam, I'm tempted to say any time you have to bring in macros, you've already lost
20:17 geekosaur But sometimes it's less of a loss than *not* having them...
20:17 moritz I think macros are a tool like any other: they have their valid uses, but if you overuse them, you're in trouble
20:18 moritz same with the chain saw :-)
20:19 geekosaur 15000+-line m4 macro collection (ignoring comments) for accell/sql.  *twitch*
20:20 * moritz puts it firmly into the "overuse" category
20:20 japhb .oO( For example, if you were to try to carve a detailed statue out of a small block of wood using a chainsaw, that would be really bad ... oh wait )
20:20 PerlJam geekosaur: I have 20 routines that all look like this:   sub FOO(SOME-SIG) returns RET_VAL is export is native(SOME-LIB) { ... }    It sure would be nice if I could have written a macro to abstract out the common bits.
20:21 * geekosaur might be showing excessive exposure to haskell, but thinks that feels like a type alias
20:22 geekosaur although "is native" does mix the levels a bit, haskell-think-wise
20:22 moritz hm
20:22 brrt joined #perl6
20:23 moritz PerlJam: I wonder if a hack like http://perlgeek.de/blog-en/perl-6/2012​-rakudo-hack-dynamic-export-lists.html could help you for that
20:23 PerlJam geekosaur: macros are a useful tool.  :-)
20:24 geekosaur I didn;t say they weren't, I said they're often the *lesser* evil
20:24 geekosaur but they're always evil
20:26 PerlJam macros are innately evil?
20:27 moritz only if you also think that funcitons/subroutines are also always evil
20:27 sirrobert or reason =)
20:31 brrt1 joined #perl6
20:32 geekosaur m4 macros certainly are...
20:33 geekosaur other kinds, well, it depends.  but even various "hygienic" macros often strike me as workarounds for insufficiently general lower level design (while noting that we don't know how to make the lower level general enough in many cases)
20:48 tokuhiro_ joined #perl6
20:48 moritz if the lower level stuff were general enough, it would be higher level :-)
20:50 * moritz wonders if there will be some syntax for creating arbitrarily nested hashes
20:51 moritz something like my %h; %h{ [;] @keys } = $value;  or so
20:51 moritz since @a[1][2] and @a[1;2] are supposed to be (roughly?) the same, that might work-ish
20:52 japhb_ joined #perl6
20:52 * moritz has answered http://www.perlmonks.org/?node_id=987872 and now wonders if it can be made even easier in Perl 6
20:54 moritz anyway, sleep time here, ttfn
20:56 PacoAir joined #perl6
21:00 skids I never got the impression that @a[1][2] and @a[1;2] were related in any way...
21:07 ChoHag Quick one: Could s/=/==/ be a valid operator (though not ever being a sensible one)?
21:11 skids .oO(Oh right, zen slice.)
21:11 PerlJam skids: http://perlcabal.org/syn/S0​8.html#Multidimensionality
21:11 PerlJam ChoHag: What do you mean?
21:12 ChoHag You can define new operators, like +- for 'if $x = 10 +- 3'. Can s/=/==/ be a valid operator?
21:12 ChoHag sub infix:<s/=/==/> or whatever.
21:13 benabik r: sub infix:<s/=/==/>(*@) { say 'crazy' }; 1 s/=/==/ 2
21:13 p6eval rakudo efde6e: OUTPUT«crazy␤»
21:13 PerlJam oh.
21:13 benabik Well, it appears to work.  O.o
21:13 PerlJam benabik++
21:13 benabik n: sub infix:<s/=/==/>(*@) { say 'crazy' }; 1 s/=/==/ 2
21:13 p6eval niecza v19-21-gc86e8e5: OUTPUT«crazy␤»
21:13 ChoHag PerlJam: I think you mean "oh dear" :)
21:14 PerlJam ChoHag: perhaps :)
21:17 alester joined #perl6
21:18 mattp_ joined #perl6
21:20 daxim joined #perl6
21:23 daxim http://www.reddit.com/r/perl/comm​ents/y6bap/learningperl6/c5u5tz5
21:23 daxim someone with a reddit account tell him these are two different languages
21:28 ObseLeTe joined #perl6
21:29 phenny joined #perl6
21:33 cognominal joined #perl6
21:43 benabik nr: sub foo { say 'bar' }; foo(1,2)
21:43 p6eval niecza v19-21-gc86e8e5: OUTPUT«Unhandled exception: Excess arguments to foo, used 1 of 2 positionals␤  at /tmp/ddy1yV_llJ line 0 (foo @ 1) ␤  at /tmp/ddy1yV_llJ line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setti…
21:43 p6eval ..rakudo efde6e: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with argument types (Int, Int) (line 1)␤    Expected: :()␤»
21:43 benabik nr: sub foo { say @_ }; foo(1,2)
21:43 p6eval rakudo efde6e, niecza v19-21-gc86e8e5: OUTPUT«1 2␤»
23:09 whiteknight joined #perl6
23:12 scottdware joined #perl6
23:12 scottdware joined #perl6
23:26 benabik joined #perl6

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

Perl 6 | Reference Documentation | Rakudo