Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-05-19

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 jaldhar joined #perl6
00:19 tyatpi joined #perl6
00:33 wolfman2000 joined #perl6
00:40 xinming joined #perl6
00:42 spaceships joined #perl6
00:49 spaceships joined #perl6
00:50 s1n joined #perl6
00:53 Chillance joined #perl6
01:10 araujo joined #perl6
01:10 araujo joined #perl6
02:19 wolf2k_away joined #perl6
02:23 tyatpi joined #perl6
02:24 orafu joined #perl6
02:54 leprevost joined #perl6
02:57 * [Coke] finally gets home and can read backscroll.
03:04 [Coke] ... and that wasn't as interesting as he had hoped. ah well. ;)
03:29 [Coke] what do I do if I want to install rakudo AND gen parrot?
03:30 [Coke] (somewhere not the default)
03:30 sorear o/ [Coke]
03:43 [Coke] ~~
04:01 localhost joined #perl6
04:09 mikemol joined #perl6
04:21 jaldhar joined #perl6
04:29 jaldhar joined #perl6
04:29 sftp joined #perl6
04:45 tyatpi joined #perl6
04:55 kaare_ joined #perl6
04:58 lestrrat joined #perl6
05:05 lestrrat joined #perl6
05:21 lestrrat joined #perl6
05:24 birdwindupbird joined #perl6
05:28 moritz r: say ('1a' ... *)[^5]
05:28 p6eval rakudo 45679a: OUTPUT«1a 1b 1c 1d 1e␤»
05:28 moritz r: say ('1a', '1b' ... *)[^5]
05:28 p6eval rakudo 45679a: OUTPUT«Cannot convert string to number: trailing characters after number in '1⏏b' (indicated by ⏏)␤  in method Numeric at src/gen/CORE.setting:9058␤  in sub infix:<-> at src/gen/CORE.setting:2381␤  in sub infix:<-> at src/gen/CORE.setting:2381␤  in block <anon> at src/gen…
05:35 lestrrat joined #perl6
05:38 sisar joined #perl6
05:43 moritz r: my $x = 4 + 2i; say $x.clone(re => 5)
05:43 p6eval rakudo 45679a: OUTPUT«Cannot assign to a non-container␤  in method clone at src/gen/CORE.setting:763␤  in block <anon> at /tmp/rwbH4rRPP8:1␤␤»
05:43 moritz r: my $x = 4 + 2i; $x = 5 + i * $x.im; say $x
05:43 p6eval rakudo 45679a: OUTPUT«5+2i␤»
05:47 shevy joined #perl6
05:56 shevy left #perl6
06:35 moritz p6: say ('e', 'd' ... 'a')
06:35 p6eval rakudo 45679a, niecza v17-12-g8b5d5e7: OUTPUT«e d c b a␤»
06:35 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "'"␤    expecting operator or ")"␤    at /tmp/ZiHjeJTh5c line 1, column 19␤»
06:57 dalek book: 36caba6 | moritz++ | src/regexes.pod:
06:57 dalek book: [regex] update ** separator syntax to use % instead
06:57 dalek book: review: https://github.com/perl6/book/commit/36caba63af
07:32 tadzik good morning
07:32 phenny tadzik: 18 May 18:50Z <moritz> tell tadzik that panda's copy of JSON::Tiny needs the same fixes as upstream JSON::Tiny
07:35 sisar joined #perl6
07:36 sisar moritz++ #replying to my email !
07:40 sisar from Wikipedia: "In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created." What is 'state' of an object?
07:54 sorear the current values of fields
07:55 sorear it's a rather primitive concept; if you want a proper explanation, I'll need to detour into operational semantics
07:58 pernatiy joined #perl6
08:01 Woodi what is operational semantics ? :)
08:01 Woodi morning everyone :)
08:05 dalek book: bda5a7f | moritz++ | src/grammars.pod:
08:05 dalek book: [grammar] update to new % regex separator syntax
08:05 dalek book: review: https://github.com/perl6/book/commit/bda5a7fd9c
08:10 hundskatt joined #perl6
08:21 cognominal joined #perl6
08:23 cognominal joined #perl6
08:51 moritz has anybody planned to make 2012.05 star release?
09:23 cognominal joined #perl6
09:27 NamelessTee joined #perl6
09:32 sergot joined #perl6
09:32 sergot gi o/
09:32 sergot hi*
09:38 sorear o/
09:38 sorear Woodi: I don't know of a short explanation
09:44 moritz r: my $x = 1 < 2 ?? *.succ !! *.pred; say $x(5)
09:44 p6eval rakudo 45679a: OUTPUT«6␤»
09:51 Woodi during BEGIN I do HOW.add_method, is it possible to move this creation to compile time ?
09:52 moritz erm, BEGIN  *is* at compile time
09:53 Woodi oo, ok :)
09:53 moritz r: BEGIN say 'oh hai'; 1 1
09:53 p6eval rakudo 45679a: OUTPUT«oh hai␤===SORRY!===␤Confused␤at /tmp/33BOJEfdnl:1␤»
09:54 moritz you see that it executes the BEGIN block before it even tries to parse the text after it
09:54 Woodi but BEGIN is executed during precompilation, right ?
09:55 moritz sure
10:06 Woodi r: constant %h = { 'a' => 1 }
10:06 p6eval rakudo 45679a:  ( no output )
10:06 Woodi r: constant %h = { 'a' => 1 }; %h.perl
10:06 p6eval rakudo 45679a:  ( no output )
10:06 Woodi r: constant %h = { 'a' => 1 }; say %h.perl
10:06 p6eval rakudo 45679a: OUTPUT«{"a" => 1}␤»
10:07 zby_home_ joined #perl6
10:09 sorear sleep&
10:09 goraki joined #perl6
10:11 goraki joined #perl6
10:12 moritz close to where I live, there's a job opening as "open source world saviour". I wonder if Ii should apply as "Wielder of the Swiss Army Chain Saw +12" :-)
10:12 whiteknight joined #perl6
10:12 [hds] joined #perl6
10:15 [hds] morning 6s.
10:15 moritz helo [hds]
10:15 sisar joined #perl6
10:24 Woodi methods can have methods ?
10:24 Woodi perl6: class A { method b { method c { say 'c' }; self.c  } }; my $a = A.new; $a.b
10:24 p6eval niecza v17-12-g8b5d5e7: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Methods must be used in some kind of package at /tmp/wXMlx2OXl3 line 1:â�¤------> [32mclass A { method b { method c [33mâ��[31m{ say 'c' }; self.c  } }; my $a = A.new;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval…
10:24 p6eval ..pugs, rakudo 45679a: OUTPUT«c␤»
10:33 fridim_ joined #perl6
10:52 spider-mario joined #perl6
11:13 JimmyZ_ joined #perl6
11:15 JimmyZ_ joined #perl6
11:18 JimmyZ_ joined #perl6
11:22 JimmyZ_ joined #perl6
11:25 xinming_ joined #perl6
11:26 mdupont joined #perl6
11:28 JimmyZ__ joined #perl6
11:47 JimmyZ_ joined #perl6
11:49 snearch joined #perl6
11:53 felher How do i compile an run a perl6 program with nom? I tried "nom --target=pir main.pl > main.pir" and then "parrot main.pir", but i get "Missing or wrong version of dependency 'src/Perl6/World.pm". Maybe i have to set some include path?
11:54 felher Oh, i actually tried "~/sources/perl6/rakudo_nom/install/bin/parrot main.pir"
11:55 moritz felher: I think you can only precompile modules right now, not scripts
11:56 felher moritz: oh, okay. How do i do that? Also "nom --target=pir module.pm > module.pir"? And will they be used by nom automatically?
12:01 felher Hm... No, it doesn't seem to be that easy :)
12:07 mdupont joined #perl6
12:11 JimmyZ__ joined #perl6
12:11 moritz perl6 --target=pir --output=module.pir module.pm
12:11 moritz and it's used automatically
12:12 moritz if module.pir is in path, and has a newer timestamp than the .pm file, iirc
12:26 felher moritz++
12:26 felher awesome.
12:26 felher from 6s down to 2s startup time :)
12:28 moritz felher: https://github.com/masak/ufo writes makefiles for you that help you with precompilation
12:30 felher moritz: thnx :) The program is to be used in half an hour, so i'll check that out later :)
12:31 moritz felher: be sure to read the README when you have a few spare minutes
12:31 moritz :-)
12:32 felher moritz: okay. I will :)
12:32 * felher -> afk
12:56 janosik joined #perl6
13:02 NamelessTee joined #perl6
13:03 Chillance joined #perl6
13:06 Psyche^ joined #perl6
13:10 mikemol joined #perl6
13:46 vinian joined #perl6
14:03 uniejo joined #perl6
14:04 uniejo joined #perl6
14:07 gfldex masak: i think that would be nice for a challenge: http://www.blogcdn.com/www.engadget.com/media/2012/04/qlocktwo-w.jpg
14:08 explorer_ joined #perl6
14:14 dalek rakudo/nom: 5f7d68e | kboga++ | src/core/Str.pm:
14:14 dalek rakudo/nom: Removes duplicated fullwidth digits in rangechar (oops, kboga--)
14:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5f7d68ed57
14:49 daemon joined #perl6
15:21 icwiener joined #perl6
15:53 sftp joined #perl6
15:54 sjohnson joined #perl6
15:56 sisar joined #perl6
16:14 pat_js joined #perl6
16:32 NamelessTee joined #perl6
16:43 s1n joined #perl6
16:45 gfldex joined #perl6
16:50 lichtkind joined #perl6
16:51 PacoAir joined #perl6
16:51 lichtkind it is possible to use zero with assertion in regex jus with |c and without angle brackets?
16:52 moritz no
16:52 moritz |c would be parsed as an alternative
16:57 sergot joined #perl6
16:57 sergot hi o/
16:59 dalek tablets: fe8092e | (Herbert Breunung)++ | docs/appendix- (3 files):
16:59 dalek tablets: linking and explaining the cookbook appendix
16:59 dalek tablets: review: https://github.com/perl6/tablets/commit/fe8092ee48
17:04 s1n joined #perl6
17:10 lichtkind moritz: thank you
17:14 plobsing joined #perl6
17:16 brrt joined #perl6
17:26 dalek tablets: 4a4e9ef | (Herbert Breunung)++ | docs/appendix- (2 files):
17:26 dalek tablets: calarify escape symbol pipe; moritz++
17:26 dalek tablets: review: https://github.com/perl6/tablets/commit/4a4e9ef89d
17:26 thou joined #perl6
17:32 lichtkind hai sergot
17:36 mucker joined #perl6
17:47 sisar masak: what happened to the Userdocs For Christmas project ?
17:49 moritz sisar: there are a few files in the docs/u4x directory in the mu repo
17:49 * sisar looks
17:49 moritz it's what is rendered on http://doc.perl6.org/ iirc
17:57 * sisar feels sad at the sorry state of perl6 documentation
17:58 * moritz too
17:58 birdwindupbird joined #perl6
17:59 moritz the only constant-ish doc effort is lichtkind++'s tablets, and I think those are pretty low priority in the overall picture of what kind of docs we need
18:02 sisar :(
18:05 * sisar quit
18:28 spider-mario I am rather satisfied by http://perlcabal.org/syn/
18:38 sisar joined #perl6
18:40 lichtkind moritz: what kind you think we need?
18:40 moritz lichtkind: perldoc style docs and books
18:41 lichtkind moritz: the actual tablets are much more perldoc style then the appendices
18:43 s1n joined #perl6
18:44 sorear good * #perl6
18:44 colomon o/
19:00 havenn joined #perl6
19:06 moritz lichtkind: got an example?
19:11 lichtkind moritz: http://tablets.perl6.org/tablet-2-basic-syntax.html has a bit content
19:17 colomon hmmm, Labenslust Polka is taking a long time to convert... bug or disturbingly complex polka?
19:23 s1n joined #perl6
19:23 moritz not "Lebenslust"?
19:29 Woodi I got: Cannot call 'trait_mod:<is>'; none of these signatures match: ...  when trying to subclass. what it means ?
19:31 gfldex Woodi: can you gist the code in question?
19:32 moritz Woodi: probably that the parent class isn't known as a type name
19:32 colomon moritz: spelling is due to my great-great-grandfather.  or possibly I just have trouble reading his handwriting.  ;)
19:33 moritz phenny: "lebenslust"?
19:33 phenny moritz: "lebenslust" (de to en, translate.google.com)
19:33 moritz erm
19:33 moritz I'd translate it as "joy of living"
19:33 gfldex "love of life" according to dict.leo.org
19:34 Woodi gfldex: cannot gist probably, it appears on use Module;
19:35 gfldex or "lust for life"
19:35 gfldex the meaning is slightly off in both cases tho
19:35 moritz r: class A { }; class B is A::X { }
19:35 p6eval rakudo 5f7d68: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Attribute:D $attr, :rw(:$rw)!)␤:(Attribute:D $attr, :readonly(:$readonly)!)␤:(Attribute:D $attr, :box_target(:$box_target)!)␤:(Routine:D $r, :rw(:$rw)!)␤:(Rout…
19:35 moritz Woodi: like that?
19:36 gfldex Woodi: are you sure the module path is in @*INC?
19:37 Woodi use Class; in Subclass movet to next problem :)
19:38 Woodi yes, libs are ok
19:38 Woodi hmm, $!priv is not accesible in subclass ?
19:39 moritz of course not
19:39 moritz anybody can subclass your classes
19:39 moritz giving them access to your privates just because they declare themselves your children wouldn't be good encapsulation
19:41 Woodi not sure
19:41 Woodi but if it is that way then ok
19:41 moritz it's OK not to be sure; I'm sure for you too :-)
19:42 Woodi I think it limits code reuse... childrens classes are not quite aliens for me
19:42 moritz well, you can still create public accessors
19:43 Woodi public fields are for code outside hierarchy...
19:43 Woodi just thinking...
19:43 moritz I don't see the point
19:44 moritz everybody who uses your code must stick to its API
19:44 moritz what's the point in having two public but different APIs, one for inheritance, one for usage?
19:45 Woodi for me subclassing is just like write all code in class from the start, parents are just to share parts for siblings
19:46 moritz what's the point in forcing somebody to subclass to just to give them access to certain features?
19:46 moritz Woodi: but that is bad encapsulation
19:46 Woodi encapsulations is for thing out of hierarchy
19:46 moritz Woodi: encapsulation means respecting boundaries, not just acting as if stuff was copied & pasted
19:46 moritz no
19:46 moritz encapsulation is for your own sanity
19:47 moritz there's no need to limit your sanity when talking about subclassing
19:48 Woodi I am just in case I need parent as 'code inlining' :)
19:48 Woodi just want add few methods nothing more
19:51 Woodi eg. making field with socket public break encapsulation. or makes better design maybe, do not know
20:04 havenn joined #perl6
20:15 havenn left #perl6
20:18 dalek tablets: 21e6fa9 | moritz++ | docs/tablet-2-basic-syntax.txt:
20:18 dalek tablets: explain .gist
20:18 dalek tablets: review: https://github.com/perl6/tablets/commit/21e6fa93d0
20:32 adu joined #perl6
20:36 cognominal joined #perl6
20:39 colomon sorear: Let my ABC program run on a big file, and got this result: https://gist.github.com/2732306
20:46 sorear colomon: that would be an out-of-memory error.
20:46 colomon ah
20:47 colomon using incredible amounts of memory would probably also explain why it's so slow.
20:50 colomon I think it may be time to rip out some long-standing ABC code which appears to be wildly inefficient.  :)
20:59 adu ok
21:00 adu I finally uploaded it
21:02 sergot good night o/ !
21:18 s1n joined #perl6
21:25 benabik joined #perl6
21:39 s1n joined #perl6
21:41 kboga joined #perl6
22:02 adu joined #perl6
22:06 s1n joined #perl6
22:06 REPLeffect joined #perl6
22:08 adu I keep getting "Unable to obtain PAST from Regex;Match"
22:15 geistteufel joined #perl6
22:17 colomon joined #perl6
22:20 adu I'm really confused
22:20 * colomon backlogs
22:20 adu colomon: you're not going to find much
22:20 adu I've been talking to myself
22:20 colomon aduI keep getting "Unable to obtain PAST from Regex;Match"
22:21 colomon yeah
22:21 colomon I'm afraid I won't be much help with PAST issues.
22:22 * colomon may also be called away to do work; officially he is volunteering at the Folk Society Concert this evening.  But the only thing going on right now is soundchecking the feature performer.
22:22 adu https://github.com/andydude/dreme/blob/master/src/Dreme/Datum/Actions.pm
22:23 colomon Do you know where the error is happening?
22:23 adu colomon: well, almost all inputs give that
22:23 colomon huh
22:23 adu except "#[say #t]"
22:23 adu which I think I've handled correctly
22:24 adu but it says "Could not find sub sbuiltin_abuiltin_ybuiltin_"
22:24 adu so I don't think it's correct
22:26 colomon What is your grammar?
22:26 adu https://github.com/andydude/dreme/blob/master/src/Scheme/Datum.pm
22:28 colomon Have you tried testing it without the HLL:: uses?
22:29 adu yes, and I can't figure out how to use HLL::Compiler from rakudo
22:29 colomon excuse me, checking out CDs for sale
22:30 adu do you mean 'is's?
22:37 colomon yes
22:37 colomon personally, I don't know what HLL::Compiler does
22:37 colomon if you can get it working without that stuff, then it's just a matter of figuring out how to make HLL::Compiler work.  If you know what I mean.
22:39 adu when I test without HLL::Compiler I usually test without the actions, and so my problem is that the grammar is all I know how to write
22:39 adu HLL::Compiler is not very well documented, so I don't know what it does either
22:40 adu but I do know that all you need to do is build a PAST in your Actions, and HLL::Compiler can convert that to PIR
22:40 colomon I think most of the people who know how to do that are asleep right now.
22:41 adu hmm
22:42 jaldhar joined #perl6
22:57 colomon sorear: think I just eliminated two parses on each note processed.  I'm hoping that will help my speed a bit.  :)
23:11 colomon errr, no, that didn't help at all.  darn it, parses are fast in niecza.
23:12 lichtkind good night
23:12 lichtkind o/
23:20 aindilis joined #perl6
23:36 glen_ joined #perl6
23:36 glen_ hi there
23:36 glen_ eeee
23:37 colomon o/
23:37 colomon whoops, too late.
23:48 * araujo greets around
23:48 * araujo goes testing the json module
23:48 NamelessTee joined #perl6
23:50 tadzik good late-evening
23:51 colomon o/
23:52 colomon anyone know a fast p6 way of figuring out if a number is a power of two?
23:53 adu joined #perl6
23:55 Timbus can p6 do bitwise stuff
23:56 tadzik yes
23:57 gfldex biwise operators: http://perlcabal.org/syn/S03.html#line_828
23:58 Timbus just found that. ty
23:58 flussence r: for ^10 { my $npot = ?$^i.fmt('%b').flip.chop.index('1'); say "$^i -> $npot" }
23:58 p6eval rakudo 5f7d68: OUTPUT«0 -> False␤1 -> False␤2 -> False␤3 -> False␤4 -> False␤5 -> False␤6 -> True␤7 -> False␤8 -> False␤9 -> False␤»
23:58 flussence r: for ^10 { my $npot = ?$^i.fmt('%b').flip.chop.index('1').defined; say "$^i -> $npot" }
23:58 p6eval rakudo 5f7d68: OUTPUT«0 -> False␤1 -> False␤2 -> False␤3 -> True␤4 -> False␤5 -> True␤6 -> True␤7 -> True␤8 -> False␤9 -> True␤»
23:59 flussence (probably not fast though...)

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

Perl 6 | Reference Documentation | Rakudo