Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-12-08

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 ruoso joined #perl6
00:04 Limbic_Region joined #perl6
00:08 am0c joined #perl6
00:09 PZt joined #perl6
00:13 risou_ left #perl6
00:20 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_lookup_tablet
00:20 impious left #perl6
00:25 masak left #perl6
00:26 lichtkind masak: <<>> no longer interpolates var or just rakudobug?
00:28 lichtkind masak sorry found it
00:28 lichtkind its rakudobug
00:28 lichtkind jnthn: is it known?
00:33 puddingpimp left #perl6
00:39 smash left #perl6
00:50 puddingpimp joined #perl6
00:55 justatheory left #perl6
00:55 masak joined #perl6
00:56 masak lichtkind: could you use p6eval's 'rakudo:' target to show what you consider to be a bug, please?
00:56 lichtkind yes
00:56 Guest58567 left #perl6
00:57 lichtkind rakudo: my $b =1; my %h = 1..6; say %h<<$b>>;
00:57 p6eval rakudo : OUTPUT«Any()␤»
00:57 lichtkind should be 2
00:57 whiteknight joined #perl6
00:57 masak indeed.
00:58 masak not sure that's ever worked.
00:58 masak alpha: my $b = 1; my %h = 1..6; say %h<<$b>>;
00:58 p6eval alpha : OUTPUT«(timeout)»
00:58 lichtkind me either just checking here before writing it down into the tablets
00:58 masak do the tablets only contain working Rakudo features?
00:58 lichtkind no
00:59 lichtkind but i try to nail it down
00:59 masak that's good.
00:59 bluescreen joined #perl6
00:59 masak kudos. lichtkind++
00:59 lichtkind to get more juice out of it then synopses
00:59 bluescreen is now known as Guest94843
00:59 masak yes, they synopses are a bit dry sometimes.
01:00 masak they're meant to be.
01:00 lichtkind of course, but my focus are more perl 6 starters
01:00 lichtkind that know some perl 5
01:01 lichtkind or ar least have some fundamental understanding of computer languages
01:01 masak *nod*
01:01 lichtkind curretnly opened a new tablets with basics all the literals quoting comments
01:02 lichtkind it getting recently into some decent shape even only 35% content is there
01:03 sftp left #perl6
01:03 lichtkind thats curretnly the main advantage over syntopses: you could go just to index and search a thing by name and jump into spot where it is explained
01:04 lichtkind enough PR
01:04 masak :)
01:06 QinGW joined #perl6
01:13 masak left #perl6
01:13 colomon rakudo: my $b =1; my %h = 1..6; say %h{$b};
01:13 p6eval rakudo : OUTPUT«2␤»
01:17 buubot joined #perl6
01:17 lichtkind colomon: yes but
01:18 lichtkind rakudo: my $b = 2; say <<$b>>;
01:18 p6eval rakudo : OUTPUT«$b␤»
01:18 lichtkind thats should be definetivly 2
01:18 colomon you're looking for variable interpolation inside <<  >> ?
01:18 lichtkind yes
01:18 colomon Is it just a fancy double quote?
01:19 colomon rakudo: my $b =1; my %h = 1..6; say qq<$b>;
01:19 p6eval rakudo : OUTPUT«1␤»
01:19 flussence <<>> is the same as p5 qw(), isn't it?
01:19 colomon rakudo: my $b =1; my %h = 1..6; say qq<<$b>>;
01:19 p6eval rakudo : OUTPUT«1␤»
01:19 colomon hmmm
01:20 lichtkind colomon: its bit more than the since qq doesnt work like qw//
01:20 lichtkind <<>> is like qw with the abilities of qq
01:21 colomon I have to admit I'm not sure what qw does.
01:51 lichtkind colomon: almost like in P5 @words = qw/ a beautiful butterfly went over the fence/;
01:51 colomon quote words!  right.
01:51 lichtkind colomon: just check the section in tablet 2 thats written in few minutes :)
01:51 colomon so << >> constructs a list of words, but with interpolation?
01:51 lichtkind bingo
01:53 colomon is the splitting into words before or after interpolation?
01:53 colomon "The implicit split is done after interpolation"
01:54 colomon rakudo: my $b =1; my %h = 1..6; say qq<<3>>;
01:54 p6eval rakudo : OUTPUT«3␤»
01:54 colomon rakudo: my $b =1; my %h = 1..6; say %h<<3>>;
01:54 p6eval rakudo : OUTPUT«4␤»
01:54 colomon hmmm... LHF?
01:55 lichtkind no thats correct list in hash context 3 => 4
01:56 colomon I mean <<$b>> might be LHF.
01:56 colomon Obviously the basic structure is in the grammar, now it just needs to do the right thing.
01:57 envi joined #perl6
02:02 mikehh left #perl6
02:04 tylercurtis left #perl6
02:12 Guest87704 left #perl6
02:12 shi left #perl6
02:15 Entonian joined #perl6
02:17 Entonian left #perl6
02:20 whiteknight left #perl6
02:33 jferrero left #perl6
02:38 s1n joined #perl6
02:38 s1n left #perl6
03:00 lichtkind good night
03:00 lichtkind left #perl6
03:01 wamba left #perl6
03:14 glow left #perl6
03:15 justatheory joined #perl6
03:31 * colomon can't figure out where << >> is handled in Grammar.pm
03:34 kanishka joined #perl6
03:34 colomon ah, found circumfix:sym<« »>
03:35 colomon still no idea how the texas equivalent works.
03:37 lue ohai world o/
03:39 lue rakudo: my @a = 1, 2, 4 ... *; say @a[3];
03:39 p6eval rakudo : OUTPUT«(timeout)»
03:41 LaVolta joined #perl6
03:49 colomon rakudo: my @a := 1, 2, 4 ... *; say @a[3];
03:49 p6eval rakudo : OUTPUT«8␤»
03:49 colomon well, I found the grammar for « », but now I can't find the action for it.  :\
03:51 lue rakudo: say (2/1) ~~ Int; # bug?
03:51 p6eval rakudo : OUTPUT«0␤»
03:52 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
03:54 lue rakudo: my $a = 2/1; say $a ~~ Int;
03:54 p6eval rakudo : OUTPUT«0␤»
03:57 TimToady notabug
03:57 TimToady rakudo: say (2/1) ~~ Rat
03:57 p6eval rakudo : OUTPUT«1␤»
03:57 TimToady "Once a rat, always a rat."  :)
03:57 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
03:58 wooden left #perl6
03:58 colomon right, 2 / 1 is a Rat.
03:59 lichtkind joined #perl6
04:00 _twitch joined #perl6
04:00 lue Although, the fact that    2/1 !~~ Int     when    2/1 = 1    makes no sense to me. (I know it isn't a Int, but the result of the division is.)
04:02 TimToady no, 2 div 1 is an int
04:02 TimToady rakudo: say (2 div 1) ~~ Int
04:02 p6eval rakudo : OUTPUT«1␤»
04:03 lue .oO(The subtle nuances of Perl 6)
04:03 lichtkind TimToady: are you okay with the general order http://www.perlfoundation.org/perl6/index.cgi?perl_6_tablets  ?
04:03 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
04:06 wooden joined #perl6
04:06 wooden left #perl6
04:06 wooden joined #perl6
04:08 lichtkind allright maybe later .. cheers
04:08 lichtkind left #perl6
04:16 kanishka left #perl6
04:17 quietfanatic joined #perl6
04:23 sorear good * #perl6
04:23 Limbic_Region left #perl6
04:38 nymacro joined #perl6
04:55 sorear TimToady: ping
05:13 justatheory left #perl6
05:19 orafu left #perl6
05:29 glow joined #perl6
05:31 dalek niecza: 1443dcb | sorear++ | lib/NieczaCLR.cs:
05:31 dalek niecza: Several more steps towards CLR interop
05:31 dalek niecza: review: https://github.com/sorear/niecza/commit/1443dcbb57
05:31 dalek niecza: 90660e5 | sorear++ | src/Metamodel.pm:
05:31 dalek niecza: Include class name in sub debug names
05:31 dalek niecza: review: https://github.com/sorear/niecza/commit/90660e57c7
05:31 dalek niecza: 08f0979 | sorear++ | lib/ (2 files):
05:31 dalek niecza: [clr] Start on an argument mapper
05:31 dalek niecza: review: https://github.com/sorear/niecza/commit/08f097913b
05:37 xinming left #perl6
05:45 am0c rakudo: ( [ 1 .. 10 ] �*� 2 ).perl.say
05:45 p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "( [ 1 .. 1"␤»
05:45 s1n joined #perl6
05:46 s1n left #perl6
05:47 sorear .u �
05:47 phenny U+FFFD REPLACEMENT CHARACTER (�)
05:48 sorear am0c: ^^^ not valid syntax
05:48 am0c oops
05:49 am0c I didn't entered that chracter though :(
05:50 am0c rakudo: [ 1 .. 2 ] �*� 2
05:50 p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "[ 1 .. 2 ]"␤»
05:52 sorear your IRC client is incorrectly configured and cannot send non-ASCII characters to the channel
05:52 sorear rakudo: ( [ 1 .. 10 ] «*» 2 ).perl.say
05:52 p6eval rakudo : OUTPUT«[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]␤»
05:52 sorear What did that look like?
05:55 am0c I see
05:55 am0c rakudo: ( [ 1 .. 10 ] >>*>> 2 ).perl.say
05:55 p6eval rakudo : OUTPUT«[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]␤»
05:55 am0c left #perl6
05:56 am0c joined #perl6
05:56 sorear am0c: what did the characters on either side of the asterisk look like to you?
05:56 am0c yes, and I tried to reconfigure correctly now
05:57 am0c rakudo: ( [ 1 .. 10 ] »*» 2 ).perl.say
05:57 p6eval rakudo : OUTPUT«[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]␤»
05:57 am0c heh
06:15 kanishka joined #perl6
06:17 cjk101010 joined #perl6
06:22 _kaare joined #perl6
06:29 dalek niecza: 4d023c2 | sorear++ | / (3 files):
06:29 dalek niecza: Run iter_hasflat off trampoline
06:29 dalek niecza: review: https://github.com/sorear/niecza/commit/4d023c2c39
06:30 sorear 153 ns/loop Perl 5, 351 ns/loop now
06:30 sorear I'm cheating a tiny bit though, using rwtrans parameters in the loop
06:37 clkao jnthn: i heard that you are coming to taipei!
06:42 diakopter clkao: what's in taipei?
06:42 hcchien osdc.tw 2011
06:44 diakopter hcchien: thanks
06:45 hcchien diakopter: you are welcome.   # to come to Taipei too. :p
06:48 * diakopter curious about flight costs
06:49 diakopter USD1100
06:50 sorear ow
06:52 am0c > "1; 2; 3".split( m:s/<[:,]>/ ).perl.say
06:52 am0c Method 'match' not found for invocant of class ''
06:52 am0c er.. what's wrong with this code please?
06:52 diakopter wow. SFO direct to Beijing
06:53 sorear am0c: you're using m
06:53 sorear m means 'match NOW'
06:53 sorear you want to pass a regex object, so use rx:s
06:53 am0c ah I see
06:54 sorear or just use /<[:,]>/
06:54 sorear :s has no effect on that regex
06:54 am0c rakudo: "1; 2; 3".split( rx:s/<[:,]>/ ).perl.say
06:54 p6eval rakudo : OUTPUT«("1; 2; 3")␤»
06:54 am0c rakudo: "1; 2; 3".split( /<[:,]>/ ).perl.say
06:54 p6eval rakudo : OUTPUT«("1; 2; 3")␤»
06:55 * diakopter thinks a ; got mistyped as :
06:55 am0c oops;
06:55 dalek niecza: 9f9bc13 | sorear++ | v6/tryfile:
06:55 dalek niecza: [v6] Rearrange tests in getsig on moritz++ 's suggestion
06:55 dalek niecza: review: https://github.com/sorear/niecza/commit/9f9bc135ac
06:57 am0c rakudo: "1; 2; 3".split( /<[;,]> <.ws>/ ).perl.say
06:57 p6eval rakudo : OUTPUT«("1", "2", "3")␤»
06:58 am0c wow..
07:00 sorear wow..?
07:00 am0c I just liked that result :D
07:00 sorear oh, you'll like this one better
07:00 sorear rakudo: "1; 2; 3".comb(/\d+/).perl.say
07:00 p6eval rakudo : OUTPUT«("1", "2", "3")␤»
07:01 am0c wow!?
07:01 am0c that's cool
07:01 sorear comb is dual to split
07:01 sorear you pass a regex for the fields, instead of for the separators
07:01 sorear which is often easier
07:03 am0c that's really novel approach
07:17 am0c is there any easiest way to ceiling a *Num* into specific digit number? for example: 125 to 100 when for 3 digits.
07:18 am0c it seems there is no builting ceiling function for Num for this case.
07:19 moritz_ divide by 10**$number, round, multiply by 10**$number
07:25 sorear that's not what ceiling does, am0c
07:26 sorear rakudo: say ceil(1.25)
07:26 p6eval rakudo : OUTPUT«Could not find sub &ceil␤  in main program body at line 22:/tmp/6UMZocpCKn␤»
07:26 am0c I see I thought wrong.
07:26 sorear rakudo: say ceiling(1.25)
07:26 p6eval rakudo : OUTPUT«2␤»
07:26 sorear interesting, S32-num specs round($num, :$scale) but not for ceiling, floor
07:27 am0c sub where ($n) { $n.infix:</>(10000).floor.infix:<*>(10000) }
07:27 am0c where(12345).say;
07:27 am0c Method 'infix:</>' not found for invocant of class 'Int'
07:28 sorear . . .
07:28 moritz_ that's because &infix:</> is a sub, not a method
07:28 moritz_ why don't you just use / ?
07:28 sorear what possessed you to write $n / 10000 in such a weird way
07:29 am0c ah..
07:29 moritz_ rakudo: sub w($n) { ($n / 1000).floor * 1000 }; say w(12345);
07:29 p6eval rakudo : OUTPUT«12000␤»
07:31 am0c sorear: calling method connectively possessed me T__T
07:33 sorear ah.  smalltalk programmer's disease. :p
07:35 am0c heh it's shameful to ask this sort of question T__T but here is so kind that I affected
07:35 am0c that's intesting disease name. :p
07:44 Alias_ joined #perl6
07:50 LaVolta left #perl6
08:03 Guest87704 joined #perl6
08:17 sorear 8% of all method calls generated by STD are to Cursor.pos
08:18 sorear from $¢.pos in token ws and token nibbler, mostly
08:31 moritz_ for the posessed, there is a way
08:31 moritz_ rakudo: say 10.&infix:</>(2)
08:31 p6eval rakudo : OUTPUT«5␤»
08:36 sorear a further 8.6% come from $pair.key and $pair.value calls in Hash.LISTSTORE
08:44 kanishka left #perl6
08:45 kjeldahl joined #perl6
08:46 wamba joined #perl6
08:54 kensanata joined #perl6
08:59 dalek niecza: 92a451f | sorear++ | v6/tryfile:
08:59 dalek niecza: A bit of ugly inlining for key/value
08:59 dalek niecza: review: https://github.com/sorear/niecza/commit/92a451feb7
08:59 dalek niecza: 84ef188 | sorear++ | v6/tryfile:
08:59 dalek niecza: [v6] undo a wrong "bug fix"
08:59 dalek niecza: review: https://github.com/sorear/niecza/commit/84ef188bea
08:59 dalek niecza: 23f16c4 | sorear++ | v6/tryfile:
08:59 dalek niecza: [v6] a little more refactoring on STD.ws
08:59 dalek niecza: review: https://github.com/sorear/niecza/commit/23f16c4a40
09:19 dakkar joined #perl6
09:27 dalek niecza: e2a9334 | sorear++ | lib/Kernel.cs:
09:27 dalek niecza: Use a few unsafe optimizations in the binder
09:27 dalek niecza: review: https://github.com/sorear/niecza/commit/e2a9334f7b
09:27 sorear I have managed to shave almost HALF A SECOND off the STD benchmark today
09:27 sorear maybe it just needs fresh eyes *hinthinthint*
09:28 * sorear out
10:04 QinGW left #perl6
10:18 satyavvd joined #perl6
10:20 _jaldhar left #perl6
10:20 _jaldhar joined #perl6
10:27 muixirt joined #perl6
10:29 * muixirt rips out sorear's eyes and waits until science finds a way to grow fresh eyes in a petri dish
10:29 muixirt hope that helps :-)
10:35 cognominal left #perl6
10:36 muixirt ubuntu wants top restart...
10:36 cognominal joined #perl6
10:36 muixirt left #perl6
10:38 muixirt joined #perl6
10:48 gimix left #perl6
10:58 _twitch left #perl6
11:13 broquaint left #perl6
11:38 finanalyst joined #perl6
11:40 snearch joined #perl6
11:40 _twitch joined #perl6
11:40 jferrero joined #perl6
11:48 satyavvd left #perl6
11:54 jnthn clkao: Looking like it. :) \o/
11:55 * jnthn finally got a decent night's sleep.
11:55 mikehh joined #perl6
11:57 glow left #perl6
11:57 mikehh anyone here know much about keyboard settings - ie which gnome config files are used
11:58 mikehh I have somehow disabled my numeric keypad and would like to get it working again
11:58 tadzik ww?
11:59 mikehh sorry wrong channel
12:06 ch3ck left #perl6
12:06 ch3ck joined #perl6
12:13 oha left #perl6
12:15 oha joined #perl6
12:22 mtk joined #perl6
12:26 glow joined #perl6
12:46 mikehh left #perl6
12:51 takadonet morning all
12:52 fhelmberger joined #perl6
12:54 muixirt left #perl6
12:55 tadzik morning
12:58 moritz_ good morning
12:58 moritz_ tadzik: how is the advent post coming along?
12:59 Guest87704 left #perl6
13:03 phio joined #perl6
13:04 tadzik moritz_: it's not, yet
13:04 tadzik I'll probably be writing it on an upcoming lecture
13:04 takadonet tadzik: are you today's post?
13:05 tadzik takadonet: no, I'm just the author
13:05 tadzik *SCNR*
13:05 scorp007 joined #perl6
13:08 gimix joined #perl6
13:10 Guest87704 joined #perl6
13:21 scorp007 left #perl6
13:33 sftp joined #perl6
13:38 lamstyle left #perl6
13:40 orafu joined #perl6
13:42 Guest87704 left #perl6
13:47 colomon jnthn: ping?
14:02 Teratogen listen, we need to get Perl 6, Version 1, out the door
14:02 plainhao joined #perl6
14:02 Teratogen a definitive version, ok?
14:02 Teratogen of course nobody is going to want to use Version 1
14:03 Teratogen so we will have to come out with a Version 2 pretty darned quick
14:03 moritz_ Teratogen: your patches are certainly welcome
14:03 masonkramer joined #perl6
14:03 Teratogen I thought the Perl 6 compiler was going to be one big regex
14:04 Teratogen and of course, Perl 6 should be able to be written entirely in Perl 6
14:04 moritz_ Teratogen: your patches are certainly welcome
14:05 moritz_ or phrased differently, "put up or shut up, pleease"
14:06 Teratogen look, we want Perl 6 now, not ten years from now!
14:07 huf is this some rite of passage, trolling p6?
14:07 huf hugme: hug Teratogen
14:07 * hugme hugs Teratogen
14:07 tadzik moritz_?
14:07 Teratogen was kicked by moritz_: Teratogen
14:08 moritz_ tadzik: he (or she) has said the same thing several time, and doesn't seem to react to any kind of reasoning
14:08 moritz_ maybe it's a bot.
14:08 tadzik well, that's not what I meant :) But anyway, could I drop today's post on your, or sb else's shoulders?
14:08 huf he's active on #perl so probably not a bot
14:09 thundergnat joined #perl6
14:09 moritz_ tadzik: sure thing
14:09 moritz_ huf: probably :-)
14:10 huf moritz_: well, how can we be sure of anything, really?
14:10 huf maybe i'm a bot!
14:10 tadzik Even if'd be able to write it today, I'm afraid it won't be good enough for advent calendar; I'd like to give it a bit more love
14:11 tadzik moritz_: really? I'm terribly ashamed of the situation, but I'm really lacking time today
14:12 moritz_ tadzik: masak and I have a draft in the repo that was meant for tomorrow
14:13 tadzik so I'd go for tomorrow?
14:13 moritz_ aye
14:14 tadzik that's ok for me, again, if 16:00-17:00 is ok for a post
14:15 tadzik my exam is on 15:00, and all the effort goes here
14:19 moritz_ http://perl6advent.wordpress.com/2010/12/08/different-names-of-different-things/
14:21 dalek mu: 1df8466 | moritz++ | misc/perl6advent-2010/schedule:
14:21 dalek mu: [advent] switch slots
14:21 dalek mu: review: https://github.com/perl6/mu/commit/1df8466e69
14:24 takadonet http://www.reddit.com/r/programming/comments/eiahj/perl_6_advent_calendar_day_8_different_names_of/
14:25 flussence That %thing.push array thing is new to me, I suppose a destructive version would just be %hash = %original.invert?
14:26 moritz_ correct
14:30 [Coke] Has rakudo had a problem in the past few months where classes began to complain about not having set_string_native ?
14:34 thundergnat Anyone know of a good example of implementing context sensitive return values from a subroutine? The spec is kind of vauge about it.
14:35 takadonet thundergnat: still working on Algorithm::Diff?
14:35 thundergnat Specifically I'm trying to return diffeent values of false depending on list or item context
14:35 thundergnat takadonet: not not recently
14:36 takadonet thundergnat: ok just wondering
14:36 thundergnat takadonet: I don't know that I want to go through the aggravation of implementing Get since it does heavy symbol table mangling for little return
14:37 thundergnat That' really the only object method unimplemented.
14:38 takadonet ok
14:39 gfldex rakudo3: class A { multi method foo(Str :$lol){} }; say A.^methods(:local)[0].signature.WHAT;
14:40 gfldex rakudo: class A { multi method foo(Str :$lol){} }; say A.^methods(:local)[0].signature.WHAT;
14:40 p6eval rakudo : OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in main program body at line 1␤»
14:40 gfldex :(
14:40 thundergnat I found an example on stackoverflow: http://stackoverflow.com/questions/3962901/how-can-i-return-context-sensitive-return-values-in-perl-6 but it doesn't like False/Undef values
14:40 gfldex rakudo: class A { method foo(Str :$lol){} }; say A.^methods(:local)[0].signature.WHAT;
14:40 p6eval rakudo : OUTPUT«Signature()␤»
14:43 thundergnat The spec says to return an object that reponds appropriately to the calling context, but leaves implementation as an excercise for the reader. :-
14:44 thundergnat And while that is fine, it would be nice to get a hint about how to actually do it...
14:45 colomon [Coke]: I seem to recall bumping into that sometime, but don't remember the exact circumstances at the moment.
14:48 colomon thundergnat: I agree.  I suspect the answer is to declare a class which has the appropriate .list, .Bool, .Str, etc methods.  But I've never tried doing it in this way, and I'm not 100% sure what is required.  Seems like a good thing to make sure we have a working example for.
14:48 colomon afk # morning walk
14:48 gbacon left #perl6
14:49 gfldex rakudo: class A { method foo(Str :$lol){} }; for A.^methods(:local)[0].signature.params { say .type, ' ', .name; };
14:49 p6eval rakudo : OUTPUT«Mu() ␤Str() $lol␤Mu() %_␤»
14:49 gfldex is that anonymous Mu intentional?
14:51 flussence self?
14:51 flussence nah, that can't be right
14:53 mtk left #perl6
14:55 moritz_ a long known bug, if I remember correctly
14:58 cjk101010 left #perl6
14:58 _kaare left #perl6
15:00 gfldex sadly i have to leave in a few or i would ask masak who knows every rakudo bug by it's first name :->
15:01 Bzek joined #perl6
15:05 masak joined #perl6
15:05 masak oh hai, #perl6
15:06 moritz_ oh hai masak
15:07 moritz_ masak: I've published our advent post, since tadzik had troubles getting his finished
15:07 xinming joined #perl6
15:07 mtk joined #perl6
15:07 masak moritz_: hoaky. is tadzik on for tomorrow?
15:08 moritz_ masak: hopefully
15:10 tadzik masak: it's probably donna be a late tomorrow
15:10 masak tadzik: hokay.
15:12 gbacon joined #perl6
15:15 sahadev joined #perl6
15:16 kensanata left #perl6
15:25 rgrau joined #perl6
15:25 MayDaniel joined #perl6
15:25 flussence rakudo: say 'abcdef' ~~ / 'abcd' .**-2 'b' /
15:25 p6eval rakudo : OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 22, near "-2 'b' /"␤»
15:25 flussence hmm, S05 says that should work...
15:26 moritz_ what does **-2 mean?
15:26 flussence ". ** -2" according to this means back up 2 chars
15:26 flussence line 1030ish
15:27 flussence I wouldn't be surprised if rakudo doesn't implement that yet, it looks crazy :)
15:28 finanalyst left #perl6
15:28 moritz_ oh WTF, it sure does
15:28 flussence perl6: say 'abcdef' ~~ / 'abcd' . ** -2 'b' / # I wonder...
15:28 p6eval rakudo : OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 22, near " -2 'b' / "␤»
15:28 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
15:28 flussence ouch
15:28 moritz_ and since it's not look-around-y, it'll generate weird match objects
15:34 Patterner left #perl6
15:34 xinming left #perl6
15:38 thundergnat std: class A { class B {}; A::B.new; }
15:38 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
15:38 thundergnat rakudo: class A { class B {}; A::B.new; }
15:38 p6eval rakudo : OUTPUT«Can not find sub A::B␤  in main program body at line 1␤»
15:39 jnthn colomon: pong
15:39 jnthn (only sorta here though...)
15:39 thundergnat is that legal/ rational calling convention? or NYI?
15:39 masak rakudo: say (900..1000).rand
15:39 p6eval rakudo : OUTPUT«67.4041728675932␤»
15:39 * masak submits rakudobug
15:40 jnthn masak: which for?
15:40 jnthn The A::B lookup?
15:40 masak jnthn: no, the Range.rand one
15:40 jnthn masak: Is it really wrong?
15:40 masak jnthn: the A::B lookup is old :)
15:40 masak jnthn: oh, I thought that was obvious... :/
15:41 masak jnthn: http://twitter.com/VienosNotes/status/12388189830389760
15:41 jnthn masak: I mean, it numifies the range, which is the number of elements.
15:41 jnthn masak: Is range spec'd as implementing rand specially?
15:41 masak jnthn: I'll check.
15:41 masak jnthn: shouldn't it? I mean, really?
15:41 jnthn I agree it'd be cute if it worked, I'd also just like to know if it's spec. :)
15:41 masak is that even a point of discussion?
15:41 masak who'd be happier if it numified instead?
15:41 flussence rakudo: say rand(900..1000) #?
15:41 p6eval rakudo : OUTPUT«===SORRY!===␤Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at line 22, near "(900..1000"␤»
15:42 * moritz_ would just spec it to return a value between the end points
15:42 jnthn moritz_: That'd make sense.
15:42 masak let's do that, then.
15:42 jnthn Just curious what if anything the spec says.
15:42 moritz_ but only for numeric ranges
15:42 masak moritz_: yes.
15:42 TimToady that doesn't make sense to me
15:42 moritz_ jnthn: I can't remember that it says anything about it
15:42 jnthn hehe :)
15:42 * masak un-submits rakudobug
15:43 jnthn moritz_: Me either.
15:43 thundergnat so A::B is old.., is it now illegal?
15:43 moritz_ otoh note that @array.rand can't do anything sensible but numifying first
15:43 flussence having Range.rand work that way looks nice, but sometimes you really want the array index.
15:43 thundergnat or meaningless at least?
15:44 masak maybe Range.rand should warn or die.
15:44 flussence or have a flag for "give me the value of whatever index you pick, I don't care!"
15:44 moritz_ flussence: that's what .pick is for
15:45 masak .rand would select something on the continuous interval instead.
15:45 tadzik > Range.rand
15:45 tadzik Type objects are abstract and have no attributes, but you tried to access $!excludes_min
15:45 tadzik hm?
15:45 masak TimToady: I'd be interested to hear why it doesn't make sense for you.
15:45 masak tadzik: it's a figure of speech :)
15:45 moritz_ tadzik: it numifies, and for numifying it accesses an attribute
15:45 tadzik :)
15:45 masak tadzik: I meant on an instantiated Range object.
15:46 TimToady it doesn't make sense because I haven't had my coffee yet
15:46 wtw left #perl6
15:46 tadzik maybe it should be an alias for .pick
15:46 * moritz_ can wait to hear TimToady's post-coffee opinion :-)
15:47 moritz_ tadzik: that would be very confusing
15:47 TimToady I do have a question though; how would you distinguish (1..2).rand from (1..^2).rand?
15:47 moritz_ tadzik: .pick is something discrete, .rand something continuous
15:47 moritz_ TimToady: one can return 2, the other not
15:47 phio left #perl6
15:47 moritz_ just like rand() in perl 5 can return 0, but not 1
15:48 TimToady how would you write a function that can return 1?
15:48 TimToady what is its probability?
15:48 moritz_ I wouldn't
15:48 masak me neither.
15:49 moritz_ since its probability is asymtotically 0, I'd just never return the bounds
15:49 moritz_ and it'd be correct even if .rand were allowed to return them
15:49 masak I'd return the lower bound, but only with epsilon probability like all the other values.
15:49 Psyche^ joined #perl6
15:49 Psyche^ is now known as Patterner
15:49 masak and I wouldn't care about whether the endpoints were included or not.
15:49 TimToady epsilon is a funny thing on a computer
15:50 moritz_ if you have a fixed representation, you can calculate your epsilon
15:50 jjore left #perl6
15:51 mtk left #perl6
15:52 TimToady another consideration is that if they say (1..2).rand they may very well mean (1..^2).rand
15:53 TimToady human nature being fallible and all
15:53 mtk joined #perl6
15:53 xinming joined #perl6
15:55 moritz_ just always exclude the end points in .rand, and everbody is happy
15:56 TimToady thing is, you can define ($a ..^ $b).rand as ($b-$a).rand + $a, but you can't do the same with ..
15:56 TimToady you can't exclude the lower endpoint generally, or the randomicity wonks will come and shoot you
15:57 moritz_ hm
15:57 TimToady .. has to know epsilong, while ..^ doesn't
15:57 TimToady *lon
16:00 dukeleto Shortest Math Joke Ever: Let epsilon be a small negative number ...
16:00 TimToady I suppose ^.. doesn't need espilon either, but ^..^ does again
16:02 TimToady interestingly, if we define Range.rand, then 42.rand is the same as (^42).rand
16:05 Patterner left #perl6
16:06 Psyche^ joined #perl6
16:06 Psyche^ is now known as Patterner
16:06 masak I still vote for ignoring the endpoint information.
16:06 masak makes it much easier, and the user will hardly notice anyway.
16:06 colomon jnthn:
16:06 colomon make PAST::Op.new( :inline( $<quote_EXPR>.ast.value ),
16:06 colomon :pasttype('inline'),
16:06 colomon :node($/) );
16:06 masak this confuses me. what does he mean? http://twitter.com/VienosNotes/status/12537502397104129
16:06 masak does he want an integer from Range.rand?
16:07 colomon jnthn: Does that mean the real code is in NQP?
16:07 TimToady it would be more conservative to die on .. or ^..^ with an apropriate message, and reserve the ability to do them "right" later
16:08 mathw masak: I would read it to say that he wants Range.rand to return a random number which fits within the range
16:08 mathw I don't think that necessarily means it's an integer...
16:08 mathw maybe
16:08 mathw it's a bit unclear
16:08 masak mathw: ok.
16:08 colomon rakudo: say 4.Int.rand
16:08 p6eval rakudo : OUTPUT«0.527294043813413␤»
16:08 masak oh!
16:08 masak yes, that's what he means.
16:08 masak and that's what I meant to begin with.
16:09 masak and that's what we've been talking about... :)
16:11 TimToady well, one way to implement .. even if we don't know the epsilon of the underlying generator is to add a delta that is larger than any likely epsilon, then repeat if that generates something out of range
16:12 TimToady likewise, ^..^ can be implement by repeating ..^ if we happen to get the lower bound
16:13 colomon question for the TDD fanatics in the audience: how do you test if (N .. M).rand returns M properly?
16:13 TimToady ^.. is implemented in terms of ..^ by subtraction
16:14 TimToady colomon: make the underlying RNG pluggable
16:14 flussence colomon: LD_PRELOAD a library that overrides libc's rand to always return maximum
16:14 flussence (even if it's cheating to do so)
16:15 colomon Doesn'
16:15 colomon Doesn't seem like either of those actually tests the matter at hand.
16:15 colomon I mean, it's turtles all the way down.
16:16 TimToady PRNGs generally return integers, and if you know the size of the integers, you know the epsilon
16:16 TimToady if you can cut the size of the integers, you can magnify the epsilon
16:16 colomon Huh.  So that implies the real problem is that  not all expressible Nums between 0 and 1 are equally likely?
16:17 colomon (from plain rand, I mean.)
16:17 jnthn colomon: Hmm, where is that from? (which action method)
16:17 colomon jnthn: quote:sym<Q:PIR>
16:17 jnthn colomon: Is it the Q:PIR one?
16:17 jnthn Ah
16:17 moritz_ colomon: depending on the used data types, not all Num values are possible
16:17 flussence usually "good enough" is good enough for most users of rand() :)
16:18 moritz_ and all others use their own library anyway
16:18 jnthn colomon: quote_EXPR itself is inherited from, iirc, HLL::Grammar and HLL::Actions.
16:18 jnthn colomon: Which is in the nqp-rx repo.
16:18 colomon jnthn: I'm trying to figure how qq works.  So that I can try to make qqw work
16:18 TimToady all PRNGs I'm aware of make all 0 ..^ $n integers equally likely, or at least try to
16:19 moritz_ integers yes
16:19 jnthn colomon: See quote_EXPR and all the quote_[mod|...other stuff...] bits in HLL::Grammar and HLL::Actions.
16:19 jnthn colomon: quote_EXPR takes argument
16:19 jnthn *arguments
16:19 jnthn colomon: Which indicate what kind of parsing it does.
16:19 moritz_ but the floats you get by $rand/$rand_max don't map well to all floats in the 0..^1 range
16:19 risou joined #perl6
16:19 jnthn colomon: And how it treats things.
16:20 colomon TimToady: what moritz_ said.
16:20 colomon jnthn: thanks.
16:20 colomon jnthn++
16:21 TimToady but you will get $n different floats, if you have more float precision than integer
16:21 TimToady and each of those floats will have equal probability
16:21 TimToady they're just scattered around their real values by fp distortion
16:21 moritz_ right
16:23 colomon my point here is that if you choose an arbitrary Num between 0 and 1, odds are that it can NEVER be generated by $rand / $rand_max.
16:23 masak I'm starting to wonder whether it's worth it. :(
16:23 masak maybe just throw a very nice error message that explains to the user how to do the appropriate subtractions and scalings by hand.
16:23 TimToady at which point they'll just monkey patch Range :)
16:24 * moritz_ would rather have a Range.rand that might mis-treat the ends points than no sensible Range.rand at all
16:24 TimToady differently from the next guy
16:24 colomon huh.  actually, can we get at the internal RNG that generates Ints?  If we're accepting $rand / $rand_max as good enough, it's trivial to make it include the top of the range as well.
16:24 masak as long as we put it in the spec/manual, mistreatment of the endpoint is fair game IMO
16:25 TimToady colomon: that's what I think
16:25 moritz_ colomon: in the end I'd like the RNG exposed to the user anyway, with the option of creating multiple instances
16:25 rgrau left #perl6
16:25 colomon +1
16:25 TimToady and to use the repick methods, you really only need to have order of magnitude on $n so you don't pick a stupid delta
16:25 moritz_ it needs to exist anyway in some code somewhere :-)
16:27 TimToady well, any given power-of-two rng can be sized probabilistically even if there's no API to tell you its max
16:28 TimToady every time you generate one, there's 50% chance it'll be in its upper range
16:28 colomon huh.  so really, Range.roll should be the fundamental RNG for p6, no?
16:28 TimToady or Int.roll
16:28 moritz_ colomon: something like that
16:28 colomon (I mean, that's the functionality we want -- return an Int between 0 and N)
16:29 moritz_ right
16:29 TimToady sounds fair
16:29 moritz_ the API itself will involve state that the PRNG has to store between two calls
16:29 TimToady the PRNG is really Int.roll(*)  :)
16:30 kanishka joined #perl6
16:30 colomon TimToady: that would involve a new spec for Int.roll, no?
16:30 colomon rakudo: say 10.roll
16:30 p6eval rakudo : OUTPUT«10␤»
16:30 colomon rakudo: say 10.roll
16:30 p6eval rakudo : OUTPUT«10␤»
16:30 colomon rakudo: say 10.roll
16:30 p6eval rakudo : OUTPUT«10␤»
16:30 colomon ;)
16:30 moritz_ rakudo: say ~10.roll(20)
16:30 p6eval rakudo : OUTPUT«10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10␤»
16:30 moritz_ rakudo: say ~^10.roll(20)
16:31 p6eval rakudo : OUTPUT«No applicable candidates found to dispatch to for 'prefix:<~^>'. Available candidates are:␤:(Buf $a)␤␤  in main program body at line 22:/tmp/x94f1H0lQF␤»
16:31 moritz_ rakudo: say ~(^10).roll(20)
16:31 alester joined #perl6
16:31 p6eval rakudo : OUTPUT«9 1 8 3 9 6 5 4 8 0 2 1 0 8 9 3 5 8 8 1␤»
16:34 TimToady my point was not about Int so much as about .roll(*) supplying the requested state
16:36 TimToady I'm of two minds about whether Int.roll should assume (^Int).role
16:36 moritz_ it is a nice interface
16:36 TimToady and like Int.rand
16:36 TimToady but an int might be a degenerate list
16:36 moritz_ you can enhance it with :seed($your_seed)
16:45 _kaare joined #perl6
16:46 jjore joined #perl6
16:47 masak hcchien: I'm currently investigating travel options to go to Taipei in March as well. I'll happily give a talk at OSDC.tw too... if you're still looking for speakers. :)
16:52 masak gfldex: yes, the OUTPUT«Mu() ␤Str() $lol␤Mu() %_␤» is a "known bug". jnthn says it's built into the model and inherently unfixable (becuase there's no fundamental distinction between methods and subs)
16:53 silug left #perl6
16:55 jnthn masak: It should say the type of the class instead of Mu() for the first arg.
16:55 masak moritz_: Teratogen is decidedly not a bot, but she has a very limited repertoire. she seems like a kind of "eternal newbie" who ended up being a #perl6 regular without the corresponding increase in what it is we're doing here (getting Perl 6 out the door).
16:55 masak jnthn: oh right. yes, 'course.
16:55 jnthn masak: But it's correct that it appears in the signature.
16:55 masak but even that is known and reported.
16:55 jnthn Right
16:55 jnthn But the appearance of it in the signature isn't a bug at all. :)
16:55 masak I don't mind it appearing in the signature.
16:55 masak I mind the error messages being stupid.
16:56 jnthn I don't think it is.
16:56 masak a good error message *must* know the distinction between a sub and a method, otherwise it'll confuse the user.
16:56 jnthn That's only true if the user thinks of the invocant as more to the target method than just a magical first parameter.
16:57 masak the burden of knowing that a method is "just a funny subroutine" with an extra, hidden parameter, should not be put on the confused newbie.
16:57 masak rakudo: class A { method foo() {} }; A.new.foo("OH HAI")
16:57 p6eval rakudo : OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'A::foo' at line 22:/tmp/kEMy0JFPVR␤  in main program body at line 22:/tmp/kEMy0JFPVR␤»
16:57 masak "expected 1".
16:57 masak that's what I'm talking about.
16:57 masak the method *clearly* has no parameters!
16:58 masak I just wrote an empty set of parens.
16:58 jnthn :/
16:58 masak and yes, I do know the underlying model that causes this, and it still sucks.
16:58 jnthn Yes, but then people write: class A { method foo($foo:) {} }; A.new.foo("OH HAI")
16:59 masak right.
16:59 jnthn And get an error saying it expected 1 and got 0...when they clearly did write a parameter.
16:59 masak so maybe the invocant parameter should be mentioned explicitly?
16:59 masak "expected 0 (and an invocant)"
16:59 TimToady "got 0 (plus invocant)"
16:59 jnthn Dunno. Can sorta see the argument for doing something in the error, but "just subtract one from the number" is too simplistic.
17:00 masak aye.
17:00 jnthn The signature object does know that the first parameter is an invocant parameter.
17:00 jnthn TimToady: Yes, something like that.
17:00 masak then it's at least theoretically possible.
17:00 jnthn Yes. The patch wants to go in bind.c. ;)
17:00 masak I'll keep that in mind. :)
17:00 TimToady it would also be nice to remember the declarator so you can say "sub" or "method" or whatever
17:01 masak oh, indeed.
17:01 jnthn TimToady: We know the current routine, so we can just go look at its type.
17:01 jnthn So that info is already available too :)
17:01 jnthn I think backtraces already do that fwiw.
17:02 jnthn rakudo: class A { method m() { die "painfully" } }; sub foo { A.m }; foo();
17:02 TimToady does the type always distinguish the declarator?
17:02 p6eval rakudo : OUTPUT«painfully␤  in 'A::m' at line 22:/tmp/7vk9DEgBzu␤  in 'foo' at line 22:/tmp/7vk9DEgBzu␤  in main program body at line 22:/tmp/7vk9DEgBzu␤»
17:02 jnthn Aww, it doesn't.
17:02 jnthn TimToady: method => Method, sub => Sub, submethod => SubMethod, a block has type Block...
17:02 TimToady some methods are regexes
17:03 jnthn TimToady: Which are of type Regex. :)
17:03 TimToady some regexes are tokens
17:03 jnthn std: Token
17:03 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤    'Token' used at line 1␤Check failed␤FAILED 00:01 117m␤»
17:03 jnthn aww :)
17:03 jnthn TimToady: yeah, but maybe we should fix the type hierarchy there so we set a good precedent.
17:03 jnthn TimToady: Different declarator => different type, just like different package declarator => different HOW.
17:04 _jaldhar left #perl6
17:04 jaldhar_ joined #perl6
17:04 jnthn We could separately stash away the declarator name used too but...
17:04 TimToady as long as you can reproduce the original declarator for the user, but it seems fragile
17:04 jnthn ...feels slightly overkill.
17:05 jnthn TimToady: ah, you really want to be able to do that?
17:05 TimToady the user wants it
17:05 justatheory joined #perl6
17:05 jnthn So Routine gets a .declarator method/attribute that stores it?
17:06 jnthn Would we follow the pattern with other declarable thingies?
17:06 TimToady or regenerates it from the type accurately
17:06 jnthn Well, we can promise that for built-in types.
17:06 jnthn We can't when people start slanging and adding their own routine declarators. :)
17:06 TimToady I'll bet you can't distinguish "multi" from "multi sub" though :)
17:07 jnthn No, that's purely syntactic sugar. :)
17:07 jnthn I think a routine does know in Rakudo if it's a candidate in a multi.
17:07 jnthn Not sure that actually is needed by the new multi model, though. I'm not sure why it knows at the moment, tbh.
17:08 jnthn Other than just for the sake of being able to say so.
17:08 TimToady certainly the multi dispatcher can override error messages that would say "method" but are really exported
17:10 TimToady low-level invocation probably doesn't know whether it is being called on behalf of function dispatch or method dispatch though
17:10 jnthn Hmm...in theory yes. In practice I'm not quite sure how to make that works.
17:11 jnthn Ideally the multi dispatcher even appearing in the call stack would be optimized away in various cases.
17:11 jnthn (e.g. if we know at compile time where the dispatch goes, it probably just becomes a low-level invocation right off)
17:11 MayDaniel left #perl6
17:11 broquaint joined #perl6
17:13 jnthn And even if the multi-dispatcher does end up getting written in Perl 6, I'd expect a lot of dispatches to never actually go through that and hit a dispatch cache in the first attempt to.
17:13 jnthn *too
17:14 jnthn (Various things work like that in 6model. If things publish a type cache, then .^typecheck never gets invoked. If they publish a method cache and the entry is found in there, .^find_method never gets invoked.)
17:15 jnthn (The nice thing being that even custom meta-objects written by the user can take the effort to publish such things and have a chance of performing as well as the built-in ones, rather than being unoptimizable second class citizerns.)
17:16 risou_ joined #perl6
17:18 risou left #perl6
17:24 TimToady it's probably okay if exported methods are reported as methods
17:24 TimToady that'll probably help them find the definition in any case
17:26 cdarroch joined #perl6
17:26 cdarroch left #perl6
17:26 cdarroch joined #perl6
17:26 colomon hmmm, timely: http://www.johndcook.com/blog/2010/12/06/how-to-test-a-random-number-generator-2/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+TheEndeavour+(The+Endeavour)&amp;utm_content=Google+Feedfetcher
17:27 colomon Actually, I should probably just buy the "Beautiful Testing" book.
17:30 mtk left #perl6
17:30 sjohnson early morning perl hackers
17:31 masak good prevening, sjohnson.
17:31 sjohnson yo
17:31 colomon good midday nom time, sjohnson
17:31 sjohnson had to come in early today (9:30am) because I didn't use my conscience and put wd-40 on a stuck nut in my car.. and i broke it
17:32 sjohnson doh!
17:41 sjohnson hows perl6 today
17:43 TimToady lotsa stuck nuts :)
17:46 mtk joined #perl6
17:48 kanishka left #perl6
17:49 sjohnson heh
17:49 sjohnson colomon: (before|after)?noon
17:50 mtk left #perl6
17:51 mtk joined #perl6
17:51 * sjohnson sprays wd-40 on p6specs
17:52 nadim_ left #perl6
17:54 mtk left #perl6
17:55 mtk joined #perl6
17:58 justatheory left #perl6
18:04 impious joined #perl6
18:06 _twitch left #perl6
18:11 sahadev left #perl6
18:12 nadim_ joined #perl6
18:24 dakkar left #perl6
18:31 sorear good * #perl6
18:33 colomon \o
18:37 Axius joined #perl6
18:38 glow left #perl6
18:39 [particle] \*
18:51 MayDaniel joined #perl6
19:02 silug joined #perl6
19:07 masak nice! Ovid++ uses (and explains) closures in a recent blog post: http://blogs.perl.org/users/ovid/2010/12/perl101-red-to-green-gradient.html
19:07 hercynium joined #perl6
19:07 masak wonder if he was inspired by the Advent Calendar post from the other day? :)
19:08 masak also, I wonder if there is a more esthetic path through the color space other than the obvious one chosen, between #ff0000 and #00ff00
19:12 sorear hello masak!
19:13 masak hi sorear!
19:13 Axius left #perl6
19:14 masak nom &
19:15 kjeldahl left #perl6
19:17 justatheory joined #perl6
19:17 glow joined #perl6
19:20 jedai_ joined #perl6
19:22 araujo left #perl6
19:22 jedai left #perl6
19:24 wamba left #perl6
19:33 araujo joined #perl6
19:33 araujo left #perl6
19:33 araujo joined #perl6
19:39 jnthn masak: Generally to do gradients it's better to work in a non-RGB color base.
19:39 jnthn masak: Such as HSL.
19:42 MayDaniel left #perl6
19:47 kjeldahl joined #perl6
19:52 masak jnthn: right. that sounds like a fun little Perl 6 module to write at some point.
19:53 masak also, the green in #00ff00 is almost always much brighter than the red in #ff0000 on screens.
19:53 jnthn masak: Did something similar at $dayjob not long ago.
19:53 masak nice.
19:55 plainhao left #perl6
19:55 lichtkind joined #perl6
20:00 lichtkind is ^^^new?
20:00 lichtkind i mean  ^^
20:00 fhelmberger left #perl6
20:00 sorear ENOTENOUGHCONTEXT
20:00 lichtkind oh wait i found answer
20:01 lichtkind sorear: i thought context was clear since yesterday was talked about here
20:01 sorear that was thousands of lines ago though
20:03 jnthn At least it pointed you in the right direction. :)
20:04 lichtkind jnthn: your too genorous :)
20:04 sorear so STD.dll, 2.1 MB, breaks down into 100kb tables (mainly Field and Method), 300k string heap (field names, etc), 60k user strings, 1550kb CIL
20:05 sorear of the CIL, 130kb is in STD::.cctor
20:08 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_index_tablet
20:14 dual left #perl6
20:17 thundergnat rakudo: my $d; class A {method x { $d }}; for () { sub } #checking to see if this still blows up
20:17 p6eval rakudo :  ( no output )
20:19 thundergnat std: my $d; class A {method x { $d }}; for () { sub }
20:19 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/HyBXIBtGyI line 1:␤------> [32mclass A {method x { $d }}; for () { sub [33m⏏[31m}[0m␤    expecting any of:␤      name␤   routine_def␤    trait␤Parse failed␤FAILED 00:01 121m␤»
20:21 dual joined #perl6
20:30 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_index_tablet
20:30 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
20:42 M_o_C joined #perl6
20:48 rgrau joined #perl6
20:49 * lichtkind recommends paniq: http://www.paniq.cc/
20:50 Chillance joined #perl6
20:51 * [Coke] wonders if there's anything useful to hack on for rakudo other than "try to swamp out the queue"
20:51 [Coke] I haven't seen a lot of commits lately, so I suspect there aren't a lot of surprisingly fixed tickets.
20:51 Sarten-X left #perl6
20:52 masak as far as I know, the RT queue is full of fallen fruit.
20:52 jnthn So you're saying it's all jammed up?
20:52 jnthn ;)
20:53 masak someone with tuits could easily close a whole bunch of those tickets with relatively little effort.
20:53 [Coke] jnthn: Ugh, that rots.
20:53 [Coke] masak: ah, so you do expect tickets to have examples that magically work?
20:53 masak yes, sometimes. but I wasn't referring to that.
20:53 * [Coke] will troll the queue after $DAYJOB
20:54 [Coke] masak: ah, what then?
20:54 masak I was referrint to things with <10-line fixes in easy places in Rakudo.
20:55 [Coke] ah, that requires more than just mindless rote. ;)
21:00 masak yes, but not much more, that's my point.
21:00 masak lichtkind: interesting music. reminds me of an old Atari I have standing in my room.
21:00 Sarten-X joined #perl6
21:00 lichtkind masak: he is still member of a demo crew
21:02 lamstyle joined #perl6
21:03 [Coke] I just did a git pull of parrot master, built it, then tried to build rakudo, which complained I didn't have a recent enough version of parrot installed.
21:04 [Coke] (er, I installed parrot there in the right place, also)
21:04 justatheory left #perl6
21:04 [Coke] my git_describe says -614. rakudo wants -679
21:07 masak 614 < 679. so you need a newer one.
21:07 thundergnat BTW, I have been looking through the RT queue looking for tikets which might be closable
21:08 thundergnat Here's a bunch with my comentary / observations: http://home.comcast.net/~thundergnat/perl6.htm
21:10 masak thundergnat: excellent. think you could add them to the individual tickets?
21:10 masak thundergnat: reading that, I'm also inclined to ping whoever hands out RT admin bits.
21:10 thundergnat I supose I could go through and edit them.
21:11 [Coke] masak: and since I just grabbed the latest version of master, where the <BLEEP> do I get the newer version from? the future?
21:12 [Coke] masak: I used to have privs to hand out privs to the p6 bug queue.
21:13 masak [Coke]: ISTR people having problems similar to yours shortly after the latest R* release. I'll go check the backlog for hints.
21:14 flussence 679 just pulled fine for me...
21:14 [Coke] I am not using --gen-parrot. I'm using an existing git repo of parrot that I did a pull, rebuild, install on .
21:15 flussence are you pulling from a stale mirror, maybe?
21:16 [Coke] I'm pulling from github/parrot/parrot
21:17 flussence using the right branch? it happens...
21:18 masak [Coke]: I used to have Parrot externally like that. but when Parrot switched to git, I thought I might as well switch to the --gen-parrot veriant.
21:19 [Coke] rakudo is not the only parrot-related project I work on.
21:23 masak nod.
21:23 masak just saying I encountered some problems around that point myself.
21:32 masak thundergnat++ # all those comments on open tickets
21:33 dalek niecza: c953c81 | sorear++ | / (3 files):
21:33 dalek niecza: Increase inline local space from 4 to 10 slots
21:33 dalek niecza: review: https://github.com/sorear/niecza/commit/c953c815a9
21:33 masak std: say (7^^^^^^7).WHAT
21:33 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ^^ or redundant prefix ^␤  (to suppress this message, please use space between ^ ^) at /tmp/bgCpVduLnj line 1:␤------> [32msay (7^^^^[33m⏏[31m^^7).WHAT[0m␤Parse failed␤FAILED 00:01 120m␤»
21:33 masak std: 7^^^^^^7
21:33 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ^^ or redundant prefix ^␤  (to suppress this message, please use space between ^ ^) at /tmp/LvXk3hHw_O line 1:␤------> [32m7^^^^[33m⏏[31m^^7[0m␤Parse failed␤FAILED 00:01 119m␤»
21:34 masak thundergnat: "Not imediately obvious perhaps, but not wrong." -- it fails in STD. as long as STD doesn't have a known bug here, it is wrong, and Rakudo shouldn't parse it either.
21:34 masak STD is the measure stick against which all the other parsers out there should be evaluated.
21:35 thundergnat Ok, perhaps my contension should be "STD has a bug"
21:35 PerlJam [Coke]: I've had that happen to me once.  I thought at the time that it was because a previous build of parrot had left some of its configuration around.  Did you do a "make realclean" prior to rebuild?
21:35 masak thundergnat: I understand and accept your reasons for thinking so. would be interesting to hear what TimToady thinks.
21:36 sorear thundergnat: why do you argue STD is wrong?
21:36 sorear perl6: say ("foo";)
21:36 p6eval rakudo : OUTPUT«foo␤»
21:36 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ";)"␤    expecting term postfix, operator or ")"␤    at /tmp/Azwwzsk2Kb line 1, column 11␤»
21:36 sorear perl6: say ("foo";;)
21:36 p6eval rakudo : OUTPUT«===SORRY!===␤Method 'returns' not found for invocant of class 'Integer'␤»
21:36 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ";;)"␤    expecting term postfix, operator or ")"␤    at /tmp/YJGGpP6xfq line 1, column 11␤»
21:36 sorear hey masak, is that one known?
21:36 masak sorear: see comments at http://home.comcast.net/~thundergnat/perl6.htm
21:37 masak sorear: (about thundergnat's arguments)
21:37 masak sorear: no; first time I see it.
21:37 thundergnat std: say 0^^^^^5;
21:37 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ^^ or redundant prefix ^␤  (to suppress this message, please use space between ^ ^) at /tmp/qa7FlLBQ11 line 1:␤------> [32msay 0^^^^[33m⏏[31m^5;[0m␤Parse failed␤FAILED 00:01 120m␤»
21:37 * masak submits rakudobug
21:37 thundergnat rakudo: say 0^^^^^5;
21:37 p6eval rakudo : OUTPUT«01234␤»
21:38 thundergnat rakudo is correct IMO
21:38 masak sorear: are you arguing that Pugs is right here, or just that the second Rakudo evaluation is Wrong?
21:39 sorear masak: the second rakudo evaluation is a crash in Perl6::Actions; it is automatically wrong
21:39 sorear that error message indicates PAST mishandling (.returns is one of the PAST::Node accessors)
21:39 thundergnat Or, at least if 0^^^^^5 is wrong then 0 ||||| 5 should arguably be also.
21:39 sorear pugs' behavior is also wrong
21:40 sorear the inside of () parses as a list of <statement> now
21:40 masak sorear: ok.
21:40 masak sorear++
21:41 sorear but pugs specrot is a dime a dozen these days so I'm not making an issue
21:41 sorear niecza currently ignores empty statements
21:41 sorear (;;;;;;2;;;;;;;;;) returns 2
21:41 sorear which is probably wrong
21:41 sorear in particular, it causes {; a => 2 }  to be a hash constructor, because the empty statement is ignored
21:42 masak thundergnat: I merged the two tickets at the end of your list.
21:43 thundergnat masak: ok, I edit my list
21:43 thundergnat * I'll
21:43 masak I suspect pmichaud might have RT privs.
21:43 PerlJam thundergnat: STD used to behave as Rakudo currently does IIRC.  And because it's surprising, that's why STD behaves as it does now.
21:44 masak [Coke]: maybe this'll help? http://irclog.perlgeek.de/perl6/2010-11-29#i_3039452
21:44 thundergnat Oh, 0^^^^5 definitely viloate the principle of least suprise, but why doesn't 0|||||5?
21:45 thundergnat std: 0|||||5
21:45 p6eval std a194beb: OUTPUT«ok 00:01 119m␤»
21:45 sorear thundergnat: because prefix:<||> is defined
21:46 dalek niecza: c9ef750 | sorear++ | src/Niecza/Actions.pm:
21:46 dalek niecza: Approximate lol parsing in postcircumfixes better
21:46 dalek niecza: review: https://github.com/sorear/niecza/commit/c9ef750289
21:50 thundergnat rakudo: say (||5).WHAT
21:50 p6eval rakudo : OUTPUT«Capture()␤»
21:51 thundergnat rakudo: say (|5).WHAT
21:51 p6eval rakudo : OUTPUT«Capture()␤»
21:51 thundergnat sorear: where does prefix || come into it?
21:51 lamstyle left #perl6
21:51 sorear thundergnat: the actual STD error check is
21:51 sorear std: ~~3
21:51 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ~~ or redundant prefix ~␤  (to suppress this message, please use space between ~ ~) at /tmp/lKU9fd6b6M line 1:␤------> [32m~~[33m⏏[31m3[0m␤Parse failed␤FAILED 00:01 117m␤»
21:51 sorear std: ||3
21:51 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
21:52 sorear it doesn't make sense to die on ||3, because || is a prefix operator
21:52 sorear ~~ isn't a prefix operator
21:53 thundergnat I'm not saying it shoud die, but ||5 is a capture of a capture,
21:53 thundergnat not a ||
21:53 justatheory joined #perl6
21:53 thundergnat std: | |5
21:53 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
21:54 sorear thundergnat: || is a || what are you talking about
21:54 jnthn sorear: Rakudo probably doesn't yet implement ||
21:54 jnthn sorear: It probably doesn't even parse it yet.
21:55 jnthn sorear: It parses ||$foo as |(|($foo)) still.
21:55 jnthn (I think, anyway.)
21:55 [Coke] PerlJam: I /always/ do a make realclean, yes.
21:55 jnthn If anyone fancies adding a || parsing that warns it's NYI that'd be fine by me.
21:55 jnthn It'd reduce confusion.
21:55 sorear jnthn: thundergnat is confusing Rakudo with Perl 6 again
21:56 sorear it really irritates me when people do that
21:56 jnthn *sigh*
21:56 [Coke] masak: uh, which part?
21:57 masak sorear: it would, you're the implementor of the "second implementation". you're Pepsi.
21:57 jnthn sorear: You could gently point that out rather than getting irritated... :)
21:57 thundergnat sorear: sorry. I'll try not to mix those up again.
21:57 masak [Coke]: from the anchor I linked to and onwards.
21:57 [Coke] I find it hard to fault people for confusing rakudo & perl6.\
21:57 [Coke] masak: the first page seems entirely irrelevant.
21:57 sorear sorry.  it took me a while to catch on.
21:57 masak [Coke]: er, what did I link you to?
21:58 sorear first I get confused
21:58 * masak double-checks
21:58 mtk left #perl6
21:58 [Coke] I'm not using --gen-parrot, so removing parrot/parrot_install doesn't help, I did a realclean before I did the build...
21:58 thundergnat left #perl6
21:59 masak oh, right.
21:59 masak then maybe a problem similar to yours isn't to be found in the backlog after all.
21:59 [Coke] and if I realcleaned, I shouldn't need a git reset. I think.
22:06 kjeldahl left #perl6
22:07 PerlJam [Coke]: maybe your parrot build linked against the already-installed parrot lib ?
22:09 donaldh joined #perl6
22:18 dalek niecza: f861d25 | sorear++ | test2.pl:
22:18 dalek niecza: Tests for @foo[1,2] and @foo[*-1]
22:18 dalek niecza: review: https://github.com/sorear/niecza/commit/f861d25fd0
22:18 dalek niecza: b23c285 | sorear++ | lib/Kernel.cs:
22:18 dalek niecza: Implement array and hash slices
22:18 dalek niecza: review: https://github.com/sorear/niecza/commit/b23c28509b
22:22 [Coke] PerlJam: I'll rebuild with my special "--kill" switch to my build script that removes the previous install dir and see if that helps.
22:26 [Coke] PerlJam: nope. just rebuilt sans a currently installed parrot, and it still says -614
22:26 rgrau left #perl6
22:30 _kaare left #perl6
22:31 sorear perl6: my $a; say $a[*-1]
22:31 p6eval rakudo : OUTPUT«Any()␤»
22:31 p6eval ..pugs: OUTPUT«␤»
22:31 sorear perl6: my $a; $a[*-0] = 1; say $a
22:31 p6eval pugs: OUTPUT«1␤»
22:32 p6eval ..rakudo : OUTPUT«Any() 1␤»
22:33 kensanata joined #perl6
22:36 dalek niecza: 3e87ab8 | sorear++ | test2.pl:
22:36 dalek niecza: Add a few more slice tests
22:36 dalek niecza: review: https://github.com/sorear/niecza/commit/3e87ab811e
22:36 sorear What *should* that do?
22:51 kensanata left #perl6
22:54 M_o_C left #perl6
22:55 Chillance left #perl6
22:59 bitter16 joined #perl6
22:59 scp1 left #perl6
23:06 ch3ck3r joined #perl6
23:09 masak sorear: I think Rakudo's behavior is correct.
23:09 masak rakudo: my $a; $a[* + 0] = 1; say $a.perl
23:09 p6eval rakudo : OUTPUT«[Any, 1]␤»
23:10 ch3ck3r hi masak
23:10 masak ch3ck3r: hi.
23:10 ch3ck3r may i see your feet?
23:10 ch3ck left #perl6
23:11 masak ch3ck3r: I kinda need them right now.
23:11 jnthn .oO( what?! )
23:11 masak jnthn: I didn't want to say anything, but I had the same reaction. :)
23:11 ch3ck3r masak: ok, i can wait
23:11 masak ch3ck3r: don't get me wrong, but we're not really at the "may I see your feet?" stage in out relationship yet.
23:12 ch3ck3r aren't we?
23:12 masak not that I'm aware. sorry.
23:12 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
23:12 masak s/out/our/
23:13 ch3ck3r sorry, then i have to apologize
23:13 masak no need. I'm not offended or anything.
23:14 masak ch3ck3r: did you have a real purpose with your discussion, besides delighting us with absurdity?
23:15 ch3ck3r hmm, i don't think so
23:15 masak very well.
23:15 ch3ck3r i was just interested to see your feet xD
23:15 colomon Here's one of my feet.  It's pretty much the same as everyone else's, though.  http://tinyurl.com/2fpn4jh
23:15 ch3ck3r it says a lot about ppl you know
23:16 masak colomon++ :)
23:16 masak ch3ck3r: yes, but how much does it say about people you don't know?
23:16 scp1 joined #perl6
23:16 risou joined #perl6
23:16 ch3ck3r masak: your foot looks strange
23:16 dalek niecza: 932e912 | sorear++ | lib/Kernel.cs:
23:16 dalek niecza: Implement @foo[*-1] forms
23:16 dalek niecza: review: https://github.com/sorear/niecza/commit/932e912cc9
23:18 ch3ck3r what's the matter with the numbers on it?
23:18 risou_ left #perl6
23:19 masak ch3ck3r: we're usually lenient to people who go off topic here, but we're quite strict towards users who behave like Markov chains. so please try not to act like one.
23:30 donaldh left #perl6
23:33 hudnix joined #perl6
23:33 quietfanatic left #perl6
23:34 saaki that there's some fancy computer talk =p
23:34 colomon I'm planning on using Markov chains in my next Advent post...
23:34 masak ooh
23:35 colomon Markov chains... and the sequence operator.  ;)
23:36 masak a natural match, now that you mention it.
23:43 am0c left #perl6
23:47 soroush_ joined #perl6
23:48 soroush left #perl6
23:54 masak blog post! http://strangelyconsistent.org/blog/best-november-ever
23:55 * sorear out
23:57 jnthn masak: Did you really mean to claim that you worked on "Fiat currency reform in Nationalist China"? :)
23:58 masak jnthn: yes, but don't tell anyone :P
23:58 * masak fixes

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

Perl 6 | Reference Documentation | Rakudo