Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-08-20

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:02 daniel-s joined #perl6
00:38 Alias joined #perl6
00:41 tokuhirom joined #perl6
00:42 Moukeddar joined #perl6
00:50 Moukeddar_ joined #perl6
02:57 abercrombie joined #perl6
03:28 Su-Shee joined #perl6
03:29 rdesfo joined #perl6
03:29 rdesfo left #perl6
04:43 kaare_ joined #perl6
04:46 thowe joined #perl6
05:00 tokuhirom joined #perl6
05:08 molaf joined #perl6
05:12 alim joined #perl6
05:12 mkramer joined #perl6
05:24 kaare__ joined #perl6
05:25 felher joined #perl6
05:39 * TimToady is in SJC state now :)
05:39 TimToady hopefully the kids 'member to pick us's up
05:52 * lue wonders where/what/* that is
05:57 alim joined #perl6
06:12 thowe San Jose?
06:17 meteorjay joined #perl6
06:40 wamba joined #perl6
06:46 d4l3k_ joined #perl6
06:47 SHODAN joined #perl6
06:52 daniel-s joined #perl6
06:59 cognominal is there such thins as an ordred hash in rakudo?
07:00 cognominal an array of pairs is close enough for me because I don't need ranom access
07:39 77CAA2IMQ joined #perl6
07:43 beek joined #perl6
07:55 mj41 joined #perl6
08:07 sorear cognominal: the question then is "what does ordered hash mean"?
08:08 sorear cognominal: I suppose you want the full set of hash ops, including write.  But what iteration order do you want, and do you want fast Positional access?
08:16 Mowah joined #perl6
08:21 tadzik good morning #perl6
08:26 cognominal sorear: I just want iteration order the one induced by the order of adding elements to the hash. I don't care about Postional access but I may care about access by key
08:30 eiro hello
08:32 cognominal howdy, froggy
08:42 Tene what happens when you update a key that you added earlier?  does it stay in place, or move to the end?
08:42 Tene there's a pile of variations like that
08:43 cotto joined #perl6
08:46 im2ee joined #perl6
09:15 wamba joined #perl6
09:27 pernatiy joined #perl6
09:36 moritz good morning everybody
09:37 Kivutarrr joined #perl6
09:37 dalek roast: b91f3c5 | moritz++ | S04-blocks-and-statements/pointy-rw.t:
09:37 dalek roast: fudge pointy-rw.t for rakudo
09:37 dalek roast: review: https://github.com/perl6/roast/commit/b91f3c5c25
09:38 tadzik good morning moritz
09:38 dalek rakudo/nom: b2c2669 | moritz++ | t/spectest.data:
09:38 dalek rakudo/nom: run pointy-rw.t
09:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b2c2669225
09:46 perlhack joined #perl6
09:47 perlhack left #perl6
09:59 araujo joined #perl6
09:59 araujo joined #perl6
09:59 araujo joined #perl6
10:09 araujo joined #perl6
10:13 wamba joined #perl6
10:13 whiteknight joined #perl6
10:13 araujo joined #perl6
10:15 Trashlord joined #perl6
10:18 frettled joined #perl6
10:19 cotto joined #perl6
10:22 araujo joined #perl6
10:34 jaldhar joined #perl6
10:35 jaldhar joined #perl6
10:36 cognominal I can get away with an array and push, but that's verbose.
10:37 cognominal Other question, I don't see any spec on setters and getters. How do I handle a ovbject attribute that I can either set or get?
10:37 jaldhar joined #perl6
10:38 cognominal … with no side effect
10:38 cognominal there must be an idiom for that
10:41 PacoLinux joined #perl6
10:41 moritz has $.thing is rw
10:42 jaldhar joined #perl6
10:43 cognominal thx
10:43 cognominal and if I want side effects?
10:44 moritz method thing() is rw {  your side effect here; $!thing }
10:44 moritz and   has $!thing;   before that
10:45 tadzik does that work in Rakudo now?
10:45 kfo joined #perl6
10:45 moritz tadzik: I'm pretty sure it works in nom
10:45 moritz nom: class A { has $!thing; method thing() is rw { say 'altering $thing'; $!thing } }; A.new.thing = 3;
10:45 p6eval nom: OUTPUT«altering $thing␤»
10:45 tadzik nice
10:46 tadzik nom: class A { has $!thing; method thing() is rw { say 'altering $thing'; $!thing } }; A.new.thing = 3; say $a.thing
10:46 moritz nom: class A { has $!thing; method thing() is rw { say 'altering $thing'; $!thing } }; given A.new { .thing = 3; say .thing }
10:46 p6eval nom: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in <anonymous> (/tmp/dSbGhfBJhC:1)␤»
10:46 tadzik eeps
10:46 p6eval nom: OUTPUT«altering $thing␤altering $thing␤3␤»
10:46 tadzik yes, what I wanted to check
10:48 moritz tadzik: in fact if you look at src/core/Attribute.pm, that's how rw attributes are implemented :-)
10:48 tadzik :)
10:49 cotto joined #perl6
11:03 MayDaniel joined #perl6
11:09 cognominal nom: class A { has $!thing; method Scalar thing() is rw { say 'altering $thing'; $!thing } }; given A.new { $thing = 3; say $thing }
11:09 p6eval nom: OUTPUT«===SORRY!===␤Malformed block at line 1, near "thing() is"␤»
11:09 cognominal no way to hide, the existence of a method?
11:10 moritz if you don't want to show a method to the public, use a private method
11:10 cognominal and get the role info from the sigil.    $thing says more than .thing
11:11 moritz nom: class A { method public() { self!private() }; method !private() { say "for your eyes only" } }; A.new.public; A.new!private
11:11 p6eval nom: OUTPUT«for your eyes only␤Method 'find_private_method' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤  in method dispatch:<!> at src/gen/CORE.setting:602␤  in mu <anon> at /tmp/tjcITCkcla:1␤  in mu <anon> at /tmp/tjcITCkcla:1␤␤»
11:12 moritz that could use a more awesome error message
11:12 cognominal at least, it gives a clue.
11:13 cotto joined #perl6
11:24 Trashlord joined #perl6
11:26 ker joined #perl6
11:28 ker left #perl6
11:35 alim joined #perl6
11:39 zby_home_ joined #perl6
11:41 Trashlor1 joined #perl6
11:41 jferrero perl6: source?
11:41 p6eval niecza v8-52-g3afe236: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Confused at /tmp/mmf7c_eRRC line 1:â�¤------> [32msource[33mâ��[31m?[0mâ�¤â�¤Undeclared routine:â�¤     'source' used at line 1â�¤â�¤Parse failedâ�¤â�¤Â»
11:41 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "?"␤    expecting "::", dot, ":", "(", term postfix or operator␤    at /tmp/Z_vA6zrzbG line 1, column 7␤»
11:41 p6eval ..rakudo a55346: OUTPUT«===SORRY!===␤Confused at line 22, near "source?"␤»
11:45 cognominal jferrero, https://github.com/rakudo https://github.com/perl6 if that's you want
11:45 uniejo_in_riga joined #perl6
11:46 tadzik I think he means the bot source
11:46 colomon joined #perl6
11:46 tadzik it's github/perl6/evalbot I suppose
11:47 jferrero tadzik, +1
11:49 moritz jferrero: feel free to provide a patch that makes it reports its source URL :-)
11:49 jferrero I need a perlbot for a spanish irc channel :) I wrote one with Bot::BasicBot but is not robust. :)
11:50 whiteknight joined #perl6
11:50 moritz jferrero: I can make p6eval join other channels
11:51 moritz jferrero: and buubot_backup can do perl 5 evals -- talks to stsc on irc.perl.org about it
11:51 moritz buubot_backup: eval: 1 + 2
11:51 buubot_backup moritz: 3
11:51 moritz afk, will backlog
11:52 bbkr joined #perl6
11:53 jferrero moritz, the problem is the channel is in another server...
11:54 jferrero moritz, And I need more Perl5 that Perl6. I downloaded Buubot and I will read.
11:54 cognominal jferrero: this should not be a problem.
11:54 cognominal … about another server
12:02 jferrero I I think the best would be to convince people to go to irc.perl.org but irc-hispano.org has many years and people are accustomed.
12:07 tadzik we were speaking of is rw methods, is there a cleaner method to write something like http://codepad.org/M0ey0kCp ?
12:09 tadzik oh, that doesn't even work
12:14 denysonique joined #perl6
12:14 denysonique left #perl6
12:15 denysonique joined #perl6
12:15 denysonique left #perl6
12:15 denysonique joined #perl6
12:26 uniejo_in_riga joined #perl6
12:42 JimmyZ joined #perl6
13:03 colomon tadzik: wouldn't the translation be something like method bar($value) { $!bar = $value + 2; } ?
13:08 tadzik colomon: I really want the $foo.bar = 42 sugar
13:08 moritz colomon: that would be more idiomatic, but requires a different setter style
13:09 colomon ah
13:09 moritz tadzik: could you please incorporate Damian's clarification into S26?
13:09 colomon tadzik: seems like to do that right, you need some sort of proxy.  I don't think that area has been explored very well yet
13:10 moritz I think niecza does something like that
13:10 moritz an object on which you can define a STORE method or so
13:12 tadzik moritz: I will
13:12 tadzik re Proxy and STORE, that's still a hell lot of typing
13:12 moritz indeed
13:14 colomon tadzik: I'd argue that's a *good* thing
13:15 moritz from an abstraction POV it's bad
13:15 moritz because it means that it encourages the programmer to offer a separate write access syntax for attributes on the one hand, and dependently computed data on the other hand
13:16 moritz suppose you have a Square class, and you can provide write accessors for 'width' and 'area'
13:17 moritz if you go about the usual Perl 6 way, one would look like $square.width = 3;, the other would be $square.set-areay(9)
13:17 colomon 1st: we should be tending towards non-mutable classes anyway
13:17 moritz or the other way round, depening on what the class actually stores
13:17 moritz which the user shouldn't have to care about
13:18 moritz colomon: agreed, but when we offer 'is rw', we should at least make it good
13:19 colomon 2nd: isn't that a terrible design for a Square class?  The idea of setting the width by setting the area sounds quite wacky to me.
13:20 moritz why?
13:20 orafu joined #perl6
13:21 colomon hmm... sort of a design smell, I think.
13:21 colomon I mean, would you also have a "perimeter" method, and allow setting via it?
13:23 moritz why not?
13:25 tadzik just because we don't really like something doesn't mean it shouldn't be allowed, see MI
13:26 tadzik I think an easy way to write an lvalue method is desirable for some people
13:26 colomon tadzik: I like MI.  ;)
13:27 colomon moritz: can of worms
13:27 JimmyZ Is there any other languages using lvalue function/method?
13:27 moritz if I were the user of a CAD program, I'd be pretty annoyed if it would only let me the specify the size of components in exactly one way
13:27 tadzik JimmyZ: see the paste, Ruby has it easy
13:28 colomon moritz: I think the solid example is simply, how do you seamlessly replace an "is rw" attribute with methods?
13:28 tadzik a Ruby friend is looking into Perl and asked me about doigng this sort of stuff
13:28 moritz and I'd had to do all the calculations myself just to get to the format which the Square class accepts
13:29 donri joined #perl6
13:29 JimmyZ well, I didn't find what's the different from the paste
13:29 colomon moritz: sure, but if the programmer did that by writing lvalue methods for every single derived attribute on every single geometry class, he would soon be locked up in an insane asylum.
13:29 moritz colomon: not every single attribute, just those that allow a bijective mapping to the object geometry
13:30 Trashlord joined #perl6
13:30 tadzik JimmyZ: the difference is that the perl6 example is wrong :)
13:30 tadzik ie it modifies bar on every .bar() call
13:30 colomon moritz: so it's crucial that an area modifier should present on Square, but it shouldn't be present on Rectangle?
13:31 moritz colomon: dunno, you could always have it keep the current height-to-width ratio
13:32 moritz colomon: it's kinda pointless to discuss if the example scales, as long as it's a valid example in a small domain, for which we should provide the necessary semantics in the language
13:34 colomon colomon: moritz: I think the solid example is simply, how do you seamlessly replace an "is rw" attribute with methods?
13:34 JimmyZ tadzik: so you want modifies bar on the first call ?
13:36 tadzik JimmyZ: yes. I want a sugar over a custom set_bar($val) { $!bar = $val + 2 }
13:37 moritz colomon: right, and not just seamlessly, but also more generally
13:42 colomon Though I dunno, I vacillate back and forth on this.  Like I feel better if my language can do it, but it's a technique I really think is a bad idea in every case mentioned so far.
13:43 colomon gotta go, off to the Owen Sound Summerfolk festival.
13:45 JimmyZ rakudo: class Foo { has $.bar; method bar is rw { $!bar;} }; my $foo = Foo.new; $foo.bar = 4; say $foo.bar; say $foo.bar;
13:45 p6eval rakudo a55346: OUTPUT«===SORRY!===␤A method named 'bar' already exists in class 'Foo'. It may have been supplied by a role.␤»
13:46 JimmyZ well, doesn't work in master
13:47 JimmyZ nom: class Foo { has $.bar; sub set(&method) {  $!bar +=2; } ; set method bar is rw { $!bar;} }; my $foo = Foo.new; $foo.bar = 4; say $foo.bar; say $foo.bar;
13:47 p6eval nom: OUTPUT«Null PMC access in get_attr_keyed()␤  in sub set at /tmp/b8AvLYZxWL:1␤  in mu <anon> at /tmp/b8AvLYZxWL:1␤  in mu <anon> at /tmp/b8AvLYZxWL:1␤  in mu <anon> at /tmp/b8AvLYZxWL:1␤␤»
13:48 moritz JimmyZ: a sub inside a class doesn't have access to 'self'
13:49 flussence rakudo: proto sub foo($) {*}; sub foo(Int $) {...}; sub foo(Str $) {...};
13:49 p6eval rakudo a55346:  ( no output )
13:49 flussence rakudo: proto sub foo($) {*}; sub foo(Int $) {...}; sub foo(Str $) {...}; say 'alive'
13:49 p6eval rakudo a55346: OUTPUT«alive␤»
13:49 flussence hm, nom gets that wrong
13:49 flussence nom: proto sub foo($) {*}; sub foo(Int $) {...}; sub foo(Str $) {...}; say 'alive'
13:49 p6eval nom: OUTPUT«===SORRY!===␤Illegal redeclaration of routine 'foo' at line 1, near "; sub foo("␤»
13:49 moritz JimmyZ: and thus also not the attributes, because it doesn't know which object the attributes belong to
13:49 JimmyZ tadzik: you're wanting magic method which looks like __SET method in PHP
13:49 moritz flussence: yes, known (at least to me :-) bug
13:49 flussence ok then :)
13:50 JimmyZ tadzik: And there are also __GET magic method ;)
13:50 tadzik JimmyZ: maybe, I don't know.
13:51 * TimToady fuzzes out of non-existence
13:51 flussence rakudo: proto sub foo($a) {say $a.WHAT; *}; sub foo(Int $) {...}; sub foo(Str $) {...}; foo(4); # just curious if this works
13:51 p6eval rakudo a55346:  ( no output )
13:51 moritz \o/ autovivificaton of TimToady
13:52 moritz flussence: the * only redispatches in protos if it's the the only term
13:52 moritz flussence: I think you need nextsame otherwise
13:52 flussence oh, I think I misread the spec slightly...
13:52 flussence rakudo: proto sub foo($a) {say $a.WHAT; {*} }; sub foo(Int $) {...}; sub foo(Str $) {...}; foo(4);
13:52 p6eval rakudo a55346:  ( no output )
13:53 JimmyZ moritz: yeah, Null PMC access in get_attr_keyed() is bad
13:54 moritz nom: proto sub foo($a) { say $a.WHAT; nextsame } ; multi foo(Str $x) { 'string' }; multi foo(Int $x) { 'number' }; say foo('bar')
13:54 p6eval nom: OUTPUT«Str()␤No dispatcher in scope␤  in sub foo at /tmp/P4AJRGkqcr:1␤  in mu <anon> at /tmp/P4AJRGkqcr:1␤  in mu <anon> at /tmp/P4AJRGkqcr:1␤␤»
13:55 JimmyZ nom: class Foo { has $.bar; multi method bar is rw { $!bar +=2;}; multi method bar { $!bar;} }; my $foo = Foo.new; $foo.bar = 4; say $foo.bar; say $foo.bar;
13:55 p6eval nom: OUTPUT«Ambiguous dispatch to multi 'bar'. Ambiguous candidates had signatures:␤:(Foo, Mu %_)␤:(Foo, Mu %_)␤␤  in method bar at src/gen/CORE.setting:218␤  in mu <anon> at /tmp/cUQuyE6DCI:1␤  in mu <anon> at /tmp/cUQuyE6DCI:1␤␤»
13:56 moritz nom: proto sub foo($a) { say $a.WHAT; {*} } ; multi foo(Str $x) { 'string' }; multi foo(Int $x) { 'number' }; say foo('bar')
13:56 p6eval nom: OUTPUT«===SORRY!===␤{*} may only appear in proto at line 1, near " } ; multi"␤»
13:56 JimmyZ well, maybe muilt trait is needed for tadzik++
13:57 JimmyZ nom: class Foo { has $.bar; multi method bar is rw { $!bar +=2;}; multi method bar is r { $!bar;} }; my $foo = Foo.new; $foo.bar = 4; say $foo.bar; say $foo.bar; # something like this
13:57 p6eval nom: OUTPUT«===SORRY!===␤No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Attribute $attr, Any $rw)␤:(Attribute $attr, Any $readonly)␤:(Routine $r, Any $rw)␤:(Parameter $param, Any $readonly)␤:(Parameter $param, Any $rw)␤:(Parameter $param,…
13:57 im2ee joined #perl6
13:57 JimmyZ nom: class Foo { has $.bar; multi method bar is w { $!bar +=2;}; multi method bar is r { $!bar;} }; my $foo = Foo.new; $foo.bar = 4; say $foo.bar; say $foo.bar; # or like this
13:57 p6eval nom: OUTPUT«===SORRY!===␤No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Attribute $attr, Any $rw)␤:(Attribute $attr, Any $readonly)␤:(Routine $r, Any $rw)␤:(Parameter $param, Any $readonly)␤:(Parameter $param, Any $rw)␤:(Parameter $param,…
13:58 JimmyZ class Foo { has $.bar; method bar is w { $!bar +=2;}; method bar is r { $!bar;} }; my $foo = Foo.new; $foo.bar = 4; say $foo.bar; say $foo.bar; # or separate rw
13:58 flussence (I'm trying to follow the code flow in pod2html by doing "proto sub node2html($node) { say $node.WHAT; nextsame }", it doesn't output anything for me though...)
14:07 eiro Maddingue,
14:07 eiro ?
14:07 eiro hello guys. any french people there ?
14:08 eiro cognominal, ?
14:08 sbp je ne pense pas qu'il ya tout peuple français ici. s'il ya des gens français ici, je ne les connais pas. je ne suis pas français, je ne parle le français
14:09 JimmyZ nom: class Foo { has $.bar; multi method bar { $!bar;} ; multi method bar($v=2) is rw { $!bar+=$v;}  }; my $foo = Foo.new;  say $foo.bar; say $foo.bar; # I don't know why it doesn't work
14:09 p6eval nom: OUTPUT«Ambiguous dispatch to multi 'bar'. Ambiguous candidates had signatures:␤:(Foo, Mu %_)␤:(Foo, Any $v, Mu %_)␤␤  in method bar at src/gen/CORE.setting:218␤  in mu <anon> at /tmp/52hABRQVG2:1␤  in mu <anon> at /tmp/52hABRQVG2:1␤␤»
14:11 TimToady you can't use lvalue-ness in multi-dispatch because P6 evaluates lvalue-ness lazily
14:11 TimToady an rw method can only determine identity of the attribute; you have to use a FETCH/STORE proxy if you want separate actions
14:14 JimmyZ TimToady: where is FETCH/STORE proxy speced?
14:15 buubot_backup joined #perl6
14:15 * JimmyZ found http://www.dlugosz.com/Perl6/web/info-model-1.html
14:15 eiro sbp, cognominal Maddingue and i, at least, are french
14:16 sbp merci, maintenant je sais!
14:23 TimToady FETCH/STORE is specced on rw subs in S06, but for a method on an existing object it probably is good enough to mix in a new STORE
14:27 TimToady sorear: does niecza have a way to open binary files yet?
14:32 wolverian hm, perl6.org just stopped responding to me
14:32 TimToady works for me
14:33 wolverian probably my browser being too experimental then.
14:34 uniejo_in_riga joined #perl6
14:41 JimmyZ nom: class Foo { has $.bar;  sub bar($self ) is rw {  my $proxy is Proxy( FETCH => method() {$!bar;},  STORE => method($val) { $!bar+=2; }); return $proxy;  };  }; my $foo = Foo.new;  $foo.bar = 4;  say $foo.bar; say $foo.bar;
14:41 p6eval nom: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
14:42 JimmyZ looks like NYI
14:47 JimmyZ rakudo: class Foo { has $!bar;  method bar() is rw {  my $proxy is Proxy( FETCH => sub ($self) {$!bar;},  STORE => sub ($self, $val) { $!bar+=2; }); return $proxy;  };  }; my $foo = Foo.new;  $foo.bar = 4;  say $foo.bar; say $foo.bar;
14:47 p6eval rakudo a55346: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Routine $r, Any :default($default)!)␤:(Routine $r, Any :rw($rw)!)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤:(Mu $t…
14:50 JimmyZ nom: class Foo { has $!bar;  method bar() is rw {  my $proxy is Proxy( FETCH => sub ($self) {$!bar;},  STORE => sub ($self, $val) { $!bar+=2; }); return $proxy;  };  }; my $foo = Foo.new;  $foo.bar = 4;  say $foo.bar; say $foo.bar;   # TimToady ,  how to make this one working ?
14:50 p6eval nom: OUTPUT«Cannot assign to a non-container␤  in mu <anon> at /tmp/EKljgszTke:1␤  in mu <anon> at /tmp/EKljgszTke:1␤␤»
14:51 TimToady the point of the method is to return the lvalue, not to be a setter
14:52 TimToady nom: class A { has $!thing; method thing() is rw { $!thing but role { method STORE(|$) { say 'altering thing'; nextsame } } } }; given A.new { .thing = 3; say .thing }
14:52 p6eval nom:  ( no output )
14:52 TimToady something like that ought to work, but segfaults currently
14:53 TimToady but I agree with colomon++ that it probably means you're violating Liskov constraints
14:55 JimmyZ Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T?
14:58 TimToady yes, but it depends, of course, on how you define "property"
14:58 TimToady if you define the property of a rectangle that it has *independent* length and width, then square violates it
15:00 xinming joined #perl6
15:03 lateau joined #perl6
15:08 snowy joined #perl6
15:10 lateau_ joined #perl6
15:14 lateau_ left #perl6
15:15 lateau_ joined #perl6
15:17 JimmyZ_ joined #perl6
15:21 * JimmyZ found a good perl 6 book, http://www.dlugosz.com/Perl6/polymorphism.pdf
15:25 wamba joined #perl6
15:38 uniejo__ joined #perl6
15:45 TimToady niecza say 'x'.ord
15:45 TimToady niecza: say 'x'.ord
15:46 p6eval niecza v8-52-g3afe236: OUTPUT«Unhandled exception: Unable to resolve method ord in class Str␤  at /tmp/fzxNn6Xc3F line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1996 (CORE C939_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1997 (CORE module-CORE @…
15:47 jaldhar joined #perl6
15:50 JimmyZ nom: say '+—'.ord
15:50 p6eval nom: OUTPUT«65291␤»
15:50 JimmyZ nom: say '+-'.ord
15:50 p6eval nom: OUTPUT«43␤»
15:51 benabik nom: say '+—'.ord.perl
15:51 p6eval nom: OUTPUT«65291␤»
15:51 benabik Huh.  I would have though that would be a list since there are two characters.
15:52 lateau_ joined #perl6
15:57 TimToady you need .ords for that
15:57 TimToady nom: say '+—'.ords.perl
15:57 p6eval nom: OUTPUT«(65291, 8212).list␤»
15:58 benabik So Str.ord always does the first character, ords is .map {.ord}
16:01 lateau_ left #perl6
16:04 TimToady well, .comb.map
16:07 JimmyZ nom: say '+-'.comb.map: *.say;
16:07 p6eval nom: OUTPUT«*␤Method 'count' not found for invocant of class 'Bool'␤  in method reify at src/gen/CORE.setting:3556␤  in method reify at src/gen/CORE.setting:3461␤  in method reify at src/gen/CORE.setting:3461␤  in method gimme at src/gen/CORE.setting:3798␤  in method eager at src/gen/CO…
16:15 jaldhar joined #perl6
16:16 TimToady rakudo: '+-'.comb.map: *.say;
16:16 p6eval rakudo a55346:  ( no output )
16:16 TimToady hmm
16:17 TimToady rakudo: '+-'.comb.perl.say
16:17 silug_ joined #perl6
16:17 p6eval rakudo a55346: OUTPUT«("+", "-")␤»
16:17 TimToady rakudo: say '+-'.comb.map: *.ord;
16:17 p6eval rakudo a55346: OUTPUT«4345␤»
16:18 TimToady nom: say '+-'.comb.map: *.ord;
16:18 p6eval nom: OUTPUT«Method 'ord' not found for invocant of class 'Whatever'␤  in mu <anon> at /tmp/E87EqJKj2Q:1␤  in mu <anon> at /tmp/E87EqJKj2Q:1␤␤»
16:18 JimmyZ rakudo: say '+-'.comb.map: *.say;
16:18 p6eval rakudo a55346: OUTPUT«+␤Bool::True-␤Bool::True␤»
16:21 jaldhar joined #perl6
16:21 jaldhar joined #perl6
16:26 tadzik moritz: ping
16:28 tadzik moritz: I explained http://i.imgur.com/dhljt.png with Damian, I know see what he meaned. Fixing tests and will probably clarify a spec after that too
16:30 cognominal eiro: you can count masak as French as well. He writes «raison d'être» without messeing the diacritic
16:45 lateau_ joined #perl6
16:50 lateau_ left #perl6
16:52 MayDaniel joined #perl6
17:06 wooden joined #perl6
17:16 TimToady I can write raison d'être too but that does not make me French, except in the sense that everyone is Irish on St Patrick's Day.  :)
17:19 pmichaud_ bonjour, #perl6
17:19 jaldhar joined #perl6
17:19 cognominal :)
17:22 tadzik dzień dobry pmichaud
17:23 TimToady pmichaud: o/, kind of a pity we have to go halfway around the world to see each other :)
17:24 pmichaud TimToady: indeed.  But it's definitely worth the trip.
17:24 pmichaud and Riga was a pleasant surprise.
17:25 cognominal did you have time to see the art nouveau architecture?
17:26 pmichaud I think we all saw a fair bit of architecture from many periods.  :)
17:26 pmichaud (I guess I should say "in many styles")
17:27 TimToady Glo and I visited the art nouveau district on Thursday
17:32 jaldhar joined #perl6
17:33 supernovus joined #perl6
17:41 jaldhar joined #perl6
17:46 jaldhar joined #perl6
17:46 eiro cognominal, right
17:47 eiro cognominal, we really have to interview perl6 community if we want to market it correctly in france. i think cat's idea is basically bad
17:53 dalek rakudo/nom: 484052a | tadzik++ | / (4 files):
17:53 dalek rakudo/nom: Fix implicit code blocks detection
17:53 dalek rakudo/nom:
17:53 dalek rakudo/nom: Paragraph and abbreviated blocks set VMARGIN not only for their
17:53 dalek rakudo/nom: contents, but for all the upcoming Pod as well. This fixes the behaviour
17:53 dalek rakudo/nom: and tests, and also adds a new test taken straight from S26.
17:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/484052a3bf
17:53 cognominal eiro, I don't know what cat's idea is  :)  or who he is.
17:54 tadzik a commit with long commit message suddenly feels so serious
17:56 eiro cognominal, you know: write a complete brunch of articles without any real world experience
17:56 eiro i feel we have to level up our perl6 skills before showing perl6 off
17:57 tadzik nope :)
17:57 uniejo_in_riga joined #perl6
17:57 eiro tadzik, is this nope for me ?
17:57 tadzik if only the Perl 6 experts advertised Perl 6, we'll not have much marketing working
17:58 eiro tadzik, ok: i already replied to this on the french ml :) i really have to post about it :)
17:58 tadzik eiro: what's on the french ml>?
17:59 eiro but basically: french people outside the community see perl6 as a conceptual, useless toy
17:59 tadzik that's not a french-specific problem I suppose
17:59 eiro if we want to market, we have to market with a "this is for real"
17:59 eiro tadzik, french ml -> french mailing list
17:59 tadzik and the solution for that is "look, we are building useful tools with Perl 6"
18:00 tadzik eiro: yes, I know, but what's the email on it? :)
18:00 eiro hmm ... perl@mongueurs.net
18:00 eiro tadzik, but we don't
18:00 eiro afaik
18:00 thowe Doesn't that require actually having a complete, mature, useful tool to point at when saying "look"?
18:01 tadzik okay, I fail to follow. Is there a certain email on perl@mongueurs.net criticising Perl 6, saying that it's a useless toy?
18:01 pmichaud there was a time when linux wasn't mature, but people still used it and talked about it
18:01 pmichaud even as others criticized it for being a toy
18:01 eiro ok stop
18:01 thowe I'm excited about it, and I don't even have a working rakudo atm.
18:02 cognominal eiro, I think the big problem was early adopter attrition for lack of visisbility of what is really working :  http://perl6.org/compilers/features
18:02 tadzik does any of masak++'s presentation softwares run on Perl 6?
18:02 eiro the other pb is: we have no strong experience with perl6. if users come with questions, we'll be screwes
18:02 tadzik I see
18:02 eiro i definitly have to blog on this
18:03 cognominal with the matrix, exceptations will be more realistic
18:03 eiro because i really don't want us to fuck the perl6 marketing up
18:03 tadzik if any does, we should make a propaganda blogpost about it. If none does, I'll write a presentation software this week, make it awesome, release it, blog about it, and hopefully shut someone's mouth up
18:03 eiro examples i said on the mailing list:
18:04 eiro - where are the perl6 Dancer, DBI, ORM ?
18:04 eiro - what about concurrency in perl ?
18:04 eiro (perl6)
18:04 cognominal eiro,  web from masak need some love
18:04 cognominal but that's a start
18:04 pmichaud just because Perl 6 doesn't (yet) have all of the features of Perl 5 doesn't make it useless.
18:05 cognominal https://github.com/masak/web/
18:05 eiro cognominal, that's what i said on the ml: don't write articles: write code! help to improve existing tools
18:05 tadzik oh, the chicken-egg problem. Yeah, as long as the Top Class Perl 5 module writers won't start writing Perl 6 modules, we won't have all of the best modules
18:05 eiro we will be more credible when we will write articles
18:05 tadzik unless we bring blizkost to the state of running those
18:05 cognominal I have not read the thread yet.
18:05 eiro (because perl6 will be more credible and because authors will have real experience)
18:06 eiro i failed to miss my most important point of view
18:06 tadzik okay people, idea
18:06 tadzik we gather all Perl 6 projects we currently have, those usable for a wider public
18:07 eiro it's not about perl6, it's about our credibility as perl6 articles writer
18:07 pmichaud .oO( modules.perl6.org ? )
18:07 tadzik we write a series of blogposts under a label of "awesome Perl 6", or "real-world Perl 6", or whatever
18:07 eiro (i mean: french people)
18:08 tadzik pmichaud: I mean something that a non-perl6 people can clearly appreciate
18:08 tadzik maybe that means "ready to run apps"
18:08 eiro real-world-perl6 is definitly what i want to do
18:08 tadzik psyde, the one running strangelyconsistent.org may be one of them
18:08 pmichaud tadzik: "ready to run apps" wouldn't belong in modules.perl6.org ?
18:08 eiro because "real world" is the key to save us from 10 years of expectations and frustration
18:08 pmichaud in cpan (perl5), there's the entire App:: space
18:09 tadzik pmichaud: they would. But I have a feeling we need more than plain modules.perl6.org to advertise them
18:10 pmichaud for advertising them, yes.  but perhaps the answer is to simply write posts about the modules that are already there.
18:10 tadzik true
18:10 pmichaud for that matter, I don't know that there's been a post about modules.perl6.org itself, or about panda.
18:11 pmichaud (perhaps there has and I just don't recall it atm... my brane is still a little lagged)
18:11 tadzik you mean an advent calendar post?
18:11 pmichaud any sort of blog post
18:12 tadzik maybe
18:12 thowe For the type of semi-skilled developer and user that will account for 90% of the buzz about anything a real application has its own web site with docs and bug tracking and some kind of indication that it is working and being worked on.
18:12 tadzik okay, I'm writing a presentation software
18:12 pmichaud I guess there's http://ttjjss.wordpress.com/2011/04/18/news-from-the-modules-world/
18:13 pmichaud alas, neither "perl6" nor "panda" appear in the title :-)
18:13 tadzik :)
18:13 tadzik I have a feeling that my new blag theme is not as readable as it could be
18:21 revdiablo joined #perl6
18:21 revdiablo joined #perl6
18:22 pmichaud once again, p6l goes awry.   (re: hijacked thread to oddly complain about a likely misunderstanding of .?, .*, .+ )
18:28 pmichaud afk, lunch
18:29 eiro good appetite
18:29 eiro thanks for replying, all
18:30 jaldhar joined #perl6
18:31 jaldhar joined #perl6
18:32 jaldhar joined #perl6
18:34 alim joined #perl6
18:36 wamba joined #perl6
18:45 mj41 joined #perl6
18:49 birdwindupbird joined #perl6
19:05 wamba joined #perl6
19:05 tadzik Method 'rxtype' not found for invocant of class 'Integer' -- does that sound familiar to you nom users?
19:06 benabik Sounds like an Integer made its way into the regex engine.
19:06 tadzik Oh, we don't have code in regexes yet, do we
19:07 tadzik nom: my $a = "foo"; $a ~~ s:g/(.)/{ $1 x 5 }/;
19:07 p6eval nom:  ( no output )
19:07 tadzik nom: my $a = "foo"; $a ~~ s:g/(.)/{ $1 x 5 }/; say 'alive'
19:07 p6eval nom: OUTPUT«alive␤»
19:07 tadzik hrm
19:07 tadzik nom: my $a = "foo"; $a ~~ s:g/(.)/{ $1 x 5 }/; say $a
19:07 p6eval nom: OUTPUT«␤»
19:07 Mowah joined #perl6
19:09 tadzik nom: my $line = "foo   bar"; $line ~~ s:g/( +)/{"\xa0" x $1.Str.chars}/; say $line.perl
19:09 p6eval nom: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'Integer'␤»
19:09 tadzik yeah
19:10 tadzik nom: my $line = "foo   bar"; $line ~~ s:g/ /"\xa0"/; say $line.perl
19:10 p6eval nom: OUTPUT«"\" \"f\" \"o\" \"o\" \" \" \" \" \" \" \"b\" \"a\" \"r\" \""␤»
19:10 tadzik nom: my $line = "foo   bar"; $line ~~ s:g/' '/"\xa0"/; say $line.perl
19:10 p6eval nom: OUTPUT«"foo\" \"\" \"\" \"bar"␤»
19:10 tadzik nom: my $line = "foo   bar"; $line ~~ s:g/' '/\xa0/; say $line.perl
19:10 p6eval nom: OUTPUT«"foo   bar"␤»
19:10 tadzik okay
19:11 Mowah left #perl6
19:15 uniejo__ joined #perl6
19:19 sorear TimToady: no
19:20 sorear TimToady: (to: does Niecza have a way to open binary files yet?)
19:20 sorear good * #perl6
19:30 dalek rakudo/nom: 2d2ff44 | tadzik++ | src/core/IO.pm:
19:30 dalek rakudo/nom: Implement cwd()
19:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2d2ff441da
19:35 im2ee joined #perl6
19:57 benabik There's a weird error.  Building nom's grammar: Lossy conversion to single byte encoding
20:10 dalek nqp: 9ba57ef | benabik++ | tools/build/Makefile.in:
20:10 dalek nqp: Makefile: use MKPATH to make all needed paths
20:10 dalek nqp:
20:10 dalek nqp: While PARROT_LIBRARY_DIR may exist, it may not exist inside DESTDIR.
20:10 dalek nqp: For example when building for a package manager (even one so simple as
20:10 dalek nqp: stow).
20:10 dalek nqp:
20:10 dalek nqp: This commit adds the missing MKPATH for PARROT_LIBRARY_DIR and also
20:10 dalek nqp: moves the one for NQP_LANG_DIR/lib to immediately before the files
20:10 dalek nqp: installed into it.
20:10 dalek nqp: review: https://github.com/perl6/nqp/commit/9ba57efaa2
20:10 dalek nqp: babcf34 | moritz++ | tools/build/Makefile.in:
20:10 dalek nqp: Merge pull request #21 from Benabik/master
20:10 dalek nqp:
20:10 dalek nqp: use MKPATH for PARROT_LIBRARY_DIR
20:10 dalek nqp: review: https://github.com/perl6/nqp/commit/babcf3415d
20:20 mberends joined #perl6
20:21 pmichaud that's a weird patch.
20:22 pmichaud oh, maybe not.
20:22 pmichaud okay +1
20:22 pmichaud benabik++
20:22 * tadzik bisects broken main
20:22 benabik pmichaud: I install things into stow directories…  /usr/local/stow/nqp/lib/parrot didn't exist for some reason.  :-D
20:23 wolverian stow++ # indeed
20:23 benabik (Actually it's worse than that, as I install into a temp directory and move the results into stow…  but that's a minor detail.)
20:23 pmichaud benabik: yes, your analysis of the problem and fix looks correct to me... at least it's more correcter than it was
20:28 MayDaniel joined #perl6
20:31 Chat3878 joined #perl6
20:31 Chat3878 yo
20:32 tadzik does anyone have a pre-3.7.0-parrot still installed?
20:33 benabik tadzik: It shouldn't take terribly long for me to re-install 3.6.
20:33 sftp_ joined #perl6
20:33 tadzik benabik: I'm tracking down the MAIN regression, and I just wonder if it may be Parrot's fault
20:35 benabik tadzik: How can I help?
20:36 tadzik benabik: could you build Parrot 3.6, then any pre-3.7 nom on top of that, then see if a simple MAIN sub works?
20:36 tadzik I'll continue to bisect it
20:36 benabik tadzik: Will do.  3.6 building now.
20:37 tadzik thanks
20:42 moritz tadzik: did MAIN ever work for you in nom?
20:42 mj41 joined #perl6
20:42 * moritz might have messed it up right before the commit, or something
20:43 TimToady as far as I know MI
20:43 TimToady MAIN has never worked in nom
20:43 TimToady s/ MI/,/
20:44 TimToady it's red in features
20:44 tadzik moritz: yes
20:44 * moritz -> sleep
20:45 tadzik g'night moritz
20:45 tadzik (or at least I remember it working)
20:46 * tadzik checks out the commit that introduced MAIN
20:51 coregateFX joined #perl6
20:59 abercrombie joined #perl6
20:59 tadzik okay, that commit made MAIN work
21:00 tadzik benabik: it's not Parrot's fault apparently
21:00 benabik tadzik: Alrighty…  I had gotten most of the way through compiling Rakudo.  :-D
21:00 tadzik approx 5 revisions yet to test, so I should have a result in like an hour from now :)
21:06 uniejo_in_riga joined #perl6
21:07 uniejo_in_riga joined #perl6
21:08 uniejo_ joined #perl6
21:10 uniejo_ joined #perl6
21:11 maja joined #perl6
21:16 maja joined #perl6
21:24 lue hello planet o/
21:24 benabik Anyone know what "Lossy conversion to single byte encoding" means when building nom? https://gist.github.com/1159684
21:26 tadzik huh, no idea
21:30 lue my *guess* would be some sort of problem with character encoding of the file itself. Beyond that I don't know.
21:30 flussence what's the output of `locale`?
21:31 benabik en_US.UTF-8, although LC_ALL is blank.
21:31 flussence hm, that's not causing it then at least
21:32 benabik Hm.  It appears to be when compiling perl6-grammar.pir…  I guess this might be best addressed to #parrot.
21:41 Canaimero-15d3 joined #perl6
21:41 im2ee_ joined #perl6
21:42 Canaimero-15d3 BUENAS TARDES !!
21:43 Canaimero-15d3 ALGUIEN SABE COMO INSTALO EL CENTRO DE DESCARGA ??
21:43 tadzik No comprendo espanol, senor
21:44 benabik Google translate says: "ANYONE know how to install the Download Center?"
21:44 Canaimero-15d3 YA OK SPEAK ENGLISH??
21:44 tadzik YA OK TO WRITE LOWERCASE LETTERS??!!
21:45 Psyche^ joined #perl6
21:45 Canaimero-15d3 INSTALLER THE DOWNLOAD CENTER PLEES IN CANAIMA
21:45 Canaimero-15d3 ??
21:45 tadzik sigh
21:46 benabik I think this is the wrong channel.
21:47 Canaimero-15d3 left #perl6
21:47 tadzik maybe he meant "panda" as a "download center for Perl 6 modules"
21:47 tadzik although voices in my head told me this is not the solution he's looking for
21:48 tadzik apparently, Canaima is a Linux Distribution
21:56 sorear wait, Perl 6, "OO done right"?
22:02 skangas joined #perl6
22:04 benabik Discovered why nobody else had gotten the encoding error:  I had my branch of parrot installed.  Now, I have no idea why it would have caused that error...
22:12 drbean joined #perl6
22:14 wamba joined #perl6
22:19 tadzik ac51b44fa7c9098f70b803fb449ce9f0b2524472 is the first bad commit
22:19 tadzik not so superfluous it seems :)
22:19 lue The first commit to break MAIN?
22:20 tadzik yes
22:25 benabik $mainline.push(PAST::Op.new(…, $mainline)
22:25 benabik That looks wrong.
22:26 tadzik truly
22:26 tadzik I shall investigate
22:26 Psyche^ joined #perl6
22:26 tadzik and I can imagine why it causes some errors where /recursion/
22:37 soh_cah_toa joined #perl6
22:42 jaldhar joined #perl6
22:42 tadzik methinks I fixed that
22:43 lue ooh!
22:56 Psyche^ joined #perl6
22:58 tadzik damn, it took me 2.5 hours to bisect this one
22:59 jaldhar joined #perl6
23:02 bluescreen10 joined #perl6
23:02 flussence ok, I can't be bothered waiting for this specgraph thing any more, time to break out the use threads;
23:03 jaldhar joined #perl6
23:05 jaldhar joined #perl6
23:05 tadzik I didn't bother to spectest this, pardon me
23:05 dalek rakudo/nom: c05ba3a | tadzik++ | src/Perl6/Actions.pm:
23:05 dalek rakudo/nom: Fix MAIN regression
23:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c05ba3a469
23:06 TiMBuS joined #perl6
23:06 orafu joined #perl6
23:08 benabik tadzik++ # Patiently bisecting a problem
23:10 sivoais joined #perl6
23:19 TiMBuS joined #perl6
23:19 sivoais joined #perl6
23:22 * flussence wonders whether it'd be quicker to compile a single revision at a time than fix the dependency hell I've gotten my system into now...
23:23 Moukeddar joined #perl6
23:51 benabik There's a strange sub name…  "special_variable:sym<Capture[0x4b020388]>"

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

Perl 6 | Reference Documentation | Rakudo