Camelia, the Perl 6 bug

IRC log for #perl6, 2009-08-18

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:10 qp_pq joined #perl6
00:10 qp_pq hi moritz_
00:11 qp_pq I need to write something that parses logs and spits out some nice graphs
00:11 qp_pq er..charts
00:11 qp_pq and I saw you guys were making some progress on some modules...
00:11 qp_pq for charting using SVG
00:12 qp_pq they look really cool and I get the feeling of jumping in and using them
00:13 TimToady moritz_ is probably asleep at the moment
00:16 qp_pq TimToady: he has an email maybe ?
00:18 TimToady dunno offhand
00:18 TimToady presumably, or he wouldn't have a pugs commit bit
00:25 qp_pq is there some special namespace on cpan for p6 modules ?
00:26 wayland76 qp_pq: Not at the moment.  The whole "What we're doing with CPAN" thing is still not well defined
00:27 wayland76 sent moritz_'s address to qp_pq privately
00:27 wayland76 So as to avoid spam for moritz -- please don't post it on the channel :)
00:29 wayland76 But probably just ask questions on the channel instead of e-mailing moritz.  There's also a perl6-users mailing list: http://dev.perl.org/perl6/lists/
00:30 PZt joined #perl6
00:31 qp_pq what should I look on for some quick svg docs , tutorial or something
00:31 qp_pq I want to jump in , read the module and add some functionality to what he wrote
00:31 youwin joined #perl6
00:31 qp_pq svg-plot that is
00:34 wayland76 You mean perl6 specific, or just in general?
00:38 ruoso joined #perl6
00:43 nErVe joined #perl6
00:50 sjohnson howdy wayland76
00:50 wayland76 sjohnson: g'day :)
00:51 wayland76 Hmm, I think we've discovered two more entries for the parametric roles example that greets people in their language :)
00:53 sjohnson there's a whole whack of them to use for later
00:55 sjohnson rakudo:  given "text" {    when m/ex/ { print "found ex"}       when m/(t$)/ { print "found $1"}   }
00:55 p6eval rakudo 0d4fe0: OUTPUT«found ex»
00:57 sjohnson rakudo: given "1" {   when '1' { print "A"; }  when '1' { print "B"; } }
00:57 p6eval rakudo 0d4fe0: OUTPUT«A»
00:58 sjohnson is there a way for the given/when structure to go through all the when's in the statement?
00:58 sjohnson or is it called a "do" statement
01:00 sjohnson oh, i think it's "continue"
01:02 sjohnson could a name like, "do" be used in place of "when" for if you want it to just continue; at the end of the block?  or am i losing my mind
01:08 sjohnson or maybe "try"
01:09 frew joined #perl6
01:12 colomon I've been assuming (without checking it out in detail), that each when triggered automatically jumps to the end of the block.
01:13 tak11 joined #perl6
01:13 colomon Time to check the spec...
01:16 sjohnson rakudo:  given "text" {  when m/ex/ { print "found ex "; continue}  when m/(t$)/ { print "found $1 "} }
01:16 p6eval rakudo 0d4fe0: OUTPUT«found ex Use of uninitialized value␤found  »
01:16 colomon where do you want the continue to go?
01:16 sjohnson after the first check
01:16 sjohnson rakudo:  given "text" {  when m/(t$)/ { print "found $1 "} }
01:16 p6eval rakudo 0d4fe0: OUTPUT«Use of uninitialized value␤found  »
01:17 sjohnson perhaps they don't use $1 anymore
01:17 colomon $0
01:17 * sjohnson codes in too much Perl 5
01:17 colomon is the first match.
01:17 sjohnson rakudo:  given "text" {  when m/(t$)/ { print "found $0 "} }
01:17 p6eval rakudo 0d4fe0: OUTPUT«found t »
01:17 sjohnson thanks mate
01:17 sjohnson rakudo:  given "text" {  when m/ex/ { print "found ex "; continue}  when m/(t$)/ { print "found $0 "} }
01:17 p6eval rakudo 0d4fe0: OUTPUT«found ex found t »
01:17 sjohnson perfect
01:17 colomon I'll be darned.  Didn't know that was possible.
01:18 sjohnson i'm wondering if it can be done easier... with a different word than "when"
01:18 sjohnson run, try, do would be good keywords
01:19 colomon Well, "if" would do it, right?
01:19 sjohnson if i could use if and it uses $_ as the switch var, probably could be done
01:19 sjohnson let's see if it breaks the compiler
01:20 colomon good plan.
01:20 colomon (Bet it doesn't.)
01:20 sjohnson rakudo:  given "text" {  if (m/ex/) { print "found ex "; }  when m/(t$)/ { print "found $1 "} }
01:20 p6eval rakudo 0d4fe0: OUTPUT«found ex Use of uninitialized value␤found  »
01:20 sjohnson oops
01:20 sjohnson rakudo:  given "text" {  if (m/ex/) { print "found ex "; }  when m/(t$)/ { print "found $0 "} }
01:20 p6eval rakudo 0d4fe0: OUTPUT«found ex found t »
01:21 * sjohnson pats colomon on the back
01:21 colomon rakudo:  given "text" {  if m/ex/ { print "found ex "; }  when m/(t$)/ { print "found $0 "} }
01:21 p6eval rakudo 0d4fe0: OUTPUT«found ex found t »
01:21 sjohnson ya that was going to be my next text
01:21 colomon I think we're figuring this thing out.
01:21 shinobi-cl joined #perl6
01:21 sjohnson i think it's kind of a big deal this given/when thing
01:21 reppie left #perl6
01:21 sjohnson the core module in Perl 5 (switch) is very fragile
01:22 sjohnson and buggy, and doesn't support regex matching in case statements
01:22 colomon I suspect the Perl 5.10 version is better?  (Or is that what you're talking about?  I remember the module being a disappointment.)
01:22 sjohnson yep that is the one i mean
01:22 colomon Ah.  I've never really used 5.10.
01:22 sjohnson i am surprised it made it into the core module packages
01:23 sjohnson well, i am using 5.8.8 but i think it might be unlikely that it is any different in the newer perl 5's
01:23 sjohnson oh well, i can hold off until Perl 6
01:23 colomon I think when, in particular, is fantastic.  It doesn't have to work with given, which allows a lot of pretty code.
01:23 colomon rakudo: for <text test tex> {  if m/ex/ { print "found ex "; }  when m/(t$)/ { print "found $0 "} }
01:23 p6eval rakudo 0d4fe0: OUTPUT«found ex found t found t found ex »
01:24 colomon I think a lot of the classic file parsing idioms will be more elegant this way...
01:25 sjohnson rakudo: for <text test tex> {  if m/ex/ { print "found ex in $_"; }  when m/(t$)/ { print "found $0 in $_"} }
01:25 p6eval rakudo 0d4fe0: OUTPUT«found ex in textfound t in textfound t in testfound ex in tex»
01:25 sjohnson man i can't wait for perl 6
01:25 sjohnson this simple example will make my life a lot easier
01:25 sjohnson i suppose i could just start using it now
01:25 colomon I have.
01:25 sjohnson and try to break it
01:25 colomon Speed is a big issue, alas.
01:26 colomon but for a lot of things it is already quite usable.
01:26 sjohnson my needs are quite simple, so it should be okay
01:26 sjohnson i mostly just write shell utils to make my life at work easier
01:27 colomon I mostly do simple stuff as well, but simple stuff that processes a lot of data fairs badly still in Rakudo.
01:28 colomon One piece of code I tried to write in p6, only to find that the p5 version was 5000 times faster.
01:28 shinobi-cl left #perl6
01:30 colomon Loops that repeat a lot are bad news in current Rakudo.
01:30 colomon Other than that, I'm finding it perfectly usable.
01:31 colomon And in lots of cases, very nice.
01:33 sjohnson cool
01:34 sjohnson thanks for the tips on that given/when structure
01:36 sjohnson i was trying the examples from this page:  http://blogs.gurulabs.com/stephe​n/2008/12/perl-6-givenwhen.html
01:37 sjohnson i suppose i could write to the author and let him know that you can also use the 'if m/.../' technology
01:43 dukeleto joined #perl6
02:03 KyleHa joined #perl6
02:03 alester joined #perl6
02:05 japhb joined #perl6
02:08 japhb (flaky net connection)--
02:09 japhb Man, sometimes it can be so cathartic to just decrement something in the presence of others.  ;-)
02:10 KyleHa We're here to witness your pain, japhb.
02:12 sjohnson japhb: use GNU screen technology for your irc usage
02:12 sjohnson if you don't already
02:13 japhb sjohnson, that only works if you have a box not behind said flaky net connection with which to screen.
02:13 japhb :-)
02:14 sjohnson indeed it does
02:14 sjohnson i had to ask around for a while before someone had a stable shell i could use
02:14 alester joined #perl6
02:15 Tene japhb: I have a box you can use.
02:15 Tene japhb: ask me later tonight.  AFK shopping now.
02:15 japhb Tene, thx
02:16 japhb what happened to the opbot?
02:17 sjohnson was there ever one?
02:17 japhb I thought so ...
02:17 sjohnson i've never seen any bot-like characteristics
02:18 japhb hum.  may have been years ago
02:31 hercynium_ joined #perl6
02:49 molaf joined #perl6
03:20 sri_kraih joined #perl6
03:48 carlin joined #perl6
03:53 qp_pq are the grammars capable of modifying the input at run-time ?
03:54 qp_pq the very text they're parsing...
03:54 mikehh_ joined #perl6
03:54 frew joined #perl6
04:11 zetta I'm interested in that question as well
04:11 zetta so I looked it up in S05
04:11 zetta :rw modifier
04:13 zetta the way the doc reads suggests maybe no implementation has :rw yet, but I don't know
04:15 zetta ah, but you said grammars... not regexes... anyway... yeah.
04:39 qp_pq zetta: so why are you interested ?
04:40 zetta just seemed like an interesting question, I've read up on the grammars/rules system, but I hadn't thought of using it that way.
04:42 zetta I can sling around Perl5 s/// with the best of 'em but rules >> regexes.  imo anyway.
04:45 zetta anyway, maybe a perl6 guru can weigh in.
05:05 KyleHa_ joined #perl6
05:06 tann joined #perl6
05:12 ruoso joined #perl6
05:13 Zloyrusskiy joined #perl6
05:20 drbean joined #perl6
05:24 hah joined #perl6
05:24 abra joined #perl6
05:41 wayland76 I suspect that the intent is that they could modify the input, but just how may not yet have been specified
05:45 orafu joined #perl6
06:10 moritz_ good morning
06:13 sjohnson morning to you, night to me :)
06:14 sjohnson perl6: say 3;
06:14 p6eval elf 28016, pugs, rakudo 0d4fe0: OUTPUT«3␤»
06:14 sjohnson ahh there it goes
06:18 pmichaud good morning, #perl6
06:19 moritz_ pmichaud: isn't it *very* early morning for you? :)
06:20 sjohnson pugs:  say 'good morning, #perl6';
06:20 p6eval pugs: OUTPUT«good morning, #perl6␤»
06:21 pmichaud moritz_: yes.  01h20 here :-)
06:21 rfordinal joined #perl6
06:21 pmichaud but I mainly came online to pass the word that the 'testcommitted' tag is now available in rt :-)
06:22 moritz_ cool
06:22 moritz_ and is there a moniker in the subject that will set it automatically?
06:22 pmichaud not yet.
06:22 pmichaud Robrt++ says that he can do it but doesn't have time at the moment.  He's left it on his to-do list, however.
06:24 pmichaud anyway, I'm off to bed -- be back in a few hours
06:24 moritz_ good night
06:26 wayland76 Does anyone ( moritz_? ) have any thoughts about how Path objects should be compared?
06:26 * moritz_ not
06:26 wayland76 Ie. if I want to test if two Paths are the same inode, I'd hope to do it with something like $path1 === $path2
06:26 wayland76 And I was wondering if === was the right operator here
06:26 moritz_ no
06:27 moritz_ eqv is, probably
06:27 wayland76 Hmm
06:27 moritz_ === asks "are these two the same object", in terms of "at the same memory location"
06:27 wayland76 Right
06:28 wayland76 But isn't eqv still about comparing objects?
06:28 moritz_ eqv doesn't fit fully as well
06:28 wayland76 Ok
06:28 moritz_ it's roughly the same as $a.perl eq $b.perl
06:28 wayland76 So does that mean that nothing fits? :)
06:29 moritz_ well, in Perl 6 (at least notionally) the operator determmines the operation, not the type of the arguments
06:29 moritz_ so if you introduce a new type, you also need to introduce another operator
06:29 moritz_ unless you re-use smartmatch, of course
06:30 wayland76 Hmm.  Well, that's all very painful then :)
06:30 wayland76 APL, here we come :)
06:30 moritz_ well, you *can* reuse smartmatch, no?
06:30 wayland76 Hmm, maybe we can.
06:31 wayland76 Because, it will do different things for Str ~~ Path and Path ~~ Path, right?
06:31 moritz_ that's entirely up to Path.ACCEPTS to decide
06:32 wayland76 Ah, cool :)
06:33 wayland76 See, I was pretty sure you could answer that question :)
06:34 moritz_ ah well, when you first asked I thought you were talking about semantics
06:34 moritz_ a la "how do I determine if two paths point to the same file?"
06:34 moritz_ that's something I can't answer ;-)
06:35 wayland76 No, I'm rewriting parts of S32/IO to reflect some good ideas that have come through :)
06:36 unitxt left #perl6
06:36 unitxt joined #perl6
06:36 wayland76 That new guy, in particular -- I pasted parts of his e-mail, and replaced "should" with "does" :)
06:37 wayland76 One more smartmatch question -- if I want the two things I mentioned above, I put a multi method .ACCEPTS on the Path object, so that it can do Str and Path, right?
06:39 wayland76 Wait, the doco implies .ACCEPTS is single dispatch
06:39 wayland76 Oh, I found the bit where it says I can do multi
06:39 wayland76 Don't worry :)
06:41 * moritz_ doesn't worry :)
06:59 wayland76 Has another question
06:59 * wayland76 has another question (sorry ) :)
07:00 wayland76 Is there some way I can say "functionA() also takes all the parameters of functionB() in addition to its own"? :)
07:01 dalek rakudo: 5a2aeaf | moritz++ |  (17 files):
07:01 dalek rakudo: remove some trailing whitespaces
07:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​a2aeaf5166c3274d99b2620b47f2fdc46dc73bf
07:02 * moritz_ doesn't think so
07:02 moritz_ XY problem?
07:02 wayland76 What does XY problem mean?
07:03 rfordinal joined #perl6
07:03 wayland76 Ok, finding google info :)
07:04 wayland76 Found Google info
07:04 wayland76 Will continue thinking.  Thanks :)
07:11 krakan joined #perl6
07:21 frederico joined #perl6
07:24 pugs_svn r28017 | wayland++ | [S02] Changed :io to :p and :path
07:24 pugs_svn r28017 | wayland++ | [S16] Documented p{/path/to/file}
07:24 pugs_svn r28017 | wayland++ | [S28] Made $*CWD have type Path instead of Str
07:24 pugs_svn r28017 | wayland++ | [S32/IO] Many changes, including:
07:24 pugs_svn r28017 | wayland++ | * Changed IO::FSNode into Path
07:24 pugs_svn r28017 | wayland++ | * Merged most of IO::DirectoryNode and all of IO::LinkNode into Path (but still need to
07:24 pugs_svn r28017 | wayland++ |   merge IO::FileNode)
07:24 pugs_svn r28017 | wayland++ | * Moved remnants of IO::DirectoryNode to IO::Directory
07:24 pugs_svn r28017 | wayland++ | It's not finished yet, but I thought I'd commit anyway.  I'll keep working on it.
07:24 wayland76 @karma wayland
07:24 lambdabot wayland has a karma of 106
07:24 wayland76 Ooh :)
07:34 frettled wayland76++ :)
07:35 tak__ joined #perl6
07:37 abra joined #perl6
07:40 wayland76 The one I referred to as "the new guy" is "Troels Liebe Bentsen".  Can we ++ him yet?
07:40 wayland76 @karma we
07:40 lambdabot we has a karma of 1
07:40 moritz_ (Troels Liebe Bentsen)++
07:41 wayland76 lambdabot: No, that should be "we have a karma of 1", unless you're a lolcat :)
07:41 frettled haha
07:41 wayland76 moritz_: Yes, but the () is not recognised
07:41 wayland76 @karma Lenz)
07:41 lambdabot Lenz) has a karma of 64
07:41 wayland76 See?
07:41 frettled @karma Bentsen)
07:41 lambdabot Bentsen) has a karma of 1
07:41 frettled \o/
07:41 frettled Whose is lambdabot anyway?
07:42 moritz_ Troels Liebe Bentsen++
07:42 moritz_ @karma Troels Liebe Bentsen
07:42 lambdabot Troels� has a karma of 0
07:42 moritz_ bah
07:42 moritz_ it doesn't even speak UTF-8
07:42 wayland76 Well, I'll wait for him to choose a nick, and then do it.
07:43 wayland76 Hmm.  From my limited knowledge of German, it looks like "Troll-loving Bentsen" :)
07:43 wayland76 Would someone like to fix my German? :)
07:43 carlin @karma c/c
07:43 lambdabot c/c has a karma of 144
07:43 carlin heh
07:43 frettled Troels is similar to Truls.
07:43 wayland76 Yeah, I c/c-- every chance I get
07:43 moritz_ Liebe = Love, but Troels is not a German word
07:43 frettled wayland76: c/c-- is sensible
07:44 frettled I would like to see a c/c-- languag.
07:44 frettled +e
07:45 wayland76 Wouldn't that be a lang-gulag? :)
07:47 frettled oooh
07:51 carlin So there is no chdir function now?
07:55 moritz_ rakudo: chdir '/'
07:55 p6eval rakudo 0d4fe0:  ( no output )
07:55 moritz_ rakudo: chdir '/'; say "alive"
07:55 p6eval rakudo 0d4fe0: OUTPUT«alive␤»
07:56 moritz_ it seems to work just fine locally
07:56 moritz_ p6eval restricts file I/O, so you probably can't easily tell if it worked here on IRC
07:56 carlin Latest S32/IO says; "chdir FILENAME - Gone, just set $*CWD"
07:57 * moritz_ doesn't trust S32::IO
07:59 mj41_ joined #perl6
08:00 mikehh_ joined #perl6
08:01 * carlin doesn't like the idea of manually setting $*CWD
08:01 [sbp] joined #perl6
08:01 Matt-W Morning
08:02 nsh joined #perl6
08:02 moritz_ oh hai Matt-W
08:02 mattp joined #perl6
08:02 gabiruh joined #perl6
08:02 Matt-W carlin: I think you can take that as fairly provisional
08:02 Matt-W hai moritz_
08:02 cxreg joined #perl6
08:02 Matt-W can haz christmas?
08:03 elmex joined #perl6
08:03 rfordinal joined #perl6
08:04 moritz_ not quite. Bug svg bar charts with clikable bars and neatly aligned labels (thanks to masak++)
08:06 Matt-W I saw your blog entry about that
08:06 Matt-W Interesting stuff
08:06 Matt-W It's just a shame that SVG.pm currently is just an XML maker
08:07 s1n joined #perl6
08:07 abra joined #perl6
08:07 tak__ joined #perl6
08:07 mikehh joined #perl6
08:07 PacoLinux joined #perl6
08:07 synth joined #perl6
08:07 elmex joined #perl6
08:07 KatrinaTheLamia joined #perl6
08:07 lisppaste3 joined #perl6
08:07 gabiruh joined #perl6
08:07 sbp joined #perl6
08:07 mj41 joined #perl6
08:07 mattp_ joined #perl6
08:07 gabiruh joined #perl6
08:07 elmex_ joined #perl6
08:07 moritz_ the blog post didn't include the linking stuff :-)
08:07 moritz_ well, I talked to masak about that
08:07 moritz_ and we agreed to make the current SVG.pm into a general XML::Writer
08:07 mj41_ joined #perl6
08:07 Matt-W good, I was thinking I might suggest that
08:08 Matt-W Making XML is fairly straightforward after all
08:08 Matt-W It's parsing the bloody stuff that's hard
08:08 moritz_ and add SVG specific behavior to SVG.pm
08:08 abra joined #perl6
08:08 KatrinaTheLamia joined #perl6
08:08 Matt-W yes and SVG.pm should use XML::Writer
08:09 moritz_ exactly
08:10 Matt-W that's probably the most straightforward thought I'm going to have all day
08:10 moritz_ that sounds really depressing
08:11 Matt-W so's the work I'm doing at the moment
08:11 Matt-W trying to get stuff done with the most overengineered library in the history of library writing
08:12 ewilhelm_ joined #perl6
08:12 buu_ joined #perl6
08:12 kolibrie_ joined #perl6
08:12 yahooooo joined #perl6
08:15 kcwu joined #perl6
08:17 moritz_ joined #perl6
08:17 moritz_ (net flakyness)--
08:17 moritz_ I remember reading up on a linear algebra library - to solve an equation system you'd first have to create a factory, which then instantiates a solver - at that point I stopped reading :-)
08:17 Matt-W oh dear
08:18 Matt-W well this is an incredibly elaborate layered comms library
08:18 Matt-W in some ways it's amazing
08:18 Matt-W wonderfully flexible
08:18 Matt-W but it's far more complicated than we actually need
08:18 Matt-W all we needed was a set of fairly barebones classes for simulating our own network protocols for automated testing
08:19 Matt-W and instead we've got this enormous timesink
08:25 dmpk2k joined #perl6
08:30 tak11 joined #perl6
08:31 zamolxes joined #perl6
08:33 terje_ joined #perl6
08:36 rfordinal left #perl6
08:41 dakkar joined #perl6
08:57 wayland76 carlin / carlin_ What's wrong with setting $*CWD instead of using chdir?
08:57 moritz_ wayland76: for example not being able to use relativ paths? or at least not in an intuitive way?
08:57 wayland76 And keep in mind that S32/IO is only a draft -- it will keep changing based on feedback
08:58 Matt-W The core functionality of just changing the working directory is nearly useless anyway
08:58 Matt-W Have to have some framework for tracking it and moving around
08:58 moritz_ Matt-W: why?
08:58 * Matt-W ponders some sort of module for that
08:58 moritz_ $*CWD tracks it, chdir() changes it
08:58 Matt-W no, $*CWD tells you where you are now
08:58 Matt-W it has no idea how you got there or where you started
08:58 Matt-W if you're crawling around a directory tree you might want to know that
08:58 moritz_ that doesn't have to be a problem
08:59 moritz_ if you want to know it, you can still store it at the beginning
08:59 Matt-W admittedly all you need for implementing such a mechanism is $*CWD
08:59 masak joined #perl6
08:59 wayland76 Hmm.  $*CWD = "../foo/path"
09:00 wayland76 ...relative to current path :)
09:00 masak no please no.
09:00 wayland76 Ok, it's a bad idea.
09:00 wayland76 :)
09:00 moritz_ wayland76: so what's $*CWD after that/
09:00 moritz_ ?
09:00 Matt-W the canonical form of "$*CWD/../foo/path"?
09:00 Matt-W need to sort out this path literals thing really
09:00 wayland76 Well, lets say we start with $*CWD = "/home/wayland"
09:01 moritz_ so you assign something to a variable, but after it has a different value than you assigned to it?
09:01 moritz_ that's less than intuitive.
09:01 wayland76 My thought was that $*CWD = "../foo/path" would change it to "/home/wayland/foo/path"
09:01 wayland76 Or maybe....
09:01 moritz_ and silently drop the '../' part?
09:01 wayland76 It could have a $*CWD.path() returns "../foo/path", and $*CWD.realpath() returns "/home/foo/path"
09:02 wayland76 Oops, that comment above should've said "/home/foo/path", sorry :(
09:02 moritz_ but why the magic?
09:02 wayland76 I think my fingers know "/home/wayland" too well :)
09:02 moritz_ what's wrong with good ol' chdir()?
09:03 wayland76 As I implied above, I realised during the course of this conversation that it's probably a bad idea
09:03 moritz_ good :-)
09:03 wayland76 But I don't know where to put chdir
09:03 wayland76 Ah, I know :)
09:03 wayland76 On the IO::Filesystems object
09:04 wayland76 (IO::Filesystems is the whole file tree -- maybe it needs a better name, though)
09:04 moritz_ I mean I was asking because there might have been a real benefit to handling it all in a variable
09:04 jnthn lolhai
09:04 moritz_ ohlolitsjnthn
09:05 jnthn :-)
09:06 wayland76 moritz_: I just thought it didn't belong where it used to be, and so I needed somewhere else to put it, and I thought "I know, we can just hide it under the hood"
09:06 wayland76 But it seems not to have worked out, so maybe IO::Filesystems.chdir is the way to go
09:08 missingthepoint joined #perl6
09:09 masak jnthn: o/
09:09 masak wayland76: ...is export
09:10 wayland76 Yeah, IO::Filesystems.chdir isn't how you'd use it, I'm just saying where it should live
09:17 masak frettled++ # that email reply was essentially "you think it's cute today..." :)
09:17 frettled masak: :D
09:19 frettled For once, I was reading my mail more frequently than IRC.  Woot.
09:22 DanielC joined #perl6
09:23 DanielC Hi all.
09:23 phenny DanielC: 04 Jul 07:46Z <mberends> tell DanielC http://gitorious.org/parrot-module-lib/main updated
09:23 DanielC *click*
09:23 masak DanielC: you're back!
09:23 masak \o/
09:23 DanielC yeah
09:24 DanielC That was a long trip.
09:24 DanielC (honey moon)
09:24 masak so I seem to recall.
09:24 moritz_ DanielC: belated congratulations!
09:24 DanielC thanks :-)
09:24 masak oh, and from me too. :)
09:24 DanielC :-)
09:25 DanielC Anything new and exiting happening in Rakudo world?
09:25 masak nah. :)
09:25 moritz_ yes, lots of introspection
09:25 moritz_ and custom traits
09:25 masak and a promised release for April.
09:25 moritz_ jnthn++ I might add
09:25 DanielC Stable release for April? Stable?
09:26 moritz_ pmichaud didn't use "stable"
09:26 wayland76 No, unstable :)
09:26 masak DanielC: um, the word 'stable' has been declared too fluffy.
09:26 moritz_ he said a "usable and useful subset of Perl 6"
09:26 DanielC I guess it is...
09:26 DanielC Ok.
09:26 masak all software is less than stable, with the possible exception of TeX and some space probe software.
09:27 moritz_ the biologists have a special word for stable.
09:27 wayland76 ...and any software small enough to be provably correct :)
09:27 masak promising 'stable' is essentially promising to have a multi-billion budget, or to be Donald Knuth.
09:27 wayland76 moritz_: Not *all* stable things are called that :)
09:27 moritz_ wayland76: only stable software, right :-)
09:28 dukeleto joined #perl6
09:28 wayland76 moritz_: C'mon now, I bet some people call Perl 6 stable, if that's the case :)
09:28 * DanielC can't figure out how to explain to someone what makes the April release different from every other monthly release
09:28 wayland76 (for those missing the joke, the biologists word for stable is "dead")
09:28 wayland76 DanielC: We're hyping it more :)
09:28 DanielC Can't call it "production" because I'm sure someone is using the current Rakudo in production somewhere.
09:29 DanielC stable = dead... he he he
09:29 wayland76 But if you look for "Rakudo Star", then you'll see what it's about :)
09:29 masak DanielC: I don't think there has to be a difference.
09:29 masak DanielC: what we have _now_ is pretty neat.
09:29 masak DanielC: but in April it'll be even neater.
09:30 DanielC What Rakudo had back in July was already very neat.
09:30 masak and outsiders know next to nothing about Rakudo.
09:30 masak therefore, it's a good idea to pretend that April will have a 'special' release, and then to a PR dance.
09:30 DanielC Sure.
09:30 wayland76 Like I said, we're hyping it more :)
09:30 frettled stable - a place where you put your horses when they're not currently being flogged.
09:31 masak frettled: and the horses are dead, yes?
09:31 frettled masak: a stable is essentially a black box when seen from afar, we cannot know.  ;)
09:31 masak but we can make probably deductions... :)
09:31 masak s/ly/le/
09:32 Matt-W DanielC!
09:32 wayland76 I'd prefer a red box with shite stripes :)
09:33 wayland76 s/shite/white/
09:33 DanielC o/ Matt-W
09:33 wayland76 That was certainly unintention -- my apologies :)
09:33 DanielC Can someone remind me of the git command to update the repository? I want to get the latest Rakudo...
09:33 DanielC Ah... git pull
09:34 wayland76 Flogging dead horses: http://www.sucs.swan.ac.uk/~cm​ckenna/humour/work/horse.html
09:34 frettled If it's the piece I think it is, then it is excellent.
09:34 masak DanielC: by the way: new build instructions for Rakudo.
09:34 masak DanielC: it (and Parrot) are now meant to be installed.
09:34 DanielC masak: The instructions on the website look the same...
09:35 DanielC $ perl Configure.pl --gen-parrot && make
09:35 frettled DanielC: read the README as well. You will also need to use «make install» to remain reasonably sane.
09:35 DanielC "meant to be installed" - that's good rogress
09:36 masak aye.
09:36 masak many people were blocking on that, it seems.
09:36 DanielC Website: "there is no make install target"
09:36 masak then the website is outdated.
09:36 DanielC ok
09:36 jrtayloriv joined #perl6
09:36 wayland76 DanielC: Which page on the website?
09:36 DanielC $ perl Configure.pl --gen-parrot && make && make install  -- is this correct?
09:37 DanielC wayland76: http://rakudo.org/how-to-get-rakudo
09:37 DanielC wayland76: "Get Rakudo"
09:37 wayland76 DanielC: Thanks
09:39 masak DanielC: yes; probably with 'sudo ' on the last step.
09:39 DanielC y
09:39 wayland76 DanielC: You can build RPMs too
09:39 wayland76 If you prefer
09:39 jrtayloriv joined #perl6
09:39 DanielC Debian rulez!
09:39 wayland76 With no Rakudo package?  I don't think so :)
09:41 wayland76 Hey, everyone, what would you think of the idea of the Path object supporting named paths?
09:41 DanielC I wonder if you can use alien to make a .deb or Rakudo.
09:42 wayland76 ie. $HOME
09:42 Gothmog_ joined #perl6
09:42 wayland76 DanielC: Probably, but the .spec file isn't very complex, and should be able to be ported to Rakudo
09:43 wayland76 But not just $HOME, also things like $bindir ="Program Files" == "/usr/bin", etc
09:45 * jnthn has a shiny new 64-bit multi-core server.
09:46 frettled Yay or something.
09:46 frettled I hope you don't get in too much pain from faulty drivers etc.
09:46 masak jnthn: does it feel like a Rakudo day today?
09:46 jnthn masak: No, it'll be tomorrow.
09:46 masak oki
09:46 jnthn masak: Today I need to do some things that I probably shoulda done yesterday.
09:47 masak yay, Rakudo day tomorrow \o/
09:47 wayland76 jnthn: My new desktop that should be hardware-ready tomorrow has two multi-core CPUs :)
09:47 pugs_svn r28018 | wayland++ | [S32/IO] A few changes, including:
09:47 pugs_svn r28018 | wayland++ | * Revived .chdir() due to popular demand
09:47 pugs_svn r28018 | wayland++ | * IO::FileNode merged into Path
09:48 carlin wayland++ # for bringing back chdir
09:49 wayland76 carlin++ for pointing out that it was stupid :)
09:52 guest_007 joined #perl6
09:52 tlb joined #perl6
09:56 sjohnson nice one
09:57 * sjohnson pats wayland76 on the back
09:57 sjohnson i use chdir in p5 often
09:57 wayland76 Well, yes, but setting $*CWD would've been fine without the relative path issue :)
09:57 * Matt-W wraps his own stuff around chdir for ease
09:58 masak "Second system syndrome done right" :D
09:58 sjohnson ahh i think $*CWD is too ugly for me
09:58 sjohnson i suppose i could always say i'd like the timtowtdi way that looks more like a function call
10:00 ejs joined #perl6
10:00 carlin unless there's a benefit to changing it, better to stick with the familiar
10:02 frettled And the benefit needs to outweigh the disadvantages.
10:02 wayland76 Well, like I said, I couldn't figure out where to put it.
10:02 wayland76 And I thought one less thing to remember would be good :).
10:03 meppl joined #perl6
10:07 jnthn Hmmm...
10:07 jnthn make: *** [src/gen_actions.pir] Killed
10:07 jnthn Anyone know what might be killing this?
10:07 jnthn (ulimit claims "unlimited"...)
10:16 pugs_svn r28019 | wayland++ | S32/IO: Mention that Path can be used as an array of path elements
10:16 pugs_svn r28019 | wayland++ | S16: Restrict filenames to POSIX
10:19 naruto joined #perl6
10:19 naruto hi
10:20 Guest63713 hi
10:20 DanielC hi
10:21 wayland76 I guess he didn't like it here :)
10:22 wayland76 Maybe we should've all gone HEYMATEYWASSUPDUDE!!!!!1!!1!!1!
10:22 DanielC heh
10:31 * jnthn gives up trying to build Rakudo on his new server for now, figuring he can't procrastinate debugging that 1,000 line stored procedure forever... :-/
10:31 Matt-W wayland76: but OH HAI is much more in keeping with the channel's culture
10:37 * jnthn wishes they hadn't used "temp" in the name of a table that stores very non-temporary data...that should not go away.
10:37 jnthn Man, people do some funny things when writing software. :-/
10:37 wayland76 Maybe he left because of no hai :)
10:37 Matt-W jnthn: yes they do, I've been pondering this today
10:38 Matt-W sometimes they do strange things when managing people who are writing software, too
10:38 * Matt-W has wasted a week on a pile of software that has no distinctly useful purpose
10:38 * moritz_ wonders what people do who manage software that writes people
10:38 jnthn Heh, the only thing that bothers me about this particular system is that it *is* used for stuff... :-)
10:40 Matt-W that bothers me about a lot of things...
10:41 Matt-W ever played with a database which has three tables with >400 columns each?
10:41 Matt-W something strikes me as wrong about that
10:41 moritz_ well, having "no distinctly useful purpose" is quite different from "not being used" :-)
10:43 Matt-W indeed it is
10:43 Matt-W what really bugs me is that I already had some Perl scripts which did what this stuff does (more or less) in about 5% of the code
10:43 jnthn Matt-W: Not encountred anything quite *that* extreme in terms of database design fail.
10:43 Matt-W could've done all its functionality with only the same code again
10:44 Matt-W but *someone* got hooked on the idea of unit tests
10:44 Matt-W despite knowing that we will never, ever be able to refactor to the point where true unit tests are possible
10:44 Matt-W but somehow that meant the testing system had to be written in C++
10:44 Matt-W despite this being the perfect use case for Perl or another language operating at the same level
10:45 Matt-W And oh look, who's on the team, the office's go-to guy for Perl
10:45 Matt-W (i.e. me)
10:45 Matt-W Don't know enough Perl to understand this? Give me two afternoons and I'll teach it to you
10:45 * Matt-W bangs his head on the desk
10:46 Matt-W Sorry, this has nothing to do with perl 6
10:46 Matt-W It just all bubbles over sometimes
10:46 * moritz_ knows that feeling very well
10:46 Matt-W try and do anything in anything other than C++ or Java here and everyone looks at you very oddly
10:47 Matt-W almost like they'd never heard of using the right tool for the right job...
10:48 xomas_ joined #perl6
10:51 Matt-W argh and someone's mucked up the underlying structural library I wrote
10:51 Matt-W aaaaaaargh
10:51 Matt-W why are all the template parameter names now different and meaningless?
10:52 Matt-W they used to have scriptive names, now they're 'T'
10:52 * moritz_ gives Matt-W a big punching bag to channel his aggressions
10:54 Matt-W if only I could pop up to my aikido school for their lunchtime session and work it off by throwing people around
10:54 Matt-W and rolling back and forth until I'm dizzy
10:54 Matt-W always takes my mind off things
11:00 huf Matt-W: oh, i've seen mysql tables where you couldnt add more columns even if you wanted to
11:02 moritz_ speaking of horror stories - I read that ebay moved avoid from C++ for its midlleware because they hit maximum number of methods on a class
11:08 tlb Hey, how does mixins work in Perl 6 and how its it handle with build in types. Fx. the new Path object will need to have some utility IO functions, like splice and lines, but in a sense the object it self should not care IO as it only handles path information.
11:09 moritz_ splice is not an IO function
11:09 tlb sorry not splice, slurp
11:09 moritz_ mixins work like '$object does Role', but I don't think you need them here
11:10 moritz_ delegation seems much better
11:10 moritz_ class Path { has $!io handles <slurp lines get>; ... }
11:10 moritz_ or something along these lines
11:18 pugs_svn r28020 | jani++ | Rephrasing for clarity, also changed "POSIX" to "portable POSIX" where appropriate
11:19 frettled Hrm, I should find a sensible way to automagically include the name of the synopsis I altered without engaging in manual typing hell.
11:19 moritz_ frettled: how often do you do that?
11:21 frettled moritz_: good question, I haven't done it often enough to have a decent data set yet.  :D
11:22 frettled But I imagine that I might spend a bit of time trying to clarify synopses, so making a svn commit wrapper for that purpose wouldn't be too bad.
11:22 frettled I could make it in Perl 6!
11:23 frettled …and make it depend on a feature that's not yet implemented in Rakudo, semi-automatically updating it to depend on another unimplemented feature everytime the former gets implemented by pmichaud.  ;)
11:23 frettled I don't have a gun, is it okay if I stab my foot instead?
11:23 moritz_ that sounds like cool meta programming
11:38 wayland76 frettled: Not even a water pistol?
11:39 wayland76 You could fill it with tequila :) [NB: I don't drink :) ]
11:39 moritz_ in Perl 6 we expect you to shoot yourself with rope.
11:41 masak "enough rope to shoot yourself in the foot"
11:41 frettled wayland76: hee-hee
11:47 Whiteknight joined #perl6
11:48 jnthn In my experience, tequila is probably far better used for water fights than for drinking... ;-)
11:49 carlin because you'll be able to remember the water fight?
11:51 wayland76 ...and because it evaporates more quickly than water, and cools you faster :)
11:51 jnthn And won't have the taste of tequila in your mouth. :-)
11:52 jnthn Nor a tequila hangover the next day.
11:52 KyleHa joined #perl6
11:52 moritz_ just your cloths stink
11:55 frettled Tequila is good for getting other people drunk in bars or other people's apartments.
11:58 masak frettled: your emails today are a joy to read. now you're backing up your claims with real shell runs! frettled++
12:01 jauaor joined #perl6
12:02 frettled masak: thank you :)
12:03 masak and I learned something. :)
12:03 masak so $PWD isn't strictly equal to the current directory?
12:03 jaldhar joined #perl6
12:05 carlin if you manually set PWD to a dir that doesn't exist the current dir doesn't change
12:06 masak ah, only in the case when the dir doesn't exist?
12:09 qp_pq joined #perl6
12:09 carlin I think that's the only time
12:09 frettled nopes.
12:09 carlin but "doesn't exist" includes PWD=..
12:09 moritz_ anyway, we convinced wayland76 that assigning to $*CWD is a bad way to change the directory
12:10 frettled In the examples I cited, I could have also done «cd» to get back to the homedir, then «PWD=test», and «pwd» and «echo $PWD» will still be different.
12:11 wayland76 moritz_: No, just that it was bad to get rid of chdir() :)
12:11 wayland76 But, what about TMTOWTDI? :)
12:11 moritz_ wayland76: ah well, that's a start :-)
12:11 frettled But note that the \w (working dir substitution thingy) in $PS1 uses $PWD instead of checking.
12:12 moritz_ wayland76: we must not exaggerate with TIMTOWTDI :-)
12:12 wayland76 moritz_: No, but I think that 2 ways to do something is not too many.  So the idea should be evaluated on its merits :)
12:12 * moritz_ imagines all kind of weird problems with a writable $*CWD
12:13 carlin I really don't like the idea of $*CWD = '../foo' mimicing chdir ...
12:13 moritz_ $*CWD ~~ m:rw/<some_regex>/
12:13 moritz_ does every change to $/ also try to change the current directory?
12:14 masak I think if an idea is 50% good and 50% queasy, it should not be specced.
12:14 sri_kraih joined #perl6
12:14 Matt-W I don't like it
12:14 masak me neither.
12:14 Matt-W I think directory changing should involve something that looks like calling an action
12:14 masak a sub call.
12:14 Matt-W no problem with $*CWD having methods
12:14 carlin except it looks ugly ;)
12:14 Matt-W but assignment - and especially these strange string concat overloads that have been floating around - seem completely wrong
12:15 masak I have no problem with $*CWD being a vanilla Str. and chdir working as always.
12:15 * Matt-W doesn't like things in the global namespace :P
12:15 masak modules can do any leet trickery.
12:15 * moritz_ would even be fine with $*CWD being a Buf
12:15 masak whatever.
12:16 masak rakudo: ((Temporal::DateTime.new(:date(​Temporal::Date.new(:year(2010), :month(4))), :time(Temporal::Time.new)).epoch - time) / 86400).ceiling.fmt("%d days left until April!").say
12:17 p6eval rakudo 0d4fe0: OUTPUT«226 days left until April!␤»
12:17 Matt-W I think if we do have a special type for filesystem paths, $*CWD should be one of them
12:17 masak sure.
12:17 carlin rakudo: $*CWD.say;
12:17 p6eval rakudo 0d4fe0: OUTPUT«/home/evalenv/rakudo␤»
12:17 frettled ahaha
12:18 frettled rakudo: chdir(".."); $*CWD.say;
12:18 p6eval rakudo 0d4fe0: OUTPUT«/home/evalenv␤»
12:18 * moritz_ wonders if there's any harm in allowing chdir in p6eval
12:19 Matt-W depends if there are any holes left in what it can do when it gets there
12:19 frettled Only if it naïvely allows shell meta characters through.
12:19 carlin we could always manually set CWD
12:19 frettled …to a shell
12:19 takadonet joined #perl6
12:19 takadonet hey all
12:19 masak takadonet: o/
12:19 frettled rakudo: chdir(".."); $*CWD.say; $*CWD="/home"; $*CWD.say;
12:19 moritz_ \o
12:20 p6eval rakudo 0d4fe0: OUTPUT«/home/evalenv␤/home␤»
12:20 frettled rakudo: $*CWD="/home"; $*CWD.say; chdir(".."); $*CWD.say;
12:20 Matt-W Actually in a way
12:20 p6eval rakudo 0d4fe0: OUTPUT«/home␤/home/evalenv␤»
12:20 moritz_ frettled: just wanted to write the same :-)
12:20 Matt-W $*CWD = absolute path isn't all that bvad...
12:21 Matt-W it does have a nice symmetry to it
12:21 Matt-W $*CWD ~ subdir though... uck
12:21 * Matt-W oscillates through opinions as he eats lunch
12:21 wayland76 moritz_: regarding $*CWD ~~ m:rw/<some_regex>/
12:21 payload joined #perl6
12:22 moritz_ if $CWD is declared as Path where { $CWD.io ~~ :d } you'd get a type mismatch when trying to enter a non-existent directory :-)
12:22 wayland76 I don't understand it, but I would expect it to check if that was a legitimate path, and then assign
12:22 wayland76 What's $CWD.io ?
12:23 frettled That would be kindof cool.
12:23 moritz_ well, m:rw does a binding, not an assignment
12:23 moritz_ wayland76: $foo.io ~~ :d is the (new) way to do file tests
12:23 moritz_ or was it .IO?
12:23 moritz_ don't remember
12:23 Matt-W .IO
12:24 wayland76 Where $foo is what type?
12:24 moritz_ Str
12:24 moritz_ or Any
12:24 wayland76 And .io is what?
12:24 moritz_ don't know for sure
12:24 Matt-W this is one of the source of the debate on a file path type
12:24 moritz_ .io is .IO
12:24 wayland76 Ok, different question -- where do I read.
12:24 wayland76 wait, I'll find it
12:24 moritz_ ack -wQ .IO
12:25 szabgab joined #perl6
12:26 wayland76 Ok, but with this new Path quoting idea, the .IO should die
12:26 moritz_ not all path names are literals.
12:26 wayland76 Because Path should do that now
12:26 wayland76 moritz_: example?
12:27 moritz_ my $filename = $handle.get;
12:27 moritz_ $filename is a Str (or maybe Buf)
12:27 moritz_ not a Path
12:27 wayland76 Hmm.  If we did my Path $filename = $handle.get; would that coerce it?
12:28 moritz_ no
12:28 moritz_ it would throw a "type mismatch" exception
12:28 wayland76 Ok, what about my $filename = p:qq{{$handle.get}}
12:28 wayland76 Note double {{}} :)
12:29 * moritz_ screams in pain
12:30 wayland76 Sorry, that was rather evil :-}
12:30 wayland76 But it works, right?
12:30 wayland76 :)
12:30 moritz_ the multiplicity of delimters doesn't carry any semantics (except tripple braces in quasi quotes)
12:30 wayland76 But this is a code block embedded in a path string
12:30 masak wayland76: nope.
12:31 wayland76 No?
12:31 masak wayland76: re-read S02 :)
12:31 wayland76 Whereabouts?
12:31 moritz_ wayland76: $str.Path ~~ :e might be made to work
12:31 moritz_ but .IO is shorter.
12:31 masak rakudo: say qq{{special? I don't think so!}}
12:31 p6eval rakudo 0d4fe0: OUTPUT«special? I don't think so!␤»
12:31 wayland76 Ok, but if we assume that .IO returns a Path?
12:31 frettled And $foo.Io would tell us whether it was a daughter who was also a priestess.
12:31 frettled …having been seduced by Zeus.
12:32 * moritz_ slaps frettled
12:32 * wayland76 protects frettled
12:32 wayland76 After all, he didn't mention moons, by Jupiter! :)
12:34 Matt-W umm
12:34 Matt-W if we had Path, wouldn't $handle.get return Path anyway?
12:35 moritz_ Matt-W: and how would you read non-paths from a file, then?
12:35 wayland76 Argh, you're right
12:35 Matt-W oh
12:35 Matt-W sorry
12:35 Matt-W .get's for reading from it
12:35 wayland76 (well, right about the {{ }} business)
12:35 * Matt-W bangs head on desk
12:35 Matt-W teach Path how to be assigned to from strings
12:36 masak Matt-W: please don't do that. I get concerned. :/
12:36 moritz_ aye, poor desk
12:36 Matt-W around here nobody notices
12:36 Matt-W we're all doing it
12:36 masak :P
12:36 wayland76 Well, I vote for $str.Path ~~ :e
12:36 wayland76 :)
12:37 wayland76 IO is admittedly shorter, but still
12:37 Matt-W I've never liked that
12:37 wayland76 Never liked which?  .IO ?
12:37 carlin $str.IO.e is shortest
12:38 frettled Couldn't $str be a pipe, socket or somesuch?
12:38 wayland76 frettled: ???
12:38 moritz_ wayland76: I think you have to ask for permission from larry before changing file test operations
12:38 Matt-W no the ~~ :e business
12:38 moritz_ frettled: it would be evil to store a socket in a variable named $str
12:39 moritz_ but certainly possible
12:39 frettled moritz_: yes :D
12:39 Matt-W yah someone's bound to do it
12:39 Matt-W but that's their problem
12:39 frettled mm
12:39 wayland76 moritz_: Yeah, I figured that.  But if we can get $str.IO or $str.Path to return a Path, it will all work out.
12:39 moritz_ .oO( semantics bound to variable names would be a cool, evil idea)
12:40 wayland76 moritz_: FORTRAN does that
12:40 frettled $luke.force is always true?
12:40 wayland76 ...well, type based on name, anyway :)
12:40 frettled while $luke.warm checks weather.com for your locale first?
12:40 moritz_ wayland76: only in F77 or older, I think
12:40 wayland76 Well, F77 is what I know :)
12:41 wayland76 After all, my choice of languages when I was young was a) BASIC, b) F77, c) x86 assembler
12:41 wayland76 So I dabbled in all of them, but FORTRAN the least
12:42 wayland76 But my Dad started using FORTRAN in the punched card days
12:45 finanalyst joined #perl6
13:01 carlin I wonder what they argued about in the punch card days, with no tabs vs spaces and emacs vs vim to get worked up about
13:01 omega carlin: round vs square holes
13:02 lambdabot omega: You have 1 new message. '/msg lambdabot @messages' to read it.
13:02 qp_pq is there some GUI framework I can use with p6 ?
13:02 qp_pq like wx/qt/gtk2 ?
13:02 Matt-W not yet
13:02 moritz_ Tene had some working binding to e17 or something similar
13:02 DanielC What is e17?
13:03 moritz_ a window manager, long name "enlightenment"
13:03 moritz_ it also comes with a GUI toolkit
13:03 moritz_ which Tene used
13:03 DanielC Why is enlightenment called e17?
13:03 moritz_ because it's shorter to type
13:04 moritz_ rakudo: say chars('enlightenment')
13:04 Matt-W because it's different to e16
13:04 DanielC Is it version 17?
13:04 Matt-W e17 is the fabled new version
13:04 p6eval rakudo 0d4fe0: OUTPUT«13␤»
13:04 DanielC ah
13:04 Matt-W which has been in development for longer than perl 6, I believe
13:04 moritz_ it should be called e11t :-)
13:05 Matt-W no
13:05 Matt-W no it shouldn't
13:05 eiro Matt-W, the core lib was reimplemented lot of times afaik
13:05 eiro so it should :)
13:06 eiro e17 is the window manager by default on hurd ... coming with a "duke nukem forever" theme
13:06 frettled moritz_: what Matt-W said; e11t ≠ e17 ;)
13:06 frettled eiro++
13:06 Matt-W eiro: coming with duke nukem forever
13:07 Matt-W oh wait it was cancelled
13:07 Matt-W oh dear
13:07 moritz_ nobody in the Perl 6 community should make fun of other projects' release schedules.
13:07 mkelly32 at least there's publicly visible code for e17..
13:07 mkelly32 compared to dnf
13:07 eiro yeah .. canceled ... that's very sad
13:07 Matt-W yeah but duke nukem forever was just insane
13:07 Matt-W at least we've been making progress
13:07 Matt-W they seemed to keep throwing it all away and starting again
13:08 PerlJam moritz++
13:09 eiro moritz_, what about auto derision ?
13:10 masak (Leon Timmermans)++ # p6l email
13:10 moritz_ eiro: well, irony is hard to tell on IRC
13:10 eiro sure ...
13:11 moritz_ masak: indeed
13:11 Front_slash joined #perl6
13:12 masak I think I'll side with the people who propose sanity and lack of magic in the field of files, filesystems, IO and paths from now on.
13:13 masak I don't grok much of the different standards, but I think being as simple as possible is the best way not to get very old very quickly.
13:13 zloyrusskiy joined #perl6
13:13 PerlJam To quote Kernighan and Pike:  Simplicity. Clarity. Generality.
13:13 moritz_ I agree.
13:14 Matt-W magic can always be added with module goodness
13:14 Matt-W masak: please post an astonishingly elegant argument which will convince everyone else
13:14 PerlJam I haven't really been reading the discussions ... just skimming to a get to something that makes me go "ick!" and then skip to the next message.
13:14 moritz_ the difference between multi volume systems (Windows, VMS) and single root systems (unix) alone makes it really hard to come up with a unificaton
13:14 masak Matt-W: you're overestimating me. :)
13:14 DanielC Sedulously eschew obfuscatory hyperverbosity and prolixity.
13:15 Matt-W it's an inherent problem with a cross-platform language core
13:15 moritz_ to the point where it's good to ask if you even want a unification
13:15 Matt-W yeah
13:15 Matt-W local directory navigation is more or less the same
13:15 Matt-W but then you get syumlinks
13:15 moritz_ AFAICT no perl 5 module (or module system) has been invented so far that deals well with all of those
13:15 Matt-W and roots
13:16 Matt-W and all the different rules about what can be in a filename
13:16 moritz_ and *that* should make us think
13:16 Matt-W it's tempting to say it's all microsoft's fault, but then... VMS
13:16 Matt-W I have no idea at all what VMS's filenames mean
13:17 moritz_ not allowing a file named 'COM1' sure looks like a wierd restriction :-)
13:18 wayland76 Can I just point out to everyone that I've been using E17 for months, and it appears to have fewer problems than Rakudo? :)
13:18 Matt-W aaaah the days of COM1
13:19 Matt-W and PRN1
13:19 Matt-W and in the early days of USB you used to get USB devices pretending to be COM5 etc.
13:19 DanielC I'm a bit lost... in Windows you can't have a file named COM1 ??
13:19 moritz_ DanielC: no, you can't
13:19 PerlJam copy con foo.txt  # What happens when I have a filenamed "con"?
13:19 * DanielC hasn't used Windows in more than a decade
13:20 moritz_ copy foo com1 # copies to a com port, not to a file named com1
13:20 DanielC That seems like a very stupid restriction.
13:20 Matt-W yeah it's crazy
13:20 wayland76 If you try to write to a file called COM1 it sends your output to the Serial port.  I'll tell you the rest later, though -- it's a serial story.
13:20 Matt-W you used to be able to say
13:21 Matt-W copy con prn1
13:21 Matt-W and it'd send what you typed straight to the printer
13:21 wayland76 Yah, I remember that :)
13:21 wayland76 Well, I'd forgotten it, but I remember doing it now that you mention it :)
13:21 DanielC I much prefer the Unix /dev/ directory.
13:22 wayland76 Well, it does have certain advantages :)
13:22 moritz_ DanielC: well, that requires a root directory, which windows doesn't have :)
13:22 wayland76 moritz_: No, you could've had a DEV: drive :)
13:22 DanielC Oh, that's right... Windows has those stupid letters like C:
13:22 wayland76 DEV:\COM1   ...but they didn't do that
13:23 Matt-W no because drive letters can only be 1 letter
13:23 moritz_ aye
13:23 moritz_ Matt-W: sure?
13:23 Matt-W and even in windows 7, your main partition is still C:
13:23 wayland76 Matt-W: I'm talking about what they *could* have done :)
13:23 Matt-W because A and B are still reserved for the floppy drives you probably haven't got
13:23 PerlJam This whole filepath discussion kind of reminds me of string encoding.   Where it's assumed that we can have some canonical path representation and ways to transform it into something appropriate on a per filesystem basis.
13:23 wayland76 No, you can have two-letter drives under certain conditions -- I read it today
13:23 jnthn I've not seen anything suggesting you can have anything beyond A..Z. :-/
13:23 Matt-W PerlJam: I think it requires us to know too much about file systems
13:23 Matt-W PerlJam: maybe a module :)
13:24 wayland76 jnthn: Yes you can :)
13:24 moritz_ very windows-like would be use a special letter: |:\COM1
13:24 jnthn wayland76: Heh, curious.
13:24 wayland76 p:unix{/usr/local/bin/!!!}
13:24 wayland76 Or whatever :)
13:24 Matt-W o fcousre these days they try to present a single root
13:24 Matt-W they try to make it look like everything stems from Desktop
13:24 Matt-W or maybe from Computer
13:24 Matt-W or maybe from...
13:24 Matt-W it's all illusory and confusing
13:24 jnthn Yeah, but it all falls apart as soon as you dig.
13:25 Matt-W goodness knows what newbies think
13:25 Matt-W Unix filesystems are bad enough
13:25 jnthn Well, newbies probably don't have to think too much about it. :-)
13:25 moritz_ yes, and Desktop itself lives under C:\Windows\UserBla\...\Desktop\
13:26 Matt-W Depends which version of Windows
13:26 Matt-W since Vista it's been c:\Users\Username\Desktop
13:26 moritz_ so you have a nice circularity, which reminds me of meta object protocols
13:26 Matt-W they actually have a 'home directory' now
13:27 moritz_ please tell me that everything outside the home directory is not writeable by default
13:27 moritz_ (except /tmp/ maybe)
13:27 wayland76 OTOH, Unix would've been nicer if users had a /user/<username> directory that mirrored /usr in directory structure, but had /user/<username>/data as their default directory when logging in
13:27 moritz_ wayland76: aye
13:28 moritz_ that would remove the need for hiding the dotfiles
13:28 Matt-W unix's way is far from perfect
13:28 Matt-W i rather like mac os x's way, with application bundles
13:28 wayland76 moritz_: I don't know if they've gone that far, but they're working on locking things down.  They have to lock things down a bit at a time, and then wait for all the software to catch up.  Otherwise they get a flop like W2K
13:28 Matt-W none of this mixing everythign together in /usr/bin
13:28 Matt-W moritz_: there's some write protection, but it's nowhere near complete at this stage
13:29 wayland76 Or even having /home/<username>/.local/etc for config files :)
13:29 Matt-W too many apps depend on being able to write to their own directories and things
13:29 wayland76 Matt-W: There are advantages to app bundles, but they make the $PATH a lot longer
13:30 wayland76 Unless you're using links from /usr/bin anyway :)
13:30 wayland76 In which case, it should all come back to the package manager :)
13:30 Matt-W mmm
13:30 frettled masak++ for an elegant argument which puts things in the right perspective.
13:30 Matt-W or you have a different method for locating a binary to run...
13:31 masak frettled: I'm amazed by people's ability to bikeshed. I generally try not to disturb them, but this time, after Matt-W encouraged me, I fell for the temptation.
13:31 Matt-W :)
13:31 Matt-W well eventually someone just has to cut through it and make a decision
13:32 Matt-W which is what we really need in the band at work...
13:32 frettled yup
13:32 Matt-W it's not just programmers who bikeshed
13:32 Matt-W wannabe musicians do it too
13:33 frettled I'm still stunned by David Green's claim that the behaviour of environment variables is unexpected, i.e. he thinks that changing an environment variable should affect the semantics of some function that normally updates the variable, and that if it doesn't, it's a bug.  Or he's joking.
13:34 frettled (and I'm just not Getting It)
13:34 frettled I hope I'm not being too crass, though.
13:34 Matt-W I think it is a bit unexpected
13:34 Matt-W because chdir() changes CWD
13:34 Matt-W changing CWD should... what
13:34 Matt-W dunno
13:34 Matt-W probably be forbidden
13:35 Matt-W since changing it manually just can't be a good idea
13:35 moritz_ agreed
13:36 moritz_ I'm still unclear about another thing...
13:36 Matt-W so by extension, if it goes that assigning to $*CWD doesn't change the current directory, it should cause an error
13:36 frettled Matt-W: what about $USER, $LANG, $LC_COLLATE, …?
13:36 moritz_ that is, the specification allows an interpreter/server/whatever to execute multiple perl scripts
13:36 Matt-W changing $LANG actually has an effect immediately which is useful
13:36 moritz_ and has a separate PROCESS namespace for that
13:37 Matt-W changing $USER... bad
13:37 frettled Matt-W: it has an effect on new programs that are started, because new programs inherit ENV
13:37 frettled That is expected.
13:37 moritz_ but in unix the current directory is stored per process
13:37 moritz_ so, what will chdir() do in such a situation?
13:38 Matt-W DanielC++ # for brevity
13:38 moritz_ if it just calls the chdir syscall it violates encapsulation of the separate perl scripts
13:38 moritz_ should it die?
13:38 wayland76 moritz_: Well, if you pass in the "party" option, then it changes them all, but if you pass in the "solo-woodland-trek" option, it just changes itself
13:38 Matt-W moritz_: you shouldn't run perl scripts in that situation which use chdir
13:39 Matt-W it's just the same as calling chdir in a thread
13:39 Matt-W while your other threads are making assumptions about the CWD being constant
13:39 Matt-W you just don't do it
13:39 Matt-W or at least, if you do you're going to suffer for it
13:39 frettled You just don't make assumptions like that.
13:39 moritz_ Matt-W: ok, that was what I thought
13:40 Matt-W unfortunately issues of in-process concurrency are the kind of nasty problem it's very hard to insulate people from
13:40 frettled yep
13:40 Matt-W I suppose the interpreter *could* pretend to have multiple working directories for each subprocess
13:40 Matt-W but that'd be rather unpleasant
13:40 frettled It's quite feasible, but then the memory gains are fewer.
13:42 azawawi joined #perl6
13:42 azawawi hi
13:43 azawawi moritz_: ping
13:43 masak awwaiid: oh hai
13:43 moritz_ azawawi: pong.
13:43 masak argh, sorry awwaiid. mistab.
13:43 masak azawawi: oh hai.
13:43 moritz_ a<tab> :-)
13:44 azawawi :)
13:44 masak moritz_: actually, I did aw<tab> for some reason. :/
13:44 azawawi we're removing .p6 extension for .pl in Padre Perl support
13:44 masak good.
13:44 azawawi so we need to reliably detect whether this is Perl 6 or Perl 5
13:44 azawawi 'use v6;' alone?
13:45 masak azawawi: that's your safest bet, I think.
13:45 moritz_ use v6;, class, grammar, role or module declarations
13:45 moritz_ all indicate Perl 6
13:45 masak azawawi: but not all scripts in the wild do that.
13:45 azawawi since 'class/role' in MooseX::Declare...
13:45 masak azawawi: Rakudo is very lax and treats everything as Perl 6.
13:46 jnthn That's unfortunate...given the Perl 6 spec said "package is the way we'll know it's Perl 5". :-)
13:46 jnthn Or a way...
13:46 Front_slash joined #perl6
13:46 azawawi hmm 'use v6;' is the safest bet... i'll make Padre warn the programmer when use v6; is not found...
13:46 moritz_ azawawi: well, the class/role/grammar/module/v6 thing is what the spec says - you'll have to find out what works best in the wild, I guess
13:47 jnthn You may be able to take use of MooseX::Declare as a heuristic.
13:47 azawawi interesting
13:49 frew joined #perl6
13:51 jnthn That is, class/keyword/grammar/role package declaration without MooseX::Declare implies Perl 6.
13:51 jnthn Assuming MooseX::Declare is in wide enough use that it's worth making an exception for.
13:53 unitxt left #perl6
13:54 colomon rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); } method foo() { $.y = 10; } }; my $a = X.new(2); say $a.y; $a.foo; say $a.y;
13:55 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near "method foo"␤in Main (src/gen_setting.pm:3390)␤»
13:55 moritz_ colomon:  you need a ; after the }
13:55 azawawi some thing like this is used to detect right now ... http://gist.github.com/169722
13:55 moritz_ rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); }; method foo() { $.y = 10; } }; my $a = X.new(2); say $a.y; $a.foo; say $a.y;
13:55 p6eval rakudo 0d4fe0: OUTPUT«2␤Cannot assign to readonly variable.␤in method X::foo (/tmp/81VA8o8316:2)␤called from Main (/tmp/81VA8o8316:2)␤»
13:56 colomon rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); } method foo() { $.y = 10; };  }; my $a = X.new(2); say $a.y; $a.foo; say $a.y;
13:56 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near "method foo"␤in Main (src/gen_setting.pm:3390)␤»
13:56 azawawi jnthn: any comments on this one http://gist.github.com/169722?
13:57 moritz_ rakudo: class X { has $.y is ro; multi method new ($a) { self.bless(*, y => $a); }; method foo() { $!y = 10; } }; my $a = X.new(2); say $a.y; $a.foo; say $a.y;
13:57 p6eval rakudo 0d4fe0: OUTPUT«2␤10␤»
13:57 moritz_ we *really* need to teach people that ro accessors are also or within the class
13:58 unitxt joined #perl6
13:59 colomon moritz_: ???
13:59 moritz_ you can't assign to $.y unless $.y is declared as 'is rw'
13:59 moritz_ because it's just a method call
13:59 moritz_ it's short for $( self.y() )
13:59 jnthn azawawi: Looks like a good start.
14:00 jnthn # Perl 6 'use v6;'
14:00 jnthn return 1 if $text =~ /^\s*use\s+v6;/msx;
14:00 jnthn Any reason not to try that first? Is it not fairly sure-fire?
14:00 colomon moritz_: Errr... isn't that what you just did with that code?  Assign to $.y?
14:00 * moritz_ confused by  return if $text =~ /^=head[12]/msx
14:00 colomon (I was trying to see if "is ro" was actually implemented yet....)
14:01 moritz_ colomon: 'is ro' is the default
14:01 azawawi jnthn: embedded Perl 6... in Perl 5
14:01 jnthn azawawi: Heh, true.
14:01 moritz_ azawawi: maybe another approach would be useful...
14:01 moritz_ azawawi: iterate over all lines
14:01 moritz_ azawawi: and use the first successful check
14:02 moritz_ then when something is identified as Perl 5 somewhere, you can ignore embedded Perl 6 later on
14:02 azawawi moritz_: will think about for sure...
14:03 azawawi moritz_: will think about it for sure... :)
14:03 azawawi thanks guys
14:03 moritz_ azawawi: oh, and ^=cut is a sure sign of Perl 5
14:05 * azawawi adds it...
14:05 * wayland76 is almost bikeshedded out :)
14:06 carlin We need Bikeshed.pm which implements every behaviour anyone has ever asked for :)
14:06 frettled wonderful :D
14:08 wayland76 what, like class Bikeshed { foo() handles *; method foo() { say "It is done, O master" } }
14:08 moritz_ use Bikeshed :from<p6l@2009-08-08> :auth<moritz@faui2k3.org>;
14:08 wayland76 (Ok, you can't have that handles part -- how would I do that?)
14:09 pmichaud good morning #perl6
14:09 wayland76 How do I shoot Google for finding "text" when I asked for "TeX"? :)
14:10 masak joined #perl6
14:10 PerlJam bonus nachos pm
14:10 moritz_ oh hai pmichaud
14:10 wayland76 hail to one of our Rakudo leaders!
14:10 pmichaud wayland76: Shooting Google would be like firing nukes at the Sun.  :-)
14:10 moritz_ wayland76: I suggest ICBMs
14:10 jnthn morning pmichaud
14:11 wayland76 Can't afford ICBMs.  How about IBMs? :)
14:11 moritz_ is IBM so much cheaper? :=)
14:11 masak pmichaud: oh hai. ROADMAP says PGE 'will be undergoing some significant refactoring in summer 2009'. is that deliberate?
14:11 Matt-W o/ pmichaud
14:11 pmichaud masak: yes.
14:12 wayland76 Well, I'm sure I can find a secondhand IBM mouse or something on eBay :)
14:12 Matt-W masak: there will be refactoring!
14:12 wayland76 masak: It's so we get LTM, etc
14:12 colomon moritz_: If 'is ro' is default, and still lets you reassign $.y in the above, what does 'is ro' actually do?
14:12 moritz_ proto regexes!
14:12 masak wayland76: oh, I know what it is. I'm just querying about the timing.
14:12 wayland76 I've been following it as closely as I can without hassling pmichaud
14:12 masak wayland76: same here.
14:13 moritz_ colomon: where did it allow it?
14:13 wayland76 Well, when pmichaud said summer 2009, I said "Nah, February 2010" :)
14:13 moritz_ colomon: note that assignment to $!y is allowed within the class, to $.y not
14:14 moritz_ colomon: if you find an instance where assignment to $.y is allowed and it's not declared as 'is rw', please submit a bug report
14:14 pmichaud note that "significant refactoring in summer 2009" does not necessarily imply "ltm/protoregexes in summer 2009"
14:14 wayland76 But that was only based on how much progress had been made at that point
14:14 wayland76 Ah, ok :)
14:14 wayland76 I guess I knew that
14:15 wayland76 But the sig. refact. has to be finished before you start LTM and protoregexes?
14:15 pmichaud there's a fair bit of refactoring that has to take place even before we get to protoregexes and ltm
14:15 pmichaud right.
14:15 pmichaud the deadline (and it is really a deadline of sorts for Rakudo *) is january 2010 for protoregexes/ltm
14:16 pmichaud although I hope to be finished much sooner than that, because my grant income depends on it
14:16 wayland76 That would be nice :)
14:16 PerlJam refactor mercilessly.
14:16 pmichaud this refactor will indeed be merciless.
14:16 PerlJam (I have that written on one of the whiteboards in my office :)
14:16 pmichaud For one, when I started PGE I had no notion of Cursor objects
14:16 wayland76 Ooh, motivation.  I like that for us, even if it's hard on you :)
14:16 pmichaud and apparently STD is completely based around the notion of Cursors (which is fundamentally more correct, imo)
14:17 moritz_ so you'll pass around cob's instead of mob's? :-)
14:17 masak pmichaud: I've been skimming PGE lately. it's deliciously small, for what it does.
14:17 wayland76 Hmm.  Well, I can see that making a refactor useful :)
14:18 pmichaud masak: thank you.  I'm shocked about PGE also for two reasons
14:18 pmichaud (1) that it is as small as it is
14:18 wayland76 moritz_ et. al: Just for the amusement value, a "cobber" in Australia is somewhat like "mate", or "buddy", or "friend" or whatever
14:18 pmichaud (2) that it runs with any sort of usable speed at all.  Granted, it's horribly slow, but it's about 100x faster than I would've predicted at this point
14:19 wayland76 So cobs are more friendly than mobs :)
14:19 szabgab joined #perl6
14:19 moritz_ :-)
14:19 * moritz_ has to take a leave, TTFN folks
14:19 masak moritz_: o/
14:19 Matt-W wayland76: given what 'mob' usually means in an MMO, yes :)
14:20 colomon moritz_: (Sorry for the delay -- taking care of an 11-month-old here at the moment.)  That little code sample you got to work had the method foo change the value of the 'is ro' variable.  That was the point of the test, to see if it was possible.
14:24 yath joined #perl6
14:24 wayland76 Hey, everyone, I'd just like you all to note the subject line of David Green's recent tongue-in-cheek message
14:24 wayland76 I think it's past my bedtime too :)
14:25 wayland76 Anyway, as it's after midnight, I'm going to bed
14:25 wayland76 night all o/
14:26 ruoso joined #perl6
14:27 PerlJam colomon: I'd call that a bug.
14:29 colomon I thought it might be a NYI, which is why I was checking.
14:29 PerlJam colomon: oh, it may be NYI
14:30 PerlJam "is ro" may be only parsed.
14:39 PerlJam What does this mean?  $value := PAST::Op.new( :pirop('new PsP'), 'ObjectRef', $value);   ??  what is PsP ?
14:41 jferrero joined #perl6
14:41 [particle] the pir op new has a sig of PsP
14:42 [particle] returns a pmc, takes a string, and a pmc
14:42 [particle] lowercase s may mean 'string or string constant'
14:43 [particle] i forget, but it should be in the past pdd iirc
14:43 PerlJam Thanks.
14:43 __ash__ joined #perl6
14:43 Psyche^ joined #perl6
14:44 PerlJam parrot can still use strings for class names?  I thought there was movement towards using keys everywhere
14:47 PerlJam I mean, doesn't that turn into something like $P0 = new 'ObjectRef', $P1   ? Am I wrong about the keys?
14:48 * PerlJam goes with "must be wrong" for now
14:50 leedo joined #perl6
14:52 tlb Hey a little question when we read from prompt() what's encoding is set on the string and what does we look at?
14:54 tlb and what about readdir?
14:58 KyleHa joined #perl6
14:59 KyleHa Howdy doody, #perl6.
14:59 nihiliad joined #perl6
15:01 carlin Night everyone
15:01 cdarroch joined #perl6
15:07 __ash__ what are the perl6 --target= options again? or where is it documented? I cant find it again
15:09 PerlJam I don't know that they are documented anywhere in particular.
15:10 PerlJam pir, past, post, and parse I think are the options.
15:10 PerlJam (I mean, I think they are the only options)
15:15 alester joined #perl6
15:15 masak __ash__: it's "documented" in the Parrot repo, in compilers/pct/src/PCT/HLLCompiler.pir
15:15 PerlJam gutentag alester
15:15 alester hey
15:16 __ash__ thanks PerlJam and masak, i was looking in the wrong documents then, oops
15:17 tann joined #perl6
15:17 PerlJam __ash__: oh, it's also in the parrot repo in docs/pct/gettingstarted.pod
15:19 PerlJam and that doc only mentions the ones I know about, so we'll go with that's all there is :)
15:25 * ruoso just typed our &foo := something_that_returns_a_coderef() in Perl 5
15:26 justatheory joined #perl6
15:31 TimToady joined #perl6
15:38 takadonet What method name do you need to use to create your own  constructor ? Is it BUILD?
15:38 TimToady you should call .bless
15:39 mikehh_ t/spec/S12-enums/thorough.rakudo ............................... Failed 1/71 subtests
15:39 ruoso takadonet, there isn't a special "constructor" method in Perl 6, as there is in Java, for instance...
15:40 TimToady unless you know more about object's layout that lets you bypass bless/BUILDALL/BUILD
15:40 ruoso takadonet, constructing an object is a matter of blessing a candidate (as it is in Perl 5), but Perl 6 has some *default* implementations in place
15:40 TimToady note that the fact that BUILDALL and BUILD are in all caps is indicative that you shouldn't generally call them directly
15:40 ruoso or override unless it really makes sense
15:41 takadonet i thought you just wanted to shout it at people....
15:41 TimToady it generally indicates something that is called automatically
15:42 masak ruoso: funny, I feel more ready to override BUILD than to create my own 'new' method.
15:42 takadonet masak: me too but I was not sure if it was the right thing to do
15:43 TimToady overriding BUILD is fine, just like writing your own END block is fine
15:43 TimToady it'll just get called at the appropriate moment
15:43 ruoso masak, if it really makes sense
15:43 masak it feels like a smaller change than overriding .new
15:43 ruoso masak, my point is that people usually override the constructor to do things that could be solved with default values and other stuff
15:44 mikehh rakudo (5a2aeaf) builds on parrot r40624 - make test PASS, make spectest (up to 28020) FAILs 1 test - t/spec/S12-enums/thorough.rakudo - Failed test:  2
15:44 masak ruoso: aye.
15:44 ruoso masak, my point wasn't in favor of overriding new instead ;)
15:44 masak I see. :)
15:45 takadonet Well not sure if this 'issue' can be solved without overriding BUILD
15:45 ruoso and the issue is?
15:46 PerlJam ... always simpler than people think it is  ;)
15:46 * ruoso lunch &
15:47 takadonet I'm rewriting bioperl libraries so I'm pretty much taking what's already written in perl5 to perl6. One object has two 'attributes' called 'description' and 'desc'.  One is just a short hand for the other and they just point to the same thing.
15:48 mikehh btw the test was on Ubuntu (.04 amd64 (gcc)
15:48 mikehh 9.04
15:48 takadonet The problem is on creating the object. I need to populate both 'description' and 'desc'.
15:49 TimToady if you change one, does the other change?
15:49 takadonet correct
15:50 TimToady that is, do you just want an extra accessor to a single attribute?
15:50 TimToady if so, then just write the extra accessor
15:50 takadonet .... and mutator
15:50 TimToady method desc is rw { $!descriptor }
15:50 TimToady tion
15:50 PerlJam takadonet: Just make sure you initialize the attr consistently in your constructor.
15:51 takadonet PerlJam: I do, but others may not
15:51 TimToady ah, but yes, you'll need a BUILD if they might initialize with either name
15:51 takadonet You got it
15:51 takadonet also going to be the same with 'seq' and 'sequence'
15:52 PerlJam this feels like something perl could do for you though.
15:52 TimToady the accessor would work if BUILD set $.desc instead of $!desc, but it doesn't generally
15:53 TimToady however, this would actually be a decent place to define new instead
15:53 PerlJam class Foo { has $.desc is aliased('description') ... }  or something
15:53 TimToady to canonicalize the attribute names before calling bless
15:56 s1n @seen masak
15:56 lambdabot masak is in #perl6. I last heard masak speak 11m 29s ago.
15:56 masak s1n: I'm right here.
15:56 s1n yay
15:56 TimToady possibly $!desc ::= $!description could be forced to work somehow
15:56 PerlJam ah, even better.
15:56 s1n masak: the sources listed in the Makefile.in of web are the only installed sources??
15:56 s1n masak: what about the drafts, smartlinks, and hitomi stuff?
15:57 masak s1n: well, those don't need to be compiled.
15:57 masak s1n: Makefile.in contains things that need to be compiled.
15:57 s1n masak: ah, but the others are still installed?
15:57 TimToady oh, wait, it's just alternately named args
15:57 s1n masak: i ask because i can't seem to run the Configure
15:58 nihiliad joined #perl6
15:58 TimToady so you can write the BUILD, but canonicalize with :desc($!descriptor) and such
15:58 masak s1n: I'm not sure what you mean by 'installed' here.
15:58 TimToady or other way around, depending on which one is the real one
15:58 masak s1n: at this stage, Perl 6 project don't get installed.
15:59 s1n masak: well, you know what i mean
15:59 masak s1n: no, and that's my point. I don't.
15:59 masak s1n: what error does Configure give you?
15:59 s1n masak: okay, what do you do with the smartlinks and hitomi files? are they referred to from other modules in the project?
15:59 masak s1n: no.
15:59 TimToady likewise, a parameter for :seq($!sequence)
16:00 s1n masak: (keep in mind i haven't looked at Web in a few months) Can't find ./Configure in @*INC
16:00 masak s1n: ah. try doing `export PERL6LIB=`pwd`/lib`
16:01 masak argh, quote fail. 'export PERL6LIB=`pwd`/lib'
16:01 s1n masak: okay, so how should Web be "installed"? what files are necessary for an installation?
16:02 takadonet I think I understand TimToady
16:02 TimToady I'd still probably just write a new
16:03 TimToady with a *%_ parameter
16:03 masak s1n: Web.pm is generally not installed. neither is it 'installed'.
16:03 takadonet Any good example of new constructor in the spec?
16:03 masak s1n: but if you manage to compile it, and then grab all the *.pir files in lib/, you should be off to a good start.
16:03 s1n masak: not just Web.pm, your web.git project
16:04 TimToady then do %_<seq> ||= (%_<sequence>:delete) or some such before calling .bless
16:04 masak s1n: I think I still would be more helped by knowing what it is you're trying to do, not step 5 or so of your thought process.
16:04 s1n masak: pm
16:05 rfordinal joined #perl6
16:05 TimToady takadonet: no full examples, but use of .bless is discussed in S12/Construction and Initialization
16:06 takadonet TimToady: Already reading it :)
16:08 TimToady actually, since the last change to adverbial precedence, you don't need the parens on the :delete example above
16:08 TimToady not that rakudo implements :delete yet...
16:19 kent\n joined #perl6
16:21 takadonet hmmmm I just realized that this has to be done on a role.....
16:21 * takadonet hits head against the wall
16:21 masak careful!...
16:22 TimToady a role's BUILD is supposed to be integrated into the class's BUILD, so maybe that's the way to go eventually
16:22 nihiliad joined #perl6
16:22 TimToady dunno if rakudo does that right though
16:22 masak I think it does.
16:22 TimToady fortunately, I'm hard headed
16:23 TimToady people think I have a swelled head, but it's all thick skull
16:25 TimToady wayland76: the point of using $*CWD would be (and would *have* to be, given how context vars work) to give each thread its own working directory, independent of the process as a whole
16:26 jnthn It'll bring the BUILD method into the class, but if the class has one of it's own then it'll clobber the one from the role. At the moment, BUILD just has normal composition semantics (and I don't recall seeing anything in the spec saying otherwise).
16:27 takadonet nuts....
16:28 takadonet So much work just to have some attribute with aliases.
16:28 mj41 joined #perl6
16:35 jnthn Why is that harder than just method the_alias() { $!the_attr }
16:36 TimToady because build sets $!the_alias rather than $.the_alias
16:36 TimToady (or should)
16:36 jnthn Ah.
16:36 TimToady posibbly defining method !the_alias could be made to dtrt
16:37 jnthn :-S
16:37 jnthn Unlikely.
16:37 takadonet Just ignore this for now. Only thing that this limits is when creating the object, you need to use 'desc'
16:37 TimToady goes against what we decided about $!the_alias before
16:37 TimToady you can still write your own new, can't you?
16:37 molaf joined #perl6
16:38 TimToady and do the key renaming trick on %_?
16:39 __ash__ joined #perl6
16:39 TimToady or method new (:seq($sequence), :desc($description), *%_) or some such
16:39 TimToady then $class.bless(*, :$sequence, :$description, |%_)
16:40 TimToady 'course, if there's lots of different classes, that could get old
16:41 finanalyst left #perl6
16:41 takadonet There is going to be LOTS of different classes in the range of 100 or so
16:41 takadonet I have only one written so far.....
16:42 TimToady well, it's an interesting problem, for which we thank you :/
16:43 payload joined #perl6
16:43 TimToady jnthn: I remember discussing role BUILD with someone somewhere, and how they should compose, but I don't see it offhand in the specs
16:44 smash_ joined #perl6
16:44 jnthn TimToady: It's an interesting problem, but I've read the role specs in quite some detail and don't recall seeing anything along those lines.
16:44 jnthn TimToady: Question.
16:45 takadonet TimToady: Your welcome but I rather just have an answer hehe
16:45 TimToady it's possible that it's submethods in general that should just merge under composition rather than conflict
16:45 jnthn class Foo { has $.attr is my_custom_trait; }
16:46 jnthn What does the trait_mod get passed here?
16:46 nErVe joined #perl6
16:46 jnthn The underlying storage unit, e.g. what's in $!attr?
16:46 jnthn That is, is it the same as in my $foo is custom_trait;
16:47 TimToady hmm, well, is rw has to be able to trigger method generation
16:47 TimToady or rather
16:47 jnthn Well, we handle that in the compiler.
16:47 TimToady transfer its affections to the generated method
16:47 ruoso has $.the_alias is DynamicAlias<the_attr>;
16:47 ruoso where DynamicAlias would reference the proper attribute when used
16:48 jnthn ruoso: DynamicAlias? nah, is aliased<the_attr> :-)
16:48 jnthn ;-)
16:48 jnthn But anyway, it's writable as a mdoule _provided_ there's some way of getting at the current metaclass.
16:48 ruoso jnthn, right... that should work... I was thinking about storage type
16:48 ruoso but trait should work as well
16:49 jnthn TimToady: Which is my real question. A trait on an attribute probably should be able to get at the metaclass...
16:49 TimToady well, basic principle is that if you're throwing away info too soon that you need later, then you're probably passing the wrong object to the trait
16:49 * ruoso thinks at $*CLASS
16:49 TimToady or there needs to be a link somewhere
16:49 jnthn Aye.
16:49 TimToady but links don't always work under one-to-many conditions
16:50 ruoso isn't CALLER::<$?CLASS> enough?
16:50 jnthn Custom traits on attributes don't work in Rakudo yet (is rw is compiler handled...)
16:50 TimToady which often means you have to pass the other object and link many-to-one
16:50 TimToady don't know if that principle applies here though
16:50 jnthn ruoso: Probably yes.
16:50 jnthn I'm just fine with that being the answer.
16:51 TimToady well, "has" is in some sense declaring a slot, not any particular piece of that slot
16:51 TimToady so maybe we need to make the slot abstraction a bit more official
16:51 TimToady and the slot delegates to the $!name or $.method as appropriate
16:52 ruoso you mean the trait routine receives the "declaration" and not just the "declared"
16:52 ruoso ?
16:52 TimToady it's still a declared, but a wrapper of sorts around other declareds
16:52 ruoso I think that's what I meant by "declaration" ;)
16:53 TimToady I like my way of thinking about it better :)
16:53 jnthn A kind of Slot object that lets you get at the declaration, but has other properties too?
16:53 jnthn erm
16:53 jnthn The declarand I mean
16:53 jnthn :-)
16:53 TimToady to me a declaration is a syntax/semantics thing
16:53 TimToady yes, a synthetic declarand
16:53 * ruoso points at semantics
16:54 jnthn TimToady: So what might this look like, more concretely?
16:54 TimToady semantics isn't an object like a declarand is
16:54 TimToady semantics is a mass noun
16:54 TimToady would you please fill that jar with some semantics, please, dear?
16:54 ruoso ahehaeaehaehae
16:55 TimToady 'course, you can point at water too
16:55 TimToady but computers don't like pointers to mass nouns
16:55 * ruoso .oO( void* )
16:56 ruoso anyway... jokes aside, I think we agree on the practical side
16:56 jnthn Aye.
16:57 jnthn So you think that a declaration will invoke a trait mod with something like a Slot object, with properties like .declarand, .name, etc?
16:57 [particle] padre is a mass noun
16:57 __ash__ @a.length is the number of items in the array right>
16:57 lambdabot Unknown command, try @list
16:57 TimToady jnthn: I would guess that we really just want to take one of the existing components such as $!foo and make it smart enough to act like the synthetic declarand by giving it suitable links
16:57 TimToady whichever of our components is most-instantiated already
16:57 TimToady so you end up with many-to-one links
16:58 jnthn Are you thinking this applies to just attributes, or variable declarations in general?
16:58 * ruoso .oO( Is it just me or TimToady just ported Class::InsideOut to Perl 6? )
16:58 TimToady well, attributes are generic variables, basically
16:58 jnthn Right, so this is something more general.
16:59 TimToady but we're likely to run into other kinds of generic variable declarations, especially if TheDamian starts to write new talks
16:59 TimToady logic programming, constraint programming
16:59 TimToady these tend to have names that represent concepts, not just storage
16:59 jnthn Hmm, true.
16:59 * ruoso wishes TheDamian had his talks available to the public in continents he doesn't visit
17:00 jnthn TimToady: Is this an area you want to be left alone to think about for a while?
17:00 jnthn Or do you think there's something I can implement now-ish?
17:01 * jnthn was going to try and wrap some of this up today...
17:01 * ruoso is still confused...
17:01 jnthn ruoso: Me too. :-)
17:01 TimToady for now just do the simplest thing that works :)
17:01 * jnthn goes to the pub
17:01 TimToady that works
17:01 jnthn ;-)
17:01 ruoso simplest thing that works seems to be "have an abstract Slot that refers to each part of the declaration"
17:02 jnthn ruoso: What do you mean by abstract Slot here?
17:02 __ash__ jnthn: i have a question if you have a sec, about PAST's and actions.pm, well 2 really
17:02 jnthn I mean, let's take an example declaration.
17:02 ruoso an object that wraps all participants in the declaration
17:02 jnthn my $x is custom_trait;
17:03 riffraff joined #perl6
17:03 jnthn At one point, we're going to call trait_mod:<is>(XXX, :custom_trait)
17:03 * ruoso thinks that Slot might be a bad name...
17:03 jnthn What is the XXX going to look like?
17:03 TimToady declarand is better
17:03 * ruoso can't think of something much different than Declaration
17:03 jnthn __ash__: Sure.
17:03 ruoso right... declarand is find
17:04 ruoso so... a Declarand object, in this case a ScopeVariableDeclarand
17:04 jnthn On the one hand, the XXX could just be a Scalar. Or in the case of my @x, it's be Array, etc.
17:04 jnthn But I'm guessing instead we want something that wraps around that.
17:04 TimToady it's often just a container
17:04 ruoso that has $.visibility = 'my'; has $.name = '$x'; has $.storage_type = 'Scalar'
17:04 jnthn OK.
17:04 __ash__ jnthn: when you do --target=past, i have seen <pasttype> => "callmethod" and <pasttype> => "call" what is the difference between those? is that how it's translated into a method call at the next level down?
17:04 TimToady but it can be a container factory
17:05 ruoso container factory++
17:05 jnthn __ash__: Difference is in the PIR that is generated.
17:05 ruoso TimToady, but not every declaration specifies a container
17:06 jnthn __ash__: call makes a 'foo'(c1, c2, c3,...), callmethod makes a c1.'foo'(c2, c3)
17:06 ruoso I think we would have an abstract Declarand type, that would have several specialized subtypes
17:06 TimToady ruoso: some containers are more abstract than others :)
17:06 ruoso AttributeDeclarand
17:06 ruoso MethodDeclarand
17:06 ruoso ScopeDeclarand
17:07 jhorwitz joined #perl6
17:07 ruoso using specialized subtypes will even allow you to multi-dispatch on the declaration type
17:08 jnthn Well, of routines passing the Routine itself is fine, since it contains a whole bunch of traits we can examine.
17:08 ruoso s/tion/nd/
17:08 jnthn *for routines...
17:08 TimToady a routine is a container of an indirection, which is why a routine is wrappable
17:08 jnthn Right.
17:08 ruoso jnthn, except if the trait is a modifier to the way the routine is stored, not the routine itself
17:09 yath mhm. say, if i just want to play around a bit with perl6, what would i use? rakudo? pugs? or what's the "most complete" implementation?
17:09 TimToady at the point of the declaration at least, we generally still know where it is going to be stored
17:09 jnthn Well, that's quite probably already happened before the traits get run.
17:09 justatheory joined #perl6
17:10 TimToady jnthn: yes, which is why "is also" changed to "augment"
17:10 ruoso TimToady, but the "how" it is stored is that can modfiied
17:10 jnthn yath: Rakudo is actively developed and pretty feature rich.
17:10 yath jnthn: okay, i'll check that out, thanks :)
17:10 TimToady .oO( :carefully )
17:10 jnthn ruoso: I'd think not so much by a trait, unless it's going to retroactively go and fiddle.
17:10 pmichaud (should that be a FAQ somewhere useful? )
17:10 yath are there any "fundamental" changes between the different implementations, or is it just that one has less features than the other?
17:11 ruoso jnthn, is aliased<foo> is a good example
17:11 jnthn yath: Pugs still does a few things that Rakudo does not (e.g. laziness).
17:11 yath jnthn: but there's nothing in either pugs or rakudo that's not spec'd?
17:12 yath jnthn: like, say, some magic compile-specific things as in C
17:12 yath s/compile/&r/
17:12 pmichaud I think that by definition different implementations are likely to offer at least some items that "aren't specced".
17:12 TimToady they both provide ways of getting at lower-level primitives that aren't going to be specced
17:12 yath pmichaud: hm :(
17:12 ruoso yath, you should have a lot of fun with rakudo already...
17:13 yath TimToady: what primitives? like extending STD.pm?
17:13 TimToady yath: an implementation *must* do that, or there's no way to write Perl 6 code to implement the non-primitive bits
17:13 ruoso yath, http://daniel.ruoso.com/cate​goria/perl/dice-game-perl-6 for an example of fun
17:13 yath TimToady: maybe i don't get what you mean with "primitives" :) the NQP thing?
17:13 jnthn yath: The places where implementations do have such things is not something you're likely to run into by accident.
17:14 TimToady I mean things like inline PIR
17:14 pmichaud yath: Rakudo is built on the Parrot virtual machine.  Some people will want to get access to features that are only available in Parrot, and Rakudo isn't going to forbid that from happening.
17:14 yath ruoso: ah, nice
17:14 yath TimToady, pmichaud: ah
17:14 yath so like, er, say, asm() in C ;)
17:14 TimToady that will never be in the p6 spec
17:14 TimToady precisely
17:14 pmichaud but pretty clearly we aren't going to specify that all Perl 6 implementations require Parrot.
17:14 jnthn yath: Along those lines.
17:14 __ash__ jnthn: also, what is contained in $/  ? and is there a reason why some methods have a space after ( and some done? (ie. $past.name('call') vs $past.unshift( $<variable>.ast ); ?
17:15 jnthn __ash__: $/ contains the match object
17:15 TimToady that's just formatting
17:15 jnthn __ash__: The other difference is just different people's coding preferences.
17:15 yath but if the "average" perl6 programmer writes a program, what's the chance that he accidentally uses a compiler-specific feature?
17:15 pmichaud yath: very small.
17:15 [particle] __ash__: some believe that when a simple item is contained in quotes, it should not have spaces around it
17:15 TimToady one tends to put more whitespace when it's harder to find the other end visually
17:16 __ash__ I was just wondering if there is a 'standard' i should be following since i am messing around in the core stuff
17:16 yath pmichaud: ah, good to hear
17:16 pmichaud yath: and in Rakudo's case we may add pragmas that are required in order to make use of the special features
17:16 pmichaud (we just haven't done that yet)
17:16 yath that was *that* nice in perl5. if something worked in, say, perl 5.8, it worked in perl 5.8.
17:16 TimToady yath we tend to go on a forgiveness-rather-than-permission basis here
17:17 [particle] we've permitted that for quite some time
17:17 yath and i'm very concerned that in perl6 one writes code for rakudo, one for pugs, and so on
17:17 yath TimToady: forgiveness on what?
17:17 * ruoso tries to pull back the trait issue...
17:17 jnthn yath: Unless you're doing something obscure, that's unlikely.
17:17 TimToady on where you put your optional spaces :)
17:17 yath my spaces?
17:18 jnthn __ash__: Just do what you think looks pretty. ;-)
17:18 yath am i doing python? :P
17:18 yath jnthn: fine :)
17:18 TimToady only in the spots where p6 requires spaces
17:18 [particle] ...perl 6 is closer to python spacing rules than you may know...
17:18 pmichaud peoplewhothinkthatwhitespaceisinsi​gnificantneedtorethinkthatabit.:-)
17:18 __ash__ jnthn: alright, time to name my variables a, b, c /sarcasm
17:19 [particle] latin++
17:19 TimToady but we don't use indentation for syntax
17:19 jnthn __ash__: That'd be an odd definition of pretty, but I guess beauty is in the eye of the beerholder.
17:19 jnthn erm, beholder.
17:19 jnthn :-)
17:19 pmichaud beerholder++
17:19 pmichaud I'll have to remember that phraselet.
17:20 jnthn So anyway, getting back to traits on variable/attribute decls...
17:21 ruoso I think we have a generic Declarand type
17:21 __ash__ well, thanks for your time jnthn: i have something that almost works... it makes method calls like $a.Foo::bar() translate into a nearly identical Foo::bar($a) call, its not working (mainly i left it as callmethod rather than call) but when i do i'll try to send you a git-patch, gotta run
17:21 ruoso and specific sub-types
17:21 ruoso for attribute, method, variable etc
17:21 jnthn (This is like about the last thing I need to do before I can call my current Hague grant complete...thus my eagerness ;-))
17:21 TimToady roles, perhaps
17:22 jnthn ruoso: OK, and would that have a way of actually getting at the container?
17:22 jnthn That is, the real declarand?
17:22 ruoso yeah...
17:22 ruoso something like .container
17:22 ruoso if it's a ContainerDeclarand maybe
17:23 ruoso the cool thing is that you can easily restrict where a trait can be used
17:23 jnthn So my $foo is bar; multi trait_mod:<is>(Declarand $d, :$bar!) { $d.container does bar; }
17:23 ruoso simply by setting that specific declarand subtype in the signature of the trait routine
17:23 ruoso yeah...
17:24 jnthn Right, just as you can already do now e.g. multi trait_mod:<is>(Method $m, :$thingy!) { ... } already in Rakudo will do the right thing (that is, only be applicable to methods, not routines in general).
17:25 ruoso jnthn, right... indeed... it carries just a bit more information than "Method"
17:26 jnthn TimToady: When you said roles, are you thinking we'd set this up as more like class Scalar does ContainerDeclarand { has $.name; method container { self }; ... }, but it's possible other declarations could have a completely separate object?
17:26 yath hm, won't corrent rakudo svn build against parrot 1.0.0?
17:26 yath err, rakudo git
17:26 jnthn yath: No.
17:26 yath hm, damn
17:27 pmichaud it's very rare that rakudo git will build against any given parrot release.  Rakudo evolves too quickly for that.
17:27 jnthn yath: If you grab Rakudo from git (which I guess you've already done...)
17:27 jnthn And then just do
17:27 jnthn perl Configure.pl --gen-parrot
17:27 TimToady jnthn: I have no idea what people will want to declare 100 years from now :)
17:27 yath jnthn: yeah, but i thought i could use debian's parrot instead
17:27 jnthn It will get the right Parrot, make an install in your build directory, build Rakudo against it and make you something that Just Works. :-)
17:27 jnthn yath: Ah, OK. No, 'fraid not.
17:27 yath jnthn: but i didn't know if chaning build/PARROT_REVISION is a good idea %-)
17:28 jnthn yath: Changing it to an earlier version number? No, that'd count as a bad idea. :-)
17:28 yath well then, we're in 2009. doesn't take too much time to build parrot, i hope :)
17:28 jnthn No
17:28 yath jnthn: i changed it to 0 :P
17:29 jnthn TimToady: Heh. That isn't much help to me now. :-P
17:30 jnthn TimToady: Anyway, I can come up with something that works, that is along the lines of what ruoso++ is saying too, and I guess we can iterate from there.
17:30 yath uah, svn is *that* slow compared to git
17:30 yath *wait*
17:30 TimToady jnthn++
17:30 jnthn yath: Heh, the checkout will probably take almost as long as the build. ;-)
17:30 yath hehe
17:31 jnthn Thanks all.
17:31 TimToady Do you realize they can't even do karma in Haskell without a *monad*!?!  :)
17:31 TimToady karma is a side effect...
17:35 szbalint Rakudo probably builds against Parrot 1.5 though, as it was just released :)
17:35 szbalint but I haven't tested it...
17:37 yath hm, i should have passed -j to make...
17:43 yath $ ./perl6 -e 'say "foo"'
17:43 yath foo
17:43 yath \o/
17:53 yath hm, is there no qw in perl6 anymore?
17:53 ruoso yath, just < >
17:53 yath ah, <>
17:53 yath yeah
17:53 yath thanks :)
17:54 * yath just found Perl6::Perl5::Differences
17:57 yath is there any difference between «» and »«?
17:57 yath as meta-operator
17:57 jnthn Yes.
17:57 jnthn dwimminess.
17:57 yath both DWIM :P
17:57 jnthn You point the sharp end at a side to have it auto-upgrade.
17:57 jnthn That is, if it's too short.
17:57 yath yes, in the case of «« or »»
17:57 yath but if i do «+» or »+«?
17:58 jnthn <<+>> means "upgrade the shorter side, it doesn't matter which is shorter"
17:58 jnthn >>+<< means "explode if they're different lenghts"
17:58 yath ah
17:58 yath thanks
17:58 jnthn rakudo: say (1,2,3) >>+<< 1;
17:58 p6eval rakudo 0d4fe0: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤in Main (/tmp/dhw1sHVOKM:2)␤»
17:58 jnthn rakudo: say (1,2,3) >>+>> 1;
17:58 p6eval rakudo 0d4fe0: OUTPUT«234␤»
17:59 yath rakudo: say (1,2,3) <<+>> 1;
17:59 p6eval rakudo 0d4fe0: OUTPUT«234␤»
17:59 jnthn (just checking I got it the right way around :-))
17:59 yath hm
17:59 jnthn Right. But if you have @a and @b and you don't know which is shorter, then <<+>> becomes more useful. :-)
18:00 yath cool, even >>+<<< works :)
18:03 jnthn phenny: tell masak you wrote http://github.com/masak/csv in your blog but it gives me 404?
18:03 phenny jnthn: I'll pass that on when masak is around.
18:03 yath isn't [] used for array refs anymore? <foo bar>.perl gives ["foo", "bar"], althought it's an array. or a list. or whatever.
18:03 pmichaud that's a piece that is needing some upgrading
18:04 pmichaud we're waiting for some spec revisions to land
18:04 pmichaud older versions of the spec indicated that lists would .perl as arrays.  That's no longer true, but the new spec is incomplete on the subject.
18:04 yath ah, so the "traditional" [] and {} still stand?
18:04 pmichaud ['foo', 'bar']  is an array
18:04 pmichaud ('foo', 'bar')  is a list
18:05 pmichaud <foo bar>  is also a list
18:05 yath but how would i do an array ref then?
18:05 pmichaud ['foo', 'bar'] acts like an array ref
18:05 pmichaud but references are somewhat "hidden"
18:05 pmichaud i.e.,    my $a = ['foo', 'bar'];    say $a.WHAT   # Array
18:05 pmichaud rakudo:  my $a = ['foo', 'bar'];  say $a.WHAT;
18:06 p6eval rakudo 0d4fe0: OUTPUT«Array()␤»
18:06 pmichaud rakudo:  my $a = ['foo', 'bar'];  say $a[1];
18:06 p6eval rakudo 0d4fe0: OUTPUT«bar␤»
18:06 pmichaud note that it's _not'   $a->[1]
18:06 yath hmmmmm
18:07 jnthn In general, you just don't have to think about references in Perl 6.
18:07 yath just wonderes because @a = <a b c>; @b = <d e f>; both look like array refs, but @c=(@a,@b) works as i'd expect it from perl5
18:07 yath s/wonderes/wondered/
18:07 pmichaud neither of those are array refs
18:07 jnthn rakudo: my $foo = [1, { x => 42 }, 3]; say $foo[1]<x>;
18:07 p6eval rakudo 0d4fe0: OUTPUT«42␤»
18:07 pmichaud @a = <a b c>  is the same as  @a = ('a', 'b', 'c')
18:07 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
18:08 KyleHa pmichaud:  Good to see you!
18:08 pmichaud KyleHa: glad to be "back"
18:09 barney joined #perl6
18:09 zloyrusskiy i wanna ask lame question: why in interactive mode i can't declare variables, i'm getting error: Symbol '@a' not predeclared in <anonymous>
18:09 zloyrusskiy in Main (src\gen_setting.pm:3343)
18:10 KyleHa Any objection to me moving the PARROT_REVISION up to today's release version?
18:10 jnthn KyleHa: I already have a patch here to do it...
18:10 KyleHa I ran the spectest with it, and it has the same failures I've come to expect.
18:10 jnthn KyleHa: Ah, I was just waiting for my run to finish.
18:10 KyleHa jnthn: In that case, I'll leave it.
18:11 jnthn zloyrusskiy: At the moment, the interactive mode treats each line as its own lexical scope.
18:11 jnthn zloyrusskiy: Which, yes, sucks.
18:11 zloyrusskiy =)
18:11 jnthn zloyrusskiy: my $a = 42; say $a; # all on one line is fine
18:11 zloyrusskiy jnthn: ok, thanks
18:12 zloyrusskiy jnthn: yeah, works
18:12 jnthn :-)
18:12 jnthn We have plans to improve it...hopefully in the not too distant future that'll get done. :-)
18:13 jferrero joined #perl6
18:16 pmichaud jnthn: I get one failure in thorough.t after bumping PARROT_REVISION
18:17 jnthn pmichaud: That's my fault, don't worry about it.
18:17 pmichaud other than that, bumping PARROT_REVISION looks okay to me
18:18 pugs_svn r28021 | jnthn++ | [t/spec] Fudge a test that is failing in Rakudo.
18:18 jnthn That's thorough.t taken care of.
18:19 jnthn OK, pushed the bump.
18:19 jnthn Who's release manager this month for Rakudo?
18:19 pmichaud KyleHa++
18:20 KyleHa *bow*
18:20 KyleHa I'm looking for a namer.
18:20 smash_ pmichaud: did you add me to the pool ?
18:20 pmichaud smash_: Hadn't heard from you yet for August, and KyleHa++ came up so he got August.  Next available slot is December or January, if you want them
18:21 smash_ pmichaud: i can take december
18:22 dalek rakudo: 6c7b8b3 | jnthn++ | build/PARROT_REVISION:
18:22 dalek rakudo: Bump us up the the current Parrot release, in preparation for the next Rakudo release.
18:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​c7b8b3b3dca9366eb7948111645c2bcdeaba39a
18:22 pmichaud smash_: okay, I'll give you december and move chromatic to january (he and I had already discussed this possibility)
18:22 pmichaud note that PARROT_REVISION is now frozen until the Rakudo release on Thu
18:22 smash_ pmichaud: i can do january too, it's the same for me
18:23 pmichaud smash_: I'm trying to make sure we don't have two months in a row with the same release manager
18:23 pmichaud oh, you mean instead of december.  Either one, choice is yours :)
18:23 smash_ pmichaud: either way is fine with me, just schedule it as you see fir
18:23 pmichaud smash_: okay, will do, and thanks!
18:24 smash_ (s/fir/fit/)
18:24 KyleHa I'm shooting to have the release all but done in about 24 + 10 hours.
18:24 KyleHa ...because my free time may be more restricted after that.
18:24 pmichaud KyleHa: that sounds fine
18:25 jnthn pmichaud: I'm rakudo-daying tomorrow, will mostly do bug triage.
18:25 pmichaud jnthn: works for me.  I may do the same -- depends on how other events play out.  I might also review/update the "make install" target a bit more tomorrow.
18:25 pmichaud Of course, all bets are off if I don't have $otherjob server woes taken care of first.
18:27 jnthn nod
18:27 pmichaud (but I think that's likely to be taken care of by then)
18:27 payload joined #perl6
18:42 zamolxes joined #perl6
18:50 icwiener joined #perl6
19:10 masak joined #perl6
19:10 masak TEH PARROTZ!
19:10 phenny masak: 18:03Z <jnthn> tell masak you wrote http://github.com/masak/csv in your blog but it gives me 404?
19:11 masak hm.
19:11 PerlJam s/csv/cvs/
19:11 PerlJam you typo'ed
19:12 masak yes... in creating the repo :/
19:12 payload joined #perl6
19:12 masak anyway, I've renamed it now. github says it'll take a couple minutes to go through.
19:12 masak jnthn: thanks.
19:13 PerlJam masak++
19:13 masak apparently, getting things done/right is an iterative process. :)
19:23 cono joined #perl6
19:27 masak rakudo: role Self[Self] {}
19:27 p6eval rakudo 0d4fe0: OUTPUT«set_pmc_keyed() not implemented in class 'Integer'␤in Main (src/gen_setting.pm:1538)␤»
19:27 masak expected behaviour? discuss.
19:28 masak std: role Self[Self] {}
19:28 p6eval std 28021: OUTPUT«[31m===[0mSORRY![31m===[0m␤Invalid typename Self at /tmp/1OlrJQaA7X line 1:␤------> [32mrole Self[Self[33m⏏[31m] {}[0m␤FAILED 00:03 41m␤»
19:28 PerlJam it's hard to tell if they're making any progress on #parrot.
19:28 jnthn PerlJam: We are, don't worry.
19:28 masak progress with what?
19:29 jnthn Trying to prevent a Parrot clusterfuck that would cause Rakudo development problems.
19:29 TimToady translation: we now have jnthn and pmichaud worrying about it, so you don't have to :)
19:29 PerlJam jnthn: but do you, pmichuad, TimToady, allison and chromatic all agree?  :)
19:29 masak oh, a clusterfuck, no less?
19:29 pmichaud PerlJam: I think that I, jnthn, and TimToady agree.
19:30 TimToady I don't think chromatic agrees yet, but he's in snark mode at the moment
19:30 TimToady he'll come around eventually
19:30 * masak backlogs
19:30 * masak submits rakudobug
19:30 jnthn chromatic's points are whines about language design, which ain't really applicable to the discussion right now.
19:30 pmichaud this question came up 10 months ago :-)    http://irclog.perlgeek.de/​parrot/2008-10-22#i_638371
19:30 jnthn .oO( seems I'm in snark mode too ;-) )
19:31 jnthn pmichaud: Depressing.
19:31 jnthn pmichaud: Anyway, from what allison has said, there's only one real issue now.
19:31 jnthn Basically, yes, the CallSignature will have the invocant as the first positional.
19:31 TimToady I think it was shortly after that that we melted ruoso's brane with the same issue and made him rewrite smop :)
19:32 pmichaud TimToady: actually, that came about 4 months later, iirc
19:32 pmichaud I think we melted ruoso's brane in the february time frame
19:32 TimToady that's shortly, in Perl years :)
19:32 jnthn Parrot will record something that lets us know whether the invocation has a a.$P0(b, c)
19:32 jnthn Or a $P0(a, b, c)
19:32 pmichaud jnthn: that's not how I read it.
19:32 jnthn And allison proposes that a :method will, by default, care about that.
19:32 PerlJam so much for agreement  :)
19:32 jantore joined #perl6
19:32 pmichaud I read that  $P0(a, b, c)  throws an exception.
19:33 jnthn Yes, but separate out the issues.
19:33 jnthn That's _not_ because a is not the first positional in CallSignature.
19:33 pmichaud PerlJam: oh, looks like we agree.  :)
19:33 jnthn It's because the two CallSignature's carry different extra metadata.
19:33 ruoso TimToady, pmichaud, you bet... thankfully my brain got back in place already
19:33 pmichaud jnthn: right, it's because a sub flagged as :method will carp if the first argument isn't flagged as invocant
19:33 ruoso at least I thikn it did
19:33 jnthn pmichaud: Right, which means basically the issue is making sure we have a way to say to Parrot, please don't carp about it.
19:33 TimToady well, parrotfolk are going through the branemelt now :)
19:34 jnthn pmichaud: fwiw, I think very likely is that we are going to take the CallSignature and unpack and bind it ourselves.
19:34 pmichaud jnthn: yes, I had come to that conclusion as well.
19:35 pmichaud jnthn: which means I don't really care much about :lookahead
19:35 jnthn But I'm reluctant to suggest that the only way to surpress it is "    .param pmc args :call_sig"
19:35 jnthn pmichaud: Right.
19:35 jnthn Me either.
19:35 pmichaud (and no, :lookahead was not my choice of name, despite what allison++ has said :)
19:35 jnthn Now that I've kinda confirmed to myself that we need to go on the self-unpacking route.
19:35 jnthn (I was quite open to both at one point. "inter_call.c refactors come later" just changed that...)
19:35 pmichaud the hard part is going to be getting PGE to conform to both the Rakudo and P6 worldviews.
19:36 jnthn ...Rakudo and P6?
19:36 pmichaud sorry, Parrot and P6 worldviews
19:36 jnthn You mean Rakudo and Parrot?
19:36 pmichaud (typo)
19:36 jnthn Right, well that's why we need to try and push for a way other than just saying "I'll unpack myself" to surpress the warning.
19:36 jnthn erm,
19:36 jnthn the exception
19:36 jnthn not warning, exception
19:37 jnthn Knowing our luck, it'll probably end up being called :submethod ;-)
19:37 TimToady just flip the resumable bit on it and resume it.  :)
19:38 TimToady then feed parrot to the optimizer, and it notices that the exception is always resumed, and deletes it entirely :)
19:38 TimToady (I wish)
19:41 tann joined #perl6
19:42 masak rakudo: role Self[Foo] {}
19:42 p6eval rakudo 0d4fe0: OUTPUT«set_pmc_keyed() not implemented in class 'Integer'␤in Main (src/gen_setting.pm:1538)␤»
19:42 jnthn where the heck does the integer come from?
19:44 masak don't ask me. :)
19:44 jnthn Yeah. I should ask the fool that implemented the thing.
19:44 masak there's now an RT ticket reminding you to find out, however. :P
19:45 masak jnthn: I'm pretty sure 'fool' isn't very collocational with 'type system implementor'...
19:46 masak besides, I'm only investigating corner case failure modes, as usual.
19:46 TimToady there's a joke to be made there about the former checkoslovakia, but I'm still trying to figure out what it is
19:47 TimToady czech, bah
19:47 TimToady can't spell this week
19:47 masak looking forward to that joke, anyway. :)
19:47 * jnthn will czech back later for it
19:50 masak *rimshot*
19:52 masak I'm glad you seem to be reaching consensus on #parrot.
19:54 xomas_ joined #perl6
19:57 hercynium joined #perl6
19:57 jnthn ...well, I almost thought we had... :-)
20:01 masak :/
20:04 sjohnson i have a question for everyone:  I want to become able to use Perl very well, and I was thinking of mastering the Camel book.  But should I instead just master the Perl 6 specifications?
20:05 masak sjohnson: depends on what your short-term goals are, I'd say.
20:06 kane__ joined #perl6
20:06 masak Perl 5 is one nice really language. and it has lots of good libraries.
20:06 sjohnson i want to be able to weild perl like some of the more creative guys around here
20:06 nErVe joined #perl6
20:06 TimToady buying a Camel book puts a few cents into my bank account, while the P6 specs are a net drain... :)
20:06 takadonet hehe
20:06 masak :D
20:06 sjohnson my boss paid for the Camel Book :)
20:07 sjohnson the only thing about it can't figure out for the life of it, is the difference between "my $goose"  and "our $goose"
20:07 takadonet so does mine :) Any book I need, we get for free
20:07 PerlJam sjohnson: do you understand lexicals?
20:07 PerlJam sjohnson: do you understand package vars?
20:07 sjohnson i understand the "my" scope and the exporter things from packages
20:09 PerlJam our $foo;  makes the name $foo lexically available and it maps to $SomePackage::foo
20:09 evilmight joined #perl6
20:09 evilmight left #perl6
20:10 sjohnson must the $foo be declared in SomePackage/foo.pm?
20:10 Tene sjohnson: no, it's just a variable...
20:13 sjohnson back to the drawing board for me -_-
20:14 masak sjohnson: my suggestion to you is to start writing code. preferably lots of it.
20:14 masak discussing theory is good, but it only gets you so far.
20:19 masak rakudo: say <-> $n, $l = 3 { join ",", reverse gather while $n { my $s = sprintf "%03d", $n % 10**$l; $n = truncate($n / 10**$l); take $n ?? $s !! $s.subst(/^0+/, "") } }.(65536)
20:19 p6eval rakudo 0d4fe0: OUTPUT«65,536␤»
20:19 payload joined #perl6
20:20 * jnthn glances at #parrot again and bangs his head against the wall
20:20 jnthn OK, it's high time for me to get dinner...be back in a bit.
20:20 masak this day has had a record amount of people banging their heads against hard, flat surfaces.
20:22 KyleHa What are the Parrot folks trying to solve?
20:23 masak also, who would have thought in 2000 that nine years later, a group of Perl 6 developers would have a hard time reaching consensus with a group of Parrot developers? from the point of view of nine years ago, the thought staggers.
20:24 takadonet cya all later
20:24 masak takadonet: o/
20:24 takadonet hopefully tomorrow I could show you guys a fasta parser!
20:24 PerlJam masak: 9 years ago it would have been "What's Parrot?" and "What's Rakudo?"  :)
20:25 masak PerlJam: oh! which year was the Parrot April's Fools joke?
20:25 PerlJam might have been 2000, but I think it was 2001 or 2003
20:25 PerlJam er, 2002
20:25 masak it was no later than 2001. http://oreilly.com/news/parrotstory_0401.html
20:26 masak aye, 2001, it seems.
20:26 masak by the way, it would still be kinda funny to make such a hybrid language.
20:30 tak11 joined #perl6
20:30 perletc joined #perl6
20:30 perletc im here, coolness
20:30 perletc perl6 looks awesome
20:30 payload1 joined #perl6
20:30 masak perletc: welcome!
20:30 masak rakudo: say 'perletc: so, have you tried Rakudo yet?'
20:31 p6eval rakudo 0d4fe0: OUTPUT«perletc: so, have you tried Rakudo yet?␤»
20:32 sjohnson wow, perletc is a cyborg
20:32 sjohnson perl6 truly can accomplish anything
20:32 masak sjohnson: what makes you think perletc is a cyborg? he looks perfectly human to me.
20:33 sjohnson oh
20:33 sjohnson i didn't see your "rakudo:" part
20:33 sjohnson i just saw the perletc: part
20:33 sjohnson thought you were executing code with him
20:34 masak sjohnson: :)
20:34 masak perletc: even the residents here can't tell the difference between droids and humans. that's how advanced Perl 6 is. :)
20:34 TimToady I should turn TimToady into a bot that also lets me type through...
20:35 sjohnson timtoady: print Dumper Advice.life;
20:35 masak TimToady: there's prior art. buu has a buubot...
20:35 TimToady Out of Memory
20:36 mofino haha
20:36 sjohnson BotToady
20:38 masak rakudo: my ($a is readonly) = 5; say $a; $a = 7; say $a
20:39 p6eval rakudo 0d4fe0: OUTPUT«5␤7␤»
20:40 PerlJam sjohnson: and together they are ... the Toadys  :)
20:40 cono TimBot - There is more beautiful onions there :D
20:40 perletc sorry guys, im back
20:41 perletc no havent tried Rakudo yet, im scared
20:41 masak no need to be scared.
20:41 masak just type 'rakudo: ' and then your first program.
20:41 masak rakudo: say 2 + 2
20:41 p6eval rakudo 0d4fe0: OUTPUT«4␤»
20:42 perletc why does the output look like that?
20:42 perletc �4␤»?
20:42 masak perletc: those are french quotes on my screen.
20:42 perletc maybe its my client, im using hydrairc
20:42 cono rakudo: .say for 1..3
20:43 masak probably an encoding issue, yes.
20:43 p6eval rakudo 0d4fe0: OUTPUT«1␤2␤3␤»
20:43 RonOreck joined #perl6
20:43 mkelly32 so. sub MAIN basically works like: run script like perl5 would. then, if there is a &main::MAIN, call main::MAIN(|@*ARGV)? or, is it fancier than that?
20:43 masak rakudo: say ("OH HAI", "try me,") X~X " perletc"
20:43 p6eval rakudo 0d4fe0: OUTPUT«Could not find non-existent sub X␤»
20:44 masak oops.
20:44 masak rakudo: say ("OH HAI", "try me,") X~ " perletc"
20:44 p6eval rakudo 0d4fe0: OUTPUT«OH HAI perletctry me, perletc␤»
20:44 perletc what so great about perl6 (that a cool title for a blog article)
20:44 TimToady mkelly32: it also translate normal switch syntax to named args
20:44 masak rakudo: .say for ("OH HAI", "try me,") X~ " perletc"
20:44 p6eval rakudo 0d4fe0: OUTPUT«OH HAI perletc␤try me, perletc␤»
20:44 perletc does it have dot syntax now?
20:44 masak perletc: yep.
20:44 dbrock joined #perl6
20:44 masak perletc: and it's better than ever.
20:45 perletc niceness
20:45 masak perletc: look at this, for example:
20:45 masak rakudo: for "niceness" { .=flip; .say }
20:45 p6eval rakudo 0d4fe0: OUTPUT«ssenecin␤»
20:45 mkelly32 hrm, neat. so, is it able to be a complete replacement for Getopt::Long? or are there still a few things that Getopt does that a sub signature can't?
20:46 masak mkelly32: I think it'll be a pretty complete replacement.
20:46 perletc rakudo: package foo; sub new { return bless {}, class; } sub moo { return 'blah'; } 1; say foo.new.moo;
20:46 p6eval rakudo 0d4fe0: OUTPUT«Unable to parse class definition at line 2, near "; } sub mo"␤in Main (src/gen_setting.pm:1525)␤»
20:47 perletc im pretty sure i F'd that up
20:47 masak perletc: whoa! one step at a time. :)
20:47 perletc :)
20:47 masak perletc: you need semicolons after blocks now, if you continue writing code on the same line.
20:47 perletc ah
20:47 masak also, you generally don't need to declare your 'new' methods.
20:47 masak watch:
20:48 perletc niceness
20:48 masak rakudo: class A { method moo { return 'blah' } }; say A.new.moo
20:48 p6eval rakudo 0d4fe0: OUTPUT«blah␤»
20:48 sjohnson moo is a cute var name
20:48 perletc auto-instansiation
20:48 perletc cewl
20:49 masak this also works:
20:49 perletc wait wait, dont tell me it supports prototyping too
20:49 masak rakudo: class A { method moo { return 'blah' } }; my A $a = A.new; $a.moo
20:49 p6eval rakudo 0d4fe0:  ( no output )
20:49 masak oops.
20:49 masak rakudo: class A { method moo { return 'blah' } }; my A $a = A.new; say $a.moo
20:49 p6eval rakudo 0d4fe0: OUTPUT«blah␤»
20:49 masak perletc: it's prototype-based, yes.
20:50 masak the above ('my A $a = A.new') can also be shortened to just 'my A $a .= new'
20:50 perletc fa sho
20:50 perletc so, what about method moo (my $foo, $barr) { ... }
20:51 perletc limiting the parameters?
20:51 masak there are parameter declarations, yes.
20:51 masak but you don't need a 'my' there.
20:51 perletc very cewl
20:52 perletc very very cewl
20:52 masak rakudo: sub foo($a, $b, $c = 5) { .say for $a, $b, $c }; foo(1,2)
20:52 p6eval rakudo 0d4fe0: OUTPUT«1␤2␤5␤»
20:52 perletc damn Perl is back
20:52 perletc ok how can I help
20:52 masak :)
20:52 masak perletc: ok, so here's our current problem:
20:52 masak we need people who write applications.
20:53 perletc me
20:53 masak you guessed it.
20:53 masak doesn't have to be ambitious stuff.
20:53 masak just try things out with Rakudo and see if they work like you think.
20:53 pmichaud we could also use updates to http://rakudo.org/how-to-help :)
20:53 pmichaud I can give out edit bits for those who need them
20:53 masak blog about it, tweet about it, tell your friends. re-visit us here at #perl6 and ask all manner of questions.
20:54 perletc k
20:54 mkelly32 are heredocs still NYI?
20:54 masak perletc: we simply love people who use Rakudo for new, interesting things!
20:54 pmichaud still NYI, sadly.
20:54 pmichaud mkelly32: but qq{...}  and q{...} are often reasonable substitutes
20:54 mkelly32 true.
20:54 masak mkelly32: heredocs are blocking on docking with STD.
20:55 masak reasonable substitutes, but still worthy of an expectant 'RAKUDO: ' comment.
20:55 mkelly32 though, aren't perl6 heredocs supposed to support being indented and such?
20:55 pmichaud yes.
20:55 TimToady STD already implements that
20:55 perletc can rakudo be installed parrallel to current installation, is it backwards compatible, is there a win32 distro yet?
20:55 mkelly32 ah, ok.
20:55 masak STD++
20:55 masak perletc: parallel: yes. back-compatible: no. win32: yes.
20:55 pmichaud if by "backwards compatible" you mean "does it execute Perl 5 code", the answer is "not yet"
20:56 mkelly32 is there a target timeframe for using STD? (which, iirc, is the perl6 grammer written in perl6?)
20:56 pmichaud mkelly32: December 2009
20:56 pmichaud mkelly32: could be sooner than that
20:56 pmichaud but that's the likely target
20:56 masak wow, it's like a Christmas gift! \o/
20:56 mkelly32 is the idea that all the different perl6 implementations would use STD?
20:56 perletc is rakudo the official name?
20:56 masak perletc: Rakudo is one of the most lively Perl 6 implementations.
20:57 pmichaud mkelly32: STD will be the reference grammar
20:57 masak perletc: the long name is, I believe "Rakudo Perl 6".
20:57 pmichaud mkelly32: I don't know how many of them will use STD exactly as-is
20:57 mkelly32 ok
20:58 TimToady commuting &
20:58 perletc lastly, probably dumb, if perl6 can't execute perl5 code, are the modules from perl5 standard in perl6 distro?
20:59 perletc does, CGI, DBI, etc work
20:59 masak perletc: you put your finger on another burning issue.
20:59 masak not at all a dumb question.
20:59 masak for the most part, we get by without those.
20:59 masak some modules, we ported.
20:59 pmichaud there's also not a single "perl6 distro"
20:59 pmichaud (*not going to be...)
20:59 perletc ah, ok.
20:59 masak others, we'd like to see ports of.
20:59 PerlJam perl6 is a multi-headed hydra ;)
21:00 perletc :)
21:00 masak perletc: there's a project called November, a wiki engine written in Perl 6. it uses its own very simple CGI.pm.
21:00 masak perletc: then there's the Web.pm project, which tries to do things better than CGI.pm.
21:01 masak we're still waiting for some heroic figure to grab DBI by the horns.
21:01 cdarroch on this subject, btw, is it anticipated that modules would mostly be written in perl6, or would some be written for parrot, say?
21:01 PerlJam masak: better?  I  think Web.pm and November are apples and oranges.
21:01 cdarroch with the goal of making them run in any parrot-driven HLL?
21:01 masak PerlJam: I meant better than the CGI.pm of Perl 5. sorry, I wasn't too clear.
21:01 PerlJam ah.
21:02 masak PerlJam: but yes, Web.pm will also replace the CGI.pm of November eventually.
21:02 masak I've promised that, and it still seems like a good idea. dogfooding and all.
21:03 * jnthn back
21:03 perletc rakudo: method doit ($id, $user) { say for $id $user; }; doit(1, 'guy', 'failed');
21:04 p6eval rakudo 0d4fe0: OUTPUT«say requires an argument at line 2, near "for $id $u"␤in Main (src/gen_setting.pm:2510)␤»
21:04 mkelly32 i've noticed that november seems pretty darn slow. is that just a product of there not being much optimization work done yet for parrot/rakudo? (since i figure it's more important to have it complete than do premature optimizations)
21:04 PerlJam cdarroch: it doesn't really matter as long as we can turn Perl 6 into PIR (we can) and coerce a Perl 6 compiler to run PIR (I'm fairly sure we can there too :)
21:04 mkelly32 or, is it a potential for improvement in november itself?
21:04 masak perletc: you need '.say' and a comma between $id and $user.
21:05 cdarroch so you could create a p6 DBI module, compile it down to PIR, then use in ParTcl, say?
21:05 masak perletc: also, you should probably use 'sub' outside of class declarations for now.
21:05 PerlJam cdarroch: I don't know about you though, but I'm planning on writing in Perl 6 as much as possible :)
21:05 cdarroch (or at least, that's the vision ...)
21:05 masak cdarroch: oh, definitely.
21:05 perletc ok
21:05 perletc rakudo: sub doit ($id, $user) { .say for $id, $user; }; doit(1, 'guy', 'failed');
21:05 p6eval rakudo 0d4fe0: OUTPUT«too many arguments passed (3) - 2 params expected␤in sub doit (/tmp/S36wawvDeg:1)␤called from Main (/tmp/S36wawvDeg:2)␤»
21:06 perletc cewl, very very nice
21:06 cdarroch ok ... this is how I came to be interested in the concurrency stuff, because I studied DBI's XS when I wrote net::zookeeper recently,
21:06 cdarroch which uses a C library that kicks of several pthreads to handle heartbeat msgs to the server
21:06 M_o_C joined #perl6
21:07 cdarroch it seemed like a p6 version wouldn't need to C lib at all, say -- if it could kick off real threads in p6
21:07 PerlJam cdarroch: ah, perhaps you want to look at http://java2perl6.googlecode.com/svn/trunk
21:07 cdarroch down the road a way, obviously :-/
21:08 masak perletc: do you want to see something I drew with Perl 6? :)
21:09 perletc would be nice to have a truely unified self-sufficient perl
21:09 perletc * requirements for such an acheivement r ovver my head
21:09 PerlJam cdarroch: DBDI is the database driver interface.  Tim Bunce seems to think that we should just use the same interface that JDBC does, so we're (loosely speaking) writing code to translate the JDBC stuff to perl 6
21:09 masak well, there will be Perl 6 distributions that come pre-packaged with different useful modules, I'm sure.
21:15 payload joined #perl6
21:19 masak PerlJam: do you know if there'll be something that people can test-drive within the next few time units?
21:21 PerlJam masak: I do not know, but it feels like there could be something useful soonish.
21:21 masak soonish++
21:22 PerlJam It would be awesome if Rakudo* could have some sort of DBI-like thing, some sort of web framework, some sort of graphics library, and a few popular parsers (HTML, XML, CSV ;)
21:23 PerlJam (I mean all useable at release)
21:23 PerlJam We could even make a few of the first Perl 6 dists from there (simple, but useful)
21:26 masak PerlJam: yes, I agree fully. it would be awesome. we have 226 days to realize such a vision.
21:26 masak and to package it nicely.
21:27 PerlJam I hope that isn't 226 until Apr 1  ;)
21:27 masak it is.
21:28 sjohnson extend the deadline to xmas
21:28 PerlJam oh no!  that's an unfortunate release date.  Better go with March 20 (first day of Spring)
21:28 masak PerlJam: I'm not saying Rakudo Star'll be released on April 1.
21:28 masak PerlJam: in fact, April is only an estimate right now.
21:29 jnthn Plus Rakudo releases are on the third Thursday of the month. ;-)
21:29 jnthn Which had better not be the 1st. ;-)
21:29 PerlJam jnthn++
21:29 masak PerlJam: but I need *some* hard figure, so I'm picking days-left-until-April.
21:29 jnthn Days left until April is a nice enough measure.
21:29 jnthn It gives an order of magnitude.
21:29 jnthn 226 feels like a nice big number. Lots of time to get stuff done. ;-)
21:29 PerlJam masak++
21:29 masak (it also turns out to be a pretty nice use case for improving the Temporal spec)
21:31 jnthn oh my...
21:31 jnthn How in git can I list my pending commits?
21:31 jnthn that is, stuff I comitted but did not yet push?
21:32 masak 'git log master..origin/master', perhaps?
21:32 masak uh, no. the other way around. :/
21:32 masak 'git log origin/master..master'
21:32 masak should work.
21:32 jnthn Thanks, that shows we the commit...
21:32 * jnthn wonders if he can get a diff
21:32 masak sure, just replace 'log' with 'diff' :)
21:33 * jnthn wonders if he can undo having comitted it. <embarrased look>
21:33 masak sure, is it just one commit?
21:33 jnthn yeah
21:33 PerlJam as long as you haven't pushed, it's relatively easy
21:33 masak 'git reset --hard HEAD^' in that case.
21:33 jnthn ok, thanks.
21:33 jnthn :-)
21:33 jnthn Yeah, I haven't done anything insanely stupid. Phew. :-)
21:33 masak git++
21:33 jnthn git++ is great when you know how to use it.
21:34 * masak ♥ git
21:35 sjohnson heh
21:35 sjohnson that's cute
21:35 jnthn gah, today hasn't had enough hours in it.
21:35 jnthn bbiab
21:36 masak my problem with days nowadays is that they have too many hours at the end and too few at the beginning.
21:36 Whiteknight joined #perl6
21:38 dalek rakudo: b9c79c2 | jnthn++ |  (3 files):
21:38 dalek rakudo: Stub in AttributeDeclarand and ContainerDeclarand, as a start to getting something in place for trait application to container declarations. Based on discussion on #perl6, and not spec yet.
21:38 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​9c79c2175ac46b7ba7cbb393bc06c6f2db0646e
21:39 masak jnthn: also, if there was just some little thing about the commit you wanted to fix, there's always 'git commit --amend', an awesome flag.
22:02 ruoso joined #perl6
22:06 jnthn masak: Aye, --amend is one trick I did learn. ;-)
22:08 masak jnthn: what about 'git rebase'? :D
22:09 jnthn masak: I know to try git pull --rebase ;-)
22:09 jnthn Which as I understands it removes my patches, applies the upstram ones, then re-applies mine on top of those.
22:09 jnthn Or something.
22:10 masak 对.
22:10 KyleHa The spectest just said to me, "OH NOES OUT OF CHEEZBURGER".
22:10 masak :)
22:10 KyleHa I reckon my autounfudge was a wee bit too aggressive.
22:11 jnthn ETOOLITTLECHINESESKILLZ
22:11 masak jnthn: but 'git rebase' can do that for you when you've finishing a branch you started four days ago, and you want to remove the commits in your branch, catch up with master, and then re-apply the commits.
22:11 jnthn masak: OK, that sounds kinda good.
22:11 jnthn masak: So it's a good thing to do before merging a branch?
22:11 masak a very good thing.
22:12 TimToady @seen KyleHa
22:12 lambdabot KyleHa is in #perl6. I last heard KyleHa speak 1m 5s ago.
22:12 masak it makes merges much easier.
22:12 TimToady gah, I'm blind
22:12 TimToady KyleHa: in this: dies_ok { RT66886::c }, 'accessing non-value of enum dies proper-like';
22:12 TimToady that's a compile-time error, not run-time
22:12 jnthn The test is geordie like!
22:12 TimToady so would need eval_dies_okay
22:13 KyleHa TimToady: Oh, good catch.  Thanks.  I'll fix that.
22:13 masak jnthn: (in Mandarin, 对 is pronounced DUI4. it's a preposition ('opposite', 'towards'), but alone in a phrase it means 'correct'.)
22:13 jnthn masak: Ah, OK.
22:13 TimToady hmm "opposite" as in "facing", I imagine
22:14 jnthn Learning Mandarin would be really cool.
22:14 TimToady since facing can mean both of those things, more or less
22:14 jnthn I'd like to learn one(Mandarin, Korean, Japanese)...all have their attractions, but there's no way I can manage more than one of them and get anywhere beyond very basics...
22:15 TimToady how one gets from "facing" to "correct" is anyone's guess
22:15 masak TimToady: yes, as in 'facing'.
22:15 TimToady maybe "correct" as in "facing the right way"
22:16 pugs_svn r28022 | kyle++ | fix RT #66886 test, thanks to TimToady++
22:16 masak possibly...
22:17 TimToady ah, more like "corresponds to"
22:17 TimToady as in "that answer corresponds to the question"
22:17 masak ah, of course.
22:17 masak I should have known that. :)
22:17 TimToady tit for tat, this answers that
22:17 masak also, this is a good time to say "对了" :)
22:18 masak meaning 'yes, now you got it right' :)
22:18 TimToady I first read that as "oppositional child", but it's not child
22:18 masak no, it's a statement-ending particle.
22:19 jnthn lol
22:19 jnthn Gah, I'm going to do the traits on containers refactor...another day.
22:20 * masak should sleep
22:21 jnthn Actually it's probably best left until after the release anyway.
22:23 jnthn night masak
22:25 TimToady hmm, maybe there should be a WRONG statement prefix that tells the compiler not to complain about something it knows will blow up at run time
22:26 TimToady dies_okay WRONG { 1/0 }, ...
22:26 masak jnthn: 'night
22:26 KyleHa The test suite seems to have had a much greater focus on death lately.
22:27 masak TimToady: sounds like something better suited for a module.
22:28 TimToady well, it has to instruct the compiler at compile time somehow; run time is too late
22:28 TimToady and there are lots of spots that assume 1/0 won't complain till run time
22:28 TimToady (I suspect)
22:29 TimToady oh good, looks like they're in eval_dies_ok
22:30 frew joined #perl6
22:30 jnthn The compiler can only blow up at compile time on that one, if it knows nobody has lexically defined their own infix:</> ;-)
22:30 TimToady which is purportedly does
22:30 KyleHa I was going to say maybe '1' or '0' got redefined.
22:30 TimToady *it
22:30 jnthn TimToady: Sure, if it's bothering to keep track of such things. ;-)
22:30 TimToady fact is, the constant folder should blow up
22:33 pugs_svn r28023 | lwall++ | [STD] parse #=[...] comments
22:36 kane__ joined #perl6
22:52 frederico joined #perl6
22:59 ruoso @tell pmurias have you manage to include the smop tests in the p5 build as well?
22:59 lambdabot Consider it noted.
23:05 ihrd joined #perl6
23:06 Limbic_Region joined #perl6
23:07 Limbic_Region jnthn ping
23:11 frew__ joined #perl6
23:16 aindilis joined #perl6
23:20 TimToady wayland76: why did you change all your :$foo parameters to $:foo?  that's just wrong...
23:21 TimToady std: sub foo ($:bar) {...}
23:21 p6eval std 28023: OUTPUT«Potential difficulties:␤  Illegal to use : twigil in signature at /tmp/ra5xxhLGIi line 1:␤------> [32msub foo ([33m⏏[31m$:bar) {...}[0m␤ok 00:02 38m␤»
23:28 jnthn Limbic_Region: pong
23:30 bpetering joined #perl6
23:31 sjohnson is that buffer datatype technology?
23:32 bpetering gooood morning #perl6! :D
23:33 sjohnson hi
23:46 sjohnson how does one cope with the unhappiness of having to program 80% PHP, 15% Javascript, and 5% Perl everyday
23:46 sjohnson for their job
23:46 bpetering sjohnson: i was about to ask "how goes it", but now i know.
23:46 sjohnson heheh
23:47 sjohnson anyone's advice would be greatly appreciated
23:48 bpetering sjohnson: well...
23:48 bpetering i am in a similar situation. as to how i "deal with it"...
23:48 bpetering First off, I'm grateful to have a job :)
23:49 bpetering Second, use libraries when possible - jQuery can make life a whole lot easier :)
23:50 bpetering Third, PHP may not have the Tao, but it is Turing complete, so if you learn how to abstract well, you can make your own life a lot easier
23:51 bpetering Fourth: Test.
23:51 bpetering Early, and often.
23:52 bpetering I wish I'd been exposed to Perl's testing culture before I started my current job :(
23:53 bpetering Does that help?
23:55 bpetering Attitude goes a long way... it took me a while to learn that.
23:59 bpetering ... and five: sneak in Perl wherever you can ;)

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs