Camelia, the Perl 6 bug

IRC log for #perl6, 2012-03-12

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:18 havenn joined #perl6
00:29 masak 'night, #perl6
00:33 colomon o/
00:33 [Coke] o/
00:35 sorear o/
00:44 * colomon should be helping [Coke] instead of trying to figure out continued fractions...
00:44 sorear I can help you figure out continued fractions, maybe
00:45 [Coke] eh. no worries, I shouled be dayjobbing.
00:47 Psyche^ joined #perl6
00:51 mjreed1 joined #perl6
01:06 alester joined #perl6
01:10 tokuhirom joined #perl6
01:11 colomon http://sf-fantasy.suvudu.com/2012/02/ca​ge-match-2012-the-bracket-revealed.html
01:11 colomon errr, huh
01:11 colomon Method 'eager' not found for invocant of class 'Integer'
01:12 colomon that's the correct paste
01:12 colomon script works fine in niecza
01:13 colomon hmmm, guess I should get around to updating my nom
01:20 scott_ joined #perl6
01:34 colomon sorear: do you know any references for basic continued fraction math other than that mjd talk?
01:37 sorear real references?  I'm not sure
01:37 sorear I think I might have seen it first in HAKMEM
01:38 colomon that sounds familiar.
01:39 * colomon has never actually looked at hakmem...
01:39 colomon 101B
01:41 colomon hmmm, reference to Knuth
01:43 colomon volume 2, page 356 in the third edition
01:45 icwiener joined #perl6
01:50 sporous joined #perl6
01:54 sisar joined #perl6
02:02 thou joined #perl6
02:23 HPAdministrators joined #perl6
02:30 abercrombie joined #perl6
03:01 [Coke] sorear: huh. kernel_task was mysteriously pegging multiple cores on my box, which is why everything was so slow.
03:02 [Coke] rebooted, things are much better now
03:04 orafu joined #perl6
03:04 sorear yay, closure
03:05 [Coke] (supporting evidence: enough thing are going to turn the fan on now.)
03:14 wolfman2000 joined #perl6
03:19 envi_ joined #perl6
03:26 [Coke] aaargh. after all that mess, the ghc you get from macports is 6.10.4; feather has 7.4.1
03:38 scott__ joined #perl6
03:39 geekosaur yep
03:40 geekosaur that said, even 7.0.4 has changes that seem to break Pugs as of the version I tried to install last week, so 6.10.4 might be just its speed
03:41 geekosaur (also note 7.4.1 causes its own breakages; just had to help another new Haskeller deal with the change to Num's superclasses a couple minutes ago...)
03:43 [Coke] I've been doing my pugs spectest runs/fudging against the version on feather, so I know that one works.
03:44 sorear wait, wait, what?
03:44 sorear They *changed* _Num_'s /superclasses/?
03:44 geekosaur Eq and Show went away, yes.  change to appear in the next Haskell standard
03:45 sorear back in my day those were the only superclasses
03:45 sorear I guess there might have been Ord too, been a while
03:45 geekosaur I think they might still have been, before their removal
03:45 geekosaur Ord wasn't there since it's inapplicable to Complex
03:46 sorear Ord is useful if you want to form the type Map Complex a
03:47 sorear or have people stopped using Map, too?
03:48 geekosaur there's an off-and-on argument over that issue, actually; some discussion of splitting Ord into a partial-order class, a fully ordered class, and an internal order class useful for things like Map
03:48 birdwindupbird joined #perl6
03:51 [Coke] \o/ I have a working pugs on OS X.
03:52 sorear geekosaur: and a well-ordering class, and an argument over whether Haskell should take the AoC? :)
03:53 [Coke] sorear: ok, now this is thinking really hard:
03:53 [Coke] mono run/Niecza.exe -c test.pl
03:53 sorear typical runtime 2 mins
03:55 [Coke] ah, there it goes. some tests failed:
03:55 [Coke] https://gist.github.com/2019647
03:56 [Coke] also, when I type "make test" again, it runs the -c line again - shouldn't that be cached?
03:57 [Coke] wow. my checkout was severely messed up.give me a minute.
04:00 sorear I haven't ever had a use for having the -c line be cached
04:01 [Coke] hee. I did a realclean and rebuild, and everything completed in virtually no time, no errors in make test.
04:01 [Coke] presumably all a result of the earlier craziness.
04:01 sorear I wonder how messed up your checkout was to cause compile steps to take hours and yet only fail two tests
04:03 [Coke] length of compilation was due to that kernel_task issue. (plus I was installing ghc at the same time, which was similarly delayed)
04:04 [Coke] Running a spectest run now with TEST_JOB=5 to time it.
04:06 sorear might wanna check if the ghc build also borked...
04:09 [Coke] no, pugs works fine.
04:09 [Coke] the builds done via ports were ok-but-slow.
04:10 Gruber joined #perl6
04:10 benabik_ joined #perl6
04:11 yeltzooo joined #perl6
04:16 [Coke] n: say 764.87/60
04:16 p6eval niecza v15-4-g1f35f89: OUTPUT«12.747833333333332␤»
04:17 [Coke] 12m for a full spectest run is pretty good. (though when I run it on feather, I'm simultaneously running all 3 implementations)
04:17 [Coke] also, a lot of random failures on OS X:
04:17 [Coke] https://gist.github.com/2019760
04:18 [Coke] (those may be expected)
04:35 sorear a lot of those look like subprocess tests.
04:35 sorear do you have mono in $PATH?
04:36 [Coke] aye.
04:37 * japhb rubs his eyes and comes up for air from a marathon study session on Eiffel, SCOOP, Erlang, AMQP, AnyEvent, Coro, ... damn my desire to understand things before hacking on them!
04:37 japhb How are things in the land of JFDI?
04:40 lestrrat joined #perl6
04:44 sorear not much better
04:46 japhb sorear: sorry to hear that.  :-/
05:31 lestrrat joined #perl6
05:31 birdwindupbird joined #perl6
05:38 brxue joined #perl6
05:52 kaleem joined #perl6
05:58 drbean joined #perl6
06:00 NamelessTee joined #perl6
06:01 localhost joined #perl6
06:24 moritz o/
06:55 wtw joined #perl6
07:04 tadzik HPatMoR chapter!
07:07 moritz \o/
07:25 DrEeevil hrm. can anyone tell me what the canonical parrot bugtracker is supposed to be now?
07:25 tadzik github
07:25 DrEeevil oh dear :(
07:26 DrEeevil gah. hates.
07:26 * DrEeevil makes note to try again in now +48h when the github anger is dissipated
07:28 tadzik ooc, what makes you hate GH so much?
07:31 DrEeevil well, mostly their lack of http
07:32 DrEeevil but apart from that ... the user interface values shiny over everything else, and so many people use it, thus I have to interact with it more than I want
07:32 Timbus i like bitbucket a lot more
07:33 Timbus side by side diffs <3
07:33 Timbus github probably does that by now
07:36 DrEeevil just give me a 404 on file not found
07:37 DrEeevil not a text 404 in a http 200 or such aargh *stabstabstab*
07:37 * DrEeevil glares at sourceforge
07:54 jnthn morning, #perl6
08:00 moritz \o
08:01 jnthn Ah, my final $dayjob assignment before vacation. \o/
08:07 jnthn Wow. Half of my students already came to another of my courses.
08:07 scott_ joined #perl6
08:19 birdwind1pbird joined #perl6
08:25 dbrx joined #perl6
08:27 Vespakoen joined #perl6
08:46 mj41 joined #perl6
08:58 moritz high retention rate :-)
09:26 Vespakoen joined #perl6
09:29 am0c joined #perl6
09:36 mishin joined #perl6
09:37 mishin Hi, Perl6, while I read http://rakudo.org/how-to-get-rakudo/ I found that link http://rakudo.org/how-to-get-rakudo/ is wrong, what the matter?
09:37 mishin http://github.com/rakudo/rakudo/tree/master
09:37 mishin I mean this link
09:38 jnthn Hmm....wonder why it has the tree/master part in the link
09:38 moritz http://rakudo.org/how-to-get-rakudo-nom/ is the up-to-date instructin page
09:38 moritz we should synchronize the two, or something
09:41 jnthn Or just remove the old one
09:41 jnthn and rename the new one
09:45 * moritz fixed the obvious out-of-date-ness
09:46 * moritz adds a link to the debian packages
09:47 jnthn moritz++
09:47 dakkar joined #perl6
09:47 moritz ooh, I know a great GSOC project
09:47 moritz MiniDBI
09:48 moritz and backends for mysql, postgres and sqlite
09:48 am0c joined #perl6
09:50 jnthn ooh
09:51 jnthn Yes, Zavolaj can likely handle or be made to handle all of those now
09:51 * eiro thinks that biblio framework could be a nice GSOC too (and can be mentor on it)
09:53 moritz maybe, though a workding DB connection would be a much bigger benefit to the Perl 6 community
09:54 moritz jnthn: can I enter you as a mentor for MiniDBI?
09:55 eiro sureù!
09:56 jnthn moritz: sure
09:56 jnthn I'll be about most of the summer, so mentoring is fine
09:56 awoodland_ joined #perl6
10:01 envi_ joined #perl6
10:02 envi_ joined #perl6
10:02 moritz added to http://wiki.enlightenedperl.org/gsoc2012/ideas
10:02 moritz search for "Database connection modules"
10:03 moritz rafl: it would be really helpful to be able to link to sections http://wiki.enlightenedperl.org/gsoc2012/ideas
10:05 rafl moritz: you can add a TOC at the beginning of the document, i believe
10:05 rafl with that you should also get anchors on the different headings
10:06 * rafl tries it
10:07 rafl moritz: http://wiki.enlightenedperl.or​g/gsoc2012/ideas#Rakudo_Perl_6
10:07 moritz rafl++
10:07 moritz thanks
10:08 moritz jnthn: is that section on Multiple Dispatch Optimization in Rakudo still up-to-date and of interest?
10:08 moritz seems like we are doing a good bit of that already
10:11 jnthn moritz: No, much of what it suggests is done already
10:11 jnthn There are still opportunities to do optimization stuff
10:11 moritz jnthn: should I just delete that item?
10:11 * moritz is a bit angry at himself. He had another good gsoc idea, didn't write it down, and promptly forgot it
10:12 jnthn moritz: yes, and I'll see if I can think up something to replace it
10:13 moritz done
10:16 pernatiy joined #perl6
10:24 * [Coke] cannot remember the last time he pulled an allnighter.
10:24 snearch joined #perl6
10:28 masak antenoon, #perl6
10:29 moritz \o masak
10:29 * moritz wonders if he should distract masak right away, or wait until masak reads the backlog
10:29 masak the latter. :)
10:29 masak my capacity for being distracted is always limited when I'm at $dayjob.
10:29 * moritz waits
10:30 masak all appearances nonwithstanding :0
10:30 masak :)
10:43 masak a little ditty: https://gist.github.com/2021108
10:44 masak someone could make a Rosetta Code page out of that program ;)
10:44 snearch joined #perl6
10:44 moritz nom: https://gist.github.com/2021108 a b c
10:44 p6eval rakudo b13c51: OUTPUT«===SORRY!===␤Confused␤at /tmp/4RmX6JgLjQ:1␤»
10:46 masak er. I wrote it with numbers in mind.
10:46 masak hence infix:<==> at line 10.
10:47 masak I guess it could be infix:<===> and the thing would work for any type.
10:47 moritz p6eval doesn't know how to pass command line arguments to gists anyway
10:47 masak no, but in retrospect that's quite a neat idea.
10:47 moritz we just need to be careful to not allow injection of meta chars into the command line
10:50 masak OMG HPMoR!
10:51 moritz distraction accomplished!
10:51 masak the rest of the day suddenly turns into one big exercise in $dayjob discipline!
10:53 masak [Coke]: wait, you pulled an allnighter?
10:57 lestrrat joined #perl6
10:59 [Coke] masak: aye. :(
11:01 * masak hugs [Coke]
11:01 * moritz observes that hugme is still there. literal++ for helping me fix the rejoin
11:01 masak hugme: hug [Coke]
11:01 * hugme hugs [Coke]
11:05 masak in Perl 6, given a string how do I ask "does this string represent an Int"?
11:05 masak I guess `$s.Int.Str eq $s` is a good start...
11:06 moritz well
11:06 moritz if we were consequent, it would be $s.Int !~~ Failure
11:07 moritz but in rakudo the case of not finding any leading digit simply returns 0 (and doesn't fail), because that's what the test suite wants
11:08 shinobicl_ joined #perl6
11:09 masak shorter version: https://gist.github.com/2021108
11:09 masak using 'a b c' won't work, I realized, because the elements are also used as (1-based) indices.
11:09 masak so I left it as being integer-specific.
11:10 masak I would like to require the arguments to be integers; hence the question.
11:11 bbkr joined #perl6
11:13 masak http://www.modernperlbooks.com/mt​/2012/03/loaded-for-werewolf.html -- nice one.
11:13 masak I have this feeling when using Moose, too.
11:14 shinobicl_ left #perl6
11:14 masak and yet I feel I'm only scratching the surface of what it can do.
11:14 masak MOPs are wonderful.
11:39 bbkr Good day P6 :) What should I do to include JSON::RPC in Star release? How licensing works in such case - does module "inherits" Artistic 2.0 (which is my choice also) or should I place license file separately in my repo?
11:54 daxim joined #perl6
12:06 alim joined #perl6
12:12 lateau joined #perl6
12:19 mdupont joined #perl6
12:23 masak an improved version, now with input validation and better sorting: https://gist.github.com/2021108
12:23 bluescreen10 joined #perl6
12:25 moritz bbkr: there's no license inheritance. Putting a LICENSE file into your project is a good idea.
12:26 bbkr moritz: thanks
12:29 mdupont Rakudo failed to compile on my amd athalon overnight... more than 6 hours.
12:30 moritz mdupont: which rakudo have you tried to compile? latest version from git?
12:30 mdupont yes
12:31 moritz mdupont: how much RAM do you have available, and how did it fail?
12:31 mdupont that one part where it said be patient. i lost it
12:31 mdupont i think it is 1gb
12:31 moritz that's probably not quite enough :(
12:31 mdupont and it did not fail, it failed to finsish overnight
12:31 moritz it has probably swapped like mad
12:31 moritz that step takes about 3 to 4 minutes on my machine
12:31 mdupont alles klar... it would be nice to have some binaries for older machines to test with.
12:32 moritz agreed
12:32 mdupont is there a build server for the project btw?
12:32 moritz problem is, parrot isn't relocatable right now
12:32 moritz and thus rakudo isn't either
12:32 mdupont i read about debian packages, i was going to try and port them over to ubuntu
12:33 moritz so you need to settle for an installation prefix once, and then can't change it :(
12:33 mdupont eye see
12:33 mdupont :D
12:33 mdupont well, I guess it would be have to be /usr/local/bin
12:33 mdupont i could live with that.
12:33 mdupont or just put it in a chroot
12:34 mdupont that is relocatable :D
12:34 moritz :-)
12:34 moritz well, that's something I could try
12:34 mdupont anyway, thanks.
12:34 mdupont maybe a perl6 vm
12:34 mdupont or image
12:34 moritz though right now I don't have access to a machine where I could do it
12:34 timotimo how does that work? ++«%handled{@cycle} - what's the << doing there?
12:34 mdupont i will try and compile it on the gcc build farm
12:34 mdupont they have alot of resources.
12:35 moritz timotimo: it applies the ++ to every element
12:35 colomon woah.... can't build rakudo.  :(
12:35 masak timotimo: it distributes the prefix:<++> on all the elements.
12:35 colomon more specifically, can't build parrot?
12:35 timotimo ah, interesting
12:35 timotimo so it's the same as >>., but in reverse
12:35 masak timotimo: compare with @a <<+>> @b
12:36 masak er, @a >>+<< @b
12:37 mdupont so what is this rumor about a p5 translator, i could not find one...
12:39 timotimo i don't know most of the stuff used in that: "gather for" and two fors in one line with a block (that part probably belongs to the gather), rotate, which is probably a method on lists, ...
12:39 masak mdupont: there isn't a p5 translator... yet.
12:39 mdupont ok thanks. is there any code from larry to try out?
12:39 masak timotimo: 'gather' works with 'take' to build a list without giving it an array name.
12:39 moritz nom: say <a b c d e>.rotate(2)
12:39 p6eval rakudo b13c51: OUTPUT«Method 'rotate' not found for invocant of class 'Parcel'␤  in block <anon> at /tmp/_EJwe5zJYX:1␤␤»
12:39 mdupont i saw his google talk on that.
12:39 moritz nom: say <a b c d e>.list.rotate(2)
12:39 p6eval rakudo b13c51: OUTPUT«c d e a b␤»
12:39 masak hm, Parcel should probably have a .rotate...
12:40 moritz aye
12:40 masak timotimo: 'gather for' is just the sum of its part, a 'gather' with a 'for' loop in it.
12:41 masak timotimo: I tried to remove one of the 'for's on the line, but I think I need both, actually. one is for looping on all the sorted elements, the other is for looping on @p
12:41 timotimo is gather more than just eager evaluation?
12:41 masak yes.
12:41 masak it's lazy evaluation, but that isn't used in this code.
12:42 masak nom: constant @ones = gather for 0..* { take 1 }; .say for @ones[^5]
12:42 p6eval rakudo b13c51: OUTPUT«1␤1␤1␤1␤1␤»
12:42 timotimo ah, right, what does ^@cycle mean?
12:42 masak it's short for 0..@cycle, which is the same as 0 .. +@cycle
12:42 timotimo ah
12:42 masak er, 0 ..^ +@cycle
12:43 moritz nom: my @cycles = 1, 2, 5; say (^@cycles).perl
12:43 p6eval rakudo b13c51: OUTPUT«0..^3␤»
12:43 masak so skip the last elem.
12:43 timotimo right
12:43 moritz nom: my @cycles = 1, 2, 5; say (^@cycles).list
12:43 p6eval rakudo b13c51: OUTPUT«0 1 2␤»
12:45 JimmyZ joined #perl6
12:45 colomon niecza: my @cycles = 1, 2, 5; say (^@cycles).list
12:45 p6eval niecza v15-4-g1f35f89: OUTPUT«0 1 2␤»
12:45 colomon std: my @cycles = 1, 2, 5; say (^@cycles).list
12:45 p6eval std 1ad3292: OUTPUT«ok 00:01 113m␤»
12:46 masak pugs: my @cycles = 1, 2, 5; say (^@cycles).list
12:46 p6eval pugs b927740: OUTPUT«012␤»
12:46 * timotimo pokes the perl interpreter at a few more things new to him
12:46 masak Pugs doesn't .gist lists yet. :)
12:46 JimmyZ irclog is down ?
12:47 masak mdupont: well, there's MAD in Perl 5, written by Larry. allegedly quite bit-rotten by now.
12:47 moritz JimmyZ: what makes you think so?
12:47 mdupont thanks masak
12:47 masak mdupont: there's also STD.pm6 and STD5.pm6
12:47 masak Perl 6 grammars for Perl 6 and Perl 5, respectively.
12:47 mdupont i will take a look at that, i would like to try starting to port some code over. thanks
12:47 JimmyZ moritz: I can't open it
12:47 masak the latter is incomplete.
12:48 mdupont so you have a p5 grammar written in p6
12:48 masak a partial one, yes.
12:48 mdupont interesting, thank you. I will find some time to look at this .
12:48 moritz JimmyZ: wfm
12:48 masak mdupont: the easiest way to learn p5->p6 is probably to read moritz++' blog posts on the matter, and to hang around here and ask sweet questions.
12:48 mdupont :D
12:49 mdupont i was thinking to just port some code over and see it crash and burn
12:49 masak well, much of Perl 6 is good at catching your Perl 5-isms.
12:49 mdupont ok, perfect. thanks
12:49 masak std: say for 1..10
12:49 p6eval std 1ad3292: 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/6wY74EWz5d line 1:�------> [32msay[33m�[31m for 1..10[0m�Check failed�FAILED 00:01 110m�»
12:49 masak std: class Foo {}; say new Foo
12:49 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax at /tmp/0Rj6GZOzBe line 1:�------> [32mclass Foo {}; say new Foo[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 109m�»
12:50 JimmyZ moritz: that's weird. I can open other sites, but can't open irclog
12:50 moritz JimmyZ: please defnie "can't open"
12:50 masak std: say "foo" =~ /foo/
12:50 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/xuMc7jW3Uv line 1:�------> [32msay "foo" =~[33m�[31m /foo/[0m�Parse failed�FAILED 00:01 110m�»
12:56 timotimo in what synopsis do i have to look to find out how gather works?
12:57 moritz S04
12:58 timotimo that was the one i did not look at. why? i'm weird.
13:00 moritz timotimo: fwiw I have a git checkout of the specs on my disc, and then simply use ack or grep to find stuff
13:00 masak std: I pity the one who has to understand 'gather' from the description of it in S04. :/
13:00 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed has at /tmp/gZ3uPBVxSl line 1:â�¤------> [32mI pity the one who has [33mâ��[31mto understand 'gather' from the descript[0mâ�¤    expecting any of:â�¤  scoped declaratorâ�¤      typenameâ�¤Other potential difficulties:â�¤  'has' declaration ou…
13:00 masak er, s/std: // :)
13:01 REPLeffect joined #perl6
13:02 moritz let's just link to http://perl6advent.wordpress.com/2009/12/23/​day-23-lazy-fruits-from-the-gather-of-eden/
13:02 moritz there's a reason after all that we wrote all that stuff
13:02 moritz :-)
13:03 timotimo ah, nice
13:03 masak moritz++
13:03 masak it's a bit old, but I don't think that's a disadvantage.
13:06 timotimo The proposed pipe syntax, notably the ==>, would solve that. But it’s not implemented in Rakudo yet <- it is by now, isn't it?
13:06 timotimo should things like that be edited?
13:06 timotimo i'd say many people still read that blog
13:07 masak Rakudo implements both ==> [\~] today.
13:07 timotimo i know i read many posts - although maybe not retaining all of it
13:07 masak yes, someone, probably me, should update that post.
13:08 timotimo :)
13:08 timotimo you know what would be cool?
13:08 masak an ice cube?
13:09 timotimo something like a unit test that you could run automatedly that would signal whenever something in one of those blog posts gets out of date
13:09 masak wind from the north?
13:09 masak well, we have unit tests from the advent posts.
13:09 masak but they don't cover the prose.
13:09 timotimo that should totally be added ;)
13:09 moritz timotimo: I dare you to look into the integration/ subdir of the roast repo
13:10 timotimo as soon as the ==> is implemented, the xfail test would suddenly go red and you could take note and update the post
13:10 moritz and we update the tests when the spec changes, but not always the post
13:11 timotimo that's sweet
13:12 timotimo covering the claims made in the prose with unit tests is just a suggestion, nobody has to do it. but if you like it, it could also be used in the book
13:12 moritz now that I would love
13:12 moritz but I don't love it enough to build the infrastructure for it right now
13:13 timotimo :)
13:13 timotimo neither do i
13:13 timotimo sorry for being useless
13:13 [Coke] autotesting snippets from the book isn't too bad. parrot does it with its PIR code snippets.
13:13 [Coke] (of course, that's POD, not latex)
13:14 * masak reads his own post and thinks "wtf is 'lexical recursion'?"
13:14 moritz not quite the same as temporal recursion? :-)
13:14 GlitchMr joined #perl6
13:15 masak the concept is like saying "hygienic parsing". it's just two terms, which don't make sense together.
13:16 moritz t/spec/S05-mass/rx.rakudo                               (Wstat: 0 Tests: 725 Failed: 1) Failed test:  253
13:17 moritz does anybody else get that output on recent-ish rakudo?
13:17 jnthn ENOICU so not been runnign that test
13:17 dalek roast: bf187bc | moritz++ | S04-declarations/state.t:
13:17 dalek roast: fix plan in state.t
13:17 dalek roast: review: https://github.com/perl6/roast/commit/bf187bc8fb
13:18 moritz and nobody seems to have noticed that one either :/
13:19 jnthn huh, I thought I patched taht one...
13:19 * jnthn guesses he did it wrong or forgot to push
13:19 * moritz guesses the latter
13:20 masak moritz: that test always fails for me.
13:22 moritz I'm just a bit disappointed that we had a new test failure, and nobody told me
13:22 skids joined #perl6
13:23 jnthn moritz: Well, I figured patching was more useful than telling. But then screwed up the patching.
13:24 moritz jnthn: I know that you have that attitute, but I thought we had an anonymous crowed of people that smoked rakudo every few days :-)
13:24 jnthn ah :)
13:24 jnthn true
13:24 * jnthn blames all the anti-smoking campaigns :P
13:27 masak I would've told, but I thought it was just a well-known, persistent failure.
13:27 moritz except for intermittent failures in the socket tests, I know of no (other) regularly failing tests
13:28 pernatiy joined #perl6
13:30 masak we should really DI the socket tests.
13:30 moritz DI?
13:31 masak dependency-inject.
13:31 masak I really meant some kind of mocking, to get rid of pesky real-world side effects.
13:31 jnthn I think we want to test the real world thing works though :)
13:32 moritz masak: but then we won't notice when parrot breaks the socket stuff
13:32 masak ah, troo.
13:32 timotimo is there any special reasoning behind the "name" of the [\~] operator?
13:32 buubot_backup joined #perl6
13:32 masak but it's a sad thing that those tests aren't 100% dependable.
13:32 jnthn [\ looks like a triangle :)
13:32 timotimo i wouldn't look at it and go "of, of course that's what it does, it says so right on the label"
13:32 masak maybe http://martinfowler.com/ar​ticles/nonDeterminism.html would help somehow.
13:33 timotimo are there other operators that begin with [\ and have something to do with triangles?
13:34 moritz well, you can triangle-reduce any operator
13:34 moritz nom: .say for [\+] 1, 2, 1, 3
13:34 p6eval rakudo b13c51: OUTPUT«1␤3␤4␤7␤»
13:34 masak nom: .say for [\~] <a b c d>
13:34 moritz well, any infix really
13:34 p6eval rakudo b13c51: OUTPUT«a␤ab␤abc␤abcd␤»
13:34 masak nom: .say for [\-] 1, 2, 3, 4, 5
13:34 p6eval rakudo b13c51: OUTPUT«1␤-1␤-4␤-8␤-13␤»
13:34 geekosaur oh, mapAccum
13:34 moritz nom: say .perl for [\=>] 1, 2, 1, 3
13:34 p6eval rakudo b13c51: OUTPUT«3␤1 => 3␤2 => 1 => 3␤1 => 2 => 1 => 3␤»
13:35 moritz I don't know how it's called elswhere, but it's really reduction plus accumulation
13:35 timotimo oh, i see
13:35 timotimo that's cool
13:35 moritz or folding and accumulation, if you want to phrase it that way
13:39 geekosaur hrm, not mapAccum[LR].  scan?
13:40 masak it's not a map, it's a fold.
13:40 geekosaur right, hence "scan" (which is a modified fold)
13:40 alim_ joined #perl6
13:40 geekosaur but I'm too tired to work this out at the moment :/ (and sleep not likely to happen any time soon...)
13:46 alim joined #perl6
13:47 masak I guess a ribosome counts as doing a mapAccum, because it traverses the mRNA and pushes out more and more protein.
13:48 timotimo hm, is something like [\[\...]] sensible?
13:48 masak whereas DNA replication is more of a fold + accum, because it consumes the DNA and pushes out duplicated DNA.
13:49 masak nom: say [\[\~]] <a b c d e>
13:49 p6eval rakudo b13c51: OUTPUT«===SORRY!===␤Confused␤at /tmp/j1HnWJDGwh:1␤»
13:49 masak std: say [\[\~]] <a b c d e>
13:49 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus term at /tmp/NeyqPf_wh_ line 1 (EOF):�------> [32msay [\[\~]] <a b c d e>[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 111m�»
13:49 timotimo :)
13:49 masak I would've *thought* it'd be sensible, but seems it isn't.
13:50 timotimo sensible in the context of perl6, of course
13:50 timotimo maybe someone can come up with something ;)
13:52 pmurias joined #perl6
13:53 kaleem_ joined #perl6
14:01 masak moritz: I want to learn more about DbC/Eiffel/Bertrand Meyer. is there some book in particular you'd recommend?
14:02 moritz masak: "Object Oriented Software Construction, Second Edition"
14:02 moritz by Mr. Meyer
14:03 moritz masak: don't go for the third edition. It is much longer, but not more informative, I've been told (I only read the second edition)
14:07 masak ah. this all sounds le familiar.
14:07 masak thanks.
14:17 eiro hello
14:19 masak heirro! \o/
14:22 eiro \o/ masak
14:23 masak nom: say spivak "masak gave him a greeting, to make sure he felt welcome."; sub spivak { $^s.subst(/<<[he|she]>>/, "ey", :g).subst(/<<[his|hers]>>/, "eir", :g).subst(/<<[him|her]>>/, "em", :g) }
14:23 p6eval rakudo b13c51: OUTPUT«masak gave em a greeting, to make sure ey felt welcome.␤»
14:23 eiro i want to take some time selling perl6 :)
14:23 masak I'm just feeling, wrt that email thread, that it'd be awesome to prepare a good Perl 6 intro thing for people if enough show up.
14:24 masak if it's just one person, it's less fun to make all the preparations :)
14:24 * moritz has some thoughts about that too
14:24 masak but I guess that's the wrong end to start in, in some sense. maybe we should start by dreaming up a really good schedule for such a course.
14:24 masak what are we proud of and would like to get across?
14:24 buubot_backup joined #perl6
14:24 masak I totally agree that the general tone should be "keep it practical and grounded".
14:25 moritz but it still needs to show stuff that's much nicer than in Perl 5, or indeed most other languages
14:25 moritz because otherwise you could simply use one of 'em
14:26 masak aye.
14:26 timotimo masak: in your cycles finder, do you use take [@cycle]; to evade any flattening or what's that for?
14:27 masak timotimo: right. 'take' flattens.
14:27 timotimo good to know
14:27 masak 'take' works very much like 'return' in that regard.
14:27 timotimo er, how so?
14:27 masak moritz: probably Rosetta Code might be a good source of real-code examples where Perl 6 is clearly better than other languages.
14:28 masak timotimo: `return @cycles` would also flatten the array into a capture.
14:28 eiro moritz, sure we have to show the differences but not in a academical, borring format.
14:28 moritz eiro: right
14:28 masak timotimo: that is, it doesn't really return one item, it returns @cycles.elems items.
14:29 eiro (that the pb with cat, i guess)
14:29 timotimo is [@mylist] the syntax expressly used for "don't flatten this"?
14:29 moritz yes
14:29 moritz nom: .perl.say for [1, 2, 3], 4, 5, [6, 7]
14:29 eiro cat's talks are not practical neither fun. we need at least one of them
14:29 p6eval rakudo b13c51: OUTPUT«[1, 2, 3]␤4␤5␤[6, 7]␤»
14:29 timotimo there's so much stuff you need to know :\
14:31 timotimo i really like the way @cycle is created, that's pretty neat
14:33 timotimo the rotate line serves to put the lowest number first in the cycle array for prettier output?
14:35 masak eiro: who or what is cat? and why do you need at least one talk that's neither practical nor fun?
14:35 masak timotimo: yes.
14:35 [Coke] moritz: fails for me on my new OSX setup.
14:35 moritz masak: cat (Christian Apherghis-Tramoni) is the author of the mail that eiro++ replied to
14:36 masak timotimo: in a sense, it and the sort *.[0] help "normalize" the output.
14:36 masak moritz: oh! of course.
14:36 [Coke] moritz: http://perlcabal.org/~coke/rakudo_summary.out
14:36 timotimo oooh, now i get what +.[0] means. it's "sort by turning the first element of each array into a numerical context"
14:36 timotimo that wasn't so hard
14:37 masak interestingly, cat had some comments on the "Using Perl 6" book.
14:37 masak timotimo: yes, but the newest version of the gist just says *.[0]
14:37 masak here the asterisk means "there's an implicit block around this construct, and I'm really a $_"
14:38 timotimo ah, even without the { }
14:38 timotimo ah, because that's what the * does
14:38 masak so the + wasn't needed, it turned out.
14:38 masak the things are already numbers.
14:38 masak or, at least, numeric enough to be sorted right :)
14:43 alester joined #perl6
14:44 felher If i have a class C that has "has Int $.x" and i have a string like "3" stored in my $x: is there a neat way to write C.new(:$x)? Something like C.new(:+$x)? Or is C.new(:x($x.Int)) as neat as it gets?
14:47 timotimo at the very least :x(+$x) should work
14:48 timotimo indeed it does. not very neat i know :(
14:50 masak Extending Python's syntax: http://eli.thegreenplace.net/2010/06/30/pytho​n-internals-adding-a-new-statement-to-python/ -- inneresting.
14:51 masak felher: in an ideal future, you should be able to store the type conversion in the attribute declaration: "has Int(Any) $.x".
14:52 masak felher: note: does not work yet, in any implementation.
14:52 felher timotimo: oh, yeah, i forgot about that. :)
14:53 felher masak: ok. That sounds really nice! I'm happy with just knowing that it will be there someday :)
14:53 felher well, kinda happy :)
14:54 masak Rakudo and Niecza are already both at a level that would have made me swoon back in 2008 :)
14:57 aber joined #perl6
14:57 masak aber: greetings.
15:01 fsergot o/
15:01 fsergot :)
15:01 fsergot hi #perl6!  :)
15:01 masak fsergot! \o/
15:03 eiro re
15:03 masak phenny: la en "re"?
15:03 phenny masak: "a" (la to en, translate.google.com)
15:03 masak heh :)
15:04 masak phenny: la en "res publica"?
15:04 phenny masak: "state" (la to en, translate.google.com)
15:04 eiro masak, cat is a french monger, university lecturer. he's commited to the perl community but has a very accademic style
15:04 arnsholt masak: re is the ablative singular of res, if you care =)
15:04 eiro re -> rebonjour (kinda "hello again")
15:05 masak arnsholt: I care. that's why it felt familiar.
15:05 masak eiro: I've met cat.
15:05 masak I just didn't know his nick.
15:05 masak phenny: la en "re vera"?
15:05 phenny masak: "in reality" (la to en, translate.google.com)
15:05 eiro is tadzik concidering to be one of us ? i forgot to add him to the loop
15:06 masak tadzik is coming to Oslo. haven't heard him consider Strasbourg.
15:06 masak phenny: la en "pro re nata"?
15:06 phenny masak: "the circumstances" (la to en, translate.google.com)
15:08 zipf joined #perl6
15:10 cognominal I forget the name for the syntaxic sugar equivalent to a constructor ? help!
15:10 fsergot To people who will be in Oslo in April: How should I prepare to Hackathon? It'll be my first time. :)
15:12 TimToady cognominal: are you asking about .= new ?
15:12 mikec what's happening in april?
15:13 TimToady NPW + hackathon
15:13 cognominal TimToady, the general term that denotes that kind of sugar . Say [  ] for  Array.new or  {} for Hash.new
15:13 TimToady ah, we call them composers
15:13 cognominal TimToady++
15:14 masak fsergot: you make sure you're well-rested, you maybe think of some things you want to hack on, and you bring a laptop.
15:16 sisar joined #perl6
15:18 mikec oh cool.
15:19 mikec perl workshops are a good incentive to take holiday
15:20 bluescreen10 joined #perl6
15:20 masak TimToady: I don't believe there's an NPW in connection with the hackathon.
15:21 TimToady oh, right, there's something though
15:21 TimToady at which TheDamian is teaching?
15:22 cognominal perl6:  [1, 2, 3].map: { $_.WHAT }
15:22 TimToady the XOR of caffiene and senility can be either very good or very bad...
15:22 p6eval pugs b927740, rakudo b13c51, niecza v15-4-g1f35f89:  ( no output )
15:22 cognominal perl6:  say [1, 2, 3].map: { $_.WHAT }
15:23 p6eval niecza v15-4-g1f35f89: OUTPUT«Int() Int() Int()␤»
15:23 p6eval ..rakudo b13c51: OUTPUT«use of uninitialized value of type Int in string context␤use of uninitialized value of type Int in string context␤use of uninitialized value of type Int in string context␤  ␤»
15:23 p6eval ..pugs b927740: OUTPUT«IntIntInt␤»
15:23 timotimo interesting
15:23 timotimo $_.WHAT seems to return a string on niecza, but an actual Int object on rakudo?
15:24 timotimo perl6: 1.WHAT.WHAT
15:24 TimToady gist should not be carping about uninit
15:24 p6eval pugs b927740, rakudo b13c51, niecza v15-4-g1f35f89:  ( no output )
15:24 timotimo oops
15:24 cognominal perl6:  say [1, 2, 3].map: { $_.WHAT.gist }
15:24 timotimo perl6: say 1.WHAT.WHAT
15:24 p6eval rakudo b13c51, niecza v15-4-g1f35f89: OUTPUT«Int() Int() Int()␤»
15:24 p6eval ..pugs b927740: OUTPUT«*** No such method in class Int: "&gist"␤    at /tmp/9vNHCejAFe line 1, column 22-35␤»
15:24 p6eval pugs b927740: OUTPUT«Int␤»
15:24 p6eval ..rakudo b13c51, niecza v15-4-g1f35f89: OUTPUT«Int()␤»
15:24 tokuhiro4 joined #perl6
15:25 sisar NPW ~~ /Nordic Perl Workshop/ ?
15:25 masak aye.
15:25 masak TimToady: I don't know -- maybe TheDamian is just visiting Oslo.pm or some such?
15:25 * sisar startted learning Verilog today
15:25 cognominal I am alway confused with the difference between $_.perl, $_.gist and $_.Str
15:25 sisar a  weird language if you ask me
15:27 masak cognominal: .perl: a string of Perl 6 code. .gist: a "human-readable string". .Str: a cast to Str
15:27 sisar TimToady: have you considered designning a simulation/concurrent language based on the perl philosophy ?
15:28 fsergot masak++ thanks :)
15:29 TimToady sisar: the language I most worked on right before Perl was a discrete event simulation language
15:29 TimToady (not my language; I just wrote a new compiler for it)
15:30 TimToady unfortunately, a proprietary product, so you never saw it :)
15:31 sisar well, hardware description languages are so much different than programming languages, because they have the time element. It confuses the heck out of me :|
15:31 sisar s/element/axis
15:33 sisar it would be nice to write, '$x = $a + $b after 5s' :p
15:34 geekosaur .oO { who's porting Atom to p6? }
15:34 [Coke] sisar: easy enough with a builtin event loop.
15:34 [Coke] (ala tcl)
15:35 TimToady sleep 5; $x = $a + $b;
15:35 TimToady the way to think about a discrete event simulator is that it just has multiple program counters running through your code simultaneiously
15:36 masak today's autopun spotting: http://twitter.com/misandristc​utie/status/179008250233102338
15:37 TimToady somehow the intentional ones aren't quite as funny
15:38 sisar TimToady: hm. It's the concept of delta-time which confuses me a lot.
15:40 TimToady I don't know what that term means, but in a des you could have multiple "transactions" waiting at different points in that sleep 5
15:40 flussence it may be easier to think of it as automating a model railway with about 2 million simultaneous trains :)
15:41 TimToady so a sleep 5 is more like a big loop of train track that multiple trains could be running on
15:41 TimToady each train takes 5 seconds to do the loop
15:42 sisar *time
15:42 sisar 'delta tim' is the infinitesimal delay it takes to actually compute the value of $a + $b, It is the simulator resolution time.
15:43 sisar A "delta" takes ZERO ns to actually happen, but there IS a delay there.
15:43 masak TimToady: I thought all autopuns were more or less intentionally created.
15:43 masak granted, they can feel more or less "made up". but they're all made up.
15:44 sisar but well, i _have_ to learn it for my coursework, no point cribbing about it :)
15:51 Psyche^ joined #perl6
15:54 birdwindupbird joined #perl6
15:56 cogno joined #perl6
15:57 thou joined #perl6
15:58 NamelessTee joined #perl6
15:59 sisar how can i get a "std: " functionality locally ? Just like we have here in IRC.
16:00 masak sisar: 1. http://github.com/perl6/std 2. ??? 3. profit!
16:00 moritz step 2 involves calling 'make', and installing prerequisites when they are missing
16:01 masak and making an alias of a /usr/bin script 'std'.
16:01 masak I've done it now and then, and it's quite nice.
16:01 moritz we run the 'tryfile' script in p6eval
16:01 masak s/of/or/
16:01 sisar masak, moritz: i'll try that now, thanks o/
16:02 moritz you'll need JSON::XS, Moose and some other goodies
16:08 sisar moritz: the github std page says i'll need YAML::XS. Is it the same as JSON::XS ?
16:08 kaare_ joined #perl6
16:10 moritz sisar: not the same. Trust them, not me :-)
16:11 sisar oh, ok. :-)
16:13 jnthn decommute &
16:18 cogno joined #perl6
16:28 cogno Perl6: my Numeric $n = 1; say $n
16:29 masak cogno: 'perl6', not 'Perl6'.
16:30 cogno I am in a laundromat and my app autocapitalized :(
16:30 simcop2387 joined #perl6
16:31 cogno perl6: my Numeric $n = 1; say $n
16:31 p6eval pugs b927740, rakudo b13c51, niecza v15-4-g1f35f89: OUTPUT«1␤»
16:46 cogno joined #perl6
16:47 felher If i do 'for 1,2,3,4 -> $a, $b' i get 1,2 and 3,4. Is there a way to get 1,2 and 2,3 and 3,4?
16:49 masak felher: for 1,2,3 Z 2,3,4 -> $a, $b
16:49 masak felher: alternately, for @a[0 .. *-1] Z @a[1 ..*] -> $a, $b
16:49 felher masak: yeah, good idea. thnx :)
16:51 felher masak: works great :)
16:51 moritz wow, after all this time hanging around in #perl6 I seem to have forgotten how rough the manners are in other channels
16:52 * geekosaur so glad he avoids most of those channels
16:52 Jerkwad joined #perl6
16:54 GlitchMr42 joined #perl6
16:54 kaleem joined #perl6
16:57 masak moritz: yes, that strikes me too sometimes.
16:57 masak everything from crudeness through meanness to misogyny.
16:58 masak not everywhere, mind. but in many places.
17:02 * masak .= decommute
17:06 alim joined #perl6
17:12 fglock joined #perl6
17:21 mucker joined #perl6
17:24 [Coke] TimToady++ #YAPC::NA
17:30 kthakore_ left #perl6
17:31 tadzik eiro: re Strasbourg, I don't know yet
17:31 tadzik it all depends on my exams
17:31 tadzik good evening btw :)
17:34 timotimo there's no syntax or semantics to attach a restriction to a variable? instead i'll have to define a subset?
17:35 geekosaur a subset *is* a restriction to a variable, more or less
17:36 timotimo right, but i can't do it in one line with a "my", right?
17:36 timotimo nor will i ever?
17:36 benabik std: my $x where * > 10;
17:36 p6eval std 1ad3292: OUTPUT«ok 00:01 111m␤»
17:36 timotimo oh, interesting
17:36 benabik nom: my $x where * > 10; $x = 11; $x = 10
17:36 p6eval rakudo b13c51: OUTPUT«===SORRY!===␤Contextual %*PARAM_INFO not found␤»
17:36 benabik hm.
17:37 moritz rakudobug.
17:38 pernatiy joined #perl6
17:38 * geekosaur just hit that, was wondering if it was supposed to work or if he'd gotten completely lost in the discussion
17:39 moritz nom: my Any $x where * > 10; $x = 11; $x = 10
17:39 p6eval rakudo b13c51: OUTPUT«===SORRY!===␤Contextual %*PARAM_INFO not found␤»
17:39 geekosaur otoh I'm glad I remembered the currently specced syntax
17:39 benabik Given that std parses it, I'd guess that it's supposed to work.  But I think rakudo is expecting some setup that sub performs.
17:39 benabik (Or sig?)
17:39 moritz sig
17:39 MayDaniel joined #perl6
17:39 benabik nom: my :( $x where * > 10 ); $x = 11
17:39 p6eval rakudo b13c51: OUTPUT«===SORRY!===␤Malformed my␤at /tmp/6UFKj1GLt0:1␤»
17:40 geekosaur yeh, bith * and $^a get that contextual not found error and $x gets $x undeclared
17:40 benabik eh.
17:40 moritz iirc 'my' introduces a signature, though often parsed with simplify rules
17:40 moritz or something.
17:40 geekosaur (niecza doesn't do this yet?)
17:40 moritz n: my $x where * > 0
17:40 p6eval niecza v15-4-g1f35f89: OUTPUT«[31m===[0mSORRY![31m​===[0mâ�¤â�¤Postconstraints, and shapes on variable declarators NYI at /tmp/h6e8XKAnNW line 1 (EOF):â�¤------> [32mmy $x where * > 0[33mâ��[31m<EOL>[0mâ�¤â�¤Potential difficulties:â�¤  $x is declared but not used at /tmp/h6e8XKAnNW line 1:â�¤---…
17:40 geekosaur niecza: my $a where * > 10; $a = 11; $a.say'
17:40 p6eval niecza v15-4-g1f35f89: OUTPUT«[31m===[0mSORRY![31m​===[0mâ�¤â�¤Postconstraints, and shapes on variable declarators NYI at /tmp/UrNuzUlcZf line 1:â�¤------> [32mmy $a where * > 10[33mâ��[31m; $a = 11; $a.say'[0mâ�¤â�¤Confused at /tmp/UrNuzUlcZf line 1:â�¤------> [32mmy $a where * > 10; $a = 11…
17:42 geekosaur meh
17:42 * geekosaur lost net , tried it locally, got that
17:42 moritz well, at least it has a better error message :-)
17:42 geekosaur trailing ' (shell habit) probably didn;t help...
17:43 benabik Yes, NYI is better than "random bit of compiler not found"
17:43 moritz geekosaur: well, it didn't even get that far in the parse
17:44 geekosaur bet pugs has a worse error :) (don't think it even tries to handle that syntax)
17:44 moritz p: my $x where $x > 0;
17:44 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "where"␤    expecting "?", "!", trait, "=", infix assignment or operator␤    at /tmp/brGTxZ85PY line 1, column 7␤»
17:44 moritz not worse than rakudo
17:49 facefox joined #perl6
17:49 [Coke] pugs: 3.Rat.say
17:49 p6eval pugs b927740: OUTPUT«*** No such method in class Int: "&Rat"␤    at /tmp/60AH2dBGt_ line 1, column 1 - line 2, column 1␤»
17:54 moritz I guess I should look into setting up regular pugs builds on p6eval
17:58 moritz pugs: say 3.Rat
17:58 p6eval pugs b927740: OUTPUT«*** No such method in class Int: "&Rat"␤    at /tmp/jUALxtYChb line 1, column 5 - line 2, column 1␤»
17:59 dalek evalbot: dddfa71 | moritz++ | evalbot.pl:
17:59 dalek evalbot: use freshly built pugs
17:59 dalek evalbot: review: https://github.com/perl6/evalbot/commit/dddfa711f4
18:00 moritz pugs: say 3.Int
18:00 p6eval pugs b927740: OUTPUT«*** No such method in class Int: "&Int"␤    at /tmp/2s4iBJs2aq line 1, column 5 - line 2, column 1␤»
18:01 pernatiy_ joined #perl6
18:02 moritz uhm
18:02 moritz did somebody already do that?
18:03 benabik Since b927740 is from October, I'd guess not.
18:03 moritz ah, and I begin to see why not
18:03 moritz cabal build
18:03 moritz setup: ./Pugs.cabal has been changed, please re-configure.
18:04 moritz cabal configure says: setup: At least the following dependencies are missing:
18:04 moritz haskeline >=0.6.4.0, parsec >=3.0.0.0, pugs-DrIFT >=2.2.3.2
18:04 moritz and trying to install haskeline gives me "System/Console/Haskeline/MonadException.hs:23:7: Could not find module `Control.Monad.State':
18:05 geekosaur on ghc 7.0.4 trying to install pugs gives me a conflict because most of pugs wants mtl1 but haskeline wants mtl2
18:05 benabik Need an older version of haseline?
18:05 geekosaur so I get a bunch of complaints from cabal about how it probably won;t work and ultimately a missing MonadIO (InputT something-I-forget)
18:05 moritz ah, and we have ghc 6.12.1 installed on p6eval
18:06 moritz oh, and there's a locally installed ghc-7.2.1
18:06 moritz which isn't picked up by default
18:07 moritz so I guess I should remove the system GHC to avoid confusion
18:09 felher perl6: my %hash; %hash{3} = 3; say %hash.perl
18:09 p6eval rakudo b13c51: OUTPUT«("3" => 3).hash␤»
18:09 p6eval ..niecza v15-4-g1f35f89: OUTPUT«{"3" => 3}.hash␤»
18:09 p6eval ..pugs b927740: OUTPUT«{("3" => 3),}␤»
18:09 felher Hashes convert everthing to string before they use it as a key?
18:09 felher Like in p5?
18:09 moritz perl6: my %hash{Any};  %hash{3} = 3; say %hash.perl
18:09 p6eval pugs b927740: OUTPUT«{("3" => 3),}␤»
18:09 p6eval ..rakudo b13c51: OUTPUT«(3 => 3).hash␤»
18:09 p6eval ..niecza v15-4-g1f35f89: OUTPUT«[31m===[0mSORRY![31m​===[0mâ�¤â�¤Postconstraints, and shapes on variable declarators NYI at /tmp/GwHNk8SKzP line 1:â�¤------> [32mmy %hash{Any}[33mâ��[31m;  %hash{3} = 3; say %hash.perl[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib…
18:09 moritz felher: yes, unless you tell them not to
18:09 felher moritz++
18:10 felher #knew what i was about to ask before i even did :D
18:10 felher #or he is just a fast typer.
18:11 timotimo the syntax for having a restriction on the hashes type would look like this: my Int %foo; and a hash of str -> int would be my Int %hash{Str}?
18:11 flussence r: my %hash{Any}; %hash{3} = 3; say %hash.perl.eval.perl; # wondering what .hash does to it
18:11 p6eval rakudo b13c51: OUTPUT«("3" => 3).hash␤»
18:12 moritz flussence: .perl does the wrong thing right now
18:12 moritz timotimo: yes. Though note that when you write   my Int %hash{Str}  you get Str type checks, not coercion
18:12 Trashlord joined #perl6
18:12 moritz r: my Int %hash{Str}; %hash{3} = 2;
18:12 p6eval rakudo b13c51: OUTPUT«Nominal type check failed for parameter '$key'; expected Str but got Int instead␤  in method at_key at src/gen/CORE.setting:5743␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1184␤  in block <anon> at /tmp/AVqATEkc6l:1␤␤»
18:13 timotimo ah. is there something for coercion then?
18:13 flussence r: say (3 => 3).hash(Any).perl; # will this work?
18:13 p6eval rakudo b13c51: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method hash at src/gen/CORE.setting:1031␤  in block <anon> at /tmp/jlCckHlY16:1␤␤»
18:13 flussence guess not
18:13 moritz timotimo: there's a syntax for it, but it's not yet implemented
18:13 moritz Str(Any)
18:14 benabik moritz: Int %h{Str(Any)} ?
18:14 moritz benabik: yes
18:14 moritz (unless I messed up the order again)
18:14 benabik Yeah, I keep getting the order confused.
18:14 moritz one could just remember that leaving away the parenthesis part removes the coercion
18:15 moritz so Str(Any) is actually a Str type constraint, and the (Any) is the coercion
18:17 timotimo the "coercion" part says what it can be coerced from? or what?
18:17 moritz yes
18:18 timotimo mhm mhm
18:18 timotimo perl6 is a little bit like nethack: "the devs think of everything"
18:19 benabik It confuses me because in `sub (Str(Any) $)`, the apparent type constraint is Any, not Str.  Although I guess it's more like `Any $ where *.^can('Str')`
18:21 felher nom: my %hash{Any} = 1,2,3,4; %hash{1} = 2; %hash{3} = 4; say %hash.perl
18:21 p6eval rakudo b13c51: OUTPUT«("1" => 2, "3" => 4, 1 => 2, 3 => 4).hash␤»
18:21 moritz benabik: well, coercion dosn't make much sense on an anonymous variable
18:21 felher Is this expected behavior?
18:22 moritz benabik: and Str is the type constraint of the variable
18:22 benabik moritz: I left off the name because it doesn't matter for the discussion.
18:22 moritz and Any is the user-facing part
18:22 moritz felher: no, it's not
18:22 moritz felher: it's a bug that the list assignment stringifies the key
18:23 felher moritz: i see. thnx :)
18:23 benabik moritz: That's what I meant by "from the outside".  a sub with `Str(Any) $x` arg and a plain `$x` arg seem (more or less) identical to the caller.
18:25 moritz benabik: right. But I guess you can't please both inside and outside with the same syntax
18:26 moritz benabik: the previous one, '$x as Str', looked very wrong to the inside
18:28 benabik moritz: True enough, I suppose.  I tend to thing of signatures as for the caller, the current way 'round makes more sense for Perl where sigs are used for variable declarations everywhere.  (more or less)
18:35 havenn joined #perl6
18:35 dalek roast: 339eddc | moritz++ | S09-hashes/objecthash.t:
18:35 dalek roast: test object hashes bug found by felher++
18:35 dalek roast: review: https://github.com/perl6/roast/commit/339eddc985
18:36 dalek roast: 8e09d79 | moritz++ | S (4 files):
18:36 dalek roast: rakudo autounfudges
18:36 dalek roast: review: https://github.com/perl6/roast/commit/8e09d795ac
18:41 isBEKaml joined #perl6
18:42 facefox joined #perl6
18:51 felher \o/ :)
18:54 moritz I even have a fix locally here
18:56 dalek rakudo/nom: bd67428 | moritz++ | src/core/ (2 files):
18:56 dalek rakudo/nom: fix list assignment to object hashes
18:56 dalek rakudo/nom:
18:56 dalek rakudo/nom: This moves the key type coercion to STORE_AT_KEY, which is replaced
18:56 dalek rakudo/nom: by a non-coercing method in the case of object hashes
18:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd6742896d
18:57 dalek roast: 3696d21 | moritz++ | S09-hashes/objecthash.t:
18:57 dalek roast: fix now-passing objecthash test
18:57 dalek roast: review: https://github.com/perl6/roast/commit/3696d21e02
18:59 moritz pugs: say 'alive'
18:59 p6eval pugs b927740: OUTPUT«alive␤»
18:59 moritz ok, glad I didn't break that part :-)
19:00 moritz felher++
19:00 moritz we really need more tests for that stuff
19:04 mj41 joined #perl6
19:09 facefox joined #perl6
19:21 adnauseam joined #perl6
19:22 FACEFOX joined #perl6
19:25 awoodland_ joined #perl6
19:26 havenn joined #perl6
19:29 moritz is Rob Kinyon known in here? if yes, under which nick?
19:37 birdwindupbird joined #perl6
19:38 masak ooh, he's written Perl6::Role. http://search.cpan.org/~rkinyon/Pe​rl6-Roles-0.01/lib/Perl6/Roles.pm
19:39 masak I can't gather from the Pod how that class handles method conflicts, though.
19:42 Chillance joined #perl6
19:51 havenn joined #perl6
19:53 pyrimidine masak: that module is looking pretty old (2005)
19:56 doy yeah, that was one of the early prototypes leading up to moose
19:59 masak inneresting.
20:00 felher moritz++ for fixing and testing it right away!
20:02 Chillance joined #perl6
20:02 PZt joined #perl6
20:03 att joined #perl6
20:10 pernatiy joined #perl6
20:17 icwiener joined #perl6
20:23 MayDaniel joined #perl6
20:37 y3llow_ joined #perl6
20:38 bruges_ joined #perl6
20:40 y3llow joined #perl6
20:42 y3llow joined #perl6
20:42 FACEFOX joined #perl6
20:45 y3llow joined #perl6
20:47 y3llow joined #perl6
21:04 havenn joined #perl6
21:08 havenn joined #perl6
21:13 tyatpi joined #perl6
21:30 PacoAir joined #perl6
21:37 yertalert joined #perl6
22:05 icwiener joined #perl6
22:07 tadzik is feather dizzy for you too?
22:12 PacoAir joined #perl6
22:14 FACEFOX joined #perl6
22:14 masak don't think so.
22:28 Juerd tadzik: We had an incoming massive DoS attack from spoofed sources.
22:28 phenny Juerd: 29 Feb 01:47Z <[Coke]> tell Juerd feather1 is really slow right now and it's not me!
22:28 phenny Juerd: 29 Feb 01:48Z <[Coke]> tell Juerd it was a rogue pugs process, mevermind.
22:28 Juerd heh.
22:29 tadzik oh
22:29 tadzik hehe
22:31 skids joined #perl6
22:36 masak feather, under attack?
22:37 masak Y U HATE ON PERL 6? :(
22:37 masak that's not very civil.
22:38 gilm joined #perl6
22:39 alim joined #perl6
22:42 whiteknight joined #perl6
22:52 Juerd masak: Not feather, but another machine on our network.
22:54 masak oh, ok.
22:54 masak that's alright, then :P
23:02 sorear good * #perl6
23:03 masak sorear! \o/
23:03 masak as usual, your arrival coincides quite well with my departure. :)
23:03 masak good night, #perl6
23:05 lestrrat joined #perl6
23:06 sorear good night, masak.
23:07 colomon o/
23:22 japhb Too bad I missed him.  I just commented on a bug in his cycle-finding gist.  :-)
23:23 sorear o/ colomon , japhb
23:24 japhb o/
23:24 wolfman2000 joined #perl6
23:29 havenn joined #perl6
23:31 y3llow joined #perl6
23:32 envi_ joined #perl6
23:38 icwiener joined #perl6
23:50 isBEKaml joined #perl6
23:52 havenn joined #perl6
23:59 isBEKaml joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs