»ö« | perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend!
Set by Tene on 14 May 2009.
yary perl6: say ($_ * 2 for 0..4) 00:03
p6eval pugs: OUTPUT«*** ␤ Unexpected "for"␤ expecting operator or ")"␤ at /tmp/6X3OkKSxfd line 1, column 13␤»
..rakudo ba09b2: OUTPUT«-1␤»
..elf 27084: OUTPUT«syntax error at (eval 123) line 3, near "(for"␤ at ./elf_h line 5881␤»
yary hello all, beginner question this time. S04 suggests that the above should print 0248, judging by the example ""@evens = ($_ * 2 if .odd for 0..100)" 00:04
is that something that just isn't implemented yet? 00:05
rakudo: my @evens=($_ * 2 for 0..4); say @evens; 00:08
p6eval rakudo ba09b2: OUTPUT«-1␤»
TimToady rakudo doesn't implement loop returns yet 00:11
yary thx
00:25 nErVe left 00:26 icwiener joined 00:28 [particle] joined 00:30 DanielC_ joined 00:31 DanielC is now known as Guest49004, DanielC_ is now known as DanielC 00:35 beggars joined 00:46 Guest49004 left 00:57 justatheory left, yary left 00:58 justatheory joined 01:09 justatheory left 01:21 molaf_x joined, yary joined
yary perl6: my $sub= -> $n { if $n == 0 { say "done" } else { say $n; &?ROUTINE($n-1)}}; $sub(3) 01:22
p6eval elf 27084: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤ from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤ from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤ from
../home/evalenv/pugs/misc…
..pugs: OUTPUT«3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤
..rakudo ba09b2: OUTPUT«3␤invoke() not implemented in class 'Undef'␤in Main (/tmp/Fw2Mt0GzcQ:2)␤»
yary yikes, I hope pugs terminated
pugs: say 1 01:23
p6eval pugs: OUTPUT«1␤»
yary phew
01:23 molaf_xx left
yary Is &?ROUTINE not fully implemented in rakudo? 01:24
01:31 xinming left 01:32 yitz_ left 01:33 xinming joined 01:36 kate21de1 left, Lorn left 01:37 Lorn joined 01:47 ihrd joined 01:54 xinming_ joined 01:56 ihrd left 01:58 agentzh left, agentzh joined 01:59 agentzh left, agentzh joined 02:00 agentzh left 02:03 agentzh joined, agentzh1 joined
eternaleye rakudo: -> { my $foo = 'bar'; say &?ROUTINE.perl }.() 02:08
TimToady that wasn't a routine
p6eval rakudo ba09b2: OUTPUT«undef␤»
TimToady that's just a Block
try &?BLOCK
eternaleye rakudo: -> { my $foo = 'bar'; say &?BLOCK.perl }.()
p6eval rakudo ba09b2: OUTPUT«undef␤»
TimToady my $sub= -> $n { if $n == 0 { say "done" } else { say $n; &?BLOCK($n-1)}}; $sub(3) 02:10
oh, that won't work either
since it's the innermost block
eternaleye &?OUTER::BLOCK ? 02:11
TimToady perl6: my $sub= -> $n { if $n == 0 { say "done" } else { say $n; &?OUTER::BLOCK($n-1)}}; $sub(3)
02:11 xinming left
p6eval rakudo ba09b2: OUTPUT«3␤invoke() not implemented in class 'Undef'␤in Main (/tmp/jkTmtRPktf:2)␤» 02:11
..elf 27084: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤ from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤ from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤ from
../home/evalenv/pugs/misc…
..pugs: OUTPUT«3␤*** outer - not yet implemented: "&?BLOCK"␤ at /tmp/99Zp4RYbms line 1, column 59-79␤»
02:11 justatheory joined
TimToady perl6: my $sub= sub ($n) { if $n == 0 { say "done" } else { say $n; &?ROUTINE($n-1)}}; $sub(3) 02:11
p6eval rakudo ba09b2: OUTPUT«3␤invoke() not implemented in class 'Undef'␤in sub _block50 (/tmp/KBps6yWr0I:2)␤called from Main (/tmp/KBps6yWr0I:2)␤»
..pugs: OUTPUT«3␤2␤1␤done␤»
..elf 27084: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤ from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤ from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤ from
../home/evalenv/pugs/misc…
02:11 icwiener left
eternaleye I just had a horrible, evil, frightening, wonderful idea. 02:12
Someone needs to get Damian to write a p6 SelfGOL
It would shut up the "you can't golf" and "you can't do obfu" complainers simultaneously. 02:13
Then again, just because Damian can write it doesn't mean it's feasible for most mortals ;D 02:14
02:22 agentzh left 02:26 Whiteknight left, beggars left
s1n am i mistaken? is there a uniq function for lists? 02:28
02:37 Meldrake joined
TimToady grep { !(state %){$_}++ } should work :) 02:41
02:42 skids left
TimToady std: grep { !(state %){$_}++ }, 1,3,2,3,2,3,4,5,6,1,2 02:49
p6eval std 27084: OUTPUT«ok 00:03 40m␤»
eternaleye rakudo: say <foo bar foo>.uniq
TimToady perl6: say ~grep { !(state %){$_}++ }, 1,3,2,3,2,3,4,5,6,1,2
p6eval rakudo ba09b2: OUTPUT«foobar␤»
rakudo ba09b2: OUTPUT«Malformed declaration at line 2, near "%){$_}++ }"␤in Main (src/gen_setting.pm:0)␤»
..elf 27084: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:117:in `block in to_dump0': undefined method `to_dump0' for nil:NilClass (NoMethodError)␤ from /home/evalenv/pugs/misc/STD_red/match.rb:117:in `map'␤ from /home/evalenv/pugs/misc/STD_red/match.rb:117:in `to_dump0'␤ from
../home/evalenv/pugs/mi…
..pugs: OUTPUT«*** ␤ Unexpected "%){$"␤ expecting "=", formal parameter, context, ":" or "("␤ at /tmp/KyMbbuwRni line 1, column 21␤»
TimToady perl6: say ~grep { !(state %x){$_}++ }, 1,3,2,3,2,3,4,5,6,1,2
p6eval pugs, rakudo ba09b2: OUTPUT«1 3 2 4 5 6␤»
..elf 27084: OUTPUT«Unknown rule: scope_declarator:state␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
s1n eternaleye: i must have missed that, where was .uniq in the spec? 02:50
eternaleye buubot: spack uniq
buubot Couldn't match input.
eternaleye Huh?
o.0 02:51
TimToady not specced 02:52
02:52 agentzh1 left
eternaleye Why is rakudo doing it? 02:52
02:52 agentzh joined
eternaleye Is it a fossil? 02:52
TimToady came from the pugs t/ 02:56
02:57 xinming joined
TimToady it's a fairly trivial sub, as you can see 02:57
03:08 xinming__ joined 03:10 xinming left 03:13 xinming_ left 03:35 cdarroch left 03:49 meppuru joined 03:52 bacek left 03:57 synth left 03:59 synth joined 04:05 meppl left 04:10 meppuru left 04:18 FurnaceBoy left 04:50 meppl joined 05:17 frioux left 05:18 frew_ joined 05:26 kate21de joined 05:30 frew left 05:41 agentzh left, agentzh joined 05:50 r0bby left 05:58 ejs joined 05:59 bejuryu joined 06:04 justatheory left 06:07 masak joined 06:18 kate21de left
masak greetings, serialization camels. 06:22
moritz_ greetings, deserialized lambdacamel 06:24
06:33 ilogger2_ joined
masak moritz_: re your proto-related mail: this is the first time I've encountered this setup with symlinks. I agree that proto should ideally support it, especially since it might become a more common configuration as Rakudo and Parrot get increasingly independent paths. 06:36
probably the only viable solution is re-introducing the equal footing of PARROT_DIR and RAKUDO_DIR. 06:37
but I'm open to other suggestions.
I also have a number of problems with today's Configure.pm. firstly, it's unreasonable for it to issue "Please contact the proto people." -- proto was used to create the configure script, but at that point the relationship between proto and the module ends. 06:39
06:40 Molaf joined
moritz_ otoh I wonder if it's worth the trouble 06:41
since pmichaud is already working on building rakudo against an installed parrot
and I expect it to land before the july release 06:42
then PARROT_DIR will go away anyway
masak \o/ 06:44
szabgab good morning, my heavy work duty is over, I hope I can spend some time with Perl 6 in the coming weeks 06:59
first thing, I build rakudo, ran ./perl6 got a nice prompt but could not leave 07:00
exit; got no response 07:01
neither ctrl-d
only Ctrl-c worked
moritz_ szabgab: there's already a ticket for that 07:04
szabgab I am glad it is not personal :-) 07:05
masak szabgab: yet another way the REPL sucks. :/ 07:06
07:07 iblechbot joined
Matt-W Morning 07:21
masak: well it's not a proper REPL really 07:22
masak Matt-W: you're right. calling it a REPL is an insult to REPLs throughout the world.
I wish it were, though.
I wish it were a good one, with tab completion and line continuation. 07:23
07:24 dakkar joined
Matt-W Then write one :P 07:31
sjohnson sup Matt-W how's life 07:33
masak Matt-W: I'd love to. I need one particular technology to get started: the ability to evaluate a particular piece of code in a particular scope. that's what I figure is needed to make variables survive from one command to the next. 07:34
Matt-W sjohnson: not only am I still waiting for my car to be repaired or written off, I've also misplaced my iPod 07:35
masak aww. 07:36
Matt-W masak: yes
moritz_ masak, literal: how's the gsoc project going? 07:40
masak moritz_: good question. I haven't spoken with literal in quite some time. 07:41
we had one of those perl6-soc meetings, and it was pretty nice. 07:42
but we never turned it into a habit.
moritz_ we should.
it prevents things from slipping 07:43
masak aye.
sjohnson Matt-W: your car, bad or good news? 07:46
sounds like bad, but if you're getting money for something wanted to get rid of... 07:48
07:50 ejs joined
Matt-W sjohnson: it was stolen and crashed 07:56
sjohnson: so really it's not good news any way
07:57 ejs joined 08:00 clintongormley joined
sjohnson rough news... does your insurance cover it though? 08:03
minus a deductable?
Matt-W yes it should do 08:04
£150 excess
market value replacement
but I have retail price protection from another policy, so I should get back what I paid for it less £150
which is good, as it's lost over a thousand pounds in value 08:05
The car market is completely baffling
sjohnson well 08:13
if this makes you feel any better
i have had my shit stolen before 08:14
and had no compensation... was robbed of about 300 dollars worth of stuff
it was a very ... upsetting feeling
as i'm sure you know
masak nod.
sjohnson so you're not the only one
someone took a crowbar and busted into my apartment 08:15
:(
masak was threatened with a knife and robbed of his laptop in December
unsettling is the word.
sjohnson very
masak: what about you?
ever been ripped off?
masak I just told you. 08:16
sjohnson oh
i didnt see the /me
that sucks
masak aye.
sjohnson where was it?
in the US? England?
masak on a bus station in Sweden.
sjohnson wow that is very scary and unsettling
indeefd
masak lots of people around, but the robber was discrete. 08:17
sjohnson the thief
ugh
masak ah. yes. the guy with the knife.
sjohnson sorry to hear that
08:17 M_o_C joined
sjohnson i worked as a cable guy at a ski hill 08:18
and set up the internet gateways and all that jazz
and someone stole the DHCP server, which was probably worth 30 bucks
just cause i put a sticker that said "internet server"
he probably thought he hit the motherload
it was like a p/166 running FreeBSD
what the hell does he think he's gonna do with that
i'm 100% certain he wouldn't know how to mount the partition to even gain access to nothing 08:19
08:19 smtms joined
moritz_ www.perlmonks.org/?node_id=771896 this node got me thinking - can we do something about all these outdated repos and websites? 08:21
Matt-W those which we can get people who have access to them to do something with, we could perhaps get marked with notices of being out of date please go here instead? 08:22
masak aye. 08:23
the backside of Perl 6 changing to incorporate new ideas and improve on old ones is that existing explanations bit-rot very quickly. 08:24
Matt-W yes 08:37
but we know this
I had to update Form last week because the semantics of comb changed
masak yes. 08:40
the only way to be a Perl 6 software developer is to be close to the spec and Rakudo development. 08:41
szabgab masak, have you tried Padre since Oslo ? 08:45
masak szabgab: no. do I have something to look forward to?
szabgab I am not sure, it has the STD based syntax highlighting 08:46
and the Rakudo/PGE based one 08:47
you can select which one to use
masak I'm definitely interested in how you do that. 08:48
szabgab I don't know :-) 08:49
azawawi is maintaining it
masak bet it's easier in Perl 5 than in Perl 6 at present, though. 08:53
08:58 jferrero joined 09:07 ihrd joined, ihrd left
Matt-W I tried to install Padre at work, but failed horribly 09:10
Matt-W doesn't like Windows 09:11
rjh Padre is a pain to install anywhere
Well at least on Ubuntu, it installed about 150 CPAN modules
imho it needs work to match vim's perl-support 09:12
Matt-W argh CPAN modules 09:13
I've been learning Catalyst
the number of modules I have to install isn't so problematic
the problem is that I can't seem to make it automatically install dependencies without asking
And the number of times a module's failed tests or not built
Some of them fail due to not having dependencies that aren't listed as dependencies in CPAN! 09:14
szabgab we are working on the installation 09:16
Matt-W good good
not your fault if somebody else's CPAN packages are a bit dodgy though
szabgab one approach is that Padre is going to be included in the next version of Ubuntu
09:16 ejs1 joined
szabgab and Alias told me that a few days ago he built padre on a new Strawberry without any failure in the prereq 09:17
so once day we might even have an .msi installer for Padre with Strawberry
rjh, if you tried it, I'd be glad if you gave me a few items that you felt were missing the most (except the key bindings which is a separate issue) 09:19
Matt-W szabgab: nice!
rjh szabgab: I heard about the Ubuntu package and that would make it much more convenient 09:20
szabgab: at the time I tried it, it had mouse-over function definitions/perldoc for perl 6 (via plugin) but not perl 5
szabgab rjh, indeed, we missed the previous Ubuntu freeze by about a week 09:21
now it is already in as I understand
rjh it didn't have integration with perltidy, perlcritic, perl -c, tests, test coverage, pod coverage, debugging or tracing
these things would be very cool to have
szabgab afaik all of these have been implemented at various levels in plug-ins 09:22
rjh I had a good look around CPAN
perhaps I missed them?
szabgab though the mouse-over for perl 6 seems to be gone now, I'll check that 09:23
easier to see the list here; svn.perlide.org/padre/trunk/
all except the debugger are in there
rjh I see 09:24
I suppose they mainly need refinement 09:26
e.g. the perlcritic could do with having a proper list of issues, which you can click on to jump to the line number etc.
is there a tag facility (e.g. jump to function definition, jump to module source) 09:27
09:27 pmurias joined
rjh having some way of getting tooltip function definitions would be really useful for some of those more obscure perl functions 09:27
pmurias szabgab: what would be nice is if the dev.pl script automatically used the plugins from the repo 09:28
rjh Hmm, I wonder what happens if I open one of those horrible 4000-line Perl scripts 09:29
szabgab tooltip definitions ? I think you mean what we call calltip a buble coming up when you typed in the name of a sub ? 09:30
rjh yes
szabgab we have that
both for Perl 5/6
rjh you sort of do, it disappears once you type the first argument, but that's okay 09:31
szabgab but currently it is on/off, we should refine that so you can say, I know how to write print(), don't show that to me anymore
rjh but it doesn't deal with imported functions yet
szabgab oh I think that could be changed
nope
rjh i understand that's a bit more complex :)
szabgab pmurias, it does :-)
dev.pl -h
you just have to install the other half of CPAN that are required by those plugins ... 09:32
pmurias szabgab: nice 09:33
rjh tries to upgrade Padre 0.34 -> 0.36 and fails
ah, it did Padre's tests before upgrading File::Path. CPAN-- 09:34
09:34 donaldh joined 09:36 viklund joined
pmurias why is cpan.uwinnipeg.ca prefered over search.cpan.org 09:37
?
moritz_ it's a matter of personal preference, I'd say 09:38
viklund ehlo 09:41
moritz_ olé 09:42
viklund ;) 09:43
szabgab pmurias, I only prefer it because it is open source
10:02 barney joined 10:11 sri_kraih joined
moritz_ ok, I sent an email to svn at perl.org 10:11
and I requested to either mirror the pugs svn and keep it up to date, or close down svn.perl.org/perl6/pugs/trunk/ 10:12
szabgab rakudo: my $x = "abcde"; substr($x, 1,1) = "x"; say $x 10:18
p6eval rakudo ba09b2: OUTPUT«abcde␤»
szabgab whould it work ?
should it work?
moritz_ yes 10:19
substr is still an lvalue in perl 6
viklund does anyone know if I can do p5s IO::Select->can_read in rakudo somehow?
szabgab rakudo: my $x = "abcde"; say substr($x, 1,1) = "x"; say $x
moritz_ pugs: my $x = "abcde"; substr($x, 1,1) = "x"; say $x
p6eval rakudo ba09b2: OUTPUT«x␤abcde␤»
pugs: OUTPUT«axcde␤»
moritz_ szabgab: it's not implemented in rakudo right now 10:20
szabgab I see that, I just was wondering if it should be, but ok thanks; lunch &
moritz_ pugs: my $x = "abcde"; substr($x, 1,0) = "x"; say $x 10:21
p6eval pugs: OUTPUT«axbcde␤»
10:21 Su-Shee joined
Su-Shee hi. 10:21
pmurias Su-Shee: hi 10:22
viklund helo
hmm, I'll ask pmichaud++ when he comes here ;) 10:23
moritz_ 1) spec it 2) implement it 3) profit! 10:24
viklund moritz_: ;) 10:25
Su-Shee moritz_: gratulations to your article series. you converted 3 people to perl6. instantly hooked. 10:26
viklund I guess that it is possible to do now by injecting some PIR, but how, when and what?
moritz_ Su-Shee: thanks, that's great news
I saw one on perl6-users already - or was that you? 10:27
Su-Shee no, i haven't said anything yet on perl6-users. 10:28
masak moritz_++ 10:44
moritz_: S12-construction/construction.t, line 38. how could that line ever be executed? 10:55
10:59 agentzh joined
pugs_svn r27085 | pmurias++ | [re-smop] lexical multis now copy over outer variants 11:02
11:04 ejs2 joined
masak rakudo: class Substr { has $.s is rw; has Int $.from; has Int $.len; method new(Str $s is rw, Int $from, Int $len) { return self.bless(self.CREATE(), :$s, :$from, :$len) }; method Str { $.s } }; sub infix:<f>(Substr $s is rw, $repl) { $s.s = substr($s.s, 0, $s.from) ~ $repl ~ substr($s.s, $s.from + $s.len) }; say Substr.new("foo", 1, 1) f "x" 11:05
p6eval rakudo ba09b2: OUTPUT«fxo␤»
masak I'm sure the technique can be refined in various ways.
but you can kinda have lvalue substr today. :)
11:18 charsbar joined 11:19 gabiruh_ joined 11:21 donaldh joined
pmurias pmurias.livejournal.com # here's my GSoC project (quite lame) blog post 11:28
masak moritz_: literal's latest blog post on the GSoC work was on May 27, and his latest commit to the grok github repo was on June 1. I do hope he's ok. 11:33
moritz_ masak: (re line 38) it won't. 11:42
masak moritz_: I'm calmed by that answer.
moritz_: but I don't understand why, in that case, you added the line in r26041. 11:51
moritz_ masak: because I was a bit off my tracks, I think 11:52
masak you might simply have missed the 'return' on the line above...
moritz_ yes... 11:53
it should be my $s = $self.bless(*, string => $string);
$!a = $string;
return $s 11:54
masak aye.
moritz_ the point was to test if $!a is writeable at that time
masak oh, wait.
no.
there's no $!a in new.
the 'new' method is on the class/type-object level. 11:55
pugs_svn r27086 | moritz++ | [t/spec] fix construction test, masak++
moritz_ oh dammit
masak :/
constructors are hard, let's go shopping.
moritz_ so it should just be bless(.., a => $string)? 11:56
masak thinks so
and then the todo'd test can be un-todo'd too.
11:56 Whiteknight joined
pugs_svn r27087 | moritz++ | [t/spec] second attempt to fix constructor test, masak++ 11:57
r27088 | masak++ | [t/spec] un-todo'd todo'd test 11:59
masak someone else get a Parrot backtrace after running t/spec/S10-packages/basic.rakudo ? 12:10
moritz_ yes 12:11
12:12 bepi joined
masak is it known? 12:12
...and/or reported to either RT or TT?
12:12 ruoso joined
moritz_ I think I menntioned it in pmichaud's presence once 12:13
but not reported to RT
masak submits rakudobug 12:14
ruoso Good morning
moritz_ pmurias: do you have a gsoc blog or something along these lines? 12:15
pmurias ruoso: hi 12:16
moritz_: pmurias.livejournal.com
moritz_ pmurias: thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanks
oh dammit
freaking keyboarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrd 12:17
it randomly repeats characters
very inconvenient
pmurias ruoso: having proper modules blocked on multis right? 12:18
masak moritz_: helpful tip. check the input before you submit it to your IRC client. use backspace as appropriate. :P
moritz_ masak: that would vastly impact my writing speed 12:19
masak moritz_: I see. 12:20
moritz_ masak: the irssi window lies on a remote, sometimes lagging server
masak ah.
t/spec/S02-magicals/dollar-underscore.t segfaults here, by the way.
moritz_ pmurias: so mildew now supports arity based dispatch and lexical multis?
that's way cool 12:21
masak: it's all fine here, at least with parrot r39572
ruoso pmurias, yes... it did...
moritz_ obra_: are you the owner of planetsix? 12:22
masak moritz_: ok. I have r39584 -- and a different platform.
pmurias moritz: if you do strange magick it also can also do limited type based dispatch (it doesn't do sorting for now)
12:23 rfordinal joined
pmurias ruoso: it would be usefull to have Test.pm working 12:23
moritz_ mildew: say "hi" 12:24
p6eval mildew: OUTPUT«hi␤»
moritz_ mildew: use v6; say "hi"
ruoso pmurias, well... I think you finished what was planned to GSoC, so we can move forward
p6eval mildew: OUTPUT«hi␤»
pmurias ruoso: the sorting based on type narrowness is missing 12:25
moritz_ are the traits (rw, ref, copy) implemented? 12:26
12:26 clintongormley joined
pmurias is ref and is ro is done 12:26
is rw and is copy depend on checking for "containerity" which is a bit unspecced 12:27
ruoso pmurias, hmm... that looks something that needs to be done indeed...
masak rakudo: class A {}; multi infix:<=>(A $a, A $b) { say "OH HAI" }; A.new = A.new 12:29
p6eval rakudo ba09b2: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/yKJ6W4ZcgG:2)␤»
masak submits rakudobug
uh, in general, I haven't succeeded in overloading infix:<=> at all. 12:30
12:34 skids joined
pugs_svn r27089 | pmurias++ | [re-smop] types no longer require a true method, moved int and a 12:38
r27089 | pmurias++ | sketched Any into the lexical prelude
pmurias mildew: my multi foo($a) {say "hi"};foo(1)
p6eval mildew: OUTPUT«Could not find method get_outer_candidates.␤»
pmurias moritz_: how often are build-*.sh shell scripts called? 12:40
moritz_ pmurias: depends. Which one? 12:42
pmurias build-smop.sh
moritz_ pmurias: currently not at all, it seems 12:43
12:43 rfordinal3643 joined 12:45 mizioumt joined
moritz_ pmurias: I'm currently running it manually, and check how long it takes 12:45
2m14.416s
pmurias: would every 2 hours be enough? 12:46
12:46 twigil joined 12:47 nErVe joined
pmurias moritz_: yes 12:48
12:48 rfordinal joined
moritz_ evalenv@timtowtdi:~$ crontab -l|grep smop 12:49
22 */2 * * * sh /home/evalenv/build-smop.sh >> ~/smop.log 2>&1
pmurias mildew: my multi foo(int $foo,$bar) {say "first"};role Foo {};my multi foo($foo,Foo $second) {say "second"};foo(1,2);foo("hi",Foo.new);
p6eval mildew: OUTPUT«unknown method "^!does" at message line 72 file build/native/src/native_int.c␤» 12:50
ruoso rakudo: multi infix:<+> ($a where 2, $b where 2) { 5 }; say 2 + 2 12:59
p6eval rakudo ba09b2: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/5TyqUcgoDG:2)␤»
ruoso is that known?
moritz_ ruoso: I recently submitted a similar overloading bug, I think 13:00
masak there are a few things like that, yes. 13:01
moritz_ I think it's because + in rakudo tries to use the parrot opcode (which then invokes the get_number vtable function) instead of doing a proper multi dispatch
PerlJam rakudo: sub foo ($a where 5) { say "hi" }; foo(42);
p6eval rakudo ba09b2: OUTPUT«Parameter type check failed; expected something matching Junction() but got something of type Int() for $a in call to foo␤in sub foo (/tmp/kDLyrk7qrK:2)␤called from Main (/tmp/kDLyrk7qrK:2)␤»
13:02 Molaf joined
masak I often find myself thinking "grr, Parrot causes so much trouble! oh wait..." 13:02
PerlJam that's a weird message.
moritz_ masak: same here
masak PerlJam: indeed.
moritz_ perhaps the type check is internally implemented as a all() junction
masak probably.
still feels like leakage.
13:03 mberends joined
moritz_ rakudo: sub foo ($a where 5) { say "hi" }; foo(42|43) 13:03
p6eval rakudo ba09b2: OUTPUT«Parameter type check failed; expected something matching Junction() but got something of type Int() for $a in call to foo␤in sub foo (/tmp/A7bgDgLfWG:2)␤called from sub foo (/tmp/A7bgDgLfWG:2)␤called from Main (/tmp/A7bgDgLfWG:2)␤»
PerlJam rakudo: sub foo ($a where { 5 } ) { say "hi" }; foo(42);
masak PerlJam: feel free to submit a rakudobug.
p6eval rakudo ba09b2: OUTPUT«hi␤»
masak mberends: oh hai!
PerlJam is that one known?
masak PerlJam: don't think so.
PerlJam: probably NYI and failing in an interesting way.
mberends rakudo: 'hi masak'.say
p6eval rakudo ba09b2: OUTPUT«hi masak␤»
masak hi p6eval!
mberends #perl6 withdrawal symptoms are not a nice feeling 13:04
masak the mere thought is unpleasant.
this is where the future happens. not being here must be a bit like being stuck in the past. 13:05
mberends not being in #perl6 feels like being taken into a future not of your choosing 13:07
there is always so much to backlog after an absence of two days 13:08
PerlJam The hardest part about rakudo-bugging for me is coming up with a good subject
masak PerlJam: "silly type name in where-blessed params in Rakudo"? :) 13:09
er, "[BUG] silly type name in where-blessed params in Rakudo"
PerlJam maybe I just obsess about words too much sometimes :)
masak words are important! not to be underestimated. 13:10
some of my best friends are just words.
Matt-W Words are crucial 13:14
13:14 payload joined
Matt-W Without words, how would we communicate our thoughts on Perl 6? 13:14
A lot of day to day life can be conducted with pointing and grunting, but not Perl 6. 13:15
moritz_ with code :-)
Su-Shee you could morse code it. 13:16
Matt-W Code has words in it
Su-Shee: that's still words, just a different encoding
Su-Shee perl in colorful shaped symbols, for children. 13:17
pmichaud good morning, #perl6
masak pmichaud: o/
Matt-W: it would be an interesting challenge to mime a whole presentation about Perl 6. 13:18
Matt-W: the constraints imposed on the presentation slides would be interesting in themselves.
Matt-W masak: Well you can do that if you like... I'll just... go... over here
\o/ it's pmichaud! 13:19
twigil morning... so nice, and it's midnight here
masak Matt-W: come back! I didn't say I _am_ a mime. :)
13:19 iblechbot joined 13:21 rfordinal joined
szabgab rakudo: say index "abcbd", "x" 13:22
p6eval rakudo ba09b2: OUTPUT«Attempt to index from negative position␤␤»
szabgab rakudo: index "abcbd", "x"
p6eval rakudo ba09b2: ( no output )
Matt-W masak: If you were, it would be interesting to see you at an Esperanto event, miming. 13:23
moritz_ wtf?
that index example looks really borked 13:24
Matt-W rakudo: say index("abcbd", "x")
p6eval rakudo ba09b2: OUTPUT«Attempt to index from negative position␤␤»
masak Matt-W: it would indeed. I'll se what I can do.
Matt-W how strange
masak: Do you have to mime differently in Esperanto?
moritz_ ah 13:25
masak Matt-W: well, if the mimings involved sound-imitations, yes.
moritz_ it returns a failure object
which throws an exception if used
Matt-W ooooh
and when .Str is called on it, it tells you about the failure?
moritz_ 1+index("abcbd", "x")
masak rakudo: 1+index("abcbd", "x")
p6eval rakudo ba09b2: OUTPUT«Attempt to index from negative position␤»
moritz_ masak: thanks
but that error message is bogus nonetheless 13:26
masak indeed.
Matt-W it is a strange error message to be produced in that situation
moritz_ rakudo: 1+index("x", "abcbd")
p6eval rakudo ba09b2: OUTPUT«Attempt to index from negative position␤»
masak submits rakudobug
Matt-W A bug! A bug! 13:27
Matt-W pushes Christmas back a day
moritz_ rakudo: say ?index("abcbd", "x")
p6eval rakudo ba09b2: OUTPUT«0␤»
moritz_ rakudo: say ?index("x", "abcbd") 13:28
p6eval rakudo ba09b2: OUTPUT«0␤»
moritz_ rakudo: say ?index("x", "abccbd") 13:29
p6eval rakudo ba09b2: OUTPUT«0␤»
moritz_ rakudo: say ?index("x", "abxcbd")
p6eval rakudo ba09b2: OUTPUT«0␤»
moritz_ rakudo: say ?index("abxcbd", "x")
p6eval rakudo ba09b2: OUTPUT«1␤»
moritz_ rakudo: say index("abxcbd", "x")
p6eval rakudo ba09b2: OUTPUT«2␤»
pmichaud anyone in favor of me getting rid of svn.perl.org/perl6/pugs ? 13:31
(from backscroll)
moritz_ pmichaud: yes 13:32
pmichaud: I opened a ticket with [email@hidden.address] since I didn't knew you could do it 13:33
pmichaud It's now gone.
Matt-W moritz_: didn't you know? pmichaud can do anything! 13:34
pmichaud Maybe you can reply to the ticket email to say it's already been taken care of.
moritz_ pmichaud: done 13:35
13:37 rfordinal joined
moritz_ pmichaud: thank you 13:37
ok, now we need somebody to delete the svn repo on openfoundry.org 13:38
(this one: svn.openfoundry.org/pugs/) 13:39
pmichaud alas, my magic powers don't extend to openfoundry.org . 13:41
Matt-W la la la la la I didn't see that la la la 13:43
Su-Shee uhm, if I actually finish something perl6-ish - where do I put it? is there a perl6 cpan already or anything centralized right now? 13:46
moritz_ Su-Shee: nothing centralized. But if you put it onto github and follow certain steps, then the installer (called "proto") can download and build it automatically 13:47
Su-Shee: see github.com/masak/proto/tree/master and github.com/masak/proto/blob/f1f3193...5a/PIONEER
Su-Shee ok, I just want to avoid putting stuff "somewhere". 13:48
Matt-W We don't have a central place yet, but there are ways of helping it get hooked into the rest of the ecosystem that's starting to appear 13:49
moritz_ Su-Shee: you can also put stuff into github.com/perl6/perl6-examples/tree/master 13:50
Su-Shee: out of curiosity, what are you working on?
masak yes! tell us!
Su-Shee moritz_: a little blog which is starting to leak into a wiki somehow but it seems that there might be the fallout of an Atom.pm which is probably useful to more people. 13:51
moritz_ what's the policy for the perl6 user on github - which projects should be moved under that user?
Su-Shee: ah, sounds very nice
Su-Shee and possibly a recaptcha-binding.
masak Su-Shee: definitely. Atom.pm is something we could use in November. 13:52
Matt-W a recaptcha binding would be very useful for a lot of webby things
Su-Shee masak: It's useful and it's relatively small and simple - perfect as a beginner's project. 13:53
masak seems a lot of people are starting to build blog engines now.
I have to hurry up making Web.pm useful. :)
moritz_ a binding to akismet would also be quite helpful 13:54
Su-Shee actually I would _love_ to see a wishlist.
PerlJam masak: How is Web.pm gonig btw?
moritz_ Su-Shee: send a mail to [email@hidden.address] and ask what kind of things people wish 13:55
Su-Shee: that way you'll get a much bigger audience than here
masak PerlJam: I know exactly what I want to do now -- the vision is becoming clearer with each day. time has been scarce during spring, but even that is improving now that summer is here.
Su-Shee that's an idea - i was thinking along the lines of really necessary stuff 13:56
masak PerlJam: a nice thing is that as the different sub-projects become more well-specified, they turn out to have quite similar underpinnings.
hence, re-use.
moritz_ Su-Shee: well, necessaary is also subjective :-)
PerlJam yeah, reuse++
moritz_ a really, really big help would be a working database binding
masak yes. 13:57
moritz_ there was some example code for mysql and postgres
masak my biggest need right now is Parrot bindings to a XML library.
moritz_ but it didn't really make it into a nice-to-use DBI-like interface
masak s/a /an /
I'll start to feel the need for a database when I enter the MVC part of the grant. 13:58
Su-Shee this is what I mean. I personally wish for "the perfect gtk binding" - but I certainly agree that DBI is more pressing. 13:59
ruoso finally got his new blog set up
daniel.ruoso.com -- please tell me if you see that in english or portuguese
[particle] english 14:00
masak ruoso: the right-hand menu is in Portuguese.
Su-Shee same here
[particle] ah, true, and footer
ruoso right... the menu wasn't translated... but the content uses http to give you the content in the correct language
Su-Shee ruoso: yes. it's perl. :)
(and english.) 14:01
masak ruoso: Portuguese comes off as a quaint form of Esperanto. :P
ruoso Esperanto is heavily influenced from latin languages
masak aye. 14:02
ruoso (you can see the entire post in Portuguese by either changing your browser settings or adding ?lang=pt to the end of the url)
masak tries
Su-Shee ruoso: works. 14:03
14:03 rfordinal joined
ruoso the blog is implemented as a front-end catalyst application, using two different wordpress blogs as backend 14:03
masak ruoso: I can almost, but not quite, read it right off. the context is giving me enough clues for it to be easier, of course.
ruoso one for each language... as f**ing wp doesn't support multilingual content
rjh neat implementation of RPN though 14:04
masak ruoso: it's slightly funny that "RPN" becomes "NPR" in Portuguese. :)
ruoso masak, heh... 14:05
@tell DanielC I finally managed to post about my implementation of the RPN calculator, check it out at daniel.ruoso.com 14:07
lambdabot Consider it noted.
Matt-W ruoso: yeah I see it with english body, portuguese menu and footer 14:08
ruoso Matt-W, I should localize the templates in the next days 14:12
ruoso will run for the "ugliest blog ever" prize 14:13
Su-Shee aren't we supposed to design all the perl stuff more pretty and shiny? 14:14
masak yes. but everyone hasn't got the memo yet. 14:15
but that's OK. Perl has never been about forcing square people into round holes. :) 14:16
ruoso .oO( that was the shiniest I could get... )
masak ruoso: fwiw, I like the aspect of your blog.
pmichaud [particle]: did you see my proposed revised schedule for pvmw? Any comments or suggestions? 14:17
[particle] pmichaud: saw it briefly, i'll review it more closely today
i'm currently trying to get the installed parrot/rakudo build going
pmichaud [particle]: cool. I doubt we'll be able to make 1.3 though. 14:18
Su-Shee was seduced by shiny processing until I realized that a bunch of perl modules would do the same stuff and even more powerful.
[particle] pmichaud: does it work on linux?
pmichaud fsvo "work"
best answer is "no". The pbc_to_exe doesn't work for an installed parrot. 14:19
[particle] still. damn.
14:19 stepnem joined
pmichaud I could maybe throw some tuits at it today, but I've kinda reserved today to be a Vienna.pm Rakudo Day (although perhaps that would qualify) and I wouldn't trust any pbc_to_exe changes for the release anyway without lots of testing. 14:20
[particle] so, i'll turn my attention to reviewing the revised workshop schedule 14:22
pmichaud I'm guessing that fixing installed parrot might make a good hackathon task post-YAPC
[particle] yes, agreed 14:23
wonder who will be around... i won't.
pmichaud oh
[particle] i'll be in the pennsylvania woods, fishing, canoeing, and relaxing
masak this is the first time I hear about anything post-YAPC.
Matt-W YAPC is soon isn't it 14:24
masak is there a web resource about post-YAPC?
[particle] masak: yapc::na
masak oh.
that one. :)
pmichaud Matt-W: YAPC::NA starts Monday.
Matt-W: Parrot Virtual Machine Workshop starts Saturday.
anyone who wants to comment on the proposed schedule: yapc10.org/yn2009/wiki?node=Parrot%...hop%202009 14:25
14:27 ZuLuuuuuu joined
[particle] pmichaud: i'll take on the unconference planning 14:29
Matt-W Sounds fun 14:30
pmichaud [particle]: excellent.
masak rakudo: class A { method infix:<||>($b) { return 5 } }; say A.new || 42
p6eval rakudo ba09b2: OUTPUT«A()<0xb67d0ad0>␤»
masak that should work, right?
Matt-W I'll think about YAPC::EU next year
need to get my passport renewed actually...
pmichaud masak: it's not clear that one can overload the short-circuit operators. At least not that simply.
[particle] masak: an infix op with one param?
masak pmichaud: oh.
[particle]: it's a method. 14:31
[particle] hrmm.
ops can be methods?
pmichaud that's not clear either from the spec :-)
[particle] not at all
i'd say sub infix:<||>(A $a, $b) {...}
masak ok. :) 14:32
[particle] er, multi.
Matt-W hmm
now if we had lazy evaluation on scalars...
moritz_ note that || is not an ordinary infix operator
more like a macro
pmichaud correct.
moritz_ (it short-circuits, which can't be the case with ordinary ops)
Matt-W maybe short-circuiting operators are macros that build closures around their arguments and pass them to a multi
moritz_ Matt-W: that has been discussed, yes 14:33
masak I'd prefer if things like || were still operators, but modified in some way (with a trait, maybe) to short-circuit.
but maybe that can't be done. 14:34
pmichaud note that || is also list associative.
masak right.
pmichaud as opposed to being a binary op.
moritz_ multi macro infix:<||> maybe?
masak I sometimes boggle when I realize how much of such stuff hasn't been pinned down yet... 14:35
but hopefully that'll change within a year or so. 14:36
[particle] masak: perl 6 is so incredibly big
14:37 skids joined
masak [particle]: aye. and the small part of it that's implemented already keeps shifting under my projects. :) 14:39
[particle] well, the 11k+ passing rakudo spec tests are pretty stable, so it seems there's a large number of tests left to write 14:40
moritz_ masak: you need to morph more of your projects into the test suite :-) 14:41
[particle] moritz_: i thought that was in your queue ;)
masak moritz_: you're right. one of these days I'll do a pan-project sweep and eliminate half of the RAKUDO comments. 14:42
moritz_ [particle]: no, my internal queue is currently non-existant and torn apart by having too many different projects 14:44
masak: speaking of which, did you successfully use BUILD submethods in your projects yet?
masak moritz_: in Druid, yes. and with great success. 14:45
the code got really nice. jnthn++
moritz_ great
masak moritz_: in proto it was a bit more involved, reports viklund_++.
how do I provide a new 'new' method to my class, while still keeping the default one from Object? 14:47
rakudo: class A { has $.b; multi method new($b) { self.bless(self.CREATE(), :b(42)); }; method Str { $.b } }; say A.new(42); # how do I make A.new(:b(42)) work? 14:48
p6eval rakudo ba09b2: OUTPUT«42␤»
moritz_ masak: that's a long-standing NYI-feature in rakudo 14:50
masak ok, but in ideal Perl 6? 14:51
moritz_ in ideal Perl 6 that already works
because you can address the parameter $b as named, too
masak oh, right.
moritz_ of course a workaround involves two multis 14:54
masak moritz_: very well. what does the default Object.new look like?
masak tries to find it in the Rakudo source
14:54 nihiliad joined
masak oh, it's in PIR. 14:55
but it should be something like multi method new($self: *%_) { $self.bless($self.CREATE(), |%_) }, right? 14:57
moritz_ yes 14:58
masak oh wait, something about the superclass type objects too...
moritz_ I don't think you should have to care about those 14:59
masak moritz_: not sure I know what you mean. I want to emulate the Object variant of new as closely as possible. 15:00
moritz_ masak: I mean that you shouldn't have to take care to manually trigger CREATE submethods in parent classes. 15:01
because one of the other steps (presumably the .CREATE one) does that for you 15:02
masak moritz_: no, but those parameters come in through *@_...
moritz_ masak: the standard .new doesn't handle *@_, no? 15:03
15:03 M_o_C joined
masak moritz_: I was under the impression it did. but maybe I've got it mixed up with BUILD... 15:05
rakudo: class A { has $.b; multi method new(*%_) { self.bless(self.CREATE(), |%_) }; multi method new($b) { self.new(:b($b)) }; method Str { $!b } }; say A.new(42); say A.new(:b(42))
p6eval rakudo ba09b2: OUTPUT«42␤42␤»
masak this works, so I'm happy.
15:12 viklund joined
masak szabgab: a new perl6-tricks email! \o/ 15:20
szabgab yeah I told you I have some free time so expect some Padre marketing here :-)
15:21 donaldh joined
masak szabgab: looking forward to it. it'll take some serious work to kick my Emacs/vim habit. 15:22
szabgab I know, that part will be extremly hard, I also have trouble with it 15:23
but I hope Padre will be able to give a few nice advanced features to make it worth to use it at least for Perl 6
and for those who know a little bit less than you 15:24
which is a huge market :-)
masak thanks. :) 15:25
Su-Shee padre requires a perl with threads? 15:26
szabgab yes
pmichaud particle: ping
szabgab++ # perl6-tricks
szabgab pmichaud++ # Rakudo 15:27
15:28 Grrrr joined
masak "the karma bot has detected a cycle of mutual incrementing. as of now, all karma will be cleared." 15:31
pmichaud karmabot++
masak "bribes will get you anywhere."
15:32 justatheory joined
pmichaud that's what I often told my students. 15:32
But I also warned them not to insult me. :-)
masak I can see there's a fine line there...
szabgab the question is only the amount 15:34
15:35 mizioumt joined
pmurias ruoso: do you remember what was our plan for implementing modules? 15:35
15:36 mizioumt joined
masak which one calls which, .list or .List? 15:44
and which of these does @() call?
pmichaud @() calls .list .
lambdabot Maybe you meant: . ? @ bf ft id pl rc v wn
rjh lambdabot--
@karma lambdabot
lambdabot lambdabot has a karma of -3
rjh hahaha 15:45
masak how can I bind a short name, such as Foo to a longer name such as Don't::Want::To::Type::This::All::The::Time::Foo? 15:46
pmichaud my &Foo := &Don't::Want::Foo 15:47
masak thanks.
rjh does that work with parts of namespaces?
masak rakudo: class A::B {}; my &B := A::B; B.new
p6eval rakudo ba09b2: OUTPUT«invoke() not implemented in class 'A::B'␤in Main (/tmp/0GL90kyfBT:2)␤»
masak bug?
pmichaud not exactly a bug there. 15:48
rjh rakudo: class A::B {}; my &B := &A::B; B.new
pmichaud you wouldn't want the &
p6eval rakudo ba09b2: OUTPUT«invoke() not implemented in class 'Undef'␤in Main (/tmp/KB0Pk0lX6j:2)␤»
pmichaud if you're binding a type object
moritz_ rakudo: class A::B { }; my ::B := A::B; B.new
p6eval rakudo ba09b2: OUTPUT«Malformed declaration at line 2, near "::B := A::"␤in Main (src/gen_setting.pm:0)␤»
moritz_ rakudo: class A::B { }; my &B := A::B; B.new
p6eval rakudo ba09b2: OUTPUT«invoke() not implemented in class 'A::B'␤in Main (/tmp/kNcL2tcrvL:2)␤»
pmichaud rakudo: class A::B { }; ::B := A::B; B.new
p6eval rakudo ba09b2: ( no output )
pmichaud rakudo: class A::B { }; ::B := A::B; B.new.say;
p6eval rakudo ba09b2: OUTPUT«A::B()<0xb67fa528>␤»
masak nice.
pmichaud I'm not sure that's legal Perl 6. 15:49
15:49 finanalyst joined
masak :) 15:49
that's for the academics to decide. it works, so I'm using it.
pmichaud essentially Rakudo is treating the leading :: as being "declare a local type variable" 15:50
but it may be that is supposed to happen only in declarational contexts.
masak ok.
moritz_ rakudo: class A::B { }; ::B ::= A::B; B.new.say; 15:51
p6eval rakudo ba09b2: OUTPUT«Could not find non-existent sub infix:::=␤»
pmichaud we don't support ::= yet
at least, I don't think we do.
TimToady subset B of A::B will do in a pinch 15:53
finanalyst hi everyone
masak TimToady: feels slightly icky, tho.
moritz_ but it will match tighter in MMD
masak rakudo: class A { enum B <c d e>; ::c = B::c }; say A::c
TimToady troo
p6eval rakudo ba09b2: OUTPUT«Null PMC access in getprop()␤in Main (/tmp/UTsOoas4bD:2)␤»
masak submits rakudobug
pmichaud masak: ::c is lexically scoped. 15:54
masak pmichaud: meaning it can't be seen?
pmichaud outside of the block, no.
masak still, a Null PMC access is never right.
pmichaud true.
masak how can I do what I wanted to do here? 15:55
that is, export an enum's values via the class?
pmichaud I don't know that rakudo supports any way of doing that at the moment.
Given that (I think) we have difficulty with nested enum declarations.
TimToady std: class A { enum B is export <c d e>; ::c = B::c }; say A::c
p6eval std 27089: ( no output )
masak nice! 15:56
rakudo: class A { enum B is export <c d e>; ::c = B::c }; say A::c
p6eval rakudo ba09b2: OUTPUT«Statement not terminated properly at line 2, near "is export "␤in Main (src/gen_setting.pm:0)␤»
TimToady except an embedded module doesn't export by default
masak submits TODO rakudobug
pmichaud TimToady: and that A::c part looks wrong to me also
unless it's supposed to create an accessor method...?
TimToady was just pasting 15:57
masak so it should be A.c?
I can never tell.
pmichaud how about: 15:58
TimToady B::c
masak aha.
TimToady you're exporting B
masak TimToady: how come STD.pm didn't flag that, then?
oh, it was rebuilding, perhaps.
TimToady it said <no output> which usually means it's ... yes
masak "I believe humans and bots can coexist peacefully." 15:59
std: class A { enum B is export <c d e>; ::c = B::c }; say A::c 16:00
p6eval std 27089: ( no output )
16:00 frew joined
masak sets up a local 'std' command 16:01
TimToady parses here
masak how come? 16:02
TimToady A::c is just a warning 16:03
finanalyst rakudo: my %x=<a b c d>Z ([1,2],[3,2],[6,9],[3,6,7,3,2]); (map { %x{$_} , },%x.keys).min.say
p6eval rakudo ba09b2: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in sub Any::_block329 (src/gen_setting.pm:62)␤called from method Any::min (src/gen_setting.pm:71)␤called from Main (/tmp/uAjtafxMF8:2)␤»
masak tarbo2: aha.
finanalyst is there a neat way to flatten the list of lists?
masak augh, tab completion fail.
TimToady: aha.
TimToady std: class A { enum B is export <c d e>; ::c = B::c }; say A::c 16:04
p6eval std 27089: OUTPUT«Undeclared name:␤ A::c used at 1 ␤ok 00:02 37m␤»
TimToady there it is
masak makes sense.
TimToady so we should have a name declarator :)
name B = A::B 16:05
to go with constant
actually you can use constant right, but it seems like the wrong declrator
std: constant A = A::B
p6eval std 27089: OUTPUT«Undeclared name:␤ A::B used at 1 ␤ok 00:02 35m␤»
TimToady std: constant A = Int 16:06
p6eval std 27089: OUTPUT«ok 00:02 35m␤»
pmichaud rakudo: class A::B { }; constant B = A::B; B.new.say
p6eval rakudo ba09b2: OUTPUT«A::B()<0xb67cc0b8>␤»
TimToady we could s/constant/name/ I suppose
pmichaud finanalyst: I'm not sure of the right way to flatten that. 16:07
you should be able to avoid the map by simply using %x.values, though.
masak TimToady: I don't feel constant is that bad a name for it.
types tend to be pretty constant.
TimToady name π = 3.14 ain't so bad
finanalyst i tried that, but i was trying to flatten
pmichaud: i want to find the min/max in a hash of arrays 16:08
pmichaud finanalyst: perhaps: %x.values>>.list 16:09
rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %.values>>.list.perl.say 16:10
p6eval rakudo ba09b2: OUTPUT«Lexical 'self' not found␤»
pmichaud o_O
rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values>>.list.perl.say
p6eval rakudo ba09b2: OUTPUT«[[1, 2], [3, 2]]␤»
masak rakudo: enum B <c d e>; constant c = B::c 16:11
p6eval rakudo ba09b2: OUTPUT«Malformed declaration at line 2, near "c = B::c"␤in Main (src/gen_setting.pm:0)␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.perl.say
p6eval rakudo ba09b2: OUTPUT«{"a" => [1, 2], "b" => [3, 2]}␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x<a>.perl.say
p6eval rakudo ba09b2: OUTPUT«[1, 2]␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x<a b>.perl.say
p6eval rakudo ba09b2: OUTPUT«[[1, 2], [3, 2]]␤»
TimToady std: enum B <c d e>; constant c = B::c
p6eval std 27089: OUTPUT«##### PARSE FAILED #####␤Malformed constant at /tmp/m5ZCEtgkoA line 1:␤------> enum B <c d e>; constant c = B::c␤ expecting any of:␤ multi_declarator␤ typename␤FAILED 00:02 37m␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values.perl.say 16:12
TimToady hmm
p6eval rakudo ba09b2: OUTPUT«[[1, 2], [3, 2]]␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values[0].perl.say
p6eval rakudo ba09b2: OUTPUT«[1, 2]␤»
TimToady std: enum B <c d e>; constant d = B::c
p6eval std 27089: OUTPUT«##### PARSE FAILED #####␤Malformed constant at /tmp/uRysde4L2s line 1:␤------> enum B <c d e>; constant d = B::c␤ expecting any of:␤ multi_declarator␤ typename␤FAILED 00:02 37m␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values>>.list.perl.say
p6eval rakudo ba09b2: OUTPUT«[[1, 2], [3, 2]]␤»
16:12 mkfort joined
TimToady std: enum B <c d e>; constant d = c 16:12
p6eval std 27089: OUTPUT«##### PARSE FAILED #####␤Malformed constant at /tmp/VRPs9J9VkR line 1:␤------> enum B <c d e>; constant d = c␤ expecting any of:␤ multi_declarator␤ typename␤FAILED 00:02 37m␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values[0].list.perl.say 16:13
TimToady strange
p6eval rakudo ba09b2: OUTPUT«[1, 2]␤»
finanalyst rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values>>.min.perl.say
p6eval rakudo ba09b2: OUTPUT«[1, 2]␤»
pmichaud finanalyst: I don't have a good answer at the moment.
>>.min isn't what you want -- that gives you the smallest from each list.
finanalyst rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values>>.min.min.say
p6eval rakudo ba09b2: OUTPUT«1␤»
pmichaud that works, fsvo "works"
still I wonder why >>.list doesn't dwim
ruoso pmurias, TimToady recently clarified a bit how that will work 16:14
16:14 molaf_x joined
finanalyst pmichaud: is the >>.list a hyper operator? 16:15
pmichaud it should call .list on each element of the lhs
and return that as a list
(which should then flatten, I think)
finanalyst rakudo: my %x = <a b> Z ([1, 2], [3, 2]); (%x.values>>.list).perl.say 16:17
p6eval rakudo ba09b2: OUTPUT«[[1, 2], [3, 2]]␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values>>.PARROT.say
p6eval rakudo ba09b2: OUTPUT«Perl6Scalar->Perl6ArrayPerl6Scalar->Perl6Array␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values>>list>>.PARROT.say
p6eval rakudo ba09b2: OUTPUT«Statement not terminated properly at line 2, near ">>list>>.P"␤in Main (src/gen_setting.pm:0)␤»
pmichaud rakudo: my %x = <a b> Z ([1, 2], [3, 2]); %x.values>>.list>>.PARROT.say
p6eval rakudo ba09b2: OUTPUT«Perl6Scalar->Perl6ArrayPerl6Scalar->Perl6Array␤» 16:18
pmichaud rakudo: [1,2].list.PARROT.say
p6eval rakudo ba09b2: OUTPUT«List␤»
pmurias ruoso: you mean the save the program state approach?
pmichaud I'm guessing a bug in parallel dispatch.
ruoso pmurias, no... I mean the "need" and "defines" in S11 16:19
TimToady, there's one thing about "need"
one you say "need Sense;"
the spec says "without importing any symbols"
finanalyst pmichaud: thanx. The .min.min will suffice for the time being
masak rakudo: enum B <c d e>; class A { constant f = B::c }; say A::f
p6eval rakudo ba09b2: OUTPUT«Null PMC access in isa()␤in Main (/tmp/owzreI2VTD:2)␤»
masak submits rakudobug
ruoso but it seems that the symbol "Sense" is imported...
16:20 Psyche^ joined
ruoso TimToady, does that mean that "need Sense" creates a local "Sense" symbol that points to the "Sense" symbol in the loaded module's scope... 16:20
?
basicall 16:21
if a file has class Sense { ... }; class Nonsense {...}
when you say "need Sense"
you can't access Nonsense from outside the package
but Sense still points to the Sense class...
is it?
masak rakudo: enum B <c d e>; class A { constant f = B::c }; say ?A::f
p6eval rakudo ba09b2: OUTPUT«Null PMC access in get_bool()␤in Main (/tmp/BuVvh11OqI:2)␤»
masak rakudo: enum B <c d e>; class A { constant f = B::c }; say +A::f
p6eval rakudo ba09b2: OUTPUT«Null PMC access in get_number()␤in Main (/tmp/MwJbcNR3g1:2)␤»
TimToady the assumption is that you'd have class Sense; ... class Nonsense is export {...} 16:22
however, need doesn't import
16:22 DanielC joined
ruoso except for the needed name 16:22
it seems
TimToady so you'd need 'use Sense' or 'need Sense defines * or some such
well, we assume 'require Sense' means Sense is a valid typename 16:23
ruoso my point was actually not about the Nonsense class
right... but...
TimToady you can say 'require Sense; my Sense $x = foo()'
likewise with need
need is just compile-time require 16:24
ruoso so need imports one symbol
which is the name of the thing being needed
TimToady it defines a symbol
ruoso but where does the symbol point to?
TimToady it's assumed that the thing needed also happens to define the type in question
to module {...}, I suppose 16:25
then Sense redefines it to not be ...
16:26 icwiener joined
ruoso so, from the implementation perspective, it will look for a name in the scope of the loaded comp_unit, then point the local Sense symbol to the Sense symbol inside the loaded scope 16:26
TimToady presumably
ruoso ok... so, conceptually, it imports the symbol of the needed thing 16:27
TimToady or think of it exactly as Perl 5's 'use Sense ()'
ruoso I can't...
TimToady if it makes you happy, sure :)
ruoso because in Perl 5 the namespace is global
and that's not the case in Perl 6
the thing is that I need to install a local symbol, because, unlike Perl 5, just loading the file won't get the symbol available to me 16:28
16:29 aindilis joined
TimToady that's what the symbol in use/need/require is for 16:29
it's the local name
ruoso alright... so we agree... ;)
TimToady use MyName:from< mishmash >
ruoso so, loading a module needs some primitive that will load a file and return the outermost scope of that file, so either use, require or need can look into it 16:30
TimToady incidentally, I'm still not entirely happy about the syntax of "defines" 16:31
ruoso and find the name in question
btw... there's a glitch in S11... "need ACME::Rocket; my $r = ACME::ROCKET.new;"
I think you meant ACME::Rocket.new
as a side question... 16:32
what would happen with: need Acme; need Acme::Rocket; need Acme::Rocket::Science
TimToady ruoso: it's easier to fix than tell me about it :)
ruoso TimToady, yeah... sorry... I forgot that for one second 16:33
TimToady need is file oriented like use
though of course the actual filenames could be mangled by the library system 16:34
pugs_svn r27090 | ruoso++ | [spec/S11] fix case typo
TimToady but if you want to export classes, then you don't use 'need'
s/export/import/
ruoso TimToady, that was not the issue I was trying to raise... the issue is: if "Acme" points to the package in Acme.pm, installing Acme::Rocket, will end up installing it in the Acme package at a distance 16:36
pmichaud @tell viklund chr(229) ~ chr(9787) now works in Rakudo. 16:37
lambdabot Consider it noted.
ruoso TimToady, pmurias had an idea some time ago, that everytime you "need" something, you'll get a private copy of it... that would solve this particular issue... 16:38
16:45 ilogger2 joined
barney Is $?CLASS not yet supported? gist.github.com/130769 16:50
PerlJam rakudo: class A { say $?CLASS; } 16:51
p6eval rakudo ba09b2: OUTPUT«Symbol '$?CLASS' not predeclared in <anonymous> (/tmp/8K5ErKgo2a:2)␤in Main (src/gen_setting.pm:3225)␤»
16:51 r0bby joined
PerlJam barney: I'd say not. 16:51
finanalyst rakudo: (0 .. 5).minmax.perl.say 16:52
p6eval rakudo ba09b2: OUTPUT«[0, 5]␤»
16:52 REPLeffect joined
finanalyst rakudo: my @x=(0 .. 5); @x.minmax.perl.say 16:52
p6eval rakudo ba09b2: OUTPUT«Method 'minmax' not found for invocant of class 'Perl6Array'␤»
pmichaud $?CLASS is nyi
16:53 Whiteknight joined
finanalyst pmichaud: why is (0..5).minmax working, but not @x.minmax? 16:53
PerlJam finanalyst: because the first is a Range and the second an Array and minmax isn't defined on Range (my guess at the obvious :) 16:54
pmichaud minmax isn't defined on Array 16:55
it is defined on Range.
PerlJam er, s/Range/Array/ yeah
PerlJam can't type
16:55 jhorwitz joined
finanalyst is this this spec? if so why? 16:56
pmichaud I don't know if it's spec -- check S32.
16:56 r0bby left, r0bby joined, cdarroch joined
pmichaud S32 only lists it for Range. 16:56
16:57 jeremiah_ joined
jeremiah_ I just built rakudo and had some failed spectests. Do I report that somewhere else than here? 16:57
pmichaud depends on the spectests
normally reports go to [email@hidden.address]
but it's often a good idea to check here first :-) 16:58
PerlJam pm: check S03 for minmax
jeremiah_ Should I paste the test summary report?
pmichaud not into the channel, no
you can past it to gist.github.com
*paste
jeremiah_ This one line looks like the most interesting: t/spec/S10-packages/basic.rakudo (Wstat: 6 Tests: 22 Failed: 0) 16:59
i.e. no failed tests, just six that had non-zero status.
gist.github.com/130772 17:00
I just added some lines from teh backtrace to the gist, hopefully that is useful as well. 17:01
finanalyst pmichaud: minmax is given as an infix operator, but also as a method on a Range. Arent operators and methods closely linked? 17:03
rakudo: my @a=1,2,3,4; my @b=9,8,7,1; say (@a minmax @b).perl 17:05
p6eval rakudo ba09b2: OUTPUT«Statement not terminated properly at line 2, near "minmax @b)"␤in Main (src/gen_setting.pm:0)␤»
finanalyst pmichaud: is this a bug or unimplemented? S03:1621 17:07
pmichaud finanalyst: they don't have to be closely linked. 17:10
in some cases the operator and method are substantially different.
anyway, I'm guessing minmax is nyi 17:11
finanalyst shall i file a rakudobug?
pmichaud sure.
17:11 jferrero joined
TimToady ruoso: yes, there's a solution like that in there somewhere, but we need to be very careful not to turn one type into two or more types accidentally; identity must be preserved 17:12
pmichaud rakudo: my $b = 5; my $x = (a => $b); $b = 6; say $x.perl;
p6eval rakudo ba09b2: OUTPUT«"a" => 5␤»
ruoso TimToady, hmm... maybe it's just the package that is cloned, the type itself is still the same... 17:13
pmichaud jeremiah_: those are known failures. It has to do with Parrot double-freeing things in its contexts. 17:15
jeremiah_ okay - so no bug? 17:16
pmichaud jeremiah_: I think there's a bug already filed for that... but there's also little we can do about it at the moment.
jeremiah_ okay. :)
pmichaud (i.e., it either has to be fixed in parrot or in the PMCs that jnthn++ has created, and jnthn's on vacation)
thanks for reporting, though 17:17
jeremiah_ Sure thing!
:)
pmichaud I need to put a note about that into this month's release notes
DanielC @karma
lambdabot You have a karma of 18
pmichaud [particle]: ping 17:18
[particle] pmichaud: pong 17:22
pmichaud when you have a few mins, can we briefly discuss sunday schedule? voice or irc fine 17:23
[particle] sure, i'll cal in, say, 15m?
pmichaud sounds excellent. 17:24
ruoso DanielC, it seems lambdabot forgot the message I sent you... anyway... I posted about the alterantive implementation for the RPN calculator in daniel.ruoso.com 17:25
DanielC *click*
lambdabot DanielC: You have 1 new message. '/msg lambdabot @messages' to read it.
DanielC ha
@messages
lambdabot ruoso said 3h 18m 44s ago: I finally managed to post about my implementation of the RPN calculator, check it out at daniel.ruoso.com
ruoso hmm... interesting... lambdabot won't sen't you the message if you talk its language... 17:26
DanielC It is indeed interesting.
pmichaud lambdabot speaks only when not spoken to, it seems. :-)
DanielC he he
dalek kudo: e80574a | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 404 files, 11535 passing, 0 failing
17:27
DanielC ruoso: Do you want to add a comment to my blog, so that everyone who sees the blog can then go see your version too? 17:29
ruoso hmm... good idea
DanielC, er... your blog requires login to comment.. 17:32
DanielC ruoso: Sorry, I've had spam problems. 17:33
ruoso could you post the comment instead?
DanielC Sure, np.
ruoso: Could you reload the page and tell me if now you can post without registering, but with a CAPTCHA? 17:39
ruoso: My configuration says that a captcha is required to post comments, but when I go to the page I don't see a captcha.
ruoso that's because you're logged in
I see a captcha 17:40
DanielC I tried with a different browser. I guess I must be logged in with that other browser.
ruoso: Anyways, thanks.
ruoso: I'll leave it this way for now and see if I get spam.
I don't really care about people registering. I just don't want spam. 17:41
It's too much hassle to go delete posts selling viagara.
I also installed a plugin that is supposed to add a spam filter to the comments. 17:43
Ah! I'm wrong. There *is* a captcha on this page, but it appears *below* the post-comment button. Hmm... that's not very usable... 17:47
Fixed. 17:50
Now the captcha appears before the text area, where people will actually see it.
ruoso: Thanks for getting me to fix comments on my blog :-)
ruoso ;P
pugs_svn r27091 | lwall++ | [S04] require temp semantics for topical statement modifiers 17:57
17:57 Molaf joined
TimToady pmichaud: see ^^^ 17:57
pmichaud TimToady: noted, thanks. 17:59
I thought that might end up being the answer. :-) 18:00
TimToady it was going to be murder to implement the other way
pmichaud Agreed.
TimToady since you'd have to retroactively remove 'my $x' from the symbol table when a thunk is postdeclared by a modifier 18:01
and this keeps the user-visible definition of scoping simple 18:02
pmichaud Agreed.
ruoso always thought statement modifiers implied a closure...
as in "the statement becomes an implicit closure"
TimToady but my $x is required to enter $x into the symbol table Right Now
well, it's certainly a thunk 18:03
pmichaud we'll have to refactor rakudo's handling of <for> and <given> a bit; hopefully it won't be too difficult.
TimToady but I think that as in Perl 5, thunks ought to be very efficient, esp for ??!! and && and || etc. 18:04
ruoso I always thought that the semantics of: "for 1,2,3 { .say }" were the same as ".say for 1,2,3"
TimToady P6 is picky about is explicit curlies
*its
ruoso actually confused on what having two versions of for means in the implementation side... 18:05
TimToady for 1,2,3 { .say } is the same as { .say } for 1,2,3 18:06
the blockless form reduces $_ from a formal parameter to the existing $_, which requires temporization for sanity
ruoso .oO( what was wrong with ".say for 1,2,3" is a syntax sugar for "{ .say } for 1,2,3"? ) 18:07
pmichaud ruoso: (my @array).push($_) for 1,2,3; 18:08
clintongormley ruoso: just seen your RPN calculator - that's sweet. multi-subs completely change the way one could look at a problem
ruoso clintongormley, thanks... although that would probably be the natural answer for LISP people...
pmichaud, hmmm... is that corner case really worth the trouble? 18:09
TimToady note we have similar issues with map *.foo(my $x), 1,2,3
it's not a corner case
the scoping of "my" is fundamental 18:10
skids
.oO(LIIC -- Lost In the Implicit Curlies)
TimToady and we want the rules simple, unlike in P5
ruoso declaring a variable in a statement modified by "for" looks like a corner case...
pmichaud it's the case that came up in discussion yesterday :-) 18:11
so it's not too corner.
TimToady well, it's a really Big corner
it's what you're guaranteeing the programmer when there's a "my"
it always goes to the closing } (or end of comp unit) 18:12
ruoso my point was about dropping support for "my" declarations in statements modified by things that cause that statement to be run more than once...
pmichaud would need to do it for "our" also. 18:13
TimToady and state
which is *important* in loop closures
pmichaud also it's somewhat challenging to detect when there's a my declaration in a statement.
ruoso sorry... it wasn't specific to my, actually...
I meant, dropping support for declarations...
pmichaud especially in this case, since we don't know that we have a statement modifier until after we've processed the thing it modifies. 18:14
TimToady I'd rather keep the visibility largely decoupled from the run-time value, even where we know that there might be an uninitialized variable 18:15
we allow "my $foo;" after all...
ruoso pmichaud, you could choose to process the modifier before the statement, I think...
TimToady I think this falls under the category of "preventing the user from doing stupid things also prevents the user from doing clever things" 18:16
ruoso I'm not worried about the user, actually... I'm worried about the implementation
TimToady ruoso: no, the introduction of $x into the symbol table must be instantaneous in a left-to-right parse
ruoso: I get to worry about both :P 18:17
ruoso my $x = 4 if $x;
TimToady $x is always undef
ruoso std: my $x = 4 if $x;
p6eval std 27091: OUTPUT«ok 00:02 36m␤»
TimToady perfectly legal
stupid, but legal
ruoso I really thought that statement modifiers didn't work like that... 18:18
pmichaud the temporizing $_ really only applies to <for> and <given>
I think the other modifiers have never implied a block
ruoso pmichaud, it applies to any topicalizer-modifier 18:19
and the user could write one himself...
TimToady in which case they may need to temporize $_ as well 18:20
pmichaud or they can have their modifier imply a block. 18:21
(which will go against the way p6 does it.... but that's up to them :-)
TimToady still, immediately introducing symbols is like one of the earliest apocalyptic decisions...
if anything bends, it'll be the statement modifiers, not that principle 18:22
actually, wasn't mentioned till A04 18:24
(This form of lexical scoping works in Perl 6 because
the name C<$f> is introduced immediately within the statement. This
differs from the Perl 5 approach where the name is not introduced till
18:24 [particle]1 joined
TimToady the end of the current statement. 18:24
ruoso note "introduced within the statement"... I tend to think in an statement modifier as being outside the statement... 18:25
TimToady the point is, introduced to the surrounding block 18:26
immediately
if we can retroactively change the meaning of surrounding block, we're in deep kimchee
ruoso anyway... I'll take some time before implementing it... so I can work out some way of doing it...
TimToady the only thing special you need is the temporization 18:27
everything else just falls out of the parser
a thunk is still a Block 18:28
ruoso the issue is having two versions of for
TimToady but the symbols are already bound to the surrounding block
go jump in a lake
:)
I have confidence in you :)
ruoso heh
TimToady a thunk is just a 0-ary block 18:29
ruoso .oO( at least someone has ;)
pmichaud ...that doesn't impose a new lexical scope.
TimToady was speaking to the run time, not the compilation... 18:30
ruoso will probably extract the declarations from the statement and place it before when implementing it...
pmichaud okay. :-)
TimToady I occasionally have words with the compilation too, you may have noticed :) 18:31
ruoso: the compiler should have already created any pad entries you need for the block/thunk, so you shouldn't have to 18:32
ruoso std: my $x = 1; my $x = 2; 18:33
18:33 Chillance joined
p6eval std 27091: OUTPUT«Potential difficulties:␤ Redeclaration of $x (from line 1) at /tmp/rTvIAfNo9M line 1:␤------> my $x = 1; my $x = 2;␤ok 00:02 36m␤» 18:33
TimToady pad entries have to be born undef anyway, or we can't guarantee CATCH sanity
ruoso could vote to turn that "Potential difficulty" into a "syntax error" :)
TimToady ruoso: note there's only one $x, even with the warning 18:34
ruoso ah...
TimToady eval '$x' will only ever see the single $x of the pad
ruoso better
TimToady a long-ago audreyt-suggested feature in pugs :)
ruoso maybe the warning could state that, so people won't expect p5 behavior
TimToady that one seems like a corner case to me :) 18:35
ruoso heh...
TimToady but I'm fond of good error messages too
ruoso something like "Useless redeclaration of $x" would already imply it 18:36
TimToady yes, that's probably an improvement
DanielC Question: == ins a multi-function, right? So I should be able to make my own == function for a custom class, yes? 18:37
pastebin.com/m326eb130 <--- :-(
18:38 payload joined
ruoso DanielC, rakudo seems to be unhappy with overloading some of the operators 18:38
but that's a rakudo bug...
DanielC I can overload "+" fine, but Rakudo doesn't like it when I overload "==" 18:39
dalek kudo: e3b2f93 | pmichaud++ | t/01-sanity/07-end-blocks.t:
Package variable still needs a declarator.
kudo: 952fe6d | pmichaud++ | :
Merge branch 'master' of [email@hidden.address]
TimToady 'course, whether a redeclaration of something is useless or illegal may depend on what it is 18:41
but we'll bridge that burne when we get to it
18:42 masak joined
DanielC I want to make a class for rational numbers. 18:42
masak DanielC: great!
DanielC So you can write: my $a = 3 over 4; $a = $a + 2; ...
TimToady we're suposed to have Rat as a builtin, so if you want to implement it, go for it.
DanielC Hi masak. I was just talking about the problem with ==. 18:43
masak DanielC: did you eventually solve it?
I've been discovering quite a bit of problems with overloading during the day.
DanielC TimToady: Really? I was just thinking that it would make a nice blog post.
skids DanielC: there's already a Rat in parrot. A few things probably could use a spec-side push from the rakudo end.
Like, defining accessors for nom and denom.
DanielC skids: Well you see, I don't *need* a Rational class. I just want to write a blog post that shows how cool Perl 6's type system is. 18:44
masak DanielC: as you see, when you start implementing a finger, you're offered the whole hand. :P
TimToady maybe we should call them top and bottom, or truth and beauty
DanielC skids: So I want to show multi-functions, among other things.
masak Punch and Judy.
skids DanielC: wrong topic, numbers, until overloading is fully operational.
TimToady rakudo: (1/3).WHAT.say
p6eval rakudo e80574: OUTPUT«Num()␤» 18:45
skids Best to stick to something less overloadable.
TimToady 1/3 is supposed to behave as a Rat literal
though maybe only STD knows that
masak TimToady: in which cases will operations of Rats cause them to devolve into ordinary floats? 18:46
DanielC Logic would say: When you do arithmetic with a float.
e.g. 2 / 3.0
masak hm, maybe the dual of that question is more easily answered.
TimToady the Rat literal form doesn't allow spaces
DanielC 2/3.0 18:47
TimToady std: 2/3.0
p6eval std 27091: OUTPUT«##### PARSE FAILED #####␤Syntax error at /tmp/sUM3H9VGvH line 1:␤------> 2/3.0␤ expecting any of:␤ integer␤ postfix_prefix_meta_operator␤FAILED 00:02 35m␤»
masak would +"1/3" numify to a Rat?
TimToady Num is allowed to keep a lazy Rat internallly 18:48
by current spec
masak was that an answer to my question?
TimToady not sure if that's really sane though
not intended as one
not your original question, anyway
masak OK.
what's (+"1/3").WHAT?
TimToady could say Num, but Num might know it's still a Rat 18:49
skids wonders why it's so damn hard to find old pastelings via either perlgeek.de or google site:perlgeek.de searches.
TimToady native num, on the other hand, doesn't do lazy rats
masak I was thinking, since +"5" numifies to an Int... 18:50
at least as far as I understand/hope...
TimToady it could certainly numify to a Rat
masak I think that would be the most consistent.
TimToady hopefully most of the rest of it falls out with appropriate MMD 18:51
DanielC numify... I love verbing.
ruoso remembers that "5" is a Rat too... it's "5/1", but it's a Rat
TimToady I think Num() is only guaranteed to convert to something that does Num, not that is Num
masak aye. 18:52
ruoso .oO(why did I use quotes above? s/"//g
TimToady well, any function could return flying butt monkeys if it wanted...
18:52 icwiener_ joined
DanielC rakudo: (1 == 1.0).perl.say 18:52
masak not if it's typed. :)
p6eval rakudo 952fe6: OUTPUT«Bool::True␤»
ruoso masak, even if it's typed
masak, it can return a flying butt monkey that does the type 18:53
masak ruoso: oh, right.
DanielC Is == currently defined solely as (Num, Num) ?
masak I didn't consider a flying butt monkey that happens to do the type...
DanielC: yes.
TimToady return Flying-Butt-Monkey.new but Cool
DanielC Is == even a multi-function in Rakudo? 18:54
masak butt Cool.
[particle]1 OUTPUT [No Way!]
masak DanielC: all core functions are multi.
18:54 [particle]1 is now known as [particle]
TimToady DanielC: why wouldn't it be? 18:54
DanielC masak: == doesn't behave very multi for me :-(
masak DanielC: that's because of bugs.
DanielC: and jnthn is on vacation. :/
DanielC TimToady: Just trying to figure out if the current behaviour is a bug.
TimToady nodnod 18:55
masak DanielC: best I can offer you is more speleology... :)
ruoso but regarding numbers... I think the matching should follow the way math does... 1 ~~ Complex is true,
TimToady 1 does Complex, sure
masak ruoso: full ack.
TimToady and 1/3 does Num
despite being a Rat
ruoso so Int is actually a subset of Rat 18:56
masak ruoso: except in any inheritence sense.
skids nopaste?
ruoso masak, that's why they're all roles
masak skids: gist.gihub.com
ruoso not classes
masak ruoso: aye.
TimToady or subsets :P
skids hrm, the one in the topic is borken
masak skids: aye. :/
DanielC Int is Rat is Num is Complex <-- thats the way it should work.
TimToady needs inviting, I expect 18:57
ruoso except that "is" express inheritance...
masak realises that we have both Cat and Rat in Perl 6... and lots of Dog examples in the spec
ruoso Cat?
masak buubot: spack Cat
buubot Couldn't match input.
masak hmm, maybe I'm hallucinating. 18:58
buubot: spack ' cat '
buubot Couldn't match input.
TimToady what is sial's nick?
masak TimToady: I emailed the guy a while back, and he said he didn't have room for #perl6. :/
ruoso lot of stuff got lost with sial pbot 18:59
masak his bot or something only had that many slots.
TimToady but after that, just inviting it got it back
ruoso it's not only the bot that went off
TimToady maybe we should all pitch in and buy him a 10-meg disk drive 19:00
masak oh. it wasn't #perl6 I asked about, it was #november-wiki.
TimToady do you remember the nick?
skids DanielC: gist.github.com/130824
ruoso the whole pbot app is off
DanielC masak: I'm lost. What are we talking about? who is sial?
masak TimToady: he's [email@hidden.address]
but I don't know the nick.
DanielC skids: *click*
masak DanielC: the guy that runs the pastebot that's usually in here. 19:01
DanielC skids: Interesting.
masak: Ah. I noticed that pastebot didn't work anymore.
skids Would be more interesting if op overloading wasn't blocked on rakudo/parrot MMD grafting.
masak skids++ # nice! 19:02
ruoso wonders how lazy math can be done by the interpreter... 19:04
masak OK -- let's say I want to call the Expat library from Rakudo. www.libexpat.org/ -- how far would I get today if I tried? 19:05
ruoso .oO( can the interpreter leave (1/3) + (1/2) as ((2+3)/6)? when does it collapse to an actual number? ) 19:07
pmichaud ...I kinda thought that (2+3)/6 was an actual number :-)
skids ruoso: on a more basic level, I was surprised by the paucity of academic papers (at least, google-seen ones) addressing the topic of when it is most efficient to canonicalize rats. 19:08
ruoso it's not just about efficiency
but precision as well
if you turn it into floating point too early 19:09
you'll get a different result
skids Though Parrot's rationals are libgmp, which adopts an "always canonicalize" approach so the choice has been made for us for rakudo, at least for now.
DanielC ruoso: (1/3) + (1/2) should be stored as 5/6. That's what my Rational class does.
skids is pecking away at a construcible numbers class.
ruoso pmichaud, right... I should have said "when does it collapse to a floating point?"
skids Yeah I know what you mean.
avar ruoso: When you call sprintf ? :) 19:10
ruoso avar, maybe you're right and it only collapses when you explicitly asks for it... 19:11
avar I don't know, but I'd prefer it to only collapse to floating point when you carry out an operation which turns your rational into an irrational number
Up until that point it doesn't make sense to suffer precision loss in the internal representation
TimToady and we all know that user I/O is irrational
skids Anyway the rational canonicalization issue is neat in that it exposes the drawbacks of RISC-like approaches to coding, in a much less confusing way than, say, string splicing.
If you build all your ops up from basic ops, there's little opportunity to canonicalize at strategic points in a calculation. 19:12
pugs_svn r27092 | lwall++ | [viv] can now duplicate gimme5's translation of EXPR 19:23
r27092 | lwall++ | [STD] better redefinition message suggested by ruoso++
19:28 viklund joined 19:34 _Chillance_ joined
StephenPollei www.schneier.com/blog/archives/2009...r_cry.html Ever Better Cryptanalytic Results Against SHA-1 -- somewhat OT but a few days ago some talked about hash functions here 19:39
19:39 Chillance left 19:40 Chillance joined
viklund hello 19:43
lambdabot viklund: You have 1 new message. '/msg lambdabot @messages' to read it.
viklund Great, pmichaud++
masak viklund: oh hai 19:44
viklund masak: ehlo 19:45
masak is studying www.parrotcode.org/docs/pdd/pdd16_n..._call.html to see if he can co-opt Parrot into letting him talk to Expat
viklund ;)
masak it actually looks doable. 19:46
19:47 lichtkind joined
viklund @seen pmichaud 19:48
lambdabot pmichaud is in #perl6. I last heard pmichaud speak 40m 51s ago.
pmichaud I'm around.
viklund great
is there someway I can do can_read on a filehandle in rakudo/pir? 19:49
i've tried to find anything in the parrot tree...
...but it's kind of difficult to navigate. 19:50
pugs_svn r27093 | moritz++ | [t/spec] modeline 19:52
masak rakudo: say "\c[2013]"
p6eval rakudo 952fe6: OUTPUT«ߝ␤»
pugs_svn r27094 | moritz++ | [t/spec] test that .subst works within a multi 19:53
masak rakudo: say '\c[2013]'
p6eval rakudo 952fe6: OUTPUT«\c[2013]␤»
pmichaud what is "can_read"? 19:54
(I can speculate, but I'm curious to know what you mean by it :-) 19:55
viklund ahh, it's from IO::Socket in p5, it says "I have data"
Khisanth not IO::Select? 19:56
viklund it calls select()
Khisanth: right
pmichaud I don't know if there's a select() equivalent in Parrot yet.
viklund sry, I tend to spell Select as Socket
masak rakudo: say "\x[f6]"
p6eval rakudo 952fe6: OUTPUT«ö␤»
viklund pmichaud: can I do a non-blocking read somehow?
pmichaud I don't know. We'd have to ask the #parrot folks. 19:57
viklund wonders if he really knows the meaning of that question.
ok
avar By turning on non-blocking IO, but I don't know if rakudo can do that:)
masak is there a way to ask a Perl 6 string what encoding it has?
pmichaud rakudo can do it if Parrot can do it.
moritz_ cotto++ is currently working on the asynchronous IO in parrot
19:57 _Chillance_ left
moritz_ so he should have a good overview 19:57
masak pmichaud: no, I mean Perl 6.
pmichaud: oh, you were replying to avar. sorry. 19:58
moritz_ masak: I don't think that strings have encodings in Perl 6
pmichaud right, I was replying to avar.
moritz_ masak: a Str is something above the encoding level
masak moritz_: fair enough.
TimToady which is why I was carping about calling .bytes on a Str 19:59
viklund oh, well, I guess my p6 ircbot will have to wait a while longer
masak moritz_: let's say I have the Str "ö". how do I turn that into a latin-1-encoded array of bytes?
pmichaud in fixing viklund's concatenation issue I think I did come up with a way to start implementing Buf, fwiw
moritz_ masak: that's a more interesting question, and somethiing I've been wondering for quite some time
pmichaud but I'd need more answers to the questions like masak++ is currently posing in order to understand Buf
moritz_ TimToady: any thoughts?
masak TimToady: ah. I think I see why now. it can't give bytes if it doesn't know its own encoding. 20:00
viklund masak: It doesn't have an encoding
moritz_ unless you assume a default encoding (and normal form)
masak pmichaud: I'm running into many of these questions with Web.pm.
viklund: right.
viklund: s/know its own/have an/
pmichaud masak: correct, I can see that. If we can get the Perl 6 API nailed down, I think we can get an implementation in Rakudo fairly quickly. 20:01
masak so let's nail it down.
moritz_ I'm all in favor of a .encode($encoding) method on Str
pmichaud what's the equivalent of chr($n) that returns a Buf instead of a Str?
masak how do I convert a Str, which doesn't have an encoding, to a Buf, which does?
TimToady .encode
ruoso daniel.ruoso.com/categoria/perl/mod...ing-mildew 20:02
moritz_ great
ruoso some notes about how module loading would work
masak buubot: spack encode
buubot Couldn't match input.
viklund and .encode returns a Buf?
TimToady correct
moritz_ viklund: that would make sense, yes
pmichaud: maybe Buf(123) ? (just guessing) 20:03
TimToady possibly Buf() also converts to a default, which might be contextually set
masak .encode takes an optional named which specifies the actualy encoding, utf-8, latin-1, etc, yes?
TimToady typically utf8 in western world
skids relieved Str doesn't have an encoding.
viklund UTF9 FTW!!
masak do Str and Buf have a common role or something, so that they can be treated together in parameter lists and the like? 20:04
TimToady sure, they're both Any :P
masak scowls 20:05
TimToady duck typing is your quack
viklund starts thinking about the utf9 spec 20:06
masak still having a hazy vision forwards, though.
TimToady just take the difference from utf7 to utf8 and then do it again
moritz_ viklund: isn't there one already?
viklund: I think it was an April's fool joke 20:07
20:07 cdarroch left
viklund yes 20:07
en.wikipedia.org/wiki/UTF-9_and_UTF-18
moritz_ TimToady: any objection to maing the $nf argument to Str.bytes a named one? 20:08
TimToady well, anything can be named as an arg, even if positional as a param 20:10
moritz_ hm, right
TimToady so you mean "not a positional"
ruoso TimToady, btw... I think the importing of the package name in "need" and friends could recursively clone the packages, but keep the references to the other things in the package... 20:11
TimToady I'm inclined to leave positionals in if there's sort of an obvious one
moritz_ TimToady: ok, but then I'd put the encoding first
TimToady ruoso: I was thinking more in terms of delegation, but whatever
or COW
pmichaud is .encode in the spec already somewhere/ 20:12
?
moritz_ pmichaud: no, I'm adding it right now
TimToady moritz_: maybe, esp if we also have separate normalization functions
pmichaud what happens if we stringify a Buf ? 20:13
ruoso TimToady, by delegation you mean a lazy proxy that would protect the outer package?
moritz_ it dies bitterly?
ruoso s/outer/foreign/
pugs_svn r27095 | moritz++ | [S32/Str] document Str.encode 20:14
r27095 | moritz++ |
r27095 | moritz++ | also changed order of arguments in .bytes
masak moritz_++
viklund updates his spec 20:15
pmichaud The Buf that gets returned is a Buf8 ? 20:16
masak yes, IIRC.
moritz_ the spec doesn't mention a Buf8
only buf8 20:17
masak ah.
TimToady all bufs are native, basically
Buf is abstract
masak oh right. just like there's no Int8.
moritz_ TimToady: so any value that conforms to Buf is actually a buf8 or buf16 or so?
StephenPollei buf32 was also mentioned iirc 20:18
moritz_ aye
in S02
TimToady buf32 is essentially UCS-4
pmichaud masak/moritz: would you be able to write a few simple tests for .encode that illustrate what you want?
moritz_ pmichaud: yes
pmichaud (or expect?)
masak pmichaud: sure thing!
pmichaud I think we can get a .encode implementation reasonably quickly from that.
masak \o/
TimToady I wonder if we should have signed bufs...
moritz_ pmichaud: give me a second to finish my spec work on the Buf constructor, then I can write that 20:19
pmichaud okay. It's unlikely I'll get to it today, but in the next couple of days I may be able to do so.
masak I'm working on Hitomi tests right now, but it's nothing I can't interrupt.
StephenPollei also Grapheme and Codepoint and others existed, not sure how they fit into the unicode discussion
pmichaud I don't need tests immediately -- just sometime soon. Or put another way -- I'll be blocking on tests (and possibly time)
masak understood. 20:20
skids TimToady: it's all post-casting at the end of operations, so maybe just a trait? Or whatever it is that is appropriate to stick on a bufN
pmichaud (I do recognize it's really vital for web-based stuff, so I'm eager to get it in, however.)
moritz_ rakudo: say :16<c3>, :16<B16>
p6eval rakudo 952fe6: OUTPUT«1952838␤»
TimToady certainly we can limp along with unsigned bufs for now
moritz_ rakudo: say :16<c3>, ' ', :16<B16>
p6eval rakudo 952fe6: OUTPUT«195 2838␤»
moritz_ rakudo: say :16<c3>, ' ', :16<B6> 20:21
p6eval rakudo 952fe6: OUTPUT«195 182␤»
pmichaud rakudo: say :16<B_52>
skids Endianness, however....
p6eval rakudo 952fe6: OUTPUT«2898␤»
TimToady well, there's really no such thing as UTF-16 or UTF-32 either
those are abstractions over LE and BE 20:22
and also note that our Codepoints are not UTF-16 codepoints, but Unicode codepoints
no surrogates allowed
20:24 cdarroch joined
TimToady but with an option for anything allowed, including "illegal" codepoints 20:24
s/anything allowed/allowing anything/ 20:25
pugs_svn r27096 | moritz++ | [S32/Containers] flesh out Buf constructor
skids Hrm do we really need Str.encode? Couldn't it just be Str.Buf? 20:26
moritz_ Str.Buf('UTF-8') looks weird to me 20:27
viklund Buf.decode?
20:27 pmurias joined
moritz_ viklund: feel free to spec that too 20:28
viklund but I don't have commit access to pugs svn... 20:29
moritz_ viklund: that should be changed 20:30
viklund: you've got mail ;-) 20:31
viklund ;D that was quick
masak oh, we're quick to distribute blame. :) 20:32
moritz_ viklund: now you can also invite people via commitbit.pugscode.org/admin/project/Pugs/people and your svn password
pugs_svn r27097 | lwall++ | [S32/Str] some fossils
moritz_ rakudo: say 'a'.ord 20:34
p6eval rakudo 952fe6: OUTPUT«97␤»
pugs_svn r27098 | lwall++ | [S32/Str] old thinko on the inequalities 20:37
moritz_ TimToady: how do you compare two Bufs? with eq?
TimToady eqv would work fine
masak that would work even when they're encoded differently? 20:38
moritz_ masak: a Buf is just a list of Integers
masak: it doesn't know about an encoding either
masak moritz_: oh, come on!
:)
so to check if they encode the same string, I'd have to decode both into Strs, and compare the Strs with eq? 20:39
moritz_: I thought that a Buf had Str-like features.
moritz_ hm.
that doesn't fit with S32/Containers
maybe it can optionally know its encoding 20:40
if it does, you can regex-match against it etc
pmichaud A C<Buf> is a stringish view of an array of
integers, and has no Unicode or character properties without explicit
conversion to some kind of C<Str>.
(from S02)
moritz_ ah, ok
masak so if a Buf is created by a conversion to Str, it retains its coding information? 20:41
TimToady obviously the signed bufs would have to be bif8 bif16 and bif32
pmichaud masak: that statement doesn't parse for me.
well, it parses, but the semantic analysis fails my constraint checker.
masak pmichaud: ah, s/conversion to/conversion from/. sorry. :) 20:42
pmichaud also the part about "Buf retains its coding information"
masak hm, nevermind. a re-read of the S02 quote invalidates my question anyway.
TimToady one could, of course, derive a bufutf8 type
well, a utf8 type 20:43
skids OK, wait wasn't it just decided that Str doesn't have a definite encoding (can change at will during ops)?
TimToady which isa buf
8
pmichaud skids: correct, a Str doesn't have an encoding.
at least, the encoding isn't "public" 20:44
TimToady but a utf8 or a utf16 might
20:44 jhorwitz left
pmichaud Here's my current understanding of things 20:44
skids Ah. I don't remember seeing those.
TimToady it's good that you don't remember those
pmichaud (1) all Str objects are Unicode
(2) Buf objects are simply a stringish view of a list of integers 20:45
(3) neither of these have an "encoding" associated with them
TimToady (unless we derive from buf8, etc.)
pmichaud (4) "encoding" simply specifies how one goes from Str->Buf or vice-versa
(yes, modulo TimToady's comments that there could be derived forms of Buf that keep their encoding) 20:46
(end) 20:47
skids thinks that's a workable minimal set (what pmichaud wrote)
viklund ack
masak it feels so easy when you write it like that. :)
ruoso later & 20:48
moritz_ pmichaud++
StephenPollei and some things like `say` must have a default encoding
masak I'm currently translating Python test code into Perl 6. it makes frequent mention of Unicode strings, and has some conversion to latin-1 as well.
StephenPollei: how so?
moritz_ StephenPollei: it's associated with handles, not with say()
TimToady StephenPollei: that's the filehandle's call 20:49
StephenPollei oh ok with the handle that makes lots of sense
so open probably defaults to utf8 20:50
TimToady in the West
moritz_ right, it's specced taht way
TimToady might well default to utf16 in the East
pmurias isn't utf16 marked with a bom? 20:51
pugs_svn r27099 | moritz++ | initial tests for Str.encode
moritz_ pmurias: optionally
StephenPollei possibly dumb question but maybe you have a pragma or something , or like pmurias said use bom or whatever 20:52
TimToady I'm kinda fond of scsu, myself
StephenPollei excpet if you use bom then you must set it at initial read or sniff ahead at open
pmichaud afk for a bit
moritz_ South Carolina State University?
StephenPollei and some things you can't nondestructively read ahead .. pipe 20:53
20:53 jferrero left
pmichaud scsu == the unsigned version of scsi :-) :-) 20:53
moritz_ StephenPollei: the default mode for open() is "unicode", which roughly says "if there's a BOM, use it, if not, assume UTF-8"
TimToady unicode.org/reports/tr6/
moritz_ StephenPollei: details are in S32/*
StephenPollei ok I'll read it, I haven't finished the synopises yet 20:54
masak StephenPollei: one does not "finish" the synopses. :P
StephenPollei perlcabal.org/syn/S32/IO.html
pmichaud None of us have finished the synopses yet. That's why we're still working on them. :-) 20:55
TimToady there are heuristics between the no-BOM and the assumption of UTF-8
StephenPollei well I need to read all of them at least once, even if they will mutant under my me after I read them
pugs_svn r27100 | moritz++ | [S32/Containers] spec Buf.decode 20:56
viklund what is the $nf paramter in the Str methods?
moritz_ viklund: normal form
TimToady normalization
moritz_ viklund: just like on .bytes
StephenPollei perlcabal.org/syn/S32/IO.html#IO Note that the "Unicode" encoding implies figuring out which actual UTF is in use, either from a BOM or other heuristics. If heuristics are inconclusive, UTF-8 will be assumed. 20:57
viklund oh, just like on .bytes
TimToady StephenPollei: that's what I just said :)
moritz_ rakudo: say 'ö'.ord
p6eval rakudo 952fe6: OUTPUT«246␤»
20:58 Sunbeam joined
pugs_svn r27101 | moritz++ | [t/spec] also test Buf.decode 20:59
TimToady but basically, if in the first N bytes of the file all the nulls are in either the even or the odd position, you can assume UTF-16 of the appropriate endianness
moritz_ TimToady: it would be useful if Str and Buf shared a common role (let's say Stringish). Then IO methods like .say could request a conversion to Stringish rather than Str 21:00
TimToady on the assumption that most text files will have a lot of ASCII, even in the East
moritz_ TimToady: so objects that now their binary representation better than their Str representation could easier be used in IO 21:01
StephenPollei method Buf::print (IO $io --> Bool)
lichtkind first post :) use.perl.org/~perl6doc/
StephenPollei I think thats also missing from the spec for files opened with :bin
TimToady well, say and print use very low-level stringification in any case
since they're last-ditch effort on stringifying junctions 21:02
likewise if there are a lot of nulls in both even and odd positions, we suspect a form of UTF-32
but certainly the stringification in print and say is more akin to buffification, as you say 21:05
one might go as far as to say that the low-level stringification we get in say is really .encode 21:06
so maybe .encode is defined in the junction class, while .Str isn't 21:07
moritz_ so Junction answers to .encode?
TimToady seems like it unifies
moritz_ I still don't see the point in not having .Str or .perl in Junction, but there are more important topics to me ;-) 21:08
so .encode on a Buf is a no-op?
I'd rather have it an error
and .encode only on non-Buf objects
TimToady "utf8".encode("utf16")
recode("utf8","utf16") maybe 21:10
recode(Any,Any) then converts to Str and back
skids <utf8 utf16> get with it, TimToady :-)
TimToady well, actually, if they're really types, then just recode(utf8,utf16) 21:11
and then we have atoms to compare
moritz_ why should they be types?
TimToady I talked about that earlier
utf8 isa buf8
moritz_ ah, ok 21:12
TimToady latin1 isa buf8 too
21:12 nihiliad joined
TimToady latin1 eq utf8 could then be made to kaboom or dwim 21:13
skids shudders that ISO-8859-1 is a valid perl6 identifier. 21:14
TimToady nope 21:15
std: ISO-8859-1
p6eval std 27101: OUTPUT«Undeclared name:␤ ISO used at 1 ␤ok 00:02 35m␤»
avar hrm, someone told me that "-" could be used in variable names in p6, just not at the beginning/ending to disambiguate it from binary ops 21:16
TimToady then someone was confabulating
PerlJam avar: it can.
viklund_ avar: that is correct
PerlJam TimToady: please explain
TimToady the char after - has to be alpha 21:17
not alphanum
PerlJam oh yes.
moritz_ std: my $a-b
p6eval std 27101: OUTPUT«ok 00:02 36m␤»
moritz_ std: my $a1-b
pmurias $-foo is legal?
p6eval std 27101: OUTPUT«ok 00:02 36m␤»
moritz_ std: my $-foo
p6eval std 27101: OUTPUT«##### PARSE FAILED #####␤Malformed my at /tmp/RJAfkl3Oaj line 1:␤------> my $-foo␤ expecting special_variable__S_158DollarMinus␤FAILED 00:02 36m␤»
PerlJam wait, it can be 9-a ? I thought the - had to be between alphas
moritz_ std: my $9-a
avar std: my $a1-1b
p6eval std 27101: OUTPUT«Undeclared routine:␤ a used at 1 ␤ok 00:02 36m␤» 21:18
std 27101: OUTPUT«##### PARSE FAILED #####␤Whitespace is required between alphanumeric tokens at /tmp/tB2ldwYiVW line 1:␤------> my $a1-1b␤ expecting any of:␤ POST␤ postfix␤ postfix_prefix_meta_operator␤ standard stopper␤ terminator␤ whitespace␤FAILED 00:02
..36m␤»
pmurias std: $a1-a
PerlJam std: my $a2-foo;
p6eval std 27101: ( no output )
TimToady basically a sequence of legal identifiers separated by - or '
21:18 xinming_ joined
lichtkind PerlJam: do you know who maintain planet perl 6? 21:18
TimToady identifiers can end with num but not stat 21:19
*start
PerlJam lichtkind: I do not.
lichtkind haha
skids fine then 21:20
skids relieved that ISO-8859-1 is a not valid perl6 identifier.
lichtkind PerlJam: any clue who does? 21:21
moritz_ lichtkind: last time obra_ was able to help - but I'd suggest adding some real content first 21:22
lichtkind moritz_: what you mean by real conent ? 21:23
obra_: ping?
moritz_ lichtkind: blog posts that takl about Perl 6
lichtkind moritz_: as i did :) 21:24
moritz_ lichtkind: I didn't see any Perl 6 content
lichtkind moritz_: well documentation is also part of the project
moritz_ anyway, if you want more exposure now, you can also submit to the ironman planet
lichtkind: yes, but announcing a blog about perl 6 documentation is not talking about Perl 6, IMHO 21:25
TimToady $.sleep((^5000).pick) &
lichtkind moritz_: there are 3 more serious issues in this post 21:26
moritz_ lichtkind: that's a rather futile debate... let me rephrase my sentinment: I'd recommend more Perl 6 related content, then your chances of inclusion are higher. 21:27
21:35 Limbic_Region joined
pmurias moritz_: should i attempt to have my gsoc blog included on planet perl 6? 21:41
moritz_ pmurias: IMHO yes
obra_ lichtkind: please email me. [email@hidden.address] 21:43
lichtkind obra_: thanks
21:46 nihiliad left 21:47 nihiliad joined
pmurias obra_: could you add pmurias.livejournal.com to planet perl 6? 21:48
obra_ pmurias: please mail me the feed information 21:54
masak rakudo: class A::B {}; A
p6eval rakudo 952fe6: OUTPUT«invoke() not implemented in class 'NameSpace'␤in Main (/tmp/aTmJLBniUS:2)␤»
masak rakudo--
moritz_ I think it's not far from being correct 21:55
Tene Why isn't the result of a C<while> condition set in $_?
moritz_ defining A::B doesn't autovivify package or class A 21:56
so a bare A afterwards is parsed as a sub call
Tene Does defining A::B necessarily define A?
As a class?
moritz_ rakudo: my $x = 1; while $x { .say; $x = 0 }
Tene I could see as a namespace...
p6eval rakudo 952fe6: OUTPUT«Use of uninitialized value␤␤»
moritz_ Tene: I don't think so
rakudo: my $x = 1; while $x -> $_ { .say; $x = 0 }
p6eval rakudo 952fe6: OUTPUT«1␤»
Tene but what would this do: class A::B; my A $a .= new() 21:57
21:57 meppuru joined
moritz_ Tene: complain about a mal-formed declaration? 21:57
std: class A::B; my A $a .= new()
p6eval std 27101: OUTPUT«ok 00:02 36m␤»
moritz_ hm.
Tene moritz_: Sure, but is that a workaround or is there an official reason for not doing that?
moritz_ std: class A::B::C; my A::B $a .= new()
p6eval std 27101: OUTPUT«ok 00:02 36m␤»
PerlJam Tene: wouldn't having the conditional of a while automatically set $_ cause more confusion?
Tene std: my Foo $a .= new();
p6eval std 27101: OUTPUT«##### PARSE FAILED #####␤In "my" declaration, typename Foo must be predeclared (or marked as declarative with :: prefix) at /tmp/yVKe3xsg5F line 1:␤------> my Foo $a .= new();␤FAILED 00:02 35m␤» 21:58
Tene PerlJam: explain?
moritz_ agrees with PerlJam
TimToady while $_ ne '' { s/^.// } # kaboom
moritz_ Tene: since the return value of the conditional is used rather seldomly, people tend to expect $_ to be the outer $_
Tene Hmm. 21:59
Ah, right, I was trying to inherit from the while(<>) {} p5 special case
which should be for $*IN.lines, but that's not lazy in rakudo yet. 22:01
Okay.
PerlJam Tene: wrt class A::B implying a class A, why would you want that? Why do you need a "work around"? A::B and A bear no relation to each other than they share a common prefix.
Tene PerlJam: that's what I was saying.
PerlJam: I was responding to moritz
masak rakudo: enum A <b c>; say A.b
p6eval rakudo 952fe6: OUTPUT«Null PMC access in get_string()␤in Main (/tmp/p5QwSO26Py:2)␤»
masak submits rakudobug
(yes, I know it should be A::b)
22:06 rfordinal joined
PerlJam masak: seen this one ... 22:08
rakudo: class A { } ; A.foo;
p6eval rakudo 952fe6: OUTPUT«Method 'foo' not found for invocant of class ''␤»
PerlJam ?
(I would have expected a similar message from your enum example, but with an appropriate class name)
masak PerlJam: well, there's no foo. 22:09
the only thing wrong is the class name.
PerlJam right, that's what I mean.
masak rakudo: class A {}; A.new.foo
p6eval rakudo 952fe6: OUTPUT«Method 'foo' not found for invocant of class 'A'␤»
masak PerlJam: seems to have something to do with type objects.
rakudo: enum A::B <c d e>; constant B = A::B; say B::c 22:14
p6eval rakudo 952fe6: OUTPUT«Null PMC access in invoke()␤in Main (/tmp/m2A7LYkaEe:2)␤»
masak submits rakudobug
moritz_ rakudo: enum A::B <c d e>; my ::B = A::B; say B::c 22:16
p6eval rakudo 952fe6: OUTPUT«Malformed declaration at line 2, near "::B = A::B"␤in Main (src/gen_setting.pm:0)␤»
moritz_ rakudo: enum A::B <c d e>; ::B := A::B; say B::c
p6eval rakudo 952fe6: OUTPUT«Null PMC access in invoke()␤in Main (/tmp/i5IO8cTDbM:2)␤»
22:22 stepnem joined, DanielC joined
DanielC @seen mberends 22:23
lambdabot I saw mberends leaving #perl6 8h 15m 37s ago, and .
viklund @seen lambdabot
lambdabot Yes, I'm here. I'm in #bfpg, ##hrg, #unicycling, #scannedinavian, #scala, #rosettacode, #perl6, #macosxdev, #jtiger, #jhc, #haskell_ru, #haskell.se, #haskell.ru, #haskell.no, #haskell.jp, #haskell.
it, #haskell.hr, #haskell.fr, #haskell.fi, #haskell.es, #haskell.dut, #haskell.de, #haskell.cz, #haskell-soc, #haskell-books, #haskell-blah, #haskell-in-depth, #haskell-freebsd, #macosx, ##freebsd, #
gentoo-uy, #gentoo-haskell, #friendly-coders, #dreamlinux-es, #concatenative, #arch-haskell, #functionaljava, #novalang, #darcs, #yi, #xmonad, #ghc, ##logic, #haskell-overflow and #haskell
viklund woah!
DanielC :-)
masak lambdabot: showoff.
viklund haskell-overflow
masak lambdabot is clearly our braggiest bot around. "I'm here, but I'm also omnipresent." 22:24
22:25 Chillance left 22:27 nihiliad left
viklund masak: Configure.pm should be it's own proto project so that ppl can depend on that one for the build process 22:31
masak viklund: quite possibly. you might want to run that through mberends, though.
we don't actually have code ownership, but it's his baby. :) 22:32
viklund yes
masak I see only one disadvantage with that right now: creating a new project will be one step further away.
maybe that's not so bad.
viklund If most (or all) proto projects use it, it won't be a problem 22:33
masak true.
viklund anyway, I'm too tired to code right now 22:35
22:35 viklund left 22:39 pmurias left
Tene @seen tene 22:43
lambdabot You are in #perl6. I last heard you speak just now.
Tene thx
22:45 masak left 22:46 rewt`` joined 22:47 rewt`` left 23:02 lichtkind left 23:04 ihrd joined 23:12 eMaX joined, ihrd left 23:16 skids joined 23:18 rfordinal left 23:47 meppuru left 23:49 icwiener_ left 23:50 [particle] left