Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-10-29

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:05 ggoebel joined #perl6
00:06 jferrero joined #perl6
00:09 MayDaniel left #perl6
00:10 pythonian4000 is now known as pythonian4000afk
00:12 dnl left #perl6
00:14 jferrero left #perl6
00:35 dukeleto lichtkind: ETOOMANYTHINGS
00:36 lichtkind same here :)
00:40 Chat7676 joined #perl6
00:40 Chat7676 is now known as Bella
00:40 whiteknight joined #perl6
00:41 Bella left #perl6
00:42 stkowski_ joined #perl6
00:43 stkowski left #perl6
00:43 stkowski_ is now known as stkowski
00:51 stkowski left #perl6
00:57 QinGW joined #perl6
01:04 risou joined #perl6
01:07 risou_ left #perl6
01:26 jhuni joined #perl6
01:37 pythonian4000afk is now known as pythonian4000
01:43 pythonian4000 is now known as pythonian4000afk
01:48 pythonian4000afk is now known as pythonian4000
01:48 jasonmay left #perl6
01:49 jasonmay joined #perl6
01:49 dukeleto left #perl6
01:50 dukeleto joined #perl6
01:53 florz left #perl6
01:54 jhuni left #perl6
01:55 lichtkind but im learning to enjoying doing instead of worring about what im missing
02:01 colomon ETOOMANYTHINGS is a way of life here.
02:12 florz joined #perl6
02:12 skangas left #perl6
02:34 whiteknight left #perl6
02:36 rgrau left #perl6
02:39 xinming joined #perl6
02:42 xinming_ left #perl6
02:45 petdance joined #perl6
02:52 lichtkind_ joined #perl6
02:53 lichtkind left #perl6
02:53 lichtkind_ is now known as lichtkind
02:53 lichtkind left #perl6
03:00 obra joined #perl6
03:05 risou_ joined #perl6
03:08 risou left #perl6
03:17 ggoebel left #perl6
03:29 patspam joined #perl6
03:36 nadim left #perl6
03:46 hercynium joined #perl6
03:48 Guest66311 left #perl6
03:59 cdarroch left #perl6
04:05 sftp left #perl6
04:08 patspam left #perl6
04:13 LoRe left #perl6
04:14 hercynium left #perl6
04:14 LoRe joined #perl6
04:15 justatheory left #perl6
04:19 cls_bsd left #perl6
04:25 meppl joined #perl6
04:31 LoRe left #perl6
04:39 petdance left #perl6
04:44 LoRe joined #perl6
05:04 _kaare joined #perl6
05:25 flussence_ joined #perl6
05:25 flussence left #perl6
05:35 cls_bsd joined #perl6
05:36 araujo http://pastie.org/1257320
05:37 lue left #perl6
05:41 pythonian4000 is now known as pythonian4000afk
05:44 araujo http://pastie.org/1257327
05:44 araujo :)
05:59 nymacro joined #perl6
06:00 sorear good * #perl6
06:01 nadim joined #perl6
06:04 envi left #perl6
06:04 dnl joined #perl6
06:05 dnl moinsen
06:07 satyavvd joined #perl6
06:08 envi joined #perl6
06:22 lue joined #perl6
06:23 wtw joined #perl6
06:30 lue left #perl6
06:48 pythonian4000afk is now known as pythonian4000
06:56 Bzek joined #perl6
07:00 lue joined #perl6
07:01 baux joined #perl6
07:01 baux left #perl6
07:05 risou_ left #perl6
07:05 risou joined #perl6
07:06 lue left #perl6
07:09 baux joined #perl6
07:16 nymacro left #perl6
07:22 lue joined #perl6
07:24 jnthn morning, #perl6
07:27 sorear hello jnthn
07:27 sorear (I have a few millituits if you need them)
07:28 jnthn I think I need a few mililakes of coffee... :-)
07:28 sorear Which lake?
07:29 sorear How many km^3 are there in an ISO Standard Lake??
07:29 jnthn Lake Biakal. ;-)
07:29 jnthn gah,
07:29 jnthn Baikal
07:38 kensanata joined #perl6
07:39 lue left #perl6
07:40 jfried joined #perl6
07:48 s1n left #perl6
07:51 sorear I drink by the attolake then
07:55 lue joined #perl6
07:58 dnl left #perl6
07:58 dnl joined #perl6
08:00 cosimo left #perl6
08:01 dnl left #perl6
08:01 dnl joined #perl6
08:03 satyavvd left #perl6
08:06 jnthn Heh. So it turns out Baikal's volume is around 23615.39 kilometers cubed. A few millilakes would thus see me drinking around 70 kilometers cubed of coffee. A typical cup of coffee is, say, 0.25 liters. This occupies about 1/4000th of a cubic meter. In the unlikely event I did the maths right, I'm set to drink 280 billion cups of coffee. That's a little much even for me.
08:09 lue left #perl6
08:11 sorear You only did the math right if your typical cup of coffee is 250 liters
08:12 * sorear is in the one country in the world that uses fl. oz. *raage*
08:12 sorear don't want to talk any perl 6?
08:12 jnthn oh, crap :-)
08:13 jnthn Well, I may have just about drunk enough coffee to do Perl 6 now... :-)
08:13 jnthn I'm meant to be focusing on $dayjob though ;-)
08:13 jnthn Did you see the new multi-dispatch spec? It seems...saner.
08:14 sorear yes
08:15 sorear it basically exactly matches how I was planning to *implement* multi-dispatch
08:15 jnthn Nice :-)
08:16 jnthn I don't think that I like the "instance = curried proto" implementation approach. Still trying to work out exactly what it's an instance of in a sense.
08:16 sorear I have very little hacking or IRC time this week, I'll very likely have a null report for #phasers
08:16 jnthn Plan to try it this weekend.
08:16 sorear it's not a currying of the proto
08:16 sorear it's a partial evaluation of the proto
08:16 jnthn Well, in one place the spec seems to hint that this could be a way to do it.
08:17 jnthn It's one I've pondered in the past, but don't really like.
08:17 sorear the compiler (or role composer) can see all of the candidates, and builds a scope-specific dispatch tree
08:19 sorear note, in particular, that CORE::<&infix<+>> has a fixed set of candidates, so instead of having to partially evaluate a proto, I can just use a hand-written dispatch tree in low-level code
08:19 sorear ie basically what Perl 5 does, and just as fast
08:19 cosimo joined #perl6
08:20 jnthn Aye, the proto there would almost certainly just have { * } as a body.
08:20 jnthn I wonder if CORE immutability means we can rely on wrapping of things declared in CORE to be forbidden.
08:21 sorear it's forbidden to wrap any sub in a compilation unit after that compilation unit has run its CHECK
08:22 jnthn ?
08:22 jnthn I think .wrap is rather more dynamic than that.
08:24 sorear my interpretation of S06:2784 and similar clauses is that AOP cannot cross compilation unit boundaries
08:24 sorear in user code, there is only one compilation unit; it contains all modules and ends right before MAIN
08:25 Trashlord left #perl6
08:25 sorear but we're free to make the setting a separate compilation unit
08:25 sorear the compiler in any event must be a separate compilation unit
08:25 rgrau joined #perl6
08:26 sorear (some remarks of TimToady's lead to the conclusion that the compiler is in a separate AppDomain with its own CORE:: and GLOBAL::, which I'm probably going to do since metacircularity is confusing)
08:26 QinGW left #perl6
08:29 jnthn Hmm. That doesn't quite mesh with the level I'd been considering a "compilation unit" as.
08:29 lue joined #perl6
08:32 sorear the biggest question facing me right now is whether Niecza should be written in Perl 6, versus (say) C#
08:32 sorear pro: the entire compiler is as portable between VMs as the backend
08:32 sorear con: the compiler is a bit slower
08:32 sorear con: compiling the compiler is MUCH slower
08:33 sorear the Niecza compiler is about 12,000 lines of Perl 5 atm.  if I rewrote that in Perl 6, and made Niecza 10 times faster than it is now, I'd still have a 2 minute turnaround
08:33 sorear the Perl 5 compiler gives me a 10 second turnaround, and C# is about as fast
08:38 jnthn We pretty much have the same pros and cons in Rakudo at the moment.
08:39 jnthn The portability is nice BUT it makes development slower.
08:40 lue left #perl6
08:45 jnthn (Plus, there's no actual portable implementation yet.)
08:45 MayDaniel joined #perl6
08:46 mavrc joined #perl6
08:47 lue joined #perl6
08:53 sorear I'm hoping to fix that soon
08:53 jnthn Me too ;-)
08:53 sorear kid51 has drafted me onto the Lorito team
08:53 jnthn Ooh. :-)
08:53 jnthn *That's* nice to hear. :-)
08:54 colbseton` joined #perl6
08:54 sorear it means that instead of just whining about Parrot low-level architecture idiocy, now I can do something about it. maybe.
08:55 * sorear wonders how wrapping a method will work, esp. wrt. nextsame;
09:02 flussence_ is now known as flussence
09:03 Axius joined #perl6
09:05 lue left #perl6
09:08 qwebirc31167 joined #perl6
09:15 masak joined #perl6
09:15 masak oh hai, #perl6!
09:16 vx64z joined #perl6
09:16 jnthn lolitsmasak!
09:16 lue joined #perl6
09:16 masak \o/
09:20 sorear hi masak
09:21 Axius left #perl6
09:28 cjk101010 left #perl6
09:28 lue left #perl6
09:28 cjk101010 joined #perl6
09:29 * sorear out
09:36 colbseton` left #perl6
09:36 colbseton` joined #perl6
09:37 _kaare left #perl6
09:41 masak lunch &
09:42 ggoebel joined #perl6
09:56 lue joined #perl6
10:01 lue left #perl6
10:05 uniejo joined #perl6
10:07 risou_ joined #perl6
10:08 ggoebel left #perl6
10:09 risou left #perl6
10:11 Dunearhp left #perl6
10:12 uniejo left #perl6
10:14 tadzik joined #perl6
10:15 tadzik o/
10:15 lue joined #perl6
10:26 MayDaniel left #perl6
10:30 tadzik left #perl6
10:32 tadzik joined #perl6
10:32 lue left #perl6
10:35 PerlJam left #perl6
10:38 jhuni joined #perl6
10:39 PerlJam joined #perl6
10:39 MayDaniel joined #perl6
10:40 lue joined #perl6
10:40 pythonian4000 is now known as pythonian4000afk
10:41 colomon sorear++
10:47 sjohnson colomon += 2;
10:48 hanekomu_ joined #perl6
10:48 jnthn Mmm...lunch :-)
10:49 sjohnson yo
10:49 sjohnson bed time for me
10:54 jnthn Sweet dreams
10:56 oyse joined #perl6
10:56 sjohnson :)
10:56 * sjohnson dreams of perl 6
10:56 kanishka left #perl6
10:59 icwiener joined #perl6
11:01 lue left #perl6
11:06 lue joined #perl6
11:09 smash joined #perl6
11:09 smash hello everyone
11:10 lue left #perl6
11:10 tadzik hi smash
11:11 ggoebel joined #perl6
11:15 araujo http://pastie.org/1257367
11:17 tadzik1 joined #perl6
11:17 ggoebel left #perl6
11:17 masak new day, new syntax :)
11:18 tadzik1 what syntax?>
11:19 masak araujo's programming language project.
11:20 tadzik left #perl6
11:20 tadzik1 ...at last
11:20 tadzik1 is now known as tadzik
11:20 araujo masak, I kind of considered the 'if' conditionals without parens better :D
11:20 masak I noticed. :)
11:20 araujo and came up with some code today :P
11:20 masak it's still more confusing than helpful to me that there is no 'elsif'-like thingie.
11:21 masak even if it's not necessary from a syntactic viewpoint, it helps remind the reader of what's happening.
11:21 toebu left #perl6
11:21 masak <TimToady> maybe ??? warns on composing, !!! fails, and ... just tries to work
11:22 masak I think that should be in the spec, at least conjecturally.
11:22 masak anyone mind if I add it?
11:23 jnthn masak: +1
11:24 jnthn It still feels fine to me the morning after.
11:24 jnthn Well, day after. :-)
11:24 masak that's a good sign. :)
11:24 * masak refrains from pulling horrible puns from the "you think it's cute today" direction
11:25 frettled Are we talking about kittens?
11:25 masak yeah. kittens. yep.
11:26 jnthn Kittens are cute every day.
11:26 * masak goes looking in S12 and S14 for a nice place to put the above
11:26 jnthn S14
11:26 jnthn I'd expect.
11:27 pnu left #perl6
11:27 araujo masak, you have 'labels'
11:27 masak having looked through S12, I'd agree.
11:28 araujo so they are not keywords, but that ... labels, you can do:
11:28 araujo if = 1 2 then: { .... } else: { }
11:29 araujo in the same way
11:29 araujo if = 1 2 then: { .... } elif: = a + b c { ... } else: { }
11:30 pnu joined #perl6
11:31 hanekomu_ left #perl6
11:32 masak how many times in one scope can I use the 'elif:' label?
11:34 araujo masak, all you want
11:34 masak huh.
11:34 araujo they are like comments
11:34 masak how does one invoke a literal block in koan?
11:35 araujo with '^'
11:35 masak ah, right.
11:35 masak well, it's up to you to make 'elif' and 'else' optional like that. it's your language. :)
11:36 masak (let f \{ :n * n n } { f }) -- isn't that missing a '|' after ':n'?
11:37 araujo | is optional too
11:37 araujo :D
11:37 masak I see.
11:37 masak actually, even with the 'let' syntax, I'd throw in a '=' between the definiend and the definition, just for good measure.
11:37 araujo for small one liners, i think it can be omitted
11:37 masak then why have it at all?
11:38 araujo well, when you have bigger functions, and several arguments, i think it can make code readable
11:38 araujo it is up to you at the end :P
11:38 masak yes, but it's up to you at the beginning :)
11:39 araujo There Is No Way To Do It But The Way You Choose To Do It = TINWATDITBTWYCTDI
11:39 lue joined #perl6
11:39 araujo :D
11:39 masak I'm having difficulty deciding whether that's sagely advice, or somehow even more strict than Python's line.
11:40 araujo hehe
11:40 araujo probably neither
11:40 araujo hence why a koan
11:40 araujo :P
11:41 masak :)
11:47 leprevost joined #perl6
11:54 masak [backlog] millilakes. *chuckle*
11:55 takadonet morning all
11:55 masak takadonet: \o
11:55 takadonet masak: how are u?
11:56 masak I'm fine. and u?
11:56 takadonet busy!!
11:56 takadonet An open book exam for a new position here, giving a perl 6 talk to our lab and wife coming home tomorrow!
11:57 masak Perl 6 talk to your lab. nice!
11:58 lue left #perl6
11:58 jnthn Turns out that a few people at the (C#) place I'm currently consulting have been watching the video of my Oslo Perl 6 talk. :-)
11:59 jnthn Seems to have made a good impression. :-)
11:59 takadonet well if this goes well, it will increase my chances to use perl6 in my work
12:00 takadonet when speed is increased :(. Trying to parse out a few GBytes text files with perl6 would be.......... slow
12:00 takadonet I already tried
12:01 wamba joined #perl6
12:02 leprevost left #perl6
12:02 flussence p6 grammars would probably be faster for me, 99% of my work is figuring out how to parse nasty, undocumented text output formats :(
12:02 leprevost joined #perl6
12:03 takadonet flussence: funny i'm the opposite most of the time
12:06 lumi_ joined #perl6
12:07 lumi_ left #perl6
12:08 risou joined #perl6
12:10 risou_ left #perl6
12:14 takadonet masak: When did Pugs start again? 2004?
12:15 masak Feb 2005.
12:15 takadonet thanks
12:15 takadonet and ended 'active' development in?
12:16 masak I'd say summer of 2007, but it was slow-ish already some time before that.
12:16 drbean left #perl6
12:16 masak see http://strangelyconsistent.org/blog/happy-10th-anniversary-perl-6
12:17 lue joined #perl6
12:18 wamba left #perl6
12:18 wamba joined #perl6
12:25 cjk101010 left #perl6
12:26 tadzik left #perl6
12:29 lue left #perl6
12:32 tadzik joined #perl6
12:47 molaf joined #perl6
12:48 lue joined #perl6
12:51 flussence What does Duration do, exactly? Is it just a stricter number type?
12:52 masak Duration is a Real type, so in that sense it's a number. but it can do arithmetic on Instants, which general Reals can't.
12:53 flussence oh, so in that sense it's a lot like the interval type in postgresql...
12:53 flussence makes sense
12:55 masak I don't know about the interval type in postgresql. maybe if you have a source...
12:56 flussence yep, one sec...
12:56 masak anyway, a Duration is just a time length in atomic seconds.
12:56 masak it's not a range of two Instants or anything like that.
12:57 flussence http://www.postgresql.org/docs/9.0/static/datatype-datetime.html
12:57 flussence in pg it's basically just a strict type, but it also lets you specify the duration as hours/minutes/etc.
12:58 masak there's a special value called... "allballs"? o.O
12:58 flussence SQL is weird.
12:59 masak I'm speechless.
13:00 flussence they don't make it easy to get unixy numeric representations out of their date formats either... :(
13:00 masak hard to tell whether postgresql's 'interval' type is atomic or not. it seems quite tied to years and months, so maybe not.
13:01 flussence I think that's just the format of its input/output strings, the storage size gives a bit of a hint that it works like a normal date value.
13:02 masak ...whatever that means.
13:02 miso_soup joined #perl6
13:02 flussence actually, from the date range given, it looks like it's stored as floating point...
13:04 flussence eww, I never read the docs for this in detail before.
13:07 flussence okay I think I cleared up my confusion; Duration is like the interval type, but not insane.
13:08 timbunce joined #perl6
13:08 risou left #perl6
13:09 plainhao joined #perl6
13:09 takadonet how many tests are they in the Perl 6 official test suite at the moment?
13:09 flussence about 27000, last I checked...
13:10 flussence http://smolder.parrot.org/app/projects/smoke_reports/5
13:10 flussence there's a few numbers to go on
13:10 flussence that includes the non-official tests though
13:16 oyse What are the best resources for Rakudo internals?
13:17 masak oyse: http://github.com/rakudo/rakudo/blob/master/docs/architecture.html
13:17 takadonet flussence: thanks
13:20 lue left #perl6
13:21 oyse masak: what about the runtime architecture? Internal objects created during execution etc.
13:21 Patterner left #perl6
13:22 ggoebel joined #perl6
13:24 masak sounds like what you're describing is the Parrot runtime.
13:24 masak I don't know off-hand where one'd find architecture documentation for that.
13:24 masak somewhere under http://docs.parrot.org/parrot/latest/html/ , I guess.
13:25 oyse masak: Yes it is probably close to the parrot runtime architecture, but I am guessing that Rakudo builds something on top of that?
13:25 oyse e.g. what happens when "my $num = 1" is executed. How is the $num variable stored internally?
13:27 masak oyse: http://gist.github.com/653552
13:27 jnthn The lexpad it's stored in is provided by Parrot. Pretty much all operators - = included - just mean a multi-dispatch.
13:27 masak se especially lines 72 to 75.
13:27 masak s/se/see/
13:28 oyse Ah, I can get the PIR?! Sweet! Thanks
13:28 jnthn So it looks up the container stored under $num, creates an Int and then calls infix:<=> with them.
13:28 jnthn But yes, the PIR reveals all. Note that my declarations also result in something near the top of the sub.
13:30 PerlJam Perl being so english-like sure does make the use-mention problem more pronounced.  :)
13:31 jnthn I need to start quoting when I'm being unmeta. :-)
13:32 Psyche^ joined #perl6
13:32 Psyche^ is now known as Patterner
13:35 oyse So if I understand correctly all the different Perl6 types are implemented as PMCs?
13:36 PerlJam oyse: in Rakudo, yes.  Mostly.
13:36 oyse Mostly?
13:36 jnthn Well, that's not really the case
13:37 jnthn A few low-level bits are
13:37 jnthn Most things are instances of the P6opaque PMC, which subclasses Parrot's Object PMC
13:37 jnthn Though that'll all change in the not too distant future.
13:40 masak \o/
13:43 takadonet when did Rakudo started?
13:43 * takadonet looks at masak
13:44 masak takadonet: see http://strangelyconsistent.org/blog/happy-10th-anniversary-perl-6
13:44 takadonet masak: sorry :(
13:44 masak grep for "Rakudo".
13:45 masak don't be sorry; it's not that I don't want to tell you -- it's just that I said it well there. :)
13:46 BaBiE_AriN joined #perl6
13:47 BaBiE_AriN hi..
13:48 takadonet BaBiE_AriN: hey
13:48 masak hi there
13:50 BaBiE_AriN left #perl6
13:53 _twitch joined #perl6
13:56 wtw left #perl6
14:03 lue joined #perl6
14:04 jaldhar left #perl6
14:06 moritz_malle joined #perl6
14:07 moritz_malle oh hai from mallorca
14:07 masak moritz_malle! \o/
14:07 masak oh, *that's* where you are!
14:07 flussence yay
14:07 smash moritz_malle: hi
14:08 moritz_malle internet price: 1 euro for 12 minutes
14:08 masak scandal!
14:08 * moritz_malle won´t chek mails, otherwise he´ll feel obliged to answer any :-)
14:08 smash 120 euros/day !
14:08 masak we'd better give you your money's worth, then :)
14:09 * moritz_malle expects great entertainment :-)
14:09 moritz_malle my wife too
14:09 moritz_malle what´s new in #perl6 land?
14:10 PerlJam moritz_malle: Some good challenges would be porting specific Perl 5 modules to Perl 6.
14:11 jnthn o/ moritz_malle
14:11 moritz_malle perljam: feel free to propose some - they are not limited to my blog
14:12 moritz_malle perljam: or collect ideas in a repo somewhere
14:12 jnthn moritz_malle: Hope you're enjoying Mallorca :-)
14:12 moritz_malle jnthn: I am, we are :-)
14:12 moritz_malle very good food in rough masses
14:12 icwiener left #perl6
14:12 moritz_malle fresh fruits with every meal
14:12 moritz_malle 2 minutes left...
14:13 masak quick! amuse moritz_malle!
14:14 moritz_malle well, the beach and a good book will do that in a few minutes anyway
14:14 jnthn Can't beach about that.
14:14 jnthn </awful_pun>
14:14 masak :P
14:14 moritz_malle so far I´ve read 3 books from cover to cover, each at least with 400 pages
14:15 moritz_malle yay, jnthn has authenticated himself :-)
14:15 moritz_malle now I know that I didn´t chat with an imposter
14:15 moritz_malle bye bye, I´ll be back late sunday night
14:15 masak moritz_malle: enjoy! hope you come back refreshed and happy from your travels!
14:15 smash moritz_malle: have fun
14:20 moritz_malle left #perl6
14:23 lue left #perl6
14:25 Chillance joined #perl6
14:27 skangas joined #perl6
14:27 miso_soup left #perl6
14:35 colbseton` left #perl6
14:36 colbseton` joined #perl6
14:36 rgrau_ joined #perl6
14:38 pyrimidine joined #perl6
14:40 silug left #perl6
14:40 icwiener joined #perl6
14:45 lue joined #perl6
14:57 jnthn decommute &
14:57 jfried left #perl6
15:00 oyse left #perl6
15:01 pmichaud good morning, #perl6
15:01 colbseton` left #perl6
15:01 colbseton` joined #perl6
15:02 masak mroing, pmichaud.
15:04 smash pmichaud: mornin'
15:05 kcwu left #perl6
15:09 dual left #perl6
15:17 kcwu joined #perl6
15:18 masak http://www.twit.tv/floss140 # merlyn++'s interview with pmichaud++
15:19 masak and lol, I blogged: http://strangelyconsistent.org/blog/second-system-syndrome-done-wrong
15:20 masak longish post. for the tl;dr crowd: most things in the spec are great, but some -- not so much.
15:27 tadzik is there a way to download a video?
15:28 masak I believe it's a radio show.
15:28 masak or a podcast, really.
15:30 flussence masak: I agree with that qw-numbers thing, that's what ».Num is for!
15:30 flussence or commas, even.
15:30 masak aye.
15:30 masak it addresses a real problem, but the solution is potentially so much more painful than the original problem.
15:31 flussence seems to me the benefit gained isn't really enough to justify the hidden magic going on there/
15:31 flussence s|/|.
15:31 masak I don't want those hybrid types screwing up a completely innocent program a few years down the line. I want simplicity. I want a list of strings.
15:32 Ross joined #perl6
15:33 Trashlord joined #perl6
15:37 flussence that reminds me, I actually had a reason to use the p5 "0 but true" string once... in javascript.
15:38 flussence it was someone else's code defaulting to 1 if the input was false... even though 0 was a valid value for whatever it was
15:39 masak Perl 6 turns that hack into a built-in feature. :) (runtime traits)
15:40 mberends joined #perl6
15:40 flussence yep, I noticed "0 but Bool::True" is valid code now while I was typing that
15:40 flussence in that context the choice of "but" makes a whole lot more sense
15:41 flussence (I didn't get it before :)
15:42 Limbic_Region joined #perl6
15:42 justatheory joined #perl6
15:45 tzhs joined #perl6
15:48 \xF0 left #perl6
15:49 jhuni left #perl6
15:50 \xF0 joined #perl6
15:50 colomon masak++
15:55 jnthn morning, pmichaud
15:55 jnthn masak: tl;dr :P
15:55 * jnthn puts it in a tab to read later on :)
15:55 masak :)
15:59 sftp joined #perl6
16:07 masak sftp: hi. I'm told you're preferable to normal ftp.
16:07 masak you probably get that a lot.
16:09 sftp masak -> yeah, it's true
16:09 masak :)
16:15 dual joined #perl6
16:16 cdarroch joined #perl6
16:16 cdarroch left #perl6
16:16 cdarroch joined #perl6
16:17 _twitch left #perl6
16:21 packetknife joined #perl6
16:22 packetknife left #perl6
16:22 stkowski joined #perl6
16:22 packetknife joined #perl6
16:22 packetknife left #perl6
16:22 packetknife joined #perl6
16:23 packetknife left #perl6
16:30 Ross left #perl6
16:31 baux left #perl6
16:33 lamstyle left #perl6
16:35 lamstyle joined #perl6
16:36 cosimo left #perl6
16:37 cosimo joined #perl6
16:40 dnl left #perl6
16:40 kjeldahl joined #perl6
16:40 kensanata left #perl6
16:41 cogno joined #perl6
16:42 kjeldahl left #perl6
16:43 kjeldahl joined #perl6
16:45 tzhs left #perl6
16:46 Ross joined #perl6
16:46 Ross left #perl6
16:46 Ross joined #perl6
16:47 lamstyle left #perl6
16:48 masak nom &
16:48 masak left #perl6
16:49 lamstyle joined #perl6
16:50 Gothmog_ left #perl6
16:53 icwiener_ joined #perl6
16:54 nadim left #perl6
16:55 icwiener left #perl6
16:57 lamstyle left #perl6
16:58 lamstyle joined #perl6
16:58 tadzik left #perl6
17:01 tadzik joined #perl6
17:02 dnl joined #perl6
17:06 nadim joined #perl6
17:11 cogno left #perl6
17:14 Limbic_Region left #perl6
17:21 timbunce left #perl6
17:23 tadzik left #perl6
17:23 tadzik joined #perl6
17:24 cogno joined #perl6
17:26 patspam joined #perl6
17:28 timbunce joined #perl6
17:30 x3nU well, i have bought recently editplus and i'm finishing syntax definition for perl6 and autocompletion
17:30 x3nU nothing advanced
17:30 x3nU though
17:33 cogno left #perl6
17:39 Ross left #perl6
17:40 Ross joined #perl6
17:40 patspam left #perl6
17:42 patspam joined #perl6
17:42 patspam left #perl6
17:43 patspam joined #perl6
17:50 wamba left #perl6
17:58 smash left #perl6
17:59 Ross left #perl6
17:59 jferrero joined #perl6
18:04 * colomon wishes p6 were fast enough to use for this afternoon's $work project
18:07 [particle] use more p6's.
18:08 diakopter heh
18:08 zb left #perl6
18:08 colomon rakudo is just not up to parsing 50meg files yet.
18:09 Tene Yeah, just fork and run on all your cores... oh wait...
18:09 Tene ;)
18:09 constant left #perl6
18:14 zb joined #perl6
18:21 colomon is comb available for p5?
18:25 Tene colomon: my @items = $foo =~ m/(needle)/g
18:25 colomon Tene++
18:31 _kaare joined #perl6
18:32 _kaare Hm, again. Wouldn't it be a good thing at least to mention rakudo releases on blogs that are picked up by feeds?
18:32 tadzik left #perl6
18:33 patrickas joined #perl6
18:34 tadzik joined #perl6
18:35 takadonet colomon: Funny reverse of roles..... Asking for p6 functions in p5.....
18:36 colomon well, my inner perler now speaks p6, so when circumstances force me to go p5, I need translation...
18:36 flussence it seems like they're slowly ending up there anyway :)
18:39 dukeleto If you are interested in mentoring for Google Code-In, please add tasks to this wiki: http://trac.parrot.org/parrot/wiki/GoogleCodeIn2010Tasks
18:42 icwiener_ left #perl6
18:45 colbseton` left #perl6
18:46 hatsefla1s is now known as hatseflats
18:55 TimToady you have to be careful with m/()/g though, since nested parens will return extra fields
19:04 patrickas left #perl6
19:06 orafu left #perl6
19:07 leprevost left #perl6
19:07 orafu joined #perl6
19:08 patrickas joined #perl6
19:13 cognominal left #perl6
19:29 qwebirc31167 left #perl6
19:31 Chat1901 joined #perl6
19:31 Chat1901 hi
19:32 patrickas hi Chat1901
19:32 sbp welcome to #perl6, the channel about http://en.wikipedia.org/wiki/Perl_6
19:32 Chat1901 add me on bbm 226f9390
19:34 Chat1901 hi patrickas
19:34 patrickas sorry no bbm!
19:34 Chat1901 left #perl6
19:48 patspam left #perl6
19:55 patspam joined #perl6
19:56 masak joined #perl6
19:56 masak ahojte, #perl6!
19:56 jnthn o/ masak
19:58 colomon \o
19:58 dalek 6model: c8d35ab | jnthn++ | dotnet/runtime/Runtime/Ops.cs:
19:58 dalek 6model: [dotnet] Make the repr_defined op return an object, so we can actually, like, use it from the setting.
19:58 dalek 6model: review: http://github.com/jnthn/6model/commit/c8d35abb5bae718c622c2e02fafcdeefe62797b3
19:58 dalek 6model: ac08da5 | jnthn++ | common/NQP/NQPSetting.pm:
19:58 dalek 6model: [common] Add .defined methods to the various built-in types.
19:58 dalek 6model: review: http://github.com/jnthn/6model/commit/ac08da5dea8a914a300ece2ccc1551d991a9bb2d
19:59 molaf left #perl6
20:00 Bzek left #perl6
20:00 masak 6model hacking, yay!
20:00 masak jnthn++
20:00 Bzek joined #perl6
20:01 jnthn :-)
20:01 jnthn masak: Nice blog post :-)
20:01 masak thank you :)
20:02 masak it's a controlled rant, more or less.
20:02 cognominal joined #perl6
20:02 TimToady I find it interesting that you want opposite things in adjacent paragraphs :)
20:02 masak :)
20:02 masak I know. but they're not exact opposites.
20:02 jnthn That's inconsis...oh, wait...the blog name.
20:02 jnthn :-)
20:02 masak heh.
20:02 TimToady but it does occur to me that the two dwimmeries are really teh same
20:03 masak maybe they are.
20:03 TimToady so mostly we just need to name it
20:03 TimToady as a concept
20:03 masak but I really don't like having it per default on <>
20:03 TimToady I think it has to be that way
20:03 masak I think it'll screw up things as much as it removes an FAQ.
20:03 TimToady we've relied on it to disambiguoate <1/12> and such
20:03 masak yeah. don't like that either. :/
20:04 TimToady the other solutions were worse
20:04 * diakopter tries to pronounce guoate
20:04 masak at least I don't get the normal warm fuzzies about it.
20:04 TimToady I think you're hung up in P5-think with your mental def of <>
20:04 frettled diakopter: is it similar to ghoti?
20:04 masak diakopter: did I write that? :)
20:04 diakopter no, TT did
20:04 Tene for number lists, we could have an explicit different form
20:05 Tene q:lolnumbers[1 2 3 4 5 6 7 8]
20:05 masak TimToady: I think I'm hung up on tools that do one thing, and do it well.
20:05 TimToady no, I think more like qw// is the string form, and qw:dwim is the def of <>
20:05 masak ok.
20:05 masak didn't think of it that way before. fair enough.
20:06 TimToady and is the same dwim that happens anywhere that strings might be meant as numbers
20:06 TimToady including pre-MAIN
20:07 masak maybe that is the way to go.
20:07 masak my defenses are crumbling :)
20:07 TimToady it feels like the stuff-everything-into-one-place that we did successfully with smartmatching
20:08 jnthn pmichaud: ping
20:09 tadzik left #perl6
20:12 masak Python kills off the Python 2.x branch: http://twitter.com/obra/status/29109607910
20:13 PerlJam smaller impedence mismatch between Python 2.x and 3.x makes that easier to do.
20:13 TimToady which means almost nothing, given py2->3 was just a few tweaks
20:13 masak nod.
20:14 masak chromatic finds a rub, though: http://twitter.com/chromatic_x/status/29116147053
20:15 meppl left #perl6
20:29 am0c joined #perl6
20:35 estrabd is now known as estrabd_afk
20:35 pyrimidine left #perl6
20:48 masak TimToady: does %hash<2/3> have the same magic as <2/3> does?
20:48 masak if not, why not? if it does, how do I get the non-magic form?
20:49 timbunce left #perl6
20:49 Tene masak: %hash{'2/3'} of course.
20:49 masak duh. of course. :/
20:50 masak Tene++
20:50 pythonian4000afk is now known as pythonian4000
20:51 TimToady and if it's a string-keyed hash, it'll pull out the original Str form anyway
20:52 masak ah; indeed.
20:52 masak my arguments are weak and feeble. orz
20:55 perlygatekeeper left #perl6
20:55 timbunce joined #perl6
20:55 TimToady I think of it as an endearing quality  :)
20:56 masak :P
20:56 Tene masak: I'm also skeptical about this num-producing thing.
20:57 masak Tene: are you able to verbalize better than I was why it's a bad idea?
20:59 TimToady the point is, there a places where people are kinda forced to write everything as strings, and these are the places people need relief.
20:59 TimToady especially if the alternative is arduous, or requires eval
21:01 masak I do agree about the problem as stated. the unease is purely related to the solution.
21:01 masak specifically, I don't like the hybrid types.
21:02 Tene masak: hybrid types suggest hackish smell to me, this reminds me of semipredicate problem
21:02 masak Tene: nod
21:02 Tene If you want nums or ints or whatever without commas, either make a different quoting form, or >>.Int or whatever
21:03 TimToady in some sense they aren't hybrids: they aren't really Str anymore, they just come with a .Str that is forced back
21:03 am0c left #perl6
21:03 TimToady >>.Int does no good at all for <1 2.3 4/3 foo>
21:03 masak rakudo: class StrInt is Str { has $.Str; has $.Int; }; my $a = StrInt.new(:Str("42"), :Int(42)); say $a ~~ Str; say $a.Int.WHAT
21:03 p6eval rakudo 479650: OUTPUT«1␤Int()␤»
21:03 Tene TimToady: If you want that, we have *commas*
21:04 TimToady not on the command line you don't
21:04 TimToady and probably not on user input
21:04 Tene masak: for the MAIN signature, my inclination is something more like "$x as Int" instead of a constraint
21:04 masak Tene: problem is, that doesn't affect dispatch.
21:05 masak so different multis would tie.
21:05 TimToady what masak++ sez
21:05 Tene TimToady: what's the connection between user input and <> ?
21:05 TimToady the general case I stated above
21:05 TimToady places where the user is forced to put text, but may mean numbers
21:05 MayDaniel left #perl6
21:06 masak does that include &prompt?
21:06 TimToady I can argue that one both ways
21:06 masak :)
21:06 masak what about $*IN.get?
21:07 Tene If you want numbers from text, I expect you should ask for that.
21:07 jnthn pmichaud: akshually unping :-)
21:07 TimToady tell that to everyone who expects <1 2 3> to do the "right thing"
21:07 masak Tene: I have a counterexample. people reading numbers from $*IN, and sorting them.
21:07 TimToady it has happened over and over
21:08 sjohnson "perl6, always doing the right thing"
21:08 Trashlord left #perl6
21:08 masak question is, how common is the <1 2 foo> case? because if it's not that common, >>.Int would still work.
21:08 masak or >>.Num
21:08 Tene TimToady: so your solution is to make strings that happen to look like numbers behave like numbers?
21:09 Tene What if I'm reading in filenames, and the filenames happen to look like numbers?
21:09 masak what if the strings are freaking huge numbers, purely by accident?
21:09 colomon or better yet, +«
21:09 TimToady that is what the user expects most of the time, and a goodly part of the other times, Cool will save their bacon anyway
21:09 Tene suddenly I get different sorting behavior for one directory than another?
21:09 masak oh right! what's the sorting behavior of the not-really-hybrid types?
21:10 TimToady it's impossible to make everyone happy with sort
21:10 masak right.
21:11 Tene you said MMD, though.  Are my filenames that I read from stdin going to dispatch to different MMD candidates if they happen to look like numbers?
21:11 dalek 6model: 1bb02e7 | jnthn++ | dotnet/runtime/ (2 files):
21:11 dalek 6model: [dotnet] Start working towards some closure support by adding new_closure and capture_outer ops.
21:11 dalek 6model: review: http://github.com/jnthn/6model/commit/1bb02e7757988f6b556e4c40a9f57ec7808493d8
21:11 dalek 6model: 13a72ce | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
21:11 dalek 6model: [dotnet] Compile block references to either capture lexical context or create a closure, based upon $block.closure.
21:11 dalek 6model: review: http://github.com/jnthn/6model/commit/13a72ce82c5f1cb787ee85146031d82c339d0b3f
21:11 dalek 6model: c04f22c | jnthn++ | dotnet/ (2 files):
21:11 dalek 6model: [dotnet] Fix a silly (used static block object instead of dynamic one always) and get our outer from the set one, and we have sufficiently working closures to pass a (modified to avoid NYI return) 48-closure.t.
21:11 dalek 6model: review: http://github.com/jnthn/6model/commit/c04f22cbb6bb8c5017a8ee99baa8ddb20349633d
21:12 masak what if there's one Str candidate and one Num candidate? which way will the special type go? will it tie?
21:12 TimToady no, it would go to the Num candidate
21:13 TimToady but to answer Tene++'s Q, it's rather unlikely that you'd want to feed filenames to a function that is overloaded like that
21:13 icwiener joined #perl6
21:14 am0c joined #perl6
21:14 TimToady and I haven't said that $*IN.get should do it
21:14 Tene TimToady: filenames on CLI args, then.
21:15 tadzik joined #perl6
21:16 tadzik good late-evening
21:16 TimToady if the interface you're calling is overspecific on nominal typing, then you'd have to use ~
21:16 TimToady but Any.Str should work okay
21:16 Tene TimToady: Don't normal Ints and Nums have a .Str method anyway?
21:16 Tene Yeah.
21:17 Tene So how are these hybrid types different from normal numeric types?
21:17 TimToady shadowed
21:17 sjohnson in p6, can one yank something out of an array
21:17 TimToady as in splice?
21:17 sjohnson without undeffing it, then doing a grep { defined }
21:17 sjohnson yeah
21:17 sjohnson the splice scares me, what with all its arguments
21:18 sjohnson for (@list) { # about 3 steps in, say.....  $something = yank; }
21:18 sjohnson just yanks it out of list
21:18 sjohnson kind of like... a pop in the middle
21:18 sjohnson snap()
21:18 sjohnson crackle || pop()
21:18 masak TimToady: another thing that I could have written in the "Abstraction Astronautism" section, but somehow forgot, is the ObjAt thing gotten back from the WHICH macro.
21:18 masak maybe I don't understand it properly, but it seems to me that raises barriers that weren't much needed in the first place (pointer arithmetics?), in exchange for making p6 implementations more complicated.
21:19 Tene sjohnson: @a = @a[0..4],@a[6..*];
21:19 masak sjohnson: &slice
21:20 masak er, &splice
21:20 Tene s/=/:=/
21:21 Tene yeah, &splcie is the right way, but if you prefer not to read the docs for it, you can do that ^
21:21 TimToady gather for @list { .take unless .do-not-want }
21:21 sjohnson yeah, TimToady, thats the idea
21:21 masak TimToady: isn't that just &grep?
21:21 TimToady that is legal P6
21:21 masak oh wait, it's index-based.
21:21 sjohnson the "yank" idea i think it a good one
21:22 sjohnson think of how many times you are parsing @ARGV with a for, and you are stripping out some --switches
21:22 TimToady yank is just a "don't take"  :)
21:22 sjohnson true
21:22 sjohnson cause $_ has the data
21:22 TimToady and "don't take" is usually spelled "next"
21:23 spq1 left #perl6
21:23 sjohnson but if i wanted to kill the value from @ARGV list
21:23 sjohnson if i undef it
21:23 sjohnson the index remains
21:24 _kaare left #perl6
21:24 sjohnson bad example, ARGV, cause maybe i shouldn't altar it.  let's say... @animals
21:24 TimToady you're thinking like an imperative programmer, not like a functional programmer
21:24 sjohnson TimToady: if i told my boss that, would he fire me?  i dont quite know the difference
21:24 sjohnson i can't tell if it's a compliment or not!
21:24 TimToady it's just an observation :)
21:25 TimToady changing something in place is imperative or procedural
21:25 TimToady a functional program will instead return a new list and put it in a new place
21:25 sjohnson is there more than one way to do it?
21:26 sjohnson :)
21:26 TimToady sure
21:26 sjohnson i realize splice is the answer
21:26 sjohnson but i suppose i kind of mean.. it would be neat if you could call splice without many arguments, or none at all
21:26 TimToady splice is the imperative answer :)
21:26 sjohnson and have it do what you like
21:26 sjohnson for example, next unless length;
21:26 sjohnson no args!
21:26 sjohnson maybe  splice;
21:26 sjohnson would junk the current loop index
21:26 TimToady how would it know?
21:27 TimToady for some_function() { splice; }   # huh?
21:27 sjohnson well, if you do... $_ = "pig";
21:27 TimToady the actual array it's reading from may be half-way around the globe
21:28 sjohnson in there, it will change the @in_array value it's on to pig.  is it then difficult to instead just destory the current index?
21:28 TimToady yes, but a rw parameter only has to track the argument itself, it doesn't have to track the outer container
21:28 sjohnson i see
21:28 sjohnson maybe in perl 8 :)
21:29 TimToady it's one of those situations where making it work would slow down the 99% of loops that don't use it
21:29 sjohnson to get around it, i find myself doing @second_stage type lists
21:29 sjohnson and im kinda thinkin... maybe there's a more cryptic way of doing it
21:29 TimToady think of that as the right way to do it, if you name the variable better
21:29 sjohnson the @second_stage idea?
21:29 * sjohnson pats himself on the back
21:30 TimToady if you're just going to feed that list to another function, just compose the two functions
21:30 sjohnson using '
21:30 sjohnson 'next' technology and the like
21:30 TimToady the old .grep.sort.map.grep.classify».foo.grep.map kind of thing, give or take a few block arguments
21:31 TimToady also saves wear and tear on the sigil keys if you don't have to name your intermediates
21:32 sjohnson ahh
21:32 sjohnson assembly-line programming paradigm
21:32 sjohnson i think i need to pay you for perl coaching
21:32 TimToady just pay it forward please :)
21:32 sjohnson i like to do it the TimToady way, which is a bit of a paradox
21:33 jasonmay hah
21:33 * Juerd loves imperative programming
21:34 sjohnson i follow the "Just Do it!" programming model
21:34 Juerd Almost as much as functional programming :D
21:34 colomon sjohnson++
21:34 TimToady I won't object to objects...
21:34 am0c left #perl6
21:34 TimToady though, really, .splice is OO
21:35 Juerd An old sysadmin script that cron ran every 10 minutes started taking almost 10 minutes. The solution: do things in place
21:35 TimToady given the array is an object
21:36 TimToady from the FP view, OO programmers are continually cheating the type system, and often get away with it, until they don't :)
21:38 TimToady from the OO view, FP programmers don't know the first thing about how the real world works.  :)
21:38 envi left #perl6
21:39 sjohnson TimToady: what do you think of this methodology:  http://pastie.org/1258982
21:39 * colomon wants his objects' methods as pure as reasonably possible, and his I/O untouched by monads.
21:40 sjohnson i just wrote it.  is this how you would do something similar?
21:40 sjohnson (oops, extra whitespace on line 12)
21:40 Tene sjohnson: the simple, imperative way to remove list indexes is splice, as we've already said.
21:41 TimToady it doesn't work very well as soon as you want your switches to have extra arguments
21:41 Tene sjohnson: you really should use a MAIN sub for that.
21:42 TimToady it was p5
21:42 TimToady in p5 I tend to shift my @ARGV destructively
21:42 Tene sub MAIN(@*pertinent, :$verbose, :$dryrun) { ... }
21:42 TimToady but yeah, this is better solved by binding to a MAIN sig in p6
21:43 TimToady s[ '@*' ] = '*@';
21:44 Tene Oops, yeah.
21:44 sjohnson TimToady: in this case, im not sure how i could use your grep.map.other stuff tricks
21:44 sjohnson to avoid a 2nd stage @pertinent_arguments list
21:45 TimToady well, in this case, you have a good name, which probably means it's worth naming
21:46 sjohnson heh
21:46 sjohnson glad you liked it
21:46 TimToady a name like @second-stage is relatively meaningly
21:46 TimToady meaningliess*
21:46 TimToady grr
21:46 sjohnson perl advice straight from the camel's mouth!
21:46 TimToady m e a n i n g l e s s . . .
21:46 sjohnson much appreciateed
21:46 TimToady there
21:46 sjohnson -e
21:46 sbp unmeaningful
21:46 Tene or even better, @filenames, or @servers, or @ips, or whatever
21:46 TimToady Mu
21:47 sjohnson Tene: yep. in the real stuff i do it for, it will be @files or something
21:47 sjohnson or @isbns
21:47 sjohnson in that example, just was a bit more vague as the program doesn't do anything
21:47 masak I'm writing a Perl (5) course. this FP map.grep.map tip comes in handy for the next part of that course as well. thanks.
21:47 Tene naming something "arguments" kinda irks me there, unless you're like gathering arguments to pass to a command or something.
21:47 TimToady well, if you never put a non-isbn into @isbns, you don't have to grep 'em out
21:48 Tene sjohnson: which makes it awkward to actually answer your question.
21:48 sjohnson TimToady: the @isbns would come from @ARGV though
21:48 Tene Yes, so you gather them under another name.
21:48 sjohnson Tene: you answered it exactly how i hoped
21:49 Trashlord joined #perl6
21:49 sjohnson i couldn't have bought a better answer
21:49 TimToady Moral: it's best if variable names don't lie.
21:49 masak Name Your Variables Well.
21:49 sjohnson you can tell a lot about the character of a man by his variable names
21:49 TimToady and every time you do a modification in-place, the variable name is lying, or is overly generic
21:49 sjohnson if he's trustworthy or not
21:50 masak TimToady: that must be why I never know what to name accumulator variables that I increment in a loop.
21:51 Juerd $data
21:51 sjohnson thanks for looking at my cute code you guys
21:52 Tene np
21:52 masak anytime.
21:52 Juerd masak: And if $data is taken, just use $moredata
21:52 masak Juerd: what would I do without you? :)
21:52 TimToady the need for accumulator variables probably just means the language designer is an idiot :)
21:52 Juerd masak: You'd probably have named it $foo, which is a really silly name and utterly non-descriptive.
21:53 masak Juerd: yeah. what would I have been thinking?
21:53 Juerd The name "foo" doesn't say anything about the contents of the variable, while "data" does.
21:53 masak absolutely.
21:53 masak "data" is much better than "foo".
21:53 Juerd Agreed. I'm glad you brought this up.
21:53 TimToady unless you happen to be foo processing
21:54 Juerd TimToady: There's no way to be sure
21:54 sbp or your native language is one where foo means data
21:54 TimToady Juerd: just read the comments, then you'll know for sure
21:54 Juerd I used to call my variables $info, but that turned out to be a lie too.
21:54 TimToady metadata should always go into comments
21:55 sbp $thisVariableBelongsToEpimenides
21:55 sbp that should probably be a scope
21:55 sjohnson i usually use animal words instead of foo and bar
21:55 sbp epimenides' $variable = ...;
21:55 sjohnson i think their cuter
21:55 masak Juerd: I'm thinking of calling some of my variables $value
21:56 TimToady .oO(three animals walk into a foo...)
21:56 Juerd TimToady: There are no comments in my code. Comments are not necessary if code is self-documenting, like for dwim($data) -> $data2 { dwim2($data2); }
21:56 sjohnson <cow pig chicken> allows a 3rd variable
21:56 sjohnson though i think "baz" is the 3rd one
21:56 Juerd sjohnson: $data, $data2, $data3, $data4 allows for as many as you'd ever need!
21:57 sjohnson Juerd++ # the knuth of perl
21:57 Juerd sjohnson: And symbolic references even let you iterate over all your datas
21:57 TimToady it's much more convenient for dereferencing if you name the first one $data1
21:57 MayDaniel joined #perl6
21:58 TimToady so all variables should in with '1' in case you need more of 'em
21:59 Juerd p5: for (1..99999999) { if (${ "data" . ($_ > 1 ? $_ : "") } =~ /regex/) { die "Data contains 'regex'!!!11" } }
21:59 orafu left #perl6
21:59 TimToady orz
21:59 sjohnson starcontrol II
22:00 masak the channel is just teeming with variable naming advice tonight.
22:00 Tene masak: you've seen rfc3092 yes?
22:00 Juerd In very complicated programs, like those with nested loops, I may use identifiers like $data5a, $data5b, ...
22:00 Tene .g rfc3092
22:00 phenny Tene: http://www.faqs.org/rfcs/rfc3092.html
22:00 * masak looks
22:00 TimToady $dataa5 is a bit problematical though
22:01 sjohnson nothing beats @asokdfjgrew
22:01 Tene First on the standard list of metasyntactic variables used in syntax examples (bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud)
22:01 TimToady that can't be true; waldo was too easy to find
22:01 Juerd :)
22:02 masak Tene: wonderful. thanks.
22:02 Juerd He wouldn't have been if his name were data
22:02 TimToady I only liked the original series.
22:02 Juerd Code security remains important
22:03 masak Tene: speking seriously for a while, I'm at a stage in my variable-naming where I very seldom end up with "foo". I guess I used to, but nowadays I tend to take naming more seriously than that. I use "foo" in string literals sometimes.
22:03 TimToady especially if followed by a "d"
22:03 Juerd I don't think I've ever used "foo" in serious code.
22:03 * diakopter spews
22:04 * Tene contributes a spec test change, s/*/foo/g
22:04 Juerd In non-example code, even.
22:04 sbp I've got a good example of this, YOU HOLD ON RIGHT THERE
22:04 Tene s/test //
22:04 flussence I am guilty of using "i" for a loop var :(
22:05 lucs i++
22:05 TimToady sbp: sorry, I tried, but the earth is rotating too fast </pant /pant /pant/
22:05 TimToady >
22:05 flussence (use ii, it's more greppable)
22:05 Juerd flussence: Doesn't everyone do that?
22:05 sbp .title http://gist.github.com/654528
22:05 phenny sbp: gist: 654528 - Code Shui- GitHub
22:05 TimToady I tend to like $ix if it's an index
22:05 Juerd I grew up with BASIC, so it took a while for me to adjust from "X" to "i"
22:05 masak TimToady: I know a pole or two you could move to to rid yourself of that problem.
22:05 sbp python, but you get the idea. a method in a simple editor
22:06 sbp the first causes splosions in the cranial region
22:06 TimToady I'm just waiting for someone to install an East Pole in the correct place.
22:06 sbp the second is practically self documenting
22:06 flussence I learned to stop doing it after trying to debug code with two adjacent nested loops
22:06 sbp just from the variable names
22:06 sbp (and method names, and the such)
22:07 Tene an ex co-worker (who just left; anyone want a job?) had this horrible habit of naming his variables with leading underscores indicating the level of nested scope.
22:07 Juerd flussence: Why would you have two adjacent loops over indices?
22:07 masak TimToady: they've been talking about the East Pole for years now. I'm starting to suspect it's a vapor-pole.
22:07 Juerd Tene: Not a big fan of refactoring, probably :)
22:07 Tene my $foo; sub bar { my $_lol; while true { my $__wtf; } }
22:07 flussence this was html formy stuff, one was to get input/textarea values, the other was select values because it's slightly different...
22:07 tadzik I suppose it's twice as far as the Middle East
22:08 Tene and then it was inconsistent in places too.  :(
22:08 Juerd flussence: But why would you loop over the indices if you can loop over the values proper?
22:08 flussence that was in js, no foreach over dom node lists :(
22:09 flussence turned out to be good practice everywhere though
22:09 Tene He wouldn't actually give any reason for doing it, and he refused to stop doing it.  He also committed modules generated by h2xs, as he wasn't able to write 'package Foo;' himself, or something?
22:10 TimToady when you mention h2xs I throw up a little in my mouth
22:10 flussence Tene: half the code I maintain at $dayjob has weird underscores to indicate not to use it outside the package... the problem is the other half doesn't.
22:11 dukeleto TimToady: that is good to hear :)
22:11 Tene Fortunately he mostly stayed away from Perl these days.
22:12 Juerd flussence: It's probably a good idea to stop using globals altogether, rather than indicating which ones can and which ones shouldn't be touched.
22:12 TimToady but that isn't portable
22:12 flussence those were method names...
22:13 Juerd I see
22:13 flussence (the code's actually pretty good about avoiding globals)
22:13 Juerd Let's stop using global function names too :D
22:13 TimToady okay
22:13 TimToady done
22:13 Juerd :)
22:14 TimToady perl6: say GLOBAL::.keys
22:14 p6eval rakudo 479650: OUTPUT«Could not find sub &GLOBAL␤  in main program body at line 22:/tmp/hYsbH7Z8gR␤»
22:14 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "GLOBAL"␤    expecting bare or pointy block construct, ":", "=>" or operator␤    at /tmp/Y_Hg8hAmay line 1, column 5␤»
22:14 Juerd If all function names were lexical to their own block, you'd never have to worry about something else calling it.
22:15 * Juerd wants to go back to copy-and-paste programming
22:16 Juerd And I long for "goto 10"
22:16 * TimToady invents hygienic copy-and-paste
22:16 Juerd copy/paste could be improved with copy on write!
22:16 TimToady unfortunately, the margins are too small, and irssi won't let me paste the solution here
22:17 TimToady Juerd: you jest, but that's sort of the essence of Xanadu
22:17 lucs TimToady: Nelson's Xanadu?
22:18 TimToady *nod*
22:18 Juerd I don't know what Xanadu is, but I figure that it's probably incredibly scary.
22:18 sbp scary and awesome
22:18 * Juerd googles
22:18 sbp .wik Xanadu (Nelson)
22:18 phenny "Theodor Holm Nelson (born 1937) is an American sociologist, philosopher, and pioneer of information technology." - http://en.wikipedia.org/wiki/Ted_Nelson
22:18 TimToady it was sort of revision control for the whole world of text, if you believe in ASCII
22:19 Juerd "Wired magazine called it the "longest-running vaporware story in the history of the computer industry"."
22:19 timbunce left #perl6
22:19 Juerd When will Wired write about Perl 6? :)
22:19 sbp back in them days we didn't have no fancy unicode, we had to work down t' mines with a pint of coal and a pencil made of chloroform...
22:19 TimToady hasn't sucked up enough money yet
22:20 jnthn We're working on it.
22:20 jnthn Oh, wait...
22:20 alester left #perl6
22:22 sjohnson they called perl6 vaporware?
22:22 Juerd No, Project Xanadu
22:23 sjohnson interesting
22:23 sjohnson never heard of it
22:23 sjohnson guess that's not surprising
22:23 masak that Wired article has been described as very mean-spirited. (don't remember by who.)
22:24 sbp true fact: Ted Nelson, when he was young, used to cross roads by turning his back to the traffic and just jumping out. he figured they'd stop, and he wouldn't have to wait. must have worked because he's still alive. won't test, DONTTRY, WONTFIX
22:24 sbp that might be from the Wired article, now that I think of it
22:24 sbp something I read years ago, don't blame me for bibliographic inaccuracies
22:25 x3nU ftp://x3n.info/pub/apps/win32/x86/rakudo-star/rakudo-star.2010.10.exe
22:26 tylercurtis joined #perl6
22:27 * TimToady offers his condolences to any future historians who are only now just trying to wade through all this stuff and nonsense to try to figure out how Perl 6 succeeded (or didn't) and why.
22:27 masak *lol*
22:27 * masak waves peevishly at same historians
22:27 jnthn I imagine that Perl 6 must be one of the most documented language design/implementation proccesses.
22:27 x3nU (note that this win32 build is totally untested, i'll test tommorow)
22:28 sbp no, no, historians LIKE the messy stuff
22:28 masak historians: TimToady may be apologetic, but I only intend to make life harder for you! I'm in ur meme stream, mucking things up!
22:28 sbp it's all the tidied up, heavily groomed rubbish that they hate
22:28 sbp because it has all the layers of cultural bias and other similar historical perversions in it
22:28 sbp which, unless you're studying the history of cultural bias, isn't all that helpful
22:28 jnthn Do historians like puns? :-)
22:29 Trashlord left #perl6
22:29 sbp only if they're really punny
22:29 TimToady only if they're pundits
22:29 sbp they answer everyþing with a þong
22:30 * TimToady recovers enough to wince
22:30 masak do they wear the þongs?
22:31 masak or maybe they just use them for smilies:    :þ
22:32 TimToady that looks...sloppy and wet...
22:32 masak
22:32 sbp eths wynn
22:33 kjeldahl left #perl6
22:33 TimToady what that, someone blowing a smoke X?
22:33 TimToady *what's
22:33 TimToady or someone showing off a tongue piercing?
22:34 masak :D
22:34 sbp this is getting somewhat off-topic, but...
22:34 masak O RLY?
22:34 sbp I assume you've seen the awesome new additions to Unicode?
22:34 sbp e.g. U+1F343 LEAF FLUTTERING IN WIND
22:34 TimToady ow
22:34 * masak has only seen the new smilies
22:34 sbp it's like a whole new plane of dingbats
22:35 sbp seriously, U+1F304 SUNRISE OVER MOUNTAINS
22:35 sbp can't wait for Michael Everson to give us all some nice glyphs for these
22:35 flussence I was about to suggest something like that, satirically...
22:35 flussence but wow.
22:36 TimToady how do we know it's really a sunrise, and not a sunset running backwards?
22:36 Tene Man, Michael Everson.  It's interesting to see the same person come up in different circles.
22:36 mavrc left #perl6
22:36 Tene He started a huge argument on the lojban mailing list a while back.
22:36 masak :)
22:36 sbp Buckminster Fuller suggested we call sunset "sunclipse"
22:36 phenny sbp: 22:36Z <[bjoern]> tell sbp h ttp://www.textfiles.com/underconstruction/
22:37 masak sunrises, lojban arguments. I gotta look this guy up.
22:37 sbp can't remember what he suggested we cal sunrise though
22:37 flussence unsunclipse?
22:37 TimToady sunprise!?!
22:37 Tene masak: it was for his publication series of translations of Alice in Wonderland
22:37 sbp oh, he suggested "sunsight" for sunrise
22:38 * sbp coughingly mentions http://www.mikeoates.org/mas/leek/sunset.htm by-the-by
22:38 Tene He wanted to publish the lojban translation of Alice in Wonderland, but he wanted to reformat it to add initial capitals to sentences and names, drop the normal lojban punctuation, add periods at the end of lojban sentences, etc.
22:38 risou joined #perl6
22:38 Tene So it would still (mostly) be isomorphic to lojban, but would be very atypical for lojban.
22:38 masak Tene: eew
22:39 masak that sounds very iconoclastic, from the Lojban viewpoint.
22:39 Tene yeah
22:39 kulp joined #perl6
22:39 TimToady yeah, like logban isn't complete artifice to begin with...
22:39 Trashlord joined #perl6
22:39 kulp left #perl6
22:39 TimToady *lojban
22:40 Tene TimToady: Nobody claims that it isn't...
22:40 masak TimToady: hey! they did make their words from random letter from the world's languages... :)
22:40 masak *letters
22:40 TimToady let's never us mind that humans like to have their languages organized into nouns and verbs to go into different brain bits
22:41 TimToady and let's just define each verb to have its own positional parameters willy nilly
22:41 masak Lojban wasn't designed with puny humans in mind.
22:41 masak but yeah, the positional params suck.
22:41 TimToady what about punny humans?
22:41 flussence .oO( Lojban sounds like PHP... )
22:41 sbp don't start that again, puns are a thorny issue here now
22:42 Tene yeah, totally better to first come up with a complete map and categorization of all possible types of parameters, and order them in universal importance order.
22:42 TimToady ÞþÞþÞþÞþÞþÞþ
22:43 masak thank you. now don't ever do that, again.
22:43 * masak pulls out a couple of thorns
22:43 sbp TimToady: get þee to a punnery!
22:43 masak *groan*
22:44 masak *lol*
22:44 jnthn :D
22:44 masak sbp++
22:44 Juerd
22:44 masak rakudo: say "sbp++" for ^10
22:44 p6eval rakudo 479650: OUTPUT«sbp++␤sbp++␤sbp++␤sbp++␤sbp++␤sbp++␤sbp++␤sbp++␤sbp++␤sbp++␤»
22:45 icwiener left #perl6
22:45 * TimToady wonders what the opposite of a punnery is, genderwise...
22:46 sbp a monadstery?
22:46 masak a mona-hystery?
22:47 jnthn I dunno, but the leader of it is a puntiff.
22:47 sbp :-)
22:48 TimToady whereas the leader of a punnery cannot rise above the level of an Abscess
22:50 dnl left #perl6
22:51 sbp rakudo: say \frac{\pi^2}{6}
22:51 p6eval rakudo 479650: OUTPUT«Could not find sub &frac␤  in main program body at line 22:/tmp/DasCYBtyCY␤»
22:51 sbp someone will create a latex dialect for perl6, right? right?
22:51 diakopter in some universe..
22:52 TimToady how else will we know who to shoot first?
22:52 sbp heh!
22:52 masak I'd like to see a sturdy tool that could turn Perl 6 source code into beautifully laid-out TeX output.
22:52 tadzik sbp: ooc, what should the code do?
22:53 Tene masak: alternate compiler backend, perhaps?
22:53 sbp tadzik: presumably it would let you use latex expressions anywhere that you'd have a mathematical expression in perl6. don't ask me, I'm just the imaginer, the visionary, the one in danger of being first against the wall when the revolution comes (but I'll just blame Knuth)
22:54 sbp (he won't be able to say anything because he doesn't use email. take that, Prof. Luddite)
22:54 diakopter sbp: but then it'd have to also re-implement all of latex...
22:54 dnl joined #perl6
22:54 masak Tene: yes, maybe -- though "backend" makes me suspect it gets things in a too-digested form.
22:54 TimToady um, this isn't email...
22:54 sbp so what? it's 2010, come on. gimme a break. what did Djikstra say? all programmers do now is glue libraries together?
22:55 sbp no, but I could hack up an email-to-irc bridge
22:55 dnl left #perl6
22:55 sbp *-ij-
22:55 TimToady you have a point
22:55 Tene masak: translate the parse tree to custom nodes that render LaTeX, basically.
22:55 dukeleto sbp: do you have an reference for that Dijkstra quote?
22:55 TimToady or perhaps a punt
22:57 dukeleto Tene: that sounds awesome
22:57 sbp dukeleto: oh cruel irony! it wasn't Dijkstra at all
22:57 dukeleto Tene: so it would do PAST->LaTex ?
22:58 sbp it was... Prof. Knuth!
22:58 sbp “There’s the change that I’m really worried about: that the way a lot of programming goes today isn’t any fun because it’s just plugging in magic incantations — combine somebody else’s software and start it up”
22:58 dukeleto sbp: what is that from?
22:58 Tene dukeleto: PAST is too low, really.
22:58 dukeleto Tene: what is high enough?
22:58 sbp .g "just plugging in magic incantations"
22:58 phenny sbp: http://reprog.wordpress.com/2010/03/03/whatever-happened-to-programming/
22:58 Tene dukeleto: the match object
22:58 Tene dukeleto: what rakudo uses for --target=parse
22:58 sbp p.594 of Coders at Work
22:58 sbp by Siebel
22:59 TimToady hmm, I'm likely to see Knuth this weekend...
22:59 TimToady I mean, a week hence
22:59 sbp tell him I'm very sorry for my luddite slur
22:59 masak tell Knuth we said hi!
22:59 sbp actually, if you want to really make yourself useful...
23:00 dukeleto TimToady: tell him I said "Thanks for LaTeX, dude"
23:00 sbp TimToady: tell him that the W3C Validator team were actually very impressed by the email he sent them a few years ago rightly complaining about them changing their architecture out from underneath him rendering his old pages invalid
23:00 masak actually, I meant to do all the exercises in Knuth's books, but Perl 6 kinda got in the way... :)
23:00 sbp their minds were sort of blown
23:00 TimToady in other words, he was being a Luddite :)
23:01 sbp YES!
23:01 masak they changed their architecture?
23:01 sbp well, they were changing their architecture; and in the process they got rid of some *very* old crufty DTDs that nobody used anymore. except, guess what? Knuth had learned how to make websites from a book in like *1993*, I kid you not. and it had this old doctype in it
23:01 sbp and he'd been using it ever since!
23:02 dnl joined #perl6
23:02 masak pfft, the w3c getting rid of doctypes. there's your mistake right there.
23:02 masak you can't invalidate parts of the web. or at least, it's a disgrace.
23:02 masak I'm with Knuth on this one.
23:02 sbp timbl said the Validator works the wrong way around
23:02 sbp it penalises people for making mistakes
23:02 sbp he said it should award points for the things that people get right
23:03 sbp perhaps code syntax checking should work that way too
23:03 TimToady and the larger the font, the more points
23:04 masak note the modules.perl6.org does the "award points" thing.
23:04 masak s/the/that/
23:04 TimToady masak++
23:04 dukeleto TimToady: i am concerned about the avg default font size on the web as well. It is bad for the eyes.
23:04 * patrickas notes that it was masak++'s idea
23:05 diakopter nosquint plugin for firefox is the bestest
23:05 masak now I get points for awarding points. how referent.
23:05 TimToady "Your karma exceeds the syntactic distress of this program, so we'll just try to run it anyway..."
23:05 Tene dukeleto: people don't just adjust their browser or desktop preferences?
23:05 masak TimToady: I wish.
23:06 * flussence is still holding out for a 300dpi desktop screen within my lifetime...
23:07 TimToady just look at your HDTV through binoculars the wrong way
23:07 TimToady works in 3d too
23:08 masak 'night, #perl6 :)
23:08 flussence hmm... red-green 3D binoculars
23:08 flussence o/ bai
23:08 TimToady masak: night
23:08 tadzik 'night masak
23:08 masak left #perl6
23:11 dukeleto Tene: i just crank my default way up, but some sites require manual intervention
23:15 dalek 6model: 25487a2 | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
23:15 dalek 6model: [dotnet] Implement compilation of pasttype return (though there's no handler installed to catch it just yet.
23:15 dalek 6model: review: http://github.com/jnthn/6model/commit/25487a28463547a6211c1696c2f74a7a5c806b42
23:15 dalek 6model: 083fa12 | jnthn++ | dotnet/ (2 files):
23:15 dalek 6model: [dotnet] Stub in block handlers setup.
23:15 dalek 6model: review: http://github.com/jnthn/6model/commit/083fa127b386a86d237851eb61793c209cc91ded
23:15 sjohnson i feel good today.  i argued to fix a security play in GnuPG, and there were a few nay-sayers, but the developers agreed with me in did it.
23:15 sjohnson maybe i can do the same for perl 6 someday :3
23:16 sjohnson .oO(still waiting for good ideas)
23:18 tylercurtis left #perl6
23:25 pythonian4000 is now known as pythonian4000afk
23:27 MayDaniel left #perl6
23:27 sorear I think that the most fundamental mismatch between Perl 5 and Perl 6 is that in Perl 5, Int is a subtype of Str
23:28 sorear Perl5think still holds that "everything is a string" tclishly, although this has not been strictly true since Perl 5.0 (not all $foo eq "ARRAY(0x8064304c)" are created equal)
23:30 patrickas left #perl6
23:34 Limbic_Region joined #perl6
23:45 sorear phenny: tell masak to check out lhs2tex
23:45 phenny sorear: I'll pass that on when masak is around.
23:46 Trashlord thanks
23:46 Trashlord that means a lot
23:46 sorear ?
23:46 sorear talking to em?
23:47 Trashlord disregard, random drunken talk
23:47 Trashlord I'm just surprised I didn't say anything here earlier, heh
23:47 Trashlord you'll come to realize I'm usually like this
23:51 krakan left #perl6
23:51 krakan joined #perl6
23:56 krakan left #perl6
23:57 javuchi joined #perl6
23:57 javuchi ey how fast is parrot compared to the jvm?
23:58 tadzik ask #parrot on irc.perl.org. Parrot is not as mature as JVM, it doesn't have JIT and GC is far from perfect. But if you pay attention, you will see they're improving fast
23:58 tadzik JVM has years of optimizations after it, Parrot is a lot fresher compared to it
23:59 sorear parrot's current speed is a joke, nobody will deny this
23:59 javuchi i'm trying to find some information regarding speed
23:59 javuchi that bad, sorear?

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

Perl 6 | Reference Documentation | Rakudo