»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
[Coke] finally gets home and can read backscroll. 02:57
... and that wasn't as interesting as he had hoped. ah well. ;) 03:04
what do I do if I want to install rakudo AND gen parrot? 03:29
(somewhere not the default) 03:30
sorear o/ [Coke] 03:31
[Coke] ~~ 03:43
moritz r: say ('1a' ... *)[^5] 05:28
p6eval rakudo 45679a: OUTPUT«1a 1b 1c 1d 1e␤»
moritz r: say ('1a', '1b' ... *)[^5]
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…
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␤␤»
moritz r: my $x = 4 + 2i; $x = 5 + i * $x.im; say $x
p6eval rakudo 45679a: OUTPUT«5+2i␤»
moritz p6: say ('e', 'd' ... 'a') 06:35
p6eval rakudo 45679a, niecza v17-12-g8b5d5e7: OUTPUT«e d c b a␤»
..pugs: OUTPUT«*** ␤ Unexpected "'"␤ expecting operator or ")"␤ at /tmp/ZiHjeJTh5c line 1, column 19␤»
dalek ok: 36caba6 | moritz++ | src/regexes.pod:
[regex] update ** separator syntax to use % instead
06:57
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
sisar moritz++ #replying to my email ! 07:36
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:40
sorear the current values of fields 07:54
it's a rather primitive concept; if you want a proper explanation, I'll need to detour into operational semantics 07:55
Woodi what is operational semantics ? :) 08:01
morning everyone :)
dalek ok: bda5a7f | moritz++ | src/grammars.pod:
[grammar] update to new % regex separator syntax
08:05
moritz has anybody planned to make 2012.05 star release? 08:51
sergot gi o/ 09:32
hi*
sorear o/ 09:38
Woodi: I don't know of a short explanation
moritz r: my $x = 1 < 2 ?? *.succ !! *.pred; say $x(5) 09:44
p6eval rakudo 45679a: OUTPUT«6␤»
Woodi during BEGIN I do HOW.add_method, is it possible to move this creation to compile time ? 09:51
moritz erm, BEGIN *is* at compile time 09:52
Woodi oo, ok :) 09:53
moritz r: BEGIN say 'oh hai'; 1 1
p6eval rakudo 45679a: OUTPUT«oh hai␤===SORRY!===␤Confused␤at /tmp/33BOJEfdnl:1␤»
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 ?
moritz sure 09:55
Woodi r: constant %h = { 'a' => 1 } 10:06
p6eval rakudo 45679a: ( no output )
Woodi r: constant %h = { 'a' => 1 }; %h.perl
p6eval rakudo 45679a: ( no output )
Woodi r: constant %h = { 'a' => 1 }; say %h.perl
p6eval rakudo 45679a: OUTPUT«{"a" => 1}␤»
sorear sleep& 10:09
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
[hds] morning 6s. 10:15
moritz helo [hds]
Woodi methods can have methods ? 10:24
perl6: class A { method b { method c { say 'c' }; self.c } }; my $a = A.new; $a.b
p6eval niecza v17-12-g8b5d5e7: OUTPUT«===SORRY!===␤␤Methods must be used in some kind of package at /tmp/wXMlx2OXl3 line 1:␤------> class A { method b { method c ⏏{ say 'c' }; self.c } }; my $a = A.new;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval…
..pugs, rakudo 45679a: OUTPUT«c␤»
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:53
Oh, i actually tried "~/sources/perl6/rakudo_nom/install/bin/parrot main.pir" 11:54
moritz felher: I think you can only precompile modules right now, not scripts 11:55
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? 11:56
Hm... No, it doesn't seem to be that easy :) 12:01
moritz perl6 --target=pir --output=module.pir module.pm 12:11
and it's used automatically
moritz if module.pir is in path, and has a newer timestamp than the .pm file, iirc 12:12
felher moritz++ 12:26
awesome.
from 6s down to 2s startup time :)
moritz felher: github.com/masak/ufo writes makefiles for you that help you with precompilation 12:28
felher moritz: thnx :) The program is to be used in half an hour, so i'll check that out later :) 12:30
moritz felher: be sure to read the README when you have a few spare minutes 12:31
:-)
felher moritz: okay. I will :) 12:32
felher -> afk
gfldex masak: i think that would be nice for a challenge: www.blogcdn.com/www.engadget.com/me...ktwo-w.jpg 14:07
dalek kudo/nom: 5f7d68e | kboga++ | src/core/Str.pm:
Removes duplicated fullwidth digits in rangechar (oops, kboga--)
14:14
lichtkind it is possible to use zero with assertion in regex jus with |c and without angle brackets? 16:51
moritz no 16:52
|c would be parsed as an alternative
sergot hi o/ 16:57
dalek blets: fe8092e | (Herbert Breunung)++ | docs/appendix- (3 files):
linking and explaining the cookbook appendix
16:59
lichtkind moritz: thank you 17:10
dalek blets: 4a4e9ef | (Herbert Breunung)++ | docs/appendix- (2 files):
calarify escape symbol pipe; moritz++
17:26
lichtkind hai sergot 17:32
sisar masak: what happened to the Userdocs For Christmas project ? 17:47
moritz sisar: there are a few files in the docs/u4x directory in the mu repo 17:49
sisar looks
moritz it's what is rendered on doc.perl6.org/ iirc
sisar feels sad at the sorry state of perl6 documentation 17:57
moritz too 17:58
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 17:59
sisar :( 18:02
sisar quit 18:05
spider-mario I am rather satisfied by perlcabal.org/syn/ 18:28
lichtkind moritz: what kind you think we need? 18:40
moritz lichtkind: perldoc style docs and books
lichtkind moritz: the actual tablets are much more perldoc style then the appendices 18:41
sorear good * #perl6 18:44
colomon o/
moritz lichtkind: got an example? 19:06
lichtkind moritz: tablets.perl6.org/tablet-2-basic-syntax.html has a bit content 19:11
colomon hmmm, Labenslust Polka is taking a long time to convert... bug or disturbingly complex polka? 19:17
moritz not "Lebenslust"? 19:23
Woodi I got: Cannot call 'trait_mod:<is>'; none of these signatures match: ... when trying to subclass. what it means ? 19:29
gfldex Woodi: can you gist the code in question? 19:31
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. ;)
moritz phenny: "lebenslust"? 19:33
phenny moritz: "lebenslust" (de to en, translate.google.com)
moritz erm
I'd translate it as "joy of living"
gfldex "love of life" according to dict.leo.org
Woodi gfldex: cannot gist probably, it appears on use Module; 19:34
gfldex or "lust for life" 19:35
the meaning is slightly off in both cases tho
moritz r: class A { }; class B is A::X { }
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…
moritz Woodi: like that?
gfldex Woodi: are you sure the module path is in @*INC? 19:36
Woodi use Class; in Subclass movet to next problem :) 19:37
Woodi yes, libs are ok 19:38
hmm, $!priv is not accesible in subclass ?
moritz of course not 19:39
anybody can subclass your classes
giving them access to your privates just because they declare themselves your children wouldn't be good encapsulation
Woodi not sure 19:41
but if it is that way then ok
moritz it's OK not to be sure; I'm sure for you too :-)
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
Woodi public fields are for code outside hierarchy... 19:43
just thinking...
moritz I don't see the point
everybody who uses your code must stick to its API 19:44
what's the point in having two public but different APIs, one for inheritance, one for usage?
Woodi for me subclassing is just like write all code in class from the start, parents are just to share parts for siblings 19:45
moritz what's the point in forcing somebody to subclass to just to give them access to certain features? 19:46
Woodi: but that is bad encapsulation
Woodi encapsulations is for thing out of hierarchy
moritz Woodi: encapsulation means respecting boundaries, not just acting as if stuff was copied & pasted
no
encapsulation is for your own sanity
there's no need to limit your sanity when talking about subclassing 19:47
Woodi I am just in case I need parent as 'code inlining' :) 19:48
just want add few methods nothing more
eg. making field with socket public break encapsulation. or makes better design maybe, do not know 19:51
dalek blets: 21e6fa9 | moritz++ | docs/tablet-2-basic-syntax.txt:
explain .gist
20:18
colomon sorear: Let my ABC program run on a big file, and got this result: gist.github.com/2732306 20:39
sorear colomon: that would be an out-of-memory error. 20:46
colomon ah
using incredible amounts of memory would probably also explain why it's so slow. 20:47
I think it may be time to rip out some long-standing ABC code which appears to be wildly inefficient. :) 20:50
adu ok 20:59
I finally uploaded it 21:00
sergot good night o/ ! 21:02
adu I keep getting "Unable to obtain PAST from Regex;Match" 22:08
adu I'm really confused 22:20
colomon backlogs
adu colomon: you're not going to find much
I've been talking to myself
colomon aduI keep getting "Unable to obtain PAST from Regex;Match"
yeah 22:21
I'm afraid I won't be much help with PAST issues.
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 github.com/andydude/dreme/blob/mas...Actions.pm
colomon Do you know where the error is happening? 22:23
adu colomon: well, almost all inputs give that
colomon huh
adu except "#[say #t]"
which I think I've handled correctly
but it says "Could not find sub sbuiltin_abuiltin_ybuiltin_" 22:24
so I don't think it's correct
colomon What is your grammar? 22:26
adu github.com/andydude/dreme/blob/mas...e/Datum.pm
colomon Have you tried testing it without the HLL:: uses? 22:28
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
adu do you mean 'is's? 22:30
colomon yes 22:37
personally, I don't know what HLL::Compiler does
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.
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
HLL::Compiler is not very well documented, so I don't know what it does either
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.
adu hmm 22:41
colomon sorear: think I just eliminated two parses on each note processed. I'm hoping that will help my speed a bit. :) 22:57
errr, no, that didn't help at all. darn it, parses are fast in niecza. 23:11
lichtkind good night 23:12
o/
glen_ hi there 23:36
eeee
colomon o/ 23:37
whoops, too late.
araujo greets around 23:48
araujo goes testing the json module
tadzik good late-evening 23:50
colomon o/ 23:51
anyone know a fast p6 way of figuring out if a number is a power of two? 23:52
Timbus can p6 do bitwise stuff 23:55
tadzik yes 23:56
gfldex biwise operators: perlcabal.org/syn/S03.html#line_828 23:57
Timbus just found that. ty 23:58
flussence r: for ^10 { my $npot = ?$^i.fmt('%b').flip.chop.index('1'); say "$^i -> $npot" }
p6eval rakudo 5f7d68: OUTPUT«0 -> False␤1 -> False␤2 -> False␤3 -> False␤4 -> False␤5 -> False␤6 -> True␤7 -> False␤8 -> False␤9 -> False␤»
flussence r: for ^10 { my $npot = ?$^i.fmt('%b').flip.chop.index('1').defined; say "$^i -> $npot" }
p6eval rakudo 5f7d68: OUTPUT«0 -> False␤1 -> False␤2 -> False␤3 -> True␤4 -> False␤5 -> True␤6 -> True␤7 -> True␤8 -> False␤9 -> True␤»
flussence (probably not fast though...) 23:59