Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-02-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:18 benabik_ joined #perl6
00:27 unobe joined #perl6
00:53 scott__ joined #perl6
01:02 sorear good * #perl6
01:15 cooper joined #perl6
01:25 kmwallio joined #perl6
01:41 woosley joined #perl6
01:42 colomon o/
01:51 awwaiid joined #perl6
01:58 colomon ://colomon@melissa/home/colomon/SolsSVN/HWLibs/branches/HWLibs_1_5_stable HWLibssvn co svn+ssh
01:59 cosimo joined #perl6
01:59 Khisanth joined #perl6
01:59 domidumont joined #perl6
01:59 colomon wow, windowing is really messed up on my mac -- that typed in two windows, the one I wanted to type in and this one too.
01:59 colomon time to reboot, I guess
02:08 HarryS joined #perl6
02:08 broquaint joined #perl6
02:08 lumi___ joined #perl6
02:08 wooden joined #perl6
02:08 PZt joined #perl6
02:08 araujo joined #perl6
02:08 phenny joined #perl6
02:08 jerome_ joined #perl6
02:08 jnthn joined #perl6
02:08 timotimo joined #perl6
02:08 kfo joined #perl6
02:08 clkao joined #perl6
02:08 hillu joined #perl6
02:08 charsbar___ joined #perl6
02:08 felher joined #perl6
02:08 huf joined #perl6
02:08 Timbus joined #perl6
02:09 colomon joined #perl6
02:12 stepnem joined #perl6
02:12 xinming joined #perl6
02:12 alvis joined #perl6
02:12 tokuhirom3 joined #perl6
02:12 mathw joined #perl6
02:12 BooK joined #perl6
02:12 Exodist joined #perl6
02:12 robinsmidsrod joined #perl6
02:12 kthakore joined #perl6
02:12 pomysl joined #perl6
02:12 ggoebel joined #perl6
02:12 ascent_ joined #perl6
02:12 fhelmberger joined #perl6
02:12 zostay_ joined #perl6
02:12 ilogger2 joined #perl6
02:12 pjcj joined #perl6
02:12 jlaire joined #perl6
02:16 colomon joined #perl6
02:16 skids joined #perl6
02:16 whiteknight joined #perl6
02:16 Patterner joined #perl6
02:16 bonsaikitten joined #perl6
02:16 jaldhar joined #perl6
02:16 diakopter joined #perl6
02:16 daemon joined #perl6
02:16 masak joined #perl6
02:16 Grrrr joined #perl6
02:16 p6eval joined #perl6
02:16 rsimoes1 joined #perl6
02:16 bacek_at_work joined #perl6
02:16 odoacre joined #perl6
02:16 Tene joined #perl6
02:16 tadzik joined #perl6
02:16 krakan joined #perl6
02:16 twinshadow joined #perl6
02:16 risou joined #perl6
02:18 pothos joined #perl6
02:18 dju joined #perl6
02:18 LoRe joined #perl6
02:18 silug_ joined #perl6
02:18 [Coke] joined #perl6
02:18 jasonmay joined #perl6
02:18 integral joined #perl6
02:18 ingy joined #perl6
02:18 snarkyboojum joined #perl6
02:18 cotto joined #perl6
02:18 Helios joined #perl6
02:18 Chillance joined #perl6
02:22 pothos joined #perl6
02:30 woosley joined #perl6
02:34 lutok joined #perl6
02:54 scott__ joined #perl6
03:03 wolfman2000 joined #perl6
03:03 benabik joined #perl6
03:06 uno_be joined #perl6
03:29 lutok joined #perl6
03:40 gfldex joined #perl6
03:49 orafu joined #perl6
04:28 Su-Shee joined #perl6
04:54 birdwindupbird joined #perl6
05:13 pothos_ joined #perl6
05:16 odoacre joined #perl6
05:17 kaleem joined #perl6
05:19 BinGOs joined #perl6
05:19 Woodi joined #perl6
05:20 orafu joined #perl6
05:21 HarryS joined #perl6
05:25 moritz \o
05:25 sorear o|
05:25 araujo o/
05:26 sorear araujo \o/
05:26 jlaire joined #perl6
05:27 araujo sorear, \o/
05:29 [Coke] perl6: .say for Bool;
05:29 p6eval rakudo 0711f9, niecza v14-23-g0699296: OUTPUT«Bool()␤»
05:29 p6eval ..pugs b927740: OUTPUT«Bool␤»
05:32 khisanth_ joined #perl6
05:33 cosimo joined #perl6
05:34 revdiablo joined #perl6
05:37 JimmyZ joined #perl6
05:39 jlaire joined #perl6
05:39 kaleem joined #perl6
05:40 kst` joined #perl6
05:42 jtpalmer_ joined #perl6
05:43 chra_ joined #perl6
05:43 xinming joined #perl6
05:44 pnu_ joined #perl6
05:45 Juerd_ joined #perl6
05:45 pochi_ joined #perl6
05:46 nebuchad` joined #perl6
05:47 yeltzooo joined #perl6
05:47 DarthGandalf joined #perl6
05:53 [Coke] niecza: say True.key
05:53 p6eval niecza v14-23-g0699296: OUTPUT«True␤»
05:53 [Coke] niecza: say True.value
05:53 p6eval niecza v14-23-g0699296: OUTPUT«1␤»
05:56 [Coke] niecza: enum cat <mao meow ruff>; say mao.value
05:56 p6eval niecza v14-23-g0699296: OUTPUT«0␤»
05:57 [Coke] niecza: enum cat <1 2 ruff>; my $a = cat::1; say $a.value
05:57 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/xI8Ml46dAV line 1:�------> [32menum cat <1 2 ruff>; my $a = cat::[33m�[31m1; say $a.value[0m��Parse failed��»
05:57 [Coke] niecza: enum cat <1 2 ruff>; my $a = cat::ruff; say $a.value
05:57 p6eval niecza v14-23-g0699296: OUTPUT«2␤»
06:01 birdwind1pbird joined #perl6
06:02 TimToady niecza: enum cat <1 2 ruff>; my $a = cat::<1>; say $a.value
06:02 p6eval niecza v14-23-g0699296: OUTPUT«0␤»
06:02 TimToady tada
06:02 Psyche^ joined #perl6
06:08 TimToady niecza: enum cat <mraa term:<⑆> hsss>; say ⑆.value
06:08 p6eval niecza v14-23-g0699296: OUTPUT«1␤»
06:09 moritz std: sub a() { }; multi a() { }
06:09 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Illegal redeclaration of routine 'a' (see line 1) at /tmp/kspDNPqJ5E line 1:�------> [32msub a() { }; multi a[33m�[31m() { }[0m�Check failed�FAILED 00:01 109m�»
06:10 TimToady nom: enum cat <mraa term:<⑆> hsss>; say ⑆.value
06:10 p6eval nom 0711f9: OUTPUT«===SORRY!===␤Confused␤at /tmp/s0HcGV8N3h:1␤»
06:11 [Coke] masak: https://gist.github.com/404035 - this at least gets the original code running on niecza.
06:11 [Coke] (now with real enums and some other cleanups)
06:12 [Coke] niecza: https://gist.github.com/404035
06:12 p6eval niecza v14-23-g0699296: OUTPUT«Hand 1: ␤        ace of spades ␤ three of clubs ␤        king of spades ␤        jack of diamonds ␤      jack of clubs␤Hand 2: ␤ ten of spades ␤ four of diamonds ␤      five of clubs ␤ ten of diamonds ␤       king of hearts␤The first hand is a 'one pair' and the
06:12 p6eval ..second one a 'one pair', so th…
06:13 * [Coke] must sleep now.
06:13 moritz [Coke]: sleep well. Dream of perfectly scored poker hands.
06:14 moritz std: has sub f() { }
06:14 p6eval std 48335fc: OUTPUT«Potential difficulties:â�¤  'has' declaration outside of class at /tmp/WEUfe9TdY8 line 1:â�¤------> [32mhas[33mâ��[31m sub f() { }[0mâ�¤ok 00:01 109mâ�¤Â»
06:14 moritz std: state sub f() { }
06:14 p6eval std 48335fc: OUTPUT«ok 00:01 109m␤»
06:15 [Coke] rakudo: https://gist.github.com/404035
06:15 p6eval rakudo 0711f9: OUTPUT«Type check failed in assignment to '$!suit'; expected 'Suit' but got 'Pair'␤  in method BUILDALL at src/gen/CORE.setting:583␤  in method bless at src/gen/CORE.setting:573␤  in method new at src/gen/CORE.setting:558␤  in block <anon> at /tmp/jbfHuXRrTD:80␤  in metho…
06:15 * [Coke] never tried it on rakudo. ;)
06:15 [Coke] danke. see you today.
06:16 moritz niecza: my $x = 3; enum Foo (x => $x);
06:16 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Enum values must be Int or Str, but got Anyâ�¤  at /home/p6eval/niecza/lib/CORE.setting line 1586 (List.gist @ 4) â�¤  at <unknown> line 0 (ExitRunloop @ 0) â�¤  at /tmp/Gqsjit3Ote line 0 (ANON @ 2) â�¤  at <unknown> line 0 (ExitRun…
06:18 TimToady niecza: BEGIN my $x = 3; enum Foo (x => $x);
06:18 p6eval niecza v14-23-g0699296:  ( no output )
06:19 moritz niecza: enum Foo (x => get());
06:19 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unable to resolve method get in class Anyâ�¤  at <unknown> line 0 (ExitRunloop @ 0) â�¤  at /tmp/im7EzMyaqf line 1 (ANON @ 2) â�¤  at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/im7EzMyaqf line 1:â�¤------> [32menum Foo (x => get()…
06:19 TimToady the value must be known at compile time
06:19 moritz method?
06:20 moritz TimToady: I know, I just try to explore niecza's error messages
06:20 TimToady an 'is export' maybe
06:20 moritz ah, probably method because it re-dispatches get to $*ARGFILES.get
06:20 moritz and that is Any
06:26 Psyche^ joined #perl6
06:44 TimToady we might be missing a list infix op, M, which merges lazy lists lazily
06:44 TimToady it might, in fact, be a metaop
06:47 koban joined #perl6
06:47 koban left #perl6
06:54 takesako joined #perl6
06:58 TimToady constant @hamming = 1, dedup (@hamming X* 2) M (@hamming X* 3) M (@hamming X* 5);
06:58 TimToady your mission is to define infix:<M> so that it works right
06:59 lestrrat joined #perl6
06:59 wtw joined #perl6
06:59 moritz you want Mmin, don't you?
06:59 TimToady well, we might define it elsewise
07:00 TimToady I'm thinking M<= would include ups, and M< wouldnt
07:00 TimToady *dups
07:00 TimToady or something like that
07:00 lestrrat joined #perl6
07:01 TimToady then we can get rid of the dedup
07:02 TimToady the next trick after that is to make it so that calculating @hamming[1_000_000] doesn't have to keep all the previous values around
07:03 dalek rakudo/nom: 6ed624d | moritz++ | src/Perl6/Actions.pm:
07:03 dalek rakudo/nom: Throw one more typed exception
07:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6ed624d16c
07:03 TimToady c.f. http://rosettacode.org/wiki/Hamming_numbers
07:05 TimToady Python brags a lot in the associated Wikipedia articles about their built-in merge
07:07 TimToady I think we could show 'em what a *real* built-in merge looks like :)
07:11 TimToady if M defaults to before semantics, and we want the equals case, then it really defaults to M[!after] I guess
07:11 TimToady which seems a bit odd
07:12 TimToady maybe we need a beforesame operator
07:12 moritz urks
07:12 dalek roast: 171ad0a | moritz++ | S32-exceptions/misc.t:
07:12 dalek roast: test X::Undeclared
07:12 dalek roast: review: https://github.com/perl6/roast/commit/171ad0a8c8
07:12 dalek roast: 63626c2 | moritz++ | S32-exceptions/misc.t:
07:12 dalek roast: another redeclaration test
07:12 dalek roast: review: https://github.com/perl6/roast/commit/63626c2dc3
07:14 TimToady I guess we could name it with either 2-way or 3-way comparisons, then it's just Mcmp to get the 'leave dups in case'
07:15 TimToady er, 'leave dups in' case
07:17 TimToady I suppose it's not really a very good higher-order function if it has to introspect the operator to see if it supports equality, and make it mean dedup if it doesn't
07:18 moritz well
07:18 moritz we can distinguish True/False from Order::{Same,Increase,Decrease}
07:18 TimToady that doesn't exactly help
07:19 moritz right
07:19 TimToady well, unless we require the Order form for equality
07:19 TimToady and restrict the other to non-equalities
07:23 TimToady well, something to sleep on, I think, and maybe try to prototype, which I don't doubt will stress our iterator implementations :)
07:23 TimToady at least, it did last time I tried to write a list merge routine...
07:27 masak morning, #perl6.
07:28 moritz \o masak
07:28 masak #phasers in 661?
07:29 moritz 601 I think
07:29 moritz $ date --utc
07:29 moritz Wed Feb  8 07:28:48 UTC 2012
07:29 moritz and #phasers is 1730 UTC
07:30 lestrrat joined #perl6
07:31 sorear hello, masak
07:32 masak oh, 17:30!
07:32 masak that's why I keep missing it ;)
07:33 masak https://gist.github.com/404035 -- first time I've seen 'where sub' in a subtype declaration.
07:33 masak possible but doesn't seem necessary here, AFAICS.
07:33 masak anyway, [Coke]++
07:37 jnthn Morning. It is it.
07:37 jnthn Last day of class. Tomorrow: Perl 6 tuits :)
07:39 moritz niecza: my $i = 1; m:$i/s/
07:39 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0m��Colons may not be used to delimit quoting constructs at /tmp/H9518wDAgQ line 1:�------> [32mmy $i = 1; m[33m�[31m:$i/s/[0m��Parse failed��»
07:39 moritz niecza: my $i = 1; m:i($i)/s/
07:39 p6eval niecza v14-23-g0699296: OUTPUT«Unhandled exception: Unable to resolve method match in class Any␤  at /tmp/WHsMasZ0_I line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3744 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3745 (module-CORE @ 65) ␤  at /home/…
07:40 moritz niecza: my $i = 1; say 'S' ~~ m:i($i)/s/
07:40 p6eval niecza v14-23-g0699296: OUTPUT«#<match from(0) to(1) text(S) pos([].list) named({}.hash)>␤»
07:40 moritz niecza: my $i = 0; say 'S' ~~ m:i($i)/s/
07:40 p6eval niecza v14-23-g0699296: OUTPUT«#<match from(0) to(1) text(S) pos([].list) named({}.hash)>␤»
07:40 sorear what?
07:40 sorear :i() shouldn't be parsing at all
07:40 moritz why not?
07:41 moritz :i(1) sounds perfectly fine
07:41 moritz also it parses the same way as :c($start_from_here), which is also legitim
07:41 sorear because that code long predates niecza's constant expression support.
07:42 masak oh no not another metaop :)
07:42 masak though this one sounds cool, I'll admit.
07:45 `10 joined #perl6
07:55 dalek rakudo/nom: a2792b9 | moritz++ | src/ (2 files):
07:55 dalek rakudo/nom: typed exceptions for things that must be known at compile time
07:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a2792b9bd9
07:56 dalek roast: 59f3f35 | moritz++ | S32-exceptions/misc.t:
07:56 dalek roast: test exception type for stuff that must be known at compile time
07:56 dalek roast: review: https://github.com/perl6/roast/commit/59f3f35d84
08:03 masak http://rosettacode.org/wiki/Hamming_numbers#Perl_6 -- "Rakudo Perl 6 (2010.12) does not as of yet have support for for arbitrarily large integer calculations." -- I think that's old info now, no?
08:03 jnthn yeah
08:03 * masak edits
08:03 jnthn We've had big integer support for ages
08:06 moritz given ages === months :-)
08:07 jnthn ;)
08:09 Su-Shee good morning everyone.
08:10 sorear Su-Shee!
08:10 sorear good morning!
08:14 masak Su-Shee! \o/
08:25 woosley left #perl6
08:31 tadzik good morning :)
08:31 ab5tract joined #perl6
08:36 masak tadzik! \o/
08:45 mj41 joined #perl6
08:48 moritz niecza: my ($x, $y) = (2**30, 1); printf "%32b\n", +^$x +& $y;
08:49 p6eval niecza v14-23-g0699296: OUTPUT«                               1␤»
08:50 orafu joined #perl6
08:51 * sorear sleep
08:54 moritz perl6: my ($x, $y) = (2**30, 1); say +^$x +& $y;
08:55 p6eval pugs b927740, niecza v14-23-g0699296: OUTPUT«1␤»
08:55 p6eval ..rakudo a2792b: OUTPUT«-1152921504606846975␤»
08:56 masak Rakudo does like negative numbers...
08:56 moritz I think I have a fix for it
08:58 moritz and it's so stupid that I wonder nobody has caught it before :/
09:06 masak sounds like most fixes... :)
09:06 masak so, is it a fix in Rakudo, not libtommath?
09:08 moritz nqp
09:09 masak heh. I like this. in Perl 6, I have to write 'say ""' because just 'say' is an error (except not right now in Rakudo) to prevent Perl 5 thinkos with implicit $_. in Perl 5 I have to write 'say ""' instead of 'say' because I'm making the *reverse* thinko and not even considering that 'say' defaults to $_. :)
09:09 masak life in the day of a Perl 6 hacker trying to use Perl 5.
09:11 moritz oh, but the fix breaks something else
09:11 moritz hm
09:19 mj41 joined #perl6
09:28 moritz it seems that my detection of when then result of a binary bitop is negative is wrong
09:31 masak is it possible that the flaw in you in your detection of when the result of a binary bitop is negative is fixable? :)
09:31 masak g'ah, s/in you /
09:31 masak language. it nests well.
09:31 moritz it is possible, yes
09:32 jlaire "life in the day" ... sounds interesting
09:32 masak jlaire: I was all "hey, this is Perl 5, I can do `say;` and not `say "";` like I have to in Perl 6!"
09:32 masak undefined $_ warnings were my reward.
09:33 moritz I just hope that the the C compiler constant-folds the heck out of my code :-)
09:33 masak C compilers are usually good at such things.
09:33 moritz I know
09:33 jlaire yep, but "day in the life" is the usual saying
09:34 jlaire wondered if it's a thinko or some deep pun
09:34 moritz note to self: - is not allowed in C identifiers. _ is.
09:34 masak I recently learned that the prime 31 is popular in hash-code algorithms, because various compilers take '$x * 31' and turn it into '$x <+ 5 - $x', a bit-shift and a subtraction, which is cheaper than a multiplication.
09:34 masak jlaire: oh, argh. pre-coffee thinko.
09:35 jlaire at some point, gcc was over enthusiastic about replacing multiplication with shifts and additions/subtractions
09:35 moritz ... except when it isn't cheaper
09:35 jlaire it was a pessimization on some AMD processors
09:35 jlaire iirc
09:35 masak right. pipelining and stuff changes the game a bit.
09:35 masak no pun intended.
09:36 moritz non taken.
09:36 dakkar joined #perl6
09:39 tadzik 'right', 'bit' ;)
09:41 orafu joined #perl6
09:43 dalek nqp: 19f1639 | moritz++ | / (2 files):
09:43 dalek nqp: [bigint] fix detection of negative numbers from binary ops
09:43 dalek nqp:
09:43 dalek nqp: This should fix RT #109740
09:43 dalek nqp: review: https://github.com/perl6/nqp/commit/19f1639689
09:44 daxim joined #perl6
09:45 moritz it's better to just consider a single bit than the whole digit :-)
09:46 moritz and the parens were wrong before anyway
09:52 tarch joined #perl6
09:54 masak moritz++
09:54 moritz executive summary: we need many more tests for bitops
09:55 tarch joined #perl6
10:01 masak today's autopun: Interviewer: "What do you say, Mr. Kinnock, to all those people who accuse you of blatant electioneering?" -- Neil Kinnock: "Vote for me!"
10:02 sftp joined #perl6
10:06 Psyche^ joined #perl6
10:06 ab5tract joined #perl6
10:09 moritz https://gist.github.com/1767768
10:13 masak :)
10:13 masak trying to make the research for my lightning talk easier? :)
10:14 moritz akshually I started collecting before we discussed the talk the first time
10:16 masak oh ye of much self-reference. get thee to an auto-punnery.
10:22 Psyche^ joined #perl6
10:35 dalek rakudo/nom: 0a3ee96 | moritz++ | tools/build/NQP_REVISION:
10:35 dalek rakudo/nom: bump NQP revision to get RT #109740 fix
10:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a3ee96cca
10:35 dalek roast: 45d427d | moritz++ | S03-operators/bit.t:
10:35 dalek roast: RT #109740, big-ish binary bit ops
10:35 dalek roast: review: https://github.com/perl6/roast/commit/45d427d57e
10:38 masak moritz: I don't think the Banach-Tarski one is an autopun. either it isn't, or I'm missing something about the Banach-Tarski theorem.
10:38 xinming joined #perl6
10:38 * masak defender of the purity of the definition of "autopun"
10:39 moritz masak: well, it's more of a meta joke than an autopun
10:39 jlaire what's the definition
10:41 masak jlaire: "pulling up" mentioning a phenomenon into use of the phenomenon.
10:41 jlaire mmkay
10:42 masak jlaire: example: "I got these pills to give me strength, but it was no good. I can't get the bottle open. :-/"
10:42 jlaire aha, I get it now
10:42 jlaire thanks :)
10:42 masak yes, the example works better than the explanation :)
10:45 Psyche^ joined #perl6
10:46 lutok joined #perl6
10:46 masak another one: "What's the difference between ignorance and apathy?" -- "I don't know, and I don't care."
10:47 jlaire hehe
10:48 scott__ joined #perl6
10:49 masak the other day, I saw the tweet "Does the twittersphere understand the concept of rethorical questions?"
10:50 masak I was on the verge of replying "Guess not!", but it felt too obvious. :)
10:54 moritz there's a nice one that only works in German, unfortunately
10:54 moritz "Wiseen ist Macht" -- "Ich weiss nichts" -- "Macht nichts!"
10:54 masak moritz: your gist is the top Google result for "autopun".
10:54 moritz masak: woah.
10:54 jlaire hehe
10:54 jlaire needs an urbandictionary entry
10:54 mj41 joined #perl6
10:55 masak moritz: "Knowldege is power" -- "I don't know [about that]" -- "That doesn't work!"
10:55 masak moritz: did I get that right?
10:55 moritz masak: no
10:55 masak dang :)
10:55 masak I'm trying to learn German by passive absorbtion. it's a slow process.
10:55 moritz masak: "macht nichts" means "doesn't matter" (but of course also puns "Macht" eq "power")
10:56 masak ah! that was the missing piece :)
10:56 masak that's a pun; don't know about it being an autopun :)
10:57 masak verging on one, certainly. if you consider the first line to be the mention, and the rest to be the use.
10:57 moritz well, it's an edge case
10:57 masak right.
10:58 masak ah, so de:"macht nichts" is sv:"det gör inget"
10:58 masak phenny: "macht nichts!"?
10:58 phenny masak: "does not matter!" (de to en, translate.google.com)
10:58 masak phenny: "det gör inget!"?
10:58 phenny masak: "it does not matter !" (sv to en, translate.google.com)
10:59 moritz phenny: "gör"?
10:59 phenny moritz: "doing" (sv to en, translate.google.com)
11:00 moritz "Unable to remove the selected object\n[Error: null]" # I /love/ such error messages
11:00 masak "Dissecting a joke is like dissecting a frog: you'll only make a mess, and the frog dislikes it."
11:00 moritz that's from a commerical optics simulation program
11:00 masak moritz: did I tell you about the worst user error I've ever seen?
11:01 moritz masak: no
11:02 masak "Child killed. Cause: could not connect to FTP server."
11:02 masak user was allegedly very distraught.
11:04 masak worse than being unintentionally uninformative is probably to unintentionally horrify people.
11:20 masak ...was it something I said...? :)
11:22 moritz maybe it was something you didn't say :-)
11:24 moritz std: sub f()
11:24 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Malformed block at /tmp/D5lQ2mXfkT line 1 (EOF):�------> [32msub f()[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 108m�»
11:54 am0c joined #perl6
12:06 fasad joined #perl6
12:42 benabik joined #perl6
12:45 orafu joined #perl6
12:45 pernatiy joined #perl6
12:45 mtk joined #perl6
12:47 gfldex joined #perl6
12:48 am0c joined #perl6
12:56 Tedd1 joined #perl6
12:57 bluescreen10 joined #perl6
13:01 WAZ joined #perl6
13:01 WAZ Wesh!
13:02 WAZ left #perl6
13:05 * masak .oO( drive-by weshing )
13:06 masak dictionary.reference.com has "wesh" as an archaic variant of "washed", used by Chaucer.
13:24 moritz perl6: class A { method m() { say 'A.m' } }; class B is A { has $.m = 'foo' }; say B.new.m
13:24 p6eval pugs b927740, rakudo 0a3ee9, niecza v14-23-g0699296: OUTPUT«foo␤»
13:24 kaleem joined #perl6
13:25 masak makes sense, methinks.
13:25 masak you asked for a method, you gots one. :)
13:25 moritz +1
13:26 benabik has $.m == has $!m; method m() { $!m } # ??
13:26 masak to a first approximation, yes.
13:26 tadzik ywis
13:26 moritz benabik: not quite, in case there's already a method m present
13:26 gfldex joined #perl6
13:26 moritz which is why I felt the need to check
13:26 masak ...present in the same class declaration.
13:26 moritz nom: class A { has $.x; method x() { 'foo' } }; say A.new.x
13:26 p6eval nom 0a3ee9: OUTPUT«foo␤»
13:26 moritz perl6: class A { has $.x; method x() { 'foo' } }; say A.new.x
13:27 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Two definitions of method x (see line 1) at /tmp/Cqn6SNUFsU line 1:â�¤------> [32mclass A { has $.x; method x[33mâ��[31m() { 'foo' } }; say A.new.x[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/COR…
13:27 p6eval ..pugs b927740, rakudo 0a3ee9: OUTPUT«foo␤»
13:27 benabik I would vaguely expect that has $.m with a method m would cause an error.
13:27 abercrombie joined #perl6
13:29 masak benabik: there was an RT ticket recently discussing similar issues.
13:29 benabik masak: Well, then, I guess I'm just catching up.
13:30 masak I'd say so :)
13:31 am0c joined #perl6
13:32 moritz I'm now trying to merge Exception and X::Base
13:32 moritz which is totally not going to work as I hope it does :/
13:36 masak :/
13:37 * moritz is still not used to the fact that if you have 24 CPUs, a CPU usage of < 5% can still mean that one core is working non-stop
13:37 benabik That's a lot of CPUs.
13:37 jnthn Must be awesome for parallel testing though :)
13:37 moritz sadly I don't have a proper dev environment on that machine
13:37 jnthn .oO( core blimey! )
13:37 moritz I should change that soon
13:38 benabik load can be a better indicator there, since a load of 1 means that 1 process wants the CPU at all times.
13:38 moritz oh, and they are only 12 "real" cores, plus hyperthreading
13:38 moritz benabik: I don't think windows reports load average
13:38 benabik moritz: :-(
13:40 masak benabik: ah, found the ticket: https://rt.perl.org:443/rt3/Ticket/Display.html?id=108670
13:40 moritz anyway, that box also has 90G of memory, so it should be enough to run 24 spectests in parallel too
13:41 masak 90GB! that's, like, sixty-four thousand 1.44 MB diskettes!
13:42 benabik moritz: Gah!
13:42 moritz masak: the case of that machine isn't small, but I don't think that many diskettes fit in there :-)
13:44 masak so... storage must've gotten smaller in the past decades.
13:45 masak this is amazing!
13:45 masak ;)
13:45 moritz :-)
13:45 colomon joined #perl6
13:46 moritz jnthn: which perl are you using for building parrot and rakudo?
13:47 jnthn moritz: ActivePerl 64-bit build
13:47 cognominal_ ya une sociale ce soir?
13:47 jnthn cognominal_: oui oui, une sociale avec bier!
13:47 masak cognominal_: tout les soirs!
13:48 masak touts*
13:48 cognominal_ oops
13:48 * masak hugs cognominal_, good French user :)
13:48 jnthn moritz: If the autosizes branch ain't merged in Parrot yet, it'll want a --parrot-option=--intval="long long"
13:49 * masak .oO( pardon his French )
13:51 masak jnthn: aussi, je pense que devrait être "bière"
13:51 masak s/que/que ce/
13:51 cognominal_ indeed
13:51 jnthn Je suis une merdique en francais :P
13:52 * masak .oO( merdiquocracy )
13:52 cognominal_ merdique is the adjective.
13:52 masak kinda proving his point :P
13:52 jnthn How...self-fulfilling :P
13:53 moritz autopun!
13:53 jnthn .oO( is it an auto-pun? :) )
13:53 masak yes :)
13:53 masak so is "I speak the English a poor."
13:53 [Coke] masak: that where sub is YOURS. :P
13:53 masak [Coke]: dang! :P
13:53 cognominal_ "merder" is the verb and "merde" the noun. Useful word like "shit" in English.
13:53 jnthn Great, my first successful autopun and it's in a language I don't even really speak :P
13:54 [Coke] masak: (it's old code. probably a fossil. I'll try to sixify it more as I make it work better.
13:54 masak \o/
13:54 masak maybe there's a special sub-category of autopun where mention coincides with use.
13:54 jnthn .oO( sub-optimal )
13:55 PerlJam cognominal_: so if I hear  a french-speaking person talking about "murder", maybe they're really talking about "merder"?  :)
13:56 PerlJam though the french tend to drop trailing consonants, so I guess I wouldn't hear the trailing "r" in "merder"
13:57 masak the first 'e' in 'merde' sounds quite different to the 'u' in 'murder' to my ear.
13:57 arnsholt That's because it's a different vowel, probably ^_^
13:57 PerlJam masak: aye, but americans aren't that sensitive to subtle differences ;)
13:57 masak troo
13:57 * masak loves subtle differences <3
14:01 * jnthn lоvеs thеm alsо :)
14:01 PerlJam jnthn: how do you pronounce that?
14:01 PerlJam ;)
14:02 jnthn Palletedly
14:02 Trashlord joined #perl6
14:02 * PerlJam gets out his paint brushes
14:07 orafu joined #perl6
14:07 [Coke] perl6: enum S <a b>;enum R <c d>;class C {has S $.s;has R $.r;}my $a=C.new(a,c);
14:07 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0m��Strange text after block (missing comma, semicolon, comment marker?) at /tmp/DdowlGKPY5 line 1:�------> [32mm R <c d>;class C {has S $.s;has R $.r;}[33m�[31mmy $a=C.new(a,c);[0m��Parse failed��»
14:07 p6eval ..rakudo 0a3ee9: OUTPUT«===SORRY!===␤Confused␤at /tmp/vVUBJln964:1␤»
14:07 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&enum"␤    at /tmp/rCSnf6CUs7 line 1, column 1-13␤»
14:08 [Coke] perl6: enum S <a b>;enum R <c d>;class C {has S $.s;has R $.r;};my $a=C.new(a,c);
14:08 skids joined #perl6
14:08 p6eval pugs b927740: OUTPUT«*** No such subroutine: "&enum"␤    at /tmp/7infOyHZDS line 1, column 1-13␤»
14:08 p6eval ..niecza v14-23-g0699296: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/MhSx5mUfo7 line 1:â�¤------> [32m<c d>;class C {has S $.s;has R $.r;};my [33mâ��[31m$a=C.new(a,c);[0mâ�¤â�¤Unhandled exception: Excess arguments to Mu.new, used 1 of 3 positionalsâ�¤  at /home/p6eval/…
14:08 p6eval ..rakudo 0a3ee9: OUTPUT«Default constructor only takes named arguments␤  in method new at src/gen/CORE.setting:561␤  in block <anon> at /tmp/nBN5JaD17i:1␤  in <anon> at /tmp/nBN5JaD17i:1␤»
14:09 * masak was gonna say
14:09 masak it'd be .new(:s(a), :r(c))
14:09 [Coke] perl6: enum S <a b>;enum R <c d>;class C {has S $.s;has R $.r;};my $a=C.new(:s<a>,:r<c>);
14:09 p6eval rakudo 0a3ee9: OUTPUT«Type check failed in assignment to '$!s'; expected 'S' but got 'Str'␤  in method BUILDALL at src/gen/CORE.setting:583␤  in method bless at src/gen/CORE.setting:573␤  in method new at src/gen/CORE.setting:558␤  in block <anon> at /tmp/7628q7AmMX:1␤  in <anon> at /tm…
14:09 p6eval ..niecza v14-23-g0699296: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/nQ4uL8sRzr line 1:â�¤------> [32m<c d>;class C {has S $.s;has R $.r;};my [33mâ��[31m$a=C.new(:s<a>,:r<c>);[0mâ�¤â�¤Â»
14:09 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&enum"␤    at /tmp/WTaeRiBziJ line 1, column 1-13␤»
14:09 masak not <a>, a
14:09 [Coke] right, because <> leaves strings, not literals.
14:09 [Coke] Danke.
14:09 masak right.
14:13 orafu joined #perl6
14:15 dalek rakudo/nom: 15dc125 | moritz++ | src/core/Exception (2 files):
14:15 dalek rakudo/nom: eliminate X::Base
14:15 dalek rakudo/nom:
14:15 dalek rakudo/nom: It is replaced by Exception as a base class, and by X::AdHoc for
14:15 dalek rakudo/nom: die with non-Exception arguments
14:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/15dc1253c9
14:16 masak \o/
14:21 orafu joined #perl6
14:25 dalek specs: 008dddb | moritz++ | S32-setting-library/Exception.pod:
14:25 dalek specs: [S32::Exception] update to current state of the art
14:25 dalek specs:
14:25 dalek specs: in particular, X::Base is now called Exception, and some unneeded stuff has been removed
14:25 dalek specs: review: https://github.com/perl6/specs/commit/008dddba59
14:30 masak I like the commit overall, but I disagree that backtraces are very ".gist"-y.
14:30 masak that's the probalem with the current backtraces. they're mostly just screenfuls of noise.
14:30 masak not printing them at program exit would be less annoying that printing them.
14:31 masak than*
14:33 moritz I disagree. They often help me to locate errors.
14:33 PacoAir joined #perl6
14:34 moritz masak: would you be happier if X::AdHoc surpressed backtraces in .gist?
14:40 masak marginally; that still wouldn't help against all the usual exceptions, IIUC.
14:40 masak I'm not annoyed mostly by the backtraces non-standard errors that I throw deliberately.
14:41 masak I'm annoyed by backtraces.
14:41 am0c joined #perl6
14:42 masak they're twice as long or more than they should be, they contain a lot of internal routines that I don't care about because they don't add any useful information, and they scroll away the actual error message, which is what I care about.
14:42 zb joined #perl6
14:43 au joined #perl6
14:43 moritz so if backtraces contained less noise and came before the message, would you stop disliking them?
14:43 orafu joined #perl6
14:44 masak those two things would make them more useful. I don't know if I would like them, but I would at least consider liking them again.
14:45 [Coke] not reporting on internal bits would be nice. (though I can see the need to enable them if you're trying to debug core.)
14:45 masak compare Perl 5, which doesn't do backtraces (except Moose). I have no trouble using the information I *do* get from Perl 5 to find my errors.
14:46 moritz well, debugging core is not a problem; you can use a custom exception handler (or --ll-exception) for that
14:46 [Coke] I prefer backtraces to a single error.
14:46 masak backtraces have a tendency to make me sad just by appearing. and the ones that Rakudo give me are near-useless.
14:46 moritz the backtrace information is available in the Exception object anyway
14:46 masak I usually have a pretty good idea of which path my execution has taken.
14:47 moritz masak: I have the opposite experience: in rakudo often enough single line numbers are unreliable, so it helps to have several line numbers available, one of which usually leads in the right direction
14:52 masak line numbers are unreliable?
14:52 masak that sounds like the core problem, not something to be worked around by looking at the backtrace.
14:58 [Coke] For larger codebases with multiple ways to execute the same code, the backtraces can be very helpful.
14:59 masak conceded.
15:01 masak here -- let me show you: https://gist.github.com/1770312
15:01 moritz masak: yes, we know that for-loops generate horrible backtraces in rakudo
15:01 moritz masak: that must be fixed
15:02 masak I count 1 line with the error message, and then 18 useless lines mixed up with two useful lines.
15:02 moritz but I don't see that as a general problem with the design of backtraces
15:02 masak the for loops help exemplify the issue, but even random anonymous blocks are pretty useless.
15:03 benabik Isn't there already a way to hide subs from the backtrace?  Should eager, gimme, and reify use it?
15:03 masak more behind-the-scenes fiddling of the kind that Carp performs to make things look very natural and effortless, is needed.
15:04 masak maybe we could even take a leaf from Carp.
15:04 moritz I've experimented with showing only routines
15:05 moritz and also with filtering out any backtrace lines from CORE.setting
15:05 moritz the problem with that is that it makes errors thrown from lazy lists nearly impossible to track down
15:07 moritz consider  sub generate { 1, 2, &generator ... * }; ... ; for generate() { }
15:07 moritz now if &generator dies, sub generate doesn't appear in the call chain at all
15:08 moritz and that can easily go through several levels
15:08 [Coke] I had a similar issue today with niecza, a comparator threw an error, and all I got was this useless backtrace.
15:09 moritz and if &generator is a block not a routine, and you filter out all blocks, you have no idea where the error came from
15:09 [Coke] (but, to crib from masak, let's fix the backtraces, not hide them ;)
15:09 flussence .oO( perl6 really needs Carp )
15:09 [Coke] moritz: what about hiding all the intermediate blocks?
15:10 [Coke] (but not the root cause)
15:11 moritz [Coke]: that might be worth trying
15:11 snearch joined #perl6
15:11 spine_ joined #perl6
15:12 moritz nom: sub f() { die "foo" }; sub g() { f}; try g; say $!.backtrace.concise
15:12 p6eval nom 15dc12: OUTPUT«  in sub f at /tmp/WAhGQx188q:1␤  in sub g at /tmp/WAhGQx188q:1␤␤»
15:12 moritz nom: sub f() { for 1..10 { die "foo" } }; sub g() {for 1..10 { f }}; try g; say $!.backtrace.concise
15:12 p6eval nom 15dc12: OUTPUT«  in sub f at /tmp/zOlZtxO1zz:1␤  in sub g at /tmp/zOlZtxO1zz:1␤␤»
15:18 [Coke] anyone else having  trouble with github?
15:19 [Coke] twitter says yes.
15:19 * moritz too
15:19 moritz and I just shut down my VPN because I thought it was to blame :-)
15:20 [Coke] back, it seems.
15:20 not_gerd joined #perl6
15:20 not_gerd hello, #perl6
15:20 * not_gerd broke github just now :(
15:20 moritz how?
15:21 flussence https://status.github.com/
15:21 not_gerd connection times out, and then even the webpage no longer worked...
15:22 not_gerd flussence: thanks...
15:22 moritz not_gerd: I kinda doubt it was your fault :-)
15:22 not_gerd well, the timeming did correspond pretty closely to my push ;)
15:23 not_gerd ^timing
15:23 moritz correlation != causation
15:24 frettled moritz: that's the third time I've seen that used, or used that, today :D
15:25 masak "Observation bias is very common -- I keep seeing it everywhere."
15:25 not_gerd moritz: the egocentric in me disagrees - OF COURSE itwas me who broke it!
15:25 moritz not_gerd: conratulations, you are human :-)
15:26 masak I knew it!
15:27 kaare_ joined #perl6
15:28 [Coke] masak: http://www.smbc-comics.com/?id=2444
15:28 masak :)
15:29 [Coke] github++ (just used the report/fork/pull for great justice.)
15:31 not_gerd jnthn: where would I get a class_handle from for use with attr_funcs->hint_for?
15:31 not_gerd jnthn: alternatively, is there another way to identify attributes by numeric id?
15:34 bbkr can roles be composed into self (not class but object instance)? if I do "self does $some_role" then methods from role are not visible as self.name_of_method_from_role
15:35 bbkr this was legal syntax in pre-NOM era
15:35 tokuhirom joined #perl6
15:40 bbkr rakudo: class A {}; my $a = A.new; $a.^does( role { method foo { say "OK"; } } ); $a.foo # this one also doesn't work
15:40 p6eval rakudo 15dc12: OUTPUT«Method 'foo' not found for invocant of class 'A'␤  in block <anon> at /tmp/UH9icljptM:1␤  in <anon> at /tmp/UH9icljptM:1␤»
15:41 [Coke] b: class A {}; my $a = A.new; $a.^does( role { method foo { say "OK"; } } ); $a.foo # this one also doesn't work
15:41 p6eval b 1b7dd1: OUTPUT«Method 'foo' not found for invocant of class 'A'␤  in main program body at line 22:/tmp/Olb85F3CJ_␤»
15:41 not_gerd nom: say (5 but role { method foo { 42 } }).foo
15:41 p6eval nom 15dc12: OUTPUT«42␤»
15:42 bbkr pre-NOM rakudo required ^compose on role, but I see that it's not longer needed
15:43 masak no, .^compose is for classes, AFAIK.
15:43 jnthn not_gerd: class_handle is just the type object of the class that defined the attribute
15:43 jnthn No, that's the way you get the hints.
15:43 Psyche^ joined #perl6
15:44 jnthn .^does is *asking* if a type does a role, not composing it :)
15:44 bbkr maybe i will rephrase my question: how can I add method to object instance (not whole class)?
15:44 kaleem joined #perl6
15:45 jnthn nom: class A { method foo() { self does role { method lol { 42 } } } }; my $x = A.new; $x.foo; $x.lol;
15:45 p6eval nom 15dc12:  ( no output )
15:45 jnthn nom: class A { method foo() { self does role { method lol { 42 } } } }; my $x = A.new; $x.foo; say $x.lol;
15:45 p6eval nom 15dc12: OUTPUT«42␤»
15:46 [Coke] nom: class A { method foo() { self does role { method lol { 42 } } } }; my $x = A.new; $x.foo; say $x.lol; my $y = A.new; say $y.lol;
15:46 p6eval nom 15dc12: OUTPUT«42␤Method 'lol' not found for invocant of class 'A'␤  in block <anon> at /tmp/HioWPX7Kdt:1␤  in <anon> at /tmp/HioWPX7Kdt:1␤»
15:46 [Coke] (just to check the negative)
15:46 jnthn *nod* :)
15:47 dalek rakudo/nom: ef61a32 | moritz++ | src/core/Exception.pm:
15:47 dalek rakudo/nom: experiment a bit with backtrace printing
15:47 dalek rakudo/nom:
15:47 dalek rakudo/nom: inpsired by a discussion with masak++, [Coke]++ and a few others
15:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ef61a32ea2
15:47 tadzik 'evening
15:48 moritz \o tadzik
15:49 masak by my count, TimToady++ has sent 2499 individual emails to p6l since it was created.
15:49 tadzik for a short while, I've actually considered reading the repo :)
15:50 bbkr rakudo: class A { method foo() { my $r =  role { }; $r.^add_method( "lol", method { 42 }); self does $r; }; }; my $x = A.new; $x.foo; $x.lol;
15:50 p6eval rakudo 15dc12: OUTPUT«Method 'lol' not found for invocant of class 'A+{<anon>}'␤  in block <anon> at /tmp/y98T95Zpal:1␤  in <anon> at /tmp/y98T95Zpal:1␤»
15:50 masak tadzik: I plan to read through those emails. I wasn't paying attention in the early days, and I want to learn more about that time.
15:51 bbkr why above one does not work? is it illegal to add_method to roles?
15:51 moritz bbkr: you never composed $r
15:51 * masak decommutes
15:51 skids nom: my subset foo of Int where { $^n % 2 }; my foo $i; my $j = 1; $i := $j; $i.say; $j = 2; $i.say; # and the spec says?
15:51 p6eval nom 15dc12: OUTPUT«1␤2␤»
15:52 bbkr rakudo: class A { method foo() { my $r =  role { }; $r.^add_method( "lol", method { 42 }); $r.^compose; self does $r; }; }; my $x = A.new; $x.foo; $x.lol;
15:52 p6eval rakudo 15dc12: OUTPUT«Method 'lol' not found for invocant of class 'A+{<anon>}'␤  in block <anon> at /tmp/fjJspmkBfw:1␤  in <anon> at /tmp/fjJspmkBfw:1␤»
15:52 * not_gerd will be back later with more questions about 6model...
15:52 not_gerd left #perl6
15:53 moritz bbkr: also I'm not sure you're allowed to modify 'self' that way without marking it as 'rw'
15:54 moritz rakudo: class A { method foo($self is rw:) { my $r =  role { }; $r.^add_method( "lol", method { 42 }); $r.^compose; $self does $r } }; my $x = A.new; $x.foo; $x.lol
15:54 TimToady or 'copy'
15:54 p6eval rakudo 15dc12: OUTPUT«Method 'lol' not found for invocant of class 'A+{<anon>}'␤  in block <anon> at /tmp/Ah0wrJNfwy:1␤  in <anon> at /tmp/Ah0wrJNfwy:1␤»
15:54 moritz hm
15:54 jnthn It's because of a bug in how .^ is implemented, which is causing premature punning
15:55 jnthn If you write $r.HOW.add_method($r, ...) then it probably works out.
15:55 TimToady well, roles *are* supposed to be considered immutable, and the compiler is allowed to assume that immutable things don't change
15:55 unobe joined #perl6
15:55 moritz rakudo: class A { method foo($self is rw:) { my $r =  role { }; $r.add_method($r, "lol", method { 42 }); $r.compose($r); $self does $r } }; my $x = A.new; $x.foo; $x.lol
15:56 p6eval rakudo 15dc12: OUTPUT«Method 'add_method' not found for invocant of class '<anon>'␤  in <anon> at src/gen/Metamodel.pm:1160␤  in method foo at /tmp/OSkUKjKlSw:1␤  in block <anon> at /tmp/OSkUKjKlSw:1␤  in <anon> at /tmp/OSkUKjKlSw:1␤»
15:56 rsimoes joined #perl6
15:56 jnthn .HOW
15:56 moritz rakudo: class A { method foo($self is rw:) { my $r =  role { }; $r.HOW.add_method($r, "lol", method { 42 }); $r.HOW.compose($r); $self does $r } }; my $x = A.new; $x.foo; $x.lol
15:56 p6eval rakudo 15dc12:  ( no output )
15:56 moritz rakudo: class A { method foo($self is rw:) { my $r =  role { }; $r.HOW.add_method($r, "lol", method { 42 }); $r.HOW.compose($r); $self does $r } }; my $x = A.new; $x.foo; say $x.lol
15:56 p6eval rakudo 15dc12: OUTPUT«42␤»
15:57 moritz the anser!
15:57 moritz *answer
15:58 * bbkr thanks everyone and goes back to work on new shiny JSON::RPC for nom :)
15:58 jnthn TimToady: And probably does. I guess meta-programming is kinda an escape hatch. Though the MOP could still forbid modification after composition time.
15:59 jnthn Which just means you gotta use the BEGIN escape hatch too :)
16:01 TimToady One life in the day of Ivan Denisovich was not worth very much, unless your name happened to be Josef...
16:03 bbkr this role example by moritz works without compose too, i'm not sure what's the difference.
16:03 skids .oO(perhaps a useful behavior for scenario I pasted above would be for subsets to validate constraints when they get, and so become lazily generated Failures if something has pulled the rug out from under them)
16:03 jnthn bbkr: Not very much in this particular case.
16:04 moritz the difference is that we generally require new type obejcts to be composed before you can use them reliably
16:04 colomon joined #perl6
16:04 jnthn But you should call compose after changes generally
16:04 colomon left #perl6
16:04 jnthn Because it's part of the protocol to do so :)
16:04 colomon joined #perl6
16:07 jnthn my work here is done
16:07 jnthn decommute \o/ &
16:09 colomon o/
16:21 TimToady Physicist: After the Big Rip, nothing will be left but the dark energy.  Civilian: No matter!
16:22 araujo :)
16:27 bbkr how can I distinguish if I'm dealing with class definition or class instance? for example: my $x = Int; my $y = 33; - both returns Int() as .WHAT
16:28 colomon niecza: my $x = Int; say $x.defined; my $y = 33; say $y.defined
16:28 p6eval niecza v14-23-g0699296: OUTPUT«False␤True␤»
16:29 PerlJam bbkr: why do you need to?
16:34 kaleem joined #perl6
16:34 bbkr PerlJam: I've noticed that "self" behaves in BUILD as class definition and in regular method as class instance. I just want to confirm my observations
16:34 PerlJam ah
16:36 kaleem joined #perl6
16:41 TimToady moritz, masak: I still think backtraces should go to a temporary disk file by default, with a link in the error message
16:42 PerlJam It's too bad there isn't stdin, stdout, stderr, and stdbacktrace
16:42 [Coke] -1 on leaving files lying about. (You may not even be able to)
16:42 TimToady in the old days, they saved your backtrace on disk--it was called "core" :)
16:43 TimToady +1 on automatically cleaning up old ones
16:43 TimToady or just overwriting the last one
16:44 TimToady if the specified location is not writable, then of course you can put it somewhere else, up to and including on stderr
16:44 TimToady if you write out enough info, you can start up Tardis on it :)
16:45 PerlJam perl6 --launch-debugger-on-error
16:45 TimToady --checkpoint-on-error
16:45 TimToady run the debugger later
16:47 TimToady --hang-and-wait-for-network-connection-to-debugger  :)
16:47 moritz perl6 --autodebug-for-me
16:47 PerlJam --ask-#perl6-for-help
16:47 benabik perl6 --dwim  # you don't even have to pass the script name  ;-)
16:48 TimToady putting the backtrack into a linkable location will make it easier to paste into a bug tracker, maybe
16:49 TimToady and you can automatically put all the other info that you wish you had about the configuration but people never think to add
16:49 PerlJam --create-nopaste-on-error
16:49 PerlJam that would make an interesting and useful module I think
16:50 TimToady SORRY, you divided by 0 there at line 42; backtrace on at http:gist.github.com/1234567
16:51 bbkr I found very weird bug when role methods are leaking to other object instances if composed in BUILD:
16:51 bbkr rakudo: class A { submethod BUILD (:$name){ my $r =  role { }; $r.HOW.add_method( $r, $name, method { 42 }); self does $r; }; }; my $x = A.new(name=>"foo").foo; A.new(name=>"bar").foo;
16:51 p6eval rakudo ef61a3:  ( no output )
16:51 TimToady s/on at/at/
16:51 bbkr the second A instance should hot have foo method
16:52 bbkr s/hot/not/
16:54 PerlJam bbkr: bbkr: why not?
16:54 gfldex joined #perl6
16:55 TimToady [Coke]: in any case, in the Land of Perl, "it might not work" is considered a poor excuse for not trying
16:57 bbkr PerlJam: compare with Coke's isolation example:
16:57 bbkr rakudo: class A { method foo() { self does role { method lol { 42 } } } }; my $x = A.new; $x.foo; say $x.lol; my $y = A.new; say $y.lol;
16:57 p6eval rakudo ef61a3: OUTPUT«42␤Method 'lol' not found for invocant of class 'A'␤␤»
16:58 TimToady punishing the innocent with the guilty is more a hallmark of the Turing Tarpit languages...
17:00 TimToady colomon: I note that Unicode has special glyphs for Bag ops
17:00 bbkr PerlJam: in my example both object instances of A class have different roles applied, one object instance should not see methods from role composed into other instance
17:00 TimToady .u ⊍⊎
17:00 phenny U+228D MULTISET MULTIPLICATION (⊍)
17:00 phenny U+228E MULTISET UNION (⊎)
17:00 colomon TimToady: oh my....
17:01 TimToady $set1 ⊎ $set2 makes some sense
17:01 TimToady since ordinary union would remove dups and return a set instead
17:02 TimToady also, you get <a b b c> ⊎ <c a b> for free
17:02 TimToady .u ⊌
17:02 phenny U+228C MULTISET (⊌)
17:03 TimToady not sure howyou're supposed to use that one...
17:03 moritz fsvo free
17:03 TimToady well, fits in with the coercing operator heritage quite nicely
17:04 TimToady Google: Your search - ⊌ - did not match any documents.
17:04 PerlJam In my font that character kind of looks like the Transformers icon
17:05 moritz it's only used in undocuments
17:05 TimToady I guess that's supposed to be a left arrow inside, so maybe it's an assignop
17:08 MayDaniel joined #perl6
17:13 sorear good * #perl6
17:14 not_gerd joined #perl6
17:16 moritz }o{
17:19 not_gerd moritz: I spot two guys using their noses to balance a ball between their faces
17:20 not_gerd joined #perl6
17:21 moritz not_gerd: my ears are just over-sized and curly :-)
17:23 cognominal_ ...better than to balance a face between their balls.
17:23 tadzik ohh
17:24 cognominal_ sorry I could not resist
17:24 tadzik :)
17:24 leontopod how many operators does Perl 6 have now?
17:24 benabik All of them.
17:24 leontopod hundreds?
17:24 tadzik more like dozens, I guess
17:24 tadzik http://perlcabal.org/syn/S03.html may help you counting
17:25 leontopod There is a Perl 6 Periodic Table of Operators
17:25 leontopod I should google image search that
17:29 cognominal_ ho, I did not even read last Larry Wall posts, but reading its unicode strings, there is some Jungian synchronicity with my joke.
17:33 moritz $ ack -ho '(in|pre|post)(circum)?fix:<[^>]+>' src/core/ |sort -u|wc -l
17:33 moritz 89
17:33 moritz 89
17:34 moritz of course that's just a rough estimate
17:34 moritz so O(100)
17:36 sorear #phasers in -6 !!!
17:37 sorear leontopod: Infinitely many, since we have productive families of operators. :)
17:37 sorear although there's not a lot of point to RRRRRRRRRRR+
17:53 zby_home joined #perl6
17:58 skids leontopod: http://www.perlfoundation.org/perl6/index.cgi?witch
18:04 leprevost joined #perl6
18:11 dalek specs: 815b7bf | larry++ | S32-setting-library/Exception.pod:
18:11 dalek specs: Fossil found by JimmyZ++
18:11 dalek specs: review: https://github.com/perl6/specs/commit/815b7bf397
18:15 [Coke] TimToady: (no excuse) fair enough. Also, I program in cold fusion for a living, you probably want to avoid taking clues from my preferences. ;)
18:18 bluescreen10 joined #perl6
18:20 sorear heh.  I forgot that I gave masak a commit bit.
18:27 * [Coke] reads a presentation with the text: 30-second snapshots in IPv4 Hilbert-curve space
18:28 sorear mmm Hilbert curves.
18:29 [Coke] http://www.nanog.org/meetings/nanog54/presentations/Tuesday/Cowie.pdf for sorear.
18:30 sorear "7 November 2012" on p.3
18:35 PerlJam presentations from the future have got to be useful for something.
18:41 sorear fascinating
18:41 dalek rakudo/usage-prints-WHY: 0683298 | moritz++ | src/ (2 files):
18:41 dalek rakudo/usage-prints-WHY: more typed exceptions
18:41 dalek rakudo/usage-prints-WHY: review: https://github.com/rakudo/rakudo/commit/0683298ea6
18:41 dalek rakudo/usage-prints-WHY: 5fcfed5 | moritz++ | src/Perl6/Actions.pm:
18:41 dalek rakudo/usage-prints-WHY: fix thinko
18:41 dalek joined #perl6
18:41 dalek rakudo/nom: 2251cbb | tadzik++ | src/core/Main.pm:
18:41 dalek rakudo/nom: Make default USAGE print .WHY for the documented candidates
18:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2251cbb0b8
18:42 mj41 joined #perl6
18:42 benabik joined #perl6
18:43 Patterner joined #perl6
18:43 abercrombie joined #perl6
18:55 ajox joined #perl6
18:55 leontopod so the goal of Perl 6 has now to become the ultimate computer language that ever was?
18:56 leontopod so the goal of Perl 6 has now to become the most ultimate computer language that ever was?
18:56 colomon what do you mean, "has now to become"?  That was the goal from day one...
18:56 leontopod I should say
18:56 PerlJam leontopod: "ever will be"
18:56 leontopod ok! =D
18:56 skids Anything better won't be a "language" :-)
18:56 leontopod hey, question, can you compile perl 6 code into a standalone executable?
18:56 PerlJam leontopod: yesish
18:57 moritz noish :-)
18:57 leontopod baw
18:57 PerlJam leontopod: you can see we're conflicted about it ;)
18:58 leontopod I guess by the time there is a definitive Version 1 of Perl 6
18:58 leontopod computers will be so fast it won't matter
18:58 masak I don't think that's so.
18:58 PerlJam leontopod: We're already at the "it doesn't matter" point if you ask me.
18:58 masak we'd still be too slow if we didn't do anything about it if you ask me.
18:58 moritz rakudo supported creating "fakexecutables" some time ago, but it wasn't exactly "standalone"
18:59 masak as you can see, we're conflicted about the speed, too ;)
19:00 Su-Shee I suggest changing the motto "there's more than one way to do it" into "there's a different perl 6 for everyone in it" ;)
19:00 PerlJam We're always "too slow" (if we thought otherwise, we'd stop making improvments and Perl would be dead :)
19:00 masak early in Java's life, it was criticised for being too slow. early in Ruby's like, *it* was criticised for being too slow.
19:00 masak both have gotten big improvements over the years.
19:01 birdwindupbird joined #perl6
19:01 masak but you've got to "make it run" and "make it right" before you "make it fast" :)
19:01 PerlJam yeah, "get it right, then make i .... blah!
19:01 PerlJam What masak said  :)
19:02 PerlJam (no one is conflicted about that)
19:04 masak leontopod: speaking from my own experience, Perl 6 is already a power tool in many regards. there are missing pieces, bugs, and places where it just doesn't perform well yet. it's a matter of getting to know and work with the things we have already.
19:04 masak if you can do that, Perl 6 is a really cool language to use, already today.
19:05 PerlJam Indeed.
19:05 masak if you're more bothered by the deficiencies than with the features, then maybe in a year we'll serve your needs :)
19:05 masak or two years. we're working on it constantly.
19:05 masak or five years.
19:05 masak Perl 6 was ready for me four years ago.
19:06 PerlJam I was playing with it yesterday and though the startup time was still a little slow, I was marveling at how quick execution time was and how expressive the code was.
19:06 PerlJam it == Rakudo
19:06 PerlJam and Niecza is even faster than Rakudo for most (all?) things
19:06 masak yeah, I get that feeling of awe all the time nowadays.
19:06 masak it's like, "wow, I'm actually writing this in Perl 6, and when I try to run it, it actually runs!" :D
19:07 spine joined #perl6
19:08 Khisanth joined #perl6
19:08 masak today I showed a colleage 'sub postfix:<!>($N) { [*] 2..$N }; say 5!'. and I explained that that introduces an operator into the local language.
19:08 masak when he grokked it, he was impressed.
19:08 PerlJam moreover, it's "I'm writing this in Perl 6 and it's not even a smallish subset because of a crippled compiler"
19:09 masak his next reaction was "won't that screw it up for everybody?" and I said "well no, we've thought of ways to isolate it"
19:10 PerlJam I'm mildly surprised that no one has written a "Math::Ops" module or something that gives us all of the standard notations that aren't built into Perl 6, but are used by mathematicians.
19:10 PerlJam (I would have expected colomon or so to have done that already :)
19:10 trey__ joined #perl6
19:11 benabik sub infix:<±>( $n, $e ) { ($n-e)..($n+e) }
19:11 benabik That's a _lot_ of ground to cover, really...
19:11 benabik And different branches of math use different notation...
19:11 colomon It is indeed somewhat surprising that the colomon of 2009 didn't try doing exactly late....
19:11 benabik But I expect the Math::* modules to have a lot of use.
19:12 PerlJam I'm not saying it would have been perfect or complete, just that I'm surprised it doesn't exist yeet :)
19:12 PerlJam s/yeet/yet/
19:12 colomon s/late/that/
19:12 timotimo i'm pretty sure you want to treat ± on a symbolic level
19:13 PerlJam timotimo: what does that mean?
19:13 not_gerd +/- is more of a junction-ish thing
19:13 not_gerd you don't want the range, but both values...
19:14 timotimo well, can you multiply ranges with one another?
19:14 colomon no
19:14 PerlJam not yet! :)
19:14 timotimo (1 ± 5) * (1 ± 5) what's that?
19:14 [Coke] niecza: sub infix:<±>( $n, $e ) { ($n-e)..($n+e) } ; say 100±10 ~~ 95
19:14 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $n-e is not predeclared at /tmp/NXXLfkTcaz line 1:â�¤------> [32msub infix:<±>( $n, $e ) { ([33mâ��[31m$n-e)..($n+e) } ; say 100±10 ~~ 95[0mâ�¤â�¤Potential difficulties:â�¤  $e is declared but not used at /tmp/NXXLfkTcaz …
19:14 PerlJam but, as long as you're writing the ± op, you can add those other semantics too
19:14 [Coke] niecza: sub infix:<±>( $n, $e ) { ($n-$e)..($n+$e) } ; say 100±10 ~~ 95
19:14 timotimo yeah, missing two $
19:14 p6eval niecza v14-23-g0699296: OUTPUT«False␤»
19:14 tadzik nom: (any(-2, 2) * any(-3, 3)).perl.say
19:14 p6eval nom 2251cb: OUTPUT«any(any(6, -6), any(-6, 6))␤»
19:15 [Coke] niecza: sub infix:<±>( $n, $e ) { ($n-e)..($n+e) } ; say 95 ~~ 100±10
19:15 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $n-e is not predeclared at /tmp/FZVk_FGMNL line 1:â�¤------> [32msub infix:<±>( $n, $e ) { ([33mâ��[31m$n-e)..($n+e) } ; say 95 ~~ 100±10[0mâ�¤â�¤Potential difficulties:â�¤  $e is declared but not used at /tmp/FZVk_FGMNL …
19:15 [Coke] niecza: sub infix:<±>( $n, $e ) { ($n-$e)..($n+$e) } ; say 95 ~~ 100±10  #argh, copied wrong one. ;)
19:15 p6eval niecza v14-23-g0699296: OUTPUT«True␤»
19:16 benabik not_gerd: It can either be a junction or a range depending on where you see it.  I'd probably make infix be a range (for error) and prefix be a junction.
19:17 masak leontopod: now I backlogged over your "how many operators?" question.
19:17 PerlJam timotimo: I don't think I know what that means in math-land, let alone perl 6.
19:17 masak leontopod: do you have the feeling that Perl 6 is perhaps a little overambitious sometimes?
19:17 * benabik still thinks the answer is "all of them".  :-D
19:17 leontopod Yes, I have that feeling.
19:18 masak leontopod: I do, sometimes. there's a fine line between "ambitious" and "overambitious".
19:18 masak leontopod: I'd like for Perl 6 to be the former but not the latter.
19:18 leontopod Well, I think someone needs to put a foot down and say "let's get out a Version 1 for god's sake"
19:18 masak leontopod: many changes I made to the spec in 2011 were removals of things I considered to be overambitious.
19:18 PerlJam "overambitious" can only be determined after the fact really
19:18 not_gerd benabik: you have an example for the range use (not that I doubt you, I just can't think of one myself right now...)
19:19 masak leontopod: I agree -- we want to get something out. no-one is disputing that.
19:19 benabik not_gerd: Error.  2 ± 0.5 generally means (1.5 .. 2.5), not any(1.5,2.5)
19:19 masak leontopod: there's nothing that will take us to such a point, though, except hard work on implementations, apps, tests, and spec.
19:20 colomon benabik: actually, I'd say both interpretations are common, in different settings.
19:20 colomon mathematical notion is very flexible...
19:20 tadzik so it's really prefix vs infix
19:20 benabik colomon: Fair enough.
19:20 leontopod Perl 6 should include postfix
19:20 PerlJam colomon: really?  I *always* use ± in the sense of a range
19:20 masak leontopod: some people got tired of "waiting for Perl 6" in 2002. some gave up in 2004. some lost hope in 2008. you see here the rest of us, working towards the goal still.
19:21 colomon PerlJam: think of the standard way of writing the quadratic equation...
19:21 [Coke] leontopod: it does.
19:21 PerlJam colomon: oh.  good point.
19:21 masak leontopod: do you mean it should include postfix:<!> ?
19:21 leontopod yikes!
19:21 benabik We could assign range to ± and junction to ∓ just to confuse people.
19:21 PerlJam colomon: though I *never* use it that way in practice.
19:21 masak nom: sub postfix:<!>($N) { [*] 1..$N }; say 5!
19:21 p6eval nom 2251cb: OUTPUT«120␤»
19:21 masak nom: say 5!
19:21 p6eval nom 2251cb: OUTPUT«===SORRY!===␤Confused␤at /tmp/WKm0A8PqfU:1␤»
19:21 masak leontopod: see? :)
19:21 leontopod wow!
19:21 [Coke] niecza: sub postfix:<!> { say "$_, and I MEAN IT!" }; "eek"!
19:21 not_gerd benabik: thanks
19:22 p6eval niecza v14-23-g0699296: OUTPUT«eek, and I MEAN IT!␤»
19:22 masak leontopod: I'm telling you! :)
19:22 leontopod Perl 6 is going to do EVERYTHING!
19:22 masak only in a Turing-complete sense.
19:22 tadzik for the predefined value of Everything
19:22 benabik Of course, it's turi-  Oh
19:22 PerlJam leontopod: is it going to solve the halting problem?
19:22 PerlJam leontopod: is it going to make my breakfast?
19:22 masak PerlJam: I don't think you heard the man. EVERYTHING.
19:22 leontopod this is Perl 6:
19:22 leontopod http://1.bp.blogspot.com/_VY9lef3Ripw/RvFR58J6zeI/AAAAAAAACoo/LJd2PZfu1XM/s400/UltimateSwissArmyKnife.jpg
19:23 masak no, that's Perl 5. :P
19:23 benabik (re: making breakfast) I don't think any perl6 is going to be small enough to fit in an Arduino any time soon.
19:23 PerlJam leontopod: the perl 6 version of that utilizes 4 dimensional space so that it can still fit in your pocket
19:23 masak PerlJam: you just made it one of my life goals to have Perl 6 make me breakfast.
19:23 gfldex nom: multi quicksort([]) { () }; multi quicksort([$pivot, *@rest]) {my @before := @rest.grep(* before $pivot); my @after  := @rest.grep(* !before $pivot); (quicksort(@before), $pivot, quicksort(@after)) }; quicksort((1..10).pick(10));
19:23 p6eval nom 2251cb:  ( no output )
19:24 gfldex nom: multi quicksort([]) { () }; multi quicksort([$pivot, *@rest]) {my @before := @rest.grep(* before $pivot); my @after  := @rest.grep(* !before $pivot); (quicksort(@before), $pivot, quicksort(@after)) }; say quicksort((1..10).pick(10));
19:24 masak gfldex: 'say'
19:24 p6eval nom 2251cb: OUTPUT« 1  2  3  4  5  6  7  8  9  10 ␤»
19:24 gfldex nom: multi quicksort([]) { () }; multi quicksort([$pivot, *@rest]) {my @before := @rest.grep(* before $pivot); my @after  := @rest.grep(* !before $pivot); (quicksort(@before), $pivot, quicksort(@after)) }; say quicksort((1..10).pick(10)).perl;
19:24 p6eval nom 2251cb: OUTPUT«((((), 1, ()), 2, (((), 3, ()), 4, ((), 5, ((), 6, ())))), 7, ((), 8, (((), 9, ()), 10, ())))␤»
19:24 PerlJam benabik: progress is made by unreasonable men.  See masak  :-)
19:24 skids .oO(might fit in a giant mesh of arduinos.  Mmm.  Cloud-cased strudel.)
19:24 benabik masak++
19:24 skids erm based
19:25 colomon aaiiigggghhhh!  I've got a $work test failure which only happens when I run my *entire* (6516 test) test suite; run the test in isolation or in a smaller group of tests, and it works fine.  :\
19:25 gfldex niecza: multi quicksort([]) { () }; multi quicksort([$pivot, *@rest]) {my @before := @rest.grep(* before $pivot); my @after  := @rest.grep(* !before $pivot); (quicksort(@before), $pivot, quicksort(@after)) }; say quicksort((1..10).pick(10)).perl;
19:25 PerlJam cloud-cased ... is that like encased in a cloud (or whipped cream or icing?)
19:25 p6eval niecza v14-23-g0699296: OUTPUT«(((((), 1, ()), 2, ()), 3, ((), 4, ())), 5, ((((), 6, ()), 7, (((), 8, ()), 9, ())), 10, ()))␤»
19:25 PerlJam or is cloud-cased related to upper/lower/title casing ?
19:25 PerlJam :)
19:26 gfldex nom: multi quicksort([]) { () }; multi quicksort([$pivot, *@rest]) {my @before := @rest.grep(* before $pivot); my @after  := @rest.grep(* !before $pivot); (quicksort(@before), $pivot, quicksort(@after)).flat }; say quicksort((1..10).pick(10)).perl;
19:26 p6eval nom 2251cb: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).list␤»
19:26 gfldex that added .flat removes the problem of added LoL but it would break sorting of LoLs
19:26 gfldex that's from rosettacode btw
19:27 skids Cloud casing is when you consult a server on the Internet to determine the proper capitalization.  What they don't tell you is it actually links to a sweatshop full of destitute literature majors.
19:27 PerlJam skids: that's how dictionaries are maintained too.
19:29 TimToady Perl 6 is the whole darn Swiss Army
19:29 leontopod uhm, the bot output is not rendering on xchat
19:29 gfldex One language to rule them all!
19:30 benabik leontopod: Perhaps chat isn't handling UTF8 properly?
19:30 leontopod do I need a different font?
19:30 leontopod not completely rendering that is
19:30 leontopod ah, probably
19:30 benabik It uses Unicode to show a N/L symbol for newline
19:30 gfldex or the font is missing fancy chars
19:32 masak more likely that.
19:33 masak leontopod: does this render as one character for you: ☺
19:33 leontopod nope
19:33 TimToady if it comes out with lots of characters like  then it is probably a UTF-8 issue
19:33 masak s:2nd/':'/?/
19:33 leontopod renders as three characters
19:33 masak leontopod: then you need to set your encoding in xchat.
19:33 leontopod oh!
19:33 masak which will probably fix it.
19:34 masak "please adjust your set" :)
19:34 leontopod haha
19:35 TimToady http://irclog.perlgeek.de/perl6/2012-02-08 will show you approximately what it should look like, assuming your browser is newish
19:36 TimToady thought the irclog still screws up ANSI colors regularaly
19:36 masak leontopod: if you look at snippets of Perl 6 from 2003, they look a lot like Perl 5. since then, Perl 6 has become its own language, and we believe it's matured into something that we're more happy about delivering than what we had then.
19:37 TimToady and in the meanwhile we discovered a lot of bad decisions in the early design, and fixed 'em
19:37 leontopod ok masak, so Perl 6 uses funky characters
19:37 PerlJam meanwhile Perl 5 stole some of our bad design decisions :(
19:38 leontopod is there going to be a Perl 6 keyboard?
19:38 TimToady s/stole/cargo culted/
19:38 masak leontopod: there are always ASCII replacements for the funky Unicode characters.
19:38 [Coke] p5p subject: Stealing stackable modifiers from Perl 6
19:38 leontopod a Perl 6 keyboard would be neat
19:38 leontopod just like there used to be APL keyboards
19:38 masak leontopod: like » can be written as >>
19:38 TimToady just define a Compose key, and you'll have most of it
19:39 benabik in Vim: help digraphs
19:39 masak leontopod: what TimToady said. good editors give you... what benabik said. or keyboard layouts.
19:39 benabik CAn't help with other editors, as I never use 'em.  :-)
19:39 flussence altgr+zx is «» on my standard GB qwerty keyboard
19:39 TimToady under gnome, you've got CTRL/SHIFT-u 263a and such
19:39 masak Emacs have an input system called LEIM, but it's all but lame.
19:39 benabik Macs have lots of interesting characters hidden behind the option key.
19:39 masak has*
19:40 yertalert
19:40 yertalert oooo, shiny
19:40 * PerlJam likes remapping the "windows key" on his keyboards that have them.
19:40 masak benabik: and Mac OS X has an excellent choice of keyboard layouts, too.
19:40 masak yertalert: hi!
19:40 yertalert masak: Hello
19:41 TimToady and if I were doing set theory, I'd probably figure out the hex codes for ∪ and ∩ pretty soon
19:41 TimToady you can also cut and paste from something that will show the character
19:41 TimToady .u intersection
19:41 phenny U+2229 INTERSECTION (∩)
19:42 TimToady .u smiling
19:42 phenny U+263A WHITE SMILING FACE (☺)
19:42 awwaiid though I think that the "length" of a character as far as huffman encoding common things goes should be measured in keypresses :)
19:42 masak leontopod: if you're interested, compare the code at the bottom of http://dev.perl.org/perl6/doc/design/exe/E02.html (from 2001) with the modern https://gist.github.com/294621
19:43 TimToady awwaiid: except that a program is read many more times than it is written, normally, so you should optimize for visual length really
19:43 awwaiid TimToady, how about an average between the two?
19:43 yertalert I suspect people will copy and paste a lot of these symbols
19:43 masak leontopod: and here's the post I wrote about it: http://strangelyconsistent.org/blog/blast-from-the-past-e02
19:43 masak yertalert: I suspect so too. but I won't.
19:44 TimToady as soon as you have one in your program, you can usually copy it around elsewhere in your program too
19:44 TimToady I use yl all the time in vim to hank a character under the cursor to put it somewhere else
19:44 awwaiid I try to _not_ copy/paste any code :)
19:45 awwaiid but yeah... I do use tab-complete to have readable names
19:45 yertalert copy/pasting code it dangerous
19:45 awwaiid and not have to re-type them
19:45 TimToady there's also some kind of super compose file outer there somewhere that has mnemonic compose sequences for most of the math chars
19:45 PerlJam awwaiid: that's an acceptable form of code reuse provided it is done judiciously
19:45 TimToady *out there
19:45 awwaiid wherefore optimizing for readability
19:45 masak awwaiid: copy/pasting code has its uses. but it's good to go through a phase of utterly despising it first ;)
19:45 awwaiid but tab complete is actually _less_ characters than the original typing. though I guess some copy/paste would be too
19:45 PerlJam yertalert: copying code without understanding it can be dangerous, true
19:46 TimToady tab completion can, of course, install bugs too if it picks the wrong name
19:46 masak awwaiid: denormalizing/duplicating data has its uses, too.
19:46 awwaiid pft. copy paste is lame. s/// + eval is the way to go.
19:46 masak :P
19:47 masak awwaiid: I find that the more I use vim, the more I make use of mark-some-text, call-out-to-a-shell-command.
19:47 awwaiid yeah
19:47 masak (which replaces the selection with the output of the command.)
19:47 yertalert PerlJam: Even if you do understand it, a wrong function call here, an out of scope variable there
19:47 awwaiid the other day I wanted to output two different bits to temp files and diff them, so did :!cat > out1.txt and :!cat > out2.txt ... and then had to undo because it replaced my text with nothing :)
19:47 * TimToady still wants an anthy-like input method for unicode
19:48 awwaiid anyway
19:48 PerlJam awwaiid: you forgot to use tee
19:48 awwaiid doesn't matter
19:48 awwaiid because I can do >> or » and they'll both work
19:48 awwaiid and I can teach vim to do whatever I want
19:49 TimToady niecza: say <a b c> ∩ <b c d>
19:49 awwaiid as far as minimizing keystrokes goes, that is
19:49 p6eval niecza v14-23-g0699296: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/cdUqfeaedf line 1:�------> [32msay <a b c> [33m�[31m∩ <b c d>[0m��Parse failed��»
19:49 benabik awwaiid: Yank them into two different buffers and use :diffthis?  :-)
19:49 awwaiid benabik, now we're talkin :)
19:49 bbkr1 joined #perl6
19:51 * eviltwin_b assumes that was supposed to be !! not :!
19:51 leontopod masak, so where exactly do you see Perl 6 going?
19:51 eviltwin_b (or maybe vim is broken)
19:51 masak leontopod: a good question.
19:51 PerlJam leontopod: everywhere!
19:51 PerlJam :)
19:51 masak leontopod: I don't see it taking over the world, or even replacing Perl 5.
19:51 colomon TimToady: I promise I'll let you know what I get around to making your Set operators work.  ;)
19:51 bbkr1 rakudo: sub foo { return role { method foo {42};} }; foo().WHERE.say; foo().WHERE.say; # can someone please explain why do I get the same role?
19:51 p6eval rakudo 2251cb: OUTPUT«-7393211224278785710␤-7393211224278785710␤»
19:52 masak leontopod: it will become a language for people who enjoy programming, and enjoy having a powerful medium of expressing solutions to problems.
19:52 leontopod <== Teratogen, btw
19:52 leontopod hi PerlJam!
19:52 masak oh! Teratogen!
19:52 leontopod yes, it's me
19:52 PerlJam leontopod: why the name change?
19:52 leontopod I'm still alive!
19:52 masak welcome back :)
19:52 leontopod oh
19:53 Teratogen joined #perl6
19:53 benabik eviltwin_b: If you type ":!blah" while a block of text is highlighted (with vap, for instance), Vim will automatically add the '<,'> to the command.
19:53 Teratogen left #perl6
19:53 eviltwin_b ah.  I don't generally use the visual block stuff
19:54 benabik I use it a fair amount, especially with the shell command...  :'<,'>!sort is very useful sometimes.
19:55 PerlJam vi(m) has many features that are plain awesome if people would play with them more.
19:55 * benabik discovers :sort
19:56 masak can someone please unban poor Teratogen? :)
19:56 masak I don't remember the syntax for doing it offhand.
19:56 flussence mode -b something something
19:56 masak sorear: can you do it?
19:57 Bucciarati joined #perl6
19:57 flussence .oO( the IRC protocol isn't very well designed for text commands... )
20:00 MayDaniel joined #perl6
20:02 masak moritz++
20:03 moritz fwiw the commands I used where '/ban' to get the list of bans, and then '/unban *!*leontopod@unaffiliated/teratogen'
20:05 masak ossum.
20:05 thou joined #perl6
20:09 masak I see.
20:15 hundskatt joined #perl6
20:17 * colomon now suspects he's running out of filehandles in Windows....
20:18 masak nom: my %en2swe = <dog hund tax skatt>; say %en2swe<dog tax>.join
20:18 p6eval nom 2251cb: OUTPUT«hundskatt␤»
20:19 masak :)
20:19 tadzik :)
20:23 masak Podatek od posiadania psa.
20:24 tadzik istotnie
20:24 tadzik psodatek :)
20:26 masak really? I pasted from Wikipedia...
20:26 masak oh, it's a pun? I see.
20:26 benabik And wikipedia is never wrong.  :-D
20:26 * masak is slow
20:26 masak tadzik++
20:27 masak in retrospect, I'm rather glad it took me a minute rather than a day to get that one :)
20:27 tadzik :P
20:27 PerlJam but now you've deprived yourself from a random pleasant surprise in your future.
20:28 PerlJam s/from/of/
20:28 tadzik masak: you can also get kotodatek or whatever :)
20:28 tadzik well, I'm pushing it now ;)
20:35 cooper joined #perl6
20:37 masak clearly. :)
20:39 masak PerlJam: that's fine, random pleasant surprises in my future seem to replenish themselves automatically.
20:51 bbkr1 ehh, I give up. after 2 hours I still cannot find how to create role object. "my $r = role{ }" is not the same as good old "$r =RoleHOW.new", because it binds role to namespace - for example "sub x { return role { } }" returns always the same object in memory.
20:51 [Coke] KOTO DALEK
20:52 moritz nom: sub x { return role { } }; say x() === x()
20:52 p6eval nom 2251cb: OUTPUT«True␤»
20:54 y3llow joined #perl6
20:55 benabik nom: sub x { return RoleHow.new }; say x() === x()
20:55 p6eval nom 2251cb: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&RoleHow' called (line 1)␤»
20:55 masak bbkr1: I would expect it to, I think.
20:55 benabik nom: sub x { return RoleHOW.new }; say x() === x()
20:55 p6eval nom 2251cb: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&RoleHOW' called (line 1)␤»
20:55 masak bbkr1: if you declare it syntactically like that, it's the same role.
20:55 leontopod joined #perl6
20:56 [Coke] . o O (Great, now I'm hearing all the uppercase messages from perl6 in the DALEK VOICE)
20:56 moritz nom: say Numeric.HOW.new()
20:56 p6eval nom 2251cb: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤␤»
20:57 bbkr1 masak: true, same as "sub foo { return class A {} }". but at the same time RoleHOW is not accessible from user level, so any role created is always syntatically bound
20:57 y3llow joined #perl6
20:57 moritz bbkr1: if you have one role, you can ask it for its .HOW
20:58 moritz bbkr1: what are you trying to achieve in the end?
21:00 bbkr1 make this work on NOM. https://github.com/bbkr/jsonrpc/blob/master/lib/JSON/RPC/Client.pm#L20-30 - this is CANDO workaround.
21:00 y3llow joined #perl6
21:02 moritz maybe you want .^add_fallback instead?
21:02 y3llow joined #perl6
21:02 masak sounds like it.
21:03 bbkr1 does fallback knows name of the method that was called and not found?
21:03 * bbkr1 has to experiment with this
21:04 * PerlJam is reminded that the MOP needs documenting.
21:04 moritz bbkr1: I think so
21:04 moritz yes, it takes two closures
21:05 y3llow joined #perl6
21:05 moritz &cond($obj, $name) must return True or False to indicate if it can handle the fallback
21:05 moritz and &calc($obj, $name) should return the Code object to invoke
21:08 y3llow joined #perl6
21:11 y3llow joined #perl6
21:13 y3llow joined #perl6
21:14 bbkr1 works! you are awesome...
21:16 y3llow joined #perl6
21:16 bbkr1 in fact this is much better than composing roles, because user doesn't have to know RPC method names up front
21:18 y3llow joined #perl6
21:21 y3llow joined #perl6
21:24 y3llow joined #perl6
21:24 not_gerd phenny:, tell jnthn where does 6model keep the stable-pointer in case of flattening an attribute object?
21:25 not_gerd phenny, tell jnthn where does 6model keep the stable-pointer in case of flattening an attribute object?
21:25 phenny not_gerd: I'll pass that on when jnthn is around.
21:25 not_gerd left #perl6
21:26 y3llow joined #perl6
21:28 y3llow joined #perl6
21:31 y3llow joined #perl6
21:34 y3llow joined #perl6
21:37 y3llow joined #perl6
21:40 y3llow joined #perl6
21:40 carlin joined #perl6
21:42 y3llow joined #perl6
21:51 * jnthn home :)
21:51 phenny jnthn: 21:25Z <not_gerd> tell jnthn where does 6model keep the stable-pointer in case of flattening an attribute object?
21:51 jnthn phenny: tell not_gerd that's up to the REPR to do. See P6opaque - it keeps it around in its REPR_data.
21:51 phenny jnthn: I'll pass that on when not_gerd is around.
22:05 benabik_ joined #perl6
22:08 tarch joined #perl6
22:17 flussence hm, I want to mess around with reading keypresses directly on a terminal but $*IN is line-buffered. Any way to make it not do that?
22:24 jnthn flussence: I'm guessing you're trying .getc and finding it line-buffered?
22:24 flussence yep
22:25 flussence I've tried .read(1) too, same result
22:25 flussence I'm wondering if perl6 even has control over this kind of thing, it might be handled entirely by the terminal...
22:26 tadzik C has no control either, I think
22:26 tadzik some termcap/ncurses thing has, though
22:26 eviltwin_b stdio defaults to line buffering of terminals, use setvbuf() to change it.  there is also tty-level control as well, stty -icanon vmin 1 vtime 0
22:27 eviltwin_b (or tcsetattr())
22:27 eviltwin_b I don't know how either of those maps to perl6 though
22:27 tadzik NativeCall to the rescue!
22:29 flussence ...but then I'd have to learn ncurses! :)
22:30 doy Term::ReadKey is how it's done in perl 5
22:30 doy there's no standard interface to getting anything other than line-buffered data from stdin
22:30 tadzik how about this setvbuf?
22:30 awwaiid joined #perl6
22:31 flussence ooh, that looks interesting.
22:31 tadzik even my K&R writes about it :)
22:32 flussence I guess the "right" way to do this is $*IN.autoflush(1), but that doesn't exist yet
22:35 doy setvbuf isn't related
22:35 doy that's only dealing with the stdio buffers
22:35 doy it doesn't affect the buffering that the terminal itself does
22:36 doy there's two layers of buffering going on here
22:36 dalek roast: 8de5275 | jnthn++ | S04-declarations/constant.t:
22:36 dalek roast: Fix a wonky test.
22:36 dalek roast: review: https://github.com/perl6/roast/commit/8de52756c5
22:36 doy the stdio one is part of the c standard, but the terminal-level one isn't
22:36 eviltwin_b right.  for th eother, if you don't want to deal with figuring out termios access, catch the output of "stty -g" to save terminal state, then run the stty command Igave above; invoke stty again with the saved output to reset the terminal
22:37 eviltwin_b (unix-specific; no idea how you deal on windows)
22:37 doy right
22:56 tarch joined #perl6
23:11 * [Coke] ponders turning masak's one off script into a module so it's easier to write tests for.
23:17 colomon +1
23:19 masak 'night, #perl6
23:20 sftp joined #perl6
23:23 dalek rakudo/stdinit: f3058c8 | jnthn++ | src/Perl6/Actions.pm:
23:23 dalek rakudo/stdinit: Small refactor to bind_op/assign_op to prepare for initializer changes.
23:23 dalek rakudo/stdinit: review: https://github.com/rakudo/rakudo/commit/f3058c821e
23:23 dalek rakudo/stdinit: 95a255a | jnthn++ | src/Perl6/ (2 files):
23:23 dalek rakudo/stdinit: First round of changes to parse variable initializers as part of variable_declarator. Basically works, though doesn't yet handle the attribute initializer case yet.
23:23 dalek rakudo/stdinit: review: https://github.com/rakudo/rakudo/commit/95a255ae2c
23:23 jnthn ...oops, English too hard after long day...
23:24 skids joined #perl6
23:33 yertalert joined #perl6
23:36 benabik joined #perl6
23:37 dalek rakudo/stdinit: b0a9d14 | jnthn++ | src/Perl6/Actions.pm:
23:37 dalek rakudo/stdinit: Re-work attribute initializer handling, getting rid of the nasty action at a distance stuff. Also a bit more robust.
23:37 dalek rakudo/stdinit: review: https://github.com/rakudo/rakudo/commit/b0a9d14a4b
23:39 kst` joined #perl6
23:43 jnthn perl6: my $pair = 'foo' => 'bar'; say $pair.WHAT
23:43 p6eval pugs b927740: OUTPUT«Pair␤»
23:43 p6eval ..rakudo 2251cb, niecza v14-23-g0699296: OUTPUT«Pair()␤»
23:46 jnthn perl6: sub x($a = 'foo' => 'bar') { say $a.WHAT }; x()
23:46 p6eval pugs b927740: OUTPUT«Pair␤»
23:46 p6eval ..niecza v14-23-g0699296: OUTPUT«Pair()␤»
23:46 p6eval ..rakudo 2251cb: OUTPUT«===SORRY!===␤Malformed block at line 1, near "($a = 'foo"␤»
23:47 jnthn perl6: my $b; sub x($a = $b = 'bar') { say $a.WHAT }; x()
23:47 p6eval rakudo 2251cb: OUTPUT«===SORRY!===␤Malformed block at line 1, near "($a = $b ="␤»
23:47 p6eval ..pugs b927740: OUTPUT«Str␤»
23:47 p6eval ..niecza v14-23-g0699296: OUTPUT«Str()␤»
23:47 jnthn pmichaud: ping?
23:48 sftp joined #perl6

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

Perl 6 | Reference Documentation | Rakudo