Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-12-16

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:03 fridim_ joined #perl6
00:28 replore joined #perl6
00:39 thou joined #perl6
01:07 donri left #perl6
01:36 envi_ joined #perl6
01:37 lumi___ joined #perl6
01:39 drbean joined #perl6
01:42 Radvendii joined #perl6
01:51 alc joined #perl6
01:56 hrj1 joined #perl6
02:16 leprevost joined #perl6
02:39 nek joined #perl6
02:40 benabik joined #perl6
02:55 drbean joined #perl6
03:35 Psyche^ joined #perl6
03:47 agentzh joined #perl6
03:56 benabik joined #perl6
04:01 benabik joined #perl6
04:14 Sarten-X joined #perl6
04:37 wooden joined #perl6
04:37 wooden joined #perl6
04:42 am0c joined #perl6
04:44 drbean joined #perl6
05:09 woosley joined #perl6
05:13 thou joined #perl6
05:34 Psyche^ joined #perl6
05:35 itz joined #perl6
05:43 sorear good * #perl6
05:47 am0c joined #perl6
06:02 kaleem joined #perl6
06:07 molaf joined #perl6
06:11 JimmyZ_ joined #perl6
06:11 jehymez joined #perl6
06:16 JimmyZ_ nom: class A { method pick() { say 'pick'; }; method hi() { self.?pick; }; }; A.new.hi;
06:16 p6eval nom 081cc0: OUTPUT«pick␤»
06:16 JimmyZ_ nom: class A { method !pick() { say 'pick'; }; method hi() { self!?pick; }; }; A.new.hi;
06:17 p6eval nom 081cc0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
06:17 itz joined #perl6
06:21 JimmyZ_ how can I use '?' in private method call?
06:23 JimmyZ_ I need it because Perl 6 supprot trust class
06:23 JimmyZ_ *supports
06:26 JimmyZ_ std: class A { method !pick() { say 'pick'; }; method hi() { self!?pick; }; }; A.new.hi;
06:26 p6eval std be1f10e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Negation metaoperator not followed by valid infix at /tmp/RuetET4PRT line 1:â�¤------> [32mk() { say 'pick'; }; method hi() { self![33mâ��[31m?pick; }; }; A.new.hi;[0mâ�¤    expecting any of:â�¤       bracketed infixâ�¤        infixâ�¤  infix or
06:26 p6eval ..meta-infix␤P…
06:28 dalek niecza: a117854 | sorear++ | / (7 files):
06:28 dalek niecza: KILL _PASSCAP WITH FIRE
06:28 dalek niecza: review: https://github.com/sorear/niecza/commit/a117854d8f
06:30 jehymez joined #perl6
06:34 envi_ joined #perl6
06:36 mkramer joined #perl6
06:37 dayangkun joined #perl6
06:39 jehymez left #perl6
06:56 wtw joined #perl6
06:59 skangas joined #perl6
07:14 JimmyZ joined #perl6
07:15 JimmyZ nom: class A { trust GLOBAL; has $!foo; }; A.new!A::foo = 'hi';
07:15 p6eval nom 081cc0: OUTPUT«===SORRY!===␤Cannot call private method 'foo' on package A because it does not trust GLOBAL at line 1, near " = 'hi';"␤»
07:18 tadzik hehe
07:28 * sorear -> sleep
07:30 drbean joined #perl6
07:34 jnthn nom: class A { trusts GLOBAL; has $!foo; }; A.new!A::foo = 'hi';
07:34 p6eval nom 081cc0: OUTPUT«Private method 'foo' not found on type A␤  in method dispatch:<!> at src/gen/CORE.setting:769␤  in block <anon> at /tmp/eZljxUG0nO:1␤  in <anon> at /tmp/eZljxUG0nO:1␤»
07:34 jnthn Spelling. It helps. :)
07:34 koban joined #perl6
07:35 jnthn !? would not help either, detection of missing or not allowed private methods is compile time.
07:37 hypolin joined #perl6
07:40 JimmyZ Private method 'foo' not found on type A?
07:41 moritz it doesn't have any private method foo
07:43 JimmyZ looks like trusts.t is NYI
07:45 koban left #perl6
07:50 jnthn JimmyZ: Where exactly did you declare a private method?
07:51 JimmyZ I see it in trusts.t
07:51 jnthn Just because a test file thinks it should work doesn't mean it should.
07:52 jnthn I'm kinda dubious about has $!x generating a private method.
07:53 JimmyZ specs doesn't say private $!x gen private method, it says $x gen public method,  iirc
07:54 jnthn $.x gens a public one.
07:54 jnthn has $x is just sugar for has $!x
07:54 jnthn plus you get to write $x in your code too
07:55 jnthn Nobody seems to really use it much though...seems most folks like to explicitly mark attribute access\
07:55 jnthn (And it ain't for lack of implementation. iirc, alpha, ng and nom have all supported this)
07:57 Trashlord joined #perl6
07:57 JimmyZ nom: class A { trust GLOBAL; has $foo; }; A.new!A::foo = 'hi';
07:57 p6eval nom 081cc0: OUTPUT«===SORRY!===␤Cannot call private method 'foo' on package A because it does not trust GLOBAL at line 1, near " = 'hi';"␤»
07:58 * JimmyZ doesn't like $x too.
07:58 jnthn JimmyZ: It's tursts, not trust
07:58 JimmyZ bad chatzilla :(
07:58 jnthn hehe :)
07:59 jnthn helpful fail :)
08:00 jnthn ooh, my students showed up. Guess I shoudl teach them stuff. :)
08:01 * JimmyZ wonders what jnthn teaches, perl 6?
08:13 * JimmyZ more likes $x is a sugar for $.x
08:15 tadzik it is?
08:15 tadzik everyday I learn
08:15 icovnik joined #perl6
08:24 drbean joined #perl6
08:26 Sarten-X joined #perl6
08:27 moritz I don't think so
08:27 moritz nom: class A { has $x }; say A.^attributes
08:27 p6eval nom 081cc0: OUTPUT«$!x␤»
08:27 moritz nom: class A { has $x }; say A.^methods(:local)
08:27 p6eval nom 081cc0: OUTPUT«␤»
08:27 moritz no accessor is generated
08:28 moritz so 'has $x' is more like 'has $!x'
08:35 bbkr1 joined #perl6
08:35 bbkr1 left #perl6
08:36 vlixes xk
08:36 vlixes left #perl6
08:37 * JimmyZ hopes has $x is more like has $.x
08:37 JimmyZ :)
08:42 moritz wow, the trusts tests are weird
08:42 moritz try { something }; is $!.defined ?? 1 !! 0, 0, '..';
08:43 moritz it also tests only attributes, not methods
08:44 JimmyZ :)
08:45 moritz erm, the whole section on trusts is weird
08:45 moritz it talkes about "private attribute accessors", but I don't think we have such a thing
08:46 moritz we access private attributes directly, not via accessors
08:47 moritz furthermore it only gives the syntax for accessing private methods, not attributes
08:47 Sarten-X joined #perl6
08:48 mkramer left #perl6
08:51 daxim joined #perl6
08:51 dalek roast: 0624a37 | moritz++ | S12- (2 files):
08:51 dalek roast: move trusts tests to S12-attributes/, add a note about possible issues
08:51 dalek roast: review: https://github.com/perl6/roast/commit/0624a37c2d
09:03 mj41 joined #perl6
09:06 dalek roast: 28f3971 | moritz++ | S12-methods/trusts.t:
09:06 dalek roast: tests for method trusts
09:06 dalek roast: review: https://github.com/perl6/roast/commit/28f3971132
09:09 dalek rakudo/nom: d5729f9 | moritz++ | t/spectest.data:
09:09 dalek rakudo/nom: run new S12-methods/trusts.t
09:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d5729f96b3
09:12 woosley left #perl6
09:13 jnthn moritz++
09:14 Sarten-X joined #perl6
09:17 moritz http://stackoverflow.com/questions/100003/wh​at-is-a-metaclass-in-python/6581949#6581949 # meta classes seem to be a popular topic these days :-)
09:17 * JimmyZ wonders why not $class!get-x-priv() , $truster!Truster::get-x-priv(); is a bit ugly
09:19 jnthn JimmyZ: I'm GLAD it's ugly because you should not be doing it apart from in exceptional cases.
09:20 jnthn Also private methods are non-virtual.
09:20 moritz JimmyZ: because private methods are not virtual
09:20 * moritz too slow
09:20 jnthn Which is the real reason you must fully qualify it.
09:22 jnthn Note that you can do self!foo()
09:23 jnthn So the way private methods are meant to be used is huffmanized :)
09:24 replore_ joined #perl6
09:26 dalek mu: 806da6c | moritz++ | misc/perl6advent-2011/schedule:
09:26 dalek mu: [advent] I did day 15
09:26 dalek mu: review: https://github.com/perl6/mu/commit/806da6cb72
09:26 mj41 joined #perl6
09:26 drbean joined #perl6
09:35 mkramer joined #perl6
09:50 drbean joined #perl6
09:51 baest joined #perl6
10:02 fridim_ joined #perl6
10:04 Trashlord joined #perl6
10:21 drbean joined #perl6
10:22 moritz jnthn: I have a curious OO problem in perl 6, maybe you know a nice solution...
10:22 moritz I have a class X::Base, which has a multi method gist
10:22 moritz and then I'd like to have a role X::Comp, which also has a multi method gist
10:23 moritz (both need to be multi methods that allow only defined invocants; otherwise type object stringification breaks)
10:23 Helios joined #perl6
10:23 moritz so, if I have a class that inherits from X::Base and composes X::Comp, I get an ambiguous dispatch to method gist
10:24 moritz can I arrange it in some way so that the gist from the role takes precedence?
10:25 moritz there will be lots of class with those features, so I don't want to disambiguate in every class individually
10:26 moritz currently I just make X::Comp (compile time errors) a subclass of X::Base, but having it as a role would be much nicer (because there are errors that can be both compile time and run time, and I'd rather not have two separate classes for that)
10:27 avar joined #perl6
10:27 avar joined #perl6
10:27 literal joined #perl6
10:27 mathw joined #perl6
10:43 mkramer joined #perl6
10:44 LoRe joined #perl6
11:02 moritz nqp: my &a = sub () { say(5) }; a
11:02 p6eval nqp: OUTPUT«Can't exec "./nqp": No such file or directory at lib/EvalbotExecuter.pm line 192.␤exec (./nqp /tmp/6cLZrEEu2F) failed: No such file or directory␤»
11:07 moritz parallel dyncall build seems to fail on evalbot
11:09 lichtkind_ joined #perl6
11:09 dalek evalbot: 8dd8ee7 | moritz++ | build-scripts/rebuild-nqp.sh:
11:09 dalek evalbot: rebuild nqp serially
11:09 dalek evalbot: review: https://github.com/perl6/evalbot/commit/8dd8ee79ce
11:14 moritz nqp: my &a = sub () { say(5) }; a
11:14 p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " sub () { "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23437 (src/stage2/gen/NQPHLL.pir:6735) (src/stage2/gen/NQPHLL.pm:329)␤»
11:14 moritz nqp: my &a := sub () { say(5) }; a
11:14 p6eval nqp:  ( no output )
11:14 moritz nqp: my &a := sub () { say(5) }; &a()
11:14 p6eval nqp: OUTPUT«5␤»
11:14 moritz nqp: my a := sub () { say(5) }; a()
11:14 p6eval nqp: OUTPUT«Confused at line 1, near "my a := su"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23437 (src/stage2/gen/NQPHLL.pir:6735) (src/stage2/gen/NQPHLL.pm:329)␤»
11:20 jnthn moritz: well, the hack to your multi issue is that the one from the role says "is default"... :)
11:21 moritz jnthn: I thought of that, and considered it a kind of "last resort"
11:23 moritz but maybe that's what I should do
11:26 moritz urks, 'is default' doesn't work in the setting :/
11:27 moritz ah, because infix:<does> is defined in operators.pm, which comes rather later
11:27 moritz *late
11:28 jnthn heh :)
11:29 * moritz tries to move it to the front
11:29 jnthn Yeah, I'd really hoped we'd never need is default in the setting...
11:29 jnthn There must be some better way, I just can't think of it right off
11:30 moritz can I deliberately widen then invocant type constraint in X::Base.gist?
11:30 moritz something like  multi method gist(Any:D:) { ... }
11:30 moritz though that sounds like a cheat too
11:31 moritz nom: class A { multi method a(Any:D:) { 'A' } }; role B { multi method a(B:D:) { 'b' } }; class C is A does B { }; say C.a
11:31 p6eval nom d5729f: OUTPUT«No applicable candidates found to dispatch to for 'a'. Available candidates are:␤:(B, Mu %_)␤:(Any, Mu %_)␤␤  in method a at src/gen/CORE.setting:289␤  in block <anon> at /tmp/D7oTaL8kMf:1␤  in <anon> at /tmp/D7oTaL8kMf:1␤»
11:31 moritz nom: class A { multi method a(Any:D:) { 'A' } }; role B { multi method a(B:D:) { 'b' } }; class C is A does B { }; say C.new.a
11:31 p6eval nom d5729f: OUTPUT«b␤»
11:32 moritz is that allowed?
11:32 moritz or can I tighten the invocant constraint in the role to $?CLASS:D: or so?
11:34 jnthn moritz: uh, the role it should automatically get tightened at comkpositoin time...
11:34 jnthn That is, ::?CLASS is the default invocant type
11:34 jnthn oh, you want to restrict to :D though?
11:34 jnthn In that case then yes, you can ::?CLASS:D: iirc
11:36 moritz nom: class A { multi method a(A:D:) { 'A' } }; role B { multi method a(::?CLASS:D:) { 'b' } }; class C is A does B { }; say C.new.a
11:36 p6eval nom d5729f: OUTPUT«b␤»
11:36 moritz \o/
11:36 moritz jnthn: all that fuss wouldn't be necessary if rakudo simply honored the :D default on method invocants :-)
11:37 hundskatt joined #perl6
11:39 agentzh joined #perl6
11:44 whiteknight joined #perl6
11:53 jnthn moritz: Is that actually spec now?
11:56 lestrrat joined #perl6
12:00 mkramer joined #perl6
12:02 mkramer left #perl6
12:04 ispeak_ joined #perl6
12:05 wknight8111 joined #perl6
12:06 drbean joined #perl6
12:10 mkramer joined #perl6
12:15 kranius joined #perl6
12:22 grondilu joined #perl6
12:23 grondilu perl6: constant abc = "fo"; say "foo" ~~ / <[abc]> /
12:23 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "="␤    expecting ":" or "("␤    at /tmp/snH5zR7OP8 line 1, column 14␤»
12:23 p6eval ..niecza v12-49-ga117854: OUTPUT«Match()␤»
12:23 p6eval ..rakudo d5729f: OUTPUT«#<failed match>␤»
12:23 grondilu perl6: constant abc = "fo"; say "foo" ~~ / <[{abc}]> /
12:23 p6eval niecza v12-49-ga117854: OUTPUT«Match()␤»
12:23 p6eval ..rakudo d5729f: OUTPUT«#<failed match>␤»
12:23 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected "="␤    expecting ":" or "("␤    at /tmp/p891exYi5p line 1, column 14␤»
12:39 orafu joined #perl6
12:45 moritz std: 1 ?? $_ = 3 !! $_ = 5
12:45 p6eval std be1f10e: OUTPUT«[31m===[0mSORRY![31m===[0m�Precedence of = is too loose to use between ?? and !!; please use parens around inner expression at /tmp/pRTniwEOGL line 1:�------> [32m1 ?? $_ =[33m�[31m 3 !! $_ = 5[0m�Parse failed�FAILED 00:01 121m�»
12:47 grondilu what's 'std'?
12:47 moritz the standard grammar
12:48 moritz niecza: 1 ?? $_ = 3 !! $_ = 5
12:48 p6eval niecza v12-49-ga117854:  ( no output )
12:48 moritz sorear: see above, should parse-fail
12:57 ispeak_ joined #perl6
12:59 mathw moritz++ good article on exception handling :)
12:59 moritz thanks mathw
13:01 ab5tract joined #perl6
13:01 moritz now we just need an advent post for today
13:03 * colomon has not yet started writing his for tomorrow, alas....
13:03 mathw The advent calendar is really cool this year
13:04 mathw it feels like 'we'll all be using this in production soon'
13:05 moritz mathw: anything in particular you'd want to read about?
13:06 drbean joined #perl6
13:07 * moritz has an idea, but it would result in a rather long post
13:07 moritz use cases for references in p5, and what Perl 6 offers instead
13:14 mathw that might be interesting
13:14 mathw Perl 6's approach to reference-like things is quite different
13:15 moritz and the interesting thing is it also differs depending on the use case
13:15 * moritz writes the post
13:15 colomon moritz++
13:16 flussence ooc, does Perl 6 pass anything by value?
13:16 moritz everything except native types
13:16 moritz but since many primitives are immutable, you don't see that :-)
13:18 moritz nom: my $x = 4; my $y = 5; my $c = \($x, $y); $c[0] = 8; say $c[0]
13:18 p6eval nom d5729f: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <anon> at /tmp/bIyeE3iY4U:1␤  in <anon> at /tmp/bIyeE3iY4U:1␤»
13:19 moritz shouldn't that work?
13:19 kaleem joined #perl6
13:21 colomon b:  my $x = 4; my $y = 5; my $c = \($x, $y); $c[0] = 8; say $c[0]
13:21 p6eval b 1b7dd1: OUTPUT«8␤»
13:21 colomon niecza: my $x = 4; my $y = 5; my $c = \($x, $y); $c[0] = 8; say $c[0]
13:21 p6eval niecza v12-49-ga117854: OUTPUT«8␤»
13:32 skangas left #perl6
13:33 moritz nom: my @a = 1, 2; my @b = 3, 4;, @a[3] = @b; say @a.elems; .say for @a[3];
13:33 p6eval nom d5729f: OUTPUT«===SORRY!===␤Confused at line 1, near ", @a[3] = "␤»
13:33 moritz nom: my @a = 1, 2; my @b = 3, 4; @a[3] = @b; say @a.elems; .say for @a[3];
13:33 p6eval nom d5729f: OUTPUT«4␤3 4␤»
13:33 jnthn moritz: Captures are immutable, but I'm not sure how deep that goes
13:34 moritz jnthn: I thought it preserved the variables in there as rw
13:34 moritz after all, captures are supposed to be argument lists, and 'is rw' or \-parameters wouldn't work with deeply-ro captures at all
13:35 jnthn moritz: ah....yeah, I see. .list on Capture appears to return a List which is immutable
13:35 jnthn I think
13:35 jnthn That's where it loses the mutability
13:35 moritz and that's what .[] uses?
13:35 jnthn I guess it's hitting the Any case of .[], and thus doing .list.[] or so
13:36 moritz ah, then Capture might need its own at_pos or .[]
13:37 bluescreen10 joined #perl6
13:41 jnthn yeah
13:42 zipf joined #perl6
13:44 moritz http://moritz.faui2k3.org/tmp/references.pod # advent post preview
13:45 moritz I haven't even proof-read it a single time, so if it makes sense to you, be double impressed :-)
13:47 PerlJam moritz++
13:47 jnthn push @a, $@b;
13:48 jnthn nom: my @a; my @b = 1,2,3; push @a, $@b; say @a.elems
13:48 p6eval nom d5729f: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 1, near "@b; say @a"␤»
13:48 PerlJam moritz: I'd take out the text about persuading Larry
13:48 jnthn std: my @a; my @b = 1,2,3; push @a, $@b; say @a.elems
13:48 p6eval std be1f10e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid hard reference syntax at /tmp/7YrV1lyCI5 line 1:â�¤------> [32mmy @a; my @b = 1,2,3; push @a, $[33mâ��[31m@b; say @a.elems[0mâ�¤    expecting any of:â�¤ desigilnameâ�¤    twigilâ�¤Parse failedâ�¤FAILED 00:01 123mâ�¤Â»
13:48 jnthn hm, why's that not work :)
13:49 PerlJam moritz: s/automatically buts/automatically puts/
13:49 jnthn # automatically buts @b in item context
13:49 flussence bit of an awkward NativeCall question: in the v1/pre-nom version, I could write fake typedef stuff using, say, "class timeval is OpaquePointer" for time.h and it'd work. The new one won't let me do that because it's enforcing types more strictly, or something. Can I have that back? :)
13:49 jnthn pu...oh, PerlJam reads faster :P
13:49 moritz PerlJam: I feel I should mention why @$a works, but $@a does not; and I found no good reason
13:49 moritz PerlJam: so I feel I should say *something*
13:49 moritz on that topic
13:49 jnthn flussence: You already have it
13:49 PerlJam moritz: okay
13:49 * moritz fixes the typo
13:50 jnthn flussence: class timeval is repr('CPointer') { }
13:50 flussence jnthn++ :D
13:50 moritz PerlJam: why do you think I shouldn't write it? do you think it puts up too much pressure?
13:51 PerlJam moritz: nah, it just doesn't quite fit in my world view.  You're talking about things that *are* and then you talk about something that you'd like to be
13:52 flussence I wonder if :D/:U work on those... it might help me figure out why this library's complaining about me giving it nulls.
13:52 moritz try it :-)
13:52 PerlJam moritz: if I were writing the article, that spot is where I'd put a sidebar or something ... "Why doesn't $@a work?"
13:53 moritz PerlJam: I don't think wordpress supports side bars, at least not easily
13:53 PerlJam no worries.  It's your article.  It's good.  My commentary was just a minor nit :)
13:53 moritz but yes, I can take it a bit out of the normal narrative
13:57 cognominal_ joined #perl6
13:59 moritz anyway, thanks to jnthn++ and PerlJam++ for the feedback
14:00 hrj joined #perl6
14:01 moritz http://perl6advent.wordpress.com/2011/12​/16/where-have-all-the-references-gone/
14:08 donri joined #perl6
14:11 kboga joined #perl6
14:12 dalek perl6.org: 9e90ebf | duff++ | source/documentation/index.html:
14:12 dalek perl6.org: add 2011 advent calendar link
14:12 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/9e90ebfa94
14:15 kboga hi moritz, found your blogpost very informative (having done some p5)
14:16 moritz \o/
14:21 kboga maybe: s/will also to persuade/will also try to persuade/ & s/the same thing is the other/the same thing as the other/ ?
14:22 moritz yes
14:22 moritz fixed, thanks. kboga++
14:23 kboga np, if it helps the community somehow :)
14:25 * moritz hopes it does
14:25 moritz yesterday we around 5k visitors :-)
14:26 kboga wow, thats amazing
14:27 moritz (mostly from reddit and hackernews)
14:28 kboga oh yea yesterday's blogpost s/can chose/can choose/ ?
14:28 zipf joined #perl6
14:29 moritz fixed too, thanks again
14:29 Radvendi1 joined #perl6
14:33 mkramer joined #perl6
14:34 Radvendii joined #perl6
14:36 donri what are the benefits of this whole scalar vs list/etc context debacle? i assume there are gains, but as an outsider from perl it looks like just complicating matters at a glance
14:36 moritz I sometimes wonder the same thing
14:37 donri i recall realizing some benefit that i've now forgotten :P
14:37 moritz there are a few nice benefits, like being able to write   for 0..9, 'a'..'z' { ... }  and have it do what I want
14:37 donri but that's easily done even in python by simply joining the lists
14:38 moritz basically it makes it easer to concatenate list, but makes it harder to nest them
14:38 moritz it's a tradeoff
14:38 donri but maybe this means you can treat scalar values as single-element lists?
14:38 Trashlord joined #perl6
14:38 donri does that work for arbitrary scalars
14:38 moritz yes
14:38 moritz nom: say 1.join('foo')
14:38 p6eval nom d5729f: OUTPUT«1␤»
14:38 moritz nom: say 1[0]
14:38 p6eval nom d5729f: OUTPUT«1␤»
14:39 PerlJam that's more lispy
14:39 donri i guess that can be a benefit then (but might also mask bugs)
14:39 JimmyZ joined #perl6
14:40 JimmyZ Is 'my $ = @a' same as '$(@a)' ?
14:40 donri i often find myself in python having to deal with e.g. None vs x vs [x..]
14:40 moritz JimmyZ: yes
14:41 JimmyZ moritz: thanks
14:41 PerlJam I think context sensitivity is part of Perl's DNA and that differentiating between singulars and plurals is the most basic genetic component
14:41 moritz nom: (my $ = @*INC) = 5;
14:41 p6eval nom d5729f:  ( no output )
14:41 moritz nom: $(@*INC) = 5;
14:41 p6eval nom d5729f: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <anon> at /tmp/z9EmLKnoYQ:1␤  in <anon> at /tmp/z9EmLKnoYQ:1␤»
14:41 moritz well, not exactly the same thing :-)
14:41 moritz but from a perspective of item vs. list it's the same thing
14:41 JimmyZ nom: say (my $ = @*INC) = 5;
14:41 p6eval nom d5729f: OUTPUT«5␤»
14:42 JimmyZ nom: say (item @*INC) = 5;
14:42 p6eval nom d5729f: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <anon> at /tmp/j6k2fzcGok:1␤  in <anon> at /tmp/j6k2fzcGok:1␤»
14:42 moritz we could also make them behave the same way, not sure if that's desirable
14:43 donri conversely, having done haskell for a while now, it seems bad form to try to accept different types for the same argument to a function. but i guess it makes sense in dynamic languages, and in that regard perl being "more dynamic" than python
14:43 JimmyZ well, looks like Perl 6 supports  @$scalar  but not $@array
14:43 moritz JimmyZ: that's what I wrote in my post, yes
14:44 JimmyZ Perl6 should support $@array, because it supports $@array
14:44 JimmyZ :)
14:44 moritz I'm all for it
14:44 tadzik circular logic is good, because it's circular :)
14:45 donri logic is good because it's logical
14:45 moritz I just think that @Larry had a reason to disallow it, and like to hear if it's still valid
14:47 JimmyZ and $% or %$ ?
14:48 moritz same thing
14:48 Radvendii joined #perl6
14:49 flussence I think I'm doing something wrong/stupid... I thought this would DWIM: "class R { has $r; method new($r) { self.bless(*, :$r); } }" but it only works if I add "submethod BUILD(:$r) { $!r = $r }" too. I'm trying to get a new() that takes a single positional param instead of having to write out the name.
14:50 moritz hm
14:51 PerlJam flussence: has $r; and not has $.r ?
14:52 PerlJam or has $!r
14:52 flussence it's actually a $! var in the code, mis-transcribed it.
14:52 PerlJam just checking in case it's relevant :)
14:54 flussence (if anyone can suggest something that can make writing it shorter than R.new(1) that'd be even better :)
14:59 wolverian joined #perl6
15:00 fridim_ joined #perl6
15:07 flussence oh well, a few extra lines doesn't matter. more important is my code works now :D
15:15 moritz flussence: at some point in the initialization chain, .new() needs to stop passing the named arguments to the initialization routine
15:15 moritz flussence: and it seems that rakudo does that in or after bless, not before
15:16 moritz not sure if that's how it is supposed to be, or not
15:16 moritz oh, and the shortest option is of course  augment class Mu { method r() { R.new(self) } }  and then on any object just  .r
15:17 moritz but well, it is *only* short :-)
15:20 hundskatt joined #perl6
15:22 jnthn huh
15:22 jnthn sub r($x) { R.new($x)
15:22 GlitchMr joined #perl6
15:22 fridim_ joined #perl6
15:22 jnthn then just r 1
15:22 jnthn or a postfix ;)
15:23 zipf joined #perl6
15:25 flussence hm, I just realised something - right now I'm using one class for is repr('CPointer') and a wrapper around it that just adds a few methods. If I knew how to get at the native value directly I could probably combine them into a single class (and wouldn't need the .new stuff at all)
15:26 jnthn An object with CPointer repr can have methods, though not attributes.
15:26 jnthn (having methdos is totally orthogonal to representation)
15:27 drbean joined #perl6
15:28 flussence so I'd just replace the wrapper's $!value with self... I think I'll just do that instead :)
15:28 jnthn :)
15:30 moritz it just shows that the shortest code is the one you don't have to write :-)
15:34 mkramer joined #perl6
15:43 mkramer joined #perl6
15:45 cognominal_ joined #perl6
15:47 sorear good * #perl6
15:48 jnthn 5 hour decommute &
15:54 mkramer1 joined #perl6
15:55 molaf joined #perl6
15:57 thou joined #perl6
15:58 cognominal___ joined #perl6
16:01 colomon \o
16:02 mkramer joined #perl6
16:02 flussence .oO( the only way this could get any better is if the --> notation for return values worked on native subs... )
16:09 TimToady for the record, I'm fine with $@array
16:10 fglock joined #perl6
16:10 TimToady since bare $@ will blow up anyway as an rvalue
16:11 fglock this may be off-topic here,
16:11 fglock http://perlcabal.org/~fglock/perlito5.html
16:11 fglock a mini-perl5 in the browser, based on Perlito
16:13 fglock Perl6 version here: http://perlcabal.org/~fglock/perlito.html
16:14 PerlJam fglock: that AST is a perlito thing?
16:14 fglock PerlJam: yes
16:14 fglock it helps me debug
16:14 * PerlJam still wonders what happened to Perl-5-with-AST
16:15 PerlJam I was hopeful that project could be a nice bridge between perl 5 and perl  6
16:20 JimmyZ TimToady: and $% ?
16:20 TimToady sure, it's just item
16:20 fglock left #perl6
16:21 JimmyZ nice
16:23 * JimmyZ wonders how about 'has $x' is same as 'has $.x' , not 'has $!x', hehe :)
16:24 PerlJam JimmyZ: privacy is a good default.
16:25 moritz I'd rather remove 'has $x' entirely
16:25 JimmyZ PerlJam: that's for apple company
16:25 moritz I don't see any real benefit over 'has $.x' and 'has $!x'
16:26 PerlJam moritz: That'd work for me.
16:26 JimmyZ +1 to moritz too
16:27 TimToady it's really for people who think they're allergic to twigils
16:27 * TimToady thinks about "has x"
16:27 * JimmyZ thinks public is a good default, likes open source
16:27 PerlJam I think more people will be confused about the correspondence between  has $x;  method foo { ... $!x ... }
16:28 moritz TimToady: as long as you don't plan to allow it to interpolate into double-quoted strings...
16:29 TimToady {x}
16:29 moritz has \n; say "a\n" # whoops?
16:29 JimmyZ has \x ? like sub foo(\$x) { ... }  to sub foo(\x) { ... } ?
16:29 TimToady \ is not a sigil
16:29 JimmyZ just like &x
16:30 TimToady JimmyZ: \$x is going away in favor of \x
16:30 PerlJam JimmyZ: more like Perl 5's typeglob
16:30 JimmyZ TimToady:  yes, I heard that
16:32 TimToady and pretty quickly someone will write a pragma that say if x is unrecognized in a signature, assume a \
16:32 TimToady *says
16:33 kaleem joined #perl6
16:33 moritz std: sub f { @%_ }
16:33 p6eval std be1f10e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid hard reference syntax at /tmp/pKLm_6uacq line 1:â�¤------> [32msub f { @[33mâ��[31m%_ }[0mâ�¤    expecting any of:â�¤    desigilnameâ�¤    twigilâ�¤Parse failedâ�¤FAILED 00:01 119mâ�¤Â»
16:34 PerlJam sigilless Perl still gives me the creeps.
16:35 moritz I'll just spec $@foo and let others figure out the implementation :-)
16:35 silug joined #perl6
16:43 dalek specs: 32c6d03 | moritz++ | S02-bits.pod:
16:43 dalek specs: [S02] $%h and $@a item context forms
16:43 dalek specs: review: https://github.com/perl6/specs/commit/32c6d03b82
16:45 CoreX_ joined #perl6
16:52 JimmyZ nom: my %a = 1 => 2, 3 => 4; my $b = %a; my @c = @$b; say @c.perl;
16:52 p6eval nom d5729f: OUTPUT«Array.new("1" => 2, "3" => 4)␤»
16:53 JimmyZ nom: my %a = 1 => 2, 3 => 4; my @c = @%a; say @c.perl;
16:53 p6eval nom d5729f: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 1, near "%a; say @c"␤»
16:53 * JimmyZ wonders how about @%
16:53 drbean joined #perl6
16:53 JimmyZ nom: my %a = 1 => 2, 3 => 4; my @c = @(%a); say @c.perl;
16:53 p6eval nom d5729f: OUTPUT«Array.new("1" => 2, "3" => 4)␤»
16:55 JimmyZ left #perl6
16:55 JimmyZ joined #perl6
16:56 JimmyZ nom: my %a = 1 => 2, 3 => 4; my @c = @(%a); my %d = %(@c); say %d.perl;
16:56 p6eval nom d5729f: OUTPUT«("1" => 2, "3" => 4).hash␤»
16:57 JimmyZ and %@a
16:57 mkramer joined #perl6
16:57 moritz JimmyZ: I don't think they are very useful
16:57 moritz I find %h.pairs much more readable than @%a
16:59 JimmyZ moritz: just for unify
17:01 JimmyZ why $(@a) can write as $@a, but  %(@a) can't write as %@a :)
17:03 PerlJam were it my decision, you wouldn't be able to write $@a or %@a or anything without the parens
17:04 JimmyZ IMO, if $@ and @$ is allowed, %@ and @% shouldn't be disallowed at comiple time
17:05 moritz PerlJam: I've used @a.item and $(@a) in my code, and wished it was shorter
17:07 mkramer joined #perl6
17:08 ashleydev moritz: you're interchainging tmp and temp as the name for the same var in the advent post.
17:08 JimmyZ nom: my %a = 1 => 2, 3 => 4; my @c = @(%a); say @c.perl;
17:08 p6eval nom d5729f: OUTPUT«Array.new("1" => 2, "3" => 4)␤»
17:09 ashleydev i.e typo
17:09 JimmyZ does @c has key "1" and "3" ?
17:09 JimmyZ *have
17:11 JimmyZ nom: say @.perl
17:11 p6eval nom d5729f: OUTPUT«Null PMC access in find_method('perl')␤  in block <anon> at /tmp/nllL48IQVT:1␤  in <anon> at /tmp/nllL48IQVT:1␤»
17:11 moritz ashleydev: thanks, fixing...
17:12 JimmyZ nom: say $.perl
17:12 p6eval nom d5729f: OUTPUT«Null PMC access in find_method('perl')␤  in block <anon> at /tmp/KwW4TXpIR3:1␤  in <anon> at /tmp/KwW4TXpIR3:1␤»
17:12 drbean joined #perl6
17:13 JimmyZ nom: say !.perl
17:13 p6eval nom d5729f: OUTPUT«Bool::False␤»
17:13 GlitchMr perl6: print 2 ~~ '2'
17:13 p6eval rakudo d5729f, niecza v12-49-ga117854: OUTPUT«True»
17:13 p6eval ..pugs b927740: OUTPUT«1»
17:13 GlitchMr perl6: print [2] ~~ ['2']
17:13 p6eval rakudo d5729f, niecza v12-49-ga117854: OUTPUT«False»
17:13 p6eval ..pugs b927740: OUTPUT«1»
17:13 GlitchMr That makes sense :)
17:14 GlitchMr Not like I care...
17:15 JimmyZ nom: say |.perl
17:15 p6eval nom d5729f: OUTPUT«Method 'FLATTENABLE_LIST' not found for invocant of class 'Str'␤  in block <anon> at /tmp/yDnkVnGCO5:1␤  in <anon> at /tmp/yDnkVnGCO5:1␤»
17:16 GlitchMr perl6: print (e, a => 'b', c => 'd', a => 'c', pi, a => 'c').perl
17:16 p6eval rakudo d5729f: OUTPUT«(2.71828183e0, "a" => "b", "c" => "d", "a" => "c", 3.14159265e0, "a" => "c")»
17:16 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&e"␤    at /tmp/qf2i4lVV8j line 1, column 7 - line 2, column 1␤»
17:16 p6eval ..niecza v12-49-ga117854: OUTPUT«(2.71828182845905, "a" => "b", "c" => "d", "a" => "c", 3.14159265358979, "a" => "c")»
17:16 GlitchMr It reminds me PHP for some reason...
17:23 JimmyZ nom: say !.WHAT
17:23 p6eval nom d5729f: OUTPUT«Bool::True␤»
17:24 zipf joined #perl6
17:24 GlitchMr perl6: print q <<20>>
17:24 * JimmyZ wonders how it outputs true
17:24 p6eval pugs b927740, rakudo d5729f, niecza v12-49-ga117854: OUTPUT«20»
17:25 sorear JimmyZ: .WHAT means $_.WHAT, which returns Any because $_ defaults to Any; Any is a false value so !Any is true
17:26 JimmyZ nom: say $.WHAT
17:26 p6eval nom d5729f: OUTPUT«Null PMC access in find_method('WHAT')␤  in block <anon> at /tmp/9IbCOYBrKM:1␤  in <anon> at /tmp/9IbCOYBrKM:1␤»
17:26 GlitchMr That... makes sense...
17:26 GlitchMr There is no $. variable...
17:26 GlitchMr And there is no "$"...
17:27 JimmyZ nom: say |.WHAT
17:27 p6eval nom d5729f: OUTPUT«Method 'FLATTENABLE_LIST' not found for invocant of class 'Any'␤  in block <anon> at /tmp/ex7qVHsPjd:1␤  in <anon> at /tmp/ex7qVHsPjd:1␤»
17:27 JimmyZ nom: say /.WHAT
17:27 p6eval nom d5729f: OUTPUT«␤use of uninitialized value of type Any in numeric context␤»
17:27 baest joined #perl6
17:27 sorear JimmyZ: What exactly are you trying to do?
17:28 GlitchMr perl6: print ?.WHAT
17:28 GlitchMr This?
17:28 p6eval rakudo d5729f, niecza v12-49-ga117854: OUTPUT«False»
17:28 p6eval ..pugs b927740:  ( no output )
17:28 GlitchMr That makes sense...
17:28 GlitchMr Even if it's weird...
17:28 JimmyZ sorear: Just curious
17:28 TimToady perl6: say .WHAT
17:28 p6eval pugs b927740: OUTPUT«Scalar␤»
17:28 p6eval ..rakudo d5729f, niecza v12-49-ga117854: OUTPUT«Any()␤»
17:29 JimmyZ TimToady:  I wonder how about @% and %@ :)
17:29 GlitchMr @% what?
17:29 TimToady no point, since % in list context already has @ semantics
17:29 JimmyZ @(%a) :)
17:30 GlitchMr @{%a}
17:30 GlitchMr I see...
17:31 GlitchMr perl6: @((my %a = 1 => 2) + %a * 2)
17:31 p6eval pugs b927740, rakudo d5729f, niecza v12-49-ga117854:  ( no output )
17:31 GlitchMr perl6: print @((my %a = 1 => 2) + %a * 2)
17:31 GlitchMr right
17:31 p6eval pugs b927740, rakudo d5729f, niecza v12-49-ga117854: OUTPUT«3»
17:31 GlitchMr :)
17:31 PerlJam perhaps my aversion to $@foo and such is just a hold-over from using Perl 5.  I never dereference without braces in Perl 5 so as to avoid any potential confusion.
17:31 Chillance joined #perl6
17:31 PerlJam (at least in multi-level data structures)
17:32 GlitchMr I still fail to notice major differences between Perl 5.14 and Perl 5.10... but that's just me...
17:35 GlitchMr perl6: print "\N{NEL}"
17:35 p6eval rakudo d5729f: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\N' at line 1, near "{NEL}\""␤»
17:35 p6eval ..niecza v12-49-ga117854: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unrecognized backslash sequence: '\N' at /tmp/7CFEe7iQI8 line 1:â�¤------> [32mprint "\N[33mâ��[31m{NEL}"[0mâ�¤â�¤Use of uninitialized value in string contextâ�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 773 (warn @ 2) â�¤ …
17:35 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&NEL"␤    at /tmp/KQGvmwmwJ0 line 1, column 11-14␤»
17:36 GlitchMr Is it possible to use named escapes in Perl 6?
17:37 TimToady perl6: say "\c[WHITE SMILING FACE]"
17:37 p6eval niecza v12-49-ga117854: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method charname not yet implemented at /tmp/nD5ViW0bRA line 1:�------> [32msay "\c[WHITE SMILING FACE[33m�[31m]"[0m��Action method charnames not yet implemented at /tmp/nD5ViW0bRA line 1:�------> [32msay "\c[WHIT…
17:37 p6eval ..pugs b927740: OUTPUT«â˜º␤»
17:37 p6eval ..rakudo d5729f: OUTPUT«☺␤»
17:37 GlitchMr perl6: print "\c[BELL]"
17:37 p6eval niecza v12-49-ga117854: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method charname not yet implemented at /tmp/4IwR3p07KI line 1:�------> [32mprint "\c[BELL[33m�[31m]"[0m��Action method charnames not yet implemented at /tmp/4IwR3p07KI line 1:�------> [32mprint "\c[BELL[33m�[31…
17:37 p6eval ..pugs b927740, rakudo d5729f: OUTPUT«»
17:38 GlitchMr ... just wondering what would happen.
17:38 GlitchMr And I've heard a beep...
17:39 GlitchMr That's weird, considering that Perl 5.16 will not use BELL as BELL...
17:39 TimToady nom: say "\c[BELL SYMBOL]"
17:39 p6eval nom d5729f: OUTPUT«⍾␤»
17:40 GlitchMr BELL SYMBOL?
17:40 TimToady looks like a mushroom here...
17:40 GlitchMr It's BELL in Unicode, but whatever.
17:40 GlitchMr Unless it was changed?
17:41 TimToady .u ⍾
17:41 phenny U+237E BELL SYMBOL (⍾)
18:01 lichtkind inverting hashes with several equal keys overwerites the previous pair?
18:02 TimToady use .push if you don't want that
18:03 TimToady perl6: my %hash; %hash.push: a => 1, a => 2, a => 3; say %hash.perl
18:03 p6eval pugs b927740: OUTPUT«pugs: Named argument found where no matched parameter expected: (a,Ann (Pos (MkPos "/tmp/bTXTNjqwPn" 1 28 1 29)) (Val (VInt 1)))␤»
18:03 p6eval ..niecza v12-49-ga117854: OUTPUT«Unhandled exception: Unable to resolve method push in class Hash␤  at /tmp/lruBDD0Oa2 line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2229 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2230 (module-CORE @ 58) ␤  at /home/…
18:03 p6eval ..rakudo d5729f: OUTPUT«().hash␤»
18:04 TimToady heh
18:04 TimToady perl6: my %hash; %hash.push: (a => 1, a => 2, a => 3); say %hash.perl
18:04 p6eval niecza v12-49-ga117854: OUTPUT«Unhandled exception: Unable to resolve method push in class Hash␤  at /tmp/Wlu8frYgpK line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2229 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2230 (module-CORE @ 58) ␤  at /home/…
18:04 p6eval ..rakudo d5729f: OUTPUT«("a" => [1, 2, 3]).hash␤»
18:04 p6eval ..pugs b927740: OUTPUT«*** Can't modify constant item: VUndef␤    at /tmp/Yv5bGyp8yV line 1, column 11-47␤»
18:05 lichtkind TimToady: say %songs.push.invert.perl; DOESNT WORK HERE FOR ME
18:05 lichtkind sorry shift lock
18:05 TimToady push has to have arguments
18:08 lichtkind thanky you slowly i get it
18:08 lichtkind so classify also uses push
18:08 lichtkind TimToady: i that usage of push new?
18:09 colomon nope
18:09 colomon well, for certain definitions of new.  :)
18:10 ashleydev joined #perl6
18:10 lichtkind introduced in the last 12 month?
18:13 colomon nope, it's older than that
18:15 lichtkind so i was sleeping
18:17 lichtkind but do i get a list of inverted pairs
18:19 moritz nom: my %h; %h.push()
18:19 p6eval nom d5729f:  ( no output )
18:19 MayDaniel joined #perl6
18:20 lichtkind %revert.push($_.invert) for %songs; ??
18:23 spine joined #perl6
18:28 PZt joined #perl6
18:29 Vlavv_ joined #perl6
18:32 localhost joined #perl6
18:38 lichtkind %revert.push(%nr.invert);
18:38 lichtkind have it
18:38 lichtkind thanks
18:52 _ilbot joined #perl6
18:52 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
18:53 _ilbot joined #perl6
18:53 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
18:57 drbean joined #perl6
18:57 alvis joined #perl6
19:26 wolfman2000 joined #perl6
19:30 lichtkind perl6: my %h = 2=>2; say exists %h<2>;
19:30 p6eval rakudo d5729f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&exists' called (line 1)␤»
19:30 p6eval ..niecza v12-49-ga117854: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'exists' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 880 (die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1143 (P6.comp_unit @ 32) â�¤  at /ho…
19:30 p6eval ..pugs b927740: OUTPUT«*** No compatible multi variant found: "&exists"␤    at /tmp/7zlWWwKV6r line 1, column 19-31␤»
19:31 lichtkind perl6: my %h = 2=>2; say %h<2> ;exusts;
19:31 p6eval pugs b927740: OUTPUT«2␤*** No such subroutine: "&exusts"␤    at /tmp/mkHvH2FZUT line 1, column 26-32␤»
19:31 p6eval ..niecza v12-49-ga117854: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'exusts' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 880 (die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1143 (P6.comp_unit @ 32) â�¤  at /ho…
19:31 p6eval ..rakudo d5729f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&exusts' called (line 1)␤»
19:31 lichtkind perl6: my %h = 2=>2; say %h<2> ;exists;
19:31 p6eval pugs b927740: OUTPUT«2␤*** No compatible multi variant found: "&exists"␤    at /tmp/RGYlCvim6S line 1, column 26-32␤»
19:31 p6eval ..rakudo d5729f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&exists' called (line 1)␤»
19:31 p6eval ..niecza v12-49-ga117854: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'exists' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 880 (die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1143 (P6.comp_unit @ 32) â�¤  at /ho…
19:32 moritz it helps to spell the colon correctly
19:32 lichtkind perl6: my %h = 2=>2; say %h<2> :exists;
19:32 p6eval niecza v12-49-ga117854: OUTPUT«Bool::True␤»
19:32 p6eval ..pugs b927740: OUTPUT«pugs: Named argument found where no matched parameter expected: (exists,Val (VBool True))␤»
19:32 p6eval ..rakudo d5729f: OUTPUT«===SORRY!===␤Confused at line 1, near "say %h<2> "␤»
19:32 lichtkind maybe :)
19:35 lichtkind thanks
19:36 zipf joined #perl6
19:36 lichtkind huhu exists is gone as i knew it
19:41 mkramer joined #perl6
19:43 sorear TimToady: ping...
19:43 sorear phenny: tell TimToady I am wondering why assertion:variable uses <EXPR(%LOOSEST)>.  Is <$foo = $bar> supposed to mean something?
19:43 phenny sorear: I'll pass that on when TimToady is around.
19:47 molaf joined #perl6
19:49 Chillance joined #perl6
19:57 sftp joined #perl6
19:59 drbean joined #perl6
20:12 lichtkind jnthn: ping
20:12 raiph joined #perl6
20:18 hundskatt joined #perl6
20:23 ksi joined #perl6
20:28 felher moritz++: nice blogpost. Also +1 on allowing $@something; :)
20:29 MayDaniel joined #perl6
20:31 ruoso_ joined #perl6
20:32 ruoso_ hi all
20:37 sorear o/ ruoso_
20:37 sorear haven't seen you in a while
20:37 ruoso_ I need to find a new rythm to resume my open-source life
20:38 ruoso_ between work and kid I haven't been doing anything lately
20:38 bluescreen10 joined #perl6
20:38 sorear hehe, I've heard that a lot
20:39 ruoso_ and it's a shame, since a lot of exciting stuff is happening around here..
20:42 ruoso_ like the implementation of the REPR API in rakudo...
20:43 ruoso_ speaking of which... is there any idea of when we're getting the rakudo star releases again?
20:43 sorear There was talk of one this month
20:50 moritz ruoso_: we want to make a star release based on the December compiler release
20:50 moritz ruoso_: most regressions from the transition to nom are now fixed, and the native call interface mostly works again
20:51 ruoso_ That's cool... is this the same transition that is getting rid of most of the PIR in the Perl6-level code?
20:52 sorear Yes
20:53 moritz $ ack Q:PIR src/core/ |wc -l
20:53 moritz 12
20:53 ruoso_ That is really cool...
20:54 moritz nom: try eval q[class A { $!undeclared } ]; say $!.perl
20:54 p6eval nom d5729f: OUTPUT«X::Attribute::Undeclared.new(name => "\$!undeclared", package-type => "class", package-name => "A", filename => "/tmp/pIOvP9ELJy", line => 1, column => Any, message => "Attribute \$!undeclared not declared in class A")␤»
20:55 moritz ruoso_: that's also new, we can now throw typed exceptions from within the compiler
20:55 sorear that's _very_ new
20:55 moritz aye :-)
20:55 sivoais joined #perl6
20:55 moritz 4 days old
20:56 ruoso_ :)
20:56 sorear the namesake feature of nom is a complete new object model
20:56 sorear it's very SMOP-inspired
20:56 sorear and with that came a lot of other refactorings
20:56 ruoso_ Yes, I am very very happy to see that SMOP was helpful in the end :)
20:56 sorear rakudo is now a _worthy_ opponent :P
20:57 ruoso_ So at this point we're actually close of bootstrapping rakudo over nqp...
20:57 sorear huh?
20:58 sorear we're not leaving nqp
20:58 sorear ever, afaict
20:58 ruoso_ that's not what I meant
20:58 ruoso_ what I meant is that porting rakudo to a different vm would be possible by porting nqp
20:59 ruoso_ in that sense nqp would be a "bootstrapping" language
20:59 moritz .oO( chromatic's dread )
20:59 moritz ruoso_: yes, but it's much more work than just porting nqp
21:00 moritz lots of codegen and runtime stuff is also vm dependent
21:00 ruoso_ Oh... right... you would need a new emitter
21:01 sorear the emitter is part of nqp, really
21:01 moritz not yet
21:01 sorear rakudo shares the nqp emitter with very tiny overrides
21:01 sorear oh?
21:02 ruoso_ but my point is that one could make nqp have multiple emitters...
21:02 sorear Yes.
21:03 moritz in fact there's a nqplua backend, on which diakopter++ has been working a bit
21:03 ruoso_ so porting rakudo would mean porting nqp+writing a new emitter
21:03 Mowah_ joined #perl6
21:03 sorear also nqp# and jnqp, which are much better
21:03 diakopter nqplua doesn't emit anything though. it's dependent on parrot-nqp anyways
21:03 diakopter like nqpclr
21:03 sorear but nowhere near good enough to run rakudo
21:04 sorear or themselves, as diakopter points out
21:04 * ruoso_ wonders if it would be possible to port nqp to perl5guts
21:05 moritz possible, but probably not a good idea
21:05 ruoso_ why?
21:05 moritz too different primitives, and not low-level enough to be still efficient when combined to emulate the perl 6 stuff
21:06 diakopter a bunch of nqp is in C after all
21:06 jlaire joined #perl6
21:06 sorear moritz: I think ruoso is talking about writing our own set of primitives, but using the Perl 5 data types
21:06 ruoso_ Yes
21:07 sorear and the Perl 5 dispatch loop
21:07 ruoso_ exactly
21:07 sorear the main problems with this approach are the differences like "in Perl 6, an Int is an object, with identity"
21:08 drbean joined #perl6
21:09 ruoso_ well, that is the semantics interoperability issue, not the "running perl6" issue
21:09 lichtkind moritz: i'm 80% done, wanne have a look at it?
21:11 sorear ruoso_: another problem is that nqp doesn't use containers
21:11 ruoso_ containers in the Perl 6 sense?
21:11 sorear there would be a substantial penalty to a perl5/nqp/rakudo stack because containers would have to be reimplemented at a higher level, ignoring the perl 5 containers
21:11 sorear containers = Scalar, struct SV
21:12 sorear a common Perl concept
21:12 ruoso_ well, yeah... perl5 doesn't have containers...
21:12 ruoso_ perl5 only have values
21:14 ruoso_ but why would that penalty be bigger with the p5 core than with the parrot core?
21:17 lichtkind any  other people here involved in advent calendar?
21:18 thou joined #perl6
21:27 Trashlord joined #perl6
21:48 * jnthn home at last
21:48 * tadzik home at... hey!
21:48 jnthn :P
21:49 jnthn 5 hour decommute was, at least, comfy and with wifi
21:49 slavik1 ....
21:51 jnthn slavik1: Train from Stockholm down to south of Sweden :)
21:51 jnthn I would say not a regular commute, though I've done the trip twice this month. :)
21:51 jnthn And have got it at least once next month.
21:51 slavik1 oh
21:52 slavik1 jnthn: so you heard of this guy named Jonathan Walsh?
21:53 jnthn slavik1: No...should I have? :)
21:54 slavik1 he was on the front page of some swedish paper
21:54 slavik1 I thought swedes were all gamers and such
21:55 slavik1 dreamhack, starcraft2, doesn't ring a bell?
21:55 jnthn Ah...I've never been a gamer. But yeah, it's popular here.
21:55 sorear at least you have decent trains
21:55 * jnthn ain't Swedish, just living in Sweden :)
21:55 slavik1 oh, ok
21:56 slavik1 how is sweden? I was told you don't need to know a word of swedish ...
21:56 tadzik orka!
21:56 jnthn sorear: Yes, I'm happy about that. Especially as I'm not allowed to drive a car. :)
21:57 jnthn slavik1: It's pretty nice here. You can certainly get by with English, but it would feel odd to live in a country and not at least do the trivial things in the local language. So I'm learning...slowly. :)
21:58 sorear jnthn: Is that because you're a filthy foreigner, or because the Swedes are sensible enough to outlaw private car ownership?
21:58 jnthn sorear: Neither. It's 'cus I don't have good enough eyesight to drive safely.
21:59 jnthn (Retina condition, so basically unfixable.)
21:59 jnthn Makes me very glad to be in Europe, where public transport generally exists, and in many places can be pretty good.
22:00 slavik1 NYC has decent public transportation
22:00 slavik1 best in the country :(
22:00 jnthn To be fair, it's not just Europe where it's good.
22:01 jnthn I had little problem getting around in Japan, China, Russia, etc.
22:01 tadzik did you experience Japan subway in the rush hours?
22:02 jnthn tadzik: I avoided it...right until my very last day there, when the time of my flight meant I ahd to experience it at rush hour.
22:02 jnthn "experience" is certainly the word for it. :)
22:02 tadzik hah
22:02 tadzik were you pushed in by the pushers? :P
22:02 jnthn I've never actually felt like any form of transport I've been on since was crowded. :)
22:03 jnthn tadzik: No, folks seemed quite capable of sardining themselves onto the subway in general. :)
22:03 tadzik I consider subway to be crowded when you cannot fall down, even if you faint or whatever
22:03 tadzik haha, the sardines analogy seems quite international :P
22:04 donri left #perl6
22:07 dalek nqp: d3bf21d | jnthn++ | src/6model/reprs/CPointer.c:
22:07 dalek nqp: Fix storage spec for CPointer repr; flussence++ for reporting the bug and testing the patch.
22:07 dalek nqp: review: https://github.com/perl6/nqp/commit/d3bf21d438
22:19 bluescreen10 joined #perl6
22:24 lichtkind tadzik, jnthn someone to chekc my article so far?
22:25 hundskatt joined #perl6
22:33 drbean joined #perl6
23:04 tokuhirom joined #perl6
23:12 zipf joined #perl6
23:13 zipf joined #perl6
23:33 raiph comments.assuming(@listener>0)
23:35 raiph try.rakudo.org doesn't work; ideone.com does; http://perlcabal.org/~fglock/perlito.html is great; maybe update perl6.org?
23:37 raiph stackoverflow: perl6 tag; 91 followers; 50 questions; 21 this year; none unanswered;
23:39 sorear huh?
23:39 * PerlJam read "none unanswered" as "none answered" at first
23:40 sorear Those look like facts and statistics to me, not comments ... is there subtext I'm missing?
23:41 raiph hi sorear
23:41 sorear hello raiph
23:42 geekosaur joined #perl6
23:45 raiph sorear: just that one advantage of perl6's current situation is the relative responsiveness of its community
23:45 dalek niecza: c2f6274 | sorear++ | / (6 files):
23:45 dalek niecza: Add <$foo> and <@foo>
23:45 dalek niecza: review: https://github.com/sorear/niecza/commit/c2f6274f16
23:47 geekosaur joined #perl6
23:48 raiph 3 stackoverflow perl6 questions look like they could maybe do with a better / updated answer:
23:48 raiph http://stackoverflow.com/questions/5031​737/perl6-rakudo-dereferencing-question
23:48 raiph http://stackoverflow.com/questions/4516057/h​ow-to-control-nestedness-of-loops-in-perl-6
23:48 raiph http://stackoverflow.com/questions/31356​73/what-performance-increases-can-we-exp​ect-as-the-perl-6-implementations-mature
23:50 raiph i've read enough to make me think things have moved on since the answers, but not enough to think i can give those better answers

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

Perl 6 | Reference Documentation | Rakudo