»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
sisar o/ 02:41
sorear o/ 02:42
sorear wonders whether to register for yapc::eu now or wait until committing 02:42
Timbus r: <3 2 1> <<<>> <1 2 3> ==> say 02:51
p6eval rakudo a2bacb: OUTPUT«False False True␤»
Timbus i convinced someone that this is how you are supposed to lexicographically compare arry elements in p6 02:52
haaa
sorear o/ quietfanatic ! 02:55
n: say qq:to(moo);␤ foo\n bar␤ moo␤ 02:56
p6eval niecza v18-7-ga660099: OUTPUT«===SORRY!===␤␤Unable to resolve method postcircumfix:<( )> in type Any␤ at /tmp/QyyHeyq3dz line 1 (ANON @ 2) ␤ at <unknown> line 0 (ExitRunloop @ 0) at /tmp/QyyHeyq3dz line 1:␤------> say qq:to(moo)⏏;␤␤Two terms in a …
sorear n: say qq:to[moo];␤ foo\n bar␤ moo␤
p6eval niecza v18-7-ga660099: OUTPUT«foo␤ bar␤␤»
pmichaud sorear: are you thinking of giving a talk at yapc::eu ? 03:05
sorear pmichaud: hadn't been 03:18
pmichaud sorear: oh, I hope you will. Even a 20 minute talk on Niecza would be awesome. 03:21
at any rate, registering for the conference isn't the same as purchasing a ticket -- that's typically a second step 03:22
and many yapc's will wave the ticket cost for speakers with accepted talks
*waive
sorear *stares blankly* 03:28
I have never given a talk before ...
pmichaud did you get to see any of the talk videos for yapc::na this week, ooc?
anyway, I don't want to be a pest or too pushy. I know that a talk on niecza (from its primary author) would be incredibly well received, and I suspect many of us here on #perl6 would be extremely glad to help one take place. :) 03:32
sorear I haven't looked at any of them yet, no. I want to do that eventually 03:36
gardnan perl6: say "Testing the eval bot"; 05:21
p6eval rakudo a2bacb, niecza v18-7-ga660099, pugs: OUTPUT«Testing the eval bot␤»
sisar bugs.ruby-lang.org/issues/5011 -- "Add Perl 6-like main method definition support..." -- matz (Ruby's chief designer) will decide in July on the feature request's fate. Languages have started stealing ideas from perl6, yay ! 05:24
gardnan the main method definition was a pretty great idea, no wonder 05:25
sisar gardnan: ate
sorear gardnan: Hello and welcome to #perl6
sisar *aye
gardnan thanks
sisar adu: is pastebin.com/W297Nn8m the latest version of your Go grammar ? 05:31
quietfanatic Having a MAIN method is a convenient way to allow modules to be used either as modules or as programs. 05:41
moritz \o 06:02
sorear haz a yapc::eu account 06:07
o/ moritz
pmichaud moritz: o/ 06:08
dalek ecs: a712f0b | moritz++ | S03-operators.pod:
[S03] remove sleep, abs and sin as examples of named unary operators

There seems to be no good rule for deciding which built-ins are named unaries, so now they are all listops. Except temp and let, whose typical usage requires tighter precedence than item assignment
06:22
sorear rn: say defined 1 && 0 06:28
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«True␤»
sorear oh, that was fixed
sorear rn: say {;}.WHAT 06:44
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«Block()␤»
sorear rn: say {}.WHAT
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«Hash()␤»
sorear rn: say {; a => 2}.WHAT 06:45
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«Block()␤»
sorear rn: say { a => 2; }.WHAT
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«Hash()␤»
sorear rn: say { a => 2;; }.WHAT
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«Block()␤»
sorear rn: say { a => 2, }.WHAT
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«Hash()␤»
sorear o/ GlitchMr 07:07
GlitchMr Hi
sisar which are the other method(s) which, like the .infinite method, return True/False ? 07:10
sorear .Bool, .defined, .^isa, .^does, ... 07:11
sisar sorear: thanks
rn: (1..Inf).infinite.say; 07:13
p6eval niecza v18-7-ga660099: OUTPUT«Unhandled exception: Unable to resolve method infinite in type Range␤ at /tmp/wORS5Tvx1i line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3918 (module-CORE @ 562) ␤ at /h…
..rakudo a2bacb: OUTPUT«True␤»
sisar r: (1..Inf).finite.say;
p6eval rakudo a2bacb: OUTPUT«No such method 'finite' for invocant of type 'Range'␤ in block <anon> at /tmp/ZVvMobxp21:1␤␤»
sisar shouldn't there be a .finite method too ? after all, its shorter than .infinite . 07:14
sorear I am not convinced end users should be touching .infinite at all
sorear pokes pmichaud
sisar sorear: why ? 07:15
sorear because it's unreliable 07:16
it's a hint to the list engine, not a hard fact about the list 07:17
sisar sorear: its allowed to return Mu when it's not sure itself. 07:18
not sure about its finiteness
sorear: when is it unreliable ? example ? 07:20
sorear I didn't know it supported unknownness
dalek ecs: ec2d4c8 | moritz++ | S03-operators.pod:
[S03] more Named unary cleanup
sisar sorear: have you seen pmichaud++'s talk on Iterators ? its really interesting. 07:21
sorear sisar: not yet
sisar it can be seen at www.youtube.com/watch?v=rsccacoabaE, pmichaud++ ! 07:25
GlitchMr nrrr: (1 .. 1e30).infinite 07:27
nr: (1 .. 1e30).infinite
heh
p6eval niecza v18-7-ga660099: OUTPUT«Unhandled exception: Unable to resolve method infinite in type Range␤ at /tmp/X8WRt6oSva line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3918 (module-CORE @ 562) ␤ at /h…
..rakudo a2bacb: ( no output )
GlitchMr r: print (1 .. 1e30).infinite
p6eval rakudo a2bacb: OUTPUT«False»
GlitchMr (but, it's nearly infinite list) 07:28
sorear r: print (1 .. 1e308).infinite
p6eval rakudo a2bacb: OUTPUT«False»
sorear r: print (1 .. 1e309).infinite
p6eval rakudo a2bacb: OUTPUT«True»
sisar i call bug ^ 07:29
GlitchMr nr: print 1e309 07:29
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«Inf»
GlitchMr It's infintity
When number has e, it's floating point number
So 1e0 is different to 1.0 and different to 1
niecza> 1e0 !== 1.0 07:30
False
niecza> 1e0 === 1.0
False
what?
nr: print 1e0 !== 1.0
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«False»
GlitchMr nr: print 1e0 === 1.0
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«False»
sorear nr: print 1e0 !=== 1.0
p6eval rakudo a2bacb, niecza v18-7-ga660099: OUTPUT«True»
GlitchMr !=== what? 07:31
sorear !===, ![===]
meta-operator
!= is a special case because it does not mean ![=]
sisar oh !
sorear but in all other cases you negate by prepending !
GlitchMr That is... confusing... 07:32
sorear perhaps we should warn on !==, it doesn't behave as a Python programmer would expect
GlitchMr Python is not the case
sisar r: say 5 !<= 5;
p6eval rakudo a2bacb: OUTPUT«False␤»
GlitchMr It's more about JavaScript and PHP programmers
Python only has ==, !=, is and is not
sorear oh
well Javascript and PHP programmers then :)
a bit rusty on all three 07:33
GlitchMr And "is" is implementation-defined with immutable types in Python
"1.0 is 1.0" could return True, but it also could return False 07:34
paste.uk.to/b2b992f5 07:35
...
sorear I guess something like 07:40
GlitchMr === is also in Ruby, but it works completely differently than in PHP, JavaScript and Perl 6
sorear 1. constants are interned within each compilation unit
2. small integers are pre-allocated so that 1+1 is faster
GlitchMr Yes, it's interning optimilization
sorear 3. no such optimization exists for float
GlitchMr Yes, and I think they're compared by object id, so 1.0 is 1.0 (just because first 1.0 is destroyed afer getting object id) 07:41
GlitchMr In Ruby, === is more like ~~ in Perl (except somewhat less flexible) 07:43
dalek ecza/non-bootstrap: 7cfd6b3 | sorear++ | lib/ (2 files):
Actions pt 8
sergot hi o/ 07:59
sorear o/ 08:07
GlitchMr modules.perl6.org/ 09:21
Why I don't see badges aside of panda badge?
Did it seriously depended on... masak/proto? 09:23
github.com/perl6/ecosystem/commit/...ea6e58d033 09:24
...
what? 09:25
proto is removed and everything breaks 09:27
moritz r: (1..*).map(&sqrt).infinite.say 10:19
p6eval rakudo a2bacb: OUTPUT«Mu()␤»
timotimo huh, perl6 can calculate the limit of any sequence when approaching infinity? 10:20
moritz no 10:26
mberends loliblogged! blogs.perl.org/users/martin_berends...s-403.html 10:37
phenny mberends: 07 Dec 14:01Z <moritz> tell mberends that the timing code in Test.pm has a wee problem -- the assignment to $time_after changes the return value, which should be True for passing tests, and False for failed ones. Now it's just always a timestamp
moritz \o mberends 10:39
colomon mberends++
mberends o/ moritz, all set?
moritz mberends: modulo clothing, yes 10:40
mberends o/ colomon
moritz mberends++ # rakudo on android 10:42
moritz I guess much of the disc space used is from parrot's .git dir 10:45
that's 120M on my machiine
mberends the Linux Installer part was the most difficult. While I was digging in to make it work, I was thinking "I could do this better". It is large Yak in need of a shave.
aye, parrot's .git is 110M on android 10:47
tadzik ooh, it's mberends! \o/ 10:57
mberends yo tadzik!
tadzik so I guess it's my turn for Rakudo on maemo :) 10:58
mberends int.eresting
tadzik snarkyboojum did that before I think
grondilu what would be the equivalent of Perl5's overload::constant? 11:14
moritz what does that do?
grondilu it overloads litteral values. 11:15
moritz I don't think there's a convenient way right now
you can define your own 'is parsed' macros once that's implemented 11:16
grondilu Ok. 11:17
moritz though Perl 6 tries much harder not to mange stuff too much 11:18
grondilu: I'm curious, what's your use case?
grondilu overloading string litteral to have them instantiate a class if they match a particular pattern. 11:19
s/litteral/litterals/ 11:20
GlitchMr grondilu, 0 but True
moritz grondilu: and what's your use case?
grondilu it's for my bitcoin library. 11:21
moritz and what do you need it for in your bitcoin library?
GlitchMr use Math::BigInt is silly in Perl 5 as it blocks you from using floating point numerals. 11:22
It's easier to explicitely declare classes
grondilu I'd like to write something like: my $addr = "1SomeBitsoinAddressxxxxx"; so that addr get automatically checked and instantiated as a Bitcoin::Address.
GlitchMr ... 11:23
This is abuse of language...
moritz grondilu: that would be too magic for my taste, but I can see why want that
grondilu like some magic in his perl scripts :) 11:24
GlitchMr my $addr = Bitcoin("1SomeBitsoinAddressxxxxx");
moritz I'd just define a sub prefix:<btc>($str) { Bitcoin::Address.new($str) }
GlitchMr Why not just use constructor?
moritz and then write btc '1SomeBitsoinAddressxxxxx'
grondilu GlitchMr: because it is much longer to type!
grondilu I did it in Perl5 and it works perfectly. 11:25
GlitchMr prefix?
It could be sub btc ($str) {} as well
grondilu a prefix, maybe. But not "btc". 11:26
moritz GlitchMr: I proposed a prefix because of its tighter precedence, which might be desirable in this case 11:35
tadzik grondilu: you could maybe make it work as my Bitcoin::Address $addr = "1SomeBitsoinAddressxxxxx"; without much magic 11:37
or maybe with some
grondilu the syntax « my Bitcoin::Address $addr .= new: "1btdcaddr...."; » is implemented already. 11:39
moritz tadzik: I doubt it works without magic
grondilu If user doesn't want magic, I can sill add a ':nomagic' option in the module's import. 11:40
tadzik the type object would have to be a proxy and a factory
grondilu: I'd rather have :yesmagic and sane defaults 11:41
timotimo grondilu: will "my Foo $bar .= meth args" always desugar to my Foo $bar = Foo.meth args"? 11:42
grondilu a "use Bitcoin :magic;" would look nice indeed.
GlitchMr nr: class Foo { method meth { print @_.perl } }; my Foo $bar .= meth 2, 2 11:44
p6eval niecza v18-7-ga660099: OUTPUT«===SORRY!===␤␤Two terms in a row (method call requires colon or parens to take arguments) at /tmp/AlPvH1oVu8 line 1:␤------> print @_.perl } }; my Foo $bar .= meth ⏏2, 2␤␤Parse failed␤␤»
..rakudo a2bacb: OUTPUT«===SORRY!===␤Placeholder variables cannot be used in a method at line 2, near "}; my Foo "␤»
GlitchMr nr: class Foo { method meth { print @_.perl } }; my Foo $bar .= meth(2, 2)
p6eval niecza v18-7-ga660099: OUTPUT«Potential difficulties:␤ $bar is declared but not used at /tmp/aC41kf1tQS line 1:␤------> method meth { print @_.perl } }; my Foo ⏏$bar .= meth(2, 2)␤␤(2, 2).listUnhandled exception: Nominal type check failed for scalar store; got Bool, …
..rakudo a2bacb: OUTPUT«===SORRY!===␤Placeholder variables cannot be used in a method at line 2, near "}; my Foo "␤»
grondilu you need to use the ':' after the method name if you use arguments. 11:47
grondilu p6: class Foo { method new { self.Mu::new } }; my Foo $f .= new: Whatever;' 11:48
p6eval niecza v18-7-ga660099: OUTPUT«===SORRY!===␤␤Bogus statement at /tmp/uINz0VnVze line 1:␤------> Mu::new } }; my Foo $f .= new: Whatever;⏏'␤␤Parse failed␤␤»
..rakudo a2bacb: OUTPUT«===SORRY!===␤Confused␤at /tmp/QLk6oS6Zug:1␤»
..pugs: OUTPUT«*** ␤ Unexpected end of input␤ expecting "\\", variable name or "'"␤ at /tmp/lyl6qZPQpe line 2, column 1␤»
grondilu oops
grondilu r: class Foo { method new($) { self.bless: * } }; say my Foo $f .= new: 1; 12:04
p6eval rakudo a2bacb: OUTPUT«Foo.new()␤»
n0den1te how can I enforce a type into a sub signature? 12:51
r: sub foo ($foobar, int :$foo) { my $blah //= $foobar // $foo; say $blah;}; foo "bummer"; foo 42.85;
p6eval rakudo a2bacb: OUTPUT«bummer␤42.85␤»
n0den1te r: sub foo ($foobar, Int :$foo) { my $blah //= $foobar // $foo; say $blah;}; foo "bummer"; foo 42.85;
p6eval rakudo a2bacb: OUTPUT«bummer␤42.85␤»
n0den1te r: sub foo ($foobar, Int :$foo) { my $blah //= $foobar; say $blah;}; foo "bummer"; foo 42.85; 12:52
p6eval rakudo a2bacb: OUTPUT«bummer␤42.85␤»
n0den1te r: sub foo ($foobar, Int :$foo) { say $foobar, "---", $foo; }; foo "bummer"; foo 42.85; foo 84; 12:53
p6eval rakudo a2bacb: OUTPUT«bummer---Int()␤42.85---Int()␤84---Int()␤»
n0den1te I was expecting Any()---84 in the last case. Am I totally off the mark here? 12:54
vmspb Hi 13:05
I see Rakudo-2012.04 in Ubuntu Quantal (12.10), but it's broken
rakudo-0.1~2012.04.1-2 [i386] depends on nqp-0.1~2012.04.1-2,
but nqp-0.1~2012.04.1-2 don't exist, is only nqp-0.1~2012.04.1-3
tadzik vmspb: that's probably Ubuntu maintainers' fault 13:36
pmichaud good morning, #perl6 15:43
tadzik good morning pmichaud 15:47
sisar pmichaud: irclog.perlgeek.de/perl6/2012-06-16#i_5732574 15:58
moritz: ping 15:59
moritz's Away Msg says: 'getting married' :) 16:00
can someone have a look at JSON:Tiny's grammar (github.com/moritz/json/blob/master...rammar.pm) and tell me if it can handle an both representations of an empty arraylist indicated i.e. [] and [ ]. 16:04
timotimo oh, so that's the thing he's busy with and where he's inviting many people
sisar *indicated by
timotimo that's quite neat :)
sisar timotimo: :) 16:05
sorear good * #perl6 16:12
pmichaud sisar: (JSON) looking
larks is loop control, goto etc working?
don't know if it's perl6 or me >_>;
sisar sorear: \o
pmichaud next / redo / last work. LABELs don't work in Rakudo yet. 16:13
so, no "goto" yet.
larks ah, so if I have a nested for loops and I want to skip to the next outer for loop, hhmm
pmichaud yeah, that's something we need to put in place soonish
sisar what's the blocker on "goto" ? modulo tuits, of course. 16:14
pmichaud the blocker is being able to build the continuation
or exception handler. not sure which yet. 16:15
"goto" isn't a simple branch, because a goto is allowed to leave the current lexical block.
(and lexical blocks in rakudo generally translate to parrot subs, which can't do direct inter-sub branching except via exceptions or continuations) 16:16
sisar: looks to me like [ ] should work. 16:17
sisar pmichaud: and [] too ?
pmichaud sisar: yes.
sisar pmichaud: ok. thanks. 16:18
pmichaud sisar: (.finite method) I couldn't see having two methods that indicated finiteness. 16:19
when just one would do. 16:20
anyway, I have to board my plane now -- back in a couple of hours
sisar pmichaud: .finite is just shorter, thats all.
sisar tadzik: the module compilation error seems to have changed from 'No STable at ...' to 'Missing or wrong version of dependency 'src/gen/CORE.setting'' 16:38
tadzik: which modules, other than LWP::Simple, fail to build because of this error ? 16:39
tadzik sisar: all of them 17:40
sisar: if you rebuild rakudo and not rebuild all modules 17:41
precompilation is valid as long as rakudo stays the same
sisar tadzik: what is 'precompilation' again ?
tadzik sisar: that's when you turn .pm into .pir 17:50
it speeds up startup _very_ significantly
the downside is that each precompiled module is compatibile only with the rakudo on which it was compiled
sisar right, makes sense. 17:51
tadzik afks again 17:52
uvtc Anyone have a link to pmichaud's YAPC talk on lists/arrays/parcels? I've got the link to "Perl 6 Lists, the Good, the Ugly, and the Insanity", but that appears to be the 2nd one. I'm looking for the one that he did before that one. 18:53
sisar uvtc: I don't think it's been released yet 19:40
pmichaud I didn't see it when I looked a bit ago. Not all of the talk videos have been posted yet 19:44
uvtc Thanks. Will be looking for that one. 19:48
pmichaud I suppose I could add that channel to my feed list :) 19:54
pmichaud new videos just started showing up in the past 40 minutes :) 19:55
sjn o/ 19:56
pmichaud sjn: o/
sjn pmichaud: any news from TPF? :)
pmichaud sjn: not yet; Idon't know if krunen sent anything to karen yet. I know that karen's mailbox was really full so she might have not read it yet 19:57
sjn ook
pmichaud (I will be boarding a plane in just a moment) 19:58
sjn right, I'll try to figure out stuff on my end 19:58
pmichaud I know about the june 25 deadline so will definitely get as much known as I can this week. 19:59
sjn great 20:00
pmichaud okay, time to board -- bbl 20:01
tadzik o/ 20:43
tadzik gah. Why does video black out on code examples on pmichaud's talk on youtube? :/ 21:33
estrai link? 21:44
sorear o/ ta dzik
tadzik www.youtube.com/watch?v=rsccacoabaE
o/ so rear
flussence that's the weirdest video ID I've seen yet
estrai yeah, indeed :) 21:45
tadzik same here 21:46
that's why I rechecked it :P
sorear o/ quietfanatic 21:49
quietfanatic_ microwaves. 21:51
good * #perl6 21:52
sorear o/ quietfanatic 21:56
quietfanatic o/ soreat 21:57
r
sorear p6: 2.:: 22:02
p6eval niecza v18-7-ga660099: OUTPUT«Unhandled exception: Cannot dispatch to a method on PseudoStash because it is not inherited or done by Int␤ at /tmp/vc2X0Rl_c4 line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting …
..pugs: OUTPUT«*** ␤ Unexpected "::"␤ expecting ".", "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript␤ at /tmp/IhxkD3AkrT line 1, column 3␤»
..rakudo a2bacb: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
quietfanatic_ oh, that breaks rakudo 22:05
So I was thinking of reviving Link::C
only probably From::C is a better name
Now with native types and Zavolaj, it should be much simpler to implement. 22:06
diakopter quietfanatic_: have you seen NativeCall? 22:18
nm, I see Zavolaj uses that now 22:20
quietfanatic_ Is NativeCall a lower level interface? 22:24
I'll look at it in any case
quietfanatic_ Oh, no, NativeCall is Zavolaj. 22:25
gccxml cain't output to stdout. That's a shame. 22:27
geekosaur -o /dev/fd/1 ? 22:33
quietfanatic_ That sends it straight to my terminal 22:35
quietfanatic_ I need it to be the output of a qqx// 22:35
Well, I was gonna cache code in a file anyway, so I guess it won't hurt to have another file. 22:36
quietfanatic Or maybe I should just make it an h2p6 program, like h2xs. 22:48
tadzik that'd be quite cool
quietfanatic only it'd actually work :) 22:51
sorear quietfanatic: I think #parrot wrote a NQP-based C header parser 22:55
quietfanatic I saw there was one in the Parrot repository many years ago 23:01
is this the same or different?
Previously I used a monster perl5 regex. Now I'm trying to use gccxml. 23:02
sorear this is different, it's less than two years old
quietfanatic I should give it a whirl then
timotimo can't find the first talk by pmichaud :( 23:03
[Coke] # 06/16/2012 - rakudo++ (22448); niecza (91.19%); pugs (34.51%) 23:05
no change since YAPC
sergot good * ! o/ 23:28
quietfanatic hello sergot 23:29
sergot quietfanatic: Oh, i'm going to sleep. :) 23:30
hava a nice time!
quietfanatic oh, right then :) 23:31
sergot I should have said 'good night' :)
bye! :)
dalek ecza/non-bootstrap: cc6277b | sorear++ | lib/ (3 files):
Actions pt 9
23:39