»ö« 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.
00:01 dorlamm joined 00:20 raiph joined, tyatpi joined 00:27 dorlamm left, og01 joined 00:47 fridim_ joined 01:01 icwiener left 01:02 icwiener joined 01:03 raiph left 01:49 nsh_ joined 01:59 icwiener_ joined 02:00 icwiener left 02:12 tyatpi left 02:14 tokuhirom joined 02:19 am0c joined
colomon anyone out there? :) 02:31
nom: say &sin.signature 02:32
p6eval nom 676b35: OUTPUT«:(Any)␤»
colomon nom: say &sin.signature.WHAT 02:33
p6eval nom 676b35: OUTPUT«Signature()␤»
colomon nom: say &sin.signature.params.perl 02:34
p6eval nom 676b35: OUTPUT«(Any,).list␤»
TimToady you should realize nobody is here Friday night except extreme dweebs :)
colomon TimToady: can't really go out for the evening without getting a babysitter. ;) 02:35
nom: sub foo(Int $a, Rat $b) { say "I don't care!"; }; say &foo.signature.params.perl 02:36
p6eval nom 676b35: OUTPUT«(Int $a, Rat $b).list␤»
colomon nom: sub foo(Int $a, Rat $b) { say "I don't care!"; }; say &foo.signature.params[0].WHAT
p6eval nom 676b35: OUTPUT«Parameter()␤»
colomon TimToady: did you see the 'is cached' implementations flying by earlier? 02:39
TimToady yes, that's cool 02:42
colomon I love that it's possible to implement so simply.
I mean, obviously the industrial version will be more complicated. 02:43
colomon is trying to implement "is symmetric" without luck so far 02:44
sad thing is, I'm pretty sure jnthn could answer my question in under a minute, if he were awake.... 02:54
phenny: tell jnthn gist.github.com/1425858 -- how do I get the routine name into the instantiate_generic? 03:00
phenny colomon: I'll pass that on when jnthn is around.
diakopter extreme dweeb 03:16
03:25 jaldhar joined
japhb apparently is as well 03:36
Led Zeppelin is so much less fun when you've got it quiet enough not to wake the little one(s) 03:39
03:56 wolfman2000 joined 04:12 cooper left 04:21 mdxi joined 04:29 jaldhar left, jaldhar joined
PerlJam colomon: you mean like $r.name ? 04:30
04:37 tyatpi joined 04:41 am0c left 04:56 tyatpi left 05:09 lue joined
lue hello world o/ 05:09
phenny lue: 01 Dec 14:53Z <[Coke]> ask lue what he meant by the comment at the top of S32-list/minmax.t
lue looks
05:10 greg_72 joined
lue ping [Coke] 05:12
phenny: tell [Coke] look at commit 4925244e78 . Apparently that comment is a reference to the fact the array was defined with <> instead of (), which didn't work. 05:16
phenny lue: I'll pass that on when [Coke] is around.
lue phenny: tell [Coke] (The tone of the comment shows it was from way back in my early days of Perl 6. I'm sure there are a couple more comments of mine in roast I wish weren't written they way they are) 05:17
phenny lue: I'll pass that on when [Coke] is around.
05:17 ethndbst left
greg_72 hi, I see that the Rakudo compiler is written in Perl 5. Some time ago I have hear rumours that Perl 6 is developed using Haskell. Is it abandoned? 05:21
cxreg that's wildly inaccurate 05:22
there was an early versionuanu
ack
an earlier implementation of perl 6 named pugs was in haskell
rakudo is not written in perl 5
it's mostly written in perl 6 05:23
with some parts in nqp
greg_72 ah, right
what is nqp?
cxreg en.wikibooks.org/wiki/Parrot_Virtua...Quite_Perl
greg_72 I see 05:25
PerlJam greg_72: STD is written in Perl 5. Perhaps that's what you're thinking of (but just don't know it) 05:26
greg_72 I sais perl 5 because I saw the code of rakudo in /src and it seemed like perl 5 05:27
PerlJam greg_72: ah. Perl is still Perl :)
greg_72 I was doing perl for four years and loved it 05:28
cxreg wonders what's up with the fact that rakudo.org/ hasnt had an update in 3 months
benabik Uh. The parrot wikibook.
ugh, even
greg_72 how much work is missing from rakudo being able to compile the whole perl 6 language? 05:29
cxreg i guess theres still some pir in there too
PerlJam cxreg: pmichaud does most of the updates and he's been largely busy with other things.
cxreg yeah i heard, is he ok?
PerlJam cxreg: he's fine afaik, but his wife has serious health issues.
cxreg :( 05:30
PerlJam greg_72: perl6.org/compilers/features That might give you some idea 05:31
05:37 tyatpi joined
dalek atures: f78f01f | moritz++ | features.json:
diakopter++ brought Unicode properties to nom
05:41
greg_72 PerlJam: thanks 05:42
PerlJam greg_72: Though the language is a moving target, so "compile the whole language" doesn't always make sense :) 05:44
greg_72: btw, checkout perl6advent.wordpress.com 05:45
greg_72 PerlJam: ok this was too academic, your link might answer when will I be ready for Perl 6 programming
PerlJam greg_72: I think many people are ready now, they just don't have enough good learning resources. We're working on that though. 05:46
greg_72: see github.com/perl6/book/downloads 05:47
TimToady actually, STD is also written in Perl 6 that is translated to Perl 5 05:48
greg_72 PerlJam: a hundred pages, that seem to be fine, not too long
PerlJam greg_72: not finished yet either.
greg_72 that makes no problem, the important is that it gives a taste of it 05:49
PerlJam greg_72: oh, check out the perl 6 problems on rosettacode.org too. you can compare with perl 5 and other languages.
greg_72 I did build management in perl and it was The Proper Tool, I guess perl 6 will be Even More Proper. I did ClearCase stuff in it 05:50
sorear PerlJam: STD is written in Perl 6. there is a very ad-hoc compiler in 'viv' which compiles Perl 6 grammars very well and makes a weak and inconsistant attempt at translating other code 05:55
PerlJam: TimToady has said things in the past to the effect that STD's time has passed 05:56
05:57 xinming joined
sorear greg_72: Perl 6 is a vastly better language than Perl 5 in a lot of ways, but there are still issues with the implementations (they're all slow memory hogs) and libraries (quite sparse) 05:58
06:02 greg_72 left 06:14 molaf joined 06:22 ethndbst joined 06:45 tyatpi left 06:53 xinming left
Woodi perl6: my int $i; $i--; 06:54
06:54 xinming joined
p6eval pugs b927740: ( no output ) 06:55
..rakudo 676b35: OUTPUT«Cannot assign to a non-container␤ in sub postfix:<--> at src/gen/CORE.setting:2366␤ in block <anon> at /tmp/DaRTizee92:1␤ in <anon> at /tmp/DaRTizee92:1␤»
..niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Malformed my at /tmp/9X5tjN4Wm5 line 1:␤------> my ⏏int $i; $i--;␤␤Parse failed␤␤»
Woodi perl6: my int $i=1; $i--;
p6eval niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Malformed my at /tmp/bPqYiNMvlh line 1:␤------> my ⏏int $i=1; $i--;␤␤Parse failed␤␤»
..rakudo 676b35: OUTPUT«Cannot assign to a non-container␤ in sub postfix:<--> at src/gen/CORE.setting:2366␤ in block <anon> at /tmp/yMF1W6z6Sq:1␤ in <anon> at /tmp/yMF1W6z6Sq:1␤»
..pugs b927740: ( no output )
Woodi perl6: my int $i=1; $i-1;
p6eval pugs b927740, rakudo 676b35: ( no output )
..niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Malformed my at /tmp/QVz5XhlZAG line 1:␤------> my ⏏int $i=1; $i-1;␤␤Parse failed␤␤»
07:00 xinming left 07:03 ethndbst left 07:09 molaf left, xinming joined 07:10 [Sec] joined 07:22 xinming left 07:25 xinming joined 07:45 xinming left 07:46 zby_home_ joined 07:56 xinming joined 08:00 xinming left 08:11 xinming joined 08:16 xinming left 08:17 xinming joined 08:22 xinming left 08:23 xinming joined 08:24 kaare_ joined 08:27 xinming left
Woodi hmm, found interesting fact about avionics software documentation :) "One of the odder documentation requirements is that most commercial contracts require an assurance that system documentation will be available indefinitely. The normal commercial method of providing this assurance is to form and fund a small foundation or trust. The trust then maintains a mailbox and deposits copies (usually in ultrafiche) in a secure location, such as rented sp 08:35
08:52 Chillance joined 09:02 lab7 joined 09:11 lab7 left 09:27 araujo joined 09:59 JimmyZ joined, hundskatt joined 10:34 araujo left 10:38 araujo joined, araujo left, araujo joined
JimmyZ rakudo: gist.github.com/1426729 # help, I wonders why say 'process' never be called 10:38
p6eval rakudo 676b35: OUTPUT«===SORRY!===␤Confused at line 1, near "gi"␤»
JimmyZ rakudo: gist.github.com/1426729
p6eval rakudo 676b35: OUTPUT«begin␤I was called with 1␤2␤I was called with 2␤4␤I was called with 1␤2␤I was called with 2␤4␤»
10:42 hundskatt left
JimmyZ sub cached(Routine $r) { my %cache;$r.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)});}; cached sub foo($a) {return 2 * $a;}; say foo(1);say foo(2); # why wrap is not called? 10:47
rakudo: sub cached(Routine $r) { my %cache;$r.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)});}; cached sub foo($a) {return 2 * $a;}; say foo(1);say foo(2); 10:48
p6eval rakudo 676b35: OUTPUT«2␤4␤»
10:52 Nostraa joined 10:53 tokuhirom left 10:54 Nostraa left 11:01 lestrrat left, lestrrat joined 11:05 xinming joined 11:36 xinming left 11:37 xinming joined 11:42 xinming left 11:55 xinming joined 11:57 jimmy1980 joined, MayDaniel joined 12:00 xinming left 12:03 xinming joined 12:06 jimmy1980 left 12:08 icwiener_ left 12:09 xinming left 12:13 Psyche^ joined 12:14 xinming joined, Patterner left, Psyche^ is now known as Patterner 12:15 jimmy1980 joined 12:19 xinming left 12:21 xinming joined, xinming left 12:22 MayDaniel left 12:29 xinming joined 12:34 xinming left, jimmy1980 left, jimmy1980 joined 12:36 xinming joined
jnthn afternoon, #perl6 12:37
phenny jnthn: 02 Dec 22:45Z <japhb> ask jnthn OOC, what do you teach?
jnthn: 03:00Z <colomon> tell jnthn gist.github.com/1425858 -- how do I get the routine name into the instantiate_generic?
colomon o/
jnthn colomon: Name? :)
colomon jnthn: my is symmetric code runs, but doesn't seem to actually create another multi named foo (or whatever) 12:38
jnthn colomon: Right, you need to do a little more work at the end of symmetric 12:39
colomon: $r is a single candidate. To get its controlling proto, do $r.dispatcher
Then you need to add your generated sub to that
colomon ooooo
jnthn $r.dispatcher.add_dispatchee(gen(@params[0].type, @params[1].type)) 12:40
colomon and that works! 12:41
12:41 xinming left
colomon jnthn++ 12:42
jnthn yeah
and since this is a trait mod, it's OK to do that.
colomon to call add_dispatchee, you mean? 12:43
jnthn (Note that adding candidates after CHECK time is a really bad idea. But traits run at BEGIN time, so it's all good. :))
colomon: yes
12:43 mberends joined
jnthn mberends! \o/ 12:43
mberends \o/
phenny mberends: 01 Dec 15:24Z <moritz> ask mberends if he wants to d a p6advent post on Tetris in niecza
colomon jnthn: so, can we get is symmetric into core? it ought to be a big help with some math operators... 12:44
jnthn phenny: tell japhb Well, next week I'll be teaching an advanced C# course. I teach various others. :)
phenny jnthn: I'll pass that on when japhb is around.
jnthn colomon: Is it spec?
colomon jnthn: if it's not, it easily can be. ;)
mberends moritz: yes, that's a good idea (p6advent post on Tetris in niecza) 12:45
colomon it doesn't look like it is spec yet
jnthn colomon: OK. Wouldn't mind hearing TimToady say "yeah, it's OK to be in core" before we add it :) 12:46
colomon: Especially if we're going to make other things in core depend on it.
JimmyZ rakudo: sub cached(Routine $r) { my %cache;$r.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)});}; cached sub foo($a) {return 2 * $a;}; say foo(1);say foo(2); # why wrap is not called? 12:51
p6eval rakudo 676b35: OUTPUT«2␤4␤»
12:53 xinming joined
JimmyZ or I misused it 12:55
jnthn oh, hm
Yeah, it's the closure clone stuff that gets in the way there. 12:57
JimmyZ wonders how to fix it 12:58
12:58 toebu joined
jnthn too :) 12:59
toebu perl6: sub coercing ($people as Int) { say "$people people in the room"; } coercing people=>34.4;
p6eval rakudo 676b35: OUTPUT«===SORRY!===␤Confused at line 1, near "sub coerci"␤»
..niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Action method trait_mod:as not yet implemented at /tmp/m0X6j7CPgH line 1:␤------> sub coercing ($people as Int⏏) { say "$people people in the room"; }␤␤Unhandled exception: Cannot use hash access on an obj…
..pugs b927740: OUTPUT«*** ␤ Unexpected "as"␤ expecting "?", "!", trait, "=", default value, "-->" or ")"␤ at /tmp/gwuv48WBj5 line 1, column 23␤»
toebu perl6: sub coercing ($people as Int) { say "$people people in the room"; } coercing 34.4; 13:00
p6eval rakudo 676b35: OUTPUT«===SORRY!===␤Confused at line 1, near "sub coerci"␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "as"␤ expecting "?", "!", trait, "=", default value, "-->" or ")"␤ at /tmp/Le4uY88bMa line 1, column 23␤»
..niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Action method trait_mod:as not yet implemented at /tmp/_A8qlGK2Qk line 1:␤------> sub coercing ($people as Int⏏) { say "$people people in the room"; }␤␤Unhandled exception: Cannot use hash access on an obj…
toebu perl6: sub coercing ($people as Int) { say "$people people in the room"; }; coercing 34.4;
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "as"␤ expecting "?", "!", trait, "=", default value, "-->" or ")"␤ at /tmp/XQ9AHVin_H line 1, column 23␤»
..niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Action method trait_mod:as not yet implemented at /tmp/jF5H4CGxvt line 1:␤------> sub coercing ($people as Int⏏) { say "$people people in the room"; }␤␤Unhandled exception: Cannot use hash access on an obj…
..rakudo 676b35: OUTPUT«34 people in the room␤»
13:01 xinming left
JimmyZ rakudo: sub foo($a) {return 2 * $a;}; my %cache; &foo.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)});say foo(1); say foo(2); # this one works well 13:01
p6eval rakudo 676b35: OUTPUT«process␤2␤process␤4␤»
jnthn JimmyZ: Right. It never clones &foo there. 13:02
JimmyZ: Trouble is, the thing getting in the way here is also rather helpful for people making generator functions and the like. 13:03
toebu perl6: sub b($a){say $a};b a=2;
p6eval rakudo 676b35: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤»
..niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'a' 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 1139 (P6.comp_unit @ 32) ␤ at /home/p6e…
..pugs b927740: OUTPUT«*** No such subroutine: "&a"␤ at /tmp/nokaNqcrFK line 1, column 19-24␤»
toebu perl6: sub b($a){say $a};b a => 2 ;
p6eval pugs b927740: OUTPUT«a 2␤»
..niecza v12-2-geb42dfa: OUTPUT«2␤»
..rakudo 676b35: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤ in sub b at /tmp/gwoQR7fuMX:1␤ in block <anon> at /tmp/gwoQR7fuMX:1␤ in <anon> at /tmp/gwoQR7fuMX:1␤»
JimmyZ toebu: you maybe want rakudo: or niecza: 13:04
toebu except that rakudo seems not to like access to positional parameters by name at the moment
JimmyZ: yes for the call :-) 13:05
JimmyZ rakudo: sub b(:$a){say $a};b a => 2 ;
p6eval rakudo 676b35: OUTPUT«2␤»
JimmyZ toebu: ^^
13:05 donri joined
jnthn JimmyZ: Interestingly, S06 also has this: 13:05
my &old_thermo := &thermo; 13:06
&thermo = sub ($t) { old_thermo( ($t-32)/1.8 ) }
toebu rakudo: sub b(:$a){say $a};b a => 2 ;b 2;
p6eval rakudo 676b35: OUTPUT«2␤Too many positional parameters passed; got 1 but expected 0␤ in sub b at /tmp/cWO0ztDQ9_:1␤ in block <anon> at /tmp/cWO0ztDQ9_:1␤ in <anon> at /tmp/cWO0ztDQ9_:1␤»
jnthn Which actually relies on the closure behavior you're running in to.
toebu it used to be the case, that positional parameters could also be accessed by name ... has this changed ?
donri moritz: re buffers: in the terminal your examples give me two different outputs, in google reader your post shows the correct unicode and in wordpress the actual bytes 13:07
so the claim that "Both of those output operations have the same effect" is false for me, in fedora 16 rakudo 13:08
jnthn toebu: There were certainly spec changes in that area. I forget exactly how it ended up. 13:09
donri perl6: $*OUT.write(Buf.new(0x6d, 0xc3, 0xb8, 0xc3, 0xbe, 0x0a)) 13:10
p6eval rakudo 676b35: OUTPUT«møþ␤»
..pugs b927740: OUTPUT«*** No such method in class Scalar: "&write"␤ at /tmp/D3m_OFyS9G line 1, column 1 - line 2, column 1␤»
..niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'Buf' 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 1139 (P6.comp_unit @ 32) ␤ at /home/p6ev…
donri nom: $*OUT.write(Buf.new(0x6d, 0xc3, 0xb8, 0xc3, 0xbe, 0x0a))
p6eval nom 676b35: OUTPUT«møþ␤»
donri me: This is Rakudo Perl 6, version 2011.07 built on parrot 3.6.0 13:11
bbl food 13:12
JimmyZ jnthn: Is it a rakudo bug or my bug?
jnthn JimmyZ: I found the behavior a little surprising. But the sample I just pasted from S06 seems to suggest Rakudo may well be doing the right thing here. 13:13
toebu do named maches not work at present ? 13:15
jnthn toebu: Passing positional arguments to positional parameters works. Passing named arguments to named parameters works. 13:16
It used to be that you could pass positional parameters by their name. 13:17
toebu ok
JimmyZ jnthn: I still don't know it's a rakudo bug or my bug :( 13:18
jnthn JimmyZ: Me either. 13:19
:)
toebu what about named captures in regular expressions ?
JimmyZ can't understand english well enough sometimes
13:20 jimmy1980 left
jnthn toebu: Should work 13:20
nom: "abc123def" ~~ /$<digits>=[\d+]/; say $<digits>
p6eval nom 676b35: OUTPUT«=> <123>␤␤»
13:21 jimmy1980 joined
toebu nom: my regex hfind { :i [ (Hello) \s? ]+ } "HeLLo hello" ~~ m{ <hname=&hfind> }; say $/<hname>[0].join(', '); 13:21
p6eval nom 676b35: OUTPUT«===SORRY!===␤Confused at line 1, near "my regex h"␤»
colomon just figured out how to get mouse button events in the Gtk mandelbrot program! o/
toebu nom: my regex hfind { :i [ (Hello) \s? ]+ }; "HeLLo hello" ~~ m{ <hname=&hfind> }; say $/<hname>[0].join(', '); 13:22
p6eval nom 676b35: OUTPUT«␤»
jnthn toebu: Pretty sure that's an issue with :i, not with the capturing. 13:23
toebu nom: my regex hfind { [ (Hello) \s? ]+ }; "HeLLo hello" ~~ m{ <hname=&hfind> }; say $/<hname>[0].join(', ');
p6eval nom 676b35: OUTPUT«␤»
13:23 baest joined
toebu nom: my regex hfind { [ (Hello) \s? ]+ }; "Hello hello" ~~ m{ <hname=&hfind> }; say $/<hname>[0].join(', '); 13:23
p6eval nom 676b35: OUTPUT«Hello␤» 13:24
jnthn github.com/perl6/specs/commit/94d0...733d0aec04 # the spec commit that changed named => positional binding
toebu thanks 13:25
jnthn bbl 13:27
toebu nom: sub postfix:<!> { [*] 1..$^n }; say 5!;
p6eval nom 676b35: OUTPUT«===SORRY!===␤Confused at line 1, near "say 5!;"␤»
toebu nom: sub postfix:<!> { [*] 1..$^n }; say 5 !;
p6eval nom 676b35: OUTPUT«===SORRY!===␤Confused at line 1, near "say 5 !;"␤»
toebu what is confusing rakudo here ? 13:28
flussence nom: sub postfix:<!>($n) { [*] 1..$n }; say 5!; 13:29
p6eval nom 676b35: OUTPUT«===SORRY!===␤Confused at line 1, near "say 5!;"␤»
flussence hm
b: sub postfix:<!>($n) { [*] 1..$n }; say 5!;
p6eval b 1b7dd1: OUTPUT«120␤»
flussence probably a bug somewhere in nom
toebu flussence: what is b ?
flussence old rakudo 13:30
JimmyZ rakudo: sub cached(Routine &r) { my %cache; &r.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)});}; cached sub foo($a) {return 2 * $a;}; say foo(1);say foo(2); # why wrap is not called?
p6eval rakudo 676b35: OUTPUT«===SORRY!===␤Typed arrays/hashes/callables not yet implemented at line 1, near ") { my %ca"␤»
toebu grin
JimmyZ rakudo: sub cached(&r) { my %cache; &r.wrap(-> |$c {say 'process';my $key := $c.gist;%cache.exists($key) ??%cache{$key} !!(%cache{$key} = callsame)});}; cached sub foo($a) {return 2 * $a;}; say foo(1);say foo(2); # why wrap is not called?
p6eval rakudo 676b35: OUTPUT«2␤4␤»
13:30 xinming joined
JimmyZ jnthn: so do I need ticket it ? 13:33
need to
aloha, xinming 13:34
donri colomon: p6 bindings for gtk? 13:40
13:43 xinming left
Woodi are modules vs classes in Perl6 are lightweight ? I just thinking about rewriting class to module for performance reson... 13:49
colomon donri: using Niecza, you bet 13:51
donri ah
because i was thinking a port of pygobject to nativecall would be coolness
then you'd get all the libs found by locate .gir for free 13:52
colomon github.com/colomon/mandelbrot/blob...delbrot.pl is what I'm working on, the Gtk stuff starts around line 230. 13:53
14:02 xinming joined 14:06 orafu left 14:07 orafu joined, xinming left 14:09 tty234 joined, daxim joined
mberends colomon: I like! What are the mouse/button events going to do, change colors, zoom, pan maybe? 14:14
14:15 grondilu joined
grondilu I ran out of memory trying to compile last rakudo version :( 14:15
I currently have 1Go RAM. Would adding swap solve the issue? 14:16
mberends grondilu: yes, but at the expense of much slower compile times. Stopping all unnecessary processes (eg Firefox) is much more helpful. 14:17
grondilu oh yeah indeed firefox is running. Hadn't noticed. 14:18
mberends often has the same problem on a netbook :) 14:19
flussence tries compiling it ooc 14:21
mberends jnthn: regarding your recent 6model/reprs refactor, if a representation (eg CPointer) does "this_repr->attr_funcs = NULL;", it will go boom instead of throwing an exception if any HOW code accidentally tries to call a non-existent repr function. I think instead of NULL, could you point this_repr->attr_funcs to a default "not implemented" thrower? 14:27
14:32 MayDaniel joined
jnthn mberends: Already done; see in repr_registry.c 14:34
mberends jnthn++ :D 14:35
jnthn Thanks for reviewing :)
JimmyZ jnthn: do I need to ticket it ? 14:36
mberends jnthn: not strictly reviewing, trying to grok everything for 6model/c. I have this idea of trying to golf the essence of 6model down into a mini subset in one C file for a proof of concept, do you thing that's worth trying to do? 14:37
14:41 mishin joined
jnthn JimmyZ: Not for now. I'm curious if TimToady++ will have some opinion in the backlog. 14:42
*when he backlogs
mberends: Sounds feasible
mberends :-) yay! -Ofun for weeks and months ahead 14:43
jnthn mberends: Note that - other than the REPR function table refactor - the rest are not 6model core things but rather just extra representations.
mberends: There's a mechanism now for other libraries to dynamically register extra representations.
mberends: I guess I probably shouldn't have put the dynamic ones into the src/6model/reprs/ folder... 14:44
mberends jnthn: yes, mostly NCI support. How many representations would a typical p6 program use?
JimmyZ dynreprs? 14:45
mberends that's a good folder name 14:46
grondilu could compile finaly
JimmyZ that look like dynpmcs or dynops
jnthn mberends: The overwhelming majority of objects are P6opaque. P6[int|num|str] are involved in the native type support.
JimmyZ *looks
but I like it 14:47
jnthn mberends: KnowHOWREPR is for the core bootstrap. Uninstantiable is about the most boring repr imaginable; we use it for things taht are, well, uninstantiable. :)
mberends jnthn: ok, so the repr registry can get away with a simple unoptimized data structure, maybe a single linked list. 14:48
jnthn mberends: oh, we rarely hit the registry
mberends: Generally, only when declaring a new type. 14:49
mberends yes, it's almost always (shared) pointers to reprs in objects.
jnthn Beyond that, the st points off to it
right
mberends is beginning to grok some parts of 6model ;) 14:50
14:51 xinming joined
jnthn goes for a quick walk before it gets totoally dark 14:53
14:58 zby_home___ joined, xinming left, zby_home_ left
colomon mberends: my current plan (subject to being able to get it to work) is that leftclick and drag opens up a zoom of the region you sketch out that way, and rightclick opens up a Julia set at the point you clicked on. (I'm trying to start with the latter.) 15:00
15:00 sayu joined 15:01 grondilu left, xinming joined
mberends colomon++: oh wow, that's going to be awesome (modulo performance)! 15:02
colomon mberends: yeah, performance is frustrating at the moment
dalek : b994051 | (Martin Berends)++ | misc/perl6advent-2011/schedule:
assign 'Tetris on Niecza' to Day 6
15:03
15:03 molaf joined 15:04 toebu left
dalek : f0804af | (Martin Berends)++ | misc/perl6advent-2011/schedule:
add an author name to Day 6 -- kinda useful
15:05
flussence just finished the part with compiling CORE.setting.pir - it's very RAM-hungry
(800MB) 15:06
dalek : 6102bef | (Martin Berends)++ | misc/perl6advent-2011/topic-brainstorming:
move Tetris to planned list
colomon mberends++ 15:11
15:13 xinming left 15:15 birdwindupbird joined, birdwindupbird left
mberends :-) the post is quite easy to do - it will be the transcript of the soundtrack of the London Perl Workshop talk. The slides are already in niecza/docs, so it's a matter of remembering the audio between the images. Thanks to amsterdam.pm for getting me to give this talk in the first place. 15:16
15:16 xinming joined
colomon mberends: I wasn't able to figure out how to link to the slides in HTML form, else I would have linked to it from the Day 1 post. :) More of a surprise for readers this way, though! 15:17
15:18 molaf left
jnthn back 15:19
mberends colomon: I also tried and failed (eg with raw view) to get the HTML to display straight out of github, they probably wrap the content in some way that does not help us. 15:20
flussence found it amusing that the first article in the php advent calendar is about the importance of having fun :)
colomon mberends: do you have somewhere to host it? I could stick it up online if needed. 15:21
15:21 xinming left
mberends colomon: please do. I plan to set up a host somewhere, but tuit fail. 15:22
15:22 xinming joined
colomon www.harmonyware.com/perl/niecza-gtk.html 15:23
mberends: do you have much experience getting IntPtrs working in niecza? 15:27
mberends colomon: not yet, but I'll look with you
colomon I'm thinking I need SetData (string key, IntPtr data) to attach info to a window 15:28
15:28 xinming left 15:29 xinming joined
mberends first thought is to try an array of int with only one element in it 15:29
colomon public IntPtr (int value);
that looks like it might do the job nicely
15:33 mkramer joined
colomon bingo! 15:34
mberends \o/ is IntPtr a built in CLR class?
Timbus colomon, the traditional way to bind an event in gtk is to have a .connect method and the first arg is the event name
15:35 xinming left
colomon mberends: yes 15:35
Timbus: is that a general comment, or am I doing something wrong with my code?
Timbus well, just looking at the first example
you have on_DeleteEvent 15:36
this would cxonfuse and anger me, a long time gtk programmer
colomon versus something like on_Event("Delete", ...
?
Timbus yus
colomon are you sure that's not a Gtk versus Gtk# thing?
15:37 xinming joined, mkramer left
colomon is a very very shorttime Gtk programmer 15:37
15:37 sayu left, mkramer joined
Timbus well, i think its a gtk(C, C++, perl, python,) thing vs gtk# 15:39
which seems to be slightly different here
mberends all the niecza examples are written in the style of $window.add_DeleteEvent( ...
Timbus oh wait no, gtkmm has the event as a method
hello_world.signal_clicked( ).connect(
augh thats even worse
mberends Timbus: if you have niecza running locally, I think we'd all appreciate pointers towards better use of Gtk# :) 15:41
Timbus hmmm if I have monodevelop do i just need to checkout and build? 15:43
15:43 mkramer left, mkramer joined
Timbus a fundamental problem with gtk (perl5) is that it's terrible with threads. and since gtk's event system is pretty abysmal at dealing with blocking operations (especially non-I/O ones), you really need threads 15:48
15:48 mkramer left, mkramer joined
Timbus so if niecza+gtk works with threads, thats a good start 15:48
also, traditionally a spawned thread signals the mainloop not by a socket or whatever, but by calling gtk_main_add_idle 15:50
15:50 xinming left 15:51 xinming joined
Timbus this is important because you cant do that using fork or perls 'ithreads' 15:52
15:55 mkramer left
mberends so far the niecza code we have written to use Gtk# has been only single threaded. I think Niecza can create multiple threads, but I'm not really sure. 15:55
15:57 xinming left
Timbus well, if you can spawn a thread after loading gtk code, and also kill the thread.. that's still beating perl5 15:58
heh. aim high 15:59
16:00 mkramer joined 16:04 xinming joined
[Coke] moritz: perl6advent.wordpress.com/2011/12/0...binary-io/ seems to have bad strings: 16:08
phenny [Coke]: 05:16Z <lue> tell [Coke] look at commit 4925244e78 . Apparently that comment is a reference to the fact the array was defined with <> instead of (), which didn't work.
[Coke]: 05:17Z <lue> tell [Coke] (The tone of the comment shows it was from way back in my early days of Perl 6. I'm sure there are a couple more comments of mine in roast I wish weren't written they way they are)
[Coke] oth of those output operations have the same effect, and print møþ to the standard output stream
jnthn yeah, looks that way for me too 16:12
16:13 xinming left 16:15 xinming joined 16:24 xinming left 16:35 xinming joined
colomon Timbus: any hints about getting the X, Y coordinates of a mouse button press / release? 16:35
16:40 JimmyZ left
colomon oh, X and Y get. 16:42
PerlJam Is there a way to pretty-print .gist/.perl output? With indentions and such 16:43
16:44 mishin left 16:51 Trashlord left 16:52 xinming left
colomon mberends: Just pushed the very first code that can handle creates a Julia set corresponding to where you right-click on the mandelbrot set. afk # fetching noms 16:53
16:53 xinming joined
mberends colomon++: it works! # beautiful Mandelbrot and Julia fractals in raw.github.com/colomon/mandelbrot/...delbrot.pl 16:58
17:00 Trashlord joined 17:08 xinming left 17:12 Trashlord left 17:14 Trashlord joined, xinming joined 17:17 jimmy1980 left 17:22 Trashlord left
dalek osystem: 7c3150b | duff++ | META.list:
Add Grammar::Profiler::Simple
17:23
17:25 jimmy1980 joined 17:28 xinming left 17:33 ab5tract joined
colomon mberends: yeah, just needs zooming and more gracefulness.... 17:48
and lots and lots more speed.
17:51 jimmy1980 left, jimmy1980 joined 17:53 ab5tract left 17:58 jimmy1980 left 18:04 jimmy1980 joined 18:09 donri left 18:17 DarthGandalf joined 18:28 jimmy1980 left 18:29 preflex_ joined, preflex_ is now known as preflex 18:34 xinming joined, jimmy1980 joined 18:40 ksi joined 18:44 xinming left, hundskatt joined, birdwindupbird joined 18:45 jimmy1980 left 18:46 jimmy1980 joined, birdwindupbird left 18:51 mkramer left 18:52 xinming joined 18:54 mkramer joined 18:57 xinming left 18:58 mkramer left 18:59 xinming joined 19:00 mkramer joined 19:02 MayDaniel left 19:09 xinming left 19:16 xinming joined 19:20 xinming left 19:24 jimmy1980 left 19:26 Chillance left 19:29 jimmy1980 joined 19:37 cooper joined 19:41 wooden joined 19:46 xinming joined, daxim left 19:50 xinming left 19:51 bacek joined
sorear good * #perl6 19:53
jnthn evenin', sorear 19:55
19:56 xinming joined
sorear Timbus: I'm not sure if niecza's Threads.pm6 supports nonconsentual termination of threads. That kind of feature is quite out of favor in modern libs like the CLR :| 19:59
20:04 xinming left 20:10 MayDaniel joined 20:11 ksi left 20:13 mkramer left 20:15 xinming joined
sorear plays a bit with colomon's mandelbrot 20:18
moritz [Coke]: thanks, fixed 20:19
colomon sorear: improved version coming in a couple of minutes -- now with zoom!
20:20 xinming left 20:21 xinming joined
sorear colomon: I was thinking a cool feature would be incremental rendering 20:22
sorear will try that 20:23
sorear wonders what @color_map is and why it's not procedural
colomon @color_map is the old fractint color scheme 20:24
20:24 wolfman2000 left
colomon why it's not procedural -- I haven't studied it enough to find a pattern, if it has one. 20:25
sorear another glaring issue I'll look at: it crashes on resize, but declares itself resizable in the metadata
colomon sorear: I've got resizing fixed, I believe.
sorear my WM fullscreens resizable windows by default, and mandelbrot crashes before I have a chance to un-fullscreen it 20:26
20:26 MayDaniel left
colomon but zooming isn't quite zooming in at the right place yet. 20:26
sorear has been playing with mandelbrot using Xnest :1 with no WM running inside. Ugly but works
colomon let me go ahead and upload what I've got anyway. 20:27
pushed 20:28
20:33 fridim_ left, xinming left
sorear hrm, opening a fullscreen mandelbrot might still take a while 20:34
colomon right
20:34 xinming joined
sorear wants to make this thing multi-threaded with the ability to cancel renders 20:34
20:35 y3llow joined 20:36 localhost left 20:37 localhost joined
colomon sorear: sounds like a noble ambition. 20:37
I've also thought about a progress bar.
although displaying it as it is calculated would also be cool. 20:38
anyway, I probably should do an hour or two of $work now
I think this counts as a reasonably successful day of niecza/gtk hacking. :) 20:39
20:39 MayDaniel joined 20:42 lab7 joined
sorear wonders if it would be a net win to have the main loop detect attractive limit cycles (approximate repetition with negative Lyapunov exponent) and just return Inf 20:43
as a special case, detecting the large disks (which wouldn't help much when zoomed) 20:44
colomon my old mandelbrot program detected repetition. but it was running higher order polynomials, so skipping calculations was a big win. 20:47
I've been thinking about the large disk case, it seems a natural improvement.
now googling "negative Lyapunov exponent".... 20:48
dalek : 8adf7dd | moritz++ | misc/perl6advent-2011/ (2 files):
[advent] update schedule, brainstorm
20:51
20:51 xinming left 20:53 xinming joined
sorear what I've never understood about the Mandelbrot set is _why_ it is self-similar. 20:55
20:56 Trashlord joined
colomon I don't know a really good explanation, but I do have a bit of a quick intuitive one that captures some of it. 20:56
sorear the self-similarity in simple iteration fractals makes sense - in an area where the transition map has a large derivative, it creates a scaled down image of a large area 20:57
but that only helps me with Julia, not Mandelbrot
colomon .... and which may be a level simpler than you're already thinking.
20:57 lab7 left
diakopter sorear: magic :) 20:58
Woodi something like 'MyClass.HOW.add_method( ... )' adds method to class. Is a way to add subroutines to module or package ?
or MOP is reserved only for OO ? :) 20:59
sorear Woodi: subroutines aren't actually members of modules or packages 21:00
Woodi no ?
sorear Woodi: by subroutines exist in the lexical scope which cannot be touched at runtime
if you are talking about 'our' subroutines, those exist in MyModule.WHO
not HOW
Woodi sorear: I look for way to add 50 - 100 nearly identical subs in loop and no idea how to do it 21:01
sorear niecza: package Foo { }; Foo.WHO<&mysub> = sub ($x) { say "got $x" }; Foo::mysub(25)
p6eval niecza v12-2-geb42dfa: OUTPUT«got 25␤»
sorear Woodi: I don't think there is a good way. I've faced the same problem
in my last example, the Foo:: is _required_ 21:02
Woodi so Perl6 syntax is Module.WHO<^name> = sub (...) {...} ?
diakopter Woodi: why not store the subs in a hash?
sorear Woodi: Where did you get the ^ from? 21:03
Woodi probably from #perl6 and it work on rakudo atm :)
diakopter: must think a while about that... 21:04
but I was looking for official method :)
21:04 xinming left
colomon nom: my $z = 0; say $z * z -.1 + .7i 21:05
p6eval nom 676b35: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&z' called (line 1)␤»
sorear colomon: I'm looking for a proof, or at least a convincing argument , that z_0 + dz \in M iff z_1 + B*dz \in M with |M| >> 1 for many possible values of z_0
21:06 xinming joined
colomon nom: my $z = 0; say $z * $z -.1 + .7i 21:06
p6eval nom 676b35: OUTPUT«-0.1 + 0.7i␤»
colomon nom: my $z = -.1 + .7i; say $z * $z -.1 + .7i
p6eval nom 676b35: OUTPUT«-0.58 + 0.56i␤»
colomon nom 21:07
;
21:07 tadzik left
colomon nom: my $c = -.1 + .7i; my @m := 0, -> $z { $z * $z + $c } ... *; say @m[^10] 21:08
p6eval nom 676b35: OUTPUT«0 -0.1 + 0.7i -0.58 + 0.56i -0.0772 + 0.0504000000000001i -0.09658032 + 0.69221824i -0.569838333577395 + 0.566290681741926i -0.0959694098134729 + 0.0546117231915473i -0.0937723126900039 + 0.689517890312821i -0.566641674434211 + 0.570684625568469i -0.104598154654616 + …
colomon nom: my $c = -.1 + .7i; my @m := 0, -> $z { $z * $z + $c } ... *; say @m[^10].perl
p6eval nom 676b35: OUTPUT«(0, Complex.new(-0.1, 0.7), Complex.new(-0.58, 0.56), Complex.new(-0.0772, 0.0504000000000001), Complex.new(-0.09658032, 0.69221824), Complex.new(-0.569838333577395, 0.566290681741926), Complex.new(-0.0959694098134729, 0.0546117231915473), Complex.new(-0.0937723126900…
21:08 donri joined 21:12 xinming left
cognominal___ is llvm the defaut for niecza? 21:16
sorear n/a 21:19
llvm is not the default for mono
it's not even compiled in by default 21:20
ime mono --llvm runs Niecza worse than mono does
llvm imposes a fairly significant penalty when you have 5MB of bytecode 21:21
like 30 seconds
and mono --llvm --aot does not seem to work
Woodi oops, I am sleepy, can't read&think properly... s/\^/\$/ And add_method work in Rakudo 21:22
cognominal___ I have not checked llvm yet but reading a news about llvm 3, I was curious. 21:23
Woodi sorear: you say you want threaded interpreter, any specific plans ?
cognominal___ *checked niecza 21:24
sorear Woodi: I do not understand the question
Woodi do you have isea how you would like to implement this ? 21:25
idea
cognominal___ sorear, so mono is more adapted than llvm for a dynamic language? 21:26
21:27 cognominal___ is now known as cognominal
sorear Woodi: I still do not understant. What is a threaded interpreter? 21:28
21:29 xinming joined
sorear cognominal: that's an awkward question because "dynamic language" is a poorly defined concept 21:29
Woodi ok, I must find source of what i think i read in backlog...
sorear cognominal: I would say that Mono's bundled JIT compiler (which is called "mini" for historical reasons) makes very different compilation speed/code quality tradeoffs from LLVM 21:30
colomon: it just occurred to me that I'm not limited to _one_ worker thread. Got a multi-logical-CPU system? 21:31
colomon I've got 4 cores, if that's what you mean
sorear was trying to talk about the multicore and multi-real-CPU cases generically 21:33
colomon fair enough.
21:33 xinming left
sorear colomon: is there any particular reason you have both &mandel and &julia? 21:34
colomon sorear: habit. obviously mandel is just julia with the initial value of 0. 21:35
21:35 MayDaniel left
colomon DRY violation, but I haven't really cleaned up this code yet. 21:35
21:41 xinming joined
colomon I think the bigger question here is, why do I call it $upper-right when it is actually $upper-left? (might have something to do with the fact the set is rotated in the other p6 versions) 21:42
sorear wow, I seem to be actually using a double-linked list 21:44
colomon what for? 21:46
sorear work queue
colomon thread work queue?
21:46 xinming left
sorear yes 21:46
I need something like an array with shift, push, and remove-from-middle 21:47
colomon double-linked list ftw
21:47 xinming joined
sorear hrm, on second thought it might be more elegant to just have a cancelled flag 21:48
colomon are you hacking on gtk-mandelbrot, or is this stuff internal to niecza?
sorear gtk-mandelbrot
21:55 mkramer joined, xinming left 21:56 xinming joined
sorear colomon: does CLR::System::Environment.ProcessorCount return anything useful? 21:58
for you
21:59 fsergot joined 22:00 xinming left 22:01 Jsauidhasj joined
colomon it says 8 22:02
sorear huh. two quad-cores? 22:03
or hyperthreading?
colomon hyperthreading, I guess 22:04
unless Apple forgot to charge me for an extra quad core processor!
fsergot hi o/
colomon Number of Processors:1
Total Number of Cores:4
jnthn has seen a quadcore + HT show up as 8 in various cases before 22:06
colomon jnthn! fsergot! o/
22:06 Mowah_ joined
jnthn o/ 22:07
22:07 xinming joined 22:12 toebu joined
dalek kudo/nom: b238ce4 | jnthn++ | src/core/ (3 files):
Give Positional/Associative/Callable type parameters.
22:15
kudo/nom: 2344572 | jnthn++ | / (2 files):
Bump to latest NQP.
kudo/nom: 7a8679d | jnthn++ | src/ (5 files):
Generalize type parameterization. T[...] now calls T.^parameterize(...), and ParametricRoleGroupHOW gets to decide about CurriedRoleHOW, which is now an implementation details.
kudo/nom: 823b1fa | jnthn++ | src/Perl6/Metamodel/ClassHOW.pm:
Stub in an implementation of ClassHOW.parameterize.
kudo/nom: 3c6b5e5 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Fix a bug in generic instantiation of parameters; the container descriptor also needs to be instantiated.
kudo/nom: 80669d0 | jnthn++ | src/ (2 files):
Make SomeTypeObj but ARole just give you back a new type object representing the original type plus the role mxied in. Explicitly forbid this for does, since you can't change a type object in place.
sorear writes for ^(%*ENV<THREADS> // CLR::System::Environment.ProcessorCount) { ...
22:16 xinming left, mdxi left 22:20 toebu left 22:22 toebu joined, kaare_ left
colomon sorear: I'm going to be on and off for the next few hours, till the big ten championship game settles in. I've given you a mandlebrot commitbit, and I'm very interested in what you are up to. :) 22:28
22:31 cognominal left 22:32 mkramer left 22:33 cognominal joined 22:43 [Sec] left 22:46 mdxi joined 22:50 fridim_ joined 23:03 estrabd joined 23:04 tadzik joined 23:06 toebu left 23:10 xinming joined 23:11 colomon_Droid joined 23:13 Jsauidhasj left 23:14 wolfman2000 joined 23:16 xinming left, am0c joined
japhb sorear, in case you did not already find it -- I think Woodi was referring to en.wikipedia.org/wiki/Threaded_code . 23:19
phenny japhb: 12:44Z <jnthn> tell japhb Well, next week I'll be teaching an advanced C# course. I teach various others. :)
23:19 xinming joined, jimmy1980 left
japhb chuckles that someone who teaches advanced C# chooses to hack on the *other* major compiler. 23:19
23:20 mj41 joined, mdxi left 23:22 xinming left
jnthn It's good to maintain a balance of programming langauges in ones life. :) 23:23
23:23 xinming_ joined
japhb jnthn, true -- a balance I have neglected of late, sad to say. 23:24
sorear japhb: jnthn has been a Rakudo bigshot since before I joined this channel
japhb sorear, I assumed as much. It just strikes my funny bone is all. ;-) 23:25
23:25 jimmy1980 joined
jnthn thought he'd "just implement junctions" :) 23:27
japhb Seems like I've heard that sort of thinking before ... ;-) 23:29
23:33 simcop2387 left 23:34 simcop2387 joined, xinming_ left
japhb perl6: 1.23bad 23:35
p6eval niecza v12-2-geb42dfa: OUTPUT«===SORRY!===␤␤Whitespace is required between alphanumeric tokens at /tmp/0jqnWhztni line 1:␤------> 1.23⏏bad␤␤Two terms in a row at /tmp/0jqnWhztni line 1:␤------> 1.23⏏bad␤␤Parse failed␤␤»…
..pugs b927740: OUTPUT«*** ␤ Unexpected "bad"␤ expecting exponent, term postfix or operator␤ at /tmp/E3pnncBmZJ line 1, column 5␤»
..rakudo 80669d: OUTPUT«===SORRY!===␤Confused at line 1, near "1.23bad"␤»
23:40 mberends left 23:41 xinming joined 23:44 mj41 left 23:49 xinming left 23:56 xinming joined