Camelia, the Perl 6 bug

IRC log for #perl6, 2011-07-03

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:00 masak are you assuming that .NET is not a straight-jacket language? :P
00:00 jlaire it's not a language :P
00:00 masak g'ah, I keep doing that :)
00:00 Moukeddar it's a plateform
00:00 masak yes.
00:00 Moukeddar C# is the language
00:01 masak aye.
00:01 jlaire it's not *the* language :P
00:01 Moukeddar well
00:01 masak well, in a way it is.
00:01 Moukeddar it is "The" language to me !=
00:03 jlaire has anyone written a lambda calculus interpreter in perl6 yet?
00:04 * jlaire thinks that'd be a good first project
00:04 TimToady sure, but you have to write your lambdas as -> $a, $b { $a + $b }    :)
00:05 jlaire heh :)
00:05 jlaire I was thinking of doing parsing, too
00:05 jlaire pure untyped lambda-calculus
00:05 masak sounds like fun.
00:06 masak ISTR someone doing church numerals -- probably colomon++
00:06 Moukeddar perl6 doesn't have lambdas ?
00:06 jlaire it ha
00:06 masak blog post! http://strangelyconsistent.or​g/blog/june-25-2011-connect-4
00:06 jlaire 'lambda calculus' is a very primitive programming language
00:07 jlaire hm, 7x6 seems more intuitive to me than 6x7 for some reason...
00:07 jlaire I think width x height is more common
00:07 Moukeddar it's the other way
00:08 masak jlaire: ok, fixing.
00:08 jlaire masak: board_is_full has a space after '(', looks non-symmetric
00:08 masak aye.
00:08 masak removing.
00:10 jlaire Moukeddar: I've got a citation for '7x6' :) http://www.connectfour.net/Files/connect4.pdf
00:12 Moukeddar hey, i used to play this game long time ago without knowing its real name
00:12 Moukeddar sounds like a fun summer project
00:12 lue ooh, can't wait to see how you do a P6-coded text adventure :)
00:13 masak lue: I intend to get quite fancy :)
00:14 TimToady masak: typo: wan_win
00:14 jlaire masak++ # can't find anything else to nit-pick on
00:14 masak TimToady: thanks, fixing.
00:15 lue the world model especially. [btw, my one design goal for my IF language is: "Create Perl 6 if it were made for IF games" :)]
00:15 masak I hope this wasn't too big a game to use as an example. apart from was_win, it felt very straightforward. and I still hope was_win can be simplified somehow.
00:16 TimToady typo: Notive
00:17 masak oh, that's fixed like two versions ago :)
00:17 masak but thanks :)
00:17 TimToady shoulda refreshed...
00:17 * masak .oO( being an early adopter means you risk finding outdated bugs )
00:18 masak lue: I might choose a grid of rooms for simplicity. but I generally like a graph of 'em better.
00:18 donri left #perl6
00:18 jlaire is 'sub foo {}' identical to 'sub foo() {}' ?
00:19 masak yes.
00:19 jlaire good
00:19 masak yes :)
00:19 jlaire :)
00:19 TimToady but sub foo { @_ } is not identical to sub foo() { @_ }
00:19 Moukeddar left #perl6
00:19 whiteknight joined #perl6
00:20 jlaire ow
00:20 TimToady in fact
00:20 TimToady niecza: sub foo() { @_ }
00:20 p6eval niecza v7-11-g9ba8284: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Placeholder variable @_ cannot override existing signature Any()() at /tmp/J8ixTqeKyJ line 1:␤------> [32msub foo() { [33m⏏[31m@_ }[0m␤␤Potential difficulties:␤  &foo is declared but not used at /tmp/J8ixTqeKyJ line 1:␤--…
00:20 masak rakudo: sub foo { @_ }
00:20 p6eval rakudo 72d158:  ( no output )
00:20 lue what do you mean by a graph? I see a 3D grid as one of the few (if not only) choices.
00:20 masak rakudo: sub foo { say @_ }; foo 1, 2, 3
00:20 p6eval rakudo 72d158: OUTPUT«123␤»
00:21 masak rakudo: sub foo() { say @_ }; foo 1, 2, 3
00:21 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Placeholder variable cannot override existing signature at line 22, near "; foo 1, 2"␤»
00:21 masak rakudo++
00:21 Moukeddar joined #perl6
00:21 jlaire ok, I'll keep using sub foo()
00:22 masak lue: by graph I mean that nodes (rooms) are connected to each other via edges (passages) in an ad-hoc manner, not according to a grid with coordinates.
00:22 TimToady adventure was merely on a graph, with n,s,e,w,u,d links (and a few random links)
00:22 masak right.
00:22 TimToady but it was no way in a 3d graph
00:22 masak graphs aren't inherently 2d or 3d.
00:22 masak they can be planar, but that's not so useful here.
00:22 TimToady I meant grid
00:22 jlaire .oO( rendering general graphs in 2D is a very interesting problem )
00:23 TimToady you could holographically project the graph onto a grid, but there were discontinuities
00:23 jlaire Moukeddar: that ^ is a nice example of an algoritm problem
00:23 jlaire algorithm*
00:23 masak lue: does this graph idea make sense to you?
00:23 lue ah. I only mention 3D because that's what happens when you use up and down
00:23 lue yes
00:24 masak basically, no coordinates involved.
00:24 Moukeddar i'll get involved in game programming , it seems to be the best way to sharpen
00:24 masak only relations via passages.
00:24 TimToady up and down don't necessarily take you up and down in adventure
00:24 lue [unless of course you take each level and say "first level" and so on]
00:24 TimToady sometimes you go up one way and north the other way
00:25 masak confusing :)
00:25 TimToady one could force it to a 3d grid only by assuming passages wander off their initial line
00:25 masak I'd consider that a slightly bad UI :)
00:25 TimToady then there are the special directions, xyzzy, plugh, and iirc, ne
00:26 lue Hitchhiker's Guide To The Galaxy is my favorite text game [the solution to get into marvin's room is hilarious]
00:26 masak lue: it's a good game :)
00:26 lue ifMUD has 'xyzzy' teleport you to the main hall, or somewhere near there.
00:26 woosley joined #perl6
00:27 TimToady in a sense, all directions in adventure are teleports
00:27 TimToady that's what we mean by not-a-grid-but-a-graph
00:28 lue The only thing better than the games are the InvisiClues. I have a couple of times sat down and just read them (I have the Lost Masterpieces of Infocom collection)
00:29 lue Especially the questions designed to keep you from peeking ahead (in the InvisiClues' original incarnation), e.g. Zork I's "How do I get off the roof of the house?"
00:29 masak InvisiClues are cheating :)
00:31 lue Too bad I can't find any of it, except for two floppies, a map, and the second box's manual. Hopefully my old hard drive has all the copied games still on it.
00:32 masak among the Infocom games, "Suspended" was always one of my favorites due to its gameplay. I never got very far, but the concept intrigued me.
00:34 jlaire rakudo: sub postfix:<!!>($x is rw) { $x = !$x }; my $x = True; say $x!! for 1..6
00:34 p6eval rakudo 72d158: OUTPUT«Bool::False␤Bool::True␤Bool::Fal​se␤Bool::True␤Bool::False␤Bool::True␤»
00:34 masak lue: oh, and if you haven't player Photopia, stop anything you're doing and play it RIGHT NOW. :) http://www.wurb.com/if/game/255
00:34 masak played*
00:34 TimToady .oO(I have a radio playing in my brain!)
00:35 cooper left #perl6
00:36 masak lue: best IF I've ever played. and -- paradoxically -- it's good partly because it isn't very interactive. it just has a story to tell, and tells it.
00:36 masak with occasional nudges from the player.
00:37 lue I'll spring for the color version.
00:37 masak TimToady: is it a pod-safe radio? :)
00:38 masak lue: yes, good. the colors are actually part of the story, too.
00:38 cbk left #perl6
00:39 icwiener left #perl6
00:39 cooper joined #perl6
00:40 PacoLinux_ left #perl6
00:40 lue [that's assuming, of course, gargoyle is going to give me color]
00:41 lue ooh I see color now. /me shuts up and plays
00:43 masak lue: enjoy.
00:43 masak 'night, #perl6.
00:43 masak left #perl6
00:43 TimToady \oh drath
00:44 TimToady *t
00:44 TimToady though drath is a lovely word
00:48 cooper left #perl6
00:50 bkolera joined #perl6
00:50 bkolera1 left #perl6
00:50 nymacro joined #perl6
00:52 Chillance left #perl6
00:52 benabik joined #perl6
01:00 Moukeddar left #perl6
01:05 cooper joined #perl6
01:06 daniel-s joined #perl6
01:09 bkolera left #perl6
01:10 bkolera joined #perl6
01:10 bkolera left #perl6
01:21 thou left #perl6
01:25 Qiang joined #perl6
01:33 thou joined #perl6
01:41 lue masak: That was a fun game. I can't help but think it was influenced by the H2G2 text game a bit (the WHO AM I command and the line "sign of impending mental collapse" gives it away a bit)
01:45 tokuhirom joined #perl6
01:47 wamba left #perl6
01:54 whiteknight left #perl6
01:55 jnthn morning, #perl6
01:57 colomon \o
02:09 jnthn Ah, trig tests are busted because...
02:09 jnthn BEGIN { @*INC.push("t/spec/packages/") };
02:09 jnthn That won't work yet.
02:10 jaldhar left #perl6
02:11 rgrau` left #perl6
02:11 jaldhar joined #perl6
02:17 cooper left #perl6
02:18 cooper joined #perl6
02:18 galf left #perl6
02:20 ZaphrodZenovka left #perl6
02:20 dalek rakudo/nom: ebe1051 | jonathan++ | NOMMAP.markdown:
02:20 dalek rakudo/nom: Remove a couple of dealt with nommap items.
02:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ebe1051178
02:21 ZaphrodZenovka joined #perl6
02:21 ZaphrodZenovka Can someone point me to some good reading on NOM ?
02:24 PerlJam ZaphrodZenovka: um ...  what sort of reading?  :)
02:24 ZaphrodZenovka I want to understand it - top to bottom
02:25 ZaphrodZenovka I can't seem to find information which aides that... perhaps because I'm doing it wrong
02:25 PerlJam ZaphrodZenovka: it's just perl 6.  do you mean you want to understand 6 model?
02:25 PerlJam er, 6model
02:25 jnthn ZaphrodZenovka: There's various bits to be gleaned from blog posts on http://pmthium.com/, http://6guts.wordpress.com/ and see also http://perlgeek.de/blog-en/​perl-6/how-fast-is-nom.html. 6guts has a bunch on the object model
02:25 colomon jnthn: it may be a lot more reasonable to get rid of the trig test's extra include.  I'll have to take a look tomorrow.
02:25 colomon *now
02:25 ZaphrodZenovka Thanks for those links, I'll start there
02:26 jnthn colomon: OK. I'll fix those things up eventually
02:26 jnthn colomon: Probably even within a week.
02:26 ZaphrodZenovka When I see blogs talk about work on Rakuda/Nom I want to understand what is being referenced
02:27 TimToady perl6: say :10<1>.WHAT
02:27 p6eval niecza v7-11-g9ba8284: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Action method alnumint not yet implemented at /tmp/9JPZLcYfB_ line 1:␤------> [32msay :10<1[33m⏏[31m>.WHAT[0m␤␤Action method rad_number not yet implemented at /tmp/9JPZLcYfB_ line 1:␤------> [32msay :10<1>[33m⏏[31m.WHA…
02:27 p6eval ..rakudo 72d158: OUTPUT«Num()␤»
02:27 p6eval ..pugs: OUTPUT«Int␤»
02:27 TimToady nom: say :10<1>.WHAT
02:27 p6eval nom: OUTPUT«Could not find sub &radcalc␤current instr.: '_block1002' pc 74 ((file unknown):48238532) (:1)␤»
02:28 TimToady pugs: say :10<1.1>.WHAT
02:28 p6eval pugs: OUTPUT«Rat␤»
02:28 jnthn ZaphrodZenovka: "nom" is a branch in the Rakudo repository. The commit log is at https://github.com/rakudo/rakudo/commits/nom and you can browse the tree at https://github.com/rakudo/rakudo/tree/nom
02:28 TimToady pugs: say :10<1.1*10**23>.WHAT
02:28 p6eval pugs: OUTPUT«Rat␤»
02:28 TimToady hmm
02:28 jnthn ZaphrodZenovka: Also see http://jnthn.net/papers/2011-bjpw-rakudo.pdf
02:29 ZaphrodZenovka jnthn: awesome, I thought that but did not see anywhere that said so... and new object model or something like it I read once for the acronym...
02:30 ZaphrodZenovka jnthn: thanks - that should untangle the knot in my mind over this
02:38 Qiang left #perl6
02:39 cosimo left #perl6
02:39 soh_cah_toa ZaphrodZenovka: http://perlgeek.de/en/article/d​iscovering-meta-object-protocol
02:47 Instil___ joined #perl6
02:48 Instil left #perl6
02:51 slavik1 http://media.photobucket.com/image/recen​t/kruesader/b-InternetSuperheroes-1.jpg
02:51 slavik1 hmm, wrong tab
02:59 felher phenny: tell masak your connect-4-blog-post was great :D . Just one thing: Couldn't you've used "^$HEIGHT" instead of "0 .. $HEIGHT -1" and "^$N" instead of all the "0 .. $N - 1"? I find ^$XYZ a bit easier to read. Guess this is just a matter of taste, though. :)
02:59 phenny felher: I'll pass that on when masak is around.
03:03 felher pmichaud++ for more-nom-features-blog-post, moritz++  for how-fast-is-nom
03:04 felher sleep &
03:11 woosley left #perl6
03:14 perlhack joined #perl6
03:14 perlhack ����
03:15 perlhack i came back agagin
03:16 perlhack :-)
03:23 Su-Shee_ joined #perl6
03:24 perlhack left #perl6
03:27 Su-Shee left #perl6
03:30 sivoais joined #perl6
03:47 perlhack joined #perl6
03:49 perlhack What a wonderful day。
03:54 perlhack practice practice practice
03:54 cosimo joined #perl6
03:54 perlhack practice practice and practice
04:02 _twitch joined #perl6
04:03 ZaphrodZenovka if( ! $practice) {while (! $practice) {$practice = 1;}}
04:07 envi joined #perl6
04:22 tokuhirom left #perl6
04:25 daniel-s left #perl6
04:25 dayangkun joined #perl6
04:29 perlhack ZaphrodZenovka:you have humor.
04:30 _twitch left #perl6
04:41 whiteknight joined #perl6
04:52 moritz nqp: say(pir::exp__Nn(1e0))
04:52 p6eval nqp: OUTPUT«2.71828182845905␤»
05:01 zby_home_ joined #perl6
05:02 zby_home left #perl6
05:05 kaare_ joined #perl6
05:12 drbean left #perl6
05:17 Qiang joined #perl6
05:19 dalek rakudo/nom: f37d574 | moritz++ | src/core/ (4 files):
05:19 dalek rakudo/nom: log()
05:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f37d57467e
05:19 dalek rakudo/nom: a08f69e | moritz++ | / (6 files):
05:19 dalek rakudo/nom: exp, infix ** for Complex
05:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a08f69ea4b
05:20 dalek roast: f59ce96 | moritz++ | S32-num/complex.t:
05:20 dalek roast: fudge complex.t for rakudo
05:20 dalek roast: review: https://github.com/perl6/roast/commit/f59ce96f64
05:25 moritz nom: say 3.1_41
05:25 p6eval nom: OUTPUT«0.0031␤»
05:26 perlhack left #perl6
05:27 perlhack joined #perl6
05:31 drbean joined #perl6
05:33 soh_cah_toa left #perl6
05:33 dalek rakudo/nom: a930204 | moritz++ | / (2 files):
05:33 dalek rakudo/nom: allow underscores in rat literals. Tests.
05:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a93020488f
05:34 moritz nom: say (1, 2, 3)>>.log
05:34 p6eval nom: OUTPUT«Could not find sub !dispatch_method_parallel␤current instr.: '_block1002' pc 97 ((file unknown):32624033) (:1)␤»
05:35 moritz colomon++ # putting so much work into the math part of master that porting the stuff to nom is almost trivial
05:39 moritz nom: all(1, 2)
05:39 p6eval nom: OUTPUT«Could not find sub &all␤current instr.: '_block1002' pc 80 ((file unknown):41743671) (:1)␤»
05:39 moritz nom: 1 & 2
05:39 p6eval nom: OUTPUT«Could not find sub &infix:<&>␤current instr.: '_block1002' pc 80 ((file unknown):40126807) (:1)␤»
05:42 moritz nom: say (1, 2, 3).map: *.exp
05:42 p6eval nom: OUTPUT«Method 'exp' not found for invocant of class 'Whatever'␤current instr.: '_block1002' pc 108 ((file unknown):58021931) (:1)␤»
05:43 moritz nom: say (1, 2, 3).map: exp(*)
05:43 p6eval nom: OUTPUT«Could not find sub &exp␤current instr.: '_block1002' pc 108 ((file unknown):68845163) (:1)␤»
05:43 moritz evalbot rebuild nom
05:43 p6eval OK (started asyncronously)
05:47 kaare_ left #perl6
05:49 dalek roast: a74d4c7 | moritz++ | S02-literals/subscript.t:
05:49 dalek roast: fudge subscript.t for nom
05:49 dalek roast: review: https://github.com/perl6/roast/commit/a74d4c749b
05:50 dalek rakudo/nom: 6f27881 | moritz++ | / (3 files):
05:50 dalek rakudo/nom: two more passing test files, add List.fmt, grep() accepts non-Code matchers
05:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f27881230
06:09 cooper left #perl6
06:09 woosley joined #perl6
06:17 am0c joined #perl6
06:23 thou hi, anyone up for looking at a rakudo problem? I'm not sure why i'm getting "Cannot resume dead coroutine"; i tried with rakudo * 2011.04 and current git master.  http://paste2.org/p/1500332
06:26 Bzek joined #perl6
06:49 benabik left #perl6
06:49 benabik joined #perl6
06:51 benabik left #perl6
06:51 benabik joined #perl6
07:00 thou_ joined #perl6
07:04 thou left #perl6
07:16 whiteknight left #perl6
07:16 [particle] left #perl6
07:17 [particle] joined #perl6
07:25 thou_ left #perl6
07:27 mj41 joined #perl6
07:36 jaldhar left #perl6
07:36 jaldhar joined #perl6
07:42 Mowah joined #perl6
07:49 wamba joined #perl6
07:50 tadzik good morning zebras
07:51 tadzik jnthn: are you around?
08:03 perlhack left #perl6
08:08 perlhack joined #perl6
08:09 isBEKaml joined #perl6
08:10 isBEKaml left #perl6
08:11 perlhack i came here again.
08:12 perlhack I am glad to see you
08:14 envi left #perl6
08:19 woosley left #perl6
08:31 am0c left #perl6
08:33 drbean left #perl6
08:50 envi joined #perl6
08:53 Su-Shee_ is now known as Su-Shee
08:54 daniel-s joined #perl6
08:57 envi left #perl6
09:04 Su-Shee hm, everyone ever heard of this book?! I'm confused. http://ebook-4free.net/ebook/perl-6-essentials.php
09:05 Su-Shee good morning.
09:05 tadzik good moritz Su-Shee
09:06 Su-Shee *hihi*
09:07 Su-Shee tadzik: haven't had a coffee yet? :)
09:09 tadzik oh snap
09:09 tadzik I need a more DWIM tab-completion
09:09 tadzik good MORNING Su-Shee :)
09:11 Su-Shee tadzik: pah minor semantic details.. I take a good whatever in the morning.. :)
09:24 perlhack I am here almost in the evening
09:28 tadzik time flies :)
09:28 xinming_ joined #perl6
09:31 xinming left #perl6
09:32 tadzik seen thou?
09:32 aloha thou was last seen in #perl6 3 hours 9 mins ago saying "hi, anyone up for looking at a rakudo problem? I'm not sure why i'm getting "Cannot resume dead coroutine"; i tried with rakudo * 2011.04 and current git master.  http://paste2.org/p/1500332".
09:34 tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep(* ne ''); say $a.perl
09:34 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/nEWs1EbFB4␤»…
09:34 tadzik there we are. Known bug?
09:34 tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep(1); say $a.perl
09:34 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/oiuC05H09N␤»…
09:34 tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl
09:34 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/iqwWixCws0␤»…
09:35 tadzik rakudo: my $a = 1, 2, 3; $a = $a.map({1}); say $a.perl
09:35 p6eval rakudo 72d158: OUTPUT«(1)␤»
09:36 tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep(* ne '').flat; say $a.perl
09:36 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/8QGFB8fj1v␤»…
09:36 shachaf left #perl6
09:36 tadzik ok, whatever, not flooding anymore :)
09:36 dolmen joined #perl6
09:41 agentzh joined #perl6
09:57 masak joined #perl6
09:57 masak felher: hm, interesting.
09:57 phenny masak: 02:59Z <felher> tell masak your connect-4-blog-post was great :D . Just one thing: Couldn't you've used "^$HEIGHT" instead of "0 .. $HEIGHT -1" and "^$N" instead of all the "0 .. $N - 1"? I find ^$XYZ a bit easier to read. Guess this is just a matter of taste, though. :)
09:58 masak felipe: I've been *wanting* to use ^$HEIGHT et al, especially in the connect-4 post.
09:58 masak but I figured it's the kind of sugar that makes sense to experienced Perl 6 programmers but only confuses beginners.
09:58 masak I also find ^$XYZ easier to read, and I write it all the time.
09:58 masak now I have to make a poll. :)
09:59 masak people of #perl6 -- please give me your answer during the day if you can -- 0..$HEIGHT-1 or ^$HEIGHT in day 25 of the June blogging?
10:00 pmichaud my guess is that 0..$HEIGHT-1 will be more readable to a newbie.
10:00 * masak has to reboot because his host OS is neurotic
10:00 masak left #perl6
10:01 tadzik pmichaud: is that grep issue known? (see 20 lines up)
10:01 pmichaud not known... looking
10:01 pmichaud rakudo:  my $a = 1;  say $a.flat
10:01 p6eval rakudo 72d158: OUTPUT«1␤»
10:01 pmichaud rakudo:  my $a = 1;  say $a.flat.WHAT
10:01 p6eval rakudo 72d158: OUTPUT«List()␤»
10:02 pmichaud rakudo:  my $a = 1;  say $a.flat.grep(1);
10:02 p6eval rakudo 72d158: OUTPUT«1␤»
10:02 pmichaud rakudo:  my $a = 1;  say $a.grep(1);
10:02 p6eval rakudo 72d158: OUTPUT«1␤»
10:02 pmichaud oh, that's in rakudo.
10:03 pmichaud my $a = 1;  $a = $a.grep(1);
10:03 pmichaud rakudo: my $a = 1;  $a = $a.grep(1);
10:03 p6eval rakudo 72d158:  ( no output )
10:03 pmichaud rakudo: my $a = 1;  $a = $a.grep(1); say $a;
10:03 p6eval rakudo 72d158:  ( no output )
10:03 pmichaud rakudo: my $a = 1;  $a = $a.grep(1); say $a.perl
10:03 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/stVq9uhXS1␤»…
10:03 pmichaud rakudo: my $a = 1;  $a = $a.grep(1); say $a.WHAT
10:03 p6eval rakudo 72d158: OUTPUT«List()␤»
10:03 perlhack left #perl6
10:03 pmichaud rakudo: my $a = 1;  $a = $a.grep(1); say $a.elems
10:03 p6eval rakudo 72d158: OUTPUT«0␤»
10:04 pmichaud nom: my $a = 1; $a = $a.grep(1);  say $a.perl;
10:04 p6eval nom: OUTPUT«(1,).list.item␤»
10:04 pmichaud it works in nom.  :-)
10:05 tadzik :)
10:05 pmichaud rakudo:  my $a = 1;  $a = flat($a).grep(1);  say $a.perl
10:05 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in 'Iterable::Numeric' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'infix:<==>' at line 1:src/gen/core.pm␤  in 'ACCEPTS' at line 3536:src/gen/core.pm␤  in <anon> at line 1567:src/gen/core.pm␤  in <anon> at line 1:src/metam…
10:06 pmichaud likely a list bug somewhere.
10:08 pmichaud I bet the gather/take is unneeded there anyway.
10:09 tokuhirom joined #perl6
10:11 nymacro left #perl6
10:15 lichtkind joined #perl6
10:17 Chillance joined #perl6
10:19 dalek rakudo/nom: 430e461 | pmichaud++ | src/core/Any.pm:
10:19 dalek rakudo/nom: Any.grep doesn't need a gather/take, .map is already lazy.
10:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/430e461fbf
10:21 Moukeddar joined #perl6
10:21 masak joined #perl6
10:24 mj41 left #perl6
10:25 snarkyboojum nom is exciting
10:29 masak snarkyboojum! \o/
10:31 tadzik seems that snarkyboojum is exciting too :)
10:31 PacoLinux joined #perl6
10:33 mj41 joined #perl6
10:34 snarkyboojum masak-san!
10:35 snarkyboojum tadzik-san! :)
10:35 Kivutarrr joined #perl6
10:36 agentzh left #perl6
10:39 Su-Shee where are you folks all on g+? I want a perl6 circle. ;)
10:40 pmichaud haven't gotten an invite yet
10:41 Su-Shee I can't send some out via email as of yet. I'm too unimportant.
10:41 moritz pmichaud: how are the constants e, i and pi supposed to work in nom?
10:42 pmichaud probably using the 'constant' keyword, which is nyi
10:42 moritz ok
10:42 moritz master cheated by using set_hll_global or some such
10:42 moritz I guess we don't want that in nom
10:42 moritz (and I guess it wouldn't work, due to the symboltable changes)
10:42 pmichaud I don't mind cheating here.
10:42 pmichaud but yes, it probably wouldn't work.
10:43 masak Su-Shee: I get tiny impulses to join Google+, but pretty soon I remember that I don't like to be social online.
10:44 snarkyboojum masak: other than on IRC? :)
10:44 masak I'd sign up for an anti-social network any day.
10:44 masak snarkyboojum: this is conversation, not collecting friends and tending to imaginary farmland.
10:44 Su-Shee masak: it's a convenient way of spreading and aggregation information - why does everyone think it has to be used as a "social" tool?
10:45 snarkyboojum Su-Shee: I received an invite, but was told that they were temporarily exceeding their capacity...
10:45 Su-Shee masak: like twitter, but with better grouping facilities.
10:45 Su-Shee snarkyboojum: I had to try a couple of times..
10:45 masak Su-Shee: even the "social" aspects of Google Reader bugs me. I just want to read my feeds -- I have no interest whatsoever in what people I know recommended.
10:45 snarkyboojum masak: I enjoy that distinction :)
10:45 MayDaniel joined #perl6
10:45 Su-Shee masak: I've disabled all that in the reader.
10:45 masak ooh
10:45 * masak didn't know that was an option
10:46 snarkyboojum Su-Shee: me2 :)
10:46 Su-Shee masak: I'm really using all of those kinds of tools as exactly that: convenient tools.
10:46 tadzik masak: speaking of anti-social, join diaspora :P
10:46 pmichaud I didn't even know there was a social aspect to Google Reader (and I use it all the time)
10:46 pmichaud I mean, I see a little button that says I can share things... but I've never explored it.
10:46 Chillance left #perl6
10:47 snarkyboojum I share and like frequently, esp on interesting Perl 6 stuff :)
10:47 masak Su-Shee: my point is this: as a survoval mechanism, I tend to avoid things that will "suck me in" and give diminishing returns. Google+ seems like such a tool -- yet another place to check "updates" to various things, to what end?
10:47 perlhack joined #perl6
10:47 Su-Shee I share often, preferably via twitter but I never like.
10:48 Su-Shee masak: no idea, I'm not using it that way. :)
10:49 masak it's bad enough with Twitter. I have slight issues with the knowledge that I didn't read parts of the firehose.
10:49 Su-Shee masak: for example, I've made a perl circle but also a circle of all my editors/publishers. so if I have something to offer to them, I could either create that via email - or I just drop them a note within this circle
10:49 masak Su-Shee: I hear you. will consider the ramifications of this.
10:50 * masak bikes to the .STORE to .FETCH things
10:50 Su-Shee masak: I'm very brutal anti-social-web, but I see the aggregation/multiplication features as very well done and convenient to use.
10:51 perlhack left #perl6
10:57 perlhack joined #perl6
10:58 perlhack hello again
11:01 perlhack left #perl6
11:01 perlhack joined #perl6
11:01 ab5tract joined #perl6
11:02 perlhack left #perl6
11:08 moritz Su-Shee: I have registered registrierterterrorist.de a long time ago for anti-social networking. I never got around to do anything useful with it :-)
11:09 MayDaniel left #perl6
11:09 Su-Shee moritz: that already is antisocial ;)
11:09 Su-Shee moritz: also excellent domain! :)
11:10 moritz :-)
11:10 Moukeddar antisocial ? isn't that like social phobia ?
11:11 moritz "anti" = "against"
11:11 moritz or "opposite"
11:12 perlhack joined #perl6
11:12 Su-Shee I'm very social. I'm just not socialwebsocial ;)
11:14 perlhack :-)which you are using Linux desktop ?
11:14 tadzik the idea of an anti-social network clarifies in my mind. You are not to have any friends, but you can try stalking on someone else. When you do, you see his/her activities, and he/she sees yours. Activities consist of stalking other persons, probably nothing else: what else could you do?
11:14 tadzik Do you think that could be a Facebook-killer?
11:14 tadzik perlhack: I do
11:14 * moritz too
11:14 perlhack which ?
11:15 tadzik which what?
11:15 Moukeddar well, the phobia makes you against :)
11:15 perlhack which Linux ?
11:15 tadzik Gentoo on my laptop, Ubuntu on the desktop
11:15 moritz tadzik: no, people don't stalk, people make terror attacks (on a map or so)
11:15 moritz Debian + FVWM2
11:15 tadzik moritz: what information does terror give you then?
11:15 Su-Shee moritz: I think they call that "risiko" for at least three decades now and sell it ;)
11:15 tadzik I have that :)
11:15 Su-Shee tadzik: travel advice for starters ;)
11:15 perlhack which is best to use ?
11:16 tadzik we can call this Mission: Terror
11:16 tadzik perlhack: whichever suits you best
11:16 tadzik there is no The Best Linux, if it were, there would be only one Linux at all
11:16 moritz tadzik: terror isn't about information :-)
11:16 perlhack thanks
11:16 perlhack ����
11:16 tadzik moritz: oh, so it's a different social aspect :)
11:16 Su-Shee it's more of a geolocation thing ;)
11:17 moritz tadzik: no, it's an antisocial aspect
11:17 tadzik touche
11:17 Su-Shee tadzik: congregating cells (good thing google didn't name the circles cells ;) is the social aspect
11:18 tadzik Su-Shee: then we could put circles on the areas
11:18 moritz maybe I should have written "anti-social anti-networking"
11:18 Su-Shee tadzik: *hihi*
11:18 moritz I didn't plan any networking things at all :-)
11:18 tadzik not even the network of dis-trust?
11:18 Su-Shee that already is again a social thing :)
11:18 tadzik this turns into mmorpg, or mmorts. Or mmoboardgame
11:19 Su-Shee moritz: you should think more along the lines of deprivation, isolation, ignorance etc. ;)
11:19 Su-Shee no wait, remove ignorance ;)
11:29 Instil___ left #perl6
11:30 perlhack left #perl6
11:34 Qiang left #perl6
11:43 PhatEddy joined #perl6
11:45 felher masak: +1 for ^$HEIGHT :)
11:51 whiteknight joined #perl6
11:52 jlaire +1 if 0..$N-1 has been used a couple time before
11:52 Chillance joined #perl6
11:55 zby_home_ left #perl6
12:04 masak it hasn't, not once.
12:10 ab5tract tadzik, there might be no The Best Linux, but distro hopping ceased for me after I found Arch
12:10 kaare_ joined #perl6
12:13 pmichaud masak: I voted for 0..$N-1 just before you disconnected, not sure you saw it.
12:14 pmichaud 10:00 <pmichaud> my guess is that 0..$HEIGHT-1 will be more readable to a newbie.
12:14 ab5tract moritz, re: anti-social networking, were you ever familiar with Utu: http://ihate.rubyforge.org/
12:14 pmichaud but you might also consider  0..^$HEIGHT  :-)
12:14 ab5tract moritz, and here: http://www.savingtheinternetwithhate.com/
12:17 mj41 left #perl6
12:19 envi joined #perl6
12:27 moritz ab5tract: didn't know about those back in 2006
12:27 wamba left #perl6
12:29 Moukeddar left #perl6
12:35 shachaf joined #perl6
12:37 PhatEddy perl6: my Num $x = NaN; my Num $y; say $x+2; say $y +2
12:37 p6eval pugs, rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«NaN␤2␤»
12:40 PhatEddy spec http://perlcabal.org/syn/S03.html#Declarators says "Native floating-point containers are by default initialized to NaN" which is why I tried that example.
12:42 tadzik ab5tract: yeah, Arch could be quite nice
12:43 PhatEddy perl6: my $x; if $x <=0 { say 'cmp OK' }
12:43 p6eval rakudo 72d158: OUTPUT«Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤cmp OK␤»
12:43 p6eval ..pugs, niecza v7-11-g9ba8284: OUTPUT«cmp OK␤»
12:43 PhatEddy perl6: my Int $x; if $x <=0 { say 'cmp OK' }
12:43 p6eval pugs, rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«cmp OK␤»
12:44 PhatEddy spec http://perlcabal.org/syn/S0​3.html#Comparison_semantics says "a comparison naturally throws an exception if either of its arguments is undefined"
12:46 moritz naturally.
12:48 PhatEddy So I am not sure which side is off but unless there is some objection will file bug reports on disagreement between implementation and spec.  Comments?
12:49 f00li5h joined #perl6
12:51 moritz +1 to bug report
12:51 masak pmichaud: yes, saw it. so far I agree.
12:52 masak pmichaud: I consider 0..^$HEIGHT to be "half-way" to 0..$HEIGHT-1 -- and as such, it has all the same problems of non-obviousness as ^$HEIGHT
12:53 masak not sure how noticeable it is, but I'm writing the games in a fairly narrow subset of Perl 6. not NQP, but the same type of sugarlessness.
12:54 masak er, sorry. meant to say '"half-way" to ^$HEIGHT'
13:04 buubot_backup left #perl6
13:14 dayangkun left #perl6
13:15 moritz masak: maybe use the non-abbreviated forms in the post, and then do a second post on how to abbreviate several things from the previous post?
13:15 mj41 joined #perl6
13:16 masak moritz: yes.
13:16 masak moritz: I've been having an increasingly pent-up desire to do a "what I'm not telling you" post or two.
13:17 masak here's my current plan: this "month's" posts are going to end up in a github repo somewhere, and compile to PDF.
13:17 mj41 left #perl6
13:17 masak they'll then get "The whole story" sections for each post, where I tell people the non-essential details I omitted in the post.
13:17 tadzik Release it as a book
13:17 masak that's essentially what will happen.
13:17 masak I just won't make a big deal out of it :)
13:18 masak it'll be a "resource" more than a book.
13:21 jon_______ left #perl6
13:24 mj41 joined #perl6
13:26 buubot_backup joined #perl6
13:31 mj41 left #perl6
13:31 TimToady niecza: my $a = 1, 2, 3; $a = $a.grep(* ne '').flat; say $a.perl
13:31 p6eval niecza v7-11-g9ba8284: OUTPUT«(1, ).list.item␤»
13:32 TimToady note that it should also probably say "Useless use of 2 in sink context"
13:32 masak I sink so too :)
13:35 TimToady you can't assign a list to a scalar without parens
13:36 * masak .oO( not without parenthetical supervision )
13:36 TimToady these days I think cmp should not be throwing exceptions
13:36 masak +1
13:38 masak perhaps the default to .sort should be *.Str, like in Perl 5.
13:39 Chillance left #perl6
13:42 TimToady that's another viable approach
13:43 masak I was thinking both of them, combined.
13:44 masak because what doesn't make sense is to sort a list of heterogenous items and expect them to broker a cmp without any prior knowledge of the types.
13:44 TimToady well, the policy is that default sort should not be throwing exceptions
13:44 TimToady how we get there is negotiable
13:44 masak Perl 5 cuts that gordian knot by imposing string comparison semantics.
13:44 TimToady the other viable approach is to sort on type first and then cmp
13:45 TimToady that will give better results within a type, at the expense of making similar types look nonsensical
13:45 masak I already see people being surprised when their numbers from lines() are sorted using string comp semantics. I'd much rather tell them "sort assumes .Str by default" than "well, those numbers are really strings, you see".
13:46 TimToady it has worked pretty well for p5 anyway
13:46 bluescreen10 left #perl6
13:46 bluescreen10 joined #perl6
13:47 TimToady perhaps .gist, since we're taking away last-ditch-ness from .Str
13:48 PhatEddy perl6: my Str ($a) = ()
13:48 p6eval pugs, niecza v7-11-g9ba8284:  ( no output )
13:48 p6eval ..rakudo 72d158: OUTPUT«Type check failed for assignment␤    Container type: Str␤               Got: Nil␤  in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in main program body at line 1:src/metamodel/RoleToInstanceApplier.nqp␤»
13:49 TimToady nom: my Str ($a) = ()
13:49 p6eval nom: OUTPUT«Type check failed in assignment to '$a'; expected 'Str' but got 'Nil'␤current instr.: '_block6560' pc 304408 (src/gen/CORE.setting.pir:83896) (:1548)␤»
13:49 TimToady nom: my Str ($a) = Nil
13:49 p6eval nom: OUTPUT«Type check failed in assignment to '$a'; expected 'Str' but got 'Nil'␤current instr.: '_block6560' pc 304408 (src/gen/CORE.setting.pir:83896) (:1548)␤»
13:49 TimToady nom: my Str $a = Nil;
13:49 p6eval nom: OUTPUT«Type check failed in assignment to '$a'; expected 'Str' but got 'Nil'␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
13:50 TimToady rakudo: my Str $a = Nil;
13:50 p6eval rakudo 72d158: OUTPUT«Type check failed for assignment␤    Container type: Str␤               Got: Nil␤  in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in main program body at line 22:/tmp/jK7jxCEjPS␤»
13:50 * TimToady is a bit surprised that fails
13:51 masak while writing connect-4 yesterday, I got a "can't modify rw thingie" from inside the reduction metaoperator. I was too focused on the game to track it down, but I could probably reproduce it.
13:51 masak (was doing [eq], so it was definitely a bug)
13:54 donri joined #perl6
13:55 Qiang joined #perl6
13:56 PhatEddy The case of of not enough initializers I thought I understood well enough for a bug report but I am less sure of the scalar assignment to Nil.  I am guessing scalar assignment to nil usually does nothing?
13:57 PhatEddy s/to nil/from nil/
13:58 TimToady see S02:2240
13:58 molaf joined #perl6
14:05 PhatEddy nom: my $x = Nil; say $x.perl
14:05 p6eval nom: OUTPUT«Nil␤»
14:05 PhatEddy rakudo: my $x = Nil; say $x.perl
14:05 p6eval rakudo 72d158: OUTPUT«Any␤»
14:05 dolmen left #perl6
14:06 PhatEddy rakudo is OK here I'm guessing ...
14:06 TBA2 left #perl6
14:06 TimToady yes
14:06 TBA2 joined #perl6
14:07 * TimToady must get his family out of the hotel in, lessee...52 minutes
14:15 masak not only Perl 6 are having perceived naming issues: http://news.ycombinator.com/item?id=2722413
14:15 masak s/are/is/
14:27 Tedd1 left #perl6
14:38 masak rakudo: role R[R $r] {}; class C does R[R] {}; say C.new
14:38 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 22, near " $r] {}; c"␤»
14:38 masak nom: role R[R $r] {}; class C does R[R] {}; say C.new
14:38 p6eval nom: OUTPUT«Invalid typename in parameter declaration at line 1, near " $r] {}; c"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
14:38 masak std: role R[R $r] {}; class C does R[R] {}; say C.new
14:38 p6eval std 37a0cdd: OUTPUT«ok 00:01 122m␤»
14:45 TimToady commuting to our next locale (ugh, locales...) &
14:45 TimToady may be back in a few hours...or not...
14:57 masak rakudo: class Back { method in {} }; my $a-few-hours; my $may = Back.in(:$a-few-hours) or not Back.in(:$a-few-hours); say "alive"
14:57 p6eval rakudo 72d158: OUTPUT«alive␤»
14:57 masak \o/
15:01 jlaire rakudo: sub postfix:<or_not>($x) { $x or not $x }; 42 > 9001 or_not; say "alive"
15:01 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "42 > 9001 "␤»
15:01 wamba joined #perl6
15:01 jlaire rakudo: sub postfix:<or_not>($x) { $x or not $x }; (42 > 9001) or_not; say "alive"
15:01 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "(42 > 9001"␤»
15:04 DarthGandalf joined #perl6
15:07 masak jlaire: postfixes need to be right next to the thing they're modifying.
15:07 masak rakudo: sub postfix:<or_not>($x) { $x or not $x }; (42 > 9001)or_not; say "alive"
15:07 p6eval rakudo 72d158: OUTPUT«alive␤»
15:07 masak rakudo: sub postfix:<or_not>($x) { $x or not $x }; (42 > 9001)\      or_not; say "alive"
15:07 p6eval rakudo 72d158: OUTPUT«alive␤»
15:07 masak ...or use unspace :)
15:07 flussence std: sub postfix:('          nope') { };
15:07 p6eval std 37a0cdd: OUTPUT«ok 00:01 121m␤»
15:08 flussence ...I hope that doesn't work
15:08 masak I think not.
15:08 masak I don't remember the exact rationale for this behavior with postfixes, but it does disambiguate them pretty effectively from corresponding infixes.
15:08 flussence I assume a unicode non-breaking space won't work either?
15:08 masak correct.
15:09 masak any whitespace takes you out of whatever mode expects a postfix or a postcircumfix.
15:09 jlaire masak: oic
15:09 flussence (you can do all sorts of evil things using it in PHP since it doesn't know unicode...)
15:13 masak seems S02:307 expounds on why there can't be whitespace before postfix.
15:16 birdwindupbird joined #perl6
15:20 mj41 joined #perl6
15:24 envi left #perl6
15:25 bloonix left #perl6
15:26 bloonix joined #perl6
15:26 arnsholt_ joined #perl6
15:26 arnsholt left #perl6
15:27 lichtkind left #perl6
15:27 Grrrr left #perl6
15:29 amkrankruleuen left #perl6
15:29 apejens left #perl6
15:30 amkrankruleuen joined #perl6
15:32 envi joined #perl6
15:36 am0c joined #perl6
15:37 cooper joined #perl6
15:37 bluescreen10 left #perl6
15:37 bluescreen100 left #perl6
15:38 tokuhirom left #perl6
15:44 Grrrr joined #perl6
15:47 zby_home joined #perl6
15:49 arnsholt_ is now known as arnsholt
15:55 envi left #perl6
16:03 Instil joined #perl6
16:04 envi joined #perl6
16:11 Qiang1 joined #perl6
16:13 cpk joined #perl6
16:14 Qiang left #perl6
16:17 cpk hi there !
16:17 phenny cpk: 11 Mar 01:30Z <sorear> tell cpk I have a vague suspicion that on Windows Niecza isn't recognizing "\x0A" ~~ /\v/, and so rcrpg.pl is being interpreted as on one line, with the resulting right brace issues
16:17 phenny cpk: 11 Mar 01:31Z <sorear> tell cpk [300 Mo Win64, 30 Mo Win32] Are both of those measurements for the second run?  Sounds like more confusion from the "setting autocompilation on first run" wart.
16:17 masak hi, cpk.
16:18 cpk I have soome issue with niecza and the rcrpg.pl cript
16:18 cpk i have already reported this issue for the v4
16:18 cpk eror is : Any()Strange text after block (missing comma, semicolon, comment marker?)
16:19 barika left #perl6
16:19 cpk here is an old message from sorear
16:19 cpk <sorear> tell cpk I have a vague suspicion that on Windows Niecza isn't recognizing "\x0A" ~~ /\v/, and so rcrpg.pl is being interpreted as on one line, with the resulting right brace issues
16:19 cpk I still have the problem with the v7
16:19 cpk I'm running the script under windows x64
16:20 cpk just wanted to share this issue again
16:21 cpk however the script test.pl doesn't report ant error
16:21 cpk any error
16:22 mj41 left #perl6
16:23 cpk a good point is that I have no more the memory issue I reported few months ago
16:24 cpk sorear: do you want I report this issue somewhere on the web ?
16:24 chhet joined #perl6
16:27 apejens joined #perl6
16:33 dalek mu: 44d088d | jimmy++ | docs/zh-cn/syn/S02-bits.pod:
16:33 dalek mu: revise wording a bit
16:33 dalek mu: review: https://github.com/perl6/mu/commit/44d088ddc2
16:40 tadzik masak: reading http://strangelyconsistent.​org/blog/june-24-2011-types what does "Cool" stand for?
16:40 tadzik just came to my mind, and maybe it'd be easier to understand besides the punny meaning
16:41 tadzik also, noremal -> normal I think
16:41 tadzik also, nice post :)
16:43 daniel-s left #perl6
16:44 mj41 joined #perl6
16:45 masak tadzik: thanks :)
16:45 masak tadzik: hm, it didn't even occur to me to unravel "Cool", even though I know it's really an acronym.
16:46 masak tadzik: thinking about it, I don't consider saying "Convenient Object-Oriented Loopbacks" to a 12-year-old any help at all.
16:47 masak re typo: thanks, fixing.
16:48 barika joined #perl6
16:48 tadzik is the series aimed at 12 yo'lds? :)
16:58 lichtkind joined #perl6
17:04 masak yes.
17:04 masak in theory, at least.
17:05 masak http://strangelyconsistent.org/blog/a-month​-of-blogging-about-programming-fundamentals
17:05 Qiang1 left #perl6
17:09 noganex joined #perl6
17:12 cotto pmichaud | moritz, ping
17:12 noganex_ left #perl6
17:14 pmichaud cotto: pong
17:15 cotto pmichaud, my understanding of whiteknight and my role as relationship managers is that when someone from Rakudo is having a Parrot problem that's not being adequately resolved, we're the people you can talk to to get it resovled.
17:15 cotto Is there anything else that the role implies, or is it usually the Rakudo folks' responsibility to raise issues?
17:16 pmichaud At the moment, I see it primarily as a "problem escalation mechanism", so there aren't many other roles at the moment.
17:16 pmichaud s/roles/duties/
17:16 cotto ok.  That was my understanding too.  Thanks.
17:17 Moukeddar joined #perl6
17:17 pmichaud However, I can see that it might not always be for "problems", it could also be that we're a smaller group that discusses longer-term strategic planning.
17:17 pmichaud i.e., coordinating major efforts between the two projects.
17:18 cotto ok.  I'm glad I asked then.
17:18 pmichaud I also conceive it could happen in reverse -- i.e., a Parrot dev is having a Rakudo problem that needs resolution.
17:18 pmichaud That's much less likely, but it could happen.
17:19 pmichaud so, whenever something comes up that requires "high-level" coordination and decision making between the two projects, we're the Supreme Court of sorts.  :)
17:19 cotto wfm
17:20 pmichaud in some ways we get to be the Rakudo/Parrot cabal.  :-) :-)
17:21 pmichaud afk for a bit
17:23 masak \o/ Rakudo/Parrot cabal.
17:24 masak everyone on the outside seems to assume that's how it works, so we might as well do it. :P
17:26 cotto I've got a great smoke-filled room I can use for a couple hours a week.
17:26 Moukeddar left #perl6
17:33 PhatEddy left #perl6
17:37 birdwindupbird left #perl6
17:37 birdwindupbird joined #perl6
17:45 masak cotto: :)
17:55 birdwindupbird left #perl6
18:03 masak more opinion: http://me.veekun.com/blog/2011/06/27/​perl-5-is-dead,-perl-6-is-a-disaster/
18:03 whiteknight left #perl6
18:05 orafu left #perl6
18:05 masak he's right insofar as arguing about naming won't help anything :)
18:05 orafu joined #perl6
18:07 masak also, why do people have a tendency to speak up *after* they've stopped being excited about Perl 6?
18:07 masak they're more useful to the Perl 6 world while they're excited. we have absolutely zero use for past excitement.
18:11 natureboy joined #perl6
18:12 chhet left #perl6
18:12 cooper left #perl6
18:18 jlaire "They're not doing anything to attract newcomers" doesn't sound right, and I wonder why he thinks the devs should be marketing a "disaster" anyway
18:21 natureboy left #perl6
18:21 cooper joined #perl6
18:25 masak it's easy to form opinions. it takes effort to check them against fact.
18:25 masak unfortunately, opinions seem to have a better reach than fact. :/
18:26 jlaire your over-sensationalist tweet is a good example :P
18:28 * jlaire goes back to writing code
18:34 lichtkind masak: he is negative about nearly anything :)
18:35 dolmen joined #perl6
18:36 masak I see :)
18:37 lichtkind i once wanted to blob of the psychology of those rants
18:37 lichtkind masak: he is recently atracted to python and that was propably his way to say sorry but i want to leave
18:38 lichtkind but it takes more guts make cleare decision than to smear other peoples work to let make it  obviouse so have to leave
18:38 lichtkind my grandma does this also sometimes
18:39 cpk left #perl6
18:40 donri left #perl6
18:40 lichtkind i i want to get famous i just have to announce herberts law: every software projects looks like a disaster if you look just deep enough
18:41 masak ;)
18:43 arnsholt lichtkind: I think anything is a disaster once you look close enough =)
18:44 masak verily, the older I get, the more it seems a fluke that the world actually runs at all.
18:45 offby1 joined #perl6
18:46 thou joined #perl6
18:46 offby1 is there a way at runtime to find out the methods present on an object?  For example, if I hav a string 'bob', I'd like to be able to type (at an interactive perl6 prompt) something like 'bob'.METHODS and see a list of things I could do with that string.
18:47 offby1 In Python there's something similar, called "dir"; I can type dir ('a string') and see lots of string methods.
18:47 masak rakudo: say "bob".^methods(:local).perl
18:47 thou offby1:  try:  $obj.^methods
18:47 p6eval rakudo 72d158: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }]␤»
18:47 offby1 fab! thanks
18:47 masak rakudo: say "bob".^methods(:local)>>.name.perl
18:47 p6eval rakudo 72d158: OUTPUT«("ACCEPTS", "perl", "pred", "succ", "WHICH", "Bool", "Str", "encode", "indent")␤»
18:47 thou offby1: the .^ means "this objects meta-object"
18:47 offby1 oho
18:48 offby1 figured there's be something simple.
18:48 thou o/ masak!
18:48 masak thou: \o
18:48 masak rakudo: say "bob".WHAT; say "bob".^WHAT
18:48 p6eval rakudo 72d158: OUTPUT«Str()␤too many positional arguments: 2 passed, 1 expected␤  in main program body at line 22:/tmp/1fRq1yww6Q␤»
18:48 masak rakudo: say "bob".WHAT; say "bob".HOW.WHAT
18:48 p6eval rakudo 72d158: OUTPUT«Str()␤ClassHOW()␤»
18:49 thou masak, have you seen an error like this before: http://paste2.org/p/1500332  # "Cannot resume dead coroutine"
18:49 masak that 'ClassHow' is the name of the class metaobject.
18:49 masak thou: yes, but it was a while ago.
18:49 masak thou: usually having to do with gather.
18:49 * masak looks
18:50 thou this is a really simple (it seems) test case, i tried it with current rakudo master (from last night)
18:50 masak try commenting out line 15 and running again.
18:51 thou ok
18:52 thou masak: same stack trace
18:52 masak ok, I didn't expect that. interesting.
18:52 masak I'll try to reproduce it here.
18:52 tadzik thou: I found the bug in that
18:52 thou tadzik: oh, cool
18:52 masak yep, getting the same error.
18:52 tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl
18:53 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/h4QIKp4KYt␤»…
18:53 masak oh!
18:53 thou tadzik: thanks for boiling it down.
18:53 * masak submits rakudobug
18:53 masak tadzik++
18:53 masak rakudo: my $a = 1; my $b = $a.grep({1}); say $b.perl
18:53 p6eval rakudo 72d158: OUTPUT«(1)␤»
18:54 masak rakudo: my $a = 1; $a = $a.grep({1}); say $b.perl
18:54 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Symbol '$b' not predeclared in <anonymous> (/tmp/0QpKc9Tjrh:22)␤»
18:54 masak rakudo: my $a = 1; $a = $a.grep({1}); say $a.perl
18:54 thou nom: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl
18:54 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/9RH76vqCP_␤»…
18:54 p6eval nom: OUTPUT«(1,).list.item␤»
18:54 masak rakudo: my $a = 1; $a = $a.grep(True); say $a.perl
18:54 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/RXwzWQ5X9b␤»…
18:54 masak rakudo: my $a = $a.grep(True); say $a.perl
18:54 p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤  in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::perl' at line 2868:src/gen/core.pm␤  in main program body at line 22:/tmp/vzVuEJqIQ9␤»…
18:55 thou weird that this hasn't shown up before
18:56 masak assignments with the same container in both the lhs and rhs being problematic has shown up before.
18:56 masak but the case I'm thinking of was about hashes.
18:58 masak ah; that's http://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=77586
18:58 thou masak: btw, i'm making some progress on the november tests. mostly easy stuff to fix.
18:58 masak \o/
18:58 thou not had a ton of time to work on it, but i'm learning and so it's fun!
19:00 thou masak: looks like "fixed in nom" is sufficient for closing rakudo bugs? which is cool; i guess filing a bug serves as documentation for rakudo users still
19:01 masak I'm not so sure why it should be considered sufficient.
19:01 masak but I'm not going to be a stickler about it either.
19:01 thou i inferred that from pm's comment on the bug
19:01 thou on 77586
19:02 thou well, "fixed in nom + spectest exists for this behavior" is sufficient
19:02 birdwindupbird joined #perl6
19:03 thou i guess it's a good measure of Pm's confidence in basing the next rakudo release on nom
19:03 masak it is. and it'd be kinda silly at this point to argue that that might not happen.
19:03 masak still everything else in RT is measured against rakudo master.
19:04 masak BooK: ping
19:04 donri joined #perl6
19:04 * thou has potatoes to peel. thanks masak++ and tadzik++ !
19:05 masak rakudo: my $a = $a.map({1}); say "alive"
19:05 p6eval rakudo 72d158: OUTPUT«alive␤»
19:05 offby1 rakudo: {a=>1, b=>2} eq {b=>2, a=>1}
19:05 p6eval rakudo 72d158:  ( no output )
19:05 offby1 rakudo: {a=>1, b=>2} eq {b=>2, a=>1};
19:05 p6eval rakudo 72d158:  ( no output )
19:05 offby1 hmm
19:05 masak offby1: 'say'
19:05 offby1 ah
19:06 offby1 rakudo: say {a=>1, b=>2} eq {b=>2, a=>1};
19:06 p6eval rakudo 72d158: OUTPUT«Bool::False␤»
19:06 offby1 ok, how would I compare hashes, without regard to order?
19:06 offby1 I was hoping that'd have returned True.
19:06 masak first off, that's a string comparison.
19:06 offby1 oops
19:06 offby1 hence the False
19:06 masak rakudo: say {a=>1, b=>2}.Str
19:06 p6eval rakudo 72d158: OUTPUT«a 1␤b     2␤␤»
19:06 offby1 sure
19:07 masak hm, isn't this what 'eqv' does?
19:07 masak rakudo:  say {a=>1, b=>2} eqv {b=>2, a=>1}
19:07 p6eval rakudo 72d158: OUTPUT«Bool::True␤»
19:07 masak \o/
19:07 offby1 rakudo: say {a=>1, b=>2} ~~ {b=>2, a=>1};
19:07 p6eval rakudo 72d158: OUTPUT«Bool::True␤»
19:07 offby1 /~\
19:08 masak /~~\
19:09 offby1 any pros & cons for "eqv" versus ~~ ?
19:09 offby1 speed, generality, etc ?
19:09 masak eqv feels more specific.
19:09 masak that's basically what will happen in both cases anyway.
19:11 offby1 as it happens, I'm using the Test module, which lets me use "eqv" via its "is_deeply" thing, but doesn't appear to provide access to ~~, so .... 'eqv' it is.
19:20 lue hello world! o/
19:22 Bzek left #perl6
19:25 masak hi there lue \o
19:25 tokuhirom joined #perl6
19:27 envi left #perl6
19:45 ab5tract left #perl6
19:47 * TimToady debounces at Franklin
19:47 soh_cah_toa joined #perl6
19:48 TimToady there's intertubes here, as you might deductify
19:49 masak Franklin++
20:04 kaare_ left #perl6
20:06 birdwindupbird left #perl6
20:11 lichtkind thou: hai
20:12 thou lichtkind: hallo. was ist los?
20:12 thou was machst du für das 4th of July?
20:13 masak er... nothing, since we're in Europe? :)
20:13 thou i know. just kidding.
20:13 masak :P
20:13 masak "Independence! Oh wait."
20:14 thou we have a friend here visiting from guatemala, and she wanted to see an american thanksgiving, so we're having thanksgiving today with a bunch of friends
20:14 thou we'll have like 25 people there i think
20:14 masak that must feel slightly odd.
20:14 masak it's so season-bound, I mean.
20:14 thou not typical for a 4th of july get-together, but it'll be fun!
20:14 thou yeah
20:14 thou it's too hot to be cooking so much inside :-)
20:15 thou it'll definitely have a different feel somewhat, since we're going to be drinking beer outside on the porch and enjoying the fireworks later in the evening
20:15 thou but, it'll be american all around, i guess
20:17 Util If I say `my $j = 1|2|3;`, how can I later remove the 2 from the junction, making it just 1|3 ?
20:17 moritz Util: you don't
20:18 moritz Util: if you want that, you're abusing junctions as sets
20:18 moritz or glorified lists
20:18 moritz (I mean theere are ways, but they are very hacky)
20:18 Util moritz: point taken. Thanks!
20:18 * masak recomments Set
20:19 masak recommends*, gah
20:19 moritz rakudo: sub f($x) { $x == 2 ?? 3 !! $x }; say f(1|2|3).perl
20:19 p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
20:19 BooK masak: pong
20:19 masak BooK: fairly short afterwards, I realized there's something wrong with https://gist.github.com/1045125
20:20 masak BooK: the level-4 call should yield 15 nodes, not 11.
20:20 masak but I don't know what's wrong yet. the code looks OK :/
20:20 BooK oh
20:20 masak just thought I'd let you know. it's probably something trivial, not a show-stopper.
20:22 Util rakudo: sub f { $^x if $^x != 2 }; say f(1|2|3).perl
20:22 p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
20:23 masak rakudo: sub separate-out($e, $j) { $j if $j != $e }; say separate-out(2, 1|2|3).perl
20:23 p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
20:23 perlin joined #perl6
20:24 moritz still, if you use junctions for anything but simple matchers, you are doing it RONG
20:24 bitpart joined #perl6
20:24 Util rakudo: my $j = 1|2|3; my $k = map { $_ if $_ != 2 }, $j; $k.perl.say;
20:24 p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
20:24 moritz people read about junctions, get all excited, and decide to use them for solving equations and other fancy stuff
20:24 moritz and then run into limitations
20:25 masak I have a built-in aversion for junctions escaping from subroutines. I tend to add a '?' or a 'so' just so it doesn't leak junctions.
20:25 masak (when it generates one, that is)
20:25 Util moritz: Yes, I had already changed my code to not use junctions; I was just following up on my "note to self".
20:26 arnsholt moritz: "Some people, when confronted with a problem, think
20:26 moritz masak: yes, that's sane-ish
20:26 moritz arnsholt: :-)
20:26 arnsholt “I know, I'll use junctions.”   Now they have two problems."
20:26 arnsholt With apologies to jmz
20:27 arnsholt =)
20:27 tadzik now they have all() problems :(
20:27 arnsholt =D
20:27 arnsholt Or any() problem
20:27 Util none()  :^)
20:28 moritz colomon: now that we don't test the trig functions with all the bases, shouldn't we try to make them much more simple again?
20:28 tadzik I've got 99 problems, but Junctions aren't one()
20:30 soh_cah_toa what does the "is export" attribute do when applied to subroutines/methods?
20:30 soh_cah_toa colomon told me at yapc but i forget. i know it's supposed to replace the Exporter module or something
20:30 Util FYI, was for http://rosettacode.org/wiki/Dinesman​'s_multiple-dwelling_problem#Perl_6
20:30 tadzik soh_cah_toa: they are imported into the namespace when you use a module
20:31 moritz soh_cah_toa: on a subroutine it means that somebody who 'use's this module can import the sub
20:31 soh_cah_toa oh, so you don't need `our @EXPORT = qw/foo bar baz/`
20:31 moritz soh_cah_toa: on a method it means that a subroutine is automatically generated from the method
20:31 moritz soh_cah_toa: correct
20:31 tadzik soh_cah_toa: so after you use https://github.com/perlpilot/bench​mark/blob/master/lib/Benchmark.pm6 timethis() is available for you
20:32 soh_cah_toa tadzik: that's exactly what i'm looking at :)
20:32 masak small world :)
20:32 soh_cah_toa how would i achieve behavior similar to @EXPORT_OK?
20:34 masak soh_cah_toa: see S11 -- Exportation.
20:34 soh_cah_toa ok great
20:35 masak http://perlcabal.org/syn/S11.html#Exportation
20:35 Eevee 11:07 < masak> also, why do people have a tendency to speak up *after* they've stopped being excited about Perl 6?
20:35 Eevee ^ I wrote a couple patches for rakudo years ago; but I didn't have a lot of spare time, and the whole ecosystem kept getting rewritten too fast for me to keep up
20:36 tadzik :)
20:38 masak well, there is that.
20:39 masak but this whole operation is like, Perl (5 and 6) fought hard to remain relevant in the changing IT world. it succeeded. now the only thing that needs doing is to convince the world that it succeeded.
20:43 PacoLinux left #perl6
20:44 Eevee part of what frustrates me (and prompted the blog post) is that perl 5+6 both seem to be trying to fix what "succeed" means rather than fix perl
20:44 pmichaud anyone have a cool name for a new version of PAST (to be bundled as part of NQP)?
20:45 masak pmichaud: 'PAST perfect'? :)
20:45 yunga joined #perl6
20:45 moritz no, but it reminds me of something I thought of while waking up tonight...
20:45 moritz erm, yesterday night
20:45 moritz phenny: tell sorear about a name idea for niecza: "FeP6" - like "Iron Perl 6", but with the symbol Fe for iron :-)
20:45 phenny moritz: I'll pass that on when sorear is around.
20:46 thou left #perl6
20:46 masak Eevee: I get angry when I hear that. Perl 6 is pretty nice. people here are implementing it. you're saying they're redefining "succeed". I don't like that.
20:47 pmichaud Eevee:  I spend far more hours writing Perl 6 than I do writing about the meaning of "succeed" for it.
20:47 mj41 left #perl6
20:47 Eevee well that's great
20:47 Eevee I know work is being done, I don't mean to downplay that
20:48 pmichaud "both seem to be trying to fix what 'succeed' means rather than fix perl"  definitely sounds like downplaying that.
20:48 pmichaud fixing perl is hard.  For both 5 and 6.
20:48 masak Eevee: you don't seem to be quite in control of what you're saying, then.
20:48 pmichaud you're frustrated by the fact that it's hard and that progress is slow in coming.  We share that frustration.
20:49 Eevee perhaps not.  please give me the benefit of the doubt for a moment; I have no interest in merely slandering perl
20:50 perlin left #perl6
20:50 masak and I have no interest in shouting at someone who seems to have generally good intentions, but is expressing them clumsily :)
20:50 pmichaud moritz: heh.  I was thinking of naming a sub-branch of nqp as  "nqp-au"  ("gold")
20:52 pmichaud soon we'll be fighting over element symbols.  I call Promethium, for what it's worth.  :-P
20:52 masak dibs on Molybdenum!
20:55 * moritz claims Palladium and Platin
20:55 pmichaud I feel I should also point out that Perl 6 is being built as a disruptive technology.  We plan to compete on attributes other than pure speed, at least initially.  (My target is to be within 10x of Perl 5.)
20:55 masak when you say "perl 5+6 both seem to be trying to fix what "succeed" means rather than fix perl" and then "I know work is being done, I don't mean to downplay that", which version of you should I talk with?
20:55 pmichaud after all, Perl 5 is a lot slower than C, but that doesn't mean it isn't useful.
20:56 pmichaud Also, I invite you to try comparing the speed of Rakudo against   perl -e 'use Moose;'   :-P
20:56 moritz use Moose; use MooseX::Declare;
20:56 masak and some other modules.
20:56 Eevee masak: not in all areas.  but people on the outside wanting a "finished" perl 6 come to mind.
20:56 moritz yes, autobox;
20:57 pmichaud Do we have a "finished" perl 5?  if so, what's all the fuss?  ;-)
20:57 masak Eevee: I want a finished Perl 6 too, to the extend that makes sense.
20:57 masak extent*
20:57 Eevee pmichaud: see, that's technically correct, but doesn't really address what those people *want*  :P
20:57 masak Eevee: there's no difference between people on the inside and people on the outside in that regard.
20:57 masak we just happen to both want it and build it :)
20:58 * moritz builds it because he wants it, and because building it is fun
20:58 pmichaud People want a Perl 6 that they can feel comfortable will solve the same set of problems (even more) that Perl 5 can currently solve.  It's taken Perl 5 a long time to get to where it is now, and it had a bigger head start than we did (it could build on top of Perl 4.  We've rewritten from scratch.)
20:58 colomon left #perl6
20:59 masak pmichaud: that's what I said at YAPC::Russia, only better expressed.
20:59 masak pmichaud++
20:59 pmichaud you expressed it better?  what was your version?  ;-)
20:59 masak no no, :)
20:59 masak I liked your version better.
20:59 Eevee masak: but for quite some time, such people were told "perl 6 is a spec, not a compiler" or "rakudo is working right now".  and those are true, and I sympathize with them from an engineering view.  but it sounds like brushing off the question
21:00 Eevee there is rakudo star now, though it still gives a bit of an impression of a blessed nightly
21:00 pmichaud and when people say "you've had 10 years", yes, that's true, but we lost the first four years discovering that Perl 5 wasn't powerful enough to write Perl 6.
21:00 masak I said something like "Perl 5 was 13 years old when Perl 6 got going, and people had expectations from the get-go that it would be *better* than Perl 6, and at once. It doesn't quite work like that."
21:00 pmichaud (and I've only been on the project for about 6 years, with forced extended absences every year or so)
21:01 masak Eevee: we say those things not to evade facing failure, but because they're true.
21:01 masak Eevee: if you have any concrete problems with Rakudo Star, please report them to us.
21:02 masak if it's just "a bit of an impression", then I'm sorry, that's basically your problem.
21:02 dalek rakudo/nom: f131a60 | moritz++ | src/core/Numeric.pm:
21:02 dalek rakudo/nom: sin, cos, tan as functions
21:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f131a60e8d
21:03 pmichaud afk, hacking
21:03 masak how can you hack away from the keyboard? :P
21:03 pmichaud (yes, that's correct.  I'm  hacking away from my keyboard :-)
21:04 pmichaud I found this cool new technology based on papyrus.
21:04 masak doing design? that's cheating!
21:04 pmichaud that and a non-electric "stylus" means I can do some pretty good design and coding.  :)
21:04 masak yeah, but how do you commit? huh, huh?
21:04 Eevee masak: that doesn't seem very productive.  isn't it perl 6's problem if people aren't getting the impression that they should use perl 6?
21:05 pmichaud usually by tossing some of the papyrus into the "waste bin"
21:05 pmichaud Eevee: sure.  and we're working on that.  We're taking the key pain point ("speed") and fixing that.
21:05 masak Eevee: not if they can't express clearly why they're having that impression. we can only address concrete things, one at a time. not ghosts.
21:06 Eevee unfortunately ghosts are the heart of marketing
21:06 pmichaud Our target isn't to be as fast as Perl 5.  Our target is to be fast enough that it's not painful for the folks whose problems map well into Perl 6.
21:06 Eevee (and I hate marketing)
21:06 am0c left #perl6
21:06 masak if someone comes here and says "it doesn't feel too good", then we're at a loss how to fix it. and the problem remains squarely at the customer.
21:06 Eevee that is true
21:06 masak that's what you described.
21:06 pmichaud really afk now
21:07 Eevee but explaining to the customer that their feeling is invalid doesn't make the feeling go away
21:07 masak no, and I didn't say that.
21:07 masak you're very welcome to explain your impression to us in concrete terms.
21:08 masak measurable, verifiable stuff.
21:08 masak we have an RT full of 800 of those. and thousands of fixed ones.
21:08 masak that's how progress is carried out.
21:10 moritz evalbot rebuild nom
21:10 p6eval OK (started asyncronously)
21:11 Eevee that's how you build a good product, yes.  it's not the entire story of how you build a /popular/ product.
21:11 Eevee the most common and obvious question for an outsider is "when will there be a 1.0?"
21:11 masak aye.
21:12 moritz the best way to overcome that is to build cool stuff with Perl 6, and talk about it
21:12 Eevee but the responses are usually about why 1.0 isn't a thing to expect.  even if perfectly rational and correct, that still gives off an air of "your problem doesn't matter"
21:13 frettled Eevee: Have you ever noticed how version numbers are used in marketing to give false impressions regarding the 1.0-ness of products?
21:13 frettled Eevee: And how does it feel to you that nobody's lying about Perl 6 in that regard, as opposed to most other products? :)
21:13 Eevee oh, yes, I know.  instantbird just jumped from 0.2 to 1.0 because windows users kept asking when it would be "stable"
21:13 Eevee it doesn't really need to be called 1.0  :P
21:14 frettled Word 2.0 -> 6.0
21:14 frettled Emacs 0.xx.yy to Emacs xx.yy
21:14 Mowah left #perl6
21:14 frettled GCC anything
21:14 frettled (and IMNSHO, Microsoft anything)
21:14 masak people make snap judgments based on version. news at 11.
21:14 Eevee I suspect the disconnect here is that the spec was written in its entirety first (and keeps evolving).  so the implication of a "1.0" is "the entire spec works", which is unreasonable to expect in the short term.
21:15 frettled Eevee: it's so unreasonble that even after forty years, give or take, there _still_ isn't one for the current version of C.
21:15 Eevee well, "the entire spec works if you squint a bit".
21:16 frettled How's that for horribleness in versioning, when people DARE to call their compilers version somethingorother than 0.xx.yy alpha/gamma :)
21:16 moritz nom: say -6.0649708e0
21:16 p6eval nom: OUTPUT«-6.649708␤»
21:16 frettled Eevee: more than just a little bit :)
21:16 masak Eevee: do you have an impression of how much of the spec Rakudo implements? which version number does that correspond to, would you say?
21:16 moritz somehow that loses a 0 in there :/
21:16 frettled moritz: that's interesting
21:16 Eevee so outsiders have the impression that they're waiting for a fully-compliant release.  implementors (rightly) think that's silly and just want to go from rakudo to a better rakudo
21:16 masak nom: say -6.0064e0
21:16 p6eval nom: OUTPUT«-6.64␤»
21:16 frettled moritz: are the digits before and after the decimal perhaps represented separately?
21:16 moritz nom: say 6.06
21:16 masak moritz: not just one.
21:16 p6eval nom: OUTPUT«6.6␤»
21:16 moritz oh, I know why
21:16 Eevee neither understands the other, so outsiders think insiders are stuffy and slow, and insiders think outsiders are impatient and demanding
21:16 moritz and I'm to blame
21:17 moritz a93020488f079cb77a27bb5a416e8271119eba58 is the problem
21:17 Eevee conjecturing wildly here but blogs on both sides seem to support this
21:17 masak moritz-- # we have your karma. fix bug to get it back !:)
21:17 moritz it discards leading zeros
21:17 moritz masak: I will, but not tonight
21:17 masak :)
21:18 masak Eevee: there will always be an inside and an outside like that. nothing will change that.
21:18 frettled Eevee: What's special about the entire Perl 6 discussion, is that there IS a discussion about the 1.0-ness at all.  I cannot recall having seen anything quite like it before, it's mind-boggling.
21:18 Eevee masak: and I was getting to: I actually have *no* idea how much of the spec rakudo implements.  the spec is used as a direction, not a goal, but target users don't see it that way.
21:18 Eevee frettled: how many languages are specified before they're implemented?
21:18 frettled Eevee: I am, for instance, not using any Perl 6 implementation in a production environment, because it currently is a combination of a bit too much effort and a bit too cumbersome.  Sort of like how I feel about Python and Ruby…
21:19 frettled Eevee: it's pretty unusual, that, too.
21:19 frettled Eevee: but C is a fairly good example
21:19 Eevee masak: so maybe it would help considerably to (a) carve the spec into several reasonable milestones, (b) use them as actual targets for actual blessed releases, and (c) actually keep track, somewhere, of what rakudo *does* at the moment
21:20 Eevee I can go find all manner of charts of what web browsers implement what parts of which specs
21:20 Eevee what does rakudo do?  how do I find out?  rakudo.org is just a blog
21:20 frettled Eevee: ooh, good example, if you ignore that HTML and CSS aren't programming languages, HTML and CSS are in the same situation.
21:20 Eevee right, but they're still languages with specs that do things.
21:20 TimToady that chart is mostly represented by annotations in the .t files
21:20 masak Eevee: you should check out ROADMAP in the Rakudo repo. it's basically what you describe.
21:21 Eevee also, the W3C doesn't consider a spec final until there are two reference implementations that mostly work
21:21 Eevee or something like that
21:21 frettled Eevee: yes, mostly annoy us programmers when we discover that Internet Explorer, Chrome/Safari, Firefox and Opera handle it differently.
21:21 masak we don't either :P
21:21 Eevee make this thing: http://www.webdevout.net/browser-support
21:21 Eevee for the perl 6 spec
21:21 Eevee complete with the pretty colors.  they are important.
21:22 moritz Eevee: if you want to contribute, that would be a great start
21:22 masak I'd help.
21:22 Vlavv left #perl6
21:22 masak I've been wanting to make one like that for a while now.
21:22 Eevee haha, should've seen that coming.  maybe
21:22 TimToady or something like the old smoke test chart, with multiple columns
21:22 moritz if I have to decide between spending my time on hacking the compiler, and compiling such a chart, currently I know that hacking the compiler is much more benefitial
21:23 frettled Eevee: something like that would be very nice, if it was up-to-date, but as you see, that document is largely useless because it's static and way out-of-date :)
21:23 frettled TimToady: ooh, yes, good idea.
21:23 Eevee the classic documentation problem, yes.
21:23 Eevee I have to run, but bbs
21:23 TimToady Eevee: we don't mean "patches welcome" in the sense of "shutup"
21:23 TimToady we really mean it only in the sense that the person who is passionate usually does the best job
21:24 frettled Eevee: with Perl 6 test-driven implementations, that can almost be fully automated ;)
21:25 frettled Running the spectests isn't slow enough to hinder daily runs for every major Perl 6 implementation, either.  Hmmm.
21:28 TimToady so we should also set up a benchmark matrix where green is "faster than P5", yellow is "within 10x of P5", and red is, "well, not so much..."
21:29 frettled Faster than which P5?  ;)
21:29 s1n left #perl6
21:29 TimToady well, there is that
21:30 TimToady there's also, running which algorithm?
21:30 masak ...on which platform?...
21:30 frettled I find that it's harder getting an upgraded Perl 5 than just installing Perl 6 in parallel, because the system impact is lesser from the latter solution.
21:30 TimToady using which emulation of P6 objects :)
21:30 frettled So at $orkplace, we're stuck with a mix of 5.8.x, 5.10.0(!) and 5.10.1.
21:30 moritz frettled: perlbrew somewhat eases that pain
21:30 frettled the latter comes from Debian squeeze, mostly.
21:31 frettled TimToady: yup
21:31 frettled For instances where Perl 5 just doesn't do the same thing, we could of course hold coding contests to come up with better solutions.
21:31 TimToady when we can run P6 native objects faster than P5 native objects, we'll have something :)
21:32 frettled That ought to be popular: «here's something Perl 6 does faster and better than Perl 5, with the following implementation – _contribute a better solution_»
21:32 masak std: -.5
21:32 p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
21:32 masak std: .5
21:32 p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
21:32 TimToady no problem there
21:32 TimToady std: 5.
21:32 p6eval std 37a0cdd: OUTPUT«[31m===[0mSORRY![31m===[0m␤Decimal point must be followed by digit at /tmp/77HxsuWKqU line 1:␤------> [32m5.[33m⏏[31m<EOL>[0m␤Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/77HxsuWKqU line 1 (EOF):␤------> [32m5.[33m⏏[31m<EOL>…
21:32 masak oh! that's what doesn't work.
21:32 masak gotcha.
21:32 frettled moritz: well, yes, but only somewhat :-/
21:32 moritz rakudo: 5.
21:32 p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "5."␤»
21:33 moritz LTA error
21:33 masak lol, rakudo u so confusd
21:33 TimToady though I think we might relax that one eventually
21:33 * masak submits rakudobug
21:33 frettled nom: 5.
21:33 p6eval nom: OUTPUT«Confused at line 1, near "5."␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
21:33 masak TimToady: doesn't really seem worth it.
21:34 moritz otherwise we allow 5..sqrt
21:34 TimToady .oO(the null method is really .Num, no, .Rat, no, .Int, uh...)
21:34 moritz ... unless we special-case that too
21:35 frettled nom: sqrt(5)
21:35 p6eval nom: OUTPUT«Could not find sub &sqrt␤current instr.: '_block1002' pc 75 ((file unknown):27188638) (:1)␤»
21:35 moritz nom: say 5.sqrt
21:35 p6eval nom: OUTPUT«2.23606797749979␤»
21:35 moritz frettled: LHF
21:35 frettled mm
21:35 Vlavv joined #perl6
21:35 moritz there's a lot of stuff in nom where somebody only added the method, not the sub form
21:35 moritz this is one of them
21:36 bitpart left #perl6
21:37 TimToady we do not clearly have a policy that the foo() form should call the .foo form, and in fact I think arguably the foo() form should be considered more basic in many cases
21:37 TimToady if for no other reason than optimizability
21:38 moritz it's also a LHF to do that in nom :-)
21:39 moritz in general it's easier to extend if the sub form calls the method form than the other way round
21:39 moritz that way you don't have to lift around to make sure every exported multi follows the same path as the object does
21:40 moritz in fact I thorougly dislike the fragility that lift introduces
21:41 slavik1 TimToady: will h2xs suffice in most situations for generating XS code?
21:41 dalek rakudo/nom: 4d0dabf | moritz++ | src/core/Numeric.pm:
21:41 dalek rakudo/nom: add sqrt function
21:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4d0dabf310
21:42 TimToady slavik1: generally not
21:42 Psyche^ joined #perl6
21:42 TimToady unless it's gotten a lot smarter than it was at the beginning
21:43 slavik1 :(
21:43 Patterner left #perl6
21:43 Psyche^ is now known as Patterner
21:44 s1n joined #perl6
21:44 masak moritz: I'd sure like to hear more about that lift fragility.
21:44 moritz I probably have a patch for the rat issue
21:45 moritz masak: if you pass around an object through multiple routines, and you call a method on it, you'll always get the same dispatch
21:45 moritz masak: but if you call a sub with that object as an argument, you only get same multi candidates if every function along the call change lift()ed its caller's multis
21:47 masak right.
21:47 dalek roast: a15a50d | moritz++ | S32-trig/simple.t:
21:47 dalek roast: start a file with simplified trigt tests
21:47 dalek roast: review: https://github.com/perl6/roast/commit/a15a50d353
21:48 moritz sadly I don't know any good solution for that problem either
21:50 * moritz -> sleep
21:50 dalek rakudo/nom: bf3eccf | moritz++ | src/Perl6/Actions.pm:
21:50 dalek rakudo/nom: fix rationals with zeros after the decimal point
21:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bf3eccf064
21:50 dalek rakudo/nom: e2a6299 | moritz++ | t/spectest.data:
21:50 dalek rakudo/nom: run simplified trig tests
21:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e2a62999cf
21:57 TimToady maybe instead of lifting everywhere we should just have a policy of reimporting whatever Foo imported when we say 'use Foo'
21:58 TimToady by default...
21:58 TimToady in a sense, we already have such a policy with the standard setting
21:58 yunga left #perl6
22:01 TimToady it would have to be something like a second-class import though, so you can import a different version that overrides, but then we get back to whether 'lift' is useful
22:02 TimToady I can see why it drives some folks to make their multiple dispatch tables global
22:03 pmichaud a lot of the sub forms are supposed to be handled by 'is export', IIRC.
22:03 pmichaud some, not all.
22:04 pmichaud i.e.,   method sqrt() is export { ... }
22:04 TimToady but it still comes down to the basic philosophical difference, is the meaning of "foo" defined by the current language, or by the one-and-only object in question
22:08 masak blog post! http://strangelyconsistent.org​/blog/june-26-2011-signatures
22:08 TimToady looking
22:09 lichtkind good night
22:09 pmichaud was the term "signature" introduced in a previous post?
22:09 pmichaud i.e., would a newbie know what a signature is?
22:10 masak good point.
22:10 pmichaud specifically the line "We just adorn the signature with a type declaration:"
22:10 masak nod
22:10 lichtkind left #perl6
22:11 Krunch this feels like Haskell with a less readable syntax :)
22:11 masak agree about Haskell, disagree about less readable :)
22:13 masak managed to introduce the concept "signature". new version coming up.
22:17 masak mew version: http://strangelyconsistent.org​/blog/june-26-2011-signatures -- pmichaud++
22:17 tadzik diff? :)
22:18 wamba left #perl6
22:18 pmichaud "We just adorn fib's parameter $n with a type parameter:"   s/type parameter/type constraint/  maybe
22:18 masak ok, good.
22:18 masak or just "type".
22:18 pmichaud I prefer "constraint" explicitly there, because a lot of programmers expect it to be a coercion.
22:19 masak good point.
22:19 pmichaud but just "type" can work also.
22:19 [Coke] left #perl6
22:19 masak I'll go with "type", then.
22:20 Kivutarrr left #perl6
22:20 jdhore1 masak, hly SHIT
22:20 pmichaud in the part where you define /signature/, you might also give a more detailed description -- i.e., the signature identifies the parameter types for the subroutine
22:20 pmichaud (it identifiers other stuff as well, of course :)
22:20 [Coke] joined #perl6
22:21 jdhore1 That's amazing that you can do variable checks in the signature
22:21 jdhore1 I want to have that in all the code i write
22:21 pmichaud Perl 6 is a cool language.
22:21 pmichaud say Perl6 ~~ Cool   # hmmm.
22:21 pmichaud rakudo:  say Perl6 ~~ Cool   # hmmm.
22:22 p6eval rakudo 72d158: OUTPUT«Bool::False␤»
22:22 tadzik dang!
22:22 pmichaud we'll have to fix that.
22:22 jdhore1 :(
22:22 pmichaud :-)
22:22 tadzik rakudo: say not so Cool
22:22 p6eval rakudo 72d158: OUTPUT«Bool::True␤»
22:23 masak jdhore1: glad you like it :)
22:23 masak pmichaud: good idea. I'll add a sentence or two about that.
22:25 masak rakudo: so not Cool
22:25 p6eval rakudo 72d158:  ( no output )
22:25 masak rakudo: say so not Cool
22:25 p6eval rakudo 72d158: OUTPUT«Bool::True␤»
22:26 tadzik rakudo: say not Cool
22:26 p6eval rakudo 72d158: OUTPUT«Bool::True␤»
22:26 masak rakudo: say so Cool.new
22:26 p6eval rakudo 72d158: OUTPUT«Bool::True␤»
22:26 masak Cool should really be an abstract class :)
22:28 benabik Isn't Cool a role?
22:28 masak nope.
22:29 masak we've introduced the concept of using roles for code reuse, but we don't quite believe in it yet :P
22:30 tadzik I don't think you can reuse Cool
22:30 masak 'night, #perl6
22:30 tadzik 'night masak
22:30 masak left #perl6
22:30 TimToady that's why it's important to have punning, so we can always make it into a Cool role that puns a class
22:33 Moukeddar joined #perl6
22:35 jnthn morning, #perl6
22:35 tadzik oh, jnthn
22:35 tadzik dang, just when I get asleep
22:36 TimToady o/
22:36 TimToady how's Monday so far?
22:36 Moukeddar_ joined #perl6
22:37 tadzik sleepy
22:37 tadzik jnthn: is there any living example of using the SerializationContext?
22:38 Moukeddar left #perl6
22:38 jnthn TimToady: Good weather, but stomach aches.
22:38 jnthn tadzik: Er, most of Actions.pm? :)
22:39 tadzik really?
22:39 tadzik like, where? :)
22:39 tadzik I can't see the forest, the trees are in the way
22:40 jnthn tadzik: Anywhere that does $*ST.add_constant, or $*ST.create_parameter, or $*ST.create_code_object
22:40 jnthn tadzik: add_constant is probably most interesting for you.
22:40 tadzik oh, so it's strongly tied to the SymbolTable
22:40 jnthn tadzik: Yes
22:41 jnthn tadzik: Note that SymbolTable inherits from HLL::SerializationContext
22:41 tadzik oh, hold on
22:41 tadzik so I add a constant after constant, the primitives, and then add object which refer to those constants?
22:42 jnthn tadzik: Correct
22:42 tadzik stuff clarifies
22:42 jnthn tadzik: I expect you'll be adding a bunch of strings.
22:42 tadzik yeah, this all ends up as a bunch of strings
22:42 jnthn Well, a bunch of strings and AST nods, no?
22:42 jnthn POD AST nodes, I mean
22:42 tadzik so I'll need to come up with some identifiers for those?
22:42 jnthn POD::Block and so on
22:42 daveshawley joined #perl6
22:43 tadzik well, yes, but it all gets down to strings at some point
22:43 jnthn For now I suggest put them in the setting
22:43 tadzik they are
22:43 jnthn oh, yes.
22:43 jnthn :)
22:43 jnthn OK
22:43 tadzik a bit hacky, but yeah, it's there
22:43 daveshawley left #perl6
22:43 tadzik see https://github.com/rakudo/rakudo/commit/103b37b
22:43 jnthn You can do a lookup of something in the setting with $*ST.find_symbol['POD', 'Block'])
22:44 tadzik after I understand all this, I'll take all this shiny Pod and document all the SymbolTable and stuff
22:44 dalek rakudo/nom: dcf30ef | jonathan++ | src/Perl6/ (2 files):
22:44 dalek rakudo/nom: Assorted fixes to placeholder parameters.
22:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dcf30ef776
22:44 dalek rakudo/nom: dcdd4b7 | jonathan++ | t/spectest.data:
22:44 dalek rakudo/nom: Two more passing test files (placeholder related).
22:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dcdd4b7056
22:45 tadzik or I can do it now, and see if I actually understand this stuff
22:47 jnthn :)
22:48 tadzik now that I look at it, the code is a pretty good read too
22:50 tadzik jnthn: what is a "slot", used in the SerializationContextBuilder comments? What does this term represent?
22:50 slavik1 TimToady: what is your thought on calling haskel functions from perl? viable design?
22:51 jnthn tadzik: If you imagine the SC as like an array of objects, a slot is just an element in that array
22:51 tadzik okay. method add_object() is another thing I need, right?
22:53 jnthn tadzik: That puts an objct into the next slot along
22:53 wolfman2000 left #perl6
22:53 jnthn tadzik: It's a bit like a push, but it does a little bit more than that
22:54 TimToady slavik1: pugs demonstrates that it is possible, at least
22:54 TimToady if only by implementing a Perl 6 interpreter in Haskell
22:54 tadzik # Generates a series of PAST operations that will build this context if it doesn't exist, and fix it up if it already does
22:54 slavik1 TimToady: I found out that ghc (pugs is based on ghc) can compile to .so
22:54 tadzik that looks good
22:54 slavik1 TimToady: I was actually thinking of perl5, but perl6 is an obvious thought from that :)
22:55 tadzik oh, that's for the context, one and only
22:56 tadzik jnthn: suppose I add some new Pod::Block using add_object, how does sc know where do the object attributes live, and how to refer to them?
23:00 Moukeddar_ left #perl6
23:05 wolfman2000 joined #perl6
23:17 jnthn tadzik: You'd have to tell it
23:17 jnthn tadzik: What do your constructors look like?
23:18 tadzik jnthn: like the default .new methods. Pod::Block::Named.new(name => 'foobar', content => @children);
23:18 jnthn tadzik: OK.
23:19 jnthn tadzik: I think we can extend the $*ST.add_constant thingy that moritz++ did recently
23:19 jnthn tadzik: But teach it how to do named parameters too
23:19 jnthn tadzik: Then you have a really easy time :)
23:19 tadzik jnthn: I can do that. Let me have some hard time too :)
23:20 tadzik jnthn: but how is add_constant connected with named parameters to the constructor?
23:20 dolmen left #perl6
23:20 tadzik I'll add a type object and then a code block constructing something?
23:20 drbean joined #perl6
23:21 jnthn tadzik: see around here in add-constant:
23:21 jnthn elsif $primitive eq 'type_new' {
23:21 jnthn Lines in that elsif
23:21 jnthn If you extend that to support nameds too, then you've mostly got what you need :)
23:21 chhet joined #perl6
23:21 tadzik oh
23:22 jnthn tadzik: class Pod__Item is Pod__Block {
23:22 jnthn Why the cheating? :)
23:22 tadzik try to make it run w/o cheating :P
23:22 jnthn Also it should be my
23:22 tadzik funny stuff
23:22 tadzik something connected with stacktraces
23:22 jnthn my package Pod {
23:22 jnthn class Block { ... }
23:23 tadzik won't that conflict with the Block type/
23:23 jnthn class Item is Block { ... }
23:23 jnthn }
23:23 tadzik it did when I tried
23:23 jnthn no, becuase it's a nested package.
23:23 tadzik let me try this again
23:23 jnthn It *should* be OK
23:23 jnthn If not, something is busted.
23:24 tadzik I'll try to bust it
23:27 tadzik yeah, Illegal redeclaration of class 'Block' at line 2898,
23:27 tadzik http://wklej.org/id/556873/ the code
23:28 jnthn tadzik: OK, can you add to nommap?
23:28 jnthn I'll look at it.
23:29 tadzik jnthn: sure
23:31 orafu left #perl6
23:32 chhet left #perl6
23:32 dalek rakudo/nom: 62204fe | tadzik++ | NOMMAP.markdown:
23:32 dalek rakudo/nom: Update NOMMAP with the Block in a package case
23:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/62204fe548
23:33 orafu joined #perl6
23:34 jnthn tadzik: thanks
23:35 tadzik no problem. I'm trying to get my head around this add_constant thingy :)
23:38 tadzik jnthn: how are named parameters treated in a callmethod PAST?
23:38 tadzik any examples on that?
23:39 jnthn tadzik: See in pkg_add_attribute the handling of %obj_args
23:39 tadzik thanks
23:41 offby1 I've written an ultra-simple class class X { has $.x ; }
23:41 offby1 how do I tell perl that two instances of it are equal when their members $.x are equal?
23:41 offby1 I assume there's a "magic" method I need to write
23:43 tadzik offby1: equal as in ==?
23:43 molaf_ joined #perl6
23:43 offby1 actually, eqv
23:43 offby1 since the member is gonna be a hash
23:43 offby1 rakudo: class X { has $.x ; }
23:43 p6eval rakudo 72d158:  ( no output )
23:44 offby1 rakudo: my $x = X.new(x => {a=>1});
23:44 p6eval rakudo 72d158: OUTPUT«Could not find sub &X␤  in main program body at line 22:/tmp/6BocpLPRRF␤»
23:44 offby1 oops
23:44 offby1 hmm
23:44 offby1 does each interaction with p6eval start with a clean slate?
23:45 offby1 rakudo: class X { has $.x ; }; my $x = X.new(x => {a=>1}); my $y = X.new(x => {a=>1}); say $x == $y;
23:45 p6eval rakudo 72d158: OUTPUT«Cannot take numeric value for object of type X␤  in 'Any::Numeric' at line 1496:src/gen/core.pm␤  in 'infix:<==>' at line 1:src/gen/core.pm␤  in main program body at line 22:/tmp/j3DEjzAMnW␤»
23:45 offby1 rakudo: class X { has $.x ; }; my $x = X.new(x => {a=>1}); my $y = X.new(x => {a=>1}); say $x eqv $y;
23:45 p6eval rakudo 72d158: OUTPUT«Bool::False␤»
23:45 offby1 basically: what do I need to do to make that come out True?
23:45 offby1 I'm guessing I need to add a method to X that tells one instance how to compare itself to another instance.
23:46 tadzik rakudo: class X { has $.x }; multi sub eqv(X $a, X $b) { $a.x eqv $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z;
23:46 p6eval rakudo 72d158: OUTPUT«Bool::False␤Bool::False␤»
23:46 tadzik dang
23:46 tadzik oh, wait
23:46 offby1 ... but I like where you're going :)
23:46 tadzik rakudo: class X { has $.x }; multi sub infix:<eqv>(X $a, X $b) { $a.x eqv $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z;
23:46 p6eval rakudo 72d158: OUTPUT«Bool::True␤Bool::True␤»
23:46 offby1 wouldn't sub eqv need to be infix?
23:46 molaf left #perl6
23:46 offby1 ha, jinx
23:46 tadzik still broken, but differently :P
23:46 offby1 very Paul Graham-y
23:47 jnthn tadzik: our multi sub...in master.
23:47 tadzik rakudo: class X { has $.x }; our multi sub infix:<eqv>(X $a, X $b) { $a.x eqv $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z;
23:47 p6eval rakudo 72d158: OUTPUT«Bool::True␤Bool::True␤»
23:47 tadzik no difference
23:47 offby1 curious
23:47 offby1 that approach seemed so promising! :)
23:47 tadzik rakudo: say 5 eqv 7
23:48 p6eval rakudo 72d158: OUTPUT«Bool::False␤»
23:48 tadzik just checkin'
23:48 offby1 :)
23:48 tadzik rakudo: class X { has $.x }; our multi sub infix:<eqv>(X $a, X $b) { $a.x == $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z;
23:48 p6eval rakudo 72d158: OUTPUT«Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤Bool::True␤Use of uninitialized value in numeric context  in 'Any::Numeric' a…
23:48 tadzik bah
23:48 offby1 heh, I'm a trouble-maker
23:49 tadzik no, that's interesting :)
23:49 jnthn tadzik: X.new(x => 5)
23:50 tadzik oh, sure
23:50 offby1 oh
23:50 tadzik jnthn: see? My brain now denies the named params!
23:50 tadzik until I fix those :P
23:50 offby1 so where did that bare 5 go?  Was it just ignored?
23:50 dorlamm joined #perl6
23:50 jnthn breakfast &
23:50 tadzik I'm curious too
23:53 bluescreen10 joined #perl6
23:56 zby_home left #perl6
23:56 offby1 http://ix.io/1LY   The first test passes; the second fails.  I assume that's because the Test module is calling a sort of "global" eqv, and not my paste-me::eqv.  So: how can I make my new "eqv" be accessible to the outside world, without needing qualification?
23:57 offby1 (also, I'd be happy for critiques on idiomaticness)
23:57 offby1 ({if that's a word})
23:57 f00li5h is now known as felineiron
23:57 offby1 I seem to recall there's a built-in Bag type, which I'd use if I knew how :)
23:58 [Coke] left #perl6
23:58 tadzik Bag is only in spec so far :)
23:59 tadzik you could use just method empty { $!letters.empty }
23:59 bluescreen100 joined #perl6
23:59 lue phenny: tell masak in your 26 June post, the last two code examples are missing a ) on the last line.
23:59 phenny lue: I'll pass that on when masak is around.

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs