»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 30 July 2009.
00:02 cdarroch left 00:04 icwiener-_- joined 00:05 kthakore joined
kthakore rakudo: 00:05
where is rakudo bot?
hello? 00:08
00:08 ihrd joined
japhb rakudo: say 'hello' 00:09
p6eval rakudo 24b26a: OUTPUT«hello␤»
kthakore ofmg
awsome
rakudo: say <1 2 3>.WHAT 00:10
p6eval rakudo 24b26a: OUTPUT«List()␤»
kthakore genuis
!!!!
japhb heh 00:11
kthakore rakudo: (<a b> X <1 2>).say
p6eval rakudo 24b26a: OUTPUT«a1a2b1b2␤» 00:12
kthakore rakudo: qx/rakudo is god doing this (<a b> X <1 2>).say/
p6eval rakudo 24b26a: OUTPUT«operation not permitted in safe mode␤in Main (lib/Safe.pm:25)␤»
kthakore nooooo
00:14 ascent_ left, jhelwig left, Hale-Bopp left, buubot left
eternaleye rakudo: multi infix:<ö>( Str $someone, Str $species ) { say "$someone is a $species!" }; ('Camelia', 'Barry' ) »ö« ( 'butterfly', 'camel' ); 00:15
p6eval rakudo 24b26a: OUTPUT«Camelia is a butterfly!␤Barry is a camel!␤»
kthakore how do I do qx interpolation properly?
eternaleye kthakore: You did it properly, but it's disabled for security reasons
00:15 Hale-Bopp joined
kthakore oh 00:15
yayayay
00:16 ascent_ joined, icwiener_ left
eternaleye Although, qx runs thins in the shell, not perl6 00:16
so qx/echo foo/ would work, but qx/say foo/ would only work on OSX (and even then, it would make the word 'foo' come out of the speakers on the computer 00:17
kthakore ok I have a real question now. I am currently working on SDL_perl for perl5 and I noticed a parrot implementation in CPAN. Can the parrot implementation be used in p6
? 00:18
eternaleye I think so. There have been a few demos using OpenGL directly, but I don't know if anyone's used SDL in Rakudo. You could try 'use SDL:from<parrot>'
00:18 buubot joined, jhelwig joined
Tene kthakore: Yes. 00:18
eternaleye rakudo: use SDL:from<parrot>
p6eval rakudo 24b26a: OUTPUT«libSDL not found!␤in Main (src/gen_setting.pm:445)␤» 00:19
kthakore hmmm ....
Tene sdl isn't installed on feather
kthakore so if I wanted to have a common bind between p5 and p6 for SDL. Is parrot or p5/XS better? 00:20
japhb And there's no point trying to use SDL remotely ....
kthakore japhb, lol
eternaleye japhb: I was mainly checking if it would load
00:20 ruz_mac joined
kthakore unless if rakudo can beam it to my Xserver 00:20
Tene kthakore: parrot doesn't interoperate with perl 5 at all.
kthakore Tene, no I mean
for p6 SDL module
is c -> parrot -> p6 or c -> p5 -> p6 better? 00:21
eternaleye kthakore: XS doesn't work on parrot. It uses something different called NCI
kthakore eternaleye, noted above
eternaleye and p5 -> p6 doesn't work yet
kthakore eternaleye, ok
thx
Tene kthakore: p5 -> p6 isn't an option
kthakore back to hacking ...
Tene ah, too late
kthakore lol
thx for rakudo bot
japhb So yes, you want to use the Parrot one. The problem is that not all Parrot libraries have been brought up to date with current spec for loading from HLLs (High Level Languages) 00:22
work in progress, that.
kthakore okie 00:24
ps we are WIP too . github.com/kthakore/SDL_perl/tree 00:25
00:25 payload left 00:32 xinming left 00:36 payload joined
payload perl6: 00:37
perl6: say "something" 00:38
p6eval elf 27872, pugs: OUTPUT«something␤»
..rakudo 24b26a: ( no output )
00:45 ZuLuuuuuu joined
payload say "foo" ~~ m☃foo☄ 01:08
perl6: say "foo" ~~ m☃foo☄
p6eval rakudo 24b26a: OUTPUT«foo␤»
..pugs: OUTPUT«*** ␤ Unexpected end of input␤ expecting "\\", variable name or "\9731"␤ at /tmp/bLPWaSPnVG line 2, column 1␤»
..elf 27872: OUTPUT«Parse error in: /tmp/jhQYJD3GXn␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say "foo" ~~ m☃foo☄␤WHERE:/\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in `comp_unit'␤
..STD_red/std.rb:210…
01:11 ZuLuuuuuu left, ihrd left 01:12 stepnem_ joined, stepnem_ left 01:14 stepnem_ joined 01:19 stepnem left, stepnem_ is now known as stepnem 01:23 payload left 01:24 justatheory joined 01:33 justatheory left 01:36 Whiteknight left 01:52 KyleHa joined 01:53 agentzh left, rhr_ joined 01:54 zamolxes joined 01:58 cytoplasm left
meppl good night 02:00
02:03 meppl left 02:06 rhr left 02:11 alester joined 02:17 tann_ left 02:19 ruz_mac_ joined 02:20 SmokeMachine left 02:28 Chillance joined 02:30 zamolxes left
wayland76 Good morning all :) 02:34
Well, no, Good Afternoon, sorry :)
02:34 KyleHa left 02:35 ruz_mac left, zamolxes joined 02:38 agentzh joined 02:39 mikehh_ joined 02:51 azawawi joined
azawawi std: . 02:51
p6eval std 27872: OUTPUT«===SORRY!===␤Obsolete use of . to concatenate strings; in Perl 6 please use ~ instead at /tmp/FvUHdPC800 line 1 (EOF):␤------> .⏏<EOL>␤FAILED 00:02 36m␤»
02:52 azawawi left 02:53 mikehh left 02:56 justatheory joined 03:14 zamolxes left 03:19 missingthepoint joined 03:20 donaldh left, donaldh joined
wayland76 Ok, this is really cool :) 03:23
I'm converting a program from P5 to P6, and it's eliminating half my code
Just because it has a proper OO system :) 03:24
03:36 kane_ left
missingthepoint wayland76: i can relate, i'm trying to port text::csv, and P6 means a LOT of OO junk can be eliminated 03:39
wayland76 Well, I should've really mentioned the "subset" feature
That's actually eliminating more code than anything else :)
missingthepoint subset? 03:40
wayland76 my subset Str_not2b of Str where /^[isnt|arent|amnot|aint]$/;
(That example is from the docs)
missingthepoint does that work in rakudoL
err, ?
wayland76 There was a lot of code keeping out illegal values
Not sure
But I tend to code in P6, and only do workarounds where I have to 03:41
When I hit bugs, if there isn't an obvious workaround, I tend to block on them
rakudo: my subset Str_not2b of Str where /^[isnt|arent|amnot|aint]$/;
p6eval rakudo 24b26a: ( no output )
missingthepoint think you need to instantiate sometthing there... 03:42
wayland76 rakudo: my subset Str_not2b of Str where /^[isnt|arent|amnot|aint]$/; my Str_not2b $text; $text = 'amnot';
p6eval rakudo 24b26a: OUTPUT«Null PMC access in type()␤in Main (/tmp/9Gge68acKK:2)␤»
wayland76 rakudo: my subset Str_not2b of Str where /^[isnt|arent|amnot|aint]$/; my Str_not2b $text; $text = 'whatever';
p6eval rakudo 24b26a: OUTPUT«Null PMC access in type()␤in Main (/tmp/XTmpf80pmG:2)␤»
wayland76 I'll take that as a "no" :) 03:43
It parses, but fails to run
missingthepoint wonders how it parses 03:44
wayland76 Well, there is that too :)
Why are you doing Text::CSV? Do you need it, or were you looking for a project? 03:45
03:45 zamolxes joined
missingthepoint Pm wanted it 03:45
(well, something to handle CSV data)
and it sure is a great way to find rakudobugs.
wayland76 Yeah, I've submitted more rakudobugs in the last week than ever before 03:47
Actually, maybe only the same
03:47 ancients left
wayland76 (2 over the past year, then two this last week) 03:47
Once I get this project to a sticking point, though, then I'll have to work on some of the Rakudobugs myself if I want to make any progress 03:48
I don't know PIR, though
03:48 ancients joined
wayland76 Or Rakudo's internals :) 03:48
missingthepoint it's fairly easy... have a look at the book on parrot.org 03:49
good docs are good
docs.parrot.org/parrot/latest/html/
"Book PIR"
just added i think
eternaleye rakudo: subset Negation of Str where { /^[isnt|arent|amnot|aint]$/; } my Negation $text; $text = 'amnot'; say $text; $text = 'yesiam'; say $text; 03:50
p6eval rakudo 24b26a: OUTPUT«Statement not terminated properly at line 2, near "my Negatio"␤in Main (src/gen_setting.pm:3363)␤»
wayland76 Yeah, I know there are docs, but I haven't had reason to use PIR yet
eternaleye rakudo: subset Negation of Str where { /^[isnt|arent|amnot|aint]$/; }; my Negation $text; $text = 'amnot'; say $text; $text = 'yesiam'; say $text;
p6eval rakudo 24b26a: OUTPUT«Use of uninitialized value␤Assignment type check failed; expected , but got Str␤in Main (/tmp/zCBaNqjxjY:2)␤»
wayland76 rakudo: subset Negation of Str where { /^[isnt|arent|amnot|aint]$/; }; my Negation $text; $text = 'amnot'; say $text;
p6eval rakudo 24b26a: OUTPUT«Use of uninitialized value␤Assignment type check failed; expected , but got Str␤in Main (/tmp/catVriGbtT:2)␤»
eternaleye rakudo: subset Negation of Str where { /^[isnt|arent|amnot|aint]$/; }; my Negation $text = 'amnot'; say $text; $text = 'yesiam'; say $text; 03:51
p6eval rakudo 24b26a: OUTPUT«Use of uninitialized value␤Assignment type check failed; expected , but got Str␤in Main (/tmp/ZHOa1Ue7wR:2)␤»
eternaleye Hm
wayland76: You could use enums
wayland76 Yeah, in many cases I could 03:52
eternaleye rakudo: enum Negation <isnt arent amnot aint>; my Negation $foo; $foo = '
gah
p6eval rakudo 24b26a: OUTPUT«Statement not terminated properly at line 2, near "= '"␤in Main (src/gen_setting.pm:3363)␤»
eternaleye rakudo: enum Negation <isnt arent amnot aint>; my Negation $foo; $foo = 'isnt'; say $foo'; $foo = 'yesiam'; say $foo 03:53
p6eval rakudo 24b26a: OUTPUT«Statement not terminated properly at line 2, near "'; $foo = "␤in Main (src/gen_setting.pm:3363)␤»
wayland76 In fact, maybe I should. But I think this code will block on a lot of different things, so I'll only do it if I end up blocking on them
eternaleye rakudo: enum Negation <isnt arent amnot aint>; my Negation $foo; $foo = 'isnt'; say "$foo"; $foo = 'yesiam'; say $foo
p6eval rakudo 24b26a: OUTPUT«Assignment type check failed; expected Negation, but got Str␤in Main (/tmp/HpCRpE8SwE:2)␤»
ancients is away (4[O.F.F.L.I.N.E])
03:53 ancients is now known as [ancients]
eternaleye rakudo: enum Negation <isnt arent amnot aint>; my Negation $foo; $foo = isnt; say "$foo"; $foo = 'yesiam'; say $foo 03:54
p6eval rakudo 24b26a: OUTPUT«0␤Assignment type check failed; expected Negation, but got Str␤in Main (/tmp/dHUJySfYCB:2)␤»
eternaleye rakudo: enum Negation <<:isnt<isnt> :arent<arent> :amnot<amnot> :aint<aint>>>; my Negation $foo; $foo = 'isnt'; say "$foo"; $foo = 'yesiam'; say $foo 03:55
p6eval rakudo 24b26a: OUTPUT«Statement not terminated properly at line 2, near ">; my Nega"␤in Main (src/gen_setting.pm:3363)␤» 03:56
eternaleye rakudo: enum Negation <<:isnt('isnt') :arent('arent') :amnot('amnot') :aint('aint')>>; my Negation $foo; $foo = 'isnt'; say "$foo"; $foo = 'yesiam'; say $foo
p6eval rakudo 24b26a: OUTPUT«Assignment type check failed; expected Negation, but got Str␤in Main (/tmp/iGgZruYyLK:2)␤»
eternaleye Hmm
According to $09, that should work 03:57
*S09
wayland76 Looks like I can't use enums eiother then :) 03:58
03:59 kane_ joined
eternaleye rakudo: enum Negation <<:isnt('isnt') :arent('arent') :amnot('amnot') :aint('aint')>>; my Negation $foo; $foo = isnt; say "$foo"; $foo = 'yesiam'; say $foo 04:05
p6eval rakudo 24b26a: OUTPUT«Could not find non-existent sub isnt␤» 04:06
eternaleye rakudo: enum Negation <<:isnt('isnt') :arent('arent') :amnot('amnot') :aint('aint')>>; my Negation $foo; $foo = Negation::isnt; say "$foo"; $foo = 'yesiam'; say $foo
p6eval rakudo 24b26a: OUTPUT«Null PMC access in invoke()␤in Main (/tmp/c3iOVD7jOH:2)␤»
04:06 [ancients] is now known as ancients
eternaleye rakudo: class MyClass { has $!handle = $*IN handles *; method coyote { say $.get; return True; }; }; my $e = MyClass.new; while $e.coyote() { True }; 04:13
p6eval rakudo 24b26a: OUTPUT«Statement not terminated properly at line 2, near "handles *;"␤in Main (src/gen_setting.pm:3363)␤»
eternaleye rakudo: class MyClass { has $!handle = $*IN handles 'get'; method coyote { say $.get; return True; }; }; my $e = MyClass.new; while $e.coyote() { True };
p6eval rakudo 24b26a: OUTPUT«Statement not terminated properly at line 2, near "handles 'g"␤in Main (src/gen_setting.pm:3363)␤»
04:13 SmokeMachine joined
eternaleye rakudo: class MyClass { has $!handle handles 'get'; submethod BUILD { $!handle = $*IN; }; method coyote { say $.get; return True; }; }; my $e = MyClass.new; while $e.coyote() { True }; 04:14
p6eval rakudo 24b26a: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem
..stark…
eternaleye There.
(for reference: iiafw.com/2008/11/12/oop-meep/ ) 04:15
04:25 Patterner left, Psyche^ joined, Psyche^ is now known as Patterner 04:27 xinming joined 04:30 synth left, mikehh_ is now known as mikehh 04:52 alester left 04:59 alester joined 05:00 justatheory left 05:09 tann_ joined
tann_ rakudo: say caller.perl; # :) 05:15
p6eval rakudo 24b26a: OUTPUT«Could not find non-existent sub caller␤»
diakopter rakudo: use v6; use v6; 05:16
p6eval rakudo 24b26a: ( no output )
05:19 finanalyst joined 05:26 SmokeMachine left 05:27 cotto joined, cottoo left 05:40 orafu left, orafu joined 05:44 Chillance left 06:24 rfordinal joined 06:34 rfordinal left 06:41 payload joined 07:09 meppl joined 07:12 alester left
Matt-W Goooooood morning 07:13
moritz_ oh hai 07:14
perlgeek.de/blog-en/perl-6/rakudo-s....writeback
07:15 Su-Shee joined
Su-Shee good morning. :) 07:15
moritz_ Su-Shee: good morning; you just missed my advertisment: perlgeek.de/blog-en/perl-6/rakudo-s....writeback 07:17
07:20 donaldh left, donaldh joined
missingthepoint moritz_: VERY nice article. 07:22
moritz_++
Su-Shee moritz_: nice. I see a bright future in perl marketing. ;) 07:23
missingthepoint :) 07:24
07:24 rfordinal joined
Su-Shee is going to fix the perl6 projects layout until the end of the week. I was thinking to make two download buttons (1) parrot, 2) rakudo - one needs both afterall...) 07:24
missingthepoint Su-Shee, good idea... since Pm is planning to move to building against installed Parrot 07:26
Su-Shee exactly. why force people to click two sites if they can have two download buttons. :)
07:26 icwiener-_- left
missingthepoint Su-Shee: did you do the p6p.org design? 07:27
wayland76 Ooh, the dead lives again! (#perl6 revives) 07:28
Su-Shee missingthepoint: yes.
07:29 finanalyst left
Su-Shee missingthepoint: but I didn't invent the colouring of the butterfly! :) 07:29
moritz_ missingthepoint, Su-Shee: thank you 07:30
missingthepoint moritz_: np 07:31
Su-Shee: as someone who's been exposed to many website designs, that's a good one. Su-Shee++
and I do think camelia is a little bright for a language logo... but maybe that's apt :) 07:32
Su-Shee If I get a nice idea, I'll make some buttons like "rakudo love" and "I code butterflies" or something like that (contemporary version of "this site is made with vim" ;)
moritz_ you can still de-colorize it
Su-Shee: that's a nice idea 07:33
Su-Shee moritz_: it's very memorable and NOT "hey, we're technology, let's make this site dark blue like everybody else" ;)
missingthepoint Su-Shee: that has me giggling!
i like 07:34
Su-Shee moritz_: and it's also "cute" enough to make p6 look less intimidating. ;)
moritz_ I'd also love to seem some Perl 6 "corporate identity" styles that people can use to design their Perl 6 sites
Su-Shee moritz_: that's not easy - will it be a camel again? take the butterfly? go with the "do" theme? 07:35
moritz_ currently rakudo.de and perl-6.de are stuck with their (non-)designs and I have no idea how to style them
Su-Shee: camel is dangerous (copyright by O'Reilly)
Su-Shee: what is the "do" theme?
missingthepoint avoid camel
Su-Shee moritz_: raku do ("path", "way" in japanese) 07:36
I was thinking along the line of a monk with a parrot on his shoulder. ;)
tann_ nice post, moritz
moritz++
ancients is away (4[O.F.F.L.I.N.E]) 07:37
07:37 ancients is now known as [ancients]
moritz_ Su-Shee: I was thinking of something rakudo agnostic (not all Perl 6 is Rakudo), but that would be a good start nonethelss 07:37
[ancients]: please don't announce that publicly, that's not very interesting for us
tann_ not that 1 more karma point would help moritz achieve nivarna any sooner
07:38 rfordinal3643 joined
Matt-W tann_: it's like zeno's paradox 07:38
moritz_ as the perlmonks quibs say "A journey to 1000 XP begins with a single point"
wayland76 moritz_++ for the article
Su-Shee moritz_: the interesting question will be: make a a) perl 6 CI and b) a rakudo one? Or make something which can take "perl 6" CI and transform it easily into rakudo, pugs, sexysixnew, whatever.. 07:39
.oO(sexysix.org ;)
moritz_ something transformable would be awesome
wayland76 moritz_: I suspect that ancients' IRC client does it for him
missingthepoint wayland76: i doubt his client puts in O.F.F... 07:40
(but i could be wrong, there are more obnoxious things on the internet)
moritz_ Su-Shee: already taken :(
missingthepoint moritz_: let me guess...
07:40 sri_kraih left
wayland76 missingthepoint: I'm thinking he's programmed his client to do it 07:40
moritz_ well, IRC clients are configureable
Su-Shee moritz_: too controversy anyway. ;)
moritz_ missingthepoint: seems to be SFW 07:41
missingthepoint wayland76: exactly my point :)
moritz_: H==W, :)
tann_ it's heart-warming to see a set goal for perl 6 through rakudo ... dammit, i should quit spending hours playing at work and instead, use 'em on patching rakudo :) 07:42
missingthepoint tann_: i agree.
Pm++
Matt-W if only 07:43
Matt-W is considering looking for another job, but doubts there's 'full time Perl 6 developer' available anywhere yet
tann_ Matt-W: indeed, those dudes keep challenging me at the pool table :)
wayland76 Matt-W: If you find one, I'll fight you for it
Su-Shee Matt-W: I think we have to found those companies on our own within the next years. 07:44
Matt-W: which leads to the more serious question on how to place Perl 6 as a "future programming language". 07:45
wayland76 tann_: Tell them you'll play them every day for a week if they make a Rakudo patch
tann_ wayland76: unfortunately, they're all java sellouts :)
Matt-W tann_: tell them that Perl 6 improves their pool
boooo
lots of java at my work too 07:46
Matt-W scowls
wayland76 Tell them you like Perl 6 because it does objects better than Java :)
And it's more readable :)
(What are the other hot buttons for Java people? :) )
Matt-W operator overloading
tann_ not only do i have to withstand the ridicule on my pool skill, i also suffer from lots of java preaching :)
Matt-W unless they've swallowed the dreadful Java philosophy that they cause more trouble than they're worth 07:47
roles
multiple inheritance
anonymous functions!
closures!
moritz_ closures with just two characters!
Matt-W exceedingly flexible foreach loops
tann_ and the masterpiece autoboxing :P 07:48
Su-Shee "yes, but where are the support contracts?"
wayland76 Matt-W: I know they're cool features, but do Java people have them as hot buttons (I mean ways in which they think Java is better)?
Su-Shee "and students don't learn it at university, how do I find developers?" ;)
Matt-W wayland76: closures are something lots of Java programmers wish they had
moritz_ Su-Shee: point them to www.rakudoconsulting.com/main.html
Matt-W Su-Shee: you hire clever people who can learn it
07:48 eiro_ is now known as eiro
Matt-W students don't learn Java at university anyway 07:49
they're told they do
but they don't really
wayland76 Su-Shee: Tell them that that means that only good people know P6, unlike Java :)
tann_ agree
Matt-W university puts you on track to learn how to program
tann_ my college only offers programming language classes as self-paced courses :) 07:50
Matt-W and, hopefully, gives you a solid theoretical basis for it
Su-Shee well that are the arguments I hear in job interviews or from CEOs.
Matt-W Su-Shee: yes unfortunately they went to university and think they know how to manage programmers...
Su-Shee Matt-W: sometimes, unfortunately c.s. techs from university think they can do business and manage people. :)) 07:51
tann_ actually, it varies from one school to another though
wayland76 Is $/ supposed to be the last Match?
tann_ some schools teach "database" classes strictly as playing with SQL :)
moritz_ wayland76: aye
wayland76 Hmm. Because I've got soemthing like: /^(\w+|Configured with|Thread model)\:(.*)/ and do { say $/[0]; } 07:52
07:52 rfordinal left
wayland76 And the "say" part says: Method 'postcircumfix:[ ]' not found for invocant of class 'Failure' 07:52
moritz_ that means it didn't match
wayland76 Ok, so why is i 07:53
moritz_ remeber that whitespaces in regexes don't mean anythiing
wayland76 ah
No, it matched
moritz_ put quote around 'Configured with'
wayland76 But I'm forgetting that the return value from // is not a boolean
moritz_ is it a different scope?
07:53 rfordinal joined
moritz_ it can be used as one 07:53
wayland76 ok
Anyway, it's matching Target: i386-redhat-linux 07:54
I think it matches the \w+ bit
moritz_ aye
rakudo: 'Target: i386-redhat-linux' ~~ /^(\w+|'Configured with'|'Thread model')\:(.*)/ and say $/[0]; 07:55
p6eval rakudo 24b26a: OUTPUT«Target␤»
wayland76 Anyway, if it didn't match, why is it running the code in "and do"?
moritz_ rakudo: 'Target: i386-redhat-linux' ~~ /^(\w+|'Configured with'|'Thread model')\:(.*)/ and do { say $/[0] };
p6eval rakudo 24b26a: ( no output )
wayland76 Ah, thanks :)
moritz_ rakudo: 'Target: i386-redhat-linux' ~~ /^(\w+|'Configured with'|'Thread model')\:(.*)/ and do { say $/[0] };
p6eval rakudo 24b26a: OUTPUT«Target␤»
moritz_ don't know why it didn't work the first time 07:56
maybe an evalbot timeout
wayland76 Yup
07:56 kane_ left
wayland76 Hmm. I'm getting the input from a q:x/gcc -v/ 07:57
And I'm having trouble isolating the problem :(
07:59 tann_ left
wayland76 rakudo: @lines = ('Target: i386-redhat-linux'); for @lines { /^(\w+)\:(.*)/ and do { say $/[0] }; } 08:01
p6eval rakudo 24b26a: OUTPUT«Symbol '@lines' not predeclared in <anonymous> (/tmp/UowNqxQxgK:2)␤in Main (src/gen_setting.pm:3363)␤»
wayland76 rakudo: my @lines = ('Target: i386-redhat-linux'); for @lines { /^(\w+)\:(.*)/ and do { say $/[0] }; }
p6eval rakudo 24b26a: OUTPUT«Method 'postcircumfix:[ ]' not found for invocant of class 'Failure'␤»
wayland76 There we go
How come? :)
Does bare // still match against $_?
08:04 finanalyst joined
moritz_ it does 08:07
wayland76: please submit a bug report
rakudo: @lines = ('Target: i386-redhat-linux'); for @lines -> $l { $l ~~ /^(\w+)\:(.*)/ and do { say $/[0] }; } 08:08
p6eval rakudo 24b26a: OUTPUT«Symbol '@lines' not predeclared in <anonymous> (/tmp/T8hWt3GoF0:2)␤in Main (src/gen_setting.pm:3363)␤»
moritz_ rakudo: my @lines = ('Target: i386-redhat-linux'); for @lines -> $l { $l ~~ /^(\w+)\:(.*)/ and do { say $/[0] }; }
p6eval rakudo 24b26a: OUTPUT«Target␤»
moritz_ that seems to be a workaround for now
rakudo: given 'Target: i386-redhat-linux' { /^(\w+)\:(.*)/ and do { say $/[0] }; } 08:09
p6eval rakudo 24b26a: OUTPUT«Method 'postcircumfix:[ ]' not found for invocant of class 'Failure'␤»
moritz_ so matching against $_ seems to be the problem
08:10 rfordinal3643 left 08:17 ruz_mac_ left 08:21 rfordinal3643 joined 08:27 szabgab_mib joined
szabgab_mib hi 08:27
pmichaud: IMHO use.perl.org/~Alias/journal/39406 better respond to this and other rumors
moritz_ unofficial response here: perlgeek.de/blog-en/perl-6/rakudo-s...unced.html 08:28
I should link to that from a comment on Alias' article
szabgab_mib moritz_: that would be good 08:32
moritz_ done
08:33 icwiener joined 08:35 Jedai joined 08:36 rfordinal left
szabgab_mib moritz_: "announced the he'll " on your blog 08:57
moritz_ szabgab_mib: fixed, thank you 08:58
09:03 [particle]1 left 09:04 [particle] joined 09:15 szabgab_mib left
payload rakudo: sub foo { <1 2 3> }; for foo() { .print } 09:31
p6eval rakudo 24b26a: OUTPUT«123»
payload rakudo: sub foo { <1 2 3> }; for foo { .print }
p6eval rakudo 24b26a: OUTPUT«Could not find non-existent sub for␤»
payload is this a bug?
moritz_ std: sub foo { <1 2 3> }; for foo { .print } 09:32
p6eval std 27872: OUTPUT«===SORRY!===␤Function 'foo' needs parens to avoid gobbling block at /tmp/n2Vpl2W10z line 1:␤------> sub foo { <1 2 3> }; for foo⏏ { .print }␤Missing block (apparently gobbled by 'foo') at /tmp/n2Vpl2W10z line 1 (EOF):␤------> sub foo { <1
..2…
moritz_ payload: no, it's just a less-than-awesome error message
payload ah okay 09:33
09:38 wknight8111 joined
wayland76 And the Perl6 spec says that Perl will be officiall awesome :) 09:40
moritz_ and rakudo will get the awesome error message once it uses STD.pm as a front end 09:41
pugs_svn r27873 | lwall++ | [signature.t] remove Sorry! 09:45
09:47 payload left
moritz_ ouch, these were my fault 09:47
09:48 donaldh left 09:49 donaldh joined
wayland76 rakudo: my $thisval = 'gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)'; $thisval ~~ m:s/'gcc version ' (<[\.1..9]>+) (\d+)/ and do { say $/.perl; } 10:03
p6eval rakudo 24b26a: OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 2, near ":s/'gcc ve"␤in Main (src/gen_setting.pm:3363)␤»
wayland76 Does anyone know if there's a way to do this in Rakudo yet?
10:05 dakkar joined
missingthepoint or this: my $data = q:x/dir c:\/; say for $data.split("\n") 10:07
wayland76: does the precedence there work the same as Perl 5?
wayland76 missingthepoint: I've used this successfully: my @lines = split(/\n/, q:x"gcc -v"); 10:08
You may need to use single quotes instead 10:09
missingthepoint rakudo: my @m = 'b'.^methods(); say ~ @m
wayland76 Or use \\
p6eval rakudo 24b26a: OUTPUT«sprintf Scalar pred encode succ ACCEPTS perl WHICH lcfirst roots reduce 1 trim map 1 cis 1 1 1 min rand max 1 bytes 1 1 1 grep 1 1 uc ceiling p5chomp unpolar samecase floor 1 ord round flip does 1 split 1 words srand reverse isa 1 ucfirst comb fmt trans first chop 1 values 2 1
..1 1 …
missingthepoint rakudo: my @m = 'b'.^methods(); if ~@m ~~ /split/ { say 'there' }
p6eval rakudo 24b26a: OUTPUT«there␤»
missingthepoint so... why can't i: 10:10
rakudo: my $in = Q:b/foo\nbar\nbat/; my @lines = $in.split(Q:b/\n/); $_.say for @lines
p6eval rakudo 24b26a: OUTPUT«foo␤bar␤bat␤»
missingthepoint haha :)
wayland76 Does it not work for you at home? 10:11
missingthepoint no
wayland76 Need to update Rakudo then :|
missingthepoint the evalbot is blessed
yup
10:15 wknight8111 left
wayland76 Does anyone know how to use sigspace on a // ? 10:16
dakkar (wild guess) «/<sigspace>/» ? 10:17
or <w> or whatever it's called (read STD.pm)
wayland76 my $thisval = 'gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)'; $thisval ~~ m/<sigspace>'gcc version ' (<[\.1..9]>+) (\d+)/ and do { say $/.perl; }
rakudo: my $thisval = 'gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)'; $thisval ~~ m/<sigspace>'gcc version ' (<[\.1..9]>+) (\d+)/ and do { say $/.perl; }
p6eval rakudo 24b26a: OUTPUT«Unable to find regex 'sigspace'␤in regex PGE::Grammar::_block56 (/tmp/QtQCJc2RhK:1)␤called from Main (/tmp/QtQCJc2RhK:2)␤»
dakkar ok, I got the name wrong :/
wayland76 No, I'm talking about the :sigspace modifier 10:18
dakkar ow
rakudo: say ("foo bar" ~~ m:sigspace/
wayland76 The spec says: m:s/ next cmd '=' <condition>/ is the same as m/ <.ws> next <.ws> cmd <.ws> '=' <.ws> <condition>/
p6eval rakudo 24b26a: OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 2, near ":sigspace/"␤in Main (src/gen_setting.pm:3363)␤»
dakkar rakudo: say ("foo bar" ~~ m:sigspace/ \w+ \w+/) 10:19
p6eval rakudo 24b26a: OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 2, near ":sigspace/"␤in Main (src/gen_setting.pm:3363)␤»
dakkar re-reads the synopses
wayland76 std: my $thisval = 'gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)'; $thisval ~~ m:s/'gcc version ' (<[\.1..9]>+) (\d+)/ and do { say $/.perl; }
p6eval std 27873: OUTPUT«ok 00:03 39m␤»
wayland76 Looks like a Rakudo NYI
Except I know that "rule" treats it as sigspace 10:20
But when I tried using the word "rule" it complained. Oh well :)
dakkar rakudo: say ("foo bar" ~~ mm/ \w+ \w+/) 10:23
p6eval rakudo 24b26a: OUTPUT«Statement not terminated properly at line 2, near "+/)"␤in Main (src/gen_setting.pm:3363)␤»
dakkar oh well
missingthepoint dakkar: mm// is NYI too :( 10:24
dakkar clearly…
missingthepoint incidentally, would you find a detailed list of what's NYI in Rakudo helpful?
dakkar I'd put it in the RT
10:25 zamolxes left
missingthepoint well, you are not a newbie then :) 10:25
10:25 fridim_ joined
missingthepoint ... which is who I'm writing it for. 10:25
dakkar but yes, having the list (kept up-to-date) would really help newbies 10:26
Su-Shee I've just read the rakudo roadmap and feel.. small.
wayland76 missingthepoint: There's already a list somewhere of what is and isn't implemented in Rakudo, but it needs an update 10:27
missingthepoint wayland76: would that be rakudo.org/status?
wayland76 I forget where it is, though. moritz_ might remember?
Su-Shee: Why's that?
missingthepoint (i've already incorporated that into mine)
wayland76 missingthepoint: Yeah, that's the one 10:28
missingthepoint: Do you have write access to rakudo.org?
10:29 Grrrr left 10:30 Grrrr joined 10:36 M_o_C joined
pmichaud Good morning, #perl6 10:39
TimToady ++ 10:40
szbalint enjoys the all too short few days when pmichaud's mornings aren't my afternoon :)
wayland76 o/ 10:41
pmichaud: We've all been finding bugs :) 10:42
pmichaud wayland76: +1 10:43
wayland76 Now that I have a Rakudo RPM, I've found more bugs in the last week than in the preceding year, I think :) 10:44
pugs_svn r27874 | lwall++ | [CORE.setting] add invert 10:46
r27874 | lwall++ | [Cursor.pmc] chop out much useless boilerplate
r27874 | lwall++ | [gimme5] translate invert -> reverse
r27874 | lwall++ | [gimme5] some viv -5 convergence
r27874 | lwall++ | [viv] some gimme5 convergence
r27874 | lwall++ | [STD] check use of colon and closers for delims
r27874 | lwall++ | [STD] attempt to chop the final phantom semicolon from $*ORIG when done
TimToady er, the boilerplate was in viv, not Cursor.pmc orz 10:47
cognominal just curious about localisation, can it be done that way : 10:49
my Int enum day ('Dim','Lum','Mar','Mer','Jeu','Ven','Sam') where @*ENV<LC_ALL> ~~ /^fr/;
TimToady enum doesn't take 'where' currently
nor does normal expression code 10:50
literal and shouldn't that be %*ENV<LC_ALL> ?
moritz_ wayland76: remember where what is?
cognominal literal, yes, my bad. 10:51
TimToady my Int enum day do given @*ENV<LC_ALL> { when /^fr/ { ('Dim','Lum','Mar','Mer','Jeu','Ven','Sam') } }
wayland76 moritz_: Don't worry, he found it :) 10:52
cognominal Also I am learning scala and haskell, and I am not sure that pattern matching wise, Perl 6 is powerful enough... 10:54
dakkar cognominal: I'd keep internal values independent of presentation… it prevents lots of problems 10:55
cognominal What I like about scala is that xml has a composer.
dakkar, I suppose I would use that construct to "unparse" a enum according a locale. 10:56
dakkar oh. it might work…
cognominal I am not here to solve a specific problem but to map Perl 6 construct to whatever arbitrary (and possibly silly) use I can think :) 10:57
that's my way to learn.
Speaking about xml, I suppose it easy to determine if a "<" is an mere array composer or xml one. 10:58
wayland76 Where do I read about this XML composer? 10:59
cognominal I see that many haskell/scala pattern matching can be expressed in term of Perl 6 signature
wayland76 (or what does it do, if you prefer that?)
cognominal wayland, I will give you the pages of the scala spec... let me find 11:00
pugs_svn r27875 | lwall++ | [closure-parameters.t] missing semicolons
cognominal wayland, that Chapter 10 of www.scala-lang.org/docu/files/ScalaReference.pdf 11:01
xml composers also exist in the e4x javascript extension. 11:02
but one must use stuff like jsquery to pattern match DOM stuff.
xml in scala, that's 4 page of specs that pack a lot of power 11:04
wayland76 Is this sort of like XML heredocs?
Or am I completely missing something? 11:05
cognominal heredocs in Perl 6 generates strings... or am missing something? :) 11:06
wayland76 No, I've got the wrong end of the stick -- when you said "composer", I was assuming irrelevant stuff :)
Ok, let's try again -- are you saying this gives you easy pattern matching on XML? 11:07
cognominal maybe I got the wrong term
yes it gives that.
wayland76 Does it give us anything else?
cognominal but we can also see a xml node the Perl way, it is kind of a Signature a string, an array and a hash 11:08
wayland76, nope, but I think it is a lot.
wayland76 So you're saying it turns the XML into a perl object that can be accessed usefully as an object too 11:09
cognominal I am now speaking Perl 6 and not scala anymore.
wayland76 (yes, I'm mixing metaphors, sorry :) ) 11:10
Are you saying that if we had something like this Scala stuff in P6, it would generate useful P6 objects for each XML node?
cognominal well, I try to map general concepts like pattern matching in scala and haskell to what Perl 6 gives us. It happened that XML pattern matching in scala is very congruent with the rest of the langage. 11:11
yes, something like a Perl 6 signature. 11:12
wayland76 Are we talking about method signatures here? 11:13
cognominal if we don't special case special attributes like "id" and "class" that is an array.
11:13 molaf_x joined
wayland76 I'm confused :) 11:13
cognominal Well Signature seem to be a very ubiquitous type, I don't quite see the different between a Signature and a Capture. 11:14
11:14 synth joined
cognominal Well, my ideas are not very clear 11:14
wayland76 Well, I don't know enough about Signature to understand what you're saying, I think :) 11:15
cognominal "Ce qui se conçoit bien s'énonce clairement et les mots pour le dire viennent aisément" Boileau 11:16
11:16 synth left
wayland76 The one thing I'll mention is that masak and I have both been working on things that are related to accessing stuff in a Match object using XPath 11:16
(Btw, cognominal, thanks for trying to explain in English -- I'd never have coped in French :) ) 11:17
cognominal That would translate "What you think well can be said clearly and the word to say it come easily"
Just to say, a contrario, that my tought is muddy so my words are, and a lost is lost in translation :) 11:18
wayland76 I have enough French to be able to match some of the English up with the French, now that you've translated it :)
cognominal "lost in translation" A good movie btw... 11:19
11:20 donaldh left
wayland76 Haven't seen many movies (including that one) 11:20
11:20 donaldh joined 11:21 molaf_x left
cognominal It is not mentionned in the page I gave you but scala has \ and \\ that are the / and / equivalent of XPath 11:21
these are operators.
wayland76 Ok
cognominal I meant equvalent of / and //
wayland76 I'm looking at making a separate quoting context that lets you do XPath-like stuff on trees 11:22
cognominal: Yeah, I see what you mean
I considered doing the thing as XPath contexts, but in the end I decided quoted would be better :)
cognominal In fact the Chapter 10 is very terse, one cannot understanding the packed power if one does not know pattern matching in scala, 11:24
wayland76 Yeah, that's about what I thought while I was reading it :)
cognominal The two books about scala I have are more informative. 11:25
Maybe I can find you information in the scala wiki.
wayland76 An example would be best :) 11:26
Hey everyone, does anyone know how to get/set class attributes while in the .new() method? 11:27
moritz_ wayland76: you mean, in a custom new method? 11:28
wayland76 Yeah, that's the one
moritz_ you pass them as named arguments to bless()
wayland76 Ok, so can I pass in a hash? 11:29
11:29 kthakore left
wayland76 my $instance = GCCFetcher.bless(GCCFetcher.CREATE(), %fieldmap); 11:29
moritz_ irclog.perlgeek.de/search.pl?channe...mp;q=bless
wayland76: |%fieldmap
wayland76 Ok, I was wondering :) Thanks
bless you :) 11:30
moritz_ but if you do it that way, why do you write a custom new() method at all?
wayland76 Because I've got some other code before that
moritz_ if the order doesn't really matter, a BUILD submethod should do too
wayland76 Yay! moritz_++ 11:31
moritz_ rakudo: class A { submethod BUILD { say "hi" } }; A.new 11:32
p6eval rakudo 24b26a: OUTPUT«hi␤»
moritz_ Perl 6 is great at optimizing for the common case, and keeping all options open for other cases 11:33
11:38 M_o_C left
moritz_ ouch, the rss feed of my blog gives me a 500 internal server error 11:39
that's why planetsix didn't pick my newest post up yet
11:40 M_o_C joined
cognominal wayland, nopaste.snit.ch/17472 11:47
I have commented some scala code to explain how pattern matching operates in scala on xml 11:48
My comments starts after //START:QUERY4
11:49 dakkar left
cognominal wayland76, btw. tabbing helps 11:50
11:53 Molaf left 11:54 Molaf joined
wayland76 After looking at it, it seems like it's like what I'm trying to achieve with my Tree stuff, that is, being able to pull stuff out of XML using XPath-like notation 11:54
cognominal probably
wayland76 Obviously I think it's a great idea, but when I tried to get it into core, it was rejected
But it can probably be done as a library
if it's a popular enough library, it will become ubiquitous :) 11:55
Maybe I can get it into Perl 6.1 :)
cognominal yes,, same for the xml composer, that a mere syntactical extension.
Matt-W There's no need for XML syntax support to be in core Perl
in 20 years when XML is long forgot, we'll be pleased it was just a module 11:56
wayland76 Matt-W: My Tree idea is more than just XML, though
It's supposed to be an abstract tree/graph type model that could model any tree-like structure, from XML to filesystems to LDAP to ... 11:57
:)
cognominal I suppose it could work on anything that is an attributed tree
wayland76 cognominal: That's my plan :)
cognominal I see that Perl 6 achieve all or (probably) part of it with signatures 11:58
Matt-W see that could potentially be amazing
takadonet morning all 11:59
cognominal wayland76, See =head2 Unpacking tree node parameters
in S06
wayland76 cognominal: Yeah, but I want to be able to do this on *any* kind of tree-like structure 12:00
Anyway, my plan is to code something up, and see what happens :)
cognominal well, signatures and context can do a lot of thing, I just want to be sure that pattern matching can be easily expressed in Perl 6. 12:02
And if it does, I understand Larry when refusing to add stuff that would be redundant.
On the other hand, we would need tutorials to map haskell/scala pattern matching to Perl 6 signature+context as pattern matchers. 12:03
wayland76 I don't think "redundant" is the word you want, but I see what you mean :) 12:04
Matt-W That sort of translation could be tricky, they're not the same thing.
Although you can get some of it with subsets
cognominal that's my point :)
12:06 fridim_ left
cognominal =head2 Argument list binding is also very particularly relevant 12:12
I need to understand all of S06 to answer my question 12:13
moritz_ if you write S06/Argument list binding/ the IRC logs will link to the correct section :-)
cognominal thx moritz_ 12:14
It seems that does what the @ do in scala and haskell 12:15
that's S06/Unpacking tree node parameters/ at 13:59 :) 12:17
12:27 KyleHa joined, cono joined 12:31 M_o_C left, M_o_C joined 12:35 M_o_C left 12:36 ruoso joined
ruoso it seems that teasing works... 12:37
wayland76 On who? 12:42
ruoso on françois perrad 12:44
he implemented a xml grammar based on the w3c spec, with sax-like actions 12:45
wayland76 I saw that :). I'll have to nick it sometimes and add more actions :) 12:52
(I'm trying to make it into something somewhat DOM-like :) )
13:09 skids_ joined 13:12 payload joined
pugs_svn r27876 | lwall++ | [hyper.t] missing semi 13:26
r27877 | kyle++ | [t/spec] add subset tests based on IRC backlog 13:27
moritz_ we long speculated about a mechanism to turn IRC conversations into tests - now we found one (KyleHa++) 13:28
KyleHa Heh. 13:29
ruoso wayland76, to make it more DOM-like you just need a SAX->DOM translator
KyleHa I was a bit surprised about what I found.
pmichaud mberends++ # this is an *outstanding* talk 13:30
moritz_ what is he talking about? 13:31
and where's the video stream? :-)
pmichaud "Perl 6 for Perl 5 programmers" is the talk title
but it's really not about code, it's about Perl 6 as a project
moritz_ cool 13:32
pmichaud it's quite a comprehensive review (as much as can be fit in 40 minutes)
moritz_ well, you can say quite some things in 40 minutes
pmichaud yes... but describe Perl 6 in 40 minutes? ;-) 13:33
pugs_svn r27878 | lwall++ | [STD] add infix:<defines>
moritz_ pmichaud: I think the project is not quite as complex as the language :-)
pmichaud sure, but he's covering the language as well 13:34
moritz_ Oh.
pmichaud (and now we're into the code section)
moritz_ pmichaud: any objections to bumping the parrot revision to r40393 to get more testing after bacek's keys_$something branch merge?
it tests OK on amd64 linux 13:35
pmichaud no objection if spectests pass
moritz_ as much as with the previous revision :-)
13:35 stepnem left 13:36 Jedai left, Jedai joined
KyleHa pmichaud: I sent a CLA to TPF. It should be there now-ish. I'm not in a rush for anything; I just wanted to put a bug in your ear. 13:36
13:39 stepnem joined
pmichaud KyleHa: It arrived. 13:39
moritz_ cool 13:40
KyleHa Cool, thanks for confirming that for me, pmichaud++
pmichaud if someone wants to nominate you for commit access to the rakudo repository (and assuming you'd like such access), we can arrange it. :-) 13:41
moritz_ +1
pmichaud +1
moritz_ I want KyleHa to add new test files to t/spectest.data in the very least
13:41 stepnem left
moritz_ otherwise chances are that we forget those 13:41
and for functional patches... in case of doubt you can still open a ticket with the patch 13:42
pmichaud I just need a github idea
*id
13:44 stepnem joined 13:48 [ancients] is now known as ancients
KyleHa My github id is 'kyleha'. 13:49
moritz: Last time I had a spectest.data addition, I opened a ticket for it, and you got it without the ticket. I could keep doing tickets, but I'd rather be able to commit directly. 13:50
pmichaud mberend's presentation is *by far* the best 40 minute introduction to p6 that I've seen. 13:51
moritz_ KyleHa: yes, that's more efficient
Patterner pmichaud: URL? :) 13:52
pmichaud (although it's actually about 45 minutes)
Patterner: he says it will be going into the pugs repo
takadonet I would like to see that presentation as well 13:56
13:57 azawawi joined
azawawi std: "hi" 14:00
p6eval std 27878: ( no output )
pmichaud masak's job title: "Destroyer". I think we need to add that to rakudo.org somewhere
cono :D
moritz_ I thought about a "people & jobs" page on p6proj.org
TimToady a 6th box would let us move the download button out-of-line 14:01
KyleHa Establishing a list of people and jobs might have some unintended consequences. 14:02
moritz_ KyleHa: for example?
KyleHa It has to be maintained. If the list goes stale, we have newbies chasing phantoms.
14:03 Jedai left
moritz_ all of the links have to be maintained 14:03
Su-Shee TimToady: I keep it in mind, I planned a new design (and fancy advertisement buttons like "rakudo love" and the like) for the end of the week anyway.
KyleHa Establishing a Name next to a particular Job might lead a newbie to believe that the Job is already filled and no help in that area is needed.
moritz_ KyleHa: that's a good point
KyleHa Imagine if I showed up and thought, "oh, Moritz has the testing all covered." 8-) 14:04
Su-Shee he doesn't?! ;)
moritz_ Su-Shee: actually KyleHa does more testing than me these days 14:05
I try to supervise him where necessary, and do some things that nobody else cares about 14:06
KyleHa I'm glad for the supervision. 14:07
14:08 azawawi left
moritz_ actually it's something I'd do for everybody who commits to the test suite. Maybe I should announce that publicly 14:09
14:09 azawawi joined
KyleHa It's probably a good idea for every tester to look at every other tester's work, if possible, either to learn something or catch possible problems. 14:10
14:11 mikehh left
azawawi TimToady: shall I work around the substr string length error in redspans? 14:11
TimToady: is it intentional or a side effect of upcoming viv changes?
moritz_: is the same STD process re-used in evalbot? 14:13
14:14 mikehh joined
moritz_ azawawi: no, it spawns a new process for every request 14:15
14:17 finanalyst left 14:18 rfordinal3643 left 14:24 KyleHa left, azawawi left 14:26 justatheory joined 14:27 KyleHa joined
colomon What's the P6 syntax equivalent for the good old P5 while (<>)? I know I've seen it but I forget, and it's blocking me on paying work at the moment. :) 14:28
I tried "for $*IN.lines" but that doesn't seem to do it.
"for $*ARGFILES.lines" --> "Method 'lines' not found for invocant of class 'Failure'" 14:31
14:31 missingthepoint left
takadonet colomon: I believe it's $*IN.get 14:31
colomon takadonet: That doesn't seem to do anything. 14:32
Unless it tries to read all the lines first before starting the for? Let me try a smaller file... 14:34
No, that's still just sitting there.
takadonet colomon: are you trying to read a file or something from standard in? 14:35
colomon Read a file.
I've just rewritten the script to actually take a file name and open it. I was just hoping for the old Perl magic... 14:36
takadonet colomon: szabgab.com/talks/perl6/perl6-process-file.html Normally I would help you further but I have a meeting in a few 14:39
colomon Ack. Judging by the timing, it does try to read the entire file in before starting the for loop. With a 10 meg file and amazing Rakudo-speed, this may not be a practical solution. 14:40
takadonet One day it will
colomon Sure, but I need it today. Time to switch back to Perl 5... 14:41
takadonet++
PS That link is actually out of data... readline is no longer there. I believe "lines" (which is what I am using) is the current equivalent.
14:42 justatheory left
takadonet I just noticed after i posted it 14:42
14:48 M_o_C joined 14:51 Psyche^ joined 14:52 Patterner left, Psyche^ is now known as Patterner, adamski joined 14:54 hercynium left 14:56 icwiener left, icwiener_ joined
Su-Shee oh my.. perl6.com and perl6.org aren't really pleasant websites... 15:02
15:06 SmokeMachine joined
colomon Wow, perl6.com is particularly awful. "Join the long list of people who haven't donated!" in effect. 15:07
Su-Shee and already ended anyway. ;) 15:08
TimToady it's a squatter, basically 15:09
15:19 rfordinal joined 15:20 donaldh left, donaldh joined 15:22 sri_kraih joined 15:45 arthur-_ joined 16:03 nihiliad joined 16:05 SmokeMachine left 16:11 synth joined 16:18 kane_ joined, Jedai joined 16:20 PZt left 16:27 payload left 16:37 fridim_ joined 16:58 Chillance joined 17:01 cdarroch joined 17:16 SmokeMachine joined 17:18 tann joined
tann rakudo: say "hello #perl6" 17:19
p6eval rakudo 3c5210: OUTPUT«hello #perl6␤»
moritz_ in #perl6 we're too cool and lazy to talk, we let the bots do that for us ;-) 17:23
17:26 kane_ left 17:30 lucs joined 17:35 justatheory joined 17:38 payload joined
Su-Shee amazing what AI implemented in perl 6 can do.. ;) 17:41
moritz_ aye; not mmany people suspected me of being one 17:42
which means that I pretty much passed the Turing test 17:43
17:43 justatheory left
Su-Shee can't you be a cooking robot and make my dinner tomorrow? ;) 17:43
moritz_ no, tomorrow night I'll pretend to eat pizza with a bunch of geeks 17:44
17:44 nihiliad left
Su-Shee "bunch of other AIs" ;) 17:47
17:48 braceta joined
moritz_ no, just easily fooled 17:48
17:53 kane_ joined
literal moritz_: I've gotta be somewhere else so I probably can't make it to tonight's meeting. If you see masak, can you tell him I'll have an update for him tomorrow? 17:55
17:55 edpratomo joined
moritz_ literal: sure. Or you coudl tell phenny to tell it masak, she's a very willing bot ;-) 17:56
phenny: tell literal like this
phenny moritz_: I'll pass that on when literal is around.
17:56 Chillance_ joined
literal phenny: tell masak I can't make it to tonight's meeting, will give you an update tomorrow. 17:56
phenny literal: I'll pass that on when masak is around.
literal: 17:56Z <moritz_> tell literal like this
literal I wonder why there are two bots here that do that 17:57
phenny: tell lambdabot something
phenny literal: I'll pass that on when lambdabot is around. 17:58
tann sub/method following multi is optional...how can p6 tell if a multi is a sub or a method with a package with semiconlon form?
moritz_ timtowtdi and all
literal hehe
moritz_ tann: it's always a sub
tann: unless you write 'multi method'
tann ah
edpratomo funny conversation :-) 17:59
with phenny :-) 18:00
18:01 adamski left
tann phenny: tell phenny phenny: tell phenny :) 18:01
phenny Hey, I'm not as stupid as Monty you know!
edpratomo ha ha
phenny: punch phenny in the face 18:02
18:03 kane_ left
tann perl6: my @a; my @b := @a = (1..100).pick(10); say @a.perl, @b.perl; @b[0]++; say @a.perl, @b.perl; 18:05
p6eval pugs: OUTPUT«\(50, 53, 47, 56, 76, 58, 2, 69, 80, 79)\(50, 53, 47, 56, 76, 58, 2, 69, 80, 79)␤\(51, 53, 47, 56, 76, 58, 2, 69, 80, 79)\(51, 53, 47, 56, 76, 58, 2, 69, 80, 79)␤»
..rakudo 3c5210: OUTPUT«[1, 79, 96, 17, 47, 45, 56, 4, 7, 34][1, 79, 96, 17, 47, 45, 56, 4, 7, 34]␤[2, 79, 96, 17, 47, 45, 56, 4, 7, 34][2, 79, 96, 17, 47, 45, 56, 4, 7, 34]␤»
..elf 27878: OUTPUT«syntax error at (eval 133) line 4, at EOF␤ at ./elf_h line 5881␤»
18:07 zamolxes joined 18:12 Chillance_ left, Chillance_ joined 18:13 Chillance left 18:16 braceta left 18:19 nihiliad joined 18:28 arthur-_ left 18:37 icwiener-_- joined 18:38 icwiener-_- left, icwiener joined 18:43 edpratomo left 18:45 icwiener-_- joined 18:46 kane_ joined 18:48 icwiener_ left
cotto This needs some perl 6 representation: thedailywtf.com/Articles/Nerds,-Joc...ckers.aspx 18:50
18:51 synth left 18:52 icwiener_ joined 18:57 icwiener left 19:02 M_o_C left 19:03 icwiener-_- left 19:05 Student joined
colomon rakudo: my @lockers = (1..20).map({0}); @lockers.map({ ($_ % $n == 0) ?? !$_ :: $_ }); 19:08
p6eval rakudo 3c5210: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤in Main (src/gen_setting.pm:3363)␤»
moritz_ colomon: try it with ?? ... !! 19:09
colomon rakudo: my @lockers = (1..20).map({0}); @lockers.map({ ($_ % $n == 0) ?? !$_ !! $_ });
p6eval rakudo 3c5210: OUTPUT«Symbol '$n' not predeclared in <anonymous> (/tmp/dXepcjHd3I:2)␤in Main (src/gen_setting.pm:3363)␤»
19:09 icwiener joined
colomon rakudo: my @lockers = (1..20).map({0}); my $n = 2; @lockers.map({ ($_ % $n == 0) ?? !$_ !! $_ }).say; 19:10
p6eval rakudo 3c5210: OUTPUT«11111111111111111111␤»
colomon moritz_++
rakudo: my @lockers = (1..20).map({0}); my $n = 3; @lockers.map({ ($_ % $n == 0) ?? !$_ !! $_ }).say; 19:11
p6eval rakudo 3c5210: OUTPUT«11111111111111111111␤»
colomon rakudo: my @lockers = (1..20).map({0}); my $n = 2; @lockers.map({ (($_ % $n) == 0) ?? !$_ !! $_ }).say; 19:12
p6eval rakudo 3c5210: OUTPUT«11111111111111111111␤»
19:12 icwiener_ left
moritz_ colomon: you seem to want to get the index somehow 19:13
colomon: $_ is always 0 in your case
colomon right!
moritz_++ again
moritz_ and the initialization can be written as 0 xx 20
colomon I tried X and x.
Would have worked it out sooner or later. :) 19:14
Ack! So easy to do if I introduce a side-effect into the map. But that makes me feel so dirty... 19:15
moritz_ hey, it's for the daily WTF ;-) 19:16
Student aah, that's what you're doing 19:17
lisppaste3 colomon pasted "Quick brute force to 20" at paste.lisp.org/display/84846 19:18
19:19 synth joined 19:20 donaldh left
colomon My CAD import is done, should get back to paying work, alas. 19:20
19:20 donaldh joined
tann rakudo: my %squares = (1..10).map: { $_ * $_ => 1 }; my @open_lockers = (1..100).grep: { %squares{$_}.exists }; say @open_lockers.perl; 19:23
p6eval rakudo 3c5210: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤Null PMC access in invoke()␤in Main (/tmp/m8SWwkZOTZ:2)␤» 19:24
19:26 molaf_x joined 19:29 alester joined
colomon tann: why that way of expressing it? 19:30
tann colomon: ? 19:31
colomon rakudo: my @open_lockers = (1..10).map({$_*$_}); say @open_lockers.perl;
p6eval rakudo 3c5210: OUTPUT«[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]␤»
colomon tann: Just seemed like your code was going the long way around, if you know what I mean. 19:33
tann colomon: yea...experimenting perl6's new and shiny thingies 19:34
colomon tann++ :)
tann though i can't figure how to use exists, delete etc with hashes and arrays in p6 :) 19:35
or rakudo
doesn't seem like the spec settles on those things?
colomon I have this vague memory it is direct: %squares.exists($_) instead of %squares{$_}.exists
moritz_ it does, but it uses a syntax that isn't supported in Rakudo yet
it's %hash<foo>:exists 19:36
and :delete
19:36 REPLeffect left
colomon I definitely used %hash.exists($_) in a script recently. (The amazing powers of grep!) 19:37
tann pugs: my %h = a => 1; say %h.perl; %h<a>.delete; say %h.perl;
p6eval pugs: OUTPUT«\(\("a", 1),)␤*** Argument is not a Hash or Array element or slice in delete: VInt 1␤ at /tmp/FJdfm8H3QL line 1, column 30-42␤»
moritz_ yes, that's what Rakudo does
tann rakudo: y %h = a => 1; say %h.perl; %h.delete('a'); say %h.perl; 19:38
p6eval rakudo 3c5210: OUTPUT«Symbol '%h' not predeclared in <anonymous> (/tmp/yEK7OZMbl3:2)␤in Main (src/gen_setting.pm:3363)␤»
tann rakudo: my %h = a => 1; say %h.perl; %h.delete('a'); say %h.perl;
19:38 iblechbot joined
p6eval rakudo 3c5210: OUTPUT«{"a" => 1}␤{}␤» 19:38
19:43 REPLeffect joined 19:44 payload left 19:52 nihiliad left 19:53 xiaoyafeng joined, xiaoyafeng left 19:55 lucs left 19:59 lucs joined 20:02 takadonet left, Student left 20:24 payload joined 20:29 __ash__ joined, arthur-_ joined
moritz_ I've got a shiny (well, not really, but interesting) and completely useless toy 20:31
rakudo.de/architecture
reasonably modern browsers will display a chart on the left side
that's an SVG
and the boxes are (mostly) clickable, and point to appropriate sections of the document
(you might know both the text and the image already from my blog, it's just the clickability that's new) 20:32
colomon pretty. 20:36
20:37 REPLeffect left
__ash__ does perl6 have a dbi interface? just curious 20:37
20:37 ruoso left
Su-Shee moritz_: well that's a pink perl pretty star for you! :) 20:38
moritz_ __ash__: not yet
Su-Shee __ash__: they're working on it.
__ash__ okay, just making sure, google lead me to a few mailing list / cpan places but none showed up the a place if that had a working copy of anything thats going on with that that seemed recent, i noticed svn.perl.org/modules/dbi2/trunk/ but i have no idea when that was last touched 20:40
moritz_ __ash__: svn log says 2008-05-17 20:41
20:45 Su-Shee left
moritz_ __ash__: anyway, Tim Bunce announced that he'll pick up the work on something DBI-like for parrot... 20:46
__ash__ i have another perl 6 related question, can you have executable code anywhere? (eg. in ruby inside a class definition you can include an if statement for instance)
moritz_ __ash__: and once that's working, it should be relatively straight forward to add a Perl 6 layer - I already volunteered for that
rakudo: class A { say "hi" };
p6eval rakudo 3c5210: OUTPUT«hi␤»
japhb No masak, damn. 20:47
moritz_ __ash__: is that answer enough? ;-)
japhb Who's the message bot here?
__ash__ moritz_: cool, yeah i found that announcement, i was just curious about its current state thats all
[particle] __ash__: rakudo is an implementation of perl 6
moritz_ japhb: 'phenny: tell masak ...'
__ash__ [particle]: i know i have it, and pugs
japhb moritz_: thx. ETOOMANYCHANNELS
moritz_ __ash__: I haven't read a new announcment; that one was made at a conference on which I was not :/ 20:48
pugs_svn r27879 | kyle++ | [t/spec] Another Null PMC test inspired by IRC
moritz_ but he wants to continue discussing it at the Italian Perl Workshop, which is pretty soon 20:49
japhb phenny: tell masak Please ping me when you're back; I need to pick your brain re: proto and various forms of World Domination
phenny japhb: I'll pass that on when masak is around.
20:50 scrottie left, KyleHa left 20:56 donaldh_ joined 20:59 M_o_C joined 21:01 justatheory joined 21:03 SmokeMachine left 21:06 Chillance_ left 21:15 Whiteknight joined 21:16 frederico joined 21:28 frederico left 21:29 SmokeMachine joined
__ash__ moritz_: you wouldn't know how you'd go about compiling and dynamically linking a parrot extension into say Rakudo? 21:34
moritz_ __ash__: no 21:35
21:38 jan_ left 21:39 maja_ left 21:43 maja joined 21:45 justatheory left 21:46 jan_ joined 21:48 skids_ left 21:49 icwiener left 21:50 SmokeMachine left 21:52 molaf_x left 21:55 kborer_ joined, M_o_C left
cognominal TimToady, in SO4 line 64, it should be nice to say that the simple way out of an error is a mere comma, meaning that the {} and [] composers can include a final comma. 21:59
> say +{ a =>1, }
1
> say +[ 1, ]
1
>
lambdabot not an expression: `'
mueval-core: Prelude.read: no parse
mueval: ExitFailure 1
<no location info>: parse error on input `]'
phenny lambdabot: 17:57Z <literal> tell lambdabot something
22:01 M_o_C joined, REPLeffect joined
moritz_ cognominal: feel free to add such changes yourself 22:02
cognominal: you have a commit bit, I assume?
cognominal I don't think so 22:03
moritz_ that should be fixed.
cognominal and I am not a native speaker so I prefer not.
moritz_ /msg me your email address, and I can send you one
cognominal: that's not a good excuse, I'm not one either
neither is masak
or many other committers 22:04
cognominal ho, that is pugs, I probably have one but I have lost the password.
moritz_ cognominal: password re-sent
anyway, bed time here 22:05
22:08 REPLeffect left, REPLeffect joined 22:12 kborer left 22:23 braceta joined 22:31 fridim_ left 22:33 M_o_C left 22:34 __ash__ left 22:38 __ash__ joined 22:44 SmokeMachine joined
wayland76 cognominal: Let me know your Pugs ID and I'll try to remember to review your commits for good English. Keep in mind that all commits to the specs are sent to the mailing list, and if the people on that list are anything like the people in the IRC channel, there will be some people with excellent English reviewing it and fixing any English errors, so as long as you are communicating what you want, people will fix the 22:49
English :)
ancients how do i convert a decimal number to a binary number ? :-s 22:53
22:56 Student joined 22:57 ruoso joined, donaldh_ left, iblechbot left 23:00 Student left 23:01 __ash__ left 23:05 synth left, synth joined
wayland76 Should this work? $filename ~~ :e or next; 23:06
ancients: Can't it be done with sprintf?
japhb wayland76: ISTR that's $filename.IO ~~ :e, but I don't know if that's NYI in Rakudo 23:07
wayland76 ancients: Or it could be done with bitwise operators; the best method depends on what you want to do with the binary number (print it, or access particular bits, or what?) 23:09
23:10 leedo left 23:11 leedo joined, fridim_ joined 23:15 leedo left, leedo joined 23:20 donaldh left, donaldh joined 23:25 braceta left 23:36 leedo left, leedo joined 23:45 leedo left 23:46 leedo joined, ihrd joined 23:54 fridim_ left
ruoso has problems with irc.perl.org 23:56