Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-04-16

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 sorear What's 2010 for {*}?
00:08 jnthn
00:08 jnthn (nothing)
00:08 diakopter I think nothing
00:08 diakopter empty space
00:08 sorear Is Perl 6 going to support inplace reblessing?  I have Perl 5 code which relies on it
00:09 diakopter I don't think there's a "bless" at all.
00:09 Juerd Does it do blessing at all?
00:09 Juerd $self := $other, perhaps?
00:10 diakopter to me, p6 has a very traditional C++-ish OO model, just with tons of metamodel stuff bolted on, and much dispatch/binding done at runtime instead of compile-time.
00:11 jnthn The default model you get is fairly typical OO - which is fine for most people - but the metamodel stuff lets you create other things too.
00:11 PerlJam diakopter: that's not how I view the Perl 6 object model at all.
00:11 sorear pmichaud: Have you any reaction to the thought of me implementing non-PMC locals and upward type inference in NQP?
00:12 diakopter PerlJam: how do you view it
00:12 PerlJam diakopter: the meta-model stuff (to me) is perhaps most important because it's how you build the default object model and is what allows you to create other object models "safely"
00:13 diakopter what's an example of another object model
00:15 PerlJam there's the "no model" model.  There's the prototype-based model.  There's the class-based model.  et cetera
00:15 diakopter what's the no-model model
00:15 PerlJam (There's the "model I haven't thought of yet" model ")
00:15 PerlJam er, :)
00:16 diakopter jnthn: you should implement the bikini model.
00:20 sorear jnthn: oh, it just magically finds the actions in some oter file?
00:20 * sorear finish backlogging
00:21 pausenclown_ FWIW, XML::Parser now supports namespaces.
00:21 diakopter PerlJam: p6's model isn't class-based?
00:21 diakopter PerlJam: what's the "no model" model?
00:22 PerlJam diakopter: yes, the default model is class-based
00:23 PerlJam the "no model" is where each object is a hand-crafted work of art that bears no relation to any other object.
00:23 lue why hello there everyone (sorry, I suddenly caught (a lisp. don't know where `(it comes)) from)
00:23 jnthn sorear: No, when the grammar is instantiated you specify the class.
00:23 PerlJam lue: fingernail clippings and oatmeal!
00:24 jnthn I have a much-of-the-way-there patch for hash slices, but I need sleep now.
00:24 diakopter PerlJam: ok, b/c I asked for examples of "another object model" and you mentioned the default one in the list.
00:24 jnthn Will finish it up tomorrow.
00:24 jnthn o/ for now
00:25 lue goodnight o/
00:25 diakopter I still don't see how the "no model" model is different from class-based
00:27 diakopter the prototype-based one can be implemented by the class-based one (as shown by Chrome & IE9) until objects are used as hashes/dictionaries, and the class-based one can naively be implemented in the prototype-based one.
00:28 diakopter but.. what are the underlying attributes of "no model" that makes it different from class-based or prototype-based?  I don't see any.
00:30 diakopter I mean, you either limit the members or you don't
00:30 diakopter they're either strongly typed at one level or strongly typed at another level with another dispatching layer added on.
00:32 jhuni joined #perl6
00:39 christine joined #perl6
00:44 lue elisp is weird. False is nil, and everything else (even 0 !) is true.
00:44 sorear so... there's nothing analagous to reblessing in Perl6?
00:44 sorear I've got some intesting code with objects that change nature at runtime
00:50 nihiliad joined #perl6
00:52 eternaleye joined #perl6
01:00 muixirt_ joined #perl6
01:07 holli_ joined #perl6
01:10 lue afk
01:12 ruoso sorear, Perl 6 has a much richer meta-oo API
01:12 ruoso which means that everything you do with your reblessing is already doable by meta-oo
01:13 ruoso but keep in mind that in Perl 6 attributes are really private, so if you change an object hierarchy, a lot of data will simply become inaccessible
01:14 ruoso (private in the sense that they are stored in per-package slots and their access is package-dependant)
01:22 ruoso I just had an insight...
01:22 * diakopter waits to read it
01:22 ruoso few years ago, perl5 simply didn't support the semantics of Perl 6
01:23 ruoso all the perl6-on-perl5 efforts blocked on missing semantics
01:23 ruoso but after perl 5.10 and 5.12, a lot, and I really mean *a LOT* of things were added to perl5
01:23 ruoso like pluggable mro
01:24 diakopter pluggable lexing
01:25 ruoso I'm actually starting to think that a perl6-on-perl5 implementation is starting to be viable
01:25 diakopter well, there's already a front-end in Perl 5
01:25 diakopter (STD)
01:26 ruoso I mean a p5 backend
01:26 diakopter I know
01:31 ruoso if we add a new c data structure in perl5
01:31 ruoso like OV* (object value)
01:31 ruoso we can consider the other SV* as native types
01:32 ruoso that autoboxes depending on context
01:34 yinyin left #perl6
01:34 rv2733 joined #perl6
01:44 mikehh joined #perl6
01:47 sorear ruoso: that's ok
01:48 sorear O
01:48 sorear I'm just looking for something like Moose's rebless_instancew
01:50 ruoso well... you can always use the meta api to manipulate the isa hierarchy
01:50 sorear but I only want to rebless instances
01:51 sorear not reorder the entire hierarchy
01:51 sorear it's a simulation enviroment with partial information - as information becomes available, the reflection objects rebless into more specific forms
01:53 * sorear will be suprised if attributes stay purely private forever
01:53 sorear even Java supports breaking abstraction barriers, and Perl is a rope-oriented language
01:54 diakopter in that case you wouldn't use attributes; you'd use a hash, imho
01:57 Psyche^ joined #perl6
02:01 agentzh joined #perl6
02:08 ruoso sorear, if you're reblessing into more specific types, it could work, just a matter of using the rw meta-oo api
02:09 plobsing joined #perl6
02:13 ruoso okay... after a bit more reasoning... perl6-on-perl5 is not just a matter of translating Perl 6 code into Perl 5 optree
02:14 ruoso but...
02:14 ruoso if we implement some new lowlevel types and ops in p5
02:14 ruoso it would support Perl 6 just fine
02:15 ruoso these specialized lowlevel types would present themselves as tied, overloaded and any other magic available
02:15 ruoso so regular perl5 code would know how to handle them
02:15 Kyril joined #perl6
02:19 sorear why would anyone want to run perl6 on perl5
02:20 molaf joined #perl6
02:20 sorear Kyril: hello
02:22 ruoso sorear, to be able to use all CPAN, including XS-based code, without trouble in Perl 6?
02:22 ruoso sorear, to be able to use Perl 6 modules from Perl 5?
02:22 Kyril sorear : hi
02:24 ruoso I think a proof-of-concept of this idea would be to implement Parcel in Perl 5...
02:24 ruoso including it being able to expose itself as both a hash and as an array
02:24 diakopter sounds like a Tie::
02:25 ruoso and with a custom keyword to build the non-flattening list
02:25 sorear be aware that others are currently implementing the ability of 6 and 5 to call each other, without touching the 5 codebase
02:26 sorear personally I will continue to stay as far away from hacking the P5 VM as I can
02:26 ruoso I'm aware of the interoperability efforts...
02:32 TimToady er, parcels don't do hash
02:32 TimToady not unless converted to capture
02:34 diakopter ok, now I'm wanting a hashish role, so TimToady can say "parcels don't do hashish"
02:35 peng_ joined #perl6
02:37 ingy greetings
02:38 diakopter salutations
02:38 ingy :)
02:42 meppl joined #perl6
02:42 lue rakudo: my $nine+four = 3; say $nine+four # checking
02:42 p6eval rakudo 78faa0: OUTPUT«Could not find sub &four␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
02:43 lue good, so operators can be used as part of names :)
02:43 ingy Not sure if I mentioned it before but C'Dent can now compile a Perl 6 dialect into 8 or so different languages... http://cdent.org/examples/hello-world/
02:43 diakopter well, no
02:43 diakopter lue: no?
02:43 ingy Perl 6 is a lot nicer of a target syntax than Perl 5. :)
02:43 diakopter ingy: you mentioned it but the churn here is high throughout the day
02:44 ingy :)
02:45 lue *cough* can not *cough*
02:45 ingy My goal is to write a useful module in C'Dent that is available to 12 different languages by the end of the summer...
02:46 diakopter lue: you made me laugh just now
02:47 lue that's good, it makes syntax highlighting a bit easier :)
02:49 lue emacs seems to be set up for dynamic highlighting (after all, you do use a fully-featured language for highlighting `(,I guess it's great . I get to learn (Lisp)!))
02:52 sorear ingy: Do you have any tips for someone who might design Inline6?
02:54 ingy sorear: make it sexy :)
02:54 ingy actually I do...
02:55 ingy but in the middle of something else...
02:55 ingy brb
03:07 ingy sorear: I think I would tie Inline6 into the Perl 6 parser
03:08 ingy sorear: http://nopaste.snit.ch/paste
03:09 ingy sorear: I'm not sure I got the lexical parsing correct, but from what I've seen of TimToady's talks, something like that should be possible...
03:10 ruoso ingy, I think you pasted the wrong link
03:11 ingy sorear: my only other advice would be to use SWIG (and maybe C'Dent) to make Inline truly Acmeist :)
03:11 ingy sorear: http://nopaste.snit.ch/20283 (thanks ruoso)
03:12 ruoso ingy, note that this kind of inlining probably requires implementing the grammar for the inlined language
03:12 ingy In other words, I think it should be possible, with SWIG, to make an Inline framework (at least for C) that works in many langs
03:12 ingy ruoso: of course :)
03:13 ruoso typemapping is always a bitch
03:13 ruoso it might work for simple types
03:14 ingy ruoso: actually... I can't remember what Inline.pm does, but I think it passes most of the burden to the C compiler and XS
03:14 ruoso yeah... so it works for simple types
03:14 ingy so maybe you don't need to parse C at all
03:14 ingy unless the Perl 6 stuff doesn't detect syntax ending
03:15 ingy but I kinda thought it did :\
03:15 ruoso if you assume there won't be an unbalanced brace that is valid in the inner language (like inside a string, or a comment)
03:16 ruoso otherwise, you need to parse the inner language... or at least tokenize it...
03:16 ingy well I would think that Perl6 would allow you to specify container ending
03:16 ingy not sure though
03:16 ruoso the thing is that the inner language might contain your "container ending" inside its code...
03:17 ruoso { use Inline 'C'; /* } */ }
03:17 ingy yeah, I totally understand
03:17 ingy but a friendly parser could detect simple stuff like the indenting in my example
03:17 ingy it's just a game of agreement :)
03:18 ruoso yeah... it could make assumptions like that
03:18 ingy I gots to go eat with friends...
03:18 ingy ttul :)
03:25 lue does perl 5 (yes, 5) have the multiline #`() style comments?
03:25 lue rakudo: my #`(my, my) $hello = 3; say $hello
03:25 p6eval rakudo 78faa0: OUTPUT«Malformed my at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
03:26 lue rakudo: my $hello = 3; #`(my, my␤, my); say $hello
03:26 p6eval rakudo 78faa0: OUTPUT«Confused at line 12, near ", my); say"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
03:30 spinclad lue: they are a Perl 6 innovation, not in perl 5
03:32 lue alright. just wondering (trying to program a major mode for emacs)
03:32 plobsing lue: you can acheive the equivalent, but it is generally dirty.
03:33 plobsing say 1 + ("This is a comment. Wheeee!!!!", 2);
03:35 lue std: my $hello = 3; #`(my, my␤, my); say $hello
03:35 p6eval std 30394: OUTPUT«ok 00:01 110m␤»
03:35 lue std: my #`(my, my) $hello = 3; say $hello
03:35 p6eval std 30394: OUTPUT«ok 00:01 108m␤»
03:36 lue I'm assuming any set of brackets { (), [], «» and so on } can be used for multiline comment (joy :D)
03:40 TimToady std: foo #`【【【 nothing here 】】】 bar
03:40 p6eval std 30394: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routines:␤     'bar' used at line 1␤     'foo' used at line 1␤Check failed␤FAILED 00:01 107m␤»
03:42 lue that didn't fail because of the comment, did it?
03:43 lue (brackets ought to be a lot of fun, considering Perl 6 probably supports more than most sane text editors :D)
03:52 spinclad std: 'foo' #`【【【 nothing here 】】】, 'bar'
03:52 p6eval std 30394: OUTPUT«ok 00:01 108m␤»
03:57 TimToady no, if failed on both foo and bar *because* the comment worked right
04:00 lue How am I supposed to get a list of operators and such from STD.pm6 ? I'm going insane :)
04:07 alester joined #perl6
04:07 lue rakudo: my @a = ﴾3,5,7﴿; say @a; say @a[1]
04:07 p6eval rakudo 78faa0: OUTPUT«Confused at line 11, near "my @a = \ufd3e3"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
04:07 lue std: my @a = ﴾3,5,7﴿; say @a; say @a[1]
04:07 p6eval std 30394: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus term at /tmp/aLtAPGSfKF line 1:␤------> [32mmy @a = [33m⏏[31m﴾3,5,7﴿; say @a; say @a[1][0m␤Parse failed␤FAILED 00:01 110m␤»
04:08 TimToady #11901
04:08 am0c joined #perl6
04:08 lue I can't load that ticket :(
04:10 TimToady I'm referring to MJD #11901
04:11 lue aaah
04:12 lue well, they are parentheses! they are supposed to work (unless ﴾﴿ has some special property that excludes them)
04:12 PerlJam That has got to be some sort of status symbol.  When the most quoted person in the community starts quoting you, you're either doing something incredibly right or horribly wrong.
04:13 lue .u ﴾﴿
04:13 phenny U+FD3E ORNATE LEFT PARENTHESIS (﴾)
04:13 phenny U+FD3F ORNATE RIGHT PARENTHESIS (﴿)
04:13 * PerlJam guesses MJD is doing something incredibly right :)
04:14 diakopter .mjd 11901
04:14 diakopter where's phenny when you need it
04:15 lue in std_hilite (the css style file of it), what does ._scalar mean when you already have .sigil and .variable? Does it affect the 3 in my $x = 3 ?
04:17 TimToady you would have to ask the author
04:18 am0c o hai, where can i find STD.pm? it seems it has been moved from pugs archive.
04:18 TimToady it's now STD.pm6
04:18 diakopter am0c: howdy
04:18 PerlJam <?foo> is the same as <?before <.foo> >  is it not?
04:18 TimToady what link did you follow?
04:18 am0c I see.
04:18 am0c from here: http://perl6.org/
04:18 TimToady I thought that got fixed
04:18 TimToady PerlJam: yes
04:19 lue who was the author?
04:19 diakopter heh; I could add an apache redirect
04:19 lue I assumed it was you TimToady.
04:19 TimToady it wasn't
04:19 PerlJam lue: svn blame is your friend :)
04:19 am0c thanks, i found it '~'
04:20 lue .oO('azawawi'. hm...)
04:22 TimToady #11927 A good approach to that problem would be to hire a computer programmer.
04:23 TimToady #11930 Would you like to see my rate card?
04:24 diakopter I got return statements working.
04:25 lue then again, I don't have to support that particular highlighting method (esp. if I can't discern what the difference between .sigil and ._scalar is)
04:26 * PerlJam still can't understand why people get so angry and worked up about Perl 6 not being "ready"
04:27 * lue neither
04:27 PerlJam and they're angry at *Perl*
04:27 PerlJam (and because I happen to like Perl, now they're angry at me)
04:27 diakopter perlesque: my int $a = 2; sub foo (int $b, int $c) { System::Console.WriteLine($b); return $c; }; System::Console.WriteLine(foo(55, 3)); System::Console.WriteLine(foo(444444 + 332, 3113 / 43));
04:27 p6eval perlesque: OUTPUT«55␤3␤444776␤72␤»
04:28 diakopter whee.
04:29 TimToady perlesque: my int $a = 2; sub foo (int $b, int $c) { System::Console.WriteLine($b); { return $c; }; 42; System::Console.WriteLine(foo(55, 3)); System::Console.WriteLine(foo(444444 + 332, 3113 / 43));
04:29 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object␤at (wrapper dynamic-method) Sprixel.Grammar. (Sprixel.Matcher,Sprixel.UTF32String,int,uint,Sprixel.State) <0x2cb85>␤at (wrapper delegate-invoke)
04:29 p6eval ..Sprixel.Func`6<Sprixel.Matcher,…
04:29 diakopter heh
04:30 diakopter I dunno what happened there
04:30 diakopter oh
04:31 TimToady perlesque: my int $a = 2; sub foo (int $b, int $c) { System::Console.WriteLine($b); { return $c; }; 42; } System::Console.WriteLine(foo(55, 3)); System::Console.WriteLine(foo(444444 + 332, 3113 / 43));
04:31 p6eval perlesque: OUTPUT«parsefail␤»
04:31 TimToady perlesque: my int $a = 2; sub foo (int $b, int $c) { System::Console.WriteLine($b); { return $c; }; 42; }; System::Console.WriteLine(foo(55, 3)); System::Console.WriteLine(foo(444444 + 332, 3113 / 43));
04:31 p6eval perlesque: OUTPUT«55␤3␤444776␤72␤»
04:31 diakopter oh ok, parser failure
04:31 diakopter the first time
04:31 TimToady missing }
04:32 diakopter ahah. yeah I can fix that quickly
04:32 diakopter luckily I control the entire stack :D
04:32 TimToady the stack is decked against you...
04:33 diakopter at least it's not swabbed against me.
04:33 diakopter er.
04:33 diakopter punfail
04:33 TimToady I think my T61 battery has croaked :(
04:34 * PerlJam wonders how you obtain power from a frog
04:34 TimToady with jumper cables
04:35 diakopter here's what that first example compiles to (and then disassembled into C#)
04:38 diakopter perlesque: my int $a = 2; sub foo (int $b, int $c) { return $c / $b; }; System::Console.WriteLine(foo(3,55)); System::Console.WriteLine(foo(11,33))
04:38 p6eval perlesque: OUTPUT«18␤3␤»
04:38 diakopter oops.
04:38 diakopter forgot to paste the link.
04:38 diakopter http://perl6.pastebin.com/mP7rsCBf
04:39 diakopter and yes, it is simulating an entire framebuilding/binding/returning callstack system with GC'able objects
04:39 uniejo joined #perl6
04:39 diakopter of continuable frames.
04:42 diakopter well I'd better get to Chipotle before it closes
04:42 TimToady o/
04:43 TimToady time to try a power down and see if my battery resets
04:43 TimToady &
04:44 lue bye
05:01 snarkyboojum joined #perl6
05:05 sorear lue: the list of operators isn't defined in the grammar
05:05 sorear in Perl 6, operators are something that exists in a namespace
05:05 sorear you can define them in the setting, you can import them from modules, you can bind them as parameters
05:05 sorear they can come into scope like any other lexical name
05:07 sorear ingy: perhaps I should explain more where I'm coming from
05:08 sorear Perl 6, with its diverse implementation technology, poses a ... unique challenge to anyone who wants to do library bindings
05:08 lue well, where do the standard operators get defined in STD?
05:11 sorear didn't I just get done telling you
05:12 lestrrat Pl
05:12 lestrrat sorry, wrong window.
05:18 lue I didn't catch you telling me where they are in STD. They must be there, or else STD could not function.
05:24 lue goodnight moon
05:25 astinus joined #perl6
05:37 jaldhar joined #perl6
05:46 ingy back
05:54 kaare joined #perl6
05:57 kaare joined #perl6
06:30 jaldhar joined #perl6
06:41 am0c o hai, is 'subroutine' equal to 'user defined function' in both perl5 and perl6 ?
06:44 JimmyZ joined #perl6
07:01 moritz_ not quite
07:02 moritz_ for example some subroutines are built in, not user defined
07:37 REPLeffect joined #perl6
07:43 pmurias joined #perl6
07:44 iblechbot joined #perl6
08:03 masak joined #perl6
08:03 masak oh hai, #perl6
08:09 moritz_ oh hai
08:10 masak rakudo: -> *@a { @a[+0] }.()
08:10 p6eval rakudo 78faa0: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
08:10 * masak submits rakudobug
08:10 moritz_ oh
08:10 masak hm, but that's not the error I got. maybe I should update to latest rakudo...
08:11 moritz_ rakudo: -> *@a { @a[0] }.()
08:11 p6eval rakudo 78faa0:  ( no output )
08:11 moritz_ rakudo: say (+0).WHAT
08:11 masak something with + that makes it not a good index.
08:11 p6eval rakudo 78faa0: OUTPUT«Num()␤»
08:11 masak that, probably :)
08:11 moritz_ :-)
08:11 masak alpha: class A { my $b; method c { $A::b = 5; say $A::b } }; A.new.c
08:11 p6eval alpha 30e0ed: OUTPUT«5␤»
08:11 masak rakudo: class A { my $b; method c { $A::b = 5; say $A::b } }; A.new.c
08:12 p6eval rakudo 78faa0: OUTPUT«Null PMC access in getprop()␤current instr.: '&infix:<=>' pc 16989 (src/builtins/Junction.pir:245)␤»
08:12 * masak submits rakuodbug
08:12 masak rakudo: multi foo(Int $x is rw) { say "writable" }; multi foo(Int $x) { "readonly" }; foo(42)
08:12 p6eval rakudo 78faa0: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Int $x)␤:(Int $x)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
08:12 * masak submits rakudobug
08:13 masak S06: "To allow modification, use the C<is rw> trait.  This requires a mutable object or container as an argument (or some kind of type object that can be converted to a mutable object, such as might be returned by an array or hash that knows how to autovivify new elements). Otherwise the signature fails to bind, and this candidate routine cannot be considered for servicing this particular call.  (Other multi candidates, if any, may
08:13 masak succeed if they don't require C<rw> for this parameter.)"
08:13 moritz_ now you're just showing off :-)
08:13 masak :P
08:13 masak I'm done now, by the way.
08:14 pjcj_ joined #perl6
08:15 masak re the first bug,
08:15 masak the funny thing is that it works with non-slurpy arrays:
08:15 masak rakudo: -> @a { say @a[+0] }.([5])
08:15 p6eval rakudo 78faa0: OUTPUT«5␤»
08:16 moritz_ yeh knew, we've had lots of trouble with slurpy params
08:16 moritz_ colomon and me
08:16 masak ok.
08:16 moritz_ but I was never able to reduce it far enough to be useful for a bug report
08:30 sorear note: predefined subroutines are a new feature in 6, not present in 5
08:31 ejs joined #perl6
08:32 ejs1 joined #perl6
08:36 renormalist joined #perl6
08:36 miyagikd joined #perl6
08:39 dakkar joined #perl6
08:43 ejs1 joined #perl6
08:44 dalek book: 8eaad70 | moritz++ |  (2 files):
08:44 dalek book: require the latest Pod::PseudoPod::LaTeX, which fixes various rendering bugs and now likes B<...> inside programlistings
08:44 dalek book: review: http://github.com/perl6/book/commit/8eaad704087ac0987cf5672fdfc0f3d03d70a302
08:49 masak \o/
08:49 masak moritz_++
08:54 Trashlord joined #perl6
09:15 iblechbot joined #perl6
09:19 dalek book: 9c2ebf3 | moritz++ | src/regexes.pod:
09:19 dalek book: markup fixes and typos found by sorear++
09:19 dalek book: review: http://github.com/perl6/book/commit/9c2ebf35d14a0ff52d9108adea774ab5f3c97fb0
09:41 * IllvilJa o
09:43 masak O.o/
09:44 moritz_ rakudo: state $x = 3; say $x
09:44 p6eval rakudo 78faa0: OUTPUT«Symbol '$x' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
09:44 moritz_ alpha: state $x = 3; say $x
09:44 p6eval alpha 30e0ed: OUTPUT«3␤»
09:45 moritz_ alpha: sub a { state $x = 5; $x--; return if $x <= 0; print $x; a(); print $x }
09:45 p6eval alpha 30e0ed:  ( no output )
09:45 moritz_ alpha: sub a { state $x = 5; $x--; return if $x <= 0; print $x; a(); print $x }; a()
09:45 p6eval alpha 30e0ed: OUTPUT«43210000»
09:45 moritz_ perl 5 does the same
09:46 masak visualizations++ # http://everytimezone.com/
09:46 masak someone port that application to Rakudo and Web.pm :)
09:49 clintongormley joined #perl6
09:50 moritz_ looks like the client side JS is the most work
09:50 moritz_ the rest could even be a static HTML page
09:51 masak aye. maybe there won't be so much interesting DateTime math for Perl 6 to do, on second thought.
09:55 masak for some reason, I don't have any problem at all with the kind of nerd rage expressed in http://cpansearch.perl.org/src/PODMASTER/Acme-MJD-0.02/lib/Acme/MJD.pm
09:55 masak I guess that's because it's grounded in the expectation that people should think for themselves, not have the same opinions as someone.
09:56 masak they're meant to encourage free thinking, not conformity.
10:35 TimToady #11944 Yes, that's what it's supposed to do when you say that.
10:41 IllvilJa joined #perl6
10:56 M_o_C joined #perl6
10:59 pmurias joined #perl6
11:04 m6locks free thinking is overrated
11:09 Juerd m6locks: I'm not paying for that thought.
11:11 Alias joined #perl6
11:12 m6locks i hear ya
11:35 rv2733 joined #perl6
11:48 moritz_ jnthn++ # closing a ticket from 2008
11:49 jnthn I did the interpolation bits at the masakathon over easter, but only fixed the zen slices that the ticket used as an example yesterday so I could actually close it. :-)
11:49 jnthn (Ticket used zen slices in example.)
11:49 moritz_ I know
11:50 jnthn Need to do $dayjob bits now - accidentally the whole morning with unconciousness - but hope to get us hash slicing later on today. :-)
11:50 moritz_ o/
11:55 gabiruh joined #perl6
11:59 masak joined #perl6
11:59 * masak kinda likes the term 'masakathon' :)
12:00 masak let's have more of those.
12:00 masak jnthn: [backlog] yay, hash slicing later on today! \o/
12:00 moritz_ masak: sure... want to visit southern Germany? :-)
12:01 masak moritz_: at some point, sure!
12:02 moritz_ masak: we have a three room appartment and an internet connection... and pizza delivery, and pizza restaurants in walking distance :-)
12:02 moritz_ is there anything else one could need for a hackathon? :-)
12:03 masak don't think so :)
12:03 masak moritz_: right now all my moneu is sunk on air trips that might now even happen due to (!) volcanic ash.
12:03 masak s/moneu/money/
12:05 jnthn moritz_: beer!
12:05 jnthn moritz_: But since you're in the south of Germany, that's not a problem either ;-)
12:05 moritz_ :-)
12:05 jnthn (German beer)++
12:05 moritz_ masak: no hurry, you'll get fresh money from gsoc (if it works out) :-)
12:06 colomon :)
12:06 * jnthn readies his whip of GSoC mentoring
12:06 masak not only that, but I'd get to do something I want with Rakudo :)
12:06 masak jnthn: :)
12:06 * jnthn would really love to see those bits done in Rakudo too.
12:06 * colomon admits he'd prefer cider for hacking, and occasionally mixing in Chinese with the pizza.  ;)
12:06 masak jnthn: a whip? is that pent-up frustration over 600 RT tickets I sense? :P
12:06 envi^home joined #perl6
12:07 * masak is not a masakist in that sense
12:07 moritz_ colomon: downtown is 10 minutes away by bike => lots of asian food within reach
12:08 moritz_ and there's a very good Vietnamese restaurant, which is quite affordable at lunch time... */me becomes hungry*
12:12 colomon we're actually very well situated here for that sort of thing... two pizza places within a mile, and plenty of good asian foodw\i
12:12 colomon within two.
12:13 colomon should have a nice guest bedroom set up in another week or two. :)
12:13 moritz_ colomon: where are you located?
12:14 colomon good beer might be an issue, though, not sure what is readily available...
12:14 colomon Midland Michigan
12:14 * moritz_ isn't fueld by beer anyway
12:19 SmokeMachine joined #perl6
12:20 takadonet morning all
12:20 masak speaking of 'fueled by', maybe we should all pick up an old Perl 6 tradition, and make sure we have an entry here: http://svn.pugscode.org/pugs/VICTUALS
12:20 masak takadonet: \o
12:21 * masak does it to set an example
12:24 pugssvn r30395 | masak++ | [VICTUALS] I like rooibos and pancakes.
12:24 moritz_ oooh, pancakes
12:27 * jnthn glances the file and realizes that at least he won't be the first one to mention an alcoholic substance in the file. :-)
12:28 masak stand by for the exciting resolution as to which alcoholic beverage jnthn is actually referring to!
12:32 jnthn Borovička, of course... ;-)
12:32 jnthn Served alongside a plate of Bryndzové Halušky.
12:32 jnthn :-)
12:32 rgrau` HAI #perl6, I've just seen http://emerginglangs.com/ and thought that perl6 would be a good thing to add there.
12:34 jnthn .oO( Mmm...if I find a recepie and feta cheese, I could cook try to cook halušky tonight )
12:34 masak rgrau`: 'add' in which sense?
12:36 moritz_ probably doing a presentation there
12:36 rgrau` well, in the schedule, somewhere... lots of language designers talking about their projects, and I see perl6 nowhere :/
12:36 * moritz_ too far away
12:36 rgrau` yup
12:37 jnthn Wow. That looks like a really interesting conf.
12:37 * jnthn ain't so fussed about OSCON, but would probably enjoy that one.
12:49 * masak reads and listens to http://www.perl.com/pub/a/2000/10/23/soto2000.html
12:49 masak lots of very topical quotes in there.
12:49 masak "We are really jazzed about this. It is our belief that if Perl culture is designed right, Perl will be able to evolve into the language we need 20 years from now."
12:49 masak "Now, this is not going to happen quickly."
12:50 masak "we intend to proceed at the fastest speed at which we can efficiently propagate our cultural values to newcomers in our culture, but no faster"
12:52 CokeBot9000 masak: do you have a script that grabs the last N lines of log when you say "submits rakudobug" ? ^_^
12:54 moritz_ masak: do you happen to know if SVG.pm works with alpha?
12:54 moritz_ erm, master
12:55 pmichaud good morning, #perl6
12:55 moritz_ \o/ it's pmichaud!
12:56 pmichaud (emerging languages camp)  wonder if I should talk about nqp :-)
12:57 arnsholt The Perl 6/Parrot ecosystem would be a good addition, IMO
12:57 pmichaud well, Perl 6/Parrot has already received tons of coverage at OSCON in the past :)
12:57 pmichaud at least 3-4 presentations per conference
12:57 takadonet pmichaud: morning
12:58 pmichaud it would be interesting to see more languages _on_ Parrot.
12:58 pmichaud if only there was some sort of book that described how to write a languag.... oh, wait, that's me.  :-|
12:58 arnsholt True, true. I'm hacking away at that more languages thing, though =)
12:58 * moritz_ would be more interested to see more complete language implementations on parrot
12:59 CokeBot9000 pmichaud: morning!
12:59 moritz_ it's not only the "how many?", but also "how good are they?"
12:59 CokeBot9000 moritz_: Mine sucks!
12:59 moritz_ CokeBot9000: then go improve it!
13:00 jnthn o/ pmichaud
13:00 arnsholt I'm going to try to write up my experiences with NQP's grammars at some point. Prolog has some funky requirements that I need to figure out
13:00 colomon pmichaud: o/
13:00 pmichaud well, so far I hadn't been planning on attending oscon on mon/tue, but I might switch my schedule around a bit.
13:01 CokeBot9000 moritz_: my main problem at this point is that I don't speak enough perl6 yet. :P
13:01 moritz_ CokeBot9000: we're writing a book to help you with that :-)
13:01 betterworld joined #perl6
13:04 pugssvn r30396 | colomon++ | [VICTUALS] I like cider, Scotch, and buns.
13:06 CokeBot9000 what?
13:06 * CokeBot9000 is confused by that commit message. =-)
13:09 colomon not all at the same time.
13:09 colomon http://svn.pugscode.org/pugs/VICTUALS
13:09 colomon I blame masak.
13:10 CokeBot9000 moritz_: is there a preference on US vs UK spellings?
13:11 CokeBot9000 colomon++ # nice selection.
13:11 _jaldhar joined #perl6
13:19 * masak was pulled away by his professor who felt the need to explain, yet again, how screwed up and dog-eat-dog the academic world is
13:21 masak CokeBot9000: no, I am that script. I've thought about making a small app which pipes the last N lines of log into $EDITOR, but even that would give very little benefit compared to what I already do by hand.
13:21 masak moritz_: no idea, but probably not.
13:24 masak there's also some talk (in State of The Onion 2000) about 'working groups with meaningful charters and meaningful goals'. I'm too young to know what that referred to, maybe this: http://dev.perl.org/perl6/lists/historical.html
13:24 masak did that model ever work? it seems what we have now is much closer to controlled anarchy.
13:25 kcwu_ joined #perl6
13:26 * masak remembers looking at that VICTUALS file somewhere back in 2005, and deciding that he was far too fringe and lowly to add his entry there
13:26 colomon masak++
13:26 masak if anyone else had that thought today, get a grip and just add yourselves! :P
13:27 masak ooh, what do you know: perl6-language-datetime! :)
13:27 * masak reads the archives of that one
13:28 frettled_ joined #perl6
13:28 solarion_ joined #perl6
13:28 sorear_ joined #perl6
13:28 CokeBot9000 moritz_: ah, I see there's a spelllang in some files. wee.
13:30 M_o_C joined #perl6
13:30 rurban joined #perl6
13:30 rurban Hi! I''m tyring to update cygwin packages
13:31 rurban Last stable is #25? => Parrot revision r44954 required.
13:31 rurban That cannot be
13:32 rurban I see. that was #27 and #27 was not stable. #25 is stable, but fails to build for me.
13:32 justatheory_ joined #perl6
13:35 masak rurban: #25 was the last release from the old branch, now called 'alpha'.
13:36 pmichaud ...what is this "stable" of which you speak?
13:36 rurban rakudo-2010.02 says Parrot revision r44147 required (currently r0). rakudo-2010.03 says Parrot revision r44954 required (currently r0)
13:36 rurban I want to provide updated cygwin packages.
13:36 rurban So I need a match parrot for rakudo. And please no svn parrot releases.
13:37 pmichaud rakudo-2010.02 would work with Parrot revision 2.1.0
13:37 pmichaud rakudo-2010.03 would work with Parrot revision 2.2.0
13:37 rurban Should I try #27 on latest unstable parrot 2.2?
13:38 pmichaud if you mean "developer parrot 2.2", then yes.
13:39 pmichaud We don't have "stable" and "unstable" releases.
13:39 rurban Ok, will try that now.
13:39 rurban unpatched rakudo #25 /usr/bin/parrot.exe -o perl6_s1.pbc perl6.pir error:imcc:syntax error, unexpected '\n', expecting '(' in file 'perl6.pir' line 29
13:39 rurban (installed parrot-2.0.0)
13:39 rurban Or should I wait for the April release?
13:40 pmichaud since it's just next week, you might wait, yes.
13:41 rurban Unfortunately we didn't meet in Minneapolis, frozen-perl. I heard about your wife. I'm sorry
13:41 CokeBot9000 Does the version that needs parrot 2.2.0 fail the same way?
13:41 dalek book: b7aa7a8 | Coke++ | src/ (6 files):
13:41 dalek book: Various typos/grammar related cleanup.
13:41 dalek book: review: http://github.com/perl6/book/commit/b7aa7a80fe6a21adc856efbe864f55b9a28d944f
13:41 rurban just trying...
13:42 allbery_b joined #perl6
13:43 dakkar joined #perl6
13:45 ruoso joined #perl6
13:48 dalek joined #perl6
13:50 colomon just used @loops>>.points>>.perl>>.say; and it mostly worked...
13:53 colomon makes me think we need a metaop that can do something like >>.say but properly in-order...
13:53 pmichaud colomon: this was discussed a couple of weeks ago, iirc
13:53 * masak thinks that 'for' is enough
13:53 pmichaud and I think we decided it wasn't worth a metaop.  Instead it was .sayall
13:54 colomon pmichaud: I vaguely remember it, but I don't remember a result...
13:54 colomon .sayall ?
13:54 masak blech. :)
13:54 pmichaud @loops.sayall
13:54 pmichaud afk
13:54 masak it's optimal already. time to stop fiddling with it, methinks.
13:54 masak .say for @loops
14:01 moritz_ wasn't the conjectural each() junction the result?
14:01 colomon moritz_: ah, that sounds more familiar...
14:06 masak the State of the Onion 2000 transcript on perl.com was transcribed by someone who doesn't know programming terms. it took me a while to realize which programming language 'Cobalt' was. :)
14:08 colomon Wasn't that the programming language of the ancients on BSG?
14:08 colomon ;)
14:08 colomon Is there an easy way to get all the permutations of an array in p6?
14:09 masak besides writing a short sub? none that I've found.
14:09 jnthn Maybe something with the X operator
14:09 jnthn *meta-operator
14:09 * colomon is imagining something involving X, but that sounds ugly and likely to not work atm
14:09 colomon That's X, the op, not X comma.
14:10 iblechbot joined #perl6
14:11 moritz_ colomon: combinations are easy with X, but permutations are not
14:12 colomon yeah, just concluded that myself.
14:12 * colomon ponders stopping $work for a moment to ... crap, HOP is still in a box somewhere at my in-laws.
14:13 masak rakudo: sub infix:<mix>($v, @a) { map { @a[0..^$_], $v, @a[$_..*] }, ^@a }; multi perms(@a[]) { say "empty" }; multi perms(@a[$h, *@t]) { $h mix @t }; say perms([1,2,3,4]).perl
14:13 p6eval rakudo 78faa0: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
14:13 masak aww :)
14:14 masak that might work in theory, though :)
14:15 masak is it possible that 'Int' is too narrow a type for indexing?
14:15 masak of arrays, I mean.
14:15 jnthn I think so
14:15 colomon jnthn: I've been meaning to ask, what is up with the Mu's in there? (for instance, crops up all over.)
14:15 jnthn I mean, consider my $idx = prompt "Index? "; say @foo[$idx]
14:15 masak right.
14:16 colomon Rats are supposed to work as indices as well, I believe...
14:16 masak I agree that it needs to be coerced to an Int.
14:16 jnthn colomon: It should really be the type of the class that's defining it.
14:16 jnthn masak: Right, but at the moment it dispatches based on having an Int. I found that awkward.
14:16 jnthn I think that area needs some tweaks.
14:16 moritz_ the typical postcircumfix:<[ ]> probably has a signature like *@@a, or whatever that's called these days
14:16 masak **@a, I think.
14:17 * colomon is glad HOP is on-line....
14:17 moritz_ **@@a :-)
14:17 masak oo.OO
14:17 * colomon assumed moritz_ was joking, but is now afraid that might be real p6...
14:18 jnthn I think it's not. :-)
14:18 jnthn **@foo
14:18 jnthn is latest, iirc.
14:19 moritz_ colomon: I was
14:19 * colomon is relieved...
14:19 miyagikd joined #perl6
14:19 ejs joined #perl6
14:20 masak rakudo: multi foo($x) { "general" }; my &c; { &c = { foo(42) }; multi foo(Int $x) { "specific" } }; say c
14:20 p6eval rakudo 78faa0: OUTPUT«specific␤»
14:20 masak jnthn++
14:21 masak rakudo: multi foo($x) { "general" }; my &c; { &c = { foo(42) }; multi foo(Int $x) { "specific" } }; say c; say foo(42) # just to make it clearer
14:21 p6eval rakudo 78faa0: OUTPUT«specific␤general␤»
14:22 masak the more I think about subs having 'my' scope by default, the saner it feels. a while ago, I was slightly skeptical.
14:28 * jnthn is relieved that Rakudo is getting that stuff right now.
14:28 cognominal joined #perl6
14:33 arnsholt I agree that my scope makes a lot of sense
14:34 masak am I understanding the 'multi' and 'proto' keywords correctly in that they say "all subs with this name in this scope AND in all inner scopes not hidden by an 'only' routine, share the same name"?
14:34 arnsholt I'm probably going to spend some time screaming while getting used to it, but it does seem to be the right thing
14:34 rgrau joined #perl6
14:34 masak arnsholt: I've yet to be bitten by it in actual practice. but yeah, it'll probably happen.
14:34 arnsholt In particular, it makes exporting nice and explicit
14:35 jnthn masak: Sounds about right.
14:35 masak and it makes subs-in-subs much saner.
14:35 arnsholt Oooh. Excellent point, that
14:35 masak I remember some discussions about that about a year ago. pmichaud++ tried to figure out how it all fit together.
14:35 cognominal joined #perl6
14:35 masak there were some nontrivial horrors caused by subs being 'our' by default, IIRC.
14:35 arnsholt I can imagine
14:36 arnsholt In an unrelated note, I think I'm going to have to do something horrid in my grammar to parse Prolog operators
14:37 moritz_ masak: like being called before the surrounding lexical scope is initialized
14:37 arnsholt For example "X '=' foo." means the same as "X = foo." Whee.
14:38 masak PARROT_REVISION is at 45386, and I'm running 45704. I'm getting a LA error than the one in http://rt.perl.org/rt3/Ticket/Display.html?id=74410 , and I predict it'll happen when we bump PARROT_REVISION. just a heads-up.
14:38 masak moritz_: aye. ouch.
14:38 moritz_ '=' | \' ~ \' =
14:38 arnsholt Yeah. But it has to generalize to all operators, including the user-specified ones
14:39 jnthn masak: What do you get?
14:39 jnthn masak: Maybe a Parrot regression we should report.
14:39 arnsholt ATM I'm thinking of doing something with matching against an atom (all operators are valid atoms), and asserting that it is indeed an operator
14:39 moritz_ arnsholt: that's what Perl 6 meta operators also do
14:40 moritz_ erm, not that technique
14:40 arnsholt Yeah, but \' ~ \' <op> won't work for all the ops
14:40 masak jnthn: 'Cannot substr on a null string' in perl6;Any;substr
14:40 arnsholt The \/ operator is '\\/' when quoted, for example
14:41 moritz_ \\o/
14:41 arnsholt Yeah. Tenatcular, tentacular? =)
14:41 jnthn masak: Oh.
14:42 jnthn That does sound a tad schiese.
14:43 masak even the future has work to do! :)
14:49 TimToady std: 1 [+] 2
14:49 p6eval std 30396: OUTPUT«ok 00:01 109m␤»
14:49 TimToady std: 1 [[[+]]] 2
14:49 p6eval std 30396: OUTPUT«ok 00:01 107m␤»
14:50 masak jnthn: actually, the rest of the backtrace might be of interest too: http://gist.github.com/368502
14:50 masak looks like code you might have written :)
14:52 alester joined #perl6
14:53 masak looks like it's coming from line 42 in src/core/Signatures.pm
14:57 TimToady how often is the perl6.org page supposed to update?  the STD.pm -> pm6 change hasn't propagated yet, seemingly
14:59 rurban same rakudo-2010.03 eror with parrot-2.2: /usr/bin/parrot.exe  -o src/gen/perl6.pbc src/Perl6/Compiler.pir error:imcc:syntax error, unexpected '\n', expecting '(' in file 'src/Perl6/Compiler.pir' line 25
14:59 jnthn rurban: Probably means dynops are messed up.
14:59 jnthn rurban: cygwin?
15:00 rurban yes
15:00 jnthn oh, cygwin is just a pile of annoyane.
15:00 jnthn *annoyance
15:00 masak rakudo: class A { class B {} }; A::B.new # this should work, shouldn't it?
15:00 jnthn But it's almost certainly a linking issue or something with the dynops library.
15:00 p6eval rakudo 78faa0: OUTPUT«Can not find sub A::B␤current instr.: 'perl6;Perl6Exception;throw' pc 14818 (src/builtins/Seq.pir:41)␤»
15:00 rurban how messed up? everything is binary. no crlf
15:00 masak alpha: class A { class B {} }; say A::B.new
15:00 p6eval alpha 30e0ed: OUTPUT«A::B()<0x2b1501b2e3e0>␤»
15:00 jnthn rurban: As in, the dynops ain't build properly.
15:01 rurban From an installed parrot if that matters
15:01 * masak submits rakuodbug
15:01 rurban I see. I'll check
15:01 rurban I don't trust an installed parrot anyway.
15:02 [particle] http://www.telegraph.co.uk/news/worldnews/europe/croatia/7583971/Croatian-teenager-wakes-from-coma-speaking-fluent-German.html
15:02 [particle] i wonder if i'll wake up speaking fluent perl 6 some day
15:02 rurban watching German TV creates wonders :)
15:03 TimToady last I checked, cygwin was still in complete denial on the subject of Unicode
15:03 rurban Unicode you think? I used icu just fine all the time
15:03 masak http://en.wikipedia.org/wiki/Foreign_accent_syndrome
15:03 TimToady I mean in the tools
15:03 rurban LC and LANG is now also honored
15:04 TimToady good, sounds like progress, finally
15:04 TimToady about, oh, ten years late...
15:04 rurban yep. we have now finally all the wchar API in newlib
15:05 rurban we do not use glibc neither the msvcrt for both political reasons
15:05 * TimToady nods as if he understands politics
15:06 meppl joined #perl6
15:07 diakopter rurban: I'm curious as to your opinion toward mingw/msys
15:07 colomon rakudo: my @a = 1..10; @a.splice(3, 2); say @a
15:07 p6eval rakudo 78faa0: OUTPUT«123678910␤»
15:07 colomon rakudo: my @a = 1..10; @a.splice(0, 1); say @a
15:07 p6eval rakudo 78faa0: OUTPUT«2345678910␤»
15:07 rurban yes?
15:08 rurban It's faster and has a lousy API
15:08 diakopter rurban: also, while you're here, I wanted to tell you that a very recent B::C dies on trying to compile Larry's Perl 6 frontend (STD.pm)
15:08 rurban "For limited usage"
15:08 rurban Yes. I know. Thanks
15:09 diakopter ok; maybe you saw my tweet about it
15:09 rurban I'm writing now some B::C docs about the internals. so that other can understand it also
15:09 rurban others
15:10 rurban But I got Moose compiling, just MooseX::types not yet
15:11 nihiliad joined #perl6
15:12 jnthn For Rakudo, there's no reall reason to use cygwin or msys, imo. There's free versions of the MS C++ compiler available, you don't have to deal with abstraction layers and so forth, and it's a platform that Rakudo gets actively developed on.
15:12 colomon splice is failing in my code, with "No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'" :\
15:12 rurban But if you want more libs you can only use cygwin
15:12 diakopter jnthn: unless one already uses cygwin.
15:13 jnthn Well, there is that.
15:13 colomon rakudo: my @a = 1..10; say @a.PARROT; @a.splice(0, 1); say @a
15:13 p6eval rakudo 78faa0: OUTPUT«Array␤2345678910␤»
15:18 colomon rakudo: my @a = 'a'..'g'; say @a.PARROT; @a.splice(0,1); say @a;
15:18 p6eval rakudo 78faa0: OUTPUT«Array␤bcdefg␤»
15:20 colomon rakudo: sub foo(@items is copy) { @items.splice(0, 1); say @items; }; my @items = 'a'..'g'; foo(@items);
15:20 p6eval rakudo 78faa0: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
15:20 colomon bingo
15:20 colomon bug?
15:21 jnthn huh, wtf.
15:21 jnthn Yes, I think bug.
15:21 jnthn is copy fail maybe?
15:21 pmichaud that'd be my guess.
15:21 colomon is copy fail of some sort, it seems.
15:22 jnthn Weird.
15:23 rurban I strace'd Compiler and saw no single occurence to load ./src/ops/perl6_ops.dll
15:23 colomon rakudo: sub foo(@items is copy) { @items[0] = 'z'; say @items; }; my @items = 'a'..'g'; foo(@items); say @items;
15:23 p6eval rakudo 78faa0: OUTPUT«zbcdefg␤abcdefg␤»
15:24 colomon So is copy basically works, but somehow leaves @items in a state where you cannot splice it.
15:24 colomon rakudo: sub foo(@items is copy) { @items[0..^1] = 'z'; say @items; }; my @items = 'a'..'g'; foo(@items); say @items;
15:24 p6eval rakudo 78faa0: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
15:24 colomon rakudo: sub foo(@items is copy) { say @items[0..^1]; say @items; }; my @items = 'a'..'g'; foo(@items); say @items;
15:24 p6eval rakudo 78faa0: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
15:25 colomon There you go.
15:25 masak rakudobug?
15:25 pmichaud rakudo: sub foo(@items is copy) { say @items.PARROT; };  my @items = 'a'..'g';  foo(@items);
15:25 p6eval rakudo 78faa0: OUTPUT«Array␤»
15:25 colomon masak: totally.
15:25 * masak submits
15:25 pmichaud rakudo: sub foo(@items is copy) { say PARROT(@items); };  my @items = 'a'..'g';  foo(@items);
15:25 p6eval rakudo 78faa0: OUTPUT«ObjectRef->Array␤»
15:25 colomon masak++
15:26 jnthn rakudo: sub foo(@items is rw) { say @items[0..^1]; say @items; }; my @items = 'a'..'g'; foo(@items); say @items;
15:26 p6eval rakudo 78faa0: OUTPUT«a␤abcdefg␤abcdefg␤»
15:27 pmichaud that "ObjectRef->Array" seems suspect.
15:27 jnthn yeah, moze byt
15:27 jnthn Perhaps a binder tweak is needed.
15:28 rurban Stupid error: the dynops builder still does not chmod +x the dynops/*.so,dll
15:28 rurban Not it works
15:28 rurban Now it works, sorry
15:29 CokeBot9000 ah, yah, that's all over the parrot makefile.
15:29 rurban Haven't I've fixed ages ago? I think so
15:29 CokeBot9000 I'd like for it to be be more automatic in the generated makefile so folks writing languages don't have to worry about it.
15:30 CokeBot9000 right, it should be fine in parrot, but I expect any HLLs using dynops to have this problem.
15:30 CokeBot9000 rurban++
15:33 rurban Makefile.in has very suspicious lines also (emacs refuses to save, no tabs, ...)
15:34 rurban $(DYNEXT_TARGET): $(DYNPMC) $(DYNOPS)
15:34 rurban $(CP) $(DYNPMC) $(DYNOPS) $(DYNEXT_DIR)
15:34 rurban $(CHMOD) 755 $(DYNEXT_TARGET)
15:36 CokeBot9000 ... it's chmoding the original but not the copy?
15:37 rurban I dont think so
15:38 rurban where's the rakudo tracker?
15:38 pmichaud rakudobug@perl.org iirc
15:39 pmichaud or rt.perl.org
15:39 moritz_ ask masak, he should know :-)
15:39 moritz_ rakudobug is correct for submissions
15:41 masak it's perl.org
15:41 masak though I just type 'r' in Gmail and it gives me the right recipient :(
15:42 masak s/:\(/:)/
15:43 rurban Oh no. My Maiefile.in patch does not work.
15:43 Trashlord joined #perl6
15:45 MAK_ joined #perl6
15:47 pugssvn r30397 | lwall++ | Add a temporary STD.pm file directing people to STD.pm6
15:49 MAK_ left #perl6
15:52 rurban ExtUtils::Command -e cp removes the -x bit !!! aarg
15:53 masak http://gist.github.com/368600 # cute script to list all numbers that can be written as the sum of two squares in three or more ways
15:53 rurban Was this some Kennedy?
15:54 jnthn masak: söt!
15:54 masak :)
15:55 moritz_ masak: is that a Project Euler problem? :-)
15:56 TimToady issq really, really, really wants to be memoized...
15:56 masak TimToady: I'll try it that way.
15:57 TimToady can fake it with @sq[$n] //= I suspect
15:57 masak moritz_: I don't know. I replied to a gentletwitterer. http://twitter.com/carlmasak/status/12290098806
15:57 masak takadonet: aye.
15:57 takadonet masak: yes???
15:57 TimToady tcf
15:58 masak takadonet: sorry, what was the question?
15:58 TimToady TCF!!!
15:58 takadonet masak: I had a question? ...
15:58 * takadonet backlogging...
15:58 * masak confusedly seeks shelter under the acronym finder
15:58 moritz_ Thank Christ its Friday?
15:58 TimToady I understand you used to coach a baseball team...
15:58 justatheory joined #perl6
15:58 masak Trillion Cubic Feet?
15:59 TimToady Tab Completion Fail
15:59 masak ah.
15:59 ilogger2 joined #perl6
15:59 masak well, that totally ruins the suspense :)
15:59 takadonet masak: I have not ask a question since yesterday and you already answered it :)
15:59 TimToady horrors
16:00 masak takadonet: sorry, I mas-tabcompleted you instead of TCFToday.
16:00 takadonet masak:np
16:00 masak the confusion is all mine.
16:01 TimToady we should memoize all acronyms
16:01 rurban The rakudo-201003-1 cygwin package is now ready. I'll test it a bit more and upload it later.
16:01 TimToady rurban++
16:02 rurban First I have to wrangle Randy Kobes for ExtUtils-Command cp
16:02 TimToady masak: oh, wait, rakudo doesn't autoviv yet, so my idiom won't work...
16:03 TimToady hmm, maybe it doesn't need autoviv
16:03 masak don't think so.
16:03 * TimToady should drink more coffee while he's behind.
16:03 masak benchmarking now.
16:04 nihiliad joined #perl6
16:04 TimToady we'll probably just discover how slow rakudo's indexing is  :)
16:04 masak let's not speculate :)
16:05 * TimToady hides his speculum.
16:09 masak I ran all numbers up to 1000: without the array: 47s. with the array 53s.
16:09 masak but I had to put the //= inside the sub, since putting it outside produced a behaviour I couldn't relate to.
16:09 masak investigating it now to see whether it is a bug.
16:10 rurban [cpan #56666] for cygwin cp -x
16:10 masak guess this only shows that array lookup is slower than two sqrt and a floor.
16:10 justatheory joined #perl6
16:11 jnthn two sqrt and a floor ain't going to be that expensive...
16:11 moritz_ sounds almost like a poem
16:11 moritz_ a dozen, an index and a floor
16:11 moritz_ come to a bar, knock at the door...
16:12 * moritz_ has no poetry skill
16:12 rurban make install: and who's copies the docs and where's the man?
16:12 rurban sigh
16:12 masak "I looked at your array lookup and said 'it's more expensive than two sqrts and a gloor...'"
16:13 masak s/gloor/floor/
16:13 * PerlJam is listening to a talk from a LIDAR guy from JPL
16:13 PerlJam excuse me, he's in the "active optics" department.
16:15 * masak gets bitten by having too many meanings for $_ in the same statement
16:15 masak folks, don't do 'take $_' inside an if inside a given. it probably won't do what you want. :P
16:16 PerlJam masak: or just remember to use -> $foo liberally rather than relying so much on $_
16:16 TimToady well, not if you meant OUTER::OUTER::<$_>
16:17 masak PerlJam: can't do -> in statement modifiers.
16:17 TimToady maybe we should have "it", "this", "that", "yonder"
16:18 masak TimToady: you've been talking too much to lue lately :)
16:18 PerlJam masak: oh, then ... don't use statement modifiers so much!  :)
16:18 masak PerlJam: now there's a wise word :)
16:18 masak fwiw, the suspected bug wasn't a bug, just an 1D10T error.
16:19 masak but doing it right (and thus avoiding the call as well) didn't speed things up either.
16:20 TimToady the parrot is still slothful at times
16:20 PerlJam at times?
16:21 CokeBot9000 hey, what happened to hug everybody? :P
16:21 [particle] CokeBot9000++
16:22 moritz_ hugme: hug everybody
16:22 * hugme hugs everybody
16:23 masak http://www.pbfcomics.com/?cid=PBF115-Hug_Bot.jpg
16:23 TimToady hugme: hug Parrot harder to try to squeeze out a bit more performance.
16:23 hugme TimToady:
16:24 [particle] bugme--
16:24 masak being one of the lead Yapsi developers, I believe putting Perl 6 on a pure Perl 6 foundation will solve all our efficiency problems :P
16:24 TimToady hugme: hug Parrot harder to try to squeeze out a bit more performance.
16:24 * hugme hugs Parrot harder to try to squeeze out a bit more performance.
16:25 masak my god, it's full of nbsps!
16:25 moritz_ masak: it will resolve all of your performance, yes
16:25 masak moritz_: "performance efficient" :)
16:25 [particle] dark matter
16:26 TimToady it will achieve perfect laziness, and you will achieve perfect impatience
16:26 [particle] does anyone else see the hubris here?
16:26 masak not until that too reaches perfection :)
16:26 TimToady it's between the lines
16:27 ruoso jokes aside, I still think we would need to have a Perl 6 implementation of every Perl 6 type, including the native ones, in order to support the actual Perl 6 semantics
16:27 masak *nod*
16:27 TimToady we need a software CPU!!!
16:28 TimToady and software bits
16:28 [particle] i've got soft bits.
16:28 * moritz_ doesn't want to hear details
16:28 ruoso it probably means we need to define some subsets of Perl 6 that could be compiled down to C directly
16:28 * jnthn is far from convinced. Everything should act like it's a Perl 6 thingy, but if it's guts are written in something else, so what.
16:29 TimToady what if you ask it to spill its guts?
16:29 [particle] seppuku?
16:29 masak I'll probably experiment with a Yapsi runtime written in C at some point. it won't have the tight integration to the compiler that I expect the Perl 6 one to have, but it'll be fast :)
16:30 TimToady actually, if the gut spiller lies and says what the Perl 6 code *would* look like, all we have to do is decompile the guts to get the pure Perl 6 implementation
16:30 ruoso maybe a "native int { ... }" package declarator
16:30 jnthn Yes, but what that means / compiles down to is up to the runtime.
16:30 TimToady where did I put my circularity unsaw....
16:31 [particle] i named mine humpty
16:31 jnthn Anyway, while I agree that writing as much as possible - or even all - in Perl 6 is a nice goal, it's probably post 6.0.
16:31 masak I've been thinking of how to implement infix:<+> in Yapsi. the best I can come up with is sub infix:<+>($a, $b) { #`( doing internal stuff here, don't look ) }
16:32 [particle] masak: call the + method on $a :P
16:32 masak [particle]: argh! :)
16:32 TimToady then call it on $b, and see if you get the same answer
16:32 masak :D
16:32 TimToady if not, average them
16:33 ruoso or multiply..
16:33 [particle] ooh, self-correcting increment
16:33 * ruoso remembers of a dilbert cartoon
16:33 [particle] that's dwidmy
16:33 jnthn masak: That's kinda what pir::foo is in Rakudo.
16:33 jnthn masak: I increasingly thing of it as vm::foo
16:33 jnthn *think
16:33 masak jnthn: yeah.
16:34 TimToady so 1+"2" would turn into, lessee, (3 + 21) / 2 == 12
16:34 PerlJam jnthn: just last night I was contemplating writing something like vm::foo that would abstract pir::foo out  :)
16:34 masak jnthn: the issue gets raised because we'll have to show something in our class navigator (coming soon(TM))
16:35 TimToady (if Perl were a language that overloaded + to mean cat)
16:35 [particle] you've trademarked 'soon'?
16:35 masak TimToady: only if the '+' method on strings did concat. eww! :)
16:35 masak [particle]: no, but I will. soon(TM).
16:35 [particle] only pythoncatcat is crazy enough to do that
16:36 [particle] s/only//
16:37 rurban yes, rakudo looks fine now. I'll post missing docs and man patches also
16:37 masak and if you go visit the Lambdacats over at Y combinator, they stare at you for not treating strings as lists.
16:37 masak a blog post of mine talking about reverse/flip/invert ended up there, and got comments on the order of "that's just insane".
16:38 TimToady yes, most FPers think mere mortals are insane
16:39 * diakopter awakens to an odd Friday on irc
16:39 TimToady and most quantum physicists think that chemists are insane
16:40 diakopter I guess I was awake earlier too.  wait, was that I?
16:44 masak rakudo: class A {}; class B { method foo(A $foo:) { say $foo.WHAT } }; B.new.foo
16:44 p6eval rakudo 78faa0: OUTPUT«B()␤»
16:44 masak jnthn: can I submit this as a rakudobug?
16:44 TimToady the reductionists will (by definition) generally try to denigrate the importance of classifying and naming the emergent properties of larger systems
16:45 jnthn masak: Probably is one...
16:45 jnthn masak: Think we've seen it before...the nominal type isn't enforced for the invocant.
16:46 jnthn But don't recall seeing a ticket to go with it.
16:46 masak I can look for it in RT before I submit.
16:46 masak for some reason, I often guess a word in the RT ticket subjects right :)
16:47 masak this one is similar enough, I think: http://rt.perl.org/rt3/Ticket/Display.html?id=71476
16:47 jnthn Well
16:48 jnthn You are allowed to type the invocant parameter
16:48 jnthn It's just that Rakudo doesn't actual enforce it
16:48 masak sure!
16:48 jnthn I forget why.
16:48 jnthn The ticket seems to suggest you can't though.
16:48 masak oh
16:48 * masak looks again
16:48 jnthn "Perhaps a compile-time error
16:48 jnthn saying that the user is not to type the invocant parameter, or else.@
16:48 TimToady what if the method is exported?
16:49 masak jnthn: I'll just add this conversation as a comment to that bug.
16:49 masak and maybe change its subject.
16:49 moritz_ "this ticket now says the opposite of what it said before"
16:50 jnthn TimToady: What about that?
16:50 TimToady the sig of the exported function has to let the old invocant particpate in multi dispatch with its type
16:51 jnthn I think if you override the invocant type, the sig of the exported function is whatever you said it is.
16:51 TimToady exporting is one of the reasons we say that methods are just subs if you rub them hard enough
16:51 jnthn Sure, I don't see the difficulty here though.
16:51 TimToady jnthn: that's what I'd expect
16:51 TimToady but if not specced, is already the type of the class
16:51 jnthn Oh, maybe I was unclear. When I said Rakudo didn't do it, my point was that it doesn't but should.
16:51 jnthn Rather than it never should. :)
16:52 TimToady that is, the default nominal type is $?CLASS or whatever
16:52 jnthn Right, that's what I expected.
16:52 jnthn It's been on my "to fix" list for a little bit. :-)
16:52 TimToady nodnodnod
16:53 * TimToady falls asleep
16:53 * TimToady sleepwalks to the coffee machine
17:05 masak food &
17:07 Trashlord joined #perl6
17:08 PerlJam I wish I could understand why understand is so elusive
17:08 PerlJam er, s:2nd/<after understand>/ing/
17:09 TimToady so I wish I could elude my elusive understanding...
17:10 PerlJam I just watched this guy talk about his 30Hz flash LIDAR system and it all made perfect sense.  I was even able to help him answer a couple of questions that other people asked.
17:11 PerlJam But looking at rakudo's guts ...  some things just resist my understanding.
17:11 moritz_ PerlJam: the key is not to read them top to bottom
17:11 moritz_ just try to understand how one particular thing is done works better, IME
17:12 TimToady slices, aka cross-sections
17:12 PerlJam moritz_: apparently I always pick the one thing that's hard :)
17:12 TimToady the stem-to-stern approach only works if you can keep everything in your head unanalyzed
17:13 TimToady and I rather suspect Parrot has gotten too big for any one person to hold in their head
17:13 moritz_ oh, it's not just parrot
17:13 jnthn Rakudo itself is just about the same.
17:14 moritz_ it's also NQP, these PAST:: nodes...
17:14 * diakopter happens to excel at unanalyzed working set
17:14 pausenclown joined #perl6
17:15 TimToady but this is one reason why a compiler team of N people will tend to end up with an N-pass compiler
17:15 TimToady which leads me to believe that C# has about 50 people :)
17:15 PerlJam wait ... how many people are on the rakudo team?  :)
17:16 dual joined #perl6
17:17 TimToady bbl &
17:17 diakopter everyone around me at $work today is very reflective.
17:17 diakopter also on irc.
17:17 diakopter odd.
17:17 jnthn Maybe there's something in the air.
17:17 PerlJam we're all mirrors
17:17 jnthn ...well, there certainly is over Europe. ;-)
17:17 * pausenclown thinks he needs to do several passed too, in order to get DTD's parsed right
17:18 pausenclown *passes
17:23 pmurias joined #perl6
17:29 molaf joined #perl6
17:38 alester joined #perl6
17:53 * TimToady thinks jnthn can't tell the difference between smoke and mirrors....
17:54 pmurias joined #perl6
17:55 jnthn I can't see my mirror for all the volcanic smoke!
17:59 TimToady you should have thought about that before you moved closer to Iceland
18:00 pausenclown yeah, yeah. a little dust and the whole air trave collapses.
18:00 pausenclown noobs.
18:00 colomon btw, permute (http://justrakudoit.wordpress.com/2010/04/16/permutations/) did the trick for $work.  \o/
18:03 alester joined #perl6
18:04 kerframil joined #perl6
18:04 rurban Just released 7+4 new packages. Off to beer now... Bye!
18:04 jnthn rurban: Nice! Happy beering!
18:05 jnthn colomon: Good post. Other option (core vs implement it yourself) is to put it into a module. ;-)
18:06 TimToady or into a core module  :)
18:06 jnthn Huh...what's a core module... :-P
18:06 TimToady a module that wishes it were in core
18:07 TimToady but has been repeatedly snubbed for being fundamental rather than important :)
18:08 pausenclown speaking of modules, someone got more insight in cpan6 than "The first release of the CPAN6/Pause6 modules is planned for April 2010."?
18:09 TimToady we just have to find some way of requiring its use in the compiler for it to be both fundamental and important
18:09 rokoteko joined #perl6
18:10 TimToady "Unrecognized identifier 'sprixel' seen at line 42; did you mean its anagram 'perlsix'?"
18:10 colomon permute is lovely for exhaustive testing.  ;)
18:10 rokoteko howdi. anyone mind telling me would this be absolutely silly, or brilliant? (quoted from #perl) http://erxz.com/pb/24807
18:10 TimToady looks like spam
18:11 TimToady rokoteko: can you be more specific before I visit a strange url?
18:12 rokoteko TimToady: well. what I discussed is in the paste. any reason why I should repeat it on the channel before someone reads it?
18:12 TimToady no, just checking to see if you're human.  :)
18:12 TimToady I didn't recognize it as a known pastbot, is all
18:13 TimToady and people have been cracking security lately by human engineering redirects on tinyurl sites
18:13 rokoteko so now you think Im a human? brilliant. Ill share this info.
18:14 rokoteko (with other non-humans)
18:14 TimToady yer welcome, but of course, the rest of us here are also bots, y'know
18:14 bkeeler_ joined #perl6
18:14 CokeBot9000 . o O (we should get timtoady a necoro)
18:15 rokoteko anyhow, no-one has yet told me this is idea is absolutely bad. so perljam adviced me to share it #here.
18:15 TimToady reading
18:17 CokeBot9000 see, I thought you had already read it and said that the thing in the nopaste looked like spam.
18:18 TimToady we tend to use zen slices for that already
18:18 TimToady $array[] and $haash{}
18:18 TimToady since people are already used to looking for the bracket dereferencers on that end
18:18 CokeBot9000 mmm, haaaaaash.
18:19 stephenlb joined #perl6
18:20 rokoteko TimToady: so *scalar{ARRAY}, *scalar{HASH}  .. is better than $scalar:@, $scalar:% ?
18:20 rokoteko TimToady: did you read the whole thing?
18:21 REPLeffect joined #perl6
18:25 dual_ joined #perl6
18:32 Kyril joined #perl6
18:34 [particle] rokoteko: in perl 6 there are no globs
18:34 [particle] so there's no built-in construct like perl5's *foo{HASH}
18:35 rokoteko [particle]: what are there? why not to have the identifiers at the beginning, and/or the end of the variable name instead of only at the beginning?
18:35 [particle] if you like, you can create your own syntax based on perl 6 standard syntax, by modifying the grammar in a 'slang' (roughly short for sublanguage)
18:36 rokoteko Ah. but I dont want to do that, mayb  after 10-30 years when I got more experience.
18:36 rokoteko I was just throwing out this idea.
18:36 [particle] so, you're free to modify your perl 6 programs to use a variant of the standard perl 6 grammar (currently in http://svn.pugscode.org/pugs/src/perl6/STD.pm6)
18:37 rokoteko about how human brain inteprets words and as I see perl was supposed to work.
18:37 rokoteko but ok. thank you for this. :)
18:37 [particle] sigils are on the front of variables to keep all that syntax about typing in one place
18:37 rokoteko I was mainly thinking is this completely silly or not. it made sense to me.
18:37 rokoteko thanks :)
18:37 rokoteko left #perl6
18:38 [particle] a little learning is a dangerous thing.
18:57 plobsing joined #perl6
19:18 chromatic joined #perl6
19:19 chromatic seen jnthn
19:20 chromatic Your bots are strange and different.
19:20 jnthn I saw him earlier in a mirror.
19:20 CokeBot9000 ?@bots.seen(:jnthn)
19:21 PerlJam jnthn: through the smoke?
19:21 jnthn Yeah...it was a bit hazy...but I'm pretty sure it was him.
19:21 jnthn Had the multi-colored beard and all.
19:22 chromatic jnthn, I'm having some trouble with the binder trying to update Rakudo for immutable Parrot strings.  If I paste a patch to get Rakudo building against the branch, can you look into it?
19:23 jnthn Sure. Parrot branch name is?
19:23 jnthn .oO( oh no, svn...I can't just git checkout branchname :-/ )
19:24 chromatic immutable_strings_part1
19:24 chromatic http://gist.github.com/368832
19:25 jnthn chromatic: This should give us some performance win?
19:26 * jnthn is checking out the branch now.
19:27 chromatic Without (much) tuning, it gave a 5% improvement building Rakudo.
19:27 chromatic With some GC tuning, another 5% is within reach.
19:27 jnthn That's nice to have.
19:27 fda314925 joined #perl6
19:27 chromatic Another 3-4% may be possible if we give you a better way to handle string_from_literal().
19:30 chromatic I also experimented with a function to ask "Is this substring contained within another string, starting at this offset?" to create fewer temporary strings.  Without Rakudo passing its tests, I couldn't measure that, but it seemed like an improvement in the binder for sigil and twigil checking.
19:31 colomon joined #perl6
19:33 jnthn chromatic: It may but that's not a hot-path.
19:33 chromatic Yeah, I noticed that too.
19:34 jnthn It only impacts you on the first call to something.
19:34 chromatic If you have a lot of call sites and the ratio of sites to calls is high, it may be worthwhile... but I can't imagine such a program.
19:37 jnthn chromatic: I get a build failure with the patch you pasted.
19:37 jnthn bind.obj : error LNK2001: unresolved external symbol _Parrot_str_append
19:37 chromatic Are you building against a Parrot from the immutable strings branch?
19:38 jnthn Yes.
19:38 chromatic We changed a couple of C function signatures, so the headers need to match.  That caught me a couple of times.
19:38 [particle] it probably needs PARROT_API or PARROT_EXPORT
19:38 jnthn I just checked out the branch, built/installed it, and have re-built Rakudo against it.
19:38 [particle] typical nmake
19:38 [particle] er, cl error
19:38 jnthn Was Parrot_str_append not going to be renamed to Parrot_str_concat?
19:38 chromatic I don't believe we did that yet.
19:39 jnthn s/append/concat/ in bind.c gets me through that, and it flags up another append in another place
19:40 chromatic You're right.  Sorry about that.
19:40 jnthn Done those, we get to building the setting now. This'll take the usual bit of time. :-)
19:41 * jnthn cleans the kitchen a bit from the halusky making while it does so
19:41 chromatic I see a runtime error that looks like it comes from Mu's say(), where it gets two params and expects one.
19:44 jnthn ouch, I fail the build.
19:44 jnthn C:\Consulting\rakudo\parrot_install\bin\pbc_to_exe.exe perl6.pbc
19:44 jnthn akudoparrot_install/lib/2.2.0-devel/include/config.fpmc' : Unknown error
19:44 jnthn current instr.: '_config' pc -1 ((unknown file):-1)
19:44 jnthn called from Sub 'handle_args' pc 161 (tools/dev/pbc_to_exe.pir:135)
19:44 jnthn called from Sub 'main' pc -1 ((unknown file):-1)
19:45 jnthn Anyway, I can run the .pbc
19:45 jnthn Oh, I think giving Configure.pl a --prefix=... with backslashes in screws it up.
19:45 jnthn (Parrot's Configure.pl)
19:45 jnthn Anyway, I see the same runtime error.
19:46 chromatic The one you pasted or the one I paraphrased?
19:46 jnthn The one you paraphased
19:46 jnthn The one I pasted is a build-time error
19:46 jnthn in pbc_to_exe
19:46 jnthn But the PBC is fine
19:46 chromatic Too many positional parameters passed; got 2 but expected 1
19:46 chromatic current instr.: 'perl6;Mu;say' pc 360749 (src/gen/core.pir:26361)
19:46 jnthn I think it's nothing to do with the branch.
19:46 jnthn Yup
19:47 jnthn $*OUT.say(42) gives the same error.
19:47 jnthn That's a clue.
19:47 chromatic I did some tracing and ended up finding that Parrot_binding_bind_signature returned a true value for bind_error.
19:48 jnthn I'm increasingly sceptical that the binder is the problem.
19:48 jnthn Sure it throws the error.
19:48 chromatic That's what I thought too.
19:48 jnthn Yeah, I think it's not the binder after all...
19:48 Chillance joined #perl6
19:48 jnthn ah, this is telling.
19:48 chromatic FWIW, it's the /* Do we have any left-over args? */ conditional that failed in the binder, whatever else went weird.
19:48 jnthn > die $*OUT.WHAT
19:48 jnthn Failure()
19:49 jnthn So $*OUT is not getting set up properly. That means that the call goes to Mu.say rather than IO.say
19:49 jnthn And that doesn't expect any arguments.
19:49 chromatic Ah, and that's the source of the second parameter.
19:49 jnthn So the binder is correct.
19:49 Chillance joined #perl6
19:49 jnthn But the thing we're calling is wrong.
19:50 jnthn Well, the thing we're calling a method on is wrong.
19:50 diakopter bzzt
19:51 chromatic How do we find out what we think we're calling a method on?
19:51 jnthn I pasted it above
19:51 jnthn It's the Failure() thingy
19:52 chromatic I mean "What isn't getting found and makes the Failure?"
19:52 jnthn $*OUT
19:52 jnthn It should get set up by an INIT block.
19:52 chromatic Yes, but why isn't $*OUT there?  Is it getting misparsed?  Is it not getting stored correctly?  Is the twigil not getting stripped off?
19:53 jnthn No idea.
19:53 jnthn The bit of code doing it is PIR though.
19:53 jnthn $P0 = getstdout
19:53 jnthn $P0.'encoding'('utf8')
19:53 jnthn $P0 = IO.'new'('PIO'=>$P0)
19:53 jnthn set_hll_global ['PROCESS'], '$OUT', $P0
19:53 jnthn Let me check if it's actually getting run, first of all.
19:53 chromatic Right.
19:55 jnthn Building something with some say's in now to see if it sheds any light on it.
19:55 jnthn Also will check the contextual name it goes looking for.
19:55 jnthn ah
19:55 jnthn That code does a:
19:55 jnthn substr pkgname, 1, 1, ''
19:56 jnthn That looks like something that could feasibly have gotten busted in the immutable strings branch.
19:56 pmichaud good afternoon, #perl6
19:56 jnthn oh hai, pmichaud
19:57 chromatic I'll check that op in Parrot.
19:57 PerlJam greets Pm
19:57 * moritz_ smells missing test coverage
19:57 jnthn chromatic: The init code is indeed being run and looks to be working.
19:57 pmichaud (vm::foo)   actually, I've been thinking of nqp::foo
19:58 jnthn pmichaud: ...because? :-)
19:58 jnthn pmichaud: Could work though.
19:58 jnthn :-)
19:58 pmichaud that way nqp can define common operations and do translation to whatever the lower-level vm provides
19:58 jnthn You thinking that nqp ...ah.
19:58 jnthn I like that.
19:59 jnthn chromatic: Also doing some before/after say statements for that.
19:59 pmichaud also, the existing rakudo code seems to have a lot of   pir::opcode__XYZ   where the __XYZ is really not needed (and thus shouldn't be there)
19:59 chromatic I'm testing a rewrite of those two PIR statements in Rakudo.  The clone should be unnecessary.
19:59 pmichaud plus there's a lot of places where people have put in uppercase register types
20:00 jnthn # before $*OUT
20:00 jnthn # after $OUT
20:00 PerlJam pmichaud: and there's lots of Q:PIR too
20:00 jnthn Hmm, that doesn't look wrong.
20:02 chromatic My fix didn't do much either.
20:02 chromatic The --target=PIR also has     $P23 = "!find_contextual"("$*OUT")
20:02 jnthn That's fine.
20:02 jnthn It's meant to.
20:03 jnthn It's in !find_contextual that we strip the * out.
20:03 chromatic $*OUT is correct there, I mean.
20:04 tylerni7 joined #perl6
20:04 tylerni7 joined #perl6
20:06 jnthn Ah
20:06 jnthn $P0 = get_hll_global ['PROCESS'], pkgname
20:07 jnthn On this line, $P0 comes back as null.
20:07 chromatic Yes.
20:07 jnthn But oddly
20:07 jnthn > die $PROCESS::OUT
20:07 jnthn IO()<0x3333b2c>
20:08 moritz_ bikeshedding question: should Date use ISO 8601 weekday numbers (1 = Monday ... 7 = Sunday) or the traditional 0 = Sunday ... 6 = Saturday?
20:08 pmichaud perhaps the get_hll_global is happening before PROCESS::<$OUT> is initialized.
20:08 moritz_ oh
20:08 jnthn > Q:PIR { $P0 = get_hll_global ['PROCESS'], '$OUT' }; Q:PIR { say $P0 }
20:08 jnthn IO()<0x3333b2c>
20:08 moritz_ DateTime already uses the ISO 8601 thing
20:08 jnthn That's...bizzare.
20:08 arnsholt moritz_: As far as I'm concerned, the week starts on monday
20:09 pmichaud why are the PROCESS:: vars being initialized twice?
20:09 pmichaud src/gen/core.pm and src/cheats/setup-io.pm ?
20:09 jnthn pmichaud: ?
20:09 jnthn pmichaud: oh
20:09 jnthn pmichaud: src/cheats/setup-io.pm is one of the files that goes in to core.pm
20:10 pmichaud oh
20:10 pmichaud core.pm is now generated
20:10 jnthn core.pm is generated from a bunch of files, that's one of them. See Makefile.in.
20:10 pmichaud evil, it should be in gen
20:10 jnthn It is.
20:10 pmichaud oh, it is.
20:10 pmichaud nm.
20:10 moritz_ :-)
20:10 jnthn :-)
20:10 colomon :)
20:10 pmichaud you all will have to bear with me as I try to catch up on 7+ weeks of development that occurred in my absence.  :-)
20:11 PerlJam rakudo:  my @a = "a".."z";   say "blah @a[0] foo @a[7]"
20:11 p6eval rakudo 78faa0: OUTPUT«blah a foo h␤»
20:12 jnthn rakudo:  my @a = "a".."z";   say "blah @a[]"
20:12 p6eval rakudo 78faa0: OUTPUT«blah a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
20:12 jnthn chromatic: It couldn't be about pre-computed hash values?
20:12 jnthn chromatic: And the hash value not getting updated?
20:12 jnthn (in the in-place substr)
20:13 PerlJam rakudo: my %h = "foo" => sub { my @a = 1..10; };  say "foo %h{'foo'}.().[4] bar";
20:13 p6eval rakudo 78faa0: OUTPUT«foo 5 bar␤»
20:13 chromatic I don't *think* so.  The string doesn't get updated in place; the op updates the register with the new string.
20:13 PerlJam jnthn: that's *sweet*
20:13 jnthn PerlJam: Isn't it. :-)
20:14 ruz joined #perl6
20:14 ruz jnthn: ping
20:14 ruz seen jnthn
20:15 jnthn ruz: o/
20:16 ruz are you ok, were you able to leave moscow before delays?
20:16 CokeBot9000 chromatic: but is the new string getting a new hash? (or is that not stored?)
20:16 jnthn ruz: Yes, I was! :-)
20:16 jnthn ruz: I got back to Copenhagen about 11:30am local time.
20:16 jnthn ruz: And airspace closed here 16:00
20:16 ruz ok
20:17 chromatic The new string should have a hashval of 0.
20:17 jnthn At the time I was sad to be leaving so soon, but in hindsight it was a good thing!
20:17 ruz glad you could make it, recall you had something important planned
20:17 jnthn Some $DAYJOB thingies. They'd have re-scheduled without me, but nice to keep to commitments. :-)
20:18 pmichaud rakudo:  my %h = 'foo' => 'bar';   say "foo %h";
20:18 p6eval rakudo 78faa0: OUTPUT«foo %h␤»
20:18 ruz yeah, few minutes ago I thought that it might be good if you couldn't make it
20:18 ruz so I would have a chance to invite you to dinner
20:18 jnthn Getting stuck and having to spend more time in Russia wouldn't have made me sad. :-)
20:19 ShaneC joined #perl6
20:19 jnthn chromatic: OK, if I change the line from
20:19 jnthn $P0 = get_hll_global ['PROCESS'], pkgname
20:19 jnthn to
20:19 jnthn $P0 = get_hll_global ['PROCESS'], '$OUT'
20:19 jnthn Things work.
20:19 ruz anyway, I'm glad you're ok and didn't stuck after passing custody :)
20:19 sorear [particle]: Do slangs actually work in Rakudo yet?  If so, how do I use them?
20:19 jnthn Even though a say pkgname gives $OUT
20:20 PerlJam std: my %h = 'foo' => 'bar';   say "foo %h";
20:20 p6eval std 30397: OUTPUT«ok 00:01 110m␤»
20:20 ShaneC left #perl6
20:20 jnthn std: say "foo %h";
20:20 chromatic Hm.  Now that's curious.
20:20 p6eval std 30397: OUTPUT«ok 00:01 108m␤»
20:20 jnthn std: say "foo %h{}";
20:20 p6eval std 30397: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable %h is not predeclared at /tmp/MYqjYwFwS5 line 1:␤------> [32msay "foo %h[33m⏏[31m{}";[0m␤Check failed␤FAILED 00:01 108m␤»
20:20 jnthn rakudo++, std++
20:22 jnthn sorear: No
20:23 jnthn chromatic: checked that the length changes between the two. It does.
20:23 moritz_ phenny: ask masak what he thinks about a WeekDay enum for DateTime and Date - I kinda don't like the 1 to 7 magic (and arbitrary) numbers
20:23 phenny moritz_: I'll pass that on when masak is around.
20:24 chromatic Does the length change *correctly*?
20:24 jnthn Yes
20:24 jnthn oh
20:24 jnthn yes.
20:24 jnthn :-)
20:24 jnthn 5 to 4.
20:25 sorear chromatic: Can I use strings which hash to 0 to mount an algorithmic complexity attack against Parrot?
20:25 jnthn Which matches $*OUT to $OUT
20:25 ejs joined #perl6
20:25 chromatic sorear, if you can deal with the semi-predicate problem perhaps.
20:29 plobsing sorear: in theory, probably yes, but the hash seed keeps changing so it might be hard to make that happen. Also if you're picking strings to attack parrot through hashing, some hash seeds + sequences of hash ops can cause arbitrary memory to be overwritten (TT#1499), which is a much better exploit
20:29 PerlStalker joined #perl6
20:32 jnthn chromatic: And (another data point) changing it to:
20:32 jnthn $S0 = substr name, 0, 1
20:32 jnthn $S1 = substr name, 2
20:32 jnthn pkgname = concat $S0, $S1
20:32 jnthn Makes it work.
20:32 lisppaste3 moritz_ pasted "Add 'Date' class to Temporal.pod" at http://paste.lisp.org/display/97893
20:32 chromatic That inplace subst op is suspect then.
20:32 jnthn chromatic: Seems so.
20:33 jnthn chromatic: I need to look at something else for a little bit now.
20:33 * moritz_ would welcome some eyes on that patch before submitting
20:33 jnthn chromatic: But I think we've narrowed it down substantially.
20:33 chromatic Any objection to making that change in Rakudo for now?
20:33 jnthn Well, we could perhaps, but maybe we use that form of substr elsewhere too.
20:34 chromatic I didn't see anything with ack.
20:34 chromatic That op may be destined for deprecation anyhow.
20:34 jnthn OK
20:34 jnthn Well, let me try a build without the prefix backslashed
20:34 chromatic Thanks for your help.
20:34 jnthn And I can run a spectest while I do the other bits.
20:35 jnthn What are we looking at in terms of merge schedule for the branch?
20:35 chromatic Post 2.3.
20:35 chromatic No sooner.
20:36 jnthn Ah, OK
20:36 chromatic Any op deprecations will take place after that.
20:36 jnthn So I should perhaps take the patches to get Rakudo to work under this and pop them in a branch?
20:36 sorear plobsing: oh dear
20:36 jnthn And then we just merge that and bump when Parrot merges.
20:36 chromatic I'm happy to commit them to the branch.
20:37 sorear plobsing: I've done a fair amount of hair pulling with blizkost on vtables full of 0 and 0x80000
20:37 sorear I blamed it on virtual address space randomization affecting GC order
20:37 sorear but I think now I was wrong...
20:40 pugssvn r30398 | moritz++ | [S32/Temporal] spec Date type
20:40 pugssvn r30398 |
20:40 pugssvn r30398 | This is heavily inspired by Date::Simple on CPAN, and mostly implemented
20:40 pugssvn r30398 | at http://github.com/moritz/Date/ as an external module, that currently works
20:40 pugssvn r30398 | fine with Rakudo (but is really compiler agnostic).
20:42 moritz_ enough spec hacking for today, now it's zzZZZzz time
20:44 jnthn night o/
20:44 diakopter night
20:49 justatheory joined #perl6
20:49 diakopter ... in theory
20:49 justatheory …in bed
20:50 plobsing sorear: vtables with 0s and 0x80000s is Parrot's way of saying "please retry your test at a later time" :p
20:54 sorear plobsing: Do you know what 0x80000 means?
20:55 sorear I was struck by the oddity of that number, but couldn't trace it
20:55 plobsing I have absolutely no idea where it comes from. The test case in TT#1499 was in rakudo spectest, so setting a global memory watch would have taken days
20:57 CokeBot9000 was it 0x80000 or 0x800000 ?
20:58 sorear CokeBot9000: I don't recall, I'll check
20:59 takadonet left #perl6
20:59 ilogger2 joined #perl6
20:59 ReiniUrban joined #perl6
20:59 sorear oh wow awesome apparently my stack frame list is *circular*
20:59 SmokeMachine joined #perl6
21:00 jnthn Congrats!
21:00 ejs joined #perl6
21:00 sorear jnthn: yes, it brings whole new meaning to "stack smashing"
21:01 sorear the same 6 stack frames have their backlinks arranged in a circle
21:01 sorear gdb doesn't seem to notice and thinks I'm in an infinitely nested call
21:01 PerlStalker Is MAIN() supposed to be called automatically if it exists or do I need to call it?
21:02 jnthn Automatically.
21:02 sorear Is MAIN implemented in any current implementation?
21:02 PerlStalker jnthn: That's what I thought.
21:02 jnthn sorear: Rakudo alpha had it working, iirc.
21:03 PerlStalker I'm using Rakudo pulled from git this morning but it isn't calling it.
21:05 jnthn PerlStalker: Yeah, I think just not yet implemented there yet.
21:05 jnthn We'll get to it. :-)
21:05 PerlStalker No worries.
21:06 PerlStalker I thought I'd take some time today and play with perl6 since I haven't looked at it in a while.
21:06 sorear CokeBot9000: I'm having trouble reproducing the exact crash from earlier, could you explain where both values could come from?
21:06 PerlStalker I saw the docs on MAIN() for the first time was playing around with it.
21:07 PerlStalker s/was/and was/
21:07 CokeBot9000 sorear: I was just grepping through the parrot source.
21:08 CokeBot9000 if you have any details, open a new ticket with trac - less code the better, parrot only a plus.
21:12 sorear I have just done something I should have done long ago
21:12 sorear experimentally disabled address randomization
21:12 sorear and... the crashes are still intermittent
21:12 sorear so it has to be hash seeding doing it
21:15 TiMBuS joined #perl6
21:24 masak joined #perl6
21:25 masak ahoy, #perl6
21:25 phenny masak: 20:23Z <moritz_> ask masak what he thinks about a WeekDay enum for DateTime and Date - I kinda don't like the 1 to 7 magic (and arbitrary) numbers
21:25 masak moritz_: only problem I see with a weekday enum is that it's a bit hardcoded, i18n-wise.
21:25 jnthn ahoj, masak...ako sa mas?
21:25 sorear ... this is BOTH hash seeding AND destruction order
21:25 jnthn Varil som bryndzové halušky!
21:25 masak dobry, vd'aka.
21:26 masak jnthn: yes, I read that. congrats!
21:26 masak moritz_: also, we don't have named enums yet :/ doesn't prevent it being spec'd, 'course.
21:26 jnthn The feta seems to be pretty close in taste to the sheeps cheese that the Real Thing uses.
21:27 masak nice.
21:27 masak I've got to try that some day.
21:29 masak well, I won't be long. just wanted to talk to phenny a bit.
21:29 masak see you sometime before 2038. :)
21:42 SmokeMachine joined #perl6
21:45 nadim joined #perl6
21:49 wknight8111 joined #perl6
22:50 M_o_C joined #perl6
23:08 ruoso joined #perl6
23:09 orafu joined #perl6
23:34 lue oh hello there. It appears that there has been no activity (bar leaving/entering #perl6) for a couple hours.
23:34 sorear :/ You broke it.
23:37 lue D: oh no! I broke the silence! :)
23:48 TimToady you'd think it was friday night or something
23:49 rv2733 joined #perl6
23:50 fhoahf38771 joined #perl6
23:50 fhoahf38771 left #perl6
23:55 jhuni joined #perl6
23:58 lue oh, hm, you'd think...
23:59 lue (tomorrow is new Doctor Who! :D)

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo