»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:02 tokuhiro_ joined 00:03 fgomez joined, stopbit left 00:25 fgomez left 00:34 mtk joined 00:39 fgomez joined 00:40 erkan left 00:57 anuby joined 01:03 gv joined 01:07 benabik joined 01:16 leont joined 01:22 PacoAir left 01:26 gv left 01:29 benabik left 01:30 atrodo left, nebuchadnezzar joined 01:34 tokuhiro_ left 01:50 ifim left 01:52 hypolin joined 02:01 benabik joined, gootle joined
[Coke] r: macro doit ($word) { return quasi <say <<<$word>>>, <<<$word>>> ;> }; doit('one'); doit('two'); doit('three'); 02:04
p6eval rakudo fc349a: OUTPUT«===SORRY!===␤Missing block␤at /tmp/EI2OfV6ZNy:1␤»
[Coke] r: macro doit ($word) { return quasi { say {{{$word}}}, {{{$word}}} ;} }; doit('one'); doit('two'); doit('three'); 02:05
p6eval rakudo fc349a: OUTPUT«oneone␤twotwo␤threethree␤»
02:09 leont left 02:16 kiyan joined 02:21 dayangkun joined 02:22 am0c left 02:24 am0c joined 02:25 bowtie left 02:37 benabik left 02:42 araujo left 02:44 am0c left, am0c joined
dalek ast: 3162e00 | coke++ | S0 (9 files):
rakudo autounfudge
02:44
ast: a458713 | coke++ | S06-signature/errors.t:
Add test for RT #72082
02:46 benabik joined
dalek ast: f966c11 | coke++ | S04-statements/gather.t:
Add test for RT #115598
02:51
02:54 benabik left 02:57 ifim joined
dalek ast: b73dfca | coke++ | S02-literals/string-interpolation.t:
Add test for RT #115508
02:57
03:04 japhb_ left 03:09 kiyan left 03:10 thowe joined
thowe Anyone tried Rakudo on OpenBSD? It gave me trouble before. 03:11
I was going to try latest.
03:13 dayangkun_ joined
[Coke] sorry, darwin here. 03:15
thowe that's interesting... seriously 03:16
03:16 dayangkun left
[Coke] usually pretty smooth on darwin. 03:20
(well, OS X)
thowe hrm. No luck again: scsys.co.uk:8002/213877 03:21
that's just during configure
[Coke] looks like it's an issue with parrot's build - probably worth opening a ticket at github.com/parrot/parrot/issues 03:23
any suggestions on where to put a test for ";:[]" ? 03:24
03:26 dayangkun_ left 03:28 benabik joined
cotto please do file a Parrot bug 03:29
dalek ast: 9ed183d | coke++ | S12-class/attributes.t:
Add tests for RT #115280
03:34
diakopter [Coke]++ 03:36
[Coke]: remind me what ";:[]" does 03:44
dalek ast: f848a52 | coke++ | S12-introspection/meta-class.t:
Add test for RT #115208
03:45
ast: c892865 | coke++ | S06-multi/syntax.t:
Add test for RT #114886
[Coke] diakopter: no clue. but it used to explode. 03:46
diakopter I mean how to trigger it
I can't remember what I did
[Coke] diakopter: rt.perl.org/rt3/Ticket/Display.html?id=115284
r: say (;:[]) 03:47
p6eval rakudo fc349a: OUTPUT«␤»
diakopter r: say (;:[])
p6eval rakudo fc349a: OUTPUT«␤»
diakopter oh
well, that's something
[Coke] I just don't see an obvious place to test for "random string of characters doesn't explode". :)
diakopter ha 03:48
maybe you need a Weird directory
03:50 Patterner left 03:56 orafu left, orafu joined
[Coke] rakudo: (4 ... ^5).say 04:01
p6eval rakudo fc349a: OUTPUT«4 3 2 1 0 1 2 3 4␤»
[Coke] rakudo: (4...^5).say
p6eval rakudo fc349a: OUTPUT«4␤»
[Coke] are those both correct?
(RT #75674 seems to disagree with the latter one.)
TimToady both are correct 04:03
[Coke] TimToady: danke. 04:04
dalek ast: df13d54 | coke++ | S03-sequence/basic.t:
Add tests for RT #75674
04:08
[Coke] r: say -93 + 300 + 362 + 5 04:10
p6eval rakudo fc349a: OUTPUT«574␤»
04:18 Psyche^ joined, Psyche^ is now known as Patterner 04:49 adu joined 05:00 am0c left 05:03 skids left, mtymula left 05:04 xinming_ joined 05:07 kurahaupo left 05:08 xinming left 05:24 am0c joined 05:28 erkan joined 05:32 am0c left
thowe well, submitted that bug report for OpenBSD... 05:34
I see it even uses gmake... Everything is getting more and more Linux-specific all the time. 05:36
sorear did you submit a rakudo bug report? 05:38
have you ever submitted a perl5, rakudo, or old-parrot bug report before? 05:39
thowe I was told to submit a parrot bug report.
I think I submitted one with the last build problem I had about a year ago. I keep reading the Perl6 stuff, getting excited, but I have yet to be able to run it. Kinda bums me out. 05:40
sorear what kind of idiot uses -Werror in published makefiles
thowe: have you tried niecza?
05:40 am0c joined
thowe Someone mentioned it once, but I remember thinking "no way".. don't remember why 05:46
oh, yeah, mono. I've never attempted to use mono for anything. 05:47
I have no interest in mono
05:49 birdwindupbird joined 05:56 fgomez left
sorear thowe: you have an interest in perl 6, though, do you? 05:56
thowe Yes. 05:57
sorear if you want to give perl 6 a try, why not try using an implementation based on a commercially supported VM? 05:58
I have no idea if Mono builds on openbsd but they have way more resources for porting than Parrot does
cotto There's your issue. I was worried for a bit that github wasn't sending me notifications. 06:00
thowe sorear, the answer to this is complicated for me. Probably more complicated than you would be interested hearing about. 06:01
06:04 adu left
sorear if it's something other than the basic "I'm afraid of patent lawsuits" line I've heard a million times, maybe I'd be interested 06:05
cotto thowe, what cpu are your running that on?
thowe Perl 6 looks like an amazing language, but its utility for me is greatly diminished if running Perl 6 programs are non-trivial to run.
er, well, that's what I get for editing that sentence to many times
this is a core 2 duo at 3.16Mhz 06:06
er Ghz
cotto x86_64 then
thowe yes. and I am running amd64 OpenBSD
sorear thowe: ah, you mean the mono run/Niecza.exe myApp.pl nonsense? I can agree with that 06:07
especially the bit where you can't use niecza as a shebang interpreter because of it
thowe No, it's not just that. If I write something in Perl 6, it is hard for others to run it.
It is hard for me to run it everywhere I might want to. Ease of implementation is why people settle for things like php 06:08
sorear perl 5 wins hard there because every (at least the free ones) unix system in existance bundles p5
thowe You don't see a lot of web hosts that can support your java stuff. 06:09
sorear (but not Windows, and there's no telling what version you'll get)
thowe There needs to be some big payoff for requiring the VM. Or the vm needs to be so trivial to provide that nobody cares.
06:13 fgomez joined
sorear thowe: yeah, I agree that requiring an external VM is less than optimal. 06:14
bonsaikitten thowe: it is pretty trivial to install
thowe I had never really written any perl 5 until I had looked into perl 6 and thought, wow. It was like Ruby only better. But I have yet to make it run on my system and in the meantime I discovered perl 5. 06:15
sorear I just get the impression you're applying a double standard to mono vs parrot
thowe bonsaikitten, yeah, I imagine it should be. But so far a version of Rakudo has not come out that builds for my on OpenBSD. 06:16
06:16 GlitchMr joined
bonsaikitten thowe: one downside of using a "fringe OS", but fixing shouldn't be *that* hard 06:17
thowe No, not really. I suspect I "should" be able to just build it and some minor bugs are in the way. I imagine the work to make mono work on OpenBSD is immense and that there is zero interest on the part of mono for it to work.
bonsaikitten yes 06:18
sorear thowe: s/mono/parrot/?
I thought you said you never even tried to build mono on openbsd 06:19
thowe Ah, yes, I meant Parrot should just work.
bonsaikitten thowe: got an error log of it not building?
thowe But I don't think mono is a good long-term option for me.
bonsaikitten, I submitted the bug.
sorear thowe: I don't think the work required to build Parrot on OpenBSD would be particularly immense 06:20
but parrot has approximately 0 full-time developers at the moment
cotto I'm surprised that it's broken at all.
thowe I try other OSes, but they are too unpolished compared to openbsd. Linux man pages are a joke.
sorear cotto could tell you more about the current state of parrot 06:21
thowe: I don't consider openbsd a fringe OS. Normally I would say that any software which fails to build on openbsd is fringe software, but I have learned to bite my tounge around here.
thowe How can it be so neglected if it is the Perl 6 platform? 06:22
sorear now, if you said you were using Haiku, I might tell you to switch. :p
thowe parrot, I mean
Heh, I have used Haiku.
I still have my BeBox in the closet!
Linux can't even implement a decent ifconfig command compared to OpenBSD. How do people use it in a real setting? 06:23
maybe ifconfig is a gnu thing... I guess there is no linux, just distros... Whatever. 06:24
cotto Don't try to make too much sense of the world.
sorear thowe: I will not speculate on how Parrot got where it is. But I will say that 1. Parrot is not "the" Perl 6 platform - Perl 6 is defined by a spec and niecza and perlito have every bit as much right to the name as Rakudo 2. the Rakudo core team is becoming disenchanted with Parrot and there are explicit plans to add a Java backend 06:25
thowe As long as they have Flash I guess they are mainstream
bonsaikitten sorear: I mean "fringe OS" only in the sense that most people don't use it, so it gets less testing / build system fixes 06:26
thowe sorear, whoa.
bonsaikitten thowe: ifconfig is deprecated in favour of "ip" for a long time
thowe Is "ip" a gnu thing? 06:27
sorear, Why all the focus on VMs? 06:28
sorear thowe: because we're theoretical computer scientists and we see the entire world as a stack of VMs 06:29
thowe Oh.
sorear there is no such thing as a computer language implementation that is not a VM, although it can take many forms
bonsaikitten thowe: quite likely. they like to do things in new and exciting ways, like replacing man with nethack 06:31
(I still cannot navigate info pages without getting eaten by a grue)
thowe Well. The theoretical hotness of Perl 6 is what attracted me to "Perl". Now I've been happily playing with perl 5 for over a year. It's been fun. 06:32
sorear perl 5 actually has a quite well developed VM inside it
it's just they don't advertize it
which helps them hold onto the "VM is a dirty word" crowd
thowe wish it had a quite well developed repl 06:33
I still miss irb from Ruby land
06:33 araujo joined, araujo left, araujo joined
sorear re.pl is an improvement 06:34
but this is one of those "tool support" things that led to ADAMK's defection
thowe Please explain?
sorear Perl 6 is very, very hard to statically parse, even for simple things like supporting multiline REPL commands, completion of method names, etc 06:35
I've never used irb but I discovered the node.js repl recently, it's quite impressive
because Javascript is a dumb statically parsable language, it works
thowe huh. So the flexibility of the syntax has a lot to do with it then? 06:36
cotto Simple languages have advantages. At the extreme, you get lisp. 06:37
sorear yes, exactly (to both)
thowe yeah. I've used clisp and guile a little bit.
sorear perl 6 isn't even easy to syntax highlight
mostly because of the multiline regexes with non-self-synchronizing brackets 06:38
thowe is this a trade off, or things discovered later in its development?
sorear it's both
thowe oh, yeah. Kinda same for perl 5, no?
sorear perl 5 isn't that easy either, but on a pragmatic level I have never had a major problem with perl.vim 06:39
the perl6.vim file we're using is unusably slow on files over 500 lines and gets out of sync if you look at it wrong 06:40
no offense to PetDance, perl6.vim works amazingly well for how hard its job is
06:41 am0c left
thowe so, is Perl 6 really just a toy for crazy-smart theoretical computer scientists to play with, or is the intention to build something that the same crowd that uses perl and ruby today would want to use? 06:52
sorear it is a language for everybody 06:54
is this because of my VM comment?
thowe Well, yes and no.
bonsaikitten at the moment it still lacks adoption, but that can be fixed
sorear it is my opinion that anybody who compares language implementations on the basis of "this one uses a VM, that one doesn't" 06:56
is underinformed about what VMs are
bonsaikitten sorear: it's funny because people complain about the same thing in python they then appreciate in java - both are interpreted bytecode ... 06:58
thowe I don't have an objection to a vm because it is a vm. I am cool with installing parrot if it can be installed as easy as compiling perl 5. But the headache I go through to install the jvm will be a showstapper for me.
er stopper
sorear bonsaikitten: as someone who has done FORTH implementation work, I think it's extremely funny when people try to pass off subroutine threaded code as a compiler 07:00
bonsaikitten sorear: hmm? I seem to be missing the obvious 07:01
thowe: looking at that ticket I'd guess you're using an ancient version of gcc that responds in unexpected ways
sorear subroutine threaded code is where you turn : moo foo bar baz ; into CALL foo; CALL bar; CALL baz; RET 07:02
basically just sticking a few extra bytes into the "interpreted" representation
bonsaikitten hmm ok
sorear can be a win, especially on platforms with no branch prediction
(FORTH implementors still like to optimize their code for the 6502) 07:03
I am also thinking of things like the old perl "compiler" which did that 07:04
make a list of calls to VM opcode functions, wrap it in C sugar, call it a C version of your perl program
you're not using Perl_runops anymore so you avoid the stigma of "interpreted code" 07:05
but that's _all_
performance is unaffected or worse because you're still paying for all the "does overloading apply for this +? is it adding integers, floats, or strings?" etc checks 07:06
oh and you just blew your icache
bonsaikitten intriguing
sorear the social construction of code efficiency 07:07
translators good, VMs bad 07:08
bonsaikitten hmm, that's an amusing perspective 07:12
xenoterracide time ./bin/perl6 -e "42.say" slave-iv 07:27
42
./bin/perl6 -e "42.say" 0.32s user 0.18s system 49% cpu 1.000 total
:(
tadzik well, I remember when it was 3 seconds ;)
07:30 ifim left
sorear me too 07:31
07:31 aindilis left 07:33 aindilis joined 07:35 aindilis left 07:37 sorenso joined 07:38 aindilis joined 07:52 sorenso left 08:06 domidumont joined 08:10 GlitchMr left 08:20 thowe left 08:27 domidumont left, domidumont joined 08:31 domidumont left, domidumont joined 08:34 sorenso joined 08:45 cognominal joined 08:54 flightrecorder joined 08:56 mtymula joined
mtymula HELL o !! 08:56
08:58 literal joined
dalek ecza: 2bdc586 | sorear++ | / (4 files):
Top removal: new_unit
09:01
ecza: c5fd4d7 | sorear++ | lib/ (2 files):
Top removal: context handlers
sorear mtymula: HEAVEN YO 09:03
mtymula nq heaven
09:04 FROGGS joined
dalek ecza: ee5dcf1 | sorear++ | lib/ (2 files):
MISSION ACCOMPLISHED
09:05
FROGGS \o/ 09:08
sorear well that's one huge block of yak hair behind me
09:10 jnthn left 09:13 jnthn joined
sorear sleep& 09:21
09:25 fhelmberger joined 09:27 rindolf joined
xenoterracide ./bin/perl6 -e "my $x;" what's wrong with that? Malformed my 09:29
09:29 PacoAir joined
huf try echo "my $x;" 09:29
without perl6
and then try with '' instead of "" 09:30
xenoterracide ugh shell interpolation, now I remember why I never use -e *headdesk*
tadzik just get used to '' 09:31
less keystrokes
huf i wish shell had generic quotes like perls do :)
or whatever that feature is called 09:32
09:34 rafl joined, rafl left
jnthn morning o/ 09:41
09:41 mars__ joined, wamba joined
xenoterracide would write a REPL to avoid this... except I generally find them to be a waste of time, because once writing real code it goes in a file 09:42
does die behave better in perl 6? or does it behave like die in perl 5 09:44
by better I mean reporting a decent call stack
jnthn Yes, it gives a call stack 09:46
flussence r: -> {die 1}.()
p6eval rakudo fc349a: OUTPUT«1␤ in block at /tmp/xEBqTbQZoh:1␤␤»
jnthn phenny: tell [Coke] Nice ticket/test work! In 115506, the missing block error you got is because you used "" which interpolate closures, rather than '' which don't 09:47
phenny jnthn: I'll pass that on when [Coke] is around.
jnthn [Coke]++ 09:49
09:53 dakkar joined 09:58 rafl joined
tipdbmp Why does sprintf('%x', 255) work, but 255.sprintf('%x'), does not? 09:59
It's not a method? 10:00
flussence r: say 255.sprintf('%x')
p6eval rakudo fc349a: OUTPUT«255␤»
flussence n: say 255.sprintf('%x') 10:01
p6eval niecza v22-29-g3ffe64c: OUTPUT«Unhandled exception: Unable to resolve method sprintf in type Int␤ at /tmp/BlZCJSZd9b line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 578) ␤ at /hom…
flussence rn: say 255.fmt('%x')
p6eval rakudo fc349a, niecza v22-32-gee5dcf1: OUTPUT«ff␤»
10:01 anuby left
cotto wouldn't you want the inverse? 10:02
rn: "%x".sprintf(255).say
p6eval rakudo fc349a: OUTPUT«ff␤»
..niecza v22-32-gee5dcf1: OUTPUT«Unhandled exception: Unable to resolve method sprintf in type Str␤ at /tmp/LPDQPHrYOw line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 578) ␤ at /hom…
10:03 circlepuller left, circlepuller joined
tipdbmp Okay, tnx but how to turn 'ff' to 255, hex doesn't seem to exist. 10:04
tadzik r: :16(ff).perl.say 10:06
p6eval rakudo fc349a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&ff' called (line 1)␤»
tadzik r: :16('ff').perl.say
p6eval rakudo fc349a: OUTPUT«255␤»
tipdbmp Ah, I c. :<base> works for any base?
tadzik up to 26, I think :)
10:07 hypolin left, SamuraiJack joined
tadzik I'll pour beer behind the collar of someone who invents unicode bases... 10:07
cotto I for one look forward to adding a snowman and a smiley face. 10:08
xenoterracide is use compile time or runtime in perl 6? I'm getting kind of used to doing load_class('foo')->new in p5... similar syntax possible? 10:12
tadzik r: ::('Int').new.perl.say 10:13
p6eval rakudo fc349a: OUTPUT«0␤»
jnthn use is compile time 10:14
xenoterracide so is there a way to load a module at runtime? and call new on it in one statement? 10:18
10:21 cognominal left 10:22 wamba left
jnthn require does the runtime loading, and the lookup is like tadzik showed...so the load_class you had above is probably implemented something like sub load_class($name) { require $name; ::($name) } in Perl 6. I *think* that require maybe should evaluate to the loaded class (if it contains a class of the right name at least), however. 10:22
So maybe (require "Foo").new should work 10:23
10:23 sorenso left 10:26 sorenso joined, fgomez left
xenoterracide what's the :: for? 10:28
10:28 buubot_backup left
jnthn It starts a package lookup 10:29
xenoterracide my $x = require "test";# Undefined routine '&require' called (line 4) 10:30
that's such an interesting failure
10:30 cognominal joined, buubot_backup joined
jnthn r: require "Test"; 10:30
p6eval rakudo fc349a: ( no output )
jnthn r: my $x = require "Test";
p6eval rakudo fc349a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&require' called (line 1)␤»
jnthn std: my $x = require "Test";
p6eval std 04216b1: OUTPUT«ok 00:00 42m␤» 10:31
jnthn Oddness. It *was* a statement_control, I thought...
Oh. STD has it as a package_declarator...hmm. 10:32
Anyway, I'm pretty sure trying to use require as an r-value right now won't do much useful. The behavior for that only got spec'd recently, and Rakudo hasn't caught up yet. 10:33
xenoterracide hmm... what's the behavior? 10:34
jnthn github.com/perl6/specs/commit/d46a...fb36144ab1 was the commit that specified it
xenoterracide cool, so if I read that right, something like load_class ultimately won't be needed 10:36
once rakudo catches up
jnthn Seems so :) 10:38
10:46 fgomez joined
xenoterracide can I add methods to the metaclass? 10:46
and are attributes also objects? 10:47
wait that's dumb
of course they are...
jnthn r: class A { has $!a; }; A.^add_method('foo', method () { say 'omg an added method' }); A.^compose; A.foo 10:48
p6eval rakudo fc349a: OUTPUT«omg an added method␤»
10:52 fgomez left, daniel-s__ left
bbkr_ r: class A { has $!a; }; A.^add_method('foo', method () { say 'omg an added method' }); A.foo # checking what will happen without compose 10:58
p6eval rakudo fc349a: OUTPUT«omg an added method␤»
bbkr_ perlcabal.org/syn/ link is down 11:00
11:07 wamba joined 11:12 fgomez joined 11:20 gootle left 11:21 gootle joined
masak mumbles an incoherent "good morning" 11:24
jnthn afternoon, masak :P 11:25
Ulti GOOD MORNING *super happy sunshine smile* <-- dont you hate these people, the ones not addicted to caffeine
masak actually, I'm not addicted to caffeine either. :)
just up late.
Ulti then sleep in 11:26
masak effectively that's what I did.
masak digs into $dayjob
Ulti I've just had an espresso and a half litre of diet coke, only now am I capable of smiling :(
naw 11:27
that means I have to now
jnthn The expresso sounds good...the diet coke less so :)
jnthn just did the coffee :)
masak yeah, stay away from anything that promises to replace sugar with something else. the "something else" is invariably worse. 11:30
and sugar isn't that good from the start.
jnthn Yeah, just eat stuff with real sugar in!
oh, dang :P
masak real sugar is preferrable, but you should attempt to eat it in its original context, such as in an apple, where it's mixed up with fibers and vitamins. 11:32
huf or chocolate, that's made from a plant too! :D 11:33
masak heh :) 11:37
huf or crystal sugar, made from real roots! what could be healthier than roots! 11:40
masak actually, roots are mostly carbohydrates, too... :) 11:43
jnthn
.oO( I thought I'd stop eating roots and switch to carrots, but then I realized...they're just mo' roots! )
11:44
11:45 xdbr joined 11:48 cognominal left
masak jnthn: dåligt :) 11:53
phenny: sv en "morot"?
phenny masak: "carrot" (sv to en, translate.google.com)
jnthn :D 11:54
flussence
.oO( carrot, an Old English word for the roots of the car tree... )
12:02
12:09 gootle left
dalek rlito: 1aa5804 | (Flavio S. Glock)++ | / (7 files):
Perlito5 - parser - autoquote fix
12:13
12:17 cognominal joined 12:19 bowtie joined 12:35 Psyche^ joined 12:39 Patterner left, Psyche^ is now known as Patterner
FROGGS btw, in Germany carrots are fruits by law... 12:42
dalek rlito: 09eb964 | (Flavio S. Glock)++ | t5/01-perlito/04-string.t:
Perlito5 - parser - add failing string interpolation tests
FROGGS because jam in germany must be made of fruits, and there is a carrot-jam from spain; if carrots where no fruits they would not be allowed to sell these jam here 12:43
12:52 cognominal left
tipdbmp What's the syntax for character classes negation? How can I match every character that's not a space ' '? 13:01
arnsholt <-[a..z]> 13:02
<-[ ]> in your case, that is
tipdbmp Okay, tnx.
arnsholt almost wrote <-[a-z]> but that would be wrong =) 13:03
tipdbmp <-[ ]> gives me an error but <-[\s]> seems to work. 13:05
But I think it's wrong =).
Or not.. 13:06
arnsholt Huh. Dunno why <-[ ]> wouldn't work
std: "test" ~~ /<-[ ]>/
jnthn Because whitespace isn't significant in regexes.
p6eval std 04216b1: OUTPUT«ok 00:00 44m␤»
jnthn r: say ' a ' ~~ /<-[\ ]>/
p6eval rakudo fc349a: OUTPUT«「a」␤␤»
jnthn That will do it.
arnsholt Oh, right. So you need to backslah it
tipdbmp I've never really used the /x modifier in perl 5, now it's the default so better get used to =). 13:07
dalek rlito: efdbc04 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - parser - string interpolation fix
13:08
13:15 SamuraiJack left 13:16 brrt joined
masak [Coke]++ # RT care 13:21
13:25 am0c joined
masak [Coke]: you basically made my day by going through the queue and resolving those tickets. it's nice to see sometimes that progress is real and observable. 13:25
13:29 am0c_ joined 13:30 orafu left 13:32 orafu joined, am0c left 13:33 cognominal joined
flussence r: say ' a ' ~~ /<-[' ']>/ 13:35
p6eval rakudo fc349a: OUTPUT«「 」␤␤»
flussence n: say ' a ' ~~ /<-[' ']>/ 13:36
p6eval niecza v22-32-gee5dcf1: OUTPUT«#<match from(0) to(1) text( ) pos([].list) named({}.hash)>␤»
masak hm? quotes have special meaning in charclasses? 13:37
flussence I guess so, I thought that would've worked...
masak S05 says nothing about it. 13:38
13:38 wamba left
masak I think <-[' ']> is equivalent to <-[' ]> 13:38
brrt from backlog, i heartily disagree with masak on the subject of sugars and sugar replacements
not that it matters a bit :-)
masak indeed. still, nice to hear. :) 13:39
jnthn masak: (char class) yes, it means that
masak jnthn: still doesn't explain why it matches a space, though.
in both implementations, no less.
jnthn oh!
masak oh, are spaces ignored?
jnthn Well, yes, it *does* mean what you said
But spaces aren't significant :)
masak ah. 13:40
flussence: there you go, then.
jnthn So it's also equivalent to <-[']> :)
masak flussence: it means what jnthn said.
flussence oh, ok
masak rn: say ' ' ~~ / <-[\x20]> / 13:41
p6eval niecza v22-32-gee5dcf1: OUTPUT«Match()␤»
..rakudo fc349a: OUTPUT«#<failed match>␤»
flussence in S05 where it mentions .match on a Buf uses "ASCII semantics", I don't think that's defined well enough. 13:55
masak you're probably right. I'd apply a patch with a better definition. 13:57
flussence how does this sound? "In ASCII semantics character classes only operate on codepoints 127 and below, everything else requires \xNN notation"
(or something like that) 13:58
masak I see what you mean by that, but the thing after the comma seems to contradict the thing before.
flussence yeah, it needs improving on. The gist of it is anything above 0x7F in a Buf is non-ASCII, so a char class can't match it. 14:00
oh hold on, perlre.pod has a pretty decent definition of the /a modifier. Maybe we can just copy that. 14:02
masak sounds like a nice idea.
14:05 am0c_ left 14:11 FROGGS left 14:12 flightrecorder left 14:13 flightrecorder joined 14:16 atrodo joined 14:25 FROGGS joined 14:35 sorenso left 14:40 skids joined 14:49 takesako_ left
arnsholt Ah, academic prose: "some people occasionally like extra redundancy once in a while" ^_^ 15:00
masak autopun. 15:01
15:01 benabik left
arnsholt Oh, indeed it is 15:01
masak also, twitter.com/karger/status/268436849750573056 15:02
arnsholt Heehee
15:03 domidumont left 15:05 Gothmog_ joined 15:06 sorenso joined 15:07 kaare_ joined, Gothmog_ left
[Coke] masak, jnthn: thanks for the pointer. I feel like an idiot now. :) 15:08
phenny [Coke]: 09:47Z <jnthn> tell [Coke] Nice ticket/test work! In 115506, the missing block error you got is because you used "" which interpolate closures, rather than '' which don't
masak [Coke]: I usually do when I make that mistake, too.
[Coke]: except the times when I rally against that particular feature of qq strings. but I doubt that will change; it's too established. 15:09
nowadays my brain simply has a fairly strong negative potential on combining the contepts "code as string" and "interpolating string". because I know I'll hit the blocks thing. 15:10
there are other annoying things, as well. HTML and interpolation. something innocent like "<head>$title</head>". boom.
interpolated as a hash lookup. 15:11
PerlJam yeah, that's got to be annoying.
flussence can we make that a Q: thing? "no postcircumfixes"
masak the correct solution is to escape the <
"<head>$title\</head>"
PerlJam I think I'd tend to use {} instead. 15:12
"<head>{$title}</head>"
masak oh right. that's always safe.
[Coke] I would avoid interpolation at that point.
too much CF & JS.
flussence oh right, you can do that can't you? interpolate {} but not $... 15:13
PerlJam [Coke]: It's a good thing we all use template toolkit! :)
arnsholt masak: The escape solution is visually like unspace as well, which I like =)
[Coke] (CF is awesome - #foo# is interpolation in strings. but you often see constructs like "if #variable# EQ 3" ... with an extra explicit interpolation outside of strings, where the variable would JFW anyway. 15:14
PerlJam arnsholt: It "chunks" wrong for me. It puts syntactic burden on the part of the string I *don't* want interpolated.
arnsholt: whereas {} makes a nice "chunk" that encapsulates the interpolated thing
masak PerlJam: good point. 15:15
dalek ast: 3e8347b | coke++ | S06-macros/errors.t:
Add test for RT #115506
15:15 domidumont joined
PerlJam in any case ... tmtowtdi! :-) 15:15
masak PerlJam: I was about to make the point that $var<key> is an advanced feature which harms beginning users in this case.
dalek kudo/nom: c82d103 | coke++ | t/spectest.data:
run new macros test file
15:16
masak er, $var<key> in qq strings, I mean.
PerlJam Do we have a way to interpolate but with a restricted set of delimiters for hash lookups? 15:18
15:20 GlitchMr joined, wamba joined 15:23 birdwindupbird left
masak I'm reading "Adverbs on quotes" in S02, and I don't see any adverbs for controlling hash lookup. 15:24
I guess you always get all kinds of hash lookup as soon as you start interpolating variables.
15:33 domidumont left
[Coke] masak; how would one test 115504 ? 15:35
15:36 domidumont joined
masak r: eval 'macro macro { die 1 }; say macro'; say $!; say "alive" 15:37
p6eval rakudo fc349a: OUTPUT«===SORRY!===␤Missing block␤at eval_0:1␤»
masak r: eval 'macro marco { die 1 }; say marco'; say $!; say "alive"
p6eval rakudo fc349a: OUTPUT«===SORRY!===␤1␤»
masak hrm. :) 15:38
r: try eval 'macro marco { die 1 }; say marco'; say $!; say "alive"
p6eval rakudo fc349a: OUTPUT«1␤ in macro marco at eval_0:1␤ in any marco at src/Perl6/World.pm:750␤ in at src/Perl6/Actions.pm:3494␤ in any ex-handle at src/Perl6/World.pm:2057␤ in expand_macro at src/Perl6/Actions.pm:3494␤ in at src/Perl6/Actions.pm:3606␤ in any term:sym<name> at src…
masak [Coke]: like that, maybe.
[Coke] r: use Test; eval_lives_ok 'macro m { die 1 }; m'; 15:39
p6eval rakudo fc349a: OUTPUT«not ok 1 - ␤# Error: 1␤»
15:39 am0c joined
masak it's supposed to die, no? 15:40
[Coke] r: use Test; my $a = try eval 'macro m { die 1 }; m', ~$!; is $a, 1, "eek";
p6eval rakudo fc349a: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/eQ_GtmfTxO:1␤␤not ok 1 - eek␤# got: 'Cannot call 'eval'; none of these signatures match:␤# :(Str $code, :lang(:$lang) = { ... }, PseudoStash :context(:$context))␤# '␤# expected: '1'␤»… 15:41
masak [Coke]: you're sending two args to &eval there.
probably not what you mean.
[Coke] r: use Test; try eval 'macro m { die 1 }; m'; is ~$!, 1, "eek"; 15:42
p6eval rakudo fc349a: OUTPUT«ok 1 - eek␤»
[Coke] hurm. putting that into errors.t fails. 15:45
masak what's the failure? 15:46
GlitchMr doc.perl6.org/type/Failure
[Coke] masak: there is no detail, just "not ok" 15:47
masak GlitchMr: *giggle*. thanks. ;)
[Coke] ahahahaha. forgot to update the plan. 15:50
dalek ast: ddb7f4f | coke++ | S09-autovivification/autovivification.t:
unfudge passing tests, tag with RT#
15:52
ast: e0d25b9 | coke++ | S06-macros/errors.t:
Add test for RT #115504
jnthn
.oO( Gee, at this rate [Coke]++ will the whole testneeded and I'll have to fix more stuff to fill it up again! )
[Coke] there are /90/ testneeded left. that is... unlikely. 15:55
jnthn :)
jnthn had no idea of the size of it
Happy it's getting cut down, though. 15:56
16:03 bowtie left 16:06 benabik joined
dalek ast: ff9539f | coke++ | S12-introspection/meta-class.t:
Add test for RT #114130
16:12
16:12 ifim joined 16:15 jaldhar left, sisar joined
[Coke] j 16:18
16:19 Gothmog_ joined
bbkr_ r: sub circumfix:<"[" "]"> ($a) { }; 16:24
p6eval rakudo c82d10: OUTPUT«Null PMC access in find_method('clone')␤ in block at /tmp/rR8hVl2vAk:1␤␤»
jnthn ooh.
masak submits rakudobug 16:25
16:25 sorenso left
masak r: sub circumfix:<[ ]> ($a) { } 16:25
p6eval rakudo c82d10: ( no output )
masak r: sub circumfix:<"[" ]> ($a) { }
jnthn Odd since I'm sure we have passing spectests covering circumfixes...
p6eval rakudo c82d10: OUTPUT«Null PMC access in find_method('clone')␤ in block at /tmp/c2eYJd1Kwh:1␤␤»
masak r: sub circumfix:<" "> ($a) { }
p6eval rakudo c82d10: OUTPUT«Null PMC access in find_method('clone')␤ in block at /tmp/75RVmWcslj:1␤␤»
masak r: sub circumfix:<"> ($a) { }
p6eval rakudo c82d10: OUTPUT«===SORRY!===␤Unable to find starter and stopper from '"'␤»
masak r: sub circumfix:<" q> ($a) { }
p6eval rakudo c82d10: OUTPUT«Null PMC access in find_method('clone')␤ in block at /tmp/xPoEpmYJJQ:1␤␤»
masak r: sub circumfix:<w "> ($a) { } 16:26
p6eval rakudo c82d10: OUTPUT«Null PMC access in find_method('clone')␤ in block at /tmp/QHTUlfVkKE:1␤␤»
masak so, it doesn't like those double quotes.
16:26 FROGGS left
jnthn r: sub circumfix:<w '> ($a) { } 16:26
p6eval rakudo c82d10: ( no output )
jnthn wtf
masak of course single quotes are fine :P
jnthn That makes even less sense...
16:27 flightrecorder left 16:30 MayDaniel joined
dalek rlito: 70581f0 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - parser - TODO cleanup: deref inside double quotes
16:30
16:32 brrt left 16:34 sisar left, sisar joined 16:35 alester joined
dalek ast: a62d23d | coke++ | S02-types/declare.t:
note matching RT #75896
16:48
ast: 69076df | coke++ | S04-statements/repeat.t:
Add test for RT #114432
masak I'm trying to understand why my implementation of Rakudo's core/Set.pm went away in June 2011, and then when it was added back in March 2012, it was a port of Niecza's Set. 16:49
my implementation had ASCII operators, and methods like .intersection
the current one doesn't.
16:50 wamba left
flussence did the spec change at all in the meantime? 16:50
masak no, and my initial commit admits that my implementation does a fair bit more than the spec demands.
but surely we never intended to have Set in the language without set operations? 16:51
(like we do now)
I suppose I'm partly to blame here, since I didn't write any spectests for those methods and operators. :)
bbkr_ r: sub circumfix:< > { }; # known? it should fail according to STD 16:54
p6eval rakudo c82d10: OUTPUT«===SORRY!===␤Unable to find starter and stopper from ''␤»
bbkr_ oh, fixed :) 16:55
dalek ast: d61f60f | coke++ | S05-modifier/ignorecase.t:
Add test for RT #114692
16:55 benabik left, benabik joined, am0c left 16:56 benabik_ joined, benabik left, benabik_ is now known as benabik
jnthn masak: What commit made it go away, ooc? 16:57
masak jnthn: github.com/rakudo/rakudo/commit/cf...5c162c2fa6 17:00
PerlJam blames jnthn ;)
bbkr_ r: sub infix:<> ( ){}; # misleading message 17:01
p6eval rakudo c82d10: OUTPUT«===SORRY!===␤Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list␤at /tmp/Jjxe80Ci_0:1␤»
bbkr_ should also complaint about something like "Null operator is not allowed " like STD, right? 17:02
17:02 bluescreen10 joined
bbkr_ reports 17:03
masak yes, it should.
17:03 bluescreen100 joined
dalek ast: 58bd695 | coke++ | S05-modifier/ignorecase.t:
Add tests for RT #114362
17:03
17:05 mars__ left
jnthn std: sub infix:<> ( ){}; 17:06
p6eval std 04216b1: OUTPUT«===SORRY!===␤Null operator is not allowed at /tmp/YXr4hztpoK line 1:␤------> sub infix:<>⏏ ( ){};␤Other potential difficulties:␤ Pair with <> really means a Nil value, not null string; use :('') to represent the null string,␤ or…
jnthn masak: Seems it must have somehow got lost in moving stuff over from b setting to nom setting 17:08
masak yes, that's what I suspected. 17:10
no big deal, I can probably copy+paste a few nice things straight into the new version.
jnthn++ # nom transition
tadzik++ # new version of Set
jnthn Yeah... It certainly wasn't a deliberate vote against your implemenation, just the usual churn of development... 17:11
masak indeed. 17:12
as I said, I shoulda written spectests...
dalek ast: 3203315 | coke++ | S04-statement-parsing/hash.t:
Add test for RT #78096
17:14 Chillance joined
[Coke] masak: yes, please do. :) 17:15
17:15 bluescreen__ joined 17:16 bluescreen100 left, bluescreen__ left
masak maybe after $dayjob today. 17:16
[Coke] is burning a vacation day today to be in house with sick kid. 17:17
(which is why he's still hacking on roast.)
17:19 am0c joined 17:20 rindolf left
[Coke] we have tests for rt.perl.org/rt3/Ticket/Display.html?id=73184 which were rejected. More details about what still needs fixing would be helpful. 17:23
(moritz, jnthn, bbkr were all involved)
17:28 cognominal left 17:29 rindolf joined
dalek ast: d89b5f4 | coke++ | S02-names/pseudo.t:
Add tests for RT #89706
17:34
17:35 wamba joined, SamuraiJack joined 17:38 azawawi joined
azawawi hi #perl6 17:39
17:40 erkan left
masak azawawi! \o/ 17:46
sorear hi #perl6 17:47
TimToady re $foo</tag> vs newbie issue, I am tempted to just outlaw literal subscripts starting with </alpha 17:49
since you an always write .< /alpha > if you mean that 17:50
I suppose that doesn't help the XMLish <tag/> case though
could outlaw that too
but that doesn't help with an interpolation before an opening tag, I guess 17:51
azawawi masak: not bad... feather.perl6.nl:8080/ is still up :) 17:52
masak azawawi: woot 17:53
sorear! \o/
TimToady maybe it just has to be a DIHWIDT...
azawawi masak: today i learned about ufo... masak++ 17:54
masak azawawi: "ENV{FARABI6_UNSAFE} is not enabled" when I try to run the code as Rakudo.
TimToady another semi-sane approach would be to outlaw interpolated subscripts entirely on $vars, but keep them on @ and % vars
masak azawawi: also, the application looks so nice, I'm definitely going to pay more attention to Twitter Bootstrap from now on. 17:55
TimToady: I think that's unfairly punishing people who just happen to keep an array or a hash in a $ var.
TimToady yes, it's just trading one failure mode for another 17:56
masak right.
PerlJam TimToady: how about outlaw subscripts on $vars except when using $var.<> notation?
17:56 spider-mario joined
TimToady well, unfortunately sentences often end with a . 17:56
PerlJam aye
[Coke] down to 82 testneeded. 17:57
TimToady kablooey at line $line.</endtag>
18:00 am0c left, dakkar left
sorear whatever you do, I'd prefer it to be a warning, for the sake of not gratuitously breaking working code 18:06
18:07 BillySeth left 18:08 BillySeth joined
TimToady warnings only get you so far, especially when the boss and/or customer mandates that warnings be treated like errors... 18:08
18:08 wamba left
benabik ls 18:08
ww
TimToady ww: command not found
18:09 azawawi left
TimToady maybe the warning on <foo> could be contingent on the string also containing a </foo>, and vice versa (modulo ignoring arguments in <foo>) 18:10
that might be CTA 18:12
PerlJam Perl should check if the $var does Associative before attempting subscription. If it doesn't, then interpolate $var, if it does then interpolate $var<...> with a warning.
TimToady (close to)
PerlJam :-)
TimToady um, it makes a difference to the parse
and you don't know what's in $var then 18:13
PerlJam types another :-) just in case
TimToady wasn't sure which thing the :-) was for :-)
18:14 sisar left
TimToady was hoping (in vain, it would appear) that it was for his CTA :) 18:14
18:15 Gothmog_ left
masak I agree that that would be a big improvement. 18:15
PerlJam TimToady: no, I would need a while to warm up to that one.
TimToady now if we could work it around to GTA, we might get some teenagers interested in Perl 6
pity Perl 6 doesn't have a gas pedal... 18:17
masak nr: sub accelerate { say "VROOOM!" }; accelerate 18:24
p6eval rakudo c82d10, niecza v22-32-gee5dcf1: OUTPUT«VROOOM!␤»
PerlJam your CTA idea seems way too specific to current technologies. That's the only thing that really bugs me about it.
Also, it seems like we could help future users who define their own subscripts too. (but I'm not too sure about that) 18:25
masak r: sub postcircumfix:<%% %%>($obj, $key) { $obj{$key} }; my %h = foo => 42; say %h%% "foo" %% 18:32
p6eval rakudo c82d10: OUTPUT«===SORRY!===␤Cannot add tokens of category 'postcircumfix'␤at /tmp/on9BKkqcWN:1␤»
masak dang. :)
18:33 wamba joined
masak std: sub postcircumfix:<%% %%>($obj, $key) { $obj{$key} }; my %h = foo => 42; say %h%% "foo" %% 18:33
p6eval std 04216b1: OUTPUT«===SORRY!===␤Bogus term at /tmp/lhuQh0_0GA line 1 (EOF):␤------> }; my %h = foo => 42; say %h%% "foo" %%⏏<EOL>␤Parse failed␤FAILED 00:01 51m␤»
masak TimToady: shouldn't the closing %% win over infix:<%%> there?
18:37 dagerik joined
dagerik hey guys. what does this do: use.v6;my.@f=1,1,{$^a+$^b}...*;say.@f[42]~".html"; 18:37
masak r: use v6;my @f=1,1,{$^a+$^b}...*;say @f[42]~".html"; 18:38
p6eval rakudo c82d10: OUTPUT«433494437.html␤»
masak it calculates the 43rd fibonacci number and prints it with .html after it.
18:38 bowtie joined
masak you had some '.' characters in there that should be spaces. I took the liberty of converting them. 18:39
dagerik: the {$^a+$^b} part is the one that does all the work. it's a block which takes two parameters and adds them together. the ^ twigils in those variables mean "this is actually a parameter to the block, declared right here and now". kind of a short form for '-> $a, $b { $a + $b }'. 18:43
dagerik i see 18:44
thanks
masak and '-> $a, $b { $a + $b}' blocks are kinda similar to 'sub ($a, $b) { $a + $b }', except that you can return from a sub but not from a block. 18:48
GlitchMr gist.github.com/4073963 18:49
I found a "bug" in Ubuntu 18:50
Not like it matters
But well, it's Python. Smallest errors cause exceptions.
18:56 zby_home joined
masak it's a tricky problem. 19:04
people have a tendency not to think about the sad paths of applications.
a lenient language with unchecked exceptions will create situations like the above, where two nested components on the call stack can't decide whose fault something was. 19:05
a stricter language with checked exceptions will be no fun to use, like Java.
19:08 fhelmberger left
tipdbmp print q :to 'END_HEREDOC';\nMy "formated" text\nand or something\nEND_HEREDOC # What's the syntax for here-docs? 19:28
jnthn Something like that... 19:29
tipdbmp Can't get the example: rosettacode.org/wiki/Here_document#Perl_6, to work. 19:30
jnthn r: eval qq{print q :to 'END_HEREDOC';\nMy "formated" text\nand or something\nEND_HEREDOC\n}
p6eval rakudo c82d10: OUTPUT«My "formated" text␤and or something␤»
19:30 sahadev joined
jnthn tries it 19:31
Hmm 19:32
PerlJam leading whitespace problem?/
tipdbmp Colons may not be used to delimit quoting constructs at line 121, near ":to 'QUOTE"
19:33 dagerik left
dalek rlito: 1d36762 | (Flavio S. Glock)++ | TODO-perlito5:
perlito5 - parser - TODO cleanup (match, not a bug)
19:33
jnthn PerlJam: Seems to be something about multiple heredocs. 19:34
tipdbmp: Hm, are you running Rakudo, and if so what version? :)
tipdbmp This is perl6 version 2012.10 built on parrot 4.6.0 revision 0
PerlJam Works fine if the second heredoc is q instead of qq
tipdbmp perl6 my_script.p6
PerlJam (obviously without Dylan interpolated)
jnthn PerlJam: so it does 19:35
PerlJam: good find
PerlJam Works fine here if the second heredoc is qq, but with nothing to interpolate.
jnthn tipdbmp: Ah, then I think your Rakudo is just a bit too old to do heredocs. 19:36
tipdbmp: They were only implemented in Rakudo within the last month.
tipdbmp =) 19:37
PerlJam No, it's a bug with interpolation I think.
jnthn PerlJam: Yeah, it's not a heredoc issue.
tipdbmp I can't get even a single one to work.
jnthn PerlJam: I know what it is
PerlJam It only seems to die if there's a $var at the end of the string.
jnthn PerlJam: Yes, EXPR ends up swallowing the whitespace after an interpolated thing. 19:38
PerlJam yep. makes sense.
jnthn PerlJam: Didn't figure out why yet...
dalek rlito: b33a702 | (Flavio S. Glock)++ | TODO-perlito5:
perlito5 - parser - TODO "things that work in perlito5, but which are errors in perl"
19:40
19:43 erkan joined, erkan left, erkan joined 19:53 brrt joined, raiph joined 19:57 SamuraiJack left
raiph In response to a comment by me that linked to Patrick's Rakudo Performance slides, the polite and reasonable harbud3 posted "casual timings" that suggest P6 startup time is 100x slower than P5's and P6 arrays are 3000x times slower than P5's. Any comments? www.reddit.com/r/perl/comments/12vt..._i/c716bke 20:01
Woodi raiph: tell him P6 is alpha software and at least they work :) 20:02
20:03 sirrobert joined
diakopter that's the wrong response 20:03
sirrobert lo p6
masak aye.
Woodi :)
masak raiph: only that neither of those two figures surprises me. in the sense that we know already that the speed ratio is two orders of magnitude for most things.
Woodi but you can't say P6 is faster then P5 :)
diakopter I don't think it's right to say "at least they work" 20:04
20:04 leont joined, domidumont left
masak it isn't if our objective is to be fast. 20:04
PerlJam just notes again how true TimToady's earlier comment about speed was.
diakopter because obviously the complainer includes performance within "work"
masak and arguably speed is important to many.
jnthn s/arguably// 20:05
masak *nod*
diakopter "it's alpha software; at least it doesn't format your hard disk" 20:07
jnthn Things are a bunch faster (order of magnitude) now than they were a year or two ago. There's little reason to doubt that if Perl 6 devs continue putting time into performance, it'll continue to get faster.
raiph masak: what about the two specific things I mention? (startup time and arrays) pm's slides suggested a less than 50x difference for 2012.06 and 5.14. Did startup slow down over 100% since? are arrays really 3000x times as slow?
masak jnthn++ 20:08
arnsholt jnthn: It'll be interesting to see how an JVM-backed Rakudo fares in that regard
jnthn raiph: "arrays are really 3000x times as slow" is so vauge I can't even say anything sensible to it other than, "what did you do with the array"
masak raiph: I don't have enough data to respond to that. maybe pmichaud does.
jnthn I mean, what operation is 3000x as slow? 20:09
sirrobert Is there a plan for a JVM-backed Rakudo?
raiph jnthn: www.reddit.com/r/perl/comments/12vt..._i/c716bke
jnthn sirrobert: Yes, Rakudo will target JVM also in the future.
sirrobert Cool... near future?
jnthn sirrobert: Define "near". Things are really too early on with that effort for me to make a guess at when it'll land right now. 20:10
diakopter there are very few developer resources currently allocated
sirrobert makes sense. We're beginning to deploy some bits of our stuff on JVM environment 20:11
Woodi ppls, 2012 is year when alpha software is getting awards :) eg. DayZ mod. en.wikipedia.org/wiki/DayZ#Reception Googles permament beta is old school now :)
sirrobert would be cool to make that cohesive.
with the rest of our stuff, I mean =) our p6 stuff 20:12
raiph jnthn: i apologize for using such vague wording. harbud3 was not vague. i wanted folk to look at what harbud3 did and said.
jnthn raiph: Startup time didn't really regress *but* changes to the way things were parsed meant that getting started with the parse became a bunch slower.
diakopter DayZ has a company backing it
jnthn raiph: When we switched over to using NFAs, etc.
Woodi raiph: but serious answer is pointing autor to pm numbers about P6 OO vs Moose 20:13
jnthn raiph: I put in some patches to pre-calculate and persist those; they'll be in 2012.11. 20:14
So that probably explains the discrepancy somewhat
20:14 bruges_ joined 20:16 bruges left
diakopter someone should try to reproduce those timings 20:16
jnthn The array one is the one that stands out
raiph jnthn: thanks. i thought there'd be a simple explanation for the startup speed regression. but the array... what u just said 20:17
jnthn fwiw, I *have* used Rakudo to do useful $dayjob stuff. In the last case, it worked out well because 1) I didn't need it to give me answers quickly and 2) Perl 6 grammars made the problem I needed to solve trivial, compared to what most other things I could have turned to would. 20:19
And my time is a LOT more expensive than CPU time. :) 20:20
masak seconded both on points 1 and 2. I have been in exactly those situations with $dayjob.
jnthn (When it's just something that gets run a handful of times.)
Now, there's a bunch of stuff I would certainly *not* use it for yet.
masak .oO( real-time trading ) 20:21
diakopter first person shooter 20:22
20:22 MayDaniel left
sirrobert is there any way to compile a complete program right now? not just libraries 20:23
masak name it .pm and 'use' it from the command line? :) 20:24
diakopter sirrobert: no, none of the compilers targets CPUs yet
sirrobert diakopter: ok, thanks
masak: plbth =)
20:26 nebuchadnezzar left
jnthn oh, ouch 20:28
20:28 brrt left
jnthn I figured out the push thing. 20:28
masak quadratic?
jnthn Rakudo doesn't do sink context yet. 20:29
masak oh! :(
jnthn for 1..10000 { push @a, $_ }
20:29 brrt joined
masak then it should be possible to post better numbers for that one... 20:29
jnthn Means that it ends up constructing a result list containing all the @a arrays produced along the way.
sirrobert Is there some way I can have ufo auto-install project dependencies?
not a module project
masak sirrobert: no, that's not what ufo does.
sirrobert I don't understand your response, masak =) 20:30
jnthn r: say [+] 1..10000
p6eval rakudo c82d10: OUTPUT«50005000␤»
jnthn So you end up making a 5 million element result array... 20:31
masak sirrobert: the purpose of ufo was, and is, to auto-generate a Makefile for a module author.
diakopter r: say [+] 1..1000000
masak sirrobert: it's the domain of module installers to install module dependencies; not of ufo.
p6eval rakudo c82d10: OUTPUT«(timeout)»
sirrobert ok, fair enough
diakopter n: say [+] 1..1000000 20:33
p6eval niecza v22-32-gee5dcf1: OUTPUT«(timeout)»
diakopter ..
.>.> 20:34
flussence rn: gist.github.com/3007551 20:35
p6eval rakudo c82d10, niecza v22-32-gee5dcf1: OUTPUT«125000250000␤»
flussence
.oO( would be nice if the evalbot accepted an <url> <argv> form )
20:37
masak oh, indeed.
flussence finds a 408 char long line in S05 and resists the urge to freak out on a reformatting spree... 20:40
[Coke] rakudo has broken 24200. 20:41
flussence yay
jnthn o.O
[Coke]++
sirrobert Does panda currently support private ecosystems? 20:42
looking through the source, but I don't see where it knows the address of the public ecosystem 20:43
sahadev hello all. I read about the recent addition of is-prime method. came up with this one-liner for problem 10 of Project Euler (find the sum of of all the primes under 2 million): say [+] 2, 3, -> $p { ($p, $p+2 ... *).first: {$_.is-prime} } ...^ * > 100. Tried it with rakudo star 2012.10. Even with 100 as the limit, it seems to be either very, very slow and I was just being impatient, or just hanging in some infinite-list-land. Is that one- 20:44
sirrobert run it with the debugger and check? 20:45
flussence sirrobert: Panda/Ecosystem.pm:83 20:46
sirrobert flussence: thanks
fluessence: perfect. I can work with that =) 20:47
masak r: say [+] 2, (3, 5 ... 101).grep(&is_prime)
p6eval rakudo c82d10: OUTPUT«2␤»
masak hm.
20:47 zby_home left, brrt left
masak r: say (3, 5 ... 101) 20:48
p6eval rakudo c82d10: OUTPUT«3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101␤»
masak r: say (3, 5 ... 101).grep(&is_prime)
p6eval rakudo c82d10: OUTPUT«␤»
masak r: say (3, 5 ... 101).grep(&is-prime)
p6eval rakudo c82d10: OUTPUT«3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101␤»
masak :)
20:48 raiph left
masak r: say [+] 2, (3, 5 ... 101).grep(&is-prime) 20:48
p6eval rakudo c82d10: OUTPUT«1161␤»
PerlJam weird about is_prime though.
felher sahadev: isn't the pronlem that you have ($p, $p+2).first: *.is-prime. But since $p is already a prime, $p gets returned all the time and it never reaches 100?
masak PerlJam: yeah, but it's in RT.
sahadev: that version above seems fast enough (and shorter).
sahadev felher: you are correct. 20:49
20:49 kurahaupo joined
masak felher++ # nice catch 20:49
sahadev it should have read: ($p+2, $p+4 ... *).first: {$_.is-prime} 20:50
felher++
20:50 raiph joined
felher maybe, but masak++ 's version is still the nicer one :) 20:50
20:51 sorenso joined
sahadev masak: indeed your version is shorter. however, I was trying to understand lazy lists. 20:51
masak I see.
felher sahadev: then it seems you are well on your way to understanding lazy lists. With +2 and +4 your code works just nice :) 20:53
raiph jnthn, masak: thanks for discussion (and resolution afaiac) of the startup and array timings. the string append benchmark is 200x slower. maybe there's nothing to say about that? is parrot an issue with this? 20:54
PerlJam raiph: run it with niecza?
20:57 nebuchadnezzar joined, leont left 21:00 GlitchMr left
TimToady yes, the postfix should win, but STD doesn't support user-defined postcircumfixes yet 21:00
21:05 benabik left
masak oh. 21:05
raiph rn: my $s=""; for (1..50000) { $s ~= "x" } 21:06
p6eval niecza v22-32-gee5dcf1: OUTPUT«(timeout)» 21:07
..rakudo c82d10: ( no output )
raiph rn: my $s=""; for (1..500) { $s ~= "x" }
PerlJam: looks like niecza's slower?
p6eval rakudo c82d10, niecza v22-32-gee5dcf1: ( no output )
21:08 wamba left
masak r: for 0..10 -> $zeroes { my $n = ("1", "0" x $zeroes, "1").join; say "$n: ", is-prime($n) ?? "prime" !! "not prime" } 21:15
p6eval rakudo c82d10: OUTPUT«11: prime␤101: prime␤1001: not prime␤10001: not prime␤100001: not prime␤1000001: not prime␤10000001: not prime␤100000001: not prime␤1000000001: not prime␤10000000001: not prime␤100000000001: not prime␤»
masak hm.
rn: say 7 * 11 * 13 21:16
p6eval rakudo c82d10, niecza v22-32-gee5dcf1: OUTPUT«1001␤»
21:17 kaare_ left
TimToady p5 takes some pains to optimize for repeated appending/pushing, and in any case always allocates more than you asked for when it needs to extend 21:24
21:26 wamba joined
TimToady in particular, if it notices that you're shifting and pushing the same array, it increases the allocation even further, so the array elements don't have to be copied down to position 0 so often 21:27
21:27 crazedpsyc left
TimToady (assuming that hasn't been removed since I did it, of course...) 21:27
PerlJam yeah, p5 allocates space much like a waiter once brought me milk. I had finished my glass and asked for another, but he brought me 2, so I finished those and asked for another then he brought me 3, so I *had* to finish those to see if he'd bring 4 (and he did) 21:28
cotto eventually he'd get tired and just bring you a cow
TimToady or two... 21:29
21:29 bluescreen10 left, crazedpsyc joined
masak he only brings two cows if you finish the first cow. 21:33
cotto or if you write on the first one 21:38
jnthn *groan*
geekosaur super cow powers? 21:44
PerlJam suddenly wonders if this same trick works with bacon. 21:45
21:45 felipe joined
masak it's messier with bacon. you can do it, but the kitchen'll end up looking like a pigsty. 21:47
geekosaur managed somehow to interpret "messier" as "Messier"... long day 21:49
masak don't shoot the Messier. 21:50
diakopter what's Messier
geekosaur catalog of astronomical objects 21:51
masak named after Charles Messier, French astronomer.
raiph jnthn: before i finish my response to harbud3, do you have anything to add to TimToady's comments about repeated string appends (as per the 200x slower string append benchmark)?
TimToady also, p5 strings are mutable, which may have some bearing on this 21:54
sirrobert What does "ICU not loaded" mean? 21:55
masak sirrobert: that you didn't install Parrot with icu. 21:56
hm, is it libicu-dev or something like that?
jnthn raiph: Mostly just that they are about the worst case for immutable strings, and a join would almost certainly do a lot better due to needing to do less copying.
masak sirrobert: it usually happens when you try to do something with Unicode.
jnthn: I guess one could optimize that case to doing stringbuffers or something... 21:57
raiph jnthn: thanks. (so nothing to do with parrot really, right?)
sirrobert masak: ok, thanks.... I didn't do anything different, except than I'm in a new VM 21:58
64-bit ubuntu 12.10 (which may have caused the issue)
jnthn raiph: Well, Rakudo uses Parrot's strings fairly directly. 21:59
masak: Perhaps...or just using a more ropey string implementation :)
22:00 skids left
masak or that. 22:00
22:00 benabik joined
masak sirrobert: packages.ubuntu.com/hardy/libicu-dev 22:00
raiph jnthn: ok. i'm trying to figure out if parrot string handling speed is largely positive, negative, or neutral in relation to the repeated append of harbud3's benchmark 22:01
22:01 ifim left
jnthn raiph: And immutable string model has good properties for some uses cases, but is bad in this one. 22:01
22:01 grondilu joined
jnthn raiph: Note that Java, C#, C and probably many other languages have this same string model. 22:02
raiph: And expect their users to do something other than repeated concatenation to build up large strings.
diakopter ropies++
grondilu rn: my @a = ^3; @a ,= @a.shit; say @a # is that a safe way to rotate an array?
jnthn I'm not saying I want this to be the long term reality, just pointing out that the problem is hardly just a Rakudo thing :)
p6eval niecza v22-32-gee5dcf1: OUTPUT«Unhandled exception: Unable to resolve method shit in type Array␤ at /tmp/DfIB8P2U0i line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 578) ␤ at /home… 22:03
..rakudo c82d10: OUTPUT«No such method 'shit' for invocant of type 'Array'␤ in block at /tmp/wJAMTAhF5h:1␤␤»
grondilu oops
jnthn grondilu: no, it's a shit way
grondilu rn: my @a = ^3; @a ,= @a.shift; say @a # is that a safe way to rotate an array?
lol
p6eval rakudo c82d10, niecza v22-32-gee5dcf1: OUTPUT«1 2 0␤»
jnthn Isn't there a rotate method? :)
rn: my @a = ^3; @a.rotate; say @a 22:04
grondilu r: my @a = ^3; say @a.rotate: 1;
p6eval rakudo c82d10, niecza v22-32-gee5dcf1: OUTPUT«0 1 2␤»
rakudo c82d10: OUTPUT«1 2 0␤»
grondilu cool
jnthn Oh, with an arg :)
raiph jnthn: lol and thanks 22:05
grondilu r: my @a = ^3; @a.rotate: 1; say @a; # just checking it operates on place
p6eval rakudo c82d10: OUTPUT«0 1 2␤»
diakopter r: my @a = ^3; say @a.rotate: (@a.Int * 999999999999999999999);
p6eval rakudo c82d10: OUTPUT«0 1 2␤»
grondilu r: my @a = ^3; @a .= rotate: 1; say @a; 22:06
p6eval rakudo c82d10: OUTPUT«1 2 0␤»
diakopter r: my @a = ^3; say @a.rotate: (@a.Int * 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999); 22:07
p6eval rakudo c82d10: OUTPUT«0 1 2␤»
TimToady already change the RC entry to use rotate :)
*changed
grondilu ok thanks
masak diakopter: trying to picture that last one makes my head spin. 22:08
TimToady modular arithmetic is your friend
jnthn Big integers too :)
diakopter r: my @a = ^3; say @a.rotate: (@a.Int * 9**9**9**9); 22:09
p6eval rakudo c82d10: OUTPUT«Nominal type check failed for parameter '$n'; expected Int but got Num instead␤ in method rotate at src/gen/CORE.setting:5862␤ in block at /tmp/mYPElUjUpE:1␤␤»
jnthn ...not Cool 22:10
grondilu TimToady: you don't mind if I change it to '@prisoner .= rotate: $k-1', do you? I think .method: @args looks better than .method(@args)
22:13 sorenso left
TimToady is fine 22:13
though I tend to prefer spaces around - these days to avoid confusion with hyphenated names 22:14
grondilu anyway on second thouth .rotate($k-1) is fine too 22:15
*thought
tadzik hm, I did new version of Set? :) 22:24
masak ported it from Niecza... :) 22:29
tadzik :) 22:30
sorear o/ 22:37
masak sorear! \o/ 22:42
22:46 fgomez left, rindolf left 22:48 cognominal joined
felher 'night, #perl6 :) 22:50
masak 'night, felher 22:52
22:52 sftp_ joined 22:53 sftp left 22:54 PacoAir left 22:56 Patterner left 22:57 Psyche^ joined, Psyche^ is now known as Patterner 23:04 spider-mario left
[Coke] if I were doing java strings in perl, I'd push things onto an array and then join it at the end.) 23:04
flussence I'd prefer the language to do things like that for me, last time I needed to do that was writing JS for IE6... 23:05
[Coke] I think it's reasonable to expect the users to know what different data types are good for. 23:06
23:07 fgomez joined 23:19 wamba left
flussence yeah, we have Cat for that (...in the spec), but there's still no good reason for string appending to have quadratic slowdown... 23:19
(after testing it myself, niecza's ~= seems a lot worse than quadratic... :/) 23:23
sorear niecza's ~ is linear time in the combined size of the two operands 23:24
flussence n: sub timer(&a) { my $t = time; &a.(); say time - $t; }; timer { my $a = ''; for ^1000 { $a ~= 'a' } } 23:25
p6eval niecza v22-32-gee5dcf1: OUTPUT«0.072267055511474609␤»
flussence I'm getting 1000 => 0.03, 10000 => 0.78 and 100000 => 32.5 with that 23:26
jnthn It's not that ~ is quadratic, it's that you're doing an O(n)-y thing n times
sorear I can fit a quadratic to those three numbers :p 23:27
also - for ^1000 is far from the fastest way to loop N times in niecza
best way is while $i-- { ... } 23:28
flussence not --$i? :) 23:30
23:31 tokuhiro_ joined
sorear oh yeah, --$i is marginally better 23:31
masak 'night, #perl6
sorear bishop, masak.
flussence (also, I need to use `now` to get useful durations in rakudo and `time` in niecza... what gives?) 23:34
hm, that's interesting. niecza's faster up to 10e3 iterations but then it goes way off the deep end at 10e4... 23:35
sorear times[0] will give you better durations in niecza because it only counts time allotted to your process, ignoring time the CPU spends on other processes 23:36
jnthn sleep & 23:40
flussence I notice niecza's using almost exactly 250% cpu time while running these, why's that? a loop like this doesn't seem all that parallelisable :) 23:41
sorear flussence: you're spending most of the time in the GC I bet
a 10e4 loop will allocate 50MB of memory
10e5, 5GB
flussence 10e5 is... holding at 100MB for me actually 23:44
mono is weird.
oh, you mean 5GB *total allocations*... 23:45
sorear yes
and the GC is partially parallel
23:51 skids joined 23:55 whiteknight joined