Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-08-17

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:08 daniel-s_ joined #perl6
00:15 gongyiliao joined #perl6
00:23 prammer joined #perl6
00:28 tokuhiro_ joined #perl6
00:37 Circlepuller joined #perl6
00:37 Vlavv` joined #perl6
00:39 dayangkun joined #perl6
00:44 skids joined #perl6
00:52 raiph joined #perl6
00:59 scott__ joined #perl6
01:05 dayangkun joined #perl6
01:09 cognominal joined #perl6
01:16 scott__ joined #perl6
01:25 jeffreykegler joined #perl6
01:33 Entonian joined #perl6
01:48 cognominal_ joined #perl6
02:11 scottdware joined #perl6
02:42 orafu joined #perl6
02:56 silug joined #perl6
02:58 leprevost joined #perl6
03:55 colomon joined #perl6
03:57 thou o/
04:17 telex joined #perl6
04:22 kaleem joined #perl6
04:36 telex joined #perl6
05:15 xinming_ joined #perl6
05:26 birdwindupbird joined #perl6
05:35 brrt joined #perl6
05:40 Tene joined #perl6
05:40 SamuraiJack joined #perl6
05:48 masak morning, #perl6
05:52 cosimo__ morning, masak
05:57 * masak commutes for a second day of teaching
06:02 pmichaud good morning, #perl6
06:02 pmichaud good morning, masak++
06:03 diakopter o_O
06:05 cognominal joined #perl6
06:12 topo__ joined #perl6
06:28 telex joined #perl6
06:35 brrt joined #perl6
06:44 tarch joined #perl6
06:44 tarch left #perl6
07:00 moritz \o
07:05 snearch joined #perl6
07:06 hoelzro morning perl6 folk
07:35 fridim_ joined #perl6
07:43 Tedd1 joined #perl6
07:46 kresike joined #perl6
07:47 kresike good morning all you happy perl6 people
07:53 fgomez joined #perl6
08:01 topo joined #perl6
08:02 tadzik good morning
08:02 phenny tadzik: 16 Aug 18:55Z <japhb> 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?
08:03 tadzik japhb: you've just been commit-bitten :)
08:03 tadzik japhb: if you plan to break existing stuff, please do that in a branch
08:05 leont joined #perl6
08:19 Psyche^ joined #perl6
08:25 eiro joined #perl6
08:31 dakkar joined #perl6
08:32 cognominal joined #perl6
08:35 jeffreykegler joined #perl6
08:56 bbkr joined #perl6
09:53 ObseLeTe joined #perl6
10:18 spider-mario joined #perl6
10:34 ObseLeTe joined #perl6
10:46 SamuraiJack joined #perl6
10:50 SamuraiJack joined #perl6
10:51 kaleem joined #perl6
11:20 cognominal joined #perl6
11:22 am0c joined #perl6
11:28 sergot joined #perl6
11:28 sergot Hi! o/
11:39 cosimo joined #perl6
11:40 sftp joined #perl6
11:51 alester_ joined #perl6
12:08 Timbus joined #perl6
12:12 tokuhiro_ joined #perl6
12:13 tokuhir__ joined #perl6
12:14 ObseLeTe_ joined #perl6
12:26 tadzik o/
12:38 MayDaniel joined #perl6
12:51 am0c joined #perl6
13:10 odoacre joined #perl6
13:17 leprevost joined #perl6
13:24 skids joined #perl6
13:25 bluescreen10 joined #perl6
13:32 daniel-s_ joined #perl6
13:32 adu joined #perl6
13:38 MayDaniel joined #perl6
13:43 Circlepuller_ joined #perl6
13:45 telex joined #perl6
13:48 JimmyZ joined #perl6
13:48 JimmyZ moritz: ping
13:50 Circlepuller joined #perl6
13:52 xinming joined #perl6
13:57 SamuraiJack joined #perl6
13:57 birdwindupbird joined #perl6
13:57 hanekomu joined #perl6
13:57 awwaiid joined #perl6
13:57 obra joined #perl6
13:57 _sri joined #perl6
13:57 pnu_ joined #perl6
13:57 shachaf joined #perl6
14:06 [Coke] Wow, quiet in here.
14:07 JimmyZ because of yapc:eu?
14:09 colomon http://www.technologyreview.com/view/428920/the-emerging-revolution-in-game-theory/
14:10 colomon JimmyZ: presumably so.  but not sure why they aren't all chattering on here, too!
14:10 JimmyZ may they are enjoy party
14:10 JimmyZ *maybe
14:11 JimmyZ beer party \o/
14:12 colomon http://golem.ph.utexas.edu/category/2012/07/zerodeterminant_strategies_in.html
14:18 japhb tadzik, thanks for the commit bit!  I've got a few fixes and minor enhancements I'll push to master, and then some more invasive stuff I'll throw in a branch.
14:19 japhb (Where 'invasive' is only moderately so -- but you might disagree with the basic design idea, so it's worth discussing.)
14:21 tadzik sure, go ahead
14:24 PacoAir http://perllinux.sourceforge.net
14:24 colomon tadzik: hey, how are things going at YAPC::EU?
14:25 tadzik colomon: we're actualy before YAPC::EU still
14:25 tadzik discussing stuff in Perl, Germany :)
14:25 colomon but there's a lot of us out there, right?
14:25 tadzik right
14:28 japhb tadzik, what do you think about setting the panda repo to feed dalek?
14:28 tadzik japhb: I think it is set
14:28 tadzik remember how I killed it 3 times one night? ;)
14:29 japhb Huh.  I just pushed master seemingly successfully, and dalek isn't talking ... oh, I see, not in channel
14:29 tadzik ha, that explains it
14:29 japhb d'oh!
14:30 japhb No, dalek is in channel, but I couldn't see it because of bad chat client UI.  :-(
14:30 * tadzik reads commitlog
14:30 tadzik no, I don't see it either
14:31 japhb ?
14:31 * japhb investigates
14:31 eiro_ http://perllinux.sourceforge.net ? is this a recent project ? wow ... sf.net still online
14:31 eiro_ hello all :)
14:32 tadzik hey eiro_ :)
14:32 tadzik eiro_: HN discussion says it's from 2001 or so
14:32 japhb I see the commits and branches on github
14:32 colomon perllinux is not recent at all, it's about a decade... what tadzik says.
14:32 japhb well, branch (I only added one)
14:33 tadzik japhb: I like the new `panda list`
14:33 tadzik not sure what the git url is useful for though
14:33 tadzik and it now doesn't fit on my normal terminal size :)
14:34 japhb Because in the branch, it shows when you installed from a local spot.  :-)
14:34 tadzik a-ha!
14:34 tadzik lemee look into that
14:34 japhb And the next thing I was planning to work on in that branch is adding the 'git describe --always --dirty' output from the install time.
14:35 dalek panda: 3a62063 | (Geoffrey Broadwell)++ | bin/panda:
14:35 dalek panda: Begin enhancing 'panda list': version and source url columns; automatic column widths for name and version columns
14:35 dalek panda: review: https://github.com/tadzik/panda/commit/3a62063dfb
14:35 dalek panda: d6ca1c7 | (Geoffrey Broadwell)++ | rebootstrap.pl:
14:35 dalek panda: reboostrap.pl improvements: Save a backup of the old state file, add comments, refactor to limit repeating hardcoded statefile path
14:35 dalek panda: review: https://github.com/tadzik/panda/commit/d6ca1c76a5
14:35 dalek panda: 59e1126 | (Geoffrey Broadwell)++ | .gitignore:
14:35 dalek panda: Add *~ to .gitignore
14:35 dalek panda: review: https://github.com/tadzik/panda/commit/59e1126c25
14:35 dalek panda: f6b9fde | (Geoffrey Broadwell)++ | projects.json.bootstrap:
14:35 dalek panda: Fix description of Test::Mock in projects.json.bootstrap
14:35 dalek panda: review: https://github.com/tadzik/panda/commit/f6b9fdea59
14:35 japhb And a pending fix in the branch is that bootstrap/rebootstrap should install panda from $cwd, rather than '.', so it can show up properly in the panda list output.
14:35 tadzik ah, there we are :)
14:36 japhb Yeah, appears dalek is just slow to notice this morning
14:36 tadzik japhb: what's the new branch name?
14:36 japhb "pending fix" ==> "fix I am planning to make but isn't there yet"
14:36 japhb verbose-list
14:36 dalek panda/verbose-list: 2ba908f | (Geoffrey Broadwell)++ | lib/Panda/Ecosystem.pm:
14:36 dalek panda/verbose-list: When installing, save a snapshot of that project's metainfo into the statefile
14:36 dalek panda/verbose-list: review: https://github.com/tadzik/panda/commit/2ba908ff32
14:36 dalek panda/verbose-list: d0553e2 | (Geoffrey Broadwell)++ | bin/panda:
14:36 dalek panda/verbose-list: Display saved metainfo for installed projects when doing 'panda list'
14:36 dalek panda/verbose-list: review: https://github.com/tadzik/panda/commit/d0553e24aa
14:36 tadzik speaking of which..
14:36 japhb ... and there it is.  ;-)
14:37 mhasch tadzik: since you are in Perl, do you plan to bring a souvenir from there?
14:37 tadzik mhasch: probably :)
14:37 japhb The controversial bit there is that I've added another "column" to the state file, which is a snapshot of the metainfo of the project at the time of the install.
14:37 tadzik hm
14:38 eiro_ hey tadzik \o/ almost YAPC! happy to see you all again
14:39 japhb I didn't really have a better idea for something that A) wouldn't skew against the state file over time, and B) would capture the exact install-time state of the project.
14:39 eiro_ haha ... old idea then (perllinux) as well as psh, zoidberg and so on.
14:39 tadzik japhb: so we display versions correctly in panda list
14:39 sudokode joined #perl6
14:39 tadzik like, installed version, not available version, right?
14:39 japhb tadzik, exactly, as well as local install dir, etc.
14:39 japhb RIGHT
14:39 tadzik awesome
14:40 eiro_ now i'm dreaming about a repl on top of perlude: i'm ready to give *sh away
14:40 tadzik so you now can know what you should update, as long as modules are properly versioned
14:40 japhb Bingo
14:40 japhb (That was about 2-3 feature ideas down the line, but already on my mind.  ;-)
14:41 tadzik one of ideas I'm keeing in the back of my mind is to keep track of files too
14:41 tadzik so you can actually uninstall modules, no one can do that yet :P
14:41 tadzik that's why there's instlaled and installed-dep, so we can do some sort of GC if we want to
14:41 japhb right, I figured.  ;-)
14:42 mhasch I once was wearing a perl t-shirt in a distant place and met a guy from Perl who thought he had found somebody from home.  That was funny.
14:42 japhb Although with the multi-column 'panda-list', we might want to figure out a shorter way to say "[installed for dependencies]" because it makes that column really wide.
14:43 tadzik I'd just put that in panda info
14:43 japhb heh, 'panda-list', I've been talking about git too often.  ;-)
14:43 tadzik I'd like to keep list possibly short, as in, not-wide ;)
14:43 alester_ joined #perl6
14:43 tadzik consider dpkg -l
14:43 japhb I agree.  Perhaps a --verbose option to show more details, but not the default
14:43 tadzik well, it's screen width awae too
14:44 sirrobert I'd love to see dependencies put into an application subfolder (like nodejs uses).  Is that something it can already do?
14:44 mhasch Although he should have figured his home town would not advertise a big blue onion.
14:44 japhb As soon as we have TermInfo.  ;-)
14:44 sirrobert (via panda install, I mean)
14:44 tadzik sirrobert: you can use DESTDIR env variable
14:44 sirrobert ok, cool
14:44 tadzik mhasch: hehe
14:45 sirrobert tadzik: at some point I'll check out having ufo's makefile do that by default to install deps
14:45 japhb DESTDIR is something I wanted to ask about -- why does DESTDIR get folded into a subdir of cwd?
14:45 tadzik ...it does?
14:45 japhb ISTR so, yes
14:46 tadzik it's horribly wrong then :)
14:46 japhb yeah, 'git grep DESTDIR' and you'll see it in a couple places.
14:47 tadzik oh, bin/panda:        destdir      => %*ENV<DESTDIR> ?? "{cwd}/%*ENV<DESTDIR>"
14:47 mhasch I hate screen width aware behaviour.  Make the output terse alright, but do not change it based on silly heuristics.
14:47 tadzik wth did I do that
14:48 japhb Wasn't me.  ;-)
14:48 tadzik was me :)
14:51 mucker joined #perl6
14:54 japhb tadzik, the cwd/DESTDIR behavior is also in bootstrap.pl, in case you missed it.
14:55 cognominal joined #perl6
14:55 tadzik strange
14:55 tadzik want to look at it?
14:55 japhb Yeah, if it was only that way in one place, I would have figured just a buglet.  But that it was *consistent* across multiple files, I figured you had a good reason.
14:56 japhb "look at it" how?  I'm not sure I understand.
14:57 japhb You mean "change it and commit"?
14:57 tadzik I don't remember testing DESTDIR extensively, or maybe at all
14:57 japhb Ah!
14:57 tadzik yeah, change it and see if it works
14:57 japhb Gotcha.
14:57 japhb Yeah, I can do that in a few minutes.  Have some RL stuff to attend to for a bit.
14:57 tadzik sure
14:59 japhb While I'm AFK, some food for thought: If you supply DESTDIR, does that imply a separate state file?  Can the dependencies shown in one state file satisfy the other?
14:59 japhb really afk &
15:00 tadzik my first thought was that if DESTDIR's set, then we don't modify the statefile
15:01 * tadzik afks as well
15:16 tokuhiro_ joined #perl6
15:18 crab2313 joined #perl6
15:18 SamuraiJack joined #perl6
15:21 masak good morning, #perl6
15:21 hoelzro o/ masak
15:22 JimmyZ morning masak
15:22 crab2313 o/ masak
15:22 japhb o/
15:23 japhb tadzik, hmm ... so basically if you use DESTDIR, you're in charge of your own dependencies and state and such?  That seems a bit strong.  OTOH, what if we give the user an envvar or something that allows them to set the statefile to use as well ...?
15:25 thou joined #perl6
15:32 birdwind1pbird joined #perl6
15:35 kresike bye all
15:44 avarab joined #perl6
15:45 avar joined #perl6
15:45 avar joined #perl6
16:10 am0c joined #perl6
16:11 thou joined #perl6
16:34 sirrobert r: Str.Str
16:34 p6eval rakudo efde6e: OUTPUT«use of uninitialized value of type Str in string context  in block  at /tmp/IvxMoRBJGu:1␤␤»
16:34 sirrobert r: Str eq 'foo'
16:34 p6eval rakudo efde6e: OUTPUT«use of uninitialized value of type Str in string context  in block  at /tmp/k7NrGzy7hC:1␤␤»
16:35 sirrobert r: my $foo; $foo eq 'foo'
16:35 p6eval rakudo efde6e: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/OHZxmJ8pkU:1␤␤»
16:35 masak sirrobert: lots of interactions with undefined variables provide such warnings.
16:35 sirrobert r: my $foo; say ($foo && $foo eq 'foo') ?? "yep" !! "nope"
16:35 p6eval rakudo efde6e: OUTPUT«nope␤»
16:35 sirrobert masak:  thanks =)
16:36 masak (and type objects are undefined)
16:36 sirrobert masak: was trying to figure out how to do a comparison on something that may or may not have a value
16:36 sirrobert (a hash value, in particular)
16:36 masak r: my $foo; say ($foo // "explicit default") eq "OH HAI"
16:36 p6eval rakudo efde6e: OUTPUT«False␤»
16:37 sirrobert hmmmm
16:37 sirrobert I haven't encountered // before
16:37 masak r: my %h; say (%h<foo> // "totally missing") eq "OH HAI"
16:37 p6eval rakudo efde6e: OUTPUT«False␤»
16:37 masak sirrobert: // is like || except it picks the rhs if the lhs is undefined.
16:37 sirrobert huh cool
16:37 masak || picks it if the lhs is falsy.
16:37 sirrobert right
16:38 sirrobert great... thanks!
16:38 * masak kowtows
16:38 sirrobert is it a string comparison?
16:38 sirrobert oh, it's just truthiness
16:38 masak what is?
16:38 sirrobert //
16:39 masak it's not about truthiness. || is
16:39 masak // is about definedness
16:39 sirrobert ohhh, I missed the compound nature of the condition
16:39 masak r: for Str, "foo" { say $_ // "default" }
16:39 p6eval rakudo efde6e: OUTPUT«default␤foo␤»
16:39 sirrobert my %h; say (%h<x> // 'x') eq 'x'
16:39 sirrobert r: my %h; say (%h<x> // 'x') eq 'x'
16:39 p6eval rakudo efde6e: OUTPUT«True␤»
16:39 sirrobert r: my %h; say (%h<x> // 's') eq 'x'
16:40 p6eval rakudo efde6e: OUTPUT«False␤»
16:40 sirrobert I see, I was sort of silently omitting the 'eq...' in my mental parser =)
16:40 sirrobert that has some neat power to it.
16:40 sirrobert r: my %h; say %h<x> // 'x' eq 'x'
16:41 p6eval rakudo efde6e: OUTPUT«True␤»
16:43 sirrobert r: <<Foo>>.WHAT
16:43 p6eval rakudo efde6e:  ( no output )
16:43 sirrobert r: say <<Foo>>.WHAT
16:43 p6eval rakudo efde6e: OUTPUT«Str()␤»
16:46 masak sirrobert: 'eq' is tighter than '//', so the above probably doesn't mean what you want it to mean.
16:46 benabik joined #perl6
16:46 sirrobert masak: thanks
16:46 sirrobert was just testing precedence
16:47 masak r: my %h = x => 42; say %h<x> // 'x' eq 'x'
16:47 p6eval rakudo efde6e: OUTPUT«42␤»
16:47 masak well, your case didn't exhibit the precedence ;)
16:47 masak by the way, S03 has a precedence table which you might find useful.
16:48 masak that's how I checked which one was tightest.
16:48 sirrobert great!  thanks
16:53 masak huh! the programming language Idris has a "so" data type "which guarantees that the value is true". I wonder if this was inspired by Perl 6, or if it's just convergent evolution.
16:53 sirrobert what's p6's equivalent?
16:57 avar joined #perl6
16:58 colomon sirrobert: I think he's thinking of "but true"
16:58 sirrobert ah
17:01 masak no, I'm thinking of the Perl 6 function 'so', which boolifies values at a looser precedence than prefix:<?>
17:02 sirrobert didn't know about that
17:02 colomon but p6 so isn't a data type...
17:02 masak indeed it is not.
17:02 sirrobert but that may be the Idris conceptual equivalent of the p6 version
17:03 masak yes, I got that feeling.
17:06 sirrobert just spent 30 minutes learning the difference between <<>> and Q<<>> =)
17:08 masak are you sure you don't want <> ?
17:08 masak r: .say for <foo bar baz>
17:08 p6eval rakudo efde6e: OUTPUT«foo␤bar␤baz␤»
17:08 sirrobert I was using <<>> to quote things
17:08 sirrobert which apparently works except in some cases =)
17:09 masak <<>> isn't completely implemented in Rakudo.
17:09 sirrobert now I realize that <<>> is a ... method postfix thing
17:09 masak I don't know about Niecza.
17:09 masak a "method postfix thing"? it's a circumfix quoting operator.
17:09 sirrobert r: sub f (Str $s) {say $s}; f(<<Foo Bar>>);
17:09 p6eval rakudo efde6e: OUTPUT«Nominal type check failed for parameter '$s'; expected Str but got Parcel instead␤  in sub f at /tmp/VbcEaZreAv:1␤  in block  at /tmp/VbcEaZreAv:1␤␤»
17:10 sirrobert r: sub f (Str $s) {say $s}; f(Q<<Foo Bar>>);
17:10 p6eval rakudo efde6e: OUTPUT«Foo Bar␤»
17:11 sirrobert I had been using <<>> as Q<<>>
17:11 sirrobert ohhhh .<<>> is the method postfix operator
17:11 sirrobert I missed the .
17:11 sirrobert well, then I don't know what the issue was, except that <<>> breaks function calls and Q<<>> doesn't =)
17:12 masak there's no .<<>> method postfix operator as far as I know.
17:12 sirrobert http://www.perlfoundation.org/perl6/index.cgi?perl_6_lookup_tablet
17:12 masak there's @things>>.foo
17:12 sirrobert in the table of precedence in the Operators section.
17:12 sirrobert L . Method postfix . . . . .meth .+ .? .* .() .[] .{} .<> .<<>> .:: .= .^ .:
17:12 masak oh, sorry. 'course
17:13 masak yes, that's hash access.
17:13 sirrobert no idea what it does, I was just going off the tablet
17:13 masak r: my %h = foo => 42; say %h.<<foo>>
17:13 p6eval rakudo efde6e: OUTPUT«42␤»
17:13 sirrobert ahhh
17:13 masak I tend to write it without the dot.
17:13 masak r: my %h = foo => 42; say %h<<foo>>
17:13 p6eval rakudo efde6e: OUTPUT«42␤»
17:13 sirrobert me too
17:13 masak can also use French quotes.
17:13 sirrobert it interpolates?
17:13 masak r: my %h = foo => 42; say %h«foo»
17:13 p6eval rakudo efde6e: OUTPUT«===SORRY!===␤Confused␤at /tmp/Uwg_RuCELx:1␤»
17:14 masak heh; that should work.
17:14 masak it does a shell-like interpolation, yes.
17:14 sirrobert my %h = foo => 42; my $f = "foo"; say %h<<$f>>;
17:14 masak but... not yet in Rakudo.
17:14 sirrobert r: my %h = foo => 42; my $f = "foo"; say %h<<$f>>;
17:14 p6eval rakudo efde6e: OUTPUT«Any()␤»
17:14 sirrobert ok
17:16 masak meh, the ECMA-262 v3 specification is so boring it makes me sad. :/
17:17 sirrobert heh
17:22 kaare_ joined #perl6
17:26 nodmonkey joined #perl6
17:33 benabik joined #perl6
17:38 avar joined #perl6
17:52 jeffreykegler joined #perl6
18:05 am0c joined #perl6
18:13 jeffreykegler joined #perl6
18:21 leprevost joined #perl6
18:23 thelazydeveloper joined #perl6
19:20 fhelmberger joined #perl6
19:20 benabik joined #perl6
19:45 kaare__ joined #perl6
19:49 birdwindupbird joined #perl6
19:52 dalek perl6-roast-data: 6575718 | coke++ | p (2 files):
19:52 dalek perl6-roast-data: today
19:52 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/6575718eef
19:52 * [Coke] wishes someone would update pugs so that it didn't have PIDs in the test output, making it harder to spot diffs between runs.
20:06 rjbs Disheartening:  work for 7 hours, then see the diff stat is 5 files changed, 159 insertions(+), 77 deletions(-)
20:06 rjbs I don't know why.  I just feel like I did more than that. :)
20:07 sirrobert sorry =)
20:07 rjbs It's okay, just don't let it happen again.
20:07 sirrobert I spent much of the day on SQL stuff (whug)
20:07 sirrobert I garauntee it:  today will never happen again.
20:10 sirrobert r: sub foo (Hash %h) { say %h; }; foo { one => 1, two => 2, };
20:10 p6eval rakudo efde6e: OUTPUT«Nominal type check failed for parameter '%h'; expected Associative but got Hash instead␤  in sub foo at /tmp/ccq2iOxdnq:1␤  in block  at /tmp/ccq2iOxdnq:1␤␤»
20:10 sirrobert (How) do I do a hash literal?
20:11 sirrobert a Hash is an EnumMap, which is an Associative...
20:13 colomon n: sub foo (Hash %h) { say %h; }; foo { one => 1, two => 2, };
20:13 p6eval niecza v19-21-gc86e8e5: OUTPUT«{"one" => 1, "two" => 2}␤»
20:13 colomon oh
20:13 colomon r: sub foo (%h) { say %h; }; foo { one => 1, two => 2, };
20:13 p6eval rakudo efde6e: OUTPUT«("one" => 1, "two" => 2).hash␤»
20:13 colomon Hash %h is a hash of hashes
20:13 colomon if you just want a hash, you either need to say Hash $h or just %h
20:13 sirrobert r: sub foo (%h) { say %h; }; foo { one => 1, two => 2, };
20:13 p6eval rakudo efde6e: OUTPUT«("one" => 1, "two" => 2).hash␤»
20:14 sirrobert right, I keep forgetting that
20:14 sirrobert the % makes it explicit anyway
20:14 sirrobert thanks =)
20:24 mathw Evening
20:25 colomon sirrobert: it's not quite the same.  %h is something like Associative $h...  if you really want a Hash, you need to say Hash $h.  or maybe %h where { %h ~~ Hash }
20:25 colomon mathw: o/
20:25 mathw colomon: o/
20:25 tadzik japhb: I don't have any strong opinion on this, really
20:25 sirrobert colomon:  hmm ok
20:26 tadzik but I think that the usecase of DESTDIR is mostly "I want to bundle this module somewhere"
20:28 colomon sirrobert: but certainly the idiomatic way to do it would be %h unless you have a really good reason to do otherwise.
20:28 sirrobert When I create a deployable app, I want each app to have it's own modules
20:28 sirrobert (to tadzik)
20:28 sirrobert colomon: yeah. that'
20:28 sirrobert colomon: yeah, that's what I settled on
20:29 sirrobert colomon: thanks, btw, I would have been stuck on that for a while =)
20:29 colomon sirrobert: no worries, you're not the first person to make that mistake.  ;)
20:30 sirrobert I like the quote that Perl 6 isn't intended to be a first language, but a last one.
20:30 sirrobert I don't mind the learning curve; it's worth it for the power and elegance.
20:30 sirrobert (hence my use if vim ;)
20:31 sirrobert s/if/of/
20:32 mathw all a language has to do for me is prove that learning curve is worthwhile
20:32 mathw :)
20:32 mathw and then manufacture a couple of days in which to start studying it
20:33 sirrobert Is there a way to execute a method on each object in a list of objects?
20:33 sirrobert like, a good shorthand way
20:33 mathw @list.map: *.method;
20:33 benabik sirrobert: @list>>.method
20:34 sirrobert nice
20:34 sirrobert ooh
20:34 sirrobert two of them =)
20:34 mathw those aren't the same
20:34 sirrobert uh oh... syntax fight
20:34 mathw >>. executes potentially in parallel
20:34 sirrobert that's cool
20:34 mathw .map goes in order
20:34 benabik Which means if .method has side effects, it's better to use .map than >>.
20:35 sirrobert righto
20:35 mathw definitely, unless you know for sure they can happen in any order and simultaneously without making a mess
20:35 benabik nr: my @a = 1,2,3,4,5; @a.map: *.print; say; @a>>.print; say
20:35 p6eval rakudo efde6e: OUTPUT«␤53142␤»
20:35 p6eval ..niecza v19-21-gc86e8e5: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/oip5v4aTv1 line 1:�------> [32mmy @a = 1,2,3,4,5; @a.map: *.print; say[33m�[31m; @a>>.print; say[0…
20:35 benabik Hm.  Right, I should test my demo snippets.
20:35 sirrobert heh
20:36 am0c joined #perl6
20:36 benabik r: my @a = 1,2,3,4,5; @a.map(*.say)
20:36 p6eval rakudo efde6e:  ( no output )
20:37 * benabik expected output there.
20:37 benabik r: my @a = 1,2,3,4,5; .print for @a; say ''; @a>>.print
20:37 p6eval rakudo efde6e: OUTPUT«12345␤53142»
20:38 benabik That's what I meant to demonstrate, even if map isn't cooperating with me.
20:38 sirrobert so my particular case is that I have a hash of objects (as values) and I want to call a method on a set of them (in a particular order)
20:38 sirrobert this is super nice, syntactically:
20:38 sirrobert r: my %h = { a => 1, b => 2, c => 3, }; %h<b a>.say;
20:38 p6eval rakudo efde6e: OUTPUT«2 1␤»
20:38 sirrobert ha!
20:39 benabik That is saying the array that the hash returned.
20:39 benabik r: my %h = { a => 1, b => 2, c => 3, }; %h<b a>.perl.say;
20:39 p6eval rakudo efde6e: OUTPUT«(2, 1)␤»
20:39 sirrobert ohhh!
20:39 benabik Well, the parcel, I guess.
20:39 sirrobert well, then "ha."
20:39 sirrobert =)
20:39 colomon r: my @a = 1,2,3,4,5; @a.map(*.say).sink
20:39 p6eval rakudo efde6e: OUTPUT«No such method 'sink' for invocant of type 'List'␤  in block  at /tmp/iJQEJK4QnZ:1␤␤»
20:39 sirrobert ohhhhhh crud, I'm going to be late to meet my wife for dinner.  bye p6
20:40 mathw bye sirrobert
20:40 benabik o/ sirrobert
20:40 benabik colomon: Oh.  Yet another sink context error?
20:40 colomon I reckon.  hold on
20:41 colomon r: my @a = 1,2,3,4,5; my @b = @a.map(*.say)
20:41 p6eval rakudo efde6e: OUTPUT«1␤2␤3␤4␤5␤»
20:41 benabik colomon++
20:41 colomon r: my @a = 1,2,3,4,5; my @b := @a.map(*.say)
20:41 p6eval rakudo efde6e:  ( no output )
20:41 timotimo is that lazyness in action?
20:41 benabik So >>.method may run out of order but .map(*.method) may never run!  :-D
20:42 benabik timotimo: That's a lazyness bug in action.  :-D
20:42 colomon timotimo: my last example was, yes
20:42 benabik Oh, true.  In that example it's not a bug.
20:42 colomon it's only a bug if you want the side-effects.  ;)
20:42 benabik We need infix:<$!>
20:43 mathw haha
20:43 mathw no we don't
20:43 mathw that one always makes me uncomfortable
20:43 benabik It shouldn't.
20:44 benabik `f $! x` just means be sure you evaluate x before passing it to f.
20:46 mathw yeah, but any use of strictness annotations makes me a bit nervous
20:47 mathw I always feel like I shouldn't have to
20:48 mathw and there are some semantic implications of having seq that are weird. I don't really understand that though.
20:55 benabik In Haskell, $! lets the compiler know "no really, I'm going to need this value eventually".  It can really keep down the space needed for computation.
20:56 tadzik p6rd: releasese
21:08 fridim_ joined #perl6
21:13 [Coke] https://github.com/zag/ru-perl6-book ... a book about perl6 written in pod6, in russian.
21:14 [Coke] but he uses pod6-in-perl5 to build the book.
21:14 bruges joined #perl6
21:17 benabik joined #perl6
21:20 rjbs [Coke]: ;) re: tpf gc email
21:27 benabik joined #perl6
21:39 japhb One of those idle thoughts while waiting for a very slow server to do something: I wonder if doing a Perl/Linux clone with Perl 6 wouldn't be a pretty good way to feel out the weak points in Perl 6's (or our implentations') *nix support ...\
21:39 japhb Just looking at the commands listed in that Perl/Linux screenshot make me think about a lot of fiddly system fiddling bits.
21:40 japhb (Some of course are pretty trivial ... I'm thinking of the ones that aren't.)
21:41 atrodo joined #perl6
21:43 spider-mario joined #perl6
22:14 bluescreen100 joined #perl6
22:21 jeffreykegler joined #perl6
22:23 * moritz in Perl
22:27 moritz and the wifi here is slow. ssh URLs work better than git:// urls
22:28 dalek rakudo/nom: 7aeb019 | moritz++ | src/core/Exception.pm:
22:28 dalek rakudo/nom: spelling
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7aeb019f7e
22:28 dalek rakudo/nom: 8ca98e1 | moritz++ | src/core/Exception.pm:
22:28 dalek rakudo/nom: X::Placeholder::Mainline now inherits from X::Placeholder::Block
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8ca98e1a7e
22:28 dalek rakudo/nom: 92899a2 | moritz++ | src/ (3 files):
22:28 dalek rakudo/nom: s:g/package-type/package-kind/
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/92899a2b59
22:28 dalek rakudo/nom: 13fee9c | moritz++ | src/ (2 files):
22:28 dalek rakudo/nom: make X::Attribute::Undeclared subclass X::Undeclared
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/13fee9c1d5
22:28 dalek rakudo/nom: 9c318f9 | moritz++ | src/ (2 files):
22:28 dalek rakudo/nom: report parameter name in X::Parameter::Default
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9c318f91b7
22:28 dalek rakudo/nom: 1e651ce | moritz++ | src/ (3 files):
22:28 dalek rakudo/nom: awesomify X::Parameter::WrongOrder and  X::Parameter::MultipleTypeConstraints
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1e651cef80
22:28 dalek rakudo/nom: 48e5e46 | moritz++ | docs/deprecations:
22:28 dalek rakudo/nom: Add docs/deprecations
22:28 dalek rakudo/nom:
22:28 dalek rakudo/nom: Authors of star and compiler release announcements may look here for
22:28 dalek rakudo/nom: deprecation notices.
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48e5e46ec8
22:29 dalek specs: fe14bc6 | moritz++ | S32-setting-library/Exception.pod:
22:29 dalek specs: X::NYI is really a class
22:29 dalek specs: review: https://github.com/perl6/specs/commit/fe14bc61f4
22:29 dalek specs: f95bbea | moritz++ | S32-setting-library/Exception.pod:
22:29 dalek specs: [S32::Exception] fix typo
22:30 dalek joined #perl6
22:36 jeffreykegler r: r: my $x = 1 ;  say  42 ?? $x = 43 !! $x = 44;
22:36 p6eval rakudo efde6e: OUTPUT«===SORRY!===␤Confused␤at /tmp/eqp6WzAcIP:1␤»
22:36 jeffreykegler r: my $x = 1 ;  say  42 ?? $x = 43 !! $x = 44;
22:36 p6eval rakudo efde6e: OUTPUT«44␤»
22:36 tadzik moritz: obtw, panda can install p6doc now
22:37 jeffreykegler Sorry about the first.  The second is, according to S03, supposed to be a syntax error.
22:38 jeffreykegler That is how I read the section on "Conditional operator precedence"
22:38 jeffreykegler Btw, if it is not a syntax error, according to S03, 44 is indeed the right answer
22:43 skids joined #perl6
22:45 japhb moritz, don't forget to update doc/type-graph.txt for all of those exception inheritance changes.  ;-)
22:46 japhb moritz++ # docs/deprecations
23:24 whiteknight joined #perl6

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

Perl 6 | Reference Documentation | Rakudo