Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2005-12-18

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 nothingmuch has joined #perl6
00:10 Lartuv has quit IRC (Read error: 110 (Connection timed out))
00:12 trym has joined #perl6
00:19 justatheory has quit IRC ()
00:19 justatheory has joined #perl6
00:27 Smari Regarding infix operators; is it not possible to define an infix for two arrays?
00:33 clkao sure it's possible
00:33 clkao i just did it
00:34 Smari Care to show me? Mine's not working as it should.
00:34 Smari Probably just me being stupid, but hey.. :)
00:34 clkao our &infix:<»+«> := -> Array @a, Array @b { __hyper(\&infix:<+>, @a, @b) };
00:34 clkao sub __hyper (Code $op, Array @a, Array @b) {
00:34 clkao ... }
00:35 Smari Hmm.
00:35 obra it's sad when one can't actually paste perl code to IRC.
00:35 Smari multi sub infix:<·>(Array @a, Array @b) returns Int is commutative { [+] (@a »*« @b); }
00:35 Smari .. why won't this work?
00:37 clkao it works for me. if i name the operator XO
00:38 Smari Aye. Works here too when I call it that.
00:40 Smari Incorrectly defined function though. Haha.
00:40 clkao Smari: works for me if i name it ♨
00:40 Smari Why doesn't  Â·  work?
00:41 Smari Bug?
00:41 clkao see if hotspring works
00:41 Smari hotspring?
00:41 clkao the symbol i just pasted
00:41 Smari Yup, it works.
00:42 * obra cries. I want unicode irc
00:43 clkao obra: it's almost year 2006, get your software working!
00:43 obra gnome-terminal, screen and irssi. These things should all work
00:45 * xinming want the the console utf-8 in utf-8 encoding by default. :-)
00:45 xinming oopos.
00:45 xinming I just wish console will support utf-8 by default without starting X. :-P
00:46 Smari Hah!
00:46 Smari Now it works.
00:46 jesse has joined #perl6
00:46 Smari It was failing because for some reason I was using the ISO-8859-1 · instead of the UTF-8 one.
00:46 jesse has quit IRC (Client Quit)
00:48 Qiang has joined #perl6
01:00 what3 has joined #perl6
01:12 nothingmuch has quit IRC (Read error: 113 (No route to host))
01:30 avar has quit IRC (Read error: 104 (Connection reset by peer))
01:38 vel has joined #perl6
01:43 paran01d has joined #perl6
01:45 vel has left
01:56 paran01d hi im having trouble getting my ext tests to run they seem to be looking for pugs in a scripts dir within blib that isnt there any ideas ?
01:58 paran01d taking my first steps into pugs after a tlk from audrey last week at sydney perlmongers
02:25 dduncan paran01d, are you talking about the pre-existing ext tests, or new ones you are making?
02:31 paran01d has quit IRC ("using sirc version 2.211+KSIRC/1.3.12")
02:49 hlen has quit IRC (Read error: 113 (No route to host))
02:52 hlen has joined #perl6
03:02 lollan has joined #perl6
03:08 petdance has joined #perl6
03:15 SamB has quit IRC (Read error: 104 (Connection reset by peer))
03:38 pdcawley has quit IRC (Read error: 110 (Connection timed out))
03:52 r0nny has quit IRC ("sleep")
03:53 lollan has quit IRC (Read error: 104 (Connection reset by peer))
04:12 varadero has joined #perl6
04:13 varadero has left
04:28 verve_ has joined #perl6
04:39 Amnesiac has joined #perl6
04:42 stevan_ has joined #perl6
04:49 pdcawley has joined #perl6
04:51 stevan has quit IRC (Read error: 110 (Connection timed out))
05:20 gaal paran01d: how are you running your tests? does export HARNESS_PERL=`pwd` help?
05:35 audreyt gaal: hey
05:35 * audreyt wakes up and goes out to collect laptop
05:36 audreyt anything I should look at when on the road wrt your lexical patch?
05:39 justatheory has quit IRC ()
05:47 gaal audreyt: just that it's not lexical :-/
05:47 gaal I ended up punting and doing SGlobal in the caller's context
05:47 gaal it at least solves the double-use problem for now
05:48 audreyt OKIE
05:48 audreyt er, sorry, capslock
05:48 audreyt okie.
05:48 audreyt do you have your half formed lexical patch somewhere commented out in th esrc?
05:48 gaal I haven't read that article about mixins and stuff yet -- busy weekend unfortunately over --
05:49 gaal audreyt: well, look in Parser.hs 849
05:49 gaal compare with 467
05:49 audreyt k
05:50 gaal ...re: that article, I do want to read it hoping it clarifies what some exports might be. Eg. I still don't undersatnd when you might want to import something into an env or state var.
05:50 audreyt *nod*
05:52 gaal Reason I punted on lexicals was that I just wasn't sure how to combine Pad transofmers. You'll see that SGlobal exports are much simpler (void context map in Haskell! haha)
05:53 audreyt ok:)
05:53 audreyt yup, I see it. will hack it some more on the taxi
05:53 audreyt s/on/in/ # or whatever the correct term is
05:54 * gaal hopes the duct tape holds out :-)
05:54 gaal (I mean on the temp laptop)
05:54 justatheory has joined #perl6
05:55 gaal $Larry also mentioned something looking a bit like new syntax for the importation spec, too
05:55 gaal let me find it...
05:55 justatheory has quit IRC (Client Quit)
05:56 justatheory has joined #perl6
05:56 gaal oh, dang, I just remembered thinging it needed more discussion but I was too excited by the rest of the email to follow up:
05:56 gaal    my $hownow is export(:state);       # override implicit :my default
05:57 gaal but if that works, how do you set tagsets?
05:57 gaal what it *does* imply though is that the export hash needs another layer of metadata, something like
05:58 justatheory has quit IRC (Client Quit)
05:59 gaal %INC<MyModule><exports> = { '&f' => { bind => sub{...}, mode => 'lexical' }, '%s' => { bind = ??, mode => 'state' } }
05:59 gaal but that's easy to add.
05:59 gaal (s/mode/Scope/ too)
06:01 asavige has joined #perl6
06:02 audreyt yup, got it.
06:03 audreyt I wonder what doe this mean
06:03 audreyt sub foo { my $bar is export; ... }
06:04 gaal eep :)
06:04 gaal I hope it means a compiler error!
06:04 gaal s/compiler/compile-time/
06:05 audreyt how is it diff from
06:05 audreyt sub foo { sub bar is export { ... } }
06:05 audreyt or even
06:05 audreyt { my $foo; sub bar is export { ... } }
06:05 audreyt the last one is obviously correct
06:06 gaal hhmm.
06:06 gaal but you can close on lexicals, not on subs.
06:08 audreyt but the block is conceptually a closure as well
06:08 audreyt because you can reenter it with &?BLOCK(...)
06:08 audreyt from within itself
06:09 gaal but you can't export to yourself
06:10 audreyt indeed that's not sane
06:11 audreyt but consider:
06:11 audreyt Foo.pm:    my $foo is export;
06:11 audreyt vs
06:11 audreyt Foo.pm:    { my $foo is export; }
06:11 audreyt that's what I was thinking about
06:11 audreyt namely how far the exports hoist themselves from inner blocks
06:12 gaal conceptually it already is in an inner block even in the first place, no?
06:12 audreyt it is, but it's the _first_ inner block
06:12 gaal package Foo; my $x    === package Foo { my $x }
06:12 gaal yes. hmm.
06:12 audreyt whilst in the second one, the "export" need to be hoisted to the package closure
06:12 audreyt because the package closure will not know about $foo
06:13 audreyt and hence can't provide it if we are to request it from the closure
06:14 gaal on a possibly related note, what does this mean?
06:14 gaal my $foo is export(:GLOBAL)
06:14 gaal or
06:14 gaal our $foo is export(:MY)
06:14 gaal etc.
06:16 audreyt that's easy
06:16 audreyt it affects symbol creation on the importation site
06:17 gaal you mean, there's just yet another binding of some arbitrary scope
06:17 gaal but what about closures then?
06:18 gaal package Foo; sub mk_counter { my $color = @_ is export; return { "<font color='$color'>" ~ @_ ~ "</font>" } }
06:19 gaal apart from hoisitng
06:19 gaal this especially doesn't make sense because $color is lexical and closed on.
06:20 gaal well, drats. my($color) = @_, and I can't believe I fell for that once again.
06:21 audreyt my $color = @_; # this has a very well defined meaning of \@_ :)
06:21 audreyt but anyways.
06:22 audreyt I'll think about it more; for now it sufficies to rule out all but toplevel symbols as export candidates
06:22 audreyt we can always p6l if ambiguity arises
06:23 audreyt yay, the taxi is here. will be back in ~2hr
06:23 gaal does the parser readily know if a symbol is top level?
06:23 gaal ok i'm going to $work. good luck
06:23 audreyt gaal: the idea is we collect it perclosure
06:23 audreyt and if it's not a package closure, something is very wrong.
06:24 audreyt this belongs to the compiler phase not parser
06:24 audreyt but the parser at importation site should just query the export list from the module --  we'll see how it turns out :)
06:24 audreyt enjoy $work :)
06:24 * audreyt waves &
06:24 * gaal waves back, er, away &
06:26 nothingmuch has joined #perl6
06:29 asavige paran01d: re running tests, I set env vbles HARNESS_PERL=./pugs PERL6LIB=ext/Test/lib
06:29 asavige Then run test with prove -v t/fred.t  I'm a bit rusty, is that still recommended way to do it?
06:29 gaal PERL6LIB=blib6/lib possibly even better
06:30 gaal and HARNESS_PERL=`pwd` so you can cd around.
06:47 nothingmuch has quit IRC (Read error: 110 (Connection timed out))
06:50 Satpam_Yudi has joined #perl6
06:53 petdance has quit IRC ("Leaving")
07:27 nothingmuch has joined #perl6
07:30 lisppaste3 has quit IRC ("Want lisppaste3 in your channel? Email chandler AT unmutual.info.")
07:30 lisppaste3 has joined #perl6
07:37 dduncan new commit pending ...
07:46 dduncan push of new file SQL::Routine::Language done
07:46 svnbot6 r8289 | Darren_Duncan++ |  r1389@Darren-Duncans-Computer:  darrenduncan | 2005-12-17 23:45:43 -0800
07:46 svnbot6 r8289 | Darren_Duncan++ |  /ext/Rosetta-Incubator : added start of new file lib/SQL/Routine/Language.pod, the authoritative Rosetta VM language specs
07:47 dduncan oh, that's up too
07:47 Satpam_Yudi has quit IRC (Read error: 104 (Connection reset by peer))
08:38 asavige has left "Later"
08:51 dduncan has quit IRC ()
08:52 kane_ has joined #perl6
08:57 iblechbot has joined #perl6
09:03 araujo has left "Programs must be written for people to read, and only incidentally for machines to execute"
09:36 chri5t0 has joined #perl6
09:40 lisppaste3 has quit IRC (Remote closed the connection)
09:44 chri5t0 has quit IRC ("codito ergo sum")
09:55 elmex has joined #perl6
09:55 iblechbot has quit IRC (Read error: 110 (Connection timed out))
09:56 lisppaste3 has joined #perl6
10:09 xinming has quit IRC (Read error: 104 (Connection reset by peer))
10:13 r0nny has joined #perl6
10:46 xinming has joined #perl6
11:36 avar has joined #perl6
11:52 avar has quit IRC (Read error: 104 (Connection reset by peer))
11:53 avar has joined #perl6
12:51 Maddingue has quit IRC (Read error: 113 (No route to host))
12:52 Maddingue has joined #perl6
12:59 avar 'Migration is important. The perl interpreter will assume that it is being fed Perl 5 code unless the code starts with a "class" or "module" keyword, or you specifically tell it you're running Perl 6 code in some other way, such as by:'
12:59 avar -syn01
12:59 avar so code like:
12:59 avar use strict;
13:00 avar class Foo { ... won't be considered perl6 code?
13:00 avar (doesn't start with class)
13:08 xinming avar: No, It will, It means, if the current file which has some signature that perl 6 has, It will be automatically turn running into perl 6
13:09 xinming Just like, If you have a package which contain a class, then the file is perl 6 source,
13:10 xinming hmm, for example, package Pkg1; bla...bla..bla; class Cls1; bla..bla..bla; 1;  This will be considered perl 6, as there is a class.
13:11 xinming certainly for some other signature... Just like `for @a -> $v { ... }`
13:12 DaGo has joined #perl6
13:12 xinming hmm, maybe, the if without the parenthesis in test statement, will also be considered perl 6
13:13 avar sure there's lots of things, syn01 is just a bit unclear on it...
13:13 avar Another big thing to check for is Str/Num/Int/Array..
13:14 xinming It's understandable. Str is an object, and str is a bit like char *s = "bla...bla...bla..."
13:14 xinming and str can be promoted automatically
13:15 xinming hope what I say is understandable. :-P
13:36 audreyt stevan_: ping
13:40 audreyt stevan_: I see this
13:40 audreyt $nothead++ && last if exists $in_tail{$cand};
13:40 audreyt in your C3
13:40 audreyt shouldn't it be ++$nothead ?
13:40 audreyt otherwise the && won't take effect
13:40 audreyt or am I missing some very clever use of postincrement?
13:42 verve_ has quit IRC (Read error: 104 (Connection reset by peer))
13:43 avar isn't that equivalent to ($nothead++) && last if exists $in_tail{$cand}; since ++ is above && in the precedence table?
13:44 audreyt yeah
13:44 audreyt but that will make the "last" not run on the first time of $nothead++
13:44 audreyt which sounds wrong to me
13:44 audreyt (this is not seen in the lisp or python implementation of C3)
13:47 avar is that perl5/Perl6-MetaModel/lib6/metamorph.pl ?
13:48 stevan_ audreyt: no cleverness involved
13:48 stevan_ bad coding instead :)
13:48 audreyt avar: no... Class::C3 on CPAN and perl5/Perl6-ObjectSpace/lib/Perl6/MM/C3.pm
13:48 stevan_ however, it passes all the (Python, Dylan) tests
13:49 audreyt stevan_: sure, because it will loop to the end anyway
13:49 audreyt it just consumes some more CPU
13:49 stevan_ ah
13:49 stevan_ is now known as stevan
13:49 stevan I will adjust them then :)
13:51 stevan audreyt: I looked for a Haskell impl of C3 last night, all I found was Scheme, so I went back to reading Algorithms :)
13:51 svnbot6 r8290 | iblech++ | t/builtins/lists/minmax.t: Added tests for min and max with literals (e.g.
13:51 svnbot6 r8290 | iblech++ | max(1,2,3)); bug in PIL2JS spotted by clkao++
13:51 stevan but its time for breakfast right now
13:51 * stevan &
13:55 audreyt stevan: anyway, I coded it up in 3 mins :)
13:55 audreyt not sure about correctness tho.
13:55 audreyt testing
13:56 avar $ pugs -e 'say 5^5'
13:56 avar one() <- mm?
13:56 avar strange output;)
13:56 audreyt ^ is infix one()
13:56 avar ah, ;)
13:57 * avar still learning all the operators
13:58 gaal yo a.*
13:58 audreyt stevan: it looks like this
13:58 audreyt    doMerge res seqs
13:58 audreyt        | seqs'@(_:_) <- filter (not . null) seqs
13:58 audreyt        , (cand:_) <- [ s | (s:_) <- seqs', all (not . elem s . tail) seqs']
13:58 audreyt        = doMerge (cand:res) [ if s == cand then rest else full | full@(s:rest) <- seqs' ]
13:58 audreyt    doMerge res _ = res
13:59 audreyt gaal: hey... I'll have to wait until tomorrow afternoon to get my laptop back... they overflowed on weekend
14:00 gaal no worries :) i hope their overflow isn't liquid though
14:00 audreyt prolly not :)
14:04 gaal I should work on the other side of this anyway, too: parsing the import requests.
14:04 svnbot6 r8291 | autrijus++ | * C3 MRO lands to Minilang... would love some more tests.
14:04 gaal and exporting vars.
14:05 audreyt cool!
14:05 audreyt stevan: I've committed a bunch of work on C3 MRO and objs
14:05 svnbot6 r8292 | autrijus++ | * replace objects in minilang from simple hashes into
14:05 svnbot6 r8292 | autrijus++ |   opaque objects with fetch/store/freeze/thaw virtual
14:05 svnbot6 r8292 | autrijus++ |   methods.  this should make autoboxing infinitely easier
14:05 svnbot6 r8292 | autrijus++ |   as an autoboxed Int can use a haskell Integer without
14:05 svnbot6 r8292 | autrijus++ |   exposing it to the externals.
14:05 audreyt sanity checks welcome
14:06 audreyt also for the [].apply(->{}) form, can you use (->{}).do_for([]) instead?
14:08 masak how does one find out if a reference holds a scalar in perl 6? ref() seems to be too specific, returning Int, Str and Bool
14:09 nothingmuch has quit IRC ("home")
14:11 audreyt $var.does(Scalar)
14:11 audreyt bbl... *sleep*
14:12 * audreyt prays tomorrow will yield a working laptop
14:12 audreyt &
14:12 masak audreyt: thx
14:14 ingy audreyt: yo
14:15 * ingy alwayz missez audreyt by minutez
14:23 Juerd audreyt: Consider IBM laptops :) They don't break quite as easily
14:24 avar multi sub infix:<≠> (Int $x, Int $y) returns Bool { $x != $y }
14:24 avar say "five & ten are not equal" if 5 ≠ 10;
14:24 avar works with <z> and if 5 z 10;
14:24 * xinming bought an Asus Laptop because of audreyt who also has one... Hope mine won't break so easy. :-/
14:24 avar limitation in pugs or perl6?
14:25 xinming avar: what do you mean?
14:25 lisppaste3 has quit IRC ("Want lisppaste3 in your channel? Email chandler AT unmutual.info.")
14:25 lisppaste3 has joined #perl6
14:26 Juerd xinming: Hm. Asus is one of the regular brands, on the cheaper side of things. They're great for normal users, but not for almost continuous use...
14:26 Juerd It's a shame laptop manufacturers don't specify the duty cycle their products were designed for.
14:26 clkao morning
14:27 Juerd Afternoon
14:27 clkao *yawn*
14:27 xinming Juerd: I ever wish to choose IBM series. But the problem is, It's too expensive... for my A3E (1.73G with 1G ram) It took about $1200, But for IBM, the price is oever $2000 Maybe. :-/
14:28 clkao Juerd: i like my asus quite alright, it's been solid and light :)
14:28 Juerd xinming: I was parsing "for my ... (...)" as Perl 5 and expected a { ... Wow.
14:28 Juerd xinming: Anyway, the trick is to be less picky about specs.
14:28 clkao xinming: very few laptops can pass the 'audrey test'
14:28 Juerd If you work remotely, the speed of your laptop is much less relevant.
14:29 Juerd And it's cheaper often to buy a very simple speed machine that you connect to a permanent internet connection, than to buy an equally much faster laptop.
14:29 Juerd While the simple speed machine has additional benefits.
14:30 Juerd I guess most depends on the availability of fast internet connections.
14:30 xinming Juerd: Yeap, I agree, But for a person who really loves computer, how will he think of the speed of computer. escpecially the faster the better. :-), at least, to me, I really hope my computer as good as possible.
14:31 Juerd xinming: I disagree about that. I absolutely love computers, and adore my laptop, but speed is not that important. How computers are built, and how they interact with me (comfort level) are much more important.
14:31 Juerd "good" should be established through a lot more than the hardware specs.
14:31 jethr0 has joined #perl6
14:32 Juerd A good casing, comfortable keyboard (hey, you type HOW MANY keys a day?), good touchpad or trackpoint, battery life, screen brightness (and the ability to dim it enough), etcetera
14:32 xinming I ever got a laptop which contains C3 Via CPU, and 256M, Ram, If you make me compile pugs on that machine, I would rather choose a much cheaper computer instead of laptop.
14:32 jethr0 hi, i am trying to "darcs get" pugs from the repository, but it won't work :(
14:32 integral you'd only want to compile pugs locally if you didn't have inet...
14:33 Juerd If I can't hold the laptop by its screen, because it has weak hinges or a weak cover, I won't want the laptop.
14:33 Juerd If its keyboard is uncomfortable, I don't want it. If the battery only lasts an hour, no way.
14:33 xinming Juerd: thanks for sharing the experience. :-)
14:33 Juerd integral: Yes, but there's a balance to be found.
14:34 Juerd I think a centrino 1.5 GHz is fast enough to compile occassionally.
14:34 Juerd That's much cheaper than an 1.7
14:34 Juerd Of course, I'm not saying you should go for a C3 :) That's not nice for programmers.
14:34 jethr0 the ibm x40 is small, light and has up to 11h battery life with extension accu.
14:34 Juerd jethr0: Nonsense. It's 6 to 7 hours.
14:34 xinming hmm, by the way, for a machine which is running at home as server, to you all, is the paying for Adsl more than electicity?
14:35 xinming .... 11h? >_<
14:35 jethr0 there's an additional (huge) accu
14:35 jethr0 which fits exactly under the notebook
14:35 Juerd jethr0: Yes, the 8 cell one. I sell those things.
14:35 Juerd jethr0: And the laptops.
14:35 gaal hey Juerd, resident lang moose. Is this a pugsbug?
14:35 gaal ?eval <a b c d>.kv
14:35 Juerd What, that there is no response?
14:36 Juerd No, that's just because evalbot isn't here.
14:36 Juerd Can't assign that bug to pugs :)
14:36 gaal ahem. no, that's an evalbot hiccup :-)
14:36 jethr0 Juerd: ok, but it's still quite nice even with the 8cell accu attached. rather cute :)
14:36 gaal it'll fail on VUndef being ro or some such weirdness.
14:36 Juerd jethr0: Certainly.
14:36 Juerd jethr0: Just don't spread expectations that are too high, because that results in disappointment.
14:36 xinming hmm, I wish to setup a home server to myself, It's a bit expensive, which cost about $250 per year for electicity, and $120 for Adsl
14:36 jethr0 ok
14:36 gaal should it result in <0 a 1 b 2 c 3 d> ?
14:37 gaal (i think it should).
14:37 Juerd jethr0: 6 to 7 hours is impressive for a 1.8 kg laptop; there isn't even need for exaggeration :)
14:37 jethr0 :)
14:37 Juerd gaal: It depends. Is .kv an array method, or a hash method only?
14:37 gaal on arrays it does work.
14:38 Juerd If it's a hash method ONLY, then the list is probably coerced to an array, and that again to a hash, via an implicit list. Which would be madness, by the way.
14:38 gaal @l = <a b c d>; @l.kv => what I said above.
14:38 Juerd What *works* I find irrelevant when answering these questions. What do the specs say? :)
14:38 gaal nono, it's even devined as List::kv.
14:38 gaal the specs say it gives these indices.
14:39 Juerd Lists, when used with methods, are coerced to arrays, so there should be no difference between @foo = <>; @foo.bar and <>.bar
14:39 Juerd afaik.
14:39 gaal so there's certainly a bug then.
14:39 Juerd My back hurts
14:39 gaal afayk.
14:40 masak I encountered this line in some code I'm porting to perl6:
14:40 masak my $pat = quotemeta ($opt);
14:40 masak what does it do?
14:40 masak is there a perl6 equivalent?
14:40 gaal masak: probably not needed
14:41 masak oh, good
14:41 gaal it escapes hings like * and \b and so on
14:41 Juerd masak: Instead of /$pat/, just use /$pat/ :)
14:41 gaal so that when you interpolate $pat, they don't become metachars
14:41 Juerd masak: Instead of /$pat/, just use /$opt/ :)
14:41 Juerd gaal: It's not interpolation, and *because of that*, there are no metachars.
14:41 masak Juerd: oki
14:42 gaal there's a way to explicitly ask $opt to be interpolated
14:42 Juerd Oh, you were still discussing Perl 5. Nevermind.
14:42 gaal Juerd: yes, I know.
14:42 Juerd gaal: s/interpolated/interpreted as a rule/
14:42 gaal Juerd: true
14:42 * gaal returns to $work
14:42 Juerd Just as $bar isn't interpolated in $bar()
14:47 masak has `foreach` been deprecated in perl6?
14:47 masak pugs doesn't recognize it
14:47 masak ?eval for 1..5 { say $_ }
14:47 elmex has quit IRC ("weg")
14:47 masak oh. evalbot is sleeping, it seems
14:48 masak nvm. anyway, `foreach` is not a recognized keyword in pugs, it seems
14:48 masak intentional?
14:49 xinming masak: It's deprecated, since in perl 6, list are lazy by default, So, No need to use foreach
14:49 xinming for is enough
14:50 xinming maybe It's deleted from perl 6
14:50 Juerd masak: In Perl 5, for and foreach are aliases. The list iterating thing is just "for" in Perl 6, and the C-style loop is "loop".
14:50 avar there's no foreach in p6
14:50 Juerd That was more or less implied :)
14:51 masak I interpret your answers as there no longer being any use for `foreach` in p6
14:51 masak fair enough
14:51 masak since they are synonyms anyway, I mean :)
14:51 Juerd I don't like this change. I think the alias is nice to have.
14:51 Juerd Even though I always write "for".
14:51 masak Juerd: me too. but you can create a macro if you want
14:52 masak at least as soon as we have macros in pugs :)
14:52 Juerd masak: my &statement:<foreach> ::= &statement:<for>;
14:52 Juerd Not a macro. An alias! :)
14:52 masak Juerd: of course. my bad.
15:02 jethr0 has left
15:16 lisppaste3 has quit IRC (Remote closed the connection)
15:19 xern has joined #perl6
15:23 elmex has joined #perl6
15:24 xern_ has joined #perl6
15:24 verve_ has joined #perl6
15:30 xern__ has joined #perl6
15:33 DaGo has quit IRC (Remote closed the connection)
15:34 DaGo has joined #perl6
15:35 DaGo has quit IRC (Remote closed the connection)
15:35 xern___ has joined #perl6
15:35 DaGo has joined #perl6
15:36 verve_ has quit IRC ("Àü À̸¸ °©´Ï´Ù.")
15:37 xern has quit IRC (Connection timed out)
15:40 xern has joined #perl6
15:42 xern_ has quit IRC (Read error: 110 (Connection timed out))
15:43 DaGo has quit IRC (Remote closed the connection)
15:45 xern_ has joined #perl6
15:45 lisppaste3 has joined #perl6
15:47 xern__ has quit IRC (Read error: 110 (Connection timed out))
15:49 DaGo has joined #perl6
15:52 araujo has joined #perl6
15:52 xern___ has quit IRC (Read error: 110 (Connection timed out))
15:58 xern has quit IRC (Read error: 110 (Connection timed out))
15:59 avar has quit IRC (Read error: 104 (Connection reset by peer))
16:00 avar has joined #perl6
16:04 clkao &infix:{'+'}
16:04 clkao doesn't seem to parse
16:12 clkao grr, currying broken:
16:12 clkao t/subroutines/currying.t
16:12 clkao pugs: malformed named arg: Syn "named" [Ann (Cxt (CxtItem (mkType "Str"))) (Val (VStr "y")),Val (VInt 2)]
16:13 avar Have there been any reports on what filesystem functions will be like in perl 6 ?
16:13 avar I noticed that there isn't a synopsis / apocolypse for that yet
16:13 clkao s29. very sparse
16:20 gaal avar: look in Prelude.pm for a link to some discussion.
16:33 svnbot6 r8293 | clkao++ | sym should be local variable.
16:43 clkao dogh
16:43 clkao 13902 pugs        44.3%  3:53.08   1    13   777   669M+ 6.37M   423M-  796M
16:50 Aankhen`` has joined #perl6
16:54 svnbot6 r8294 | clkao++ | Failed tests for currying subs with array arguments.
16:57 stevan_ has joined #perl6
16:57 svnbot6 r8295 | clkao++ | Hyperoperators coming to pil2js backend -
16:57 svnbot6 r8295 | clkao++ | We have >>+<< now, was hoping to do everything with currying,
16:57 svnbot6 r8295 | clkao++ | but it doesn't work yet, left the currying implementation in
16:57 svnbot6 r8295 | clkao++ | comments.
17:06 svnbot6 r8296 | clkao++ | a bit more hyper-operators so we can pass some more tests.
17:10 stevan has quit IRC (Read error: 110 (Connection timed out))
17:12 stevan_ audreyt: ping
17:12 avar clkao: does $x »++ work now?
17:12 avar eh
17:12 avar @x »++
17:18 justatheory has joined #perl6
17:22 justatheory has quit IRC (Read error: 104 (Connection reset by peer))
17:23 r0nny re
17:33 avar has quit IRC (Read error: 104 (Connection reset by peer))
17:34 G2 has joined #perl6
17:34 avar has joined #perl6
17:44 saorge has quit IRC (Read error: 110 (Connection timed out))
17:44 saorge has joined #perl6
17:46 stevan_ audreyt: all tests are passing now, I am going to try and write some more MRO tests (port them from Class::MRO, etc)
17:46 clkao avar: no. i didn't touch it. i was working on the js backend
17:46 svnbot6 r8297 | stevan++ | PIL.Native.Eval.hs
17:46 svnbot6 r8297 | stevan++ | - changed mro_merge to merge against obj, not cls (see NOTE)
17:46 svnbot6 r8297 | stevan++ | PIL.Native.Bootstrap.pil
17:46 svnbot6 r8297 | stevan++ | - uncached ::Class.MRO, I think we need to get  
17:46 svnbot6 r8297 | stevan++ |   attr.instantiate_container() working in order to
17:46 svnbot6 r8297 | stevan++ |   make this work correctly
17:46 svnbot6 r8297 | stevan++ | - all tests in t/pil/bootstrap.pil work now
17:48 gaal stevan_: you hacking haskell now? cool!
17:49 gaal TWD is closer by the ci :-)
17:50 clkao TWD?
17:50 gaal total world domination
17:50 * clkao grins
17:50 DaGo has quit IRC ()
17:50 clkao now if only people can sort out weirdness in currying
17:51 clkao it's totally broken with haskell backend. semi broken for js
17:51 clkao t/subroute/currying.t
17:51 clkao subroutine
17:52 * gaal looks
17:56 gaal urrr, didn't audreyt revive inlined source prelude?
17:56 clkao er?
17:57 gaal when you "make unopimized", precompiling the prelude typically fails
17:57 gaal so for those builds, we wanted to bring back the old way of doing it, not precompiling the prelude but storing its p6 text source inside pugs, to be evalled every load.
17:58 clkao i was thinking we probably need to define different tiers of functions, so it's easily to do bootstrapping
17:58 gaal weird, i do get a prelude now. must see how that's done :-)
17:59 gaal aaahhh, I get it. audreyt++ # smart
18:02 stevan_ gaal: if you consider deleting one word hacking Haskell :)
18:02 * stevan_ still can't seem to grok Haskell
18:03 gaal well, I see what the problem is (an annotation node messing up patmatch), but I'm not sure yet about how to fix this.
18:03 stevan_ my brains just doesn't work that way,.. no matter how hard I try
18:03 clkao Oh, bootstrap.pil is beautiful # stevan++
18:03 gaal stevan_: we have one of those untranslatable words in hebrew (comes from Arabic really): "alek"
18:03 gaal loosely, it means, "yeah right"
18:03 avar has quit IRC (Read error: 104 (Connection reset by peer))
18:04 stevan_ clkao: thanks,.. audreyt deserves much credit too... it's his mini-lang :)
18:04 gaal I'm sure you can moose it!
18:04 gaal just ignore monads for the while :-)
18:05 stevan_ gaal: I think if I had a few weeks to dedicate to it, maybe,.. but the problem is the $work distractions bring my mind back to Perl
18:05 avar has joined #perl6
18:08 gaal tell me about it :( I just hopped from straight c to C#
18:08 stevan_ I like C# actually :)
18:08 stevan_ better than Java ;)
18:09 gaal oh, I didn't say I don't like it
18:09 gaal but the context switches are jarring
18:09 stevan_ yeah I bet
18:09 Odin-LAP C# has a public domain spec.
18:10 Odin-LAP (Which, admittedly, doesn't mean a thing, but it's still an interesting point.)
18:10 stevan_ Odin-LAP: that is because MS want's it standardized
18:11 stevan_ standardized == Manager-freindly
18:11 gaal Open. But PD?
18:11 Odin-LAP gaal: Yes.
18:11 Odin-LAP gaal: All ECMA publications are public domain.
18:11 stevan_ The CLR spec if public domain as well IIRC
18:11 gaal walla? (Arabic's the language du jour for interjections)
18:12 Odin-LAP stevan_: Yup. Both C# and CLI were submitted to ECMA for standardisation.
18:13 Odin-LAP Hardcopies are available for free, too. Which is quite unusual.
18:15 gaal clkao: svk pull
18:15 svnbot6 r8298 | gaal++ | unbreak named args
18:15 gaal three tests still fail, but that's another problem.
18:16 clkao the last one fails?
18:16 clkao that's the one i want to get it work :/ with arrays
18:16 clkao as i want to implement hyperop in jsbackend with curryed function
18:16 gaal I think it passes with no message
18:17 clkao whoot
18:17 gaal add one? :)
18:21 svnbot6 r8299 | clkao++ | add name to currying array arg test.
18:21 * gaal shrieks at L<S06/Currying>
18:21 gaal "The result of a use statement is a (compile-time) object that also has an .assuming method"
18:24 gaal hmmm, that section no longer stipulates .assuming only takes named args, so one of the tests is obsolete. but does that mean currying is now OK with positional args?
18:24 clkao no idea
18:29 gaal clkao: __hyper in that test looks wrong. I don't know if it's the same implementaion you're using elsewhere
18:29 gaal it thunks elements from the long list when the short one is exhausted
18:30 gaal but (I think) <1> >>-<< <1 2 3>  =>  <0 -2 -3>
18:30 gaal this is the same problem as the reduce identity issue (that got a looooong thread on p6l)
18:32 gaal FWIW, main pugs gives <0 -1 -2>, which is weird in this case but just means someone chose 1 as the default identity
18:34 gaal brb
18:35 clkao i thought it's doing that if it's a list. was going to do expanding if any of them is single
18:36 Qiang has quit IRC ("Leaving")
18:40 gaal oh, you mean take the last element? let me see
18:41 gaal where's evalbot? :(
18:41 gaal you're right!
18:41 gaal ./pugs -e 'say <5> >>-<< <1 2 3>' => 432
18:42 clkao but:
18:42 clkao 423
18:42 clkao ./pugs -e 'say <5 4> >>-<< <1 2 3>'
18:43 gaal looks like it takes the last element
18:43 gaal oh. no
18:43 clkao no
18:43 gaal what does that mean then?
18:43 clkao only when it's with one ele
18:43 clkao otherwise it takes the missing one
18:45 gaal ahhh ok.
18:45 * gaal goes to look at the spec
18:45 avar boo!
18:45 avar %h{str} doesn't work anymore;/
18:45 gaal the spec doesn't say anything :/
18:46 Juerd Note: do not use lists like 1 2 3 or 0 1 2 in testing attempts :)
18:46 gaal avar: that's because pure {} means only a closure now
18:46 gaal avar: %h<str> or %h{'str'}
18:46 Juerd You want to be sure it's using your value, not an internal counter.
18:46 gaal Juerd: point. I often start at 42
18:46 avar woo
18:47 Juerd Some newbies think @foo returns the last element, because after @foo = 1..4, @foo == 4.
18:47 avar is there something like .inspect in ruby to find out how a datastructure is laid out?
18:47 Juerd Don't get bitten by the same thing :)
18:47 Juerd gaal: I usually don't use regular intervals
18:47 Juerd gaal: My favourite numbers are 42, 15 and 123.
18:48 avar $ ruby -e 'x = {"a" => %w{a b c}}; puts x.inspect'
18:48 avar {"a"=>["a", "b", "c"]}
18:48 gaal which reminds me how just last week I was tuning some code where I wanted a rollover counter but didn't know what a good value would be. I ran some experiments and 42 turned out to be good, so I used that.
18:48 Juerd Hehe
18:49 Juerd So I'm not the only one using $foo % 42 ;)
18:49 gaal Juerd: I'd never use something like that because it'd mean I have to like, do arithmetic to check the result, and I'd probably be wrong cause I can't count :-)
18:49 Juerd Though a few months ago, a client asked me why his web based database application thingy paged results per 42 :)
18:49 gaal the correct answer is of course "why any other number?"
18:50 gaal let's see you make an appointment on an hour that's != (mod 15).
18:50 Juerd Hours are so weird
18:51 gaal != 0 that is
18:51 Juerd But I've stopped trying to round appointment times at nice epoch times.
18:51 gaal explicitly mixed-radix system with an implicit further radix.
18:52 Juerd Which fluctuates in a fixed pattern
18:52 Juerd A pattern which again fluctuates per a fixed pattern which fluctuates per a fixed pattern.
18:52 gaal epoch times are, of course, just as arbitrary :)
18:53 Juerd Sure.
18:53 Juerd But at least one can easily calculate with them.
18:53 gaal true dat.
18:54 Juerd A base-60/base-60/base-24/base-(28|29|30|31)/base-12/base-10 number is hard.
18:55 clkao how to you create an array with same elements? like map { 5 } 1..10 ?
18:56 clkao there gotta be something simpler
18:56 gaal 5 xx 10
18:56 clkao cool
18:58 araujo Hello.
18:58 xinming x is enough. :-)
18:58 clkao i thought x is for making the string?
18:58 avar xinming: x makes a string
18:58 avar *repets a string
18:58 xinming oops, sorry, misunderstood. :-/
18:59 gaal off to see a film. bye! :)  &
19:01 xinming has quit IRC (Read error: 104 (Connection reset by peer))
19:05 avar mm
19:06 avar I can't do something like for 1..10.mysub(arg) ?
19:06 avar I was going to write a method like ruby's step() so I don't have to use loop()
19:06 avar for 1..0.step(2) -> $i { say $i }
19:06 avar 1..10
19:09 Juerd Has feather been unreachable for long?
19:09 Juerd (by ssh)
19:11 arcady has joined #perl6
19:20 wolverian_ has joined #perl6
19:22 iblechbot has joined #perl6
19:29 xinming has joined #perl6
19:34 svnbot6 has quit IRC (Read error: 104 (Connection reset by peer))
19:35 wolverian_ has quit IRC ("Ex-Chat")
19:35 wolverian heh, nice load average on feather :)
19:39 webmind Juerd, quite
19:39 webmind maybe nice is an idea
19:40 webmind hmm
19:40 webmind it was niced
19:40 webmind and now we're banned from perlhelp
19:40 webmind :)
19:41 wolverian what happened? :)
19:41 wolverian (and I'm not banned.)
19:41 webmind my guess is a big load
19:42 webmind mode/#perlhelp [+b *!*@feather.perl6.nl]
19:49 evalbot_8018 has joined #perl6
19:49 elmex has quit IRC ("leaving")
19:52 Juerd webmind: Thanks for the SMS
19:53 webmind np
19:53 webmind didn't know if you where there already or simething
19:53 webmind something
19:55 Juerd unbanned.
19:55 Juerd webmind: Nah - still eating :)
19:56 webmind k
19:56 webmind thanks
19:57 Juerd 20:56 -!- mode/#perlhelp [-oo flang perl-d] by Juerd
19:57 Juerd 20:56 -!- mode/#perlhelp [-b *!*@feather.perl6.nl] by Juerd
19:57 Juerd 20:57 <@Juerd> Sorry about the bot de-op, but providing access should be a primary concern, and they
19:57 Juerd               currently prevent legitimate users from accessing.
19:57 Juerd Try again.
19:58 Juerd lafk
19:58 Juerd s/l//
19:58 Juerd Dec 18 20:34:39 feather kernel: Swap cache: add 37775494, delete 37775494, find 16367583/20409750, race 5+29
19:59 Juerd Dec 18 20:34:39 feather kernel: Free swap  = 0kB
19:59 Juerd Dec 18 20:34:39 feather kernel: Total swap = 987896kB
19:59 Juerd Load issue indeed.
19:59 Juerd Dec 18 20:34:39 feather kernel: Out of Memory: Killed process 18385 (ghc-6.4.1).
19:59 Juerd Someone forgot to ulimit.
19:59 Juerd (grrrr!)
19:59 Juerd afk
20:05 Aankh|Clone has joined #perl6
20:05 Aankh|Clone has quit IRC (Remote closed the connection)
20:24 hlen has quit IRC (Connection timed out)
20:26 Aankhen`` has quit IRC (Success)
20:33 r0nny yo
20:36 r0nny anyone knows the state of audreyt's work on the new object system ? ?
20:48 hlen has joined #perl6
21:03 frederico has joined #perl6
21:03 frederico has quit IRC (Client Quit)
21:19 gaal hey r0nny, you can see the commit log here: http://rt.openfoundry.org/Foundry/Project/Source/index.html/pugs/log/
21:20 gaal clkao: is the problem with use fixed? if not where can I find a test case?
21:23 Amnesiac has quit IRC ("Leaving")
21:26 kane_ has quit IRC ()
21:30 elmex has joined #perl6
21:32 avar mm, anyone have an idea as to my previous question?
21:32 avar i.e. is there something like ruby's .inspect in p6?
21:36 gaal avar: I don't know ruby. Does .perl do what you want?
21:37 gaal try: ./pugs -e 'class Foo; has $.x; my $foo = Foo.new(x => 42); $foo.perl.say'
21:37 avar woo, perfect
21:37 avar yeah, that's it
21:38 gaal cool
21:38 avar $ ruby -e 'a = [[1..2], [3..4]]; puts a.inspect'
21:38 avar [[1..2], [3..4]]
21:38 avar $ pugs -e 'my @a = ([1..2],[3..4]); say @a.perl'
21:38 avar [[1, 2], [3, 4]]
21:38 avar ;)
21:39 gaal last I checked reflection wasn't specced very much, though. I imagine ruby has that.
21:39 avar well actually that 1..2 didn't create a range in ruby..
21:39 avar reflection?
21:40 gaal you know, "what is the signature of all the methods in this class"
21:40 gaal but then, stevan and audreyt are working on that stuff.
21:41 gaal ...at least for OO code. I don't know about non-method routines in general.
21:49 avar has quit IRC ("Without you, without you everything falls apart...")
21:53 G2 has quit IRC ("oops")
21:55 lollan has joined #perl6
22:05 kanru has quit IRC (Read error: 110 (Connection timed out))
22:05 kanru has joined #perl6
22:05 ImustDIE has joined #perl6
22:07 avar has joined #perl6
22:22 iblechbot has quit IRC (Connection timed out)
22:22 avar has quit IRC ("reboot")
22:27 avar has joined #perl6
22:48 dduncan has joined #perl6
22:56 stevan_ r0nny: re: the object system,.. I would say it will be about a week before we have anything working which can be used through Pugs
22:57 borkened has joined #perl6
22:57 stevan_ r0nny: it is a slow process, some of the stuff we are doing is being done for the first time (at least as far as I know, and have googled)
22:59 elmex has quit IRC ("leaving")
22:59 stevan_ avar, gaal: re: reflection, the OO reflection should carry over to non-OO code since all things in p6 (at some level) are OO
22:59 stevan_ however, some of those things might be more useful than others
22:59 evalbot_8018 is now known as evalbot_8301
23:00 * stevan_ dinner &
23:12 Juerd I won't be having much time to finish the fears responses.
23:12 Juerd If you have ideas, please don't wait for me :)
23:14 lollan has quit IRC ("Taris Script BETA 1: #bakuretsu-anime on Rizon")
23:15 joepurl has quit IRC (Read error: 110 (Connection timed out))
23:21 clkao gaal: sorry? what problem with 'use'?
23:30 lisppaste3 has quit IRC ("Want lisppaste3 in your channel? Email chandler AT unmutual.info.")
23:30 lisppaste3 has joined #perl6

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

Perl 6 | Reference Documentation | Rakudo