Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-12-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:12 avar joined perl6
00:20 bonesss joined perl6
00:32 cj_ joined perl6
00:35 * allbery_b rebuilds pugs for the first time in 3 weeks
00:43 * allbery_b sighs --- still no smoke test
00:44 allbery_b what do I have to downgrade to fix "Reference found where even-sized list expected" from Test::TAP::Model?
00:44 allbery_b (or perhaps upgrade form !CPAN?)
00:46 bennymack joined perl6
01:00 ]ramzi[ joined perl6
01:06 hcarty joined perl6
01:15 buetow joined perl6
01:23 TimToady [1]+ Interrupt          timtoady --runloop slow
01:33 tech left perl6
01:34 wolverian heh
01:35 neonse left perl6
01:36 ozo joined perl6
01:51 spo0nman joined perl6
02:02 Salzh joined perl6
02:21 lypanov joined perl6
02:34 araujo joined perl6
02:57 Eidolos joined perl6
03:32 prism joined perl6
03:36 datasieve joined perl6
03:48 luqui joined perl6
03:54 finchel1 joined perl6
04:23 weinig is now known as weinig|snoozel
04:38 nipra joined perl6
04:52 idiotmax joined perl6
05:12 * luqui needs a commit bit...
05:13 TimToady addr?
05:13 luqui [email@hidden.address] (that kind of addr?)
05:13 TimToady yes, hang on...
05:14 audreyt done. :)
05:14 TimToady darn it...  :)
05:14 TimToady too slow finding the bookmark...
05:14 luqui :-)
05:14 audreyt invite.pugscode.org
05:14 audreyt the next time
05:15 TimToady I have a bookmark in my toolbar for it...
05:15 audreyt svn.openfoundry.org mergeback seems to be running fine
05:15 audreyt will do svn.perl.org soon
05:15 xinming audreyt: Could I do setup for svn.perl.org? :-)
05:15 TimToady is that to allow commits anywhere?
05:16 audreyt xinming: not sure Robrt will let you do that
05:16 xinming hmm,
05:16 audreyt TimToady: bidi commit, yes, but need clkao et al for it
05:16 * xinming doesn't know if he has enough knowledge for this
05:16 audreyt will resume one-directional first
05:16 TimToady how does it handle collisions?
05:18 audreyt proxy
05:18 audreyt commit to master first
05:18 audreyt so, atomic
05:18 audreyt no collisions
05:18 audreyt i.e. the proxy commits to master on behalf of the user
05:18 TimToady how does that help to have things more local then?
05:18 audreyt faster checkout and commit
05:18 audreyt potentially federated auth
05:19 TimToady k
05:19 TimToady have you looked at recent syn diffs?
05:19 audreyt I finally set up my new screen via voodoo means
05:19 RHainsworth joined perl6
05:19 audreyt yes, I had, just yesterday
05:19 RHainsworth left perl6
05:19 audreyt the stmt-expr-introducer unification is very nice!
05:20 * luqui just implemented gather as statement_prefix
05:20 TimToady hope so.  it's actually the very dangling syntax I profess to despise.  :)
05:20 luqui and is waiting on his invite...
05:20 audreyt luqui: check spam folder too
05:21 luqui nada
05:21 audreyt ok. sec
05:24 audreyt I typo'ed your addr
05:24 audreyt sent again
05:24 TimToady hah, I shoulda done it anyway...
05:24 audreyt indeed
05:24 luqui ahh, got here in a flash
05:24 audreyt cool
05:25 audreyt need to get lunch soonish
05:25 audreyt but try to commit first and if there's some problems I can fix it in time :)
05:25 TimToady it's customary to add your name to AUTHORS first.  :P
05:26 audreyt welcome aboard! </dejavu>
05:26 luqui commited sucessfully
05:26 svnbot6 r14903 | luqui++ | Implement gather as statement_prefix:<gather> as of S02 r13492
05:26 audreyt wow, quick
05:26 TimToady luqui++
05:26 audreyt luquick++
05:27 audreyt lunch, bbl, hopefully with integrated MO dispatch
05:27 audreyt &
05:28 luqui i didn't implement the whole statement_prefix class, unfortunately, I just hacked in gather
05:28 TimToady details, details...
05:34 luqui is there an architecture for the grammatical classes yet?
05:35 TimToady depends on what you mean by an architecture.  from the standpoint of P6 grammars, it's supposed to be accessed via magic hashes: <%foo|%bar|%baz> that do longest token automagically.
05:36 TimToady from the other end
05:36 TimToady we're just looking for handy categories.
05:36 TimToady haven't really tried to put it all into any kind of matrix or anything.
05:36 TimToady or are you asking about the Haskell approach to them?
05:37 luqui yeah, the third end
05:37 TimToady I don't think pugs does magic hashes yet.
05:37 luqui hmm, does the magic hash approach work for things like infix which have precedence
05:37 luqui I suppose it does given operator-precedence parser
05:37 TimToady according to Patrick with PGE, yes.
05:40 fridim In what proportion will "Complete distributions from the Pugs repository" be integreted as the standard modules ?
05:41 luqui about the proportion of the continuum hypothesis's truth...
05:42 luqui (i.e. I (provably) have no idea ;-)
05:43 fridim :]
05:53 hcarty joined perl6
06:12 luquibot_r14903 joined perl6
06:13 nekokak_ joined perl6
06:13 luqui joined perl6
06:13 spo0nman joined perl6
06:13 jrockway joined perl6
06:13 cj joined perl6
06:13 frankg joined perl6
06:13 stevan joined perl6
06:13 ashleyb joined perl6
06:15 pasteling "luquibot_r14903" at 67.174.183.183 pasted "Pugs build failure" (325 lines, 18K) at http://sial.org/pbot/21821
06:15 luquibot_r14903 joined perl6
06:17 gaal luqui: where's the error?
06:17 luqui don't mind that
06:17 gaal does it just hang?
06:17 gaal ah.
06:17 luqui I am testing evalbot's ability to catch errors
06:18 gaal hello btw.
06:18 luqui hello :-)
06:20 pasteling "luquibot_r14903" at 67.174.183.183 pasted "Pugs build failure" (364 lines, 20.6K) at http://sial.org/pbot/21822
06:21 luquibot_r14903 joined perl6
06:21 luqui ah, that'll do
06:23 luquibot_r14903 joined perl6
06:26 svnbot6 r14904 | luqui++ | Made evalbot detect build errors and nopaste them.
07:18 nipra joined perl6
07:28 scw joined perl6
07:48 elmex joined perl6
08:01 nipra joined perl6
08:28 RHainsworth joined perl6
08:34 RHainsworth left perl6
08:56 iblechbot joined perl6
09:12 devogon joined perl6
09:16 idiotmax joined perl6
09:24 xinming joined perl6
09:37 svnbot6 r14905 | kudra++ | Summary for the week
09:50 DHGE joined perl6
09:54 larsen_ joined perl6
10:04 svnbot6 r14906 | kudra++ | A tutorial for people who might be writing summaries in the future
10:14 foo\ joined perl6
10:14 penk joined perl6
10:20 Tene I can't seem to find this in the docs anywhere... BUILD isn't called when adding a role to a pre-existing object... is there anything that is?
10:21 xinming joined perl6
10:46 mj41_ joined perl6
11:15 baest joined perl6
11:44 lihaitao joined perl6
11:56 DebolazX http://www.rafb.net/paste/results/p1hFXz75.txt <- Just something I spotted with pugs --help
11:56 wolverian DebolazX, good catch. looks like it's in 14906 too
12:05 foo\bar joined perl6
12:05 TimToady joined perl6
12:06 bonesss joined perl6
12:16 elmex joined perl6
12:18 wolverian hm.
12:18 wolverian do I need to be added again to svn.pugscode.org if my last commit was on openfoundry?
12:26 hcarty_ joined perl6
12:31 wolverian damn, make fast really is fast. :)
12:32 nipra joined perl6
12:38 wolverian DebolazX, I have it fixed in my local rep, I just can't commit right now. :)
12:42 araujo joined perl6
12:42 Nei joined perl6
12:44 Nei how do I abbreviate (or write without $_) when 8 <= $_ <= 18 {..?
12:44 wolverian when 8..18 {
12:45 wolverian (but that's integer-precision, I think)
12:45 gaal actually it isn't, though it's all pugs supports right now.
12:45 Nei mhm I tried that but it doesnt seem to work
12:45 wolverian oh. right, it's a Range.
12:46 Nei maybe my pugs is too old
12:46 gaal wolverian: msg me your email please
12:47 wolverian gaal, got it? I don't remember if I'm identified :)
12:47 gaal you should be able to commit + add committers
12:47 wolverian did I have commitbit or did you add it?
12:47 gaal you already had metacommit
12:47 wolverian oh. is the username my email?
12:47 wolverian way too long since I last committed. :)
12:47 gaal remember that logins on invite.pugscode.org are full emails, not username
12:48 wolverian thanks!
12:48 wolverian that's it then
12:49 wolverian I hope I haven't forgotten my password too
12:50 gaal see /msg, your two emails aren't precisely the same
12:53 wolverian let's see if I can do it now
12:54 elmex joined perl6
13:03 iblechbot joined perl6
13:06 araujo joined perl6
13:06 wolverian gaal++
13:07 SCalimlim joined perl6
13:08 DebolazX Hmm.. does perl 6 have some keywords for true and false?
13:08 wolverian ?eval Bool::True
13:08 evalbot_r14906 Bool::True
13:08 wolverian ?eval true 1
13:08 evalbot_r14906 Bool::True
13:08 wolverian ?eval true 0
13:08 evalbot_r14906 Bool::False
13:09 DebolazX Just "True" and "False" worked too. :)
13:09 gaal ?eval ?42
13:09 evalbot_r14906 Bool::True
13:09 * DebolazX tried "true" and "false". :/
13:17 * DebolazX always felt a bit dirty making his own constants for it in perl 5.
13:25 falseep joined perl6
13:26 xinming joined perl6
13:32 elmex_ joined perl6
13:37 lihaitao joined perl6
13:38 TSa joined perl6
13:40 bonesss joined perl6
13:40 kane-xs hmm.. who killed irc.perl.org?
13:44 elmex joined perl6
13:45 xinming kane-xs: ???
13:45 xinming kane-xs: It's accessable
13:45 wolverian the whole of magnet is down for me
13:47 integral try accessing a server directly such as cou.ch, irc.mangband.org, irc.hellyeah.org, irc.sloth.org or blizzard.pobox.com
13:48 elmex joined perl6
13:48 xinming <@mst> yes, it is
13:48 xinming 21:49:35 <@mst> irc.perl.org has a duff box in the round robin dns
13:49 buetow joined perl6
13:55 xinming joined perl6
13:57 ozo joined perl6
14:01 chris2 joined perl6
14:01 xinming joined perl6
14:02 xinming joined perl6
14:08 wolverian RA layer request failed: REPORT request failed on '/pugs/!svn/bc/14906': REPORT of '/pugs/!svn/bc/14906': Compressed response was truncated (http://svn.pugscode.org) aaagh
14:08 lambdabot Title: Perl6 Community Development Server
14:08 wolverian oh, it picks up from where it left. yay
14:33 Coleoid nothingmuch: I'm trying to smoke pugs, and getting hundreds of errors out of TAP::Model.
14:33 Coleoid "reference found where even-sized list expected..."  line 172
14:33 Coleoid Is this expected?
14:38 Coleoid Or anyone who does smoke testing?
14:45 weinig|snoozel is now known as weinig|away
14:45 bonsai joined perl6
14:45 * allbery_b asked about that last night, no response
14:46 allbery_b I have a vague recollection of someone mentioning that some dependency of Test::TAP::Model changed incompatibly, but I don't know which component or which version is needed for things to work :(
14:46 ]ramzi[ left perl6
14:55 Coleoid allbery_b: Thanks, I'll let you know if I figure it out...
15:14 bonesss joined perl6
15:16 bonesss joined perl6
15:17 BooK joined perl6
15:34 stevan_ joined perl6
15:39 prism joined perl6
15:40 lypanov left perl6
15:46 polettix joined perl6
15:49 larsen__ joined perl6
15:51 pbuetow joined perl6
15:54 marmic joined perl6
16:14 nipra joined perl6
16:15 wolverian okay, being paranoid - can anyone else commit?
16:16 wolverian (it's giving me authorisation failed every time.)
16:16 audreyt worksforme.
16:16 svnbot6 r14907 | audreyt++ | * README: Fix trivial typo.
16:17 audreyt goto commitbit.pugscode.org to reset passwd?
16:19 wolverian I did. I'll try it again. gaal even created a new account for me, as I thought I had forgotten my p/w
16:19 wolverian no luck. :(
16:19 wolverian Authorisation failed: MKACTIVITY of '/pugs/!svn/act/c5c71a3a-cf​24-0410-b16e-b9fad886dae2': authorisation failed (http://svn.pugscode.org)
16:19 lambdabot Title: Perl6 Community Development Server
16:20 audreyt are you behid some kind of hostile firewall?
16:20 audreyt /proxy
16:20 wolverian not that I know of :)
16:20 audreyt if so, maybe try https://svn.pugscode.org/
16:21 elmex_ joined perl6
16:22 wolverian no luck. on svk mirror --relocate I got: Authorisation failed: PROPFIND request failed on '/': PROPFIND of '/': authorisation failed (https://svn.pugscode.org)
16:22 audreyt ew
16:23 audreyt lemme check
16:23 wolverian no panic. btw, is the darcs mirror pushable?
16:23 audreyt no, not yet
16:25 nipra joined perl6
16:27 audreyt wolverian: try again
16:27 wolverian which one? :)
16:27 audreyt commit, "wolverian"
16:28 wolverian oh.
16:28 audreyt also you seems to be usig your mail as the second account to commit
16:28 audreyt that wouldn't work
16:28 wolverian right.
16:28 wolverian I was confused.
16:28 wolverian sigh. :)
16:28 wolverian thanks for setting me straight.
16:28 audreyt so it worked? :)
16:29 wolverian I think so!
16:29 * wolverian looks at svnbot6
16:29 svnbot6 r14908 | wolverian++ |  r4@pupu:  wolverian | 2006-12-17 18:09:46 +0200
16:29 svnbot6 r14908 | wolverian++ |  Small refactoring to Help.hs, and move the backends line up, spotted by DebolazX++
16:29 audreyt woot
16:29 wolverian oops, forgot verbatim (again)
16:29 * audreyt goes happily back to sleep
16:29 wolverian audreyt++
16:29 audreyt wolverian++
16:33 nperez joined perl6
16:51 elmex joined perl6
17:03 Belaf joined perl6
17:12 bones_ joined perl6
17:29 gnuvince joined perl6
17:29 svnbot6 r14909 | wolverian++ | Pugs is -Ofun under the benevolent typechecker...
17:29 wolverian (I added banks's culture series to READTHEM)
17:42 fridim karma wolverian
17:43 wolverian did you mean @karma?
17:43 fridim To know how many ++ you've got :)
17:45 wolverian @karma wolverian
17:45 lambdabot You have a karma of 3
17:45 wolverian hmm.
17:45 wolverian @karma audreyt
17:45 lambdabot audreyt has a karma of 41
17:45 wolverian heh.
17:50 meppl gute nacht
17:54 neonse joined perl6
18:18 norageek joined perl6
18:19 Psyche^ joined perl6
18:27 nothingmuch joined perl6
18:35 Psyche^ is now known as Patterner
18:50 stevan_ is now known as stevan
19:09 miyagawa joined perl6
19:13 elmex joined perl6
19:53 rafl__ joined perl6
19:57 rafl__ is now known as rafl
20:31 fridim @karma fridim
20:31 lambdabot You have a karma of 0
20:31 fridim fridim--
20:31 fridim @karma fridim
20:31 lambdabot You have a karma of 0
20:32 fridim of course, i can't.
20:32 fridim perl6++
20:32 wolverian heh
20:32 fridim OO++
20:33 fridim what is the reason to have not done :   for my $i in @alist { }   ?
20:34 wolverian probably it was felt that the array should be mentioned first.
20:34 prism joined perl6
20:36 * DebolazX discovers the :
20:37 DebolazX I.. I can use whitespace again. :O
20:38 Aankhen`` joined perl6
20:41 DebolazX $foo.bar: 1,2,3; is actually a syntax I've wanted. So it was sort of a weird experience that I just discovered while reading S12 that you actually can do that..
20:41 prism joined perl6
20:48 bones_ is now known as bonesss
20:54 finchely joined perl6
21:03 awwaiid joined perl6
21:17 Ovid joined perl6
21:20 Ovid joined perl6
21:21 Ovid Anhyone here?
21:22 Ovid left perl6
21:23 dduncan joined perl6
21:24 Ovid joined perl6
21:24 Ovid Anyone listening right now?
21:27 allbery_b fsvo
21:27 Ovid What's 'fsvo'?
21:27 allbery_b 'for some value of'
21:27 Ovid Ah.
21:28 luqui joined perl6
21:28 * allbery_b is actually tracking #haskell and cognet:#lopsa and occasionally peeking in here when xchat2 says there's been activity
21:28 Ovid Well, if anyone is listening and knows the answer, I'm curious as to why the following is only printing the letter "h".
21:28 Ovid my @array = <a b c d e f g h i j k>;
21:28 Ovid @array.splice(3, 5).perl.say;
21:28 lambdabot Unknown command, try @list
21:30 luqui Ovid, looks like a bug to me
21:30 luqui looks like a context thing
21:31 luqui ?eval my @a = <a b c d e f g h i j k>;  @a.splice(3,5)
21:31 evalbot_r14909 "h"
21:31 Ovid I was thinking that, but I can't find where the exact behavior of splice() is documened for Perl 6.  If it's returning a list, am I only calling 'perl.say' on the first element?
21:31 luqui ?eval my @a = <a b c d e f g h i j k>;  my @b = @a.splice(3,5);  @b
21:31 evalbot_r14909 ["d", "e", "f", "g", "h"]
21:32 luqui ought to be documented in docs/Perl6/Spec/Functions.pod
21:33 Ovid Thanks!
21:33 luqui but return values are not documented there :-)
21:33 luqui darn
21:34 Ovid Yeah, reading through it now.
21:36 luqui it seems like the behavior we're seeing is explicitly written
21:36 Ovid Hmm, at least there's a decent sized test for it in t/builtins/array/splice.t.  
21:37 luqui Prim.hs:1427: ifListContext (return $ VList vals') (return $ last (undef:vals'))
21:38 GeJ Gorr morning all
21:38 Ovid Morning.
21:39 Ovid luqui:  I don't know what that means.
21:39 luqui it says "if we're in list context, then return the spliced values; if we're in scalar context, return the last of such values"
21:39 luqui (or undef if there are none)
21:41 Ovid Ah, so that's scalar context because we're calling the perl() method.  What would be a reasonable fix?
21:41 luqui well, the fix is easy, if it should be fixed...
21:41 Ovid Er, more importantly, what's the exact behavior which should be expected here?
21:41 luqui unspecced, but the test suite thinks it's working just how it should
21:42 luqui but it isn't working the way I think it should ;-)
21:42 Ovid Agreed :)
21:45 luqui so do you think it should return a reference to the list in scalar context?
21:46 Ovid It would either be a reference to a list or a count, I should think.  I think a reference to a list would be more appropriate and would fix this "almost" bug.
21:46 luqui ref makes more sense, since if you put it in numeric context you'll get a count
21:47 Ovid Ah, right.  I forgot about numeric context.  (Trying to reread a bunch of synopses right now as I'm so far behind in my Perl 6 knowledge).
21:51 svnbot6 r14910 | luqui++ | Specced the return value of splice.  @Larry.check xx 2.
21:51 Ovid I also have to say that the Perl 5 behavior of returning the last item from a list while in scalar context is just about useless (though I understand why it's done), so I'd be happy to see that behavior go away in Perl 6.
21:52 Ovid Luke: You specced that behavior.  Did you write a test?  If not, I'd be happy to take a stab at it.
21:52 luqui go ahead.  I'll work on the implementation
21:52 ingy hola
21:52 luqui hola ingy
21:52 Ovid Hi ingy.
21:52 ingy hi luqui
21:52 ingy and Ovid sir
21:53 ingy Kwiki should soon have plugins written in Perl 6
21:53 luqui :-)
21:54 Ovid luqui:  I do notice that the tests explicitly say that in scalar context it returns the last element.  Does this imply that this was a desired feature, or did someone make the tests fit the current behavior?
21:55 luqui I'm thinking that it was desired (probably because that was perl5's behavior).  So I changed it, and asked to get smacked if I was wrong :-
21:55 luqui :-)
21:59 Ovid Er, just to make sure I'm not smoking crack, is the following test valid?
21:59 svnbot6 r14911 | luqui++ | Implemented listref return value for splice.
21:59 Ovid @a  = ('red', 'green', 'blue');
21:59 Ovid is( splice(@a, 1, 2), [<green blue>],
21:59 Ovid  "splice() in scalar context returns an array reference");
21:59 lambdabot Maybe you meant: all-dicts arr ask . v
22:01 luqui I think that will work... so long as is() takes a scalar as its first argument
22:01 luqui you can commit, right?
22:02 Ovid There was a test already there which verified "splice() in scalar context", so I just altered the second argument.  And yes, I have a commit bit, but I haven't used it in a while, so we'll see :)
22:05 Ovid My commit bit appears to have been flipped :(  (or I have my password wrong)
22:07 jrockway Ovid: i think you can reset your password via the CommitBit interface, but I could be wrong
22:07 jrockway it also shows a list of committers that it knows about, so check if you're on it :)
22:08 Ovid Where would I find that?
22:09 luqui Ovid, what's your email
22:09 jrockway it's at commitbit.pugscode.com
22:09 luqui (pm if you like)
22:09 jrockway you're on the list, but there's no password reset interface :/
22:10 Ovid I see now. There was a link Audrey sent me to change my password, but I get redirected to http://svn.pugscode.org:9999​/error/let_me/invalid_token
22:10 luqui hm,
22:11 luqui I'll try again
22:20 Debolaz joined perl6
22:26 devogon joined perl6
22:28 luqui does anybody know how to relocate to the new repo using svn?
22:28 Ovid Anyone know subversion?  I'm getting the following error when I try to relocate the repository:
22:28 Ovid pugs $ svn switch --relocate http://svn.openfoundry.org/pugs http://svn.pugscode.org/pugs/
22:28 Ovid subversion/libsvn_client/relocate.c:54: (apr_err=195009)
22:28 Ovid svn: The repository at 'http://svn.pugscode.org/pugs' has uuid 'c213334d-75ef-0310-aa23-eaa082d1ae64', but the WC has '12242aa7-dc21-0410-817b-c41c31cd50c7'
22:29 lambdabot Title: Revision 14911: /
22:29 Tene Hey, luqui did you know that on IRC you can associate a string of text with a channel.
22:29 Tene They call it a "topic"
22:29 Ovid :)
22:29 luqui Tene, did you know that the topic is talking about svk, and we are talking about svn
22:29 Tene It's often used to put useful information in an easily-accessible place.
22:29 Tene luqui: look closer.
22:30 Ovid The topic says 'svn switch ...", not svk.
22:30 luqui duh
22:30 Tene What are the first three letters?
22:30 luqui did it used to talk about svk?
22:30 Tene Nope.
22:31 luqui okay.  well, I was really asking on behalf of ovid
22:33 luqui so, do s:g/luqui\N*$// on the last 20 lines or so
22:54 Ovid Whee!  Looks like I have commit access again.
22:54 svnbot6 r14912 | Ovid++ | Test that splice in scalar context return an array reference.
22:54 svnbot6 r14912 | Ovid++ | This is for a bugfix by luqui where the following would only print the last
22:54 svnbot6 r14912 | Ovid++ | element of the splice:
22:54 svnbot6 r14912 | Ovid++ |  @some_array.splice(3,7).perl.say;
22:58 Ovid OK, heading to bed.  Night all!
23:17 Debolaz What was the motivation behind an operator like =+<<? It seems more or less just to prove that it can be done, $foo += sum @bar; seems more readable without any obvious disadventages..
23:19 luqui where do you see an operator like =+<< ?
23:21 jrockway << doesn't imply hyper in this case? although i would probably write my $sum = @number>>.sum
23:21 luqui oh, I suppose you mean +=<< ?
23:22 jrockway actually that doesn't make sense
23:22 dduncan So are there GHC 6.6 binaries available for BSD now?  I didn't see any mentioned at http://haskell.org/ghc/download_ghc_66.html , but audreyt said that was a precondition for removing 6.4.x support from Pugs, and said support was removed today.
23:22 lambdabot Title: GHC: Download version 6.6
23:22 luqui that makes sense if @number is an array of arrays
23:22 Debolaz Actually, I just read it in "Perl 6 Now".
23:22 jrockway really depends on how smart "sum" is
23:22 jrockway yeah
23:22 Debolaz It just occured to me that the book is a bit outdated to the current development status.
23:22 jrockway sum (a,b,c,d) = sum(sum(a,b),sum(c,d))
23:23 jrockway but that's not what >> does
23:23 dduncan afaik, sum in Perl 6 is spelled [+]
23:23 jrockway right, i'm just being explicit
23:23 dduncan in other words, reduce meta-operator on +
23:24 jnthn So $sum += [+] @values; is the same as $sum +=<< @values; ?
23:25 luqui woah, pugs has gotten smarter
23:25 Debolaz Perl 6 Now has this explicit example that "$count =+<< @things" is the exact (in terms of results) equivalent of "for (@things) { $count += $_ }"
23:25 luqui ?eval sub infix:<@@> ($a, $b) { $a + $b };   [@@] 1..10
23:25 evalbot_r14912 55
23:26 jnthn I'm sure that should be +=<< rather than =+<<
23:26 luqui Debolaz, well, perhaps, except order is not guaranteed.  So if your + is not commutative and associative then it's not necessarily the same..
23:26 luqui but then you shouldn't call things that aren't commutative and associative "+"
23:27 jrockway the =+<< makes more sense
23:27 Debolaz luqui: Just quoting the book.
23:27 jrockway since $sum is not affected by =+<< , hopefully
23:27 jrockway maybe we need +=+<< :)
23:27 luqui =+<< is two operators isn't it?
23:28 luqui @y =+<< @x   # numify all elements in x and assign to y
23:28 lambdabot Maybe you meant: yarr yhjulwwiefzojcbxybbruweejw yow . v
23:28 luqui lambdabot is too smart.  that's exactly what I meant!
23:29 jnthn luqui: That's what I was seeing.
23:29 luqui oh, wait
23:29 jnthn I'd expect +=<< to be adding each thing in the array to whatever is to the left hand side...
23:29 luqui we've flip-flopped on this too much
23:30 jnthn Yeah, I know hypers have changed a bit...I may be out of date.
23:30 luqui but +=<< isn't an operator (or at one point it wasn't); it should be >>+=<<
23:30 bsb joined perl6
23:30 jrockway why both?
23:30 jnthn Aha, since you got an array either side. That's sane.
23:30 luqui because += is binary
23:30 jrockway isn't the >>(something<< for lists on each side?
23:30 jrockway yeah
23:30 luqui well, last I was here (which was a while ago), it didn't matter which was on which side
23:30 jrockway hehe
23:31 luqui binary operators get >><<, unaries get >> and <<
23:31 * jnthn thought he understood hypers once :-)
23:31 Psyche^ joined perl6
23:31 jrockway it makes sense when @list2 = @list1>>.method
23:31 jrockway after that...
23:31 GeJ dduncan: audreyt said that 6.4 can be used to bootstrap 6.6. Writing a PR to FreeBSD to upgrade ghc is in my TODO list, but you can probably do it too.
23:32 luqui ?eval my @y = (1..5);  say =@y;  say =@y;  say @y;
23:32 * Debolaz uses 6.6 on FreeBSD. Built manually though.
23:32 dduncan well, I don't use BSD myself, but I understood that other people did, and for their sake the 6.4 support removal was being delayed
23:32 evalbot_r14912 OUTPUT[12345␤12345␤12345␤] Bool::True
23:33 luqui ?eval my @y = (1..5);  say +=@y;  say +=@y;  say @y;
23:33 evalbot_r14912 OUTPUT[␤] Error: Can't modify constant item: VBool True
23:33 luqui ?eval my @y = (1..5);  say +(=@y);  say +(=@y);  say @y;
23:33 evalbot_r14912 OUTPUT[1␤2␤345␤] Bool::True
23:33 luqui ?eval my @y = (1..5);  say +(=@y),";";  say +(=@y),";";  say @y;
23:33 evalbot_r14912 OUTPUT[1;␤2;␤345␤] Bool::True
23:34 luqui ?eval my @x = 1..3;  my @y = 4..6;  @x >>+<< @y
23:34 evalbot_r14912 (5, 7, 9)
23:34 luqui ?eval my @x = 1..3;  my @y = 4..6;  @x >>+=<< @y
23:34 evalbot_r14912 Error: ␤Unexpected ">>+=<<"␤expecting operator
23:34 luqui hmm
23:34 luqui ?eval my $x = 0;  my @y = 4..6; $x +=<< @y
23:34 evalbot_r14912 Error: ␤Unexpected end of input␤expecting block, "\\", variable name, ">>" or "<<"
23:34 luqui oh
23:35 luqui +=<< is parsed as += <<  (where the << opens a quote)
23:35 GeJ dduncan: Ok, well, I'll try to find some time this week
23:47 Psyche^ is now known as Patterner
23:57 buetow joined perl6

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

Perl 6 | Reference Documentation | Rakudo