»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by wolfe.freenode.net on 30 October 2009.
sjohnson rakudo: my $str = "cow"; if $str != "pig" or "chicken" { print 1; } 00:05
p6eval rakudo 77bf8c: 1
sjohnson rakudo: my $str = "cow"; if $str != "pig" or "cow" { print 1; } else { print 2; }
p6eval rakudo 77bf8c: 1
rjbs rakudo: my $str = "cow"; if $str != "pig" or "hen" { print 1; } else { print 2; } 00:06
p6eval rakudo 77bf8c: 1
rjbs "cow" is true, presuambly.
rakudo: my $str = "cow"; if $str != "pig" | "cow" { print 1; } else { print 2; } 00:07
sjohnson rakudo: my $str = "cow"; if $str == "pig" or "cow" { print 1; } else { print 2; }
p6eval rakudo 77bf8c: 2
rakudo 77bf8c: 1
sjohnson oops
rjbs you want | to get the junction, iirc.
sjohnson rakudo: my $str = "cow"; if $str == "pig" or "cow" { print '1-sj'; } else { print '2-sj'; }
p6eval rakudo 77bf8c: 1-sj
sjohnson rakudo: my $str = "cow"; if $str == "pig" or "hen" { print '1-sj'; } else { print '2-sj'; }
p6eval rakudo 77bf8c: 1-sj
sjohnson hmmmmmmmmmmmmmmm
rjbs now, try with |
sjohnson k
rakudo: my $str = "cow"; if $str == "pig" | "hen" { print '1-sj'; } else { print '2-sj'; } 00:08
p6eval rakudo 77bf8c: 1-sj
rjbs oh well.
time to get off the bus.
sjohnson heh
i know there's sort of an (3 < $i < 6) type syntax in p6
i wonder if my animal example works in p6 somehow 00:09
ash_ rakudo: my $a = 'cow'; if $a ~~ 'hen'|'cow' { say 1; }
p6eval rakudo 77bf8c: 1␤
ash_ rakudo: my $str = "cow"; if $str ~~ "pig" | "hen" { print '1-sj'; } else { print '2-sj'; } 00:10
p6eval rakudo 77bf8c: 2-sj
sjohnson ash_: do you know if this is exactly the same internals as writing a (pig|hen) regex?
or if it's trying two separate comparisons, as i hope it is doing 00:11
ash_ it should be 2 different comparisions
sjohnson ash_++ # smart
ash_ rakudo: say ('pig' | 'hen').WHAT;
p6eval rakudo 77bf8c: Junction()␤
ash_ that should be doing a Str smart matched to a Junction
sjohnson rakudo: say /(pig|hen)/.WHAT 00:12
p6eval rakudo 77bf8c: Regex()␤
sjohnson rakudo: say {(pig|hen)}.WHAT
p6eval rakudo 77bf8c: Block()␤
sjohnson say (m{moose}).WHAT
ash_ there is a big list of smartmatch precedence in one of the specs i think S03
sjohnson rakudo: say ('pig' or 'hen').WHAT; 00:13
p6eval rakudo 77bf8c: Str()␤
ash_ rakudo: say 'pig' or 'hen'; 00:14
p6eval rakudo 77bf8c: pig␤
ash_ thats strange, i still don't see why my $str = "cow"; if $str == "pig" | "hen" { print '1-sj'; } else { print '2-sj'; } returned 1-sj 00:15
sjohnson probably because "hen" returns true 00:16
ash_ i think junctions need to be used with smart match '~~'
sjohnson rakudo: my $str = "cow"; if $str == "pig" | "0" { print '1-sj'; } else { print '2-sj'; }
p6eval rakudo 77bf8c: 1-sj
00:16 cotto joined
sjohnson hmm....... 00:16
colomon sjohnson: you're using == for Str
sjohnson not sure actually
colomon shouldn't it be eq?
sjohnson ahh yes
too much PHP programming today
ash_ lol totally forgot about that 00:17
sjohnson rakudo: my $str = "cow"; if $str eq "pig" | "0" { print '1-sj'; } else { print '2-sj'; }
p6eval rakudo 77bf8c: 2-sj
sjohnson rakudo: my $str = "cow"; if $str eq "pig" | "hen" { print '1-sj'; } else { print '2-sj'; }
p6eval rakudo 77bf8c: 2-sj
sjohnson thansk colomon
<--- jaded PHP eyes today
ash_ i have been looking at javascript all day, i was about to suggest === 00:18
sjohnson heh 00:19
i was trying to do some .vimrc coding today 00:20
using a bunch of == signs
unfortunately, easy2lrn documentation with nice real-life examples wasn't easy to come by
decided to quit wasting work-time
00:25 ash_ left 00:27 ash_ joined
sjohnson rakudo: my $i = 30; if 4 < $i < 50 { print 1; } 00:30
p6eval rakudo 77bf8c: 1
sjohnson rakudo: print (4 < 5).WHAT
p6eval rakudo 77bf8c: Bool()
sjohnson rakudo: print (4 < 5 < 40).WHAT
p6eval rakudo 77bf8c: Bool()
colomon Anyone have a quick pointer to the spec discussion on "so" (formerly "true"?)? 00:33
00:34 ihrd1 joined, ihrd1 left
colomon errr... I see S03, anything else? 00:35
diakopter colomon: I think groups.google.com/group/perl.perl6....301e6b859b 00:39
colomon Another question: is it expected subst will evaluate its $replacement in the context of the Regex match that it is being substituted for?
diakopter: thanks! 00:40
00:42 Techjar joined 00:43 Techjar is now known as Teckjar 00:49 Teckjar left 00:52 ash_ left 00:56 Student joined
dalek kudo/ng: da89dd6 | (David Romano)++ | src/c (2 files):
Remove &infix:<x> in cheats and update version in Any-str.pm

modified: src/core/Any-str.pm
01:18
01:18 dalek left, dalek joined
colomon So many ng patches from unobe++ that dalek broke. Yay! 01:20
sjohnson heheh 01:23
01:23 ssm left, parduncia left, eiro left, dalek left, stephenlb left, Exodist left, jferrero left, trondham left, jan_____ left, patspam left, rgrau left, orafu left, literal left, avar left, omega_ left, slavik left, buubot left, PacoLinux left, lisppaste3 left 01:24 synth left, dalek joined 01:26 stephenlb joined, rgrau joined, orafu joined 01:27 synth joined 01:32 Exodist joined, jferrero joined, trondham joined, jan_____ joined, patspam joined, omega_ joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined 01:33 omega__ joined, parduncia joined, eiro joined, ssm joined
sjohnson std: local $goose; 01:33
p6eval std 29401: Potential difficulties:␤ Variable $goose is not predeclared at /tmp/2Vqf82o4VK line 1:␤------> local $goose⏏;␤Undeclared routine:␤ 'local' used at line 1␤ok 00:01 105m␤
01:34 mikehh left 01:35 explorer__ joined, explorer__ left 01:36 payload left, explorer__ joined, avar joined, literal joined, explorer__ left 01:37 explorer__ joined 01:39 agentzh joined 01:43 ssm left, parduncia left, eiro left 01:46 literal left, avar left, omega__ left, slavik left, jan_____ left, buubot left, trondham left, PacoLinux left, lisppaste3 left, omega_ left, patspam left, jferrero left, Exodist left 01:54 eiro joined 01:55 parduncia joined, ssm joined, Exodist joined, trondham joined, jan_____ joined, patspam joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined 01:57 omega joined 01:58 literal joined 01:59 avar joined 02:00 Alias joined, literal left, literal joined 02:03 omega left, omega joined, omega left 02:04 xinming joined 02:08 omega_ joined 02:11 xinming_ left 02:12 explorer__ left 02:16 jaldhar joined, rgrau left 02:25 payload joined 02:32 idemal left 02:37 idemal joined, idemal left, idemal joined 02:41 d4l3k_ joined 02:42 baest_ joined 02:43 agentzh left, synth left, dalek left, IllvilJa left, justatheory left, partisan left, drbean___ left, dbrock left, simcop2387 left, cls_bsd left, zamolxes left, jrockway left, Lorn left, baest left, hatseflats left, cotto_w0rk left, perigrin left, yahooooo left, LionMadeOfLions left 02:44 cotto_w0rk joined, d4l3k_ is now known as dalek 02:45 jrockway joined, drbean joined, LionMadeOfLions joined, perigrin joined 02:46 zamolxes joined, cls_bsd joined, simcop2387 joined 02:47 xomas left 02:48 partisan joined, yahooooo joined 02:49 LionMadeOfLions left 02:50 cotto_w0rk left, agentzh joined, synth joined, IllvilJa joined, justatheory joined, drbean___ joined, dbrock joined, hatseflats joined, cotto_w0rk joined, LionMadeOfLions joined 02:51 dbrock left, LionMadeOfLions left, hatseflats left, drbean___ left, LionMadeOfLions joined, cotto_working joined 02:53 Lorn joined, hatseflats joined 02:54 SmokeMachine left
sjohnson rakudo: if -e '/bin/ls' { print 1 } 03:08
p6eval rakudo 77bf8c: 1
sjohnson rakudo: if (-e | -r '/bin/ls') { print 1 }
p6eval rakudo 77bf8c: Could not find non-existent sub r␤in Main (file src/gen_setting.pm, line 324)␤
03:10 cotto_w0rk left
sjohnson bad example.. 03:11
diakopter std: if -e '/bin/ls' { print 1 } 03:17
p6eval std 29401: ===SORRY!===␤Missing block at /tmp/LjNhPHxYDQ line 1:␤------> if -e ⏏'/bin/ls' { print 1 }␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ parameterized block␤ standard stopper␤ terminator␤FAILED 00:01 105m␤
colomon Isn't it something like
std: if '/bin/ls' ~~ :e { print 1 }
now?
p6eval std 29401: ok 00:01 105m␤
diakopter rakudo: if '/bin/ls' ~~ :e { print 1 } 03:18
p6eval rakudo 77bf8c: 1
diakopter rakudo: if '/bin/ls' ~~ :d { print 1 }
p6eval rakudo 77bf8c: ( no output )
diakopter rakudo: if '/bin/ls' ~~ :d { print 1 } else { print 0 }
p6eval rakudo 77bf8c: 0
diakopter rakudo: if '/bin/ls' ~~ :z { print 1 } else { print 0 }
p6eval rakudo 77bf8c: Method ':z' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤
diakopter rakudo: if '/bin/ls' ~~ :f { print 1 } else { print 0 } 03:19
p6eval rakudo 77bf8c: 1
diakopter rakudo: if '/bin/ls' ~~ :F { print 1 } else { print 0 }
p6eval rakudo 77bf8c: Method ':F' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤
diakopter cool
sjohnson hmm 03:20
is :e a symbol?
say :e.WHAT
rakudo: say :e.WHAT
p6eval rakudo 77bf8c: Pair()␤ 03:21
sjohnson rakudo: say :e.perl
p6eval rakudo 77bf8c: "e" => 1␤
sjohnson rakudo: if '/bin/ls' ~~ :e | :d { print 1 } else { print 0 }
p6eval rakudo 77bf8c: 1
sjohnson rakudo: if '/bin/ls' ~~ :e & :d { print 1 } else { print 0 }
p6eval rakudo 77bf8c: 0
03:23 ssm left, parduncia left
sjohnson rakudo: say (:e).WHAT 03:23
p6eval rakudo 77bf8c: Pair()␤
sjohnson rakudo: say (:e).perl 03:24
p6eval rakudo 77bf8c: "e" => 1␤
03:24 hatseflats left, cotto_working left, LionMadeOfLions left, IllvilJa left, synth left, justatheory left, agentzh left 03:25 _jaldhar joined, parduncia joined, ssm joined 03:26 cotto_working joined 03:27 hatseflats joined, omega__ joined 03:28 jaldhar left, omega_ left, literal left, avar left, slavik left, jan_____ left, buubot left, trondham left, PacoLinux left, lisppaste3 left, patspam left, Exodist left 03:29 ssm left, parduncia left 03:30 parduncia joined, ssm joined, Exodist joined, trondham joined, jan_____ joined, patspam joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined, avar joined 03:32 literal joined 03:34 cotto_working left, cotto_working joined, LionMadeOfLions joined, agentzh joined, synth joined, IllvilJa joined, justatheory joined, LionMade1fLions joined, LionMadeOfLions left, cotto_w0rk joined 03:39 cotto_working left 03:44 ssm left, parduncia left 03:46 literal left, avar left, slavik left, jan_____ left, buubot left, trondham left, PacoLinux left, lisppaste3 left, patspam left, Exodist left 03:47 JimmyZ joined 03:48 cotto_w0rk left, LionMade1fLions left, IllvilJa left, synth left, justatheory left, agentzh left, cotto_working joined, parduncia joined, ssm joined
sjohnson darn net splits 03:49
03:49 LionMadeOfLions joined 03:50 ssm left, parduncia left, parduncia joined, ssm joined 03:52 Exodist joined, trondham joined, jan_____ joined, patspam joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined, literal joined, avar joined 04:05 cotto_w0rk joined, LionMade1fLions joined, agentzh joined, synth joined, IllvilJa joined, justatheory joined, LionMade1fLions left 04:06 cotto_w0rk left 04:13 ssm left, parduncia left, parduncia joined, ssm joined 04:14 JimmyZ left 04:15 IllvilJa left, synth left, justatheory left, agentzh left, literal left, avar left, slavik left, jan_____ left, buubot left, trondham left, PacoLinux left, lisppaste3 left, patspam left, Exodist left 04:18 ssm left, parduncia left, parduncia joined, ssm joined 04:21 Exodist joined, trondham joined, jan_____ joined, patspam joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined, literal joined 04:23 agentzh joined, synth joined, IllvilJa joined, justatheory joined, avar joined 04:24 patspam left 04:38 mikehh joined 04:48 Student left
diakopter TimToady: hihi 05:21
05:21 FalseVinylShrub joined 05:23 meppl joined 05:24 racheldaBROWN left, justatheory left, racheldaBROWN joined 05:47 FalseVinylShrub left 05:50 synth left 06:12 Baggio_ joined 06:15 synth joined 06:18 racheldaBROWN left, racheldaBROWN joined 06:54 baest_ is now known as baest 06:59 Baggio_ left 07:01 Baggio_ joined 07:07 mberends joined 07:14 synth left
mberends phenny, tell pmurias the V8 scons fails with errors on Ubuntu 9.10 gnu c++ 4.4.1 07:18
phenny mberends: I'll pass that on when pmurias is around.
07:29 Calimbeul left 07:58 szabgab left, szabgab joined 07:59 Baggio_ left 08:02 Baggio_ joined 08:07 praveenraj joined 08:09 praveenraj left 08:14 ejs joined 08:17 bryan[c1] joined 08:19 kangu joined
mberends hi bryan 08:20
08:23 bryan[c1] left 08:25 ejs1 joined 08:29 rgrau joined 08:31 iblechbot joined 08:33 ejs left 08:43 meneldor joined 09:00 Chillance joined
meneldor hello guys :) 09:00
09:07 meppl left 09:25 meppl joined 09:30 Su-Shee joined
Su-Shee good morning 09:31
diakopter Su-Shee: hi 09:33
09:37 stephenlb left 09:39 JimmyZ joined 09:41 kaare joined, kaare is now known as Guest75254 09:47 TiMBuS joined 09:55 ejs2 joined, synth joined, JimmyZ left 10:00 mikehh left 10:01 mikehh joined 10:05 ejs1 left 10:26 payload left 10:35 IllvilJa left 10:39 Baggio_ left 10:41 Baggio_ joined 10:43 betterworld left, betterworld joined 10:49 agentzh left 10:52 payload joined 10:59 Baggio_ left 11:00 Baggio_ joined 11:05 Baggio_ left 11:07 mikehh left 11:15 masak joined 11:39 rodi joined 11:51 kangu left 11:53 bluescreen joined 11:59 ruoso joined 12:13 ejs2 left 12:15 ejs2 joined 12:20 Baggio_ joined
masak I'm having loose thoughts of announcing another prize for Perl 6 software. 12:25
any ideas what would make a good prize?
the theme, I mean, not the amount of money.
sbp first full reimplementation of awk in perl6 12:29
masak :) 12:30
the good things about the wiki prize were, off the top of my head, (1) that it seemed pretty much unattainable at the time (2006), (2) that doing it required collaboration between several people, (3) that doing it caused bugs to be found and features to be developed. 12:31
hejki masak: you know stuff about parrot internals ey? 12:34
masak hejki: whoever told you that is a liar and a coward. :)
hejki ahh
masak seriously, I don't know that much. 12:35
hejki i was just drawing conclusions about your operator status on #parrot :P
dang..
masak yes... making me op on #parrot was a strange move.
hejki i didn't receive any reply concerning my S_ISLNK-macro patches :|
only thing i got in response was "i don't know.." :P
masak hejki: so, you have complete patches and would like them to be committed, is that it? 12:36
or you have patches and would like comment on them?
hejki i have patches which seem to be done in a correct manner, however the S_ISLNK-macro doesn't seem to work as intended
and i could've used some debugging help from someone aware of parrot internals 12:37
i.e. am i missing some file, am i doing something awfully wrong.. etc
masak nod.
hejki ye 12:38
masak my best advice is to persist on #parrot.
hejki plus i'm a bit sick now.. caught a xmas-flu
ye
i think i'll take a more deep dive into it after i get better
masak the people there know their stuff, but they're awake and avaliable at different times of the day.
hejki all the mucus makes me think slow
good thing about my patches are that the :l -implementation i patched locally for rakudo is returning different values after my patches applied to parrot :) 12:39
masak :)
hejki (i.e. it's not calling the S_ISREG-macro anymore, but instead calls the S_ISLNK-macro i defined. it's just not WAI :))
also i think i need to take some time to check out ng-branch and examine it 12:40
(if i'm gonna try and make the {open,close,read}dir-stuff)
masak hejki++ # rich in initiative 12:42
hejki karma hejki 12:43
;<
masak lambdabot used to do that, but of late, it has strangely crept below our threshold of bot etiquette, so it got booted. 12:44
12:45 pmurias joined
pmurias mberends: could you nopaste the errors? 12:45
phenny pmurias: 07:18Z <mberends> tell pmurias the V8 scons fails with errors on Ubuntu 9.10 gnu c++ 4.4.1
12:46 Guest75254 left, Guest75254 joined 12:48 soupdragon left 13:07 takadonet joined
takadonet morning all 13:07
13:09 plainhao joined, jan_____ left 13:19 masak` joined, avar left, literal left, slavik left, buubot left, trondham left, PacoLinux left, lisppaste3 left, Exodist left, Guest75254 left, pmurias left, ruoso left, masak left, payload left, TiMBuS left, iblechbot left 13:21 nbrown left 13:22 pmurias joined, masak` is now known as masak
takadonet hey masak 13:23
13:25 Exodist joined, trondham joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined, literal joined, avar joined 13:27 Student joined, ruoso joined 13:29 Guest75254 joined, TiMBuS joined 13:31 ssm left, parduncia left 13:32 payload1 joined 13:33 payload joined, parduncia joined, ssm joined, payload left 13:35 TiMBuS left 13:38 xinming_ joined 13:41 anonymous joined
anonymous ehlo 13:41
takadonet hello 13:43
colomon \o
13:46 literal left, avar left, slavik left, buubot left, trondham left, PacoLinux left, lisppaste3 left, Exodist left
colomon masak: funny you should mention a prize. My wife was just telling me I should ask to see if anyone had $work they needed done in the next three days. :) 13:47
13:49 avar joined, literal joined, Exodist joined, trondham joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined 13:50 avar left, avar joined, cognominal joined, literal left
anonymous is rakudo a kind of VM for perl? Or is that parrot? 13:51
hejki that's parrot. rakudo is an interpreter that runs on parrot. at least that's how i've understood it :) 13:52
13:53 xinming_ left, Guest75254 left, orafu left
colomon hejki is correct 13:53
13:53 orafu joined
hejki rakudo might be a compiler on parrot as well (instead of interpreter), atm i'm not sure if compiling actually works - so i'm not sure if it deserves to be called a compiler :P 13:54
13:54 Guest75254 joined, literal joined 13:56 xinming_ joined, xinming left
colomon It definitely compiles to PIR, which is the Parrot VM's language. 13:58
tomasp.net/blog/accelerator-life-game.aspx
anonymous thx
colomon I'm pondering how to implement Life relatively efficiently in p6...
anonymous implementing life is indeed a difficult thing ... ;) 13:59
sry
nm 14:00
rodi colomon: I have implemented some other cellular automata in Perl6, though nothing approaching relative efficiency. 14:05
In theory, autothreading should be a big boost on any cellular automata, but the current implementations don't (yet) benefit from it much. 14:06
hejki colomon: woot.. how do i compile something into PIR?
colomon: and shouldn't parrot be able to make PIR -> runnable binarry?
s/rry/ry/;
colomon hejki: gotta run, alas, but look at the build stuff in a proto package like SVG... "standard" Configure.pm builds to pir. 14:09
actually, that is done in Test.pm in standard RAkudo build, too.
afk
hejki oh 14:10
nice.. i'll check it out at some point. TFTI
14:16 bluescreen left, kangu joined
masak colomon: I don't know about work that needs to be done, but I would like to set expectations/goals/dreams a bit higher with a slightly ambitious prize. 14:21
I'm thinking fairly long-term, like the wiki prize was. 14:22
14:22 anonymous left 14:27 bluescreen joined 14:32 patspam joined 14:33 Baggio_ left 14:40 rgrau` joined 14:46 ejs2 left 14:50 Baggio_ joined 14:51 ssm left, parduncia left 14:53 parduncia joined, ssm joined 15:03 Exodist left 15:08 Student left 15:09 Student joined 15:11 kangu left 15:15 KyleHa joined
hejki masak: ~~ :l implementation done with the File.'is_link' -method call :) 15:24
masak \o/
hejki care to test out and possibly push it? it's not pretty, but at least it seems to WAI for me
masak feel free to nopaste. 15:25
hejki pastie.org/760061 15:26
based on my test-script it should work correctluy
s/uy$$/y/;
15:26 iblechbot joined
hejki woot.. file.pmc's is_link-method actually does use S_ISLNK-macro :D 15:27
guess the PMC-stuff is kept separate from opcodes
(see src/pmc/file.pmc row 146 ->) 15:28
funny :)
masak the patch looks OK to me. 15:30
applying.
pushed. hejki++ 15:32
dalek kudo/master: db84bc0 | masak++ | src/builtins/any-str.pir:
[src/builtins/any-str.pir] implemented :l
15:33
15:35 SmokeMachine joined, ejs joined
KyleHa Yay for patches. 15:43
masak indeed. 15:46
hejki well i kinda need 'em in something i'm making :)
same goes with the {open,close,read}dir-stuff
it seems to be harder and bigger operation to implement tho :)
masak what are you making? 15:48
hejki something that offers file operations such as finding, recursive listing and stuff 15:49
a helper library for future projects
(i'm kinda used to one i used back with perl5 :)) 15:50
nothing big/stupendous
15:50 iblechbot left
hejki wouldn't be hard to make with the qx{ls -l}-way either, i just don't think using hack-a-rounds in a non-complete language is worse than actually putting in some effort and possibly implement features someone else might need in the future as well 15:51
masak I like that attitude. 15:54
15:55 jan___ joined
hejki heh.. doing things "properly" should be the de facto attitude imo :) 15:56
15:56 Psyche^ joined
KyleHa There's something recursive about that statement, but I'm too distracted to restate it properly. 15:56
masak yes. I default to 'doing things properly', but often fold to 'getting things working, like, now'. 15:57
hejki masak: that's usually my way in the "real world applications" i.e. work-assignments
15:57 Patterner left, Psyche^ is now known as Patterner
hejki masak: but what comes to OSS, i prefer not folding into the simpler way :) 15:58
masak :)
hejki i'm not paid for what i do, so i just might do it properly and not care about the time spent :)
and if it in the best case scenario promotes perl6 progress .. well that could be analogised into a HUGE xmas-bonus :) 15:59
masak I often have a short-term goal which would get lost or diluted if I followed up on all 'proper' leads. so I often just leave a '# RAKUDO' comment and move on.
oh, but I almost always make sure there's at least an RT ticket. :)
hejki i could do that too. but i've documentend the library i'm making and i know what i need for it (that's missing from rakudo :))
this way i get a nice "todo"-list for myself about features i could try implementing into rakudo :) 16:00
masak rakudo: print(print (5+2)+10) 16:02
p6eval rakudo 77bf8c: 171
masak perl6: print(print (5+2)+10)
p6eval elf 29415, pugs, rakudo 77bf8c: 171
masak why does Perl 6 print 171 here, while perl prints 711? perlmonks.org/?node_id=814766
oh, I see it now. 16:03
colomon how can 711 be right?
masak colomon: it's because of the parsing of whitespace after function names.
colomon: it's 7 and then 11.
5 + 2 == 7
colomon I see.
masak and 1 (the result of print) + 10 == 11 16:04
Perl 6 implementations print 17 and then 1.
colomon glad to know my instincts agree with Perl 6 here. :)
rjbs Well, the right answer is: don't do that 16:05
colomon What was the story on the wiki prize? I think that must have been before my time hanging around here.
masak I'll write on PerlMonks (in a sufficiently respectful/humble tone) that Perl 6 aligns its results better with the poster's expectations. :)
colomon: www.perlfoundation.org/perl6/index...._schneiker yapc.tv/2008/ye/lt/lt2-01-masak-vil...-november/ 16:06
hejki thus perl6 is a natural DWIM-language
:>
colomon masak: thanks
masak hejki: yes, that's the idea. though Perl 6 has its own pitfalls, to be sure. 16:07
16:07 _jaldhar left
colomon I certainly never think of print or say as proper functions, really. I would never put parens around their arguments, for instance. 16:08
hejki anything that is supposed to have one objective way and is dealt with subjective randomness has its own pitfalls and caveats :P
16:11 ash_ joined
hejki rakudo: sub ö { say "foo" }; ö() 16:15
p6eval rakudo db84bc: foo␤
hejki rakudo: sub ♬ { say "foo" }; ♬()
colomon masak: that was a terrific lightning talk.
p6eval rakudo db84bc: Malformed routine definition at line 2, near "\u266c { say \"f"␤in Main (file <unknown>, line <unknown>)␤
colomon molasses-ware!!! 16:16
only glancingly touched on the prize issue.
:)
hejki not all unicode is supported yet?
colomon rakudo
rakudo: sub prefix:<♬>($note) { say $note; }; ♬"A"; 16:17
p6eval rakudo db84bc: A␤
masak colomon: thanks. well, the prize was only a minor part of why we did it. :)
colomon I'm sure. You had to be brave souls to try to do anything with Rakudo that early. 16:18
has the wiki prize not been won yet, then?
www.perlfoundation.org/perl6/index...._schneiker
16:25 SmokeMachine left, KyleHa left, bluescreen left, literal left, avar left, slavik left, buubot left, trondham left, PacoLinux left, lisppaste3 left
masak colomon: use.perl.org/~masak/journal/38601 16:28
16:29 Baggio_ left
colomon "I'm crashing Rakudo today, so that it won't crash for you tomorrow. That’s how I like to think of it." ;) 16:30
masak still is. :)
16:31 SmokeMachine joined, KyleHa joined, bluescreen joined, trondham joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined, literal joined, avar joined
ash_ masak is a bug finding robot, with a bit of a chatbot duct taped on 16:32
colomon Occurs to me that when I get depressed about Rakudo's current rate of progress, I should just remember what it was like a year ago. :) 16:33
KyleHa Hey, five bugs shy of 600. Time flies when you're writing code.
Yeah, a year ago there were probably only like 300 open bugs. 16:34
rjbs Progress+
Progress++
masak it was easier to get an overview when there were only 300 :) nowadays I'm not as sure how many duplicates I'm submitting. 16:37
hejki is there any articles on reasons for unicode-motivation? 16:39
16:45 ruoso left
masak hejki: in trying to parse the noun phrase 'reasons for unicode-motivation', I fail. 16:50
hejki i'll rephrase: is there any articles on why unicode is our friend and not a foe :) 16:51
16:51 mrallen1 joined
rjbs I don't think anyone ever thought that was in question. 16:51
masak me neither.
rjbs What's the alternative?
ASCII?
masak EBCDIC. 16:52
rjbs EBCDASCIIC
xalbo perl6: regex test-case {foo}; say "foo" ~~ /<test-case>/;
p6eval rakudo db84bc: Confused at line 2, near "~~ /<test-"␤in Main (file <unknown>, line <unknown>)␤
..pugs: *** ␤ Unexpected "-"␤ expecting subroutine parameters, ":", "is" or "{"␤ at /tmp/cXtBbBhMPZ line 1, column 11␤
..elf 29415: Undefined subroutine &GLOBAL::test called at (eval 129) line 3.␤ at ./elf_h line 5881␤
masak xalbo: Rakudo seems to choke on the '-'. that's a known bug. 16:53
arnsholt hejki: The short answer is that it's the only truly interoperable character set
xalbo Ok. I couldn't find it in the bug tracker.
hejki well i think there should be something to govern pros and cons of using unicode
i know of some perl5 actives who strongly disagree with the unicode-syntax 16:54
arnsholt If you want a single document with Greek, Cyrillic and Latin text all in one, there isn't really anything else that works
masak xalbo: rt.perl.org/rt3/Ticket/Display.html?id=64464
arnsholt Sure, there's an additional burden for those who have to implement it, but it simply is the best solution for text encoding 16:55
xalbo masak: Thanks! Here I was searching for "hyphen" and "identifier". 16:56
pmichaud good morning, #perl6
masak xalbo: I searched for 'regex', narrowed to the 'perl6' queue, and then just visually scanned the 50 or so remaining hits.
colomon o/
masak pmichaud: morning!
16:57 meneldor left 16:58 ejs left 17:00 xinming joined
pugs_svn r29416 | kyle++ | [t/spec] Test for RT 71704: "x !! y" should be a parse error 17:02
r29417 | kyle++ | [t/spec] Test for RT 71702: lethal reverse range in charset
17:02 literal left, avar left, slavik left, buubot left, trondham left, PacoLinux left, lisppaste3 left
pmichaud (silence) ...what it something I said? ;-) 17:02
pugs_svn r29418 | kyle++ | [t/spec] Test for RT 71706: Null PMC Access
17:02 mrallen1 left, bluescreen left, KyleHa left, SmokeMachine left
pmichaud *was 17:03
masak pmichaud: I have questions for you, but I didn't want to overwhelm you :)
pmichaud ah. 17:04
yeah, I decided I needed a bit of a break this past week. :-|
17:04 pmurias left
masak that's allowed, last time I checked the rules. :) 17:04
good time of year for a break, at that. 17:05
17:05 iblechbot joined
pmichaud well, I also figure the next four months are likely to be pretty full :-) 17:05
masak that sounds likely, yes.
17:06 mkb_ joined
ash_ is that because rakudo*? 17:06
pmichaud ash_: yes.
17:06 xinming_ left 17:07 ssm left, parduncia left
ash_ i am already planning on at least 1 app I am going to write with it, well already working on it, but hit a wall, so... just waiting till either I can figure out how to help fix the bug, or someone else beats me to it 17:08
17:08 trondham joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined, literal joined, avar joined, parduncia joined, ssm joined
masak ash_: what's the bug? 17:08
ash_ role's with ^methods don't get their ^methods added to the RoleHOW properly in ng 17:09
so, you can't override things like ^compose 17:10
which is something i'd need to override
masak ah. 17:11
I'm surprised you're writing apps with ng already.
ash_ well, Master branch rakudo doesn't let me do some of the things i wanted to with roles, plus if ng is going to replace master one day i figured i might as well get it working with that 17:12
masak nod. 17:13
I'm not saying it's the wrong things to do. just that it might be a bit of a... bumpy ride. at least before ng lands. 17:14
ash_ eventually, its supposed to be role based persistence, so you can just add the role to an object (hopefully both at runtime and at class composition time) and it gets some magic .save and .^get methods
17:15 cdarroch joined
masak cool. 17:15
pmichaud afk, lunch
17:17 mrallen1 joined, SmokeMachine joined, KyleHa joined, bluescreen joined
ash_ hopefully, tonight or tomorrow I might try tackling the issue of ^methods getting added to the RoleHOW of a role properly, (and ClassHOW for classes because those don't work currently either) 17:18
takadonet ash_: what app are you writing? 17:19
ash_ eventually, its supposed to be role based persistence, so you can just add the role to an object (hopefully both at runtime and at class composition time) and it gets some magic .save and .^get methods 17:20
well, maybe i shouldn't call it an app, more a library
takadonet sounds like my project :) 17:21
masak why the hat on .^get?
proto objects != metaclasses.
17:22 avar left, literal left, slavik left, buubot left, trondham left, PacoLinux left, lisppaste3 left, bluescreen left, KyleHa left, mrallen1 left, SmokeMachine left 17:24 ssm left, parduncia left
ash_ masak: well, my intention is to do Class.^get(id); so you can do like Book.^get(:author => "A guy"); 17:24
eventually
masak yes... 17:25
17:25 parduncia joined, ssm joined
masak ...but you can do that without the metaclass ^ -- just put the method on the class, as usual. 17:25
and call it with Class.get(id)
ash_ well, i thought Class.method()'s where really meta class methods 17:26
masak no, they're ordinary instance methods.
ash_ perlcabal.org/syn/S12.html#Class_methods
masak it's just that the instance happens to be an uninitialized proto-object representing the class. 17:27
ash_ ah, i think i am mis-reading that section
17:27 mrallen1 joined, KyleHa joined, bluescreen joined
masak rakudo: class A {}; say A.new.isa(A) 17:27
p6eval rakudo db84bc: ( no output )
17:27 trondham joined, PacoLinux joined, slavik joined, buubot joined, lisppaste3 joined, literal joined
masak locally, 1. 17:28
rakudo: class A {}; say A.isa(A)
locally, also 1.
p6eval rakudo db84bc: ( no output )
ash_ rakudo i think still timesout when you use classes
masak that's because the object A is acutally an instance of the class A.
ash_: aye.
ash_ ng: class A { }; say A.isa(A);
p6eval ng 4e4d82: 1␤
17:29 SmokeMachine joined
masak in general, meta classes are only needed when you want to change the way OO in Perl 6 behaves. 17:29
ash_ ng: class A { method get { return 'a' } }; my A.get;
p6eval ng 4e4d82: In "my" declaration, typename A must be predeclared (or marked as declarative with :: prefix) at line 1, near ".get;"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
ash_ oops
ng: class A { method get { return 'a' } }; say A.get;
p6eval ng 4e4d82: a␤
17:30 avar joined, ruoso joined
ash_ ng: class A { method get { return self} }; say A.get; 17:30
p6eval ng 4e4d82: A()␤
ash_ hmmm
so... self in some cases is an instance or a class then? 17:31
masak it's an instance.
ash_ ng: class A { method get { return 'a' } }; my $a = A.new; say $a.get; say A.get;
p6eval ng 4e4d82: a␤a␤
masak it just gets printed as 'A()'
ash_ ng: class A { method get { return self } }; my $a = A.new; say $a.get; say A.get;
p6eval ng 4e4d82: A()␤
masak because that's the common way objects get stringified.
ash_ ah 17:32
masak I don't know why the last one only prints one line.
it should have printed two identical lines.
masak tests locally
ash_ $a is returning '' 17:33
ng: class A { method get { return self }; method Str { 'a' } }; my $a = A.new; say 1, $a.get; say 2, A.get; 17:34
p6eval ng 4e4d82: 1a␤2A()␤
ash_ ng: class A { method get { return self }; method Str { 'a' } }; my \$a = A.new; say 1, \$a.get; say 2, A.get.WHAT;
p6eval ng 4e4d82: Malformed my at line 1, near "\\$a = A.ne"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
ash_ ng: class A { method get { return self }; method Str { 'a' } }; my \$a = A.new; say 1, \$a.get; say 2, A.get().WHAT; 17:35
p6eval ng 4e4d82: Malformed my at line 1, near "\\$a = A.ne"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
ash_ ng: class A { method get { return self }; method Str { 'a' } }; my $a = A.new; say 1, $a.get; say 2, A.get().WHAT;
p6eval ng 4e4d82: 1a␤2A()␤
masak there's something funny going on there.
17:36 ejs joined
ash_ ng: class A { }; say A; say A.WHAT; say A.WHAT.WHAT; 17:37
p6eval ng 4e4d82: A()␤A()␤A()␤
ash_ and on it goes, thats odd
i think i ran into this before
17:38 ejs left
masak well, that last one is fine. 17:38
.WHAT returns the proto-object.
17:38 Woodi^ left
masak but I don't see why the custom .Str shouldn't get called on the proto-object as well. 17:39
ash_ ng: class A { }; say (A.^parents).WHAT;
p6eval ng 4e4d82: Method 'WHAT' not found for invocant of class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
ash_ hmm
it leaked a parrot object into ng, thats no good 17:40
masak or why, without a custom .Str, the program `say A.new.get; say A.get` prints only one line.
ash_: yeah. too bad we don't report ng failures as bugs...
ash_ does Mu's .Str return ''?
isn't it Mu that all objects inherit from in ng? 17:41
masak yeah, directly or indirectly. 17:42
arnsholt I think so
masak most normal objects inherit from Any, which inherits from Mu.
ash_ i think it has to do with 1's an instance object and 1's a proto-object 17:46
masak well, they're not supposed to be that different. :) 17:48
rjbs what is .^parents? parent classes of the thing's WHAT? 17:49
is there an easy place for me to get that answer for myself?
ash_ S12 17:50
perlcabal.org/syn/S12.html talks about .^ methods
masak rjbs: also see use.perl.org/~JonathanWorthington/journal/39455 17:51
ash_ .^parents should return a list of parents of the object, and .WHAT should return the type whatever it is, like 5.WHAT returns Int
rjbs is that because the OO is sorta prototype-based? 17:52
ash_ $obj.^method(); methods are actualy translated into $obj.HOW.method($obj);
rjbs Does S12 describe the MOP?
(Sorry, I should look at this myself; I'm distracted and in a meeting. :))
ash_ ummm S12 mentions the MOP but i think thats still kinda changing, it just talks about the OO setup 17:53
masak rjbs: yes, Perl 6 is sorta prototype-based. no, S12 hints at the MOP but doesn't fully describe it.
rjbs Ok. Thanks!
ash_ you can do prototype based if you want, or classical inheritance too
masak rjbs: the best descriptiong of the MOP to date is jnthn's document, somewhere in the ng branch.
ash_ docs/metamodel.pod 17:54
in the ng branch
masak nod.
github.com/rakudo/rakudo/blob/ng/do...amodel.pod
rjbs thanks, I'll try to make time to read it; I look forward to it
masak it's a good read. 17:55
I'm currently reading through the Moose tests in order to contrast and compare.
hey, the declining visitor trend for the advent blog has been broken. yesterday and today, it turned upwards again! :) 17:56
guess people are back to work. :P
ash_ i liked the advent calendar, there should be a countdown calendar for rakudo* 17:57
17:58 dbrock joined
ash_ use.perl.org's layout looks funny in Chromium 4 in OS X... 17:59
takadonet masak: good to hear. I vist the advent calendar all the bloody time
18:01 justatheory joined
diakopter hmm 18:20
takadonet masak: How many visitor are we getting for the advent calendar per day? Couple hundred? thousand?
masak couple hundred.
moritz_ takadonet: we had 40k page views in 23 days or so 18:21
diakopter that accounts for the couple hundred rss aggregator servers
masak it was more or less an even thousand per day after it stabilized after the slashdotting.
moritz_: oh hai
hejki rakudo: say 40_000/23;
p6eval rakudo db84bc: 1739.13043478261␤
takadonet good old slashdotting
masak then on the 21st it started plummetting, at 100 per day. and yesterday it turned upwards again. 18:22
guess people got temporarily distracted by the holidays.
mdxi a page (like the about page) which lists all the entries in chronological order, with a precis for each, might be nice 18:23
or maybe that would be better as a capping entry? dunno. 18:24
takadonet mdxi: perl6.cz/wiki/Perl_6_and_Parrot_links#2009
moritz_ I thought we had such a thing already
mdxi apparently there is 18:25
masak food & 18:26
18:26 masak left
colomon First page of the Advent calendar is a table of contents with each day in it. No precis, though. 18:27
moritz_ perl6advent.wordpress.com/2009/12/0...-calendar/ 18:28
it wouldn't hurt to link to that page somewhere in the navigation bar
but I have to run for food, sorry that I can't do it myself
diakopter also, it'd be nice if that page had a '2009' in the title
moritz_ bye
18:36 nbrown joined 18:50 supernovus joined 18:53 simcop2387 left 18:55 simcop2387 joined
supernovus is it possible to export constants, for reuse in other classes? Something like: constant HI is export = "Hello world"; (which doesn't currently work in Rakudo main) 18:56
TimToady supernovus: STD does it, but I don't think rakudo does yet 18:59
std: onstant HI is export = "Hello world";
p6eval std 29401: ===SORRY!===␤Preceding context expects a term, but found infix = instead at /tmp/Y107MUmAAD line 1:␤------> onstant HI is export =⏏ "Hello world";␤FAILED 00:01 105m␤
TimToady std: constant HI is export = "Hello world";
p6eval std 29401: ok 00:01 105m␤
supernovus TimToady: thanks, it seemed like something that should work. I'll try it out on the 'ng' branch and see what it does :-) 19:01
19:05 SmokeMachine left
rjbs what does the eject symbol stand for in the p6eval output? 19:07
19:08 jferrero joined
KyleHa rjbs: That dingus at the end is the newline char. 19:08
rakudo: say 'hi'; 19:09
TimToady the eject symbol is the current parse position
p6eval rakudo db84bc: hi␤
KyleHa rakudo: print 'hi';
p6eval rakudo db84bc: hi
colomon I'm pretty sure constant doesn't work yet in ng.
TimToady and if you're on a colored output, separates the green "parsed okay" section from the red "didn't parse" section 19:10
colomon At least, my last attempts to define pi as a constant there failed.
rjbs TimToady: thanks
I think I'd realized that once before in an example wher eit was clearer, and I was frustrated at not remembering what it was :) 19:11
TimToady we put the eject symbol there for people who are red/green colorblind, in fact
supernovus colomon: okay, thanks. In master it seems constant declaration works, and it doesn't complain if you add the 'is export' but when you import the module into another package, it doesn't recognize the exported symbols. 19:14
takadonet TimToady: What about people that are fully colorblind? :)
TimToady then they'll have to avoid using the ⏏ shape in their program :)
so that it remains distinctive
or they can change it via env vra 19:15
*var
takadonet well looks like I will be doing that then
19:18 justatheory left, justatheory_ joined
TimToady you don't like the eject symbol? it seems rather appropriate, in a basebally 'you're outta here' sense :) 19:19
or in a jet fighter sense, now that I think of it... 19:21
ash_ so, with methods on a class, is there a way to tell if its the class calling it vs an instance? like MyClass.method() vs $instance.method()
TimToady specced that you can subtype the invocant with :U and :D, but NYI 19:22
colomon in the former case self is not defined? (he guessed)
:U and :D?
TimToady undefined and defined subset types, basically 19:23
method foo (Mytype:U $self: @args) will only match undefined $self
but yes, you could test self.defined 19:24
mdxi clearly we need a glyph LEFT POINTING REFEREE HOLDING ALOFT PENALTY CARD or similar
19:24 kangu joined
ash_ ng: class A { method foo { self.defined } }; say A.foo; say A.new.foo; 19:25
p6eval ng 4e4d82: 0␤1␤
ash_ okay, cool
thanks, didn't know about that
19:26 KyleHa left
TimToady decommuting from Seattle Children's... & 19:26
colomon Just got a message (comment approval, but I don't know if I should) asking what the license is on the p6 Advent calendar.
don't think we ever addressed that.... 19:27
19:28 lisppaste3 left 19:29 meppl left, lisppaste3 joined, KyleHa joined 19:45 thowe joined 19:53 rodi left 19:54 payload joined, payload1 left
ash_ is there anywhere in the spec that talks about having to do things like use strict; on every file? is there a way to specify a folder or something that it will apply to? 19:57
or maybe a namespace? 19:58
Tene ash_: strict is on by default. 20:01
ash_: I don't know of any implementation that support turning strict off.
ash_ but can you specify your own things to that will be included in multiple files? so you only have to do it once 20:02
Tene Oh. Dunno.
sjohnson p6 Q: is there a "!when" to the given / when structure? like... "not" or "no" "didnot" or something 20:21
20:21 racheldaBROWN left, snearch_ joined
mberends sjohnson: default { ... } should do it 20:22
perlcabal.org/syn/S04.html#Switch_statements 20:23
ash_ how are attributes inherited in perl 6? are 'our' type variables shared between parent's and children? 20:26
20:27 justatheory_ left
colomon sjohnson: you mean "when not" or default? 20:27
sjohnson colomon: when not yeah
much like if / unless 20:28
is when not the way?
colomon good question
There is a !~~ (or is it !~ ?) 20:29
to go with smartmatch. But I don't know how to access it from a when statement.
ash_ $_ right? 20:30
20:30 plainhao left
ash_ you'd do: when $_ !~~ something { ... } i think 20:30
spinclad i think 'if $_ !~~ ...' instead of when; when still means 'if $_ ~~ ...' 20:31
but that loses the implicit succeed 20:32
sjohnson indeed 20:33
<-- worried
ash_ well, when blocks still have the ability to jump to the next block and default, so if your in a given i don't see why not to use when 20:34
sjohnson also the implicit $_
ash_: the thought came to me when doing some p5 given/whens, and i realized that i kind of wanted to do when not (-f) 20:35
err, bad example
spinclad when !:f, if that worked
sjohnson yeah
just realized that p6 trick
spinclad when :f(0), maybe 20:36
ash_ yeah, i see your point
sjohnson would be kind of cool to do a when not (:f) as i use "unless" like this all the time, and i figure whoever blessed {} us with unless might be nice enough to consider this too
ash_ there is an: if $_ ~~ ... but not an: unless $_ ~~ ...
sjohnson i enjoy the happiness if not having to write the $_ part 20:38
diakopter std: :!e!$_ # what does this mean
p6eval std 29401: ok 00:01 105m␤
sjohnson and the ! i suppose too
spinclad iwbni '~~ !<pattern>' meant '!~~ <pattern>', then 'when !<pattern>' would do it
ash_ macro prefix:<when not>(*$var) { return 'when $_ !~~' ~ $var; } 20:39
okay that macro probably wouldn't work but eh /shrug
a 'when not' makes sense if you consider when to equate to if $_ ~~ 20:40
20:40 takadonet left 20:41 kangu left
sjohnson woudln't the when not simply be "if $_ !~" 20:41
ash_ sjohnson: you can probably bring it up in the mailing list, i am sure other's would agree that a 'when not' (maybe not by that name) makes sense to have 20:42
sjohnson thanks for the support ash_++
and encouragement
ash_ from S03: A negated smart match is spelled !~~. 20:43
sjohnson ... and tip
:)
ash_ i am not sure what !~ would do
not + stringify?
sjohnson only one way to find out 20:44
rakudo: say ~!"1000" 20:45
p6eval rakudo db84bc: 0␤
sjohnson rakudo: say (~!"1000").WHAT
p6eval rakudo db84bc: Str()␤
sjohnson looks like your guess is correct
colomon rakudo: say !~"1000";
sjohnson educated guess that is
p6eval rakudo db84bc: 0␤
colomon rakudo: say (!~"1000").WHAT 20:46
p6eval rakudo db84bc: Bool()␤
sjohnson oops i got it backwards
oopsie daisy 20:47
rakudo say (5!).WHAT 20:48
rakudo: say (5!).WHAT
p6eval rakudo db84bc: Confused at line 2, near "!).WHAT"␤in Main (file <unknown>, line <unknown>)␤
sjohnson i thought there was a fib. sequence thing with the !
ash_ sjohnson: not built in by default, but you can write one easy 20:49
sjohnson ahh i just thought it was in there that's all
ash_ perlgeek.de/blog-en/perl-6/custom-o...akudo.html
moritz_++
so, here's an odd question. If you define methods on a role with ^ in the name, and compose that into a class, should those methods be added to the classes HOW? 20:55
sjohnson do you mean "how should..." as your question? 20:56
ash_ well, should they be added into the class at all? 20:57
sjohnson not sure 20:58
ash_ i suppose if you didn't want them added to the class you could call them submethods instead of methods 20:59
20:59 jferrero left
hejki rakudo: say ((4,9,16)>>.sqrt == (2,3,5)) 21:01
p6eval rakudo db84bc: 1␤
hejki rakudo: say (((4,9,16)>>.sqrt) == (2,3,5))
p6eval rakudo db84bc: 1␤
hejki rakudo: say ((4,9,16)>>.sqrt).WHAT) 21:02
p6eval rakudo db84bc: Syntax error at line 2, near ")"␤in Main (file <unknown>, line <unknown>)␤
hejki rakudo: say ((4,9,16)>>.sqrt).WHAT
p6eval rakudo db84bc: Array()␤
21:02 supernovus left
hejki a side effect? 21:02
rakudo: ((4,9,16)>>.sqrt).say
p6eval rakudo db84bc: 234␤
lisppaste3 mberends32 pasted "V8 build failure log for pmurias" at paste.lisp.org/display/92785 21:03
hejki or am i just drunk? :P 21:04
spinclad ash_: but how would you call them, when $obj.^method(...) means $obj.HOW.method($obj,...) instead?
hejki rakudo: my @ar = 1,2,3; my @ar2 = 1,2,3; say @ar == @ar2; say @ar === @ar2;'
p6eval rakudo db84bc: Syntax error at line 2, near "'"␤in Main (file <unknown>, line <unknown>)␤
21:04 mrallen1 left
hejki rakudo: my @ar = 1,2,3; my @ar2 = 1,2,3; say @ar == @ar2; say @ar === @ar2; 21:04
p6eval rakudo db84bc: 1␤0␤
ash_ spinclad: you can do RoleName.^method; 21:05
spinclad which is RoleName.HOW.method(RoleName...) ? 21:06
$obj."^method" might work
21:07 bluescreen left
spinclad if you can shoehorn the defn into the right place 21:07
colomon hejki: what were you trying to do back there?
ash_ spinclad: i am not sure i understand the problem your talking about
hejki colomon: in the sqrt-part? i get an array from (4,9,16)>>.sqrt and i try to == compare it to another array (2,3,5) but it prints 11 21:08
1*
spinclad the problem of referring to a method named '^method'
21:08 ejs joined
colomon hejki: 1 is the printable version of Bool::True 21:09
hejki sure
but mine should return 0
spinclad ah, nm, i misread your question from the start. SRY.
colomon Oh, == doesn't work on arrays 21:10
hejki woot
ash_ spinclad: lets work with an example, so i am referring to if you did: role Foo { method ^bar { } }; class Fooz does Foo { }; then you can do Foo.^bar;
colomon you're comparing +(2,3,4) with +(3,4,5)
which is 3 in both cases
hejki ahh
colomon (ie, the length of the array)
hejki how to compare arrays then?
colomon say (2,3,4) === (3, 4,5)
(maybe?)
rakudo: say (2,3,4) === (3, 4,5)
hejki nope
p6eval rakudo db84bc: 0␤ 21:11
hejki that checks if they're the SAME array
colomon rakudo: say (2,3,4) === (2,3,4)
p6eval rakudo db84bc: 0␤
colomon oh!
hejki yes
colomon rakudo: say ((2,3,4) >>==<< (3, 4, 5)).perl
p6eval rakudo db84bc: [Bool::False, Bool::False, Bool::False]␤
hejki rakudo: say (1,2,3) eqv (1,2,3); say (1,2,3) eqv (2,3,4) 21:12
p6eval rakudo db84bc: 1␤0␤
colomon rakudo: say (2, 3, 4) cmp (3, 4, 5)
hejki :)
p6eval rakudo db84bc: Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤
hejki eqv
that works
colomon there you go. :)
hejki ye :) 21:13
== is more logical tho ..
ash_ hejki: you can do an infix == if you want to compare 2 lists 21:14
hejki sure
21:14 s1n left
hejki and map it as eqv :> 21:14
"map"
first i thought it was some bug in rakudo, but i just had a severe brainfart going on
time for bed now.. laters dudes o/ 21:15
sjohnson cya!
colomon ash_: do you mean hyper == ?
ash_ ah, i see the issue, ==, !=, <, <=, >, >= all convert to Num before comparing 21:16
eq ne lt le gt ge all convert to Str before comparing
21:16 y3llow left
ash_ perlcabal.org/syn/S03.html#Chaining...precedence talks about those operators 21:17
lol, again it boils down to the fact that you almost always can use ~~ and get the right comparison 21:18
rakudo: say (1, 2, 3) ~~ (1, 2, 3); say (1, 2, 3) ~~ (1, 2, 4);
p6eval rakudo db84bc: 1␤0␤
colomon go smartmatch!
sjohnson rakudo: say (1, 3, 2) ~~ (1, 2, 3); 21:21
p6eval rakudo db84bc: 0␤
21:21 s1n joined 21:22 y3llow joined
sjohnson rakudo: say (1, 3, 2).sort ~~ (1, 2, 3); 21:23
p6eval rakudo db84bc: 1␤
21:24 pmurias joined
pmurias ash_: you could write your own module which would include a bunch of things 21:25
ash_ pmurias: so you don't have to do 'use strict' or w/e in everything? 21:29
trondham hm.. how to run an external command and gather the output, like "open my $foo, '-|', '/bin/ls'; while (<$foo>) ..." in perl5? 21:32
colomon trondham: qx{/bin/ls} 21:41
at least, I've got an old p6 script lying around that does that. :)
that returns the entire result as a string.
trondham colomon: ah, thanks :) 21:42
pmurias ash_: use strict is on on default 21:45
ash_: you can minimalise to boilerplate to one line "with use ash_::favourite_modules;" 21:47
ash_ pmurias: and just have my own folder ash_/favorite_modules.pm in ~/.perl6lib i guess 21:52
pmurias ash_: that might depend on the implementation, but something similiar should work 22:03
ash_ rakudo currently checks your ~/.perl6/lib fold in addition to its normal search path 22:04
s/fold/folder
22:09 soupdragon joined 22:19 ruoso left 22:24 iblechbot left 22:32 stephenlb joined 22:34 dryden joined 22:38 Guest75254 left 22:39 payload left 22:40 rachelBROWN joined 22:41 KyleHa left 22:45 snearch_ left 22:48 ejs left
mberends pmurias: hi, V8 build error log in paste.lisp.org/display/92785 22:49
dryden i was wondering if there exists a major fork in the Perl6 effort attempting to simply create the next version of the current Perl with very few changes...like a Perl with Moose like classes built into the core language, blocks/procs (..that might be difficult), more sugar, slightly better performance,...nothing too major. 22:51
rjbs No.
That's called Perl 5.
Perl 5 is not going to get Moose-like classes as part of the VM, pretty much period. It has Moose. Components are better than core features. 22:52
dryden i see. well thank you.
rjbs I'm not sure what you mean by blocks/procs as contrasted with coderefs, specifically. It has Coro and other coroutine systems.
"more sugar" - there is constant discussion of more sugar for some things, which sometimes goes in and sometimes doesn't. 22:53
and "better performance" is *always* on the agenda.
22:54 payload joined
dryden by blocks and procs, i was referring to ruby's support for passing code blocks which is fairly awesome. but I see your point. 22:56
ash_ dryden: you can make anonymous blocks in perl 5 already, which are perfectly acceptable parameters for functions 22:58
dryden Oh well thank you ash_, it was stupid of me to put that on my little list. I feel rather silly now. 22:59
ash_ have you tried rakudo? 23:00
23:00 jferrero joined
Alias drbean, the call_a_function( $param1, sub { whatever } ) has worked for about 10 years 23:00
dryden ah i'm sad to say...i have not yet tried rakudo 23:01
Alias (in Perl 5 that is)
dryden, what OS are you on?
dryden i'm currently using my xp partition. 23:02
23:02 soupdragon left, soupdragon joined
Alias drbean, if you install the Padre Standalone distro of Strawberry, and the Perl 6 plugin, it will automatically drop in Rakudo pre-built for you 23:02
ash_ if you like perl, its definitely worth trying out, read over the specs a bit to see what all is in it. a lot of it already works in rakudo
sjohnson a lot of huge improvements for sure
ash_ perlcabal.org/syn/ have the specs, i'd recommend at least glancing at a few, even if you don't plan on install rakudo right now 23:03
dryden thank you, i'll do that, i've been meaning to try rakudo.
ash_ rakudo: say "this also calls rakudo, if our in irc"; 23:04
p6eval rakudo db84bc: this also calls rakudo, if our in irc␤
dryden wow that's awesome. 23:05
rjbs Rakudo is oodles of fun, even just to play in the repl.
when I finally start writing classes, I expect oodleplexes
dryden haha
ash_ multi-methods are probably my favorite part of perl 6 23:06
that and custom operators
rakudo: sub postfix:<!>(Int $x) { [*] 1..$x }; say 5!;
p6eval rakudo db84bc: 120␤
rjbs I like how well it all seems to hang together.
dryden that is so sweet 23:07
i don't like how people like guido van rossum poke fun at the perl6 project for it's development time.
ash_ oh, and take a gander at the perl6advent.wordpress.com/
dryden good languages time to develop.
thank you 23:08
ash_ rakudo: for^20{my ($a,$b)=<AT CG>.pick.comb.pick(*); my ($c,$d)=sort map {6+4*sin($_/2)},$_,$_+4; printf "%{$c}s%{$d-$c}s\n",$a,$b}
p6eval rakudo db84bc: G C␤ CG␤ G C␤ C G␤ G C␤ G C␤ A T␤ TA␤ AT␤ A T␤ C G␤ A T␤ C G␤ C G␤ CG␤ T A␤ A T␤ G C␤ T A␤ T A␤
ash_ awww, i forgot p6eval removes new lines
i like that one, its from day 16 23:09
of the advent calendar
dryden sweet
23:09 ash_ left 23:10 ash_ joined 23:14 ash_ left 23:20 cognominal left
dryden hmm I'm trying to think of a fun question to ask this community of developers. I think i finally thought of a few. When did you first discover Perl? were you excited? what did you make/write? 23:20
23:20 cognominal joined
elmex dryden: 1999, no, an irc bot 23:24
diakopter dryden: 2003, kinda, spamassassin plugins/mods 23:25
dryden awesome
diakopter dryden: you? 23:26
dryden hmm...2005, yes very excited, and i wrote a project manager for the robotics team. 23:27
i was very inexperienced, still am. 23:29
wow you guys must be very experienced programmers, no wonder i'm so nervous. 23:31
diakopter ? 23:32
sjohnson dryden: i use perl mostly to make a *nix shell 100 times less of a headache
23:33 Alias left 23:34 payload1 joined
dryden that awesome! i tried writing a commandline physics calculator in perl recently..it was lame. 23:34
23:34 payload left
rjbs I think my first Perl (4) program was used to assemble newsfroup posts into easily uudecodeable files. 23:38
dryden how long ago was this? 23:39
sjohnson also write a much better front-end to git than its out-of-the-box commands 23:40
which also give me great headaches 23:41
dryden ah yes, all great programming stems from the effort to make life easier/headache free. 23:42
rjbs I dunno, '96? 23:43
dryden wow, that's a long time ago.
rjbs :'(
23:43 payload1 left
sjohnson i've been programming for only 2 years 23:44
in Perl i mean
i'd say flipping through the Camel book was probably the smartest thing i could have done, as far as trying to learn the language
dryden aww i didn't mean it like that rjbs: you're an experienced perl wizard.
sjohnson hugme: hug rjbs
hugme hugs rjbs
dryden hugs rjbs
ah, i love the camel book, i keep borrowing it from the library, i think it's about time i purchase one. 23:45
arnsholt dryden: For my part, 2003 (I think), a bit I think (can't rellay remember), and little bits and pieces mostly (due to my general problems of finishing what I start =) 23:46
Add spelling to test
23:46 mkb_ left
arnsholt Taste even >.< 23:47
sjohnson dryden: make sure you get the latest edition, though that isn't a challenge to do
dryden yeah i've lost count of the projects i'm started and haven't finished
thank you sjohnson, i will.
arnsholt The Camel book is one of my favourite programming books. It's just so well written 23:48
23:48 Su-Shee left
sjohnson arnsholt: it is very funny too 23:48
arnsholt The K&R C book is another good one
dryden yeah it is rather funny
arnsholt sjohnson: Exactly. It's technical without being dry
sjohnson my brother doesnt "get" the humour in it. i enjoy reading it and have had a few good laughs from it before
soupdragon I love the reasoned schemer but I haven't read very many programming books
eiro someone to tell me what is the ':' char in a regex ?
sjohnson it's like having your best friend who knows Perl well come over and explain it to you over a few beers
23:49 TiMBuS joined
eiro i just found that in S05: 23:49
$string ~~ m/^ \d+ $/;
$string ~~ m/^ \d+: $/;
sjohnson probably matches "3: this is the third item"
arnsholt No
sjohnson ... oops
arnsholt In Perl 6 regexes : means something
eiro (difference between regex and token)
arnsholt 'sec
Anything non-alphanumeric has to be backslashed now 23:50
eiro i'm trying to find the doc... would be in S05 too :=
dryden "You can't use colon for a regex delimiter any more. That's because regex modifiers may now be placed in front of a regex construct" -S05
arnsholt eiro: Under backtracking control, fourth bullet point 23:51
It forces no backtracking to the preceding atom
eiro thanks to you all :) 23:52
sjohnson dryden: run perldoc perlbook for more info
arnsholt So /\d+:/ will eat up all consecutive whitespace and never backtrack into them
eiro arnsholt, i'm reading the doc and test it now.
dryden oh sweet, thanks sjohnson! 23:53
sjohnson dryden: for a great example of my favourite use of perl, it is allowing this: pastebin.com/f76fff53a 23:57
i have dozens upon dozens of userland perl hacks like this, that drastically reduce my headaches at work :)
23:58 pmurias left
rjbs hooray for hugs. 23:58
arnsholt sjohnson: Funky. You've aliased ls to some Perl script, I assume?
eiro arf ... is there a "backtrack for dummies" somewhere ?
rjbs I wish we had a bot that could give me a nap.
or debug my Inform code.
sjohnson indeed i have
arnsholt eiro: The Camel book describes it pretty well 23:59
sjohnson hugme: nap rjbs
dryden sorry, i was away, thanks again sjohnson
arnsholt In the regex chapter, there's a section on it (entitled "The little engine that could(n't)" if memory serves)
sjohnson oh ya and ls 0k # works as ls -l too :)