Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-07-31

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 shinobicl left #perl6
00:21 PacoLinux__ joined #perl6
00:21 PacoLinux left #perl6
00:21 PacoLinux__ is now known as PacoLinux
00:21 dalek rakudo/nom: 0dc9006 | jonathan++ | src/Perl6/Actions.pm:
00:21 dalek rakudo/nom: Unbust CATCH enough so that it doesn't hang and passes all the catch.t that master did.
00:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0dc9006bff
00:21 dalek rakudo/nom: d8c3c74 | jonathan++ | t/spectest.data:
00:21 dalek rakudo/nom: Another passing test file.
00:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d8c3c74c40
00:22 jnthn phenny: tell moritz try.t doesn't do too badly now it seems, but there's some fudge weirdness going on, I think...or maybe I'm just tired. :-) Feel free to take a glance.
00:22 phenny jnthn: I'll pass that on when moritz is around.
00:23 jnthn sleep &
00:33 tokuhirom joined #perl6
00:40 colomon Util++
00:42 PacoLinux left #perl6
00:48 nbrown left #perl6
00:49 shinobicl joined #perl6
00:52 tadzik mathw: pong
00:52 tadzik oops, nvm
00:54 nbrown joined #perl6
00:56 soh_cah_toa left #perl6
00:57 soh_cah_toa joined #perl6
01:04 shinobicl left #perl6
01:05 tokuhirom left #perl6
01:06 tokuhirom joined #perl6
01:07 shinobicl joined #perl6
01:08 shinobicl I think i have finished my WorkdayCalendar module.... suggestions and criticism are _very_ velcome.. https://github.com/shinobi/TaskSched​uler/blob/master/WorkdayCalendar.pm
01:11 tokuhirom left #perl6
01:11 flussence using ternaries to return True/False is a bit pointless... just use prefix ?/!
01:12 shinobicl Ehmmm,, how's that?
01:12 flussence (or not/so if you prefer)
01:12 shinobicl i'm still learning,,, any suggestion is welcome. If it is more readable, the better
01:12 flussence you're using a boolean value to calculate whether to return... another boolean
01:12 shinobicl Ah, yes :) That's true
01:13 shinobicl Iill fix it
01:13 shinobicl I mean, "I'll"
01:17 tadzik jnthn: still segfaults :/
01:18 tadzik will push it anyway soon
01:20 tadzik jnthn: "and my beer class is empty", didn'tcha mean "glass"? Or maybe not... :)
01:22 flussence (oh, I'm getting useful results from this script now)
01:23 flussence https://gist.github.com/1116234 so far if anyone wants a look; it's not quite the format needed to draw that graph
01:23 flussence oh wait, it is
01:24 flussence the graph output's a bit blocky atm :)
01:33 tadzik flussence: anything to show?
01:34 flussence only half a dozen data points, and the progress-graph.pl script wasn't meant for arbitrary dates so it's a bit off.
01:35 flussence I'll leave this running overnight, it might look more interesting by tomorrow :)
01:35 shinobicl left #perl6
01:36 flussence http://i.imgur.com/iBnEL.png if anyone's curious
01:38 benabik left #perl6
01:42 tadzik looks nice :)
01:46 daniel-s joined #perl6
01:50 daniel-s left #perl6
01:51 daniel-s joined #perl6
01:52 [Coke] flussence: is that on nom or master?
01:52 flussence nom
01:53 daniel-s left #perl6
01:53 daniel-s joined #perl6
01:56 woosley joined #perl6
01:58 daniel-s left #perl6
01:58 daniel-s_ joined #perl6
02:00 dalek rakudo/podparser: 7a3a394 | moritz++ | t/spectest.data:
02:00 dalek rakudo/podparser: more passing test files, jnthn++
02:00 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/7a3a394d4c
02:00 dalek rakudo/podparser: 90f996e | moritz++ | / (2 files):
02:00 dalek rakudo/podparser: move most of the build instructions into a separate INSTALL file
02:00 dalek left #perl6
02:00 dalek joined #perl6
02:01 benabik joined #perl6
02:02 tadzik hihi
02:02 daniel-s__ joined #perl6
02:02 daniel-s_ left #perl6
02:02 tadzik anyway, jnthn, the podparser HEAD now segfaults, either when trying to document subs or attributes
02:06 daniel-s__ left #perl6
02:07 daniel-s__ joined #perl6
02:11 daniel-s__ left #perl6
02:11 daniel-s__ joined #perl6
02:15 daniel-s__ left #perl6
02:15 daniel-s__ joined #perl6
02:20 daniel-s__ left #perl6
02:20 daniel-s__ joined #perl6
02:24 _daniel-s__ joined #perl6
02:24 soh_cah_toa left #perl6
02:25 daniel-s__ left #perl6
02:25 wjguo left #perl6
02:26 envi joined #perl6
02:29 daniel-s joined #perl6
02:29 _daniel-s__ left #perl6
02:33 daniel-s_ joined #perl6
02:33 daniel-s left #perl6
02:37 daniel-s_ left #perl6
02:37 daniel-s__ joined #perl6
02:42 _daniel-s__ joined #perl6
02:42 daniel-s__ left #perl6
02:46 daniel-s joined #perl6
02:47 _daniel-s__ left #perl6
02:49 sftp left #perl6
02:49 Instil left #perl6
02:51 daniel-s_ joined #perl6
02:51 daniel-s left #perl6
02:53 sftp joined #perl6
02:55 daniel-s_ left #perl6
02:55 daniel-s_ joined #perl6
02:56 dalek roast: 878f33b | Coke++ | / (9 files):
02:56 dalek roast: nom fudging
02:56 dalek roast: review: https://github.com/perl6/roast/commit/878f33bcc6
02:58 dalek rakudo/nom: b7a2185 | Coke++ | t/spectest.data:
02:58 dalek rakudo/nom: run more (fudged) spec tests
02:58 dalek rakudo/nom: & update failure modes
02:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b7a2185166
02:59 colomon left #perl6
03:00 daniel-s__ joined #perl6
03:00 daniel-s_ left #perl6
03:01 gjfjfjh joined #perl6
03:02 gjfjfjh left #perl6
03:04 _daniel-s__ joined #perl6
03:04 daniel-s__ left #perl6
03:08 daniel-s joined #perl6
03:09 _daniel-s__ left #perl6
03:13 daniel-s left #perl6
03:13 daniel-s_ joined #perl6
03:14 colomon joined #perl6
03:17 daniel-s_ left #perl6
03:17 daniel-s__ joined #perl6
03:18 [Coke] Files=331, Tests=9254
03:19 [Coke] (nom)
03:19 [Coke] lots of non-zero exit statuses, though. (and one failure that seems to have crept in)
03:19 Instil joined #perl6
03:20 tadzik [Coke]++
03:22 daniel-s__ left #perl6
03:22 _daniel-s__ joined #perl6
03:22 [Coke] tadzik: eh. I'm not writing any real code.
03:22 [Coke] but thanks.
03:23 Su-Shee_ joined #perl6
03:26 _daniel-s__ left #perl6
03:26 _daniel-s__ joined #perl6
03:26 Su-Shee left #perl6
03:30 daniel-s joined #perl6
03:31 _daniel-s__ left #perl6
03:31 orevdiabl left #perl6
03:32 revdiablo joined #perl6
03:32 revdiablo left #perl6
03:32 revdiablo joined #perl6
03:35 daniel-s left #perl6
03:35 daniel-s joined #perl6
03:39 daniel-s_ joined #perl6
03:40 daniel-s left #perl6
03:43 Chillance left #perl6
03:44 daniel-s_ left #perl6
03:44 daniel-s_ joined #perl6
03:47 Chillance joined #perl6
03:48 daniel-s__ joined #perl6
03:49 daniel-s_ left #perl6
03:52 dalek roast: b4f7c45 | Coke++ | / (2 files):
03:52 dalek roast: nom (un)fudging
03:52 dalek roast: review: https://github.com/perl6/roast/commit/b4f7c4534f
03:53 _daniel-s__ joined #perl6
03:53 daniel-s__ left #perl6
03:57 _daniel-s__ left #perl6
03:57 daniel-s joined #perl6
04:01 localhost joined #perl6
04:01 daniel-s left #perl6
04:01 daniel-s joined #perl6
04:04 localhost left #perl6
04:06 daniel-s left #perl6
04:06 daniel-s_ joined #perl6
04:09 kolibrie left #perl6
04:10 daniel-s_ left #perl6
04:10 daniel-s_ joined #perl6
04:11 woosley left #perl6
04:15 daniel-s_ left #perl6
04:15 daniel-s__ joined #perl6
04:19 localhost joined #perl6
04:19 _daniel-s__ joined #perl6
04:20 daniel-s__ left #perl6
04:23 kolibrie joined #perl6
04:24 daniel-s joined #perl6
04:24 _daniel-s__ left #perl6
04:28 daniel-s_ joined #perl6
04:28 daniel-s left #perl6
04:32 daniel-s__ joined #perl6
04:33 daniel-s_ left #perl6
04:35 kaare_ joined #perl6
04:37 _daniel-s__ joined #perl6
04:37 daniel-s__ left #perl6
04:41 Mowah joined #perl6
04:41 _daniel-s__ left #perl6
04:41 daniel-s joined #perl6
04:45 dalek roast: d3515cb | Coke++ | S0 (7 files):
04:45 dalek roast: nom fudging.
04:45 dalek roast: review: https://github.com/perl6/roast/commit/d3515cbf46
04:46 daniel-s_ joined #perl6
04:46 tadzik Term::ANSIColor works on nom without changes
04:46 [Coke] sweet
04:46 [Coke] that should get us a few more dozen tests.
04:46 [Coke] zz
04:46 daniel-s left #perl6
04:47 tadzik dream of PASSes :)
04:50 daniel-s_ left #perl6
04:50 dalek rakudo/nom: 5361b09 | Coke++ | t/spectest.data:
04:50 dalek rakudo/nom: run more (fudged) spectests.
04:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5361b09d06
05:02 Chillance left #perl6
05:04 ZaphrodZenovka left #perl6
05:16 dalek niecza: f58916b | sorear++ | src/ (2 files):
05:16 dalek niecza: Name refactor part 2, package definition contexts
05:16 dalek niecza: review: https://github.com/sorear/niecza/commit/f58916b5f2
05:16 djanatyn I'm back :D
05:16 sorear Hello djanatyn!
05:16 djanatyn on my computer with Rakudo
05:16 djanatyn Just had a wonderful experience.
05:17 djanatyn My brother and I were pondering how difficult it would be to play through "New Super Mario Bros. Wii" in one session.
05:17 djanatyn So, we beat it, from start to finish. It took us from 7:55pm-1:05am.
05:17 djanatyn It was pretty intense, at points.
05:17 tadzik (:
05:18 djanatyn Anyway, I'm reading to start writing some Perl 6 now.
05:25 tadzik https://gist.github.com/1116439 # showoff :)
05:25 djanatyn Nice shell.
05:25 tadzik (:
05:26 sorear djanatyn: have you played with niecza yet?
05:26 djanatyn tadzik: That's pretty cool: :D
05:26 djanatyn sorear: nope. I actually haven't even played with Rakudo yet.
05:26 djanatyn How would I go about installing HTML::Template?
05:27 djanatyn ooh, panda
05:27 sorear tadzik would know
05:27 sorear but not I
05:28 sorear djanatyn: you've talked in the past about languages having inaccessible elites.  What did you mean by that?
05:28 djanatyn Oh, no.
05:28 sorear Oh YES
05:29 djanatyn TimToady said that. I think he was joking, being that he is, uhh...Mr. Wall.
05:29 tadzik Mr. Wall inaccessible? News.
05:29 djanatyn He was talking about Perl 6 culture, and saying how those who implement the compilers and those who write the applications freely mix, unlike other languages.
05:30 djanatyn No, he was contrasting it. :)
05:30 djanatyn Also, woah. We can go ahead and declare arrays without quoting?
05:31 sorear You mean my @foo = (1,2,3) versus my @foo = 1,2,3?
05:31 djanatyn Yep.
05:31 sorear Yes
05:31 djanatyn Also, what is @foo[*-1]?
05:31 sorear Last element
05:31 djanatyn The last element in an array? That syntax looks kind of weird.
05:31 djanatyn why "*-1"?
05:32 djanatyn why not @foo.last or somethign?
05:32 sorear * becomes the array length
05:32 djanatyn Oh! I see.
05:32 sorear you could just as well write @foo[*-2] or @foo[* div 2]
05:32 djanatyn That's very cool.
05:33 sorear *-2 is actually an anonymous code block
05:33 sorear rakudo: say (*-2)(50)
05:33 p6eval rakudo 922500: OUTPUT«48␤»
05:34 sorear to a first approximation, any expression written using only unary and infix operators will become a code block if it contains a *
05:35 am0c left #perl6
05:36 djanatyn I see how hashes work, now.
05:36 Mowah left #perl6
05:36 sorear Oh?
05:36 djanatyn %hash{foo} can't be used, because that calls subroutine foo, and uses the return value as the key.
05:37 sorear Ah.  Yes, exactly.
05:37 djanatyn %hash{'foo'} works, and is the same as %hash<foo>
05:37 djanatyn wasn't it possible to leave out the quotes for a key in perl 5?
05:37 tadzik it was
05:37 sorear Yes
05:37 djanatyn I thin I recall myself doing that a couple times.
05:37 tadzik in Perl 6 they don't autoquote
05:37 tadzik well, not in {}. But in <>, yes
05:37 sorear Perl 6 generally has less magic
05:37 sorear it tries to be more consistant and learnable
05:37 djanatyn Interesting.
05:38 djanatyn I'm really starting to like Perl 6. :)
05:38 * TimToady too
05:38 djanatyn I'd love to join the development team, but there's not much I can do.
05:38 djanatyn I
05:38 TimToady note that %hash<foo bar> is a slice of two subscripts
05:38 tadzik djanatyn: you're wrong
05:38 djanatyn I'm not a good programmer, and I certainly can't write a compiler.
05:38 djanatyn I can maybe write some applications, though.
05:38 TiMBuS im a terrible programmer and even i wrote one
05:39 tadzik that's what you think. Rakudo nom branch is in a stage where everyone can help
05:39 sorear We don't have a formal language development team
05:39 TimToady anyone using Perl 6 and finding problems is good
05:39 * TimToady is home now btw
05:39 djanatyn TimToady: That's good.
05:39 djanatyn How was your drive back?
05:39 tadzik <obligatory Perl 6 MMORPG> post
05:39 djanatyn tadzik: I really enjoyed that post :)
05:39 djanatyn I read it last night.
05:39 TimToady uneventful, which is good :)
05:40 djanatyn Ah, that's awesome.
05:40 * sorear wonders why so many people have told themselves they can't write compilers
05:40 tadzik o, good :)
05:40 * TimToady should have told himself that, but didn't :)
05:40 tadzik notice, that unlike RPG, a road from a warrior to a mage is really easy
05:40 tadzik djanatyn: have you seen the Perl 6 settings library?
05:40 TimToady .oO(Rocket Propelled Grenades?)  .oO(Report Program Generator?)  :)
05:41 tadzik in Rakudo at least
05:41 djanatyn My friend Tene informed me of who you were, which made my introduction when I came into the channel quite a bit more entertaining.
05:41 djanatyn tadzik: Nope.
05:41 tadzik I'll show you something
05:41 sorear djanatyn: Tadeusz' identity interests you? *deliberately misses point*
05:42 tadzik https://github.com/rakudo/rakudo/blo​b/master/src/core/IO/Socket/INET.pm
05:42 tadzik djanatyn: see above
05:42 tadzik just Perl 6, no Black Compiler Magic
05:42 djanatyn tadzik: ?
05:42 tadzik yes, really :)
05:42 djanatyn No, I'm just confused.
05:43 djanatyn What were you referring to when you said "see above"?
05:43 tadzik see the link I pasted above my "see above"
05:43 TiMBuS who the heck wrote that mess D:
05:43 djanatyn Hey, I was going over Sockets in my copy of the camel book today :D
05:44 djanatyn I learned quite a bit about async connections and things.
05:44 tadzik djanatyn: does the code look hard to you? The one I posted
05:44 djanatyn I've mostly skipped over that section
05:44 * djanatyn checks the link out
05:44 tadzik if it doesn't, you're probably qualified to hack on the compiler. The first patch for Rakudo I submitted was a lot stupider thing really :)
05:44 TiMBuS hey it was kinda hard!
05:45 djanatyn well...looks mostly understandable, with a lot of weird names.
05:45 djanatyn I'm also not sure exactly what it is, or the purpose.
05:45 tadzik in the nom branch we're currently developing, a huge work ahead consists of filling the new settings library
05:46 tadzik things like Socket::Inet.pm need moving and adjusting in a few places. That moves the work forward
05:46 tadzik (moving from master to nom)
05:46 sorear I object to this notion that "some stuff is easy"
05:46 tadzik (iirc that it's not yet there)
05:46 djanatyn so what is the eventual goal?
05:46 sorear almost all of it is easy
05:46 djanatyn a perl6 compiler written in C? :)
05:46 tadzik nope :)
05:46 sorear djanatyn: world domination. duh.
05:46 tadzik sorear++
05:47 djanatyn ah.
05:47 djanatyn So, a perl6 compiler written in perl6.
05:47 tadzik sorear: I've been contributing to Rakudo for almost a year now, and it's been a month or so since I touched the compiler internals
05:47 TimToady a perl6 runtime in Go would be cool
05:47 tadzik erm, djanatyn : ^
05:47 djanatyn ...isn't rakudo kinda sorta written in perl 6?
05:47 tadzik it is
05:47 djanatyn TimToady: Ooh, that is interesting.
05:47 sorear kind of sort of
05:48 sorear rakudo is written in NQP
05:48 djanatyn I've messed around with Go a little bit, but back then I wasn't really knowledgeable enough to see the differences between Go and C.
05:48 TiMBuS tadzik, what needs fixing in socket::inet
05:48 tadzik TiMBuS: dunno
05:48 sorear which is a subset of Perl 6 that can be compiled without requiring Rakudo
05:48 tadzik I'm a bit outdated when it comes to nom awareness
05:48 TiMBuS is it the fact i abused BUILD/new? its probably that
05:48 tadzik mebbe
05:48 tadzik I like the abuse you use
05:48 sorear the builtin libraries are of course written in Perl 6
05:49 tadzik TiMBuS: there's no IO::Socket in nom at all it seems
05:50 TiMBuS well i wouldnt want to dirty a blank slate,
05:50 djanatyn ...huh.
05:50 TiMBuS ill see what i can do :p
05:50 djanatyn I wonder how difficult it would be to write a Scheme compiler in Go.
05:50 tadzik ++TiMBuS :)
05:51 djanatyn It's always been my dream to write a Scheme compiler or interpreter. I'm way too lazy to learn how, though.
05:51 djanatyn Looking back at Go, it seems like I just treated it as C without semicolons. But, it seems really interesting and useful now.
05:51 djanatyn But anyway, back to p6 ;)
05:52 djanatyn So, you can put code blocks in interpolating double-quotes now?
05:52 sorear Yes
05:52 sorear niecza: say "2 plus 2 makes {2+2}"
05:52 p6eval niecza v8-7-gf58916b: OUTPUT«2 plus 2 makes 4␤»
05:53 djanatyn awesome :D
05:53 djanatyn What if the code block returns a variable, like $foo . would that be interpolated?
05:53 djanatyn also, sorry, like "$foo".
05:54 TimToady yes, any expression
05:54 djanatyn that's really cool!
05:54 TimToady but if you were doing that, why not interpolate directly?
05:54 sorear Perl doesn't differentiate very much between returning $foo and returning 2
05:54 sorear although 2 will have the "readonly" flag set
05:54 djanatyn Oh, and qw has a shorthand now?
05:55 sorear or will be marked in some equivalent way
05:55 djanatyn There's a lot of really convenient things here.
05:55 TimToady not only is <> a qw shorthand, but it's basically the same thing you're using for %hash<foo bar>
05:56 TimToady in general, whenever we steal a syntax from P5, we try to use it for something much more generally useful
05:57 djanatyn I really like the new methods and objects.
05:57 djanatyn %hash.keys.sort, for example
05:58 djanatyn how would you sort the keys of a hash and return them as a list in perl 5, again? :)
05:58 sorear sort keys %hash
05:58 djanatyn ...oh!
05:59 djanatyn I should have remembered that, I've written that before >_>
06:00 djanatyn So, what's the general practice regarding types?
06:00 djanatyn TIMTOWTDI? ;)
06:00 djanatyn Do people go around declaring the types for every single variable, or leave it up to the compiler to decide?
06:01 djanatyn I'm kind of biased towards strong typing, as I programmed in haskell for a while.
06:02 sorear the compiler *won't* decide
06:03 sorear any variable you don't annotate will be left at Any or Mu
06:03 sorear we still haven't agreed which is which...
06:03 djanatyn So, does that mean that you have to name types?
06:03 djanatyn You can't just go "my $x = 'string'; my $y = 42"?
06:04 sorear No, you can
06:04 sorear niecza: say 'string' ~~ Any
06:04 p6eval niecza v8-7-gf58916b: OUTPUT«Bool::True␤»
06:04 sorear niecza: say 42 ~~ Any
06:04 p6eval niecza v8-7-gf58916b: OUTPUT«Bool::True␤»
06:04 djanatyn Also, wow, the syntax for "for" really reminds me of haskell
06:05 djanatyn for 1..10 -> $x { say 2 * $x; }
06:06 djanatyn [x * 2 | x <- [1..10]]
06:07 sorear rakudo: say [$_ * 2 for 1..10]
06:07 p6eval rakudo 922500: OUTPUT«2 4 6 8 10 12 14 16 18 20␤»
06:07 djanatyn woah, even cooler :D
06:08 djanatyn perl 6 seems to be really multi-paradigm
06:08 sorear TimToady perfers to say "postmodern"
06:11 tadzik rakudo: say [-> $x { $x * 2 } for 1..10]
06:11 p6eval rakudo 922500: OUTPUT«2 4 6 8 10 12 14 16 18 20␤»
06:22 tadzik djanatyn: no problems with panda and HTML::Template?
06:23 * TimToady hits the hay &
06:24 jaldhar left #perl6
06:24 jaldhar joined #perl6
06:24 djanatyn tadzik: got kind of distracted with syntax :)
06:24 djanatyn but, yeah, seems like a good time to install it.
06:29 djanatyn tadzik: Oh, did you write panda?
06:31 tadzik aye
06:32 djanatyn Hmm. How difficult is it to port modules over from perl5 to perl6?
06:33 djanatyn I'm guessing a lot of times it would depend on the module, but it seems like it might not be too difficult, maybe ocassionally
06:33 * sorear wonders who told djanatyn ey's a bad programmer
06:34 djanatyn sorear: myself, mostly.
06:34 djanatyn I'm...more of a sysadmin guy than a programmer guy right now.
06:34 djanatyn I do want to become a programmer guy though ;)
06:34 tadzik it depends. Rewriting line by line is probably around O(n), now rethinking the module and writing it The Perl 6 Way can be more interesting sometimes
06:34 sorear Well I won't beleive em without more proof
06:35 djanatyn Your use of gender-neutral pronouns is kinda awesome.
06:35 djanatyn Is anyone here besides TimToady interested in linguistics?
06:35 * sorear is sort of interested in everything
06:35 djanatyn woah, me too :D
06:35 tadzik I think a plenty of now-asleep people are :)
06:36 djanatyn also, stupid question.
06:36 djanatyn what's the slurp() function?
06:36 tadzik reads the file and produces a string
06:36 sorear like Prelude.readFile
06:36 djanatyn ah.
06:36 djanatyn Oh, cool.
06:36 sorear and spew is writeFile
06:37 djanatyn so, wait, it takes a filehandle and reads the whole file?
06:37 tadzik it takes a file name
06:37 sorear filehandle or name
06:37 tadzik oh, ok
06:37 djanatyn ah, that's pretty awesome!
06:37 tadzik TIL
06:37 djanatyn was that in perl 5?
06:37 djanatyn I used to just:
06:37 sorear note, perl6 doesn't have lazy strings (yet?) so this won't scale much past 1M
06:37 Trashlord joined #perl6
06:37 sorear it is in Perl 5
06:37 sorear use File::Slurp
06:38 sorear but I think that's a backport
06:38 tadzik spew() is a Perl6 builtin?
06:38 djanatyn while (my $line = <FILENAME>) { $contents .= $line; }
06:38 djanatyn (that's how I used to slurp in a file)
06:39 djanatyn although, now that I think about it, not exactly sure if that's valid perl 5 code
06:39 sorear that's valid, horrible perl 5 code
06:39 djanatyn told you I'm a bad programmer >:)
06:39 sorear no
06:39 sorear you're a young programmer
06:40 sorear anyways
06:41 sorear you should use $contents = do { local $/; <FILENAME> }
06:41 sorear that way you aren't copying lines around a bajillion times
06:41 sorear or use File::Slurp :p
06:41 dalek niecza: 78cd4b6 | sorear++ | src/niecza:
06:41 dalek niecza: Name refactor part 3: Static type-name references
06:41 dalek niecza: review: https://github.com/sorear/niecza/commit/78cd4b6a90
06:42 Trashlord left #perl6
06:42 * snarkyboojum thinks it should be slurp/burb :P
06:43 djanatyn snarkyboojum: heh :)
06:43 sorear wjat's burb?
06:43 * djanatyn will start using File::Slurp :D
06:43 tadzik burb like burp?
06:44 snarkyboojum burp even
06:44 snarkyboojum :)
06:44 djanatyn Is File::Slurp in the standard libraries?
06:44 tadzik nope
06:44 * djanatyn hates having too many depdencies when they aren't *really* needed ._.
06:44 sorear it's on cpan, I call that standard libraries
06:44 djanatyn my friend always tells me that I need to be lazier and let other programmers do my work for me, but I feel like I'm asking too much to make people download other libraries to use my code.
06:45 djanatyn Still, now that I think about it, nobody really ever uses my code ;)
06:45 sorear asking people to run cpanm -S File::Slurp is not really that much
06:45 tadzik shipping one file is not a pain either
06:45 sorear and once your code is on CPAN, cpanm will do all the dependency chasing for people
06:46 Trashlord joined #perl6
06:47 snarkyboojum btw, rocking' stuff with the latest compiler feature matrix
06:48 snarkyboojum awesome to see how feature complete Niecza is becoming
06:48 djanatyn Now that I think about it, I really don't need HTML::Template to generate a static website.
06:49 tadzik true
06:49 djanatyn I can just use the cool new interpolation features :D
06:49 * djanatyn goes off to write some perl 6 code
06:54 djanatyn ...oooh. I don't have to write a new method :D
06:54 tadzik nope :)
06:54 tadzik like in Moose
06:54 tadzik even though it's the other way around actually
06:55 djanatyn Yeah, I recall reading about how Moose copies perl 6 oop into perl 5
06:56 snarkyboojum djanatyn: at the least, is inspired by, and has innovated since afaik
06:58 djanatyn uhh, how does handling files work in perl 6?
06:58 djanatyn for example, how would I open up a new file and write stuff to it?
06:59 tadzik hold on
07:00 tadzik http://perl6advent.wordpress.com/​2010/12/03/day-3-file-operations/
07:00 djanatyn thanks!
07:00 tadzik you're welcome!
07:00 tadzik my brain is like a Pawłow's dog. When I hear the alarm clock sound, I become sleepy
07:01 huf how is the "no l-s beyond this point" letter pronounced?
07:03 am0c joined #perl6
07:03 tadzik hmm
07:04 tadzik Polish pronounciacion of 'eu' is close to that. In english it'd be more like "eau" I think
07:04 tadzik and not the French "eau" :)
07:05 tadzik you read Pawłow as Pawuow, more-less
07:07 moritz good morning
07:07 phenny moritz: 00:22Z <jnthn> tell moritz try.t doesn't do too badly now it seems, but there's some fudge weirdness going on, I think...or maybe I'm just tired. :-) Feel free to take a glance.
07:08 tadzik oh, moritz!
07:08 tadzik I collected a bunch of questions for you :)
07:10 tadzik https://gist.github.com/1116439 -- that's a start, but we should be running the pod2text() automagically when we run Rakudo with --doc. How much of a core module do we want Pod::To::Text to be then? ISTR that we may have talked about that already, but I don't have it noted down in gsocmess
07:11 dalek niecza: 2bbb19a | sorear++ | src/ (5 files):
07:11 dalek niecza: mergeback
07:11 dalek niecza: review: https://github.com/sorear/niecza/commit/2bbb19a23e
07:12 djanatyn ...huh.
07:13 djanatyn I afraid that I'm doing this really, really wrong.
07:13 djanatyn wanna see my first non-working perl 6 program? :)
07:13 tadzik yeah, go on :)
07:13 djanatyn Uhh, is there a pastebin with perl6 syntax highlighting?
07:13 tadzik hmm
07:13 moritz no
07:14 tadzik http://ideone.com/ I think, no?
07:14 moritz tadzik: just make it a normal src/core/ modules for now
07:14 djanatyn https://gist.github.com/1116522 <-- huzzah
07:14 tadzik fun fact: you can do Entry.new().generate :)
07:15 tadzik also, you don't have to "$foo", it can be just $foo
07:15 djanatyn oh, yeah. -_-
07:15 tadzik plus, don't you need open() somewhere?
07:15 djanatyn ...oh. good idea :D
07:16 tadzik you have no tests! :P
07:16 djanatyn no tests?
07:16 djanatyn my test was going to be "cat ./blog.txt"
07:16 tadzik moritz: any idea how much effort will be fixing the compilation options in nom?
07:17 moritz tadzik: managable
07:17 moritz tadzik: src/main.nqp shows how to add a command line
07:17 tadzik I'm going to need that for --doc, and I just noticed it's just %*COMPILING := 1 in nom :)
07:17 djanatyn woah! :D
07:17 djanatyn it actually ran :D
07:17 tadzik oh, cool
07:18 moritz installing the action for it might require to overload one of the methods from HML::Compiler in src/Perl6/Compiler.pm
07:21 djanatyn Woah, I just had a wonderful idea.
07:21 djanatyn Lots of languages have their own individual pastebins.
07:21 djanatyn there's a python pastebin, a lisp pastebin, and a haskell pastebin. I've used all of those, and they're top-notch quality.
07:21 djanatyn ...is there (currently) a perl 6 pastebin?
07:21 Jackneill joined #perl6
07:22 djanatyn like, http://paste.perl6.org/?
07:22 djanatyn Because, actually, I think I could write that.
07:25 moritz that would be awesome
07:25 djanatyn ...that would be really simple, actually!
07:26 djanatyn The more I think about it, the better it sounds.
07:26 djanatyn I mean, how hard would it be to write a perl 6 pastebin, written in perl 6, using CGI or something?
07:26 Khisanth left #perl6
07:27 djanatyn Well, that sounds like a fun project to work on. I'm going to have to check out the possibilities tommorow, but as for right now, I'm going to sleep.
07:27 moritz how hard indeed? find out!
07:27 djanatyn g'night!
07:27 moritz good night djanatyn
07:27 djanatyn don't let anybody write any pastebins while I'm asleep
07:28 djanatyn I want to be there to personally obfuscate the code myself
07:28 birdwindupbird joined #perl6
07:32 tadzik moritz: https://gist.github.com/1116532 that's the way I tried to implement the DOC phasers. Disregarding the broken COMPILING for now, method comp_unit is already too late to set the $?DOC, the statement_prefix is already called by then. Should the statement_prefix just use the COMPILING instead, or is there a better way to do that?
07:35 sorear -1 to an official Perl 6 pastebin
07:44 tadzik Meh, Pod::To::Text does not compile when put into the setting
07:45 tadzik but does it really need to be there? --doc will just generate the default DOC INIT {} if it's not there, and that could be something like 'use Pod::To::Text; pod2text($=POD)'
07:46 moritz what exactly does $?DOC do? indicate whether DOC phasers should be run?
07:47 moritz if so, you could use a dynamic variable in Perl6::Compiler
07:47 tadzik yes, DOC phasers and statements are executed if $?DOC is set
07:48 tadzik and $?DOC is set to what --doc contains
07:48 mberends sorear: -1 to "official" pastebin, but +1 to a pastebin written in P6 as a yak shave, especially if it runs on Niecza.
07:48 jaldhar left #perl6
07:49 jaldhar joined #perl6
07:49 moritz so compile a $?DOC in the source to what $*DOC (set in Perl6::Compiler) contains
07:50 tadzik oh, phasers need to be added anyway, disregarding the commandline option. So it's just a matter of running them. And I need another kind of phasers to implement
07:50 tadzik so Actions don't really need to know that
07:53 tadzik so DOC INIT actually adds a new INIT phaser, wrapped in an if that executes it only if $?DOC is set
07:58 azawawi joined #perl6
07:59 azawawi hi
07:59 tadzik hello
07:59 azawawi Does rakudo 2011.07 work on win32/strawberry?
08:00 azawawi hmm, I do not see a win32 installer for it
08:01 moritz I think szabgab provided the last one
08:01 mberends azawawi: it should work. If it's important to you, I have a Stawberry 5.12 nearby to try it out.
08:02 jnthn morning, #perl6
08:02 mberends o/
08:02 tadzik jnthn: o/
08:02 azawawi strawberry perl v5.12.3 here and it is failing when building 2011.07 from source
08:03 tadzik how do I write a PAST which evaluates to the value of a certain variable $foo?
08:04 djanatyn left #perl6
08:04 mberends azawawi: meh. I'll also try it a bit later and try to find the fault (on 32-bit)
08:04 tadzik needed for PAST::Op(:pasttype('if'))
08:04 * azawawi runs perl Configure.pl --gen-parrotcollects error log
08:05 * azawawi runs 'perl Configure.pl --gen-parrot' and collects its build log
08:06 mberends azawawi: you might also use 2>errorlog on Windows (or you may know that already)
08:06 tadzik just PAST::Var?
08:06 azawawi mberends: ofcourse :)
08:10 mls joined #perl6
08:10 mls morning jnthn
08:10 mls and the other perl6 folks as well
08:10 im2ee joined #perl6
08:11 mls jnthn: I see that you merged part of the catch patch I did on Friday
08:11 mls Is there a reason why you excluded the "finalize" bits?
08:11 azawawi where can i find a *minimal* Perl 6 syntax highlighter? One that handles just the most common cases and is fast.
08:12 jnthn mls: Ah, I somehow managed to forget you'd patched that...no wonder the solution felt familiar
08:13 jnthn mls: Got a link to it? Or I can find it in backlog if not...
08:13 mls wait a sec...
08:13 jnthn tadzik: What socpe is the variable?
08:13 jnthn tadzik: But yes, PAST::Var.new( :name('$foo'), :scope('lexical_6model') ) # normally
08:14 mls jnthn: https://gist.github.com/1114368
08:18 tadzik jnthn: it's $?DOC
08:19 jnthn tadzik: OK
08:19 tadzik I don't think that's lexical, or is it?
08:20 jnthn tadzik: Yeah, those things are stored lexically though aren't really variables, just symbols.
08:20 tadzik jnthn: okay. Could you tell me what's incorrect about http://wklej.org/id/570092/ ?
08:20 tadzik Can only use nqp_get_sc_for_object with a SixModelObject, it says
08:21 daxim left #perl6
08:22 jnthn tadzik: OK, I don't understand what you're doing there...
08:23 beekor left #perl6
08:23 jnthn tadzik: If you're calling add_phaser I guess you've patched that too?
08:23 jnthn oh
08:23 jnthn $if<code_object>
08:23 jnthn that makes no sense.
08:23 tadzik nope, not yet. I need to add a phaser that executes only if $?DOC
08:24 tadzik every add_phaser uses <code_object> on some .ast
08:24 jnthn OK, but when is $?DOC true?
08:24 woosley joined #perl6
08:24 tadzik when it's not false. Not undefined
08:24 jnthn No, I meant what does it represent?
08:25 tadzik $?DOC is set when --doc is passed to the perl6 binary
08:25 jnthn A $?FOO variable is a "known at compile time" thing
08:25 tadzik oh
08:25 tadzik so S26 is kinda wrong
08:25 tadzik for $?DOC is not known at compile time at all
08:25 tadzik or maybe it is
08:25 jnthn Could you in theory pre-compile something, then run with --doc?
08:25 * tadzik rethinks
08:25 tadzik that's what I'm wondering about now
08:25 jnthn Or do you always feed the source file straight to the compiler?
08:26 tadzik When the Perl 6 interpreter is run in this mode, it sets the compiler
08:26 tadzik hint C<$?DOC> to true
08:26 tadzik (in this mode: --doc is passed)
08:26 jdv79 left #perl6
08:26 sorear mberends: as long as nobody uses it, I'm ok with it being written
08:26 jnthn Heh, it says nothing of pre-comp :)
08:27 tadzik otoh, it ists perl --doc  DBI::DBD::Metadata as an example
08:27 tadzik but I think that makes sense to omit pre-comp
08:27 * sorear pines for the ability to suck the pod out of a file without running any of it
08:27 tadzik for you are not really running pre-comp stuff with perl6 binary :)
08:27 sorear or even parsing non-pod
08:27 tadzik so I can get back to adding those phasers only if --doc is passed
08:28 sorear but *sleep* now
08:28 jdv79 joined #perl6
08:28 tadzik so, I need the %*COMPILING fixed again :)
08:28 mberends 'night sorear
08:28 jnthn tadzik: The reason things don't work out the way you have them now is that not everything as a <code_object>
08:28 jnthn sorear: night
08:28 jnthn tadzik: In fact, very few things do - only blocks/thunks/routines etc
08:29 tadzik mhm
08:30 tadzik btw, did you see my segfaulting note from tonight?
08:30 jnthn yeah
08:30 tadzik ok
08:30 mberends it's probably a minor heresy to say, but I still think designing Pod so that only a full blown Perl 6 can access it is a bad idea.
08:32 tadzik std: sub foo {}; foo(); if 0
08:32 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/r9sMon4kPC line 1 (EOF):␤------> [32msub foo {}; foo(); if 0[33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 119m␤»
08:32 tadzik I'd like, one day, to see a warning like "you don't really want this semicolon before if"
08:33 im2ee left #perl6
08:33 im2ee joined #perl6
08:34 jnthn mls: Seems the bit of your patch for try already got in
08:35 mls yes, the &EXCEPTION part
08:35 mls oh, the finalize for try part? I didn't see that
08:36 jnthn Yeah
08:36 beekor joined #perl6
08:36 jnthn It's just the finalize for CATCH part that didn't.
08:36 jnthn Just added it and trying spectest.
08:39 mls thanks!
08:40 jnthn tadzik: Oh, and I did mean glass, not class ;)
08:41 tadzik :)
08:42 tadzik lolifixedoptions
08:44 * mberends stumbled upon a voice synthesizer in debian: espeak 'perl6 rocks' # sounds pretty good
08:44 Instil left #perl6
08:44 tadzik :D
08:45 Su-Shee_ is now known as Su-She
08:46 Su-She is now known as Su-Shee
08:46 tadzik DOC phasers in action: https://gist.github.com/1116610
08:47 mberends ++tadzik++
08:47 wamba joined #perl6
08:48 jnthn tadzik: nice!
08:48 dalek roast: 60fa582 | moritz++ | S04-statements/try.t:
08:48 dalek roast: refudge try.t for rakudo
08:48 dalek roast: review: https://github.com/perl6/roast/commit/60fa5826d2
08:48 kolibrie left #perl6
08:48 moritz jnthn: btw I didn't find any of these fudges weird :-)
08:49 jnthn moritz: It was the way the .rakudo file looked
08:49 tadzik fixing command-line switches were easier than we thought, moritz :)
08:49 moritz tadzik++
08:49 jnthn hmm...with some of the files Coke++ added, I get failures
08:49 dalek rakudo/nom: 8e6925b | moritz++ | t/spectest.data:
08:49 dalek rakudo/nom: run try.t
08:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8e6925b855
08:49 jnthn Like repeat.t and capture.t
08:49 dalek rakudo/podparser: 0c0d929 | tadzik++ | / (4 files):
08:49 dalek rakudo/podparser: Generate Pod::Heading objects from =head directives
08:49 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/0c0d929342
08:49 dalek rakudo/podparser: 8797ffa | tadzik++ | / (6 files):
08:49 dalek rakudo/podparser: Implement DOC phasers. Fix compilation options. Add a simple Pod::To::Text
08:49 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/8797ffa0df
08:50 tadzik sorry for a 3-in-1 commit
08:50 mls jnthn: you mean with the finalize patch?
08:51 tadzik reviews welcome
08:51 jnthn mls: I have it applied, but I highly doubt it's related.
08:51 moritz capture.t also fails here
08:51 jnthn mls: I think just some mis-fudging of tests added overnight
08:51 jnthn Aha
08:51 moritz maybe [Coke]++ forgot to commit his fudges
08:51 jnthn Aye
08:52 kolibrie joined #perl6
08:52 jnthn Though |$foo is on my todo list for today anyway.
08:52 azawawi left #perl6
08:53 * tadzik goes to catch some air
08:54 moritz nom: say ([1, 2] xx 2).perl
08:54 p6eval nom: OUTPUT«(1, 2, 1, 2).list␤»
08:54 localhost left #perl6
08:54 moritz pmichaud: bug above
08:55 dalek roast: 0ebbab8 | moritz++ | S0 (2 files):
08:55 dalek roast: rakudo fudges
08:55 dalek roast: review: https://github.com/perl6/roast/commit/0ebbab848c
08:56 dalek rakudo/nom: e8cd5b0 | jonathan++ | src/Perl6/Actions.pm:
08:56 dalek rakudo/nom: Apply patch from mls++ to finalize caught exceptions, thus unwinding any C stack frames that may be left.
08:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e8cd5b013d
08:56 Kivutarrr joined #perl6
08:58 Kivutarrr left #perl6
09:01 mls thanks jnthn!
09:16 daniel-s joined #perl6
09:17 moritz mls: your next patch should add yourself to CREDITS
09:17 mls ok, no objections ;)
09:20 daniel-s_ joined #perl6
09:20 jdhore question: Is there a date for nom being merged to master?
09:21 daniel-s left #perl6
09:21 Jackneill left #perl6
09:25 daniel-s_ left #perl6
09:25 daniel-s__ joined #perl6
09:27 SHODAN joined #perl6
09:28 jnthn jdhore: Not a set date yet, but "before YAPC::EU".
09:28 jdhore jnthn, When's YAPC::EU?
09:28 jnthn jdhore: Middle of August.
09:28 jdhore ah, fun
09:29 _daniel-s__ joined #perl6
09:29 daniel-s__ left #perl6
09:31 jnthn Mostly we need the remaining regex work, installation to work and module usage without pre-compilation. The rest is mostly about hunting down test regressions.
09:34 moritz and porting lots setting stuff
09:34 daniel-s joined #perl6
09:34 moritz like Instant, Duration, Date, DateTime, IO::Socket*
09:34 _daniel-s__ left #perl6
09:35 jnthn Yeah
09:35 jnthn I'd hope IO::Socket may go over quite cleanly.
09:36 mberends and Zavolaj!
09:36 mj41 joined #perl6
09:36 jnthn I suspect Zavolaj won't go over quite cleanly. :/
09:36 mberends pm thought it would be ok though :)
09:37 mberends does anyone know of any heap management systems other than reference counting, mark-and-sweep (including generational), and copying? I've exhausted many resources (best represented by http://www.cs.kent.ac.uk/people/staff/rej/gc.html and its Book) and feel dangerously close to inventing something "new".
09:39 jnthn Well, there's a new copy of that book out in August. :)
09:40 jnthn Within the categories you've mentioned I think there's multiple algorithms too. :)
09:40 * jnthn is curious what mberends has come up with
09:40 mberends it's going into 6model/c and could be summarized as reference tracking
09:41 mberends there is quite a gap between sketches on pieces of paper and C code, though ;)
09:42 mls left #perl6
09:45 daxim joined #perl6
09:54 masak joined #perl6
09:54 * masak yawns
09:54 masak good... good morning, #perl6.
09:54 birdwindupbird left #perl6
09:55 masak tadzik: re-ping :)
09:55 jnthn ooh, just made it in by 5 mins :P
09:56 masak heh :)
09:56 masak yes, I was schzlow to wake today.
09:56 * jnthn set up himself the alarm
09:57 jnthn Gotta be at $client by 8:30am tomorrow, so figured I should at least get up before 10 today. :/
09:57 masak in retrospect, that would have been a good idea here, too. :)
09:58 mberends masak: if you get here in the next 3 minutes, you can share a lunch of haggis with me :)
09:59 jnthn eww haggis!
09:59 wamba left #perl6
09:59 jnthn "The other bits of the sheep." :)
10:00 masak mberends: you know, that sounds perfect. "here" === .nl ?
10:01 masak jnthn: you should be more open-minded towards food that happens to contain offal. :P
10:01 jnthn masak: It sounds offal to me. :P
10:02 mberends masak: aye. At least the Scots are honest about it. The Dutch just hide the "other bits" in some cleverly marketed sausages called frikandel.
10:02 masak jnthn: er, I mean. the haggis is a peaceful creature, what has it done to offend you? http://en.wikipedia.org/wik​i/File:Haggis_scoticus.jpg :)
10:02 dalek rakudo/nom: ecef486 | jonathan++ | src/ (3 files):
10:02 dalek rakudo/nom: Start to get handling of trusts in place. Treat it trait-ish, because I suspect it'll become one some day.
10:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ecef486ded
10:02 dalek rakudo/nom: 16c6780 | jonathan++ | / (3 files):
10:02 dalek rakudo/nom: Add a Trusting role and make ClassHOW do it, so now 'trusts' makes an appropriate entry in the list.
10:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/16c6780b85
10:03 masak mberends: I remember being a bit wary at the first bite. but the texture and the taste are both very nice -- at least the way you prepared it.
10:04 * jnthn figured if he was gonna put private methods back, we may as well do it properlyish. :)
10:10 daxim left #perl6
10:11 daxim joined #perl6
10:11 Woodi joined #perl6
10:12 Woodi left #perl6
10:14 jedai_ left #perl6
10:14 Woodi joined #perl6
10:17 jedai joined #perl6
10:19 MayDaniel joined #perl6
10:26 dalek rakudo/nom: 3c24f51 | jonathan++ | / (3 files):
10:26 dalek rakudo/nom: Add a PrivateMethodContainer role for storing private methods, and get ClassHOW to do it.
10:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3c24f514e8
10:26 dalek rakudo/nom: d3ca4f7 | jonathan++ | src/Perl6/Actions.pm:
10:26 dalek rakudo/nom: method !foo { ... } now calls add_private_method.
10:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d3ca4f7e79
10:30 wamba joined #perl6
10:31 cosimo left #perl6
10:32 cosimo joined #perl6
10:36 buubot_backup left #perl6
10:37 mj41 left #perl6
10:38 MayDaniel left #perl6
10:46 tadzik masak: pong
10:53 tadzik Actions.pm:169 is where we add a default MAIN if there is none?
10:53 masak tadzik: did you ever publish any of your Hodowla zwierzątek code? I'm curious how many p6 versions there are out there now.
10:53 tadzik masak: nope, didn't
10:54 tadzik it's incomplete too
10:54 tadzik did you see the --doc showoff? :)
10:56 masak yeah! impressed!
10:56 masak tadzik++
10:57 Khisanth joined #perl6
10:57 moritz tadzik++ indeed
10:57 buubot_backup joined #perl6
10:57 moritz I get the impression that it's a very interesting project, partly because it touches so many parts of the compiler
10:57 moritz parser, actions, built-ins, command line, MOP
10:58 tadzik yes :)
10:58 * moritz hopes tadzik feels so too :-)
10:58 tadzik and serialization
10:58 tadzik that was fun
10:58 moritz right :-)
10:58 moritz and double bacon!
10:58 tadzik yes!
10:58 jnthn :)
10:58 jnthn Really looking forward to tadzik++'s branch landing.
10:59 tadzik we can even merge it now, it brings no regressions to nom, even no performance regressions
10:59 tadzik and fixes a few things in Grammar and SymbolTable too
10:59 jnthn nice!
10:59 tadzik actually, we can merge it into nom and I'll continue on hacking in there, I have to merge nom few times a day now ;)
11:00 moritz speaking of food... yesterday night I cooked (and ate!) canard with sesame-honey coating, fried apples and nooldes. Yummy.
11:00 moritz tadzik: +1
11:00 Khisanth left #perl6
11:00 jnthn tadzik: +1 from me...only wonder if we should wait to see if pmichaud++ is fine with it too
11:02 tadzik sure
11:06 dalek rakudo/nom: 4a5f9b9 | jonathan++ | src/ (2 files):
11:06 dalek rakudo/nom: First cut of private method calls, with trust checking. Also some notes on how this can be optimized in the future.
11:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a5f9b977d
11:06 Khisanth joined #perl6
11:08 tadzik now, what was I up to...
11:09 masak does someone want to help me track down a bug in https://github.com/masak/farm/blob/master/farm.pl ?
11:09 masak no particular expertise required, just running the game and maybe inserting debug print statements here and there.
11:10 jnthn > my class A { method !y() { say 42 } }; my class B { method m() { A!A::y() } }; B.m
11:10 jnthn Cannot call private method 'y' on package A because it does not trust B at line 1, near " } }; B.m\n"
11:10 jnthn > my class B { ... }; my class A { trusts B; method !y() { say 42 } }; my class B { method m() { A!A::y() } }; B.m
11:10 jnthn 42
11:10 tadzik hy
11:10 jnthn \o/
11:10 masak jnthn: \o/
11:10 masak jnthn++
11:11 tadzik jnthn++ indeed
11:11 jnthn The things compile time meta-objects make trivial... :)
11:11 masak the bug is this: every time I make the trade "1 sheep for 6 rabbit with stock", the stock takes the sheep and gives me all its remaining rabbits!
11:11 masak I can't reproduce it with a failing test. (!)
11:11 tadzik I looked at nommap few days ago, "private methods and trusts", "huh, that's gonna be non-trivial probably". As usual, jnthn needs 3 commits for that :)
11:12 masak tadzik: jnthn is our Chuck Norris, clearly :)
11:13 tadzik ok, so default phasers...
11:13 tadzik is there anything smarter than noting down if a custom one appears, and if not, then add a default at the end of comp_unit?
11:15 masak even if there is, start with the simple version :)
11:15 tadzik :)
11:15 jnthn tadzik: Default phasers?
11:15 tadzik jnthn: yeah. The default action for --doc
11:16 whiteknight joined #perl6
11:16 tadzik By default, once the C<DOC INIT> phase is complete, the interpreter then
11:16 tadzik calls a special default C<DOC INIT> block that walks the AST and
11:16 tadzik generates the documentation
11:16 tadzik oh, so they're not excluding themselves
11:16 tadzik even easier
11:16 masak http://c2.com/xp/DoTheSimplestT​hingThatCouldPossiblyWork.html
11:16 tadzik and a bit misleading, imho, but ok
11:17 jnthn masak: The main thing people get wrong there is they forget it actually has to work. :)
11:18 masak jnthn: really? I see people all the time forgetting that it actually should be simple while making it work. :/
11:19 JimmyZ_ joined #perl6
11:20 jnthn masak: I was presuming they were already settled on simple :)
11:20 jnthn masak: But yes, agree.
11:20 jnthn The simplest thing that actually works is quite hard. :)
11:22 masak getting into the habit is hard.
11:22 masak there's a sense of... um, "can I really cheat this much?", or something like that.
11:22 masak as if the problem *should* be harder.
11:22 masak even when it shouldn't.
11:23 masak I've always liked the accounts-and-transactions example at http://c2.com/xp/SpikeSolution.html for showing how much one can simplify things.
11:26 colomon I dunno, I think the whole idea is exaggerating a good notion into a silly law.
11:27 daxim left #perl6
11:28 colomon "Don't build in features you think you might need someday" is a fine notion.
11:28 masak colomon: I find it useful. specifically, I find the going much tougher the times when I forget to follow it.
11:28 tadzik nom: use Test; use Test
11:28 p6eval nom: OUTPUT«error:imcc:Multiple declarations of lexical '&diag'␤␤       in file '(file unknown)' line 117␤»
11:29 masak it's so nice to have small increments, small feedback loops, and small steps between working states.
11:30 tadzik nom: use Test; { use Test }
11:30 p6eval nom: OUTPUT«arglist case of use not yet implemented at line 1, near "}"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
11:30 tadzik que?
11:30 tadzik nom: use Test; { use Test; 1 }
11:30 p6eval nom:  ( no output )
11:30 tadzik nom: use Test; { use Test; 1 }; say 'alive'
11:30 p6eval nom: OUTPUT«alive␤»
11:30 tadzik ok
11:31 jnthn hm
11:31 jnthn rakudo: use Test; use Test;
11:31 p6eval rakudo 922500: OUTPUT«===SORRY!===␤Cannot import symbol &plan because it already exists in this lexical scope␤␤»
11:32 jnthn Better.
11:32 jnthn Not so sure what the correct answer is though.
11:32 colomon masak: working in small steps is great.  but "do the simplest thing that can possibly work" can result in lots of unnecessary work if you take it literally -- and/or solutions that aren't really that great.
11:32 tadzik jnthn: so, how do I correctly add a PAST::Block as a phaser?
11:33 masak colomon: a colleague of mine used to tell me the same. he sometimes found amusing the literalness with which I applied YAGNI. :)
11:34 masak colomon: I'm all for foresight, but I try very much to avoid solving problems that haven't manifested yet in the implementation.
11:34 colomon masak: Think of something like projecting a point to a 3D surface.
11:35 ggoebel left #perl6
11:35 colomon If you start with the simple cases (like projecting a point to a plane) you can come up with beautiful solutions that do you little if any good solving the big problem
11:37 masak full ACK.
11:38 masak colomon: there's no cure for not being prepared to tackle the full domain.
11:38 colomon now, absolutely, if your problem is projecting a point to a plane, then you're foolish to try to solve the general problem "just in case".
11:39 masak we seem to be in violent agreement.
11:39 masak colomon: did you ever see the XP blogger who wanted to TDD his way to a Sudoku solver?
11:39 colomon masak: yes.  crash and burn.
11:39 masak and then Norvig (unrelatedly) solves it with 30-or-so lines of Python.
11:40 masak why did Norvig succeed? because he has a background in AI.
11:40 masak so he knows about constraing propagation.
11:40 colomon I think Norvig actually was inspired by seeing the TDD flop
11:40 colomon ?
11:40 colomon *thought
11:40 masak that's news to me, but wouldn't be surprised.
11:40 ggoebel joined #perl6
11:41 masak anyway, he had a mental model for solving the Sudoku problem already when he started.
11:41 masak he didn't count on the tests leading him there.
11:41 sili lulz
11:41 masak now, I'm not saying it's not *possible* for TDD and test-first to lead you right and make you find nice solutions to problems.
11:41 colomon that's not what I'm trying to argue, though.  at least, as I've understood the "do the simplest thing possible" XP argument, you write the simplest thing that will pass the tests you have, right?
11:42 masak in fact, I think it does more often for business apps and less often for algorithmic problems like Sudoku.
11:42 masak colomon: well, that's more what test-first means to me.
11:43 masak colomon: to me DTSTTCPW means that when starting out, I don't write a framework, I write a teeny-tiny engine that exhibits the behaviour I want to produce.
11:43 masak later on, I can put it in a context and enhance it in various ways.
11:43 colomon my problem is, if you're writing your project to a surface tests in a logical fashion, it's quite a while before you get to a test where projection to a plane isn't good enough to solve the problem.
11:43 masak right.
11:44 colomon s/solve the problem/pass the tests/
11:44 masak but if you fail to predict where you're heading, you're screwed anyway.
11:44 masak problem is, foresigh is hard, even when you feel you know the domain.
11:44 colomon sure
11:44 * colomon may disappear suddenly, there are sounds of a young boy waking up on the monitor
11:44 masak that's why the best programs/modules are written by people who have already solved a problem in that domain 50 times. :)
11:45 masak their brains are already domain-shaped.
11:46 masak <sili> does anyone recall some code that takes a grammar definition of some kind and randomly generates should-be-valid as a means of testing a parser?
11:46 masak sili: I wrote a piece of code a month or so back that does that.
11:47 masak sili: but it generates all strings, I think. could easily be made to generate a random one.
11:47 masak (sorry, your question was from 2007, but no-one seems to have answered it since.) :)
11:47 sili I vaguely remember asking that
11:48 sili you crazy.
11:48 masak :)
11:48 masak looking for the code now.
11:48 masak ah, here: https://gist.github.com/908829
11:49 masak as you see, it's just a trivial extension to GGE.
11:50 masak you use GGE to compile an AST from the regex, and then call a recursive multi on the top node to traverse it an build strings.
11:50 masak not complete by any means, but a proof-of-concept.
11:50 sili interesting.
11:50 masak if you have a finite-and-small number of strings, you could generate all of them and then pick one randomly with .roll
11:51 masak otherwise, you could generate random choices along the way.
11:51 masak depending how much you care about the resulting distribution, that should give pretty good results.
11:53 sili how far back are your IRC logs?
11:54 sili how far do they go, I mean
11:55 masak all the way. why? :)
11:55 masak moritz++
11:57 masak sili: you were more active during the Golden Age.
11:57 baest left #perl6
11:57 masak it's nice to have you still around.
11:58 baest joined #perl6
11:58 sili I've been doing a lot of business-side things in the past few year. Now I'm trying to stay on top of my game
11:58 sili years*
11:59 masak sounds interesting.
11:59 masak what are you doing to stay on top of your game?
11:59 daxim joined #perl6
12:00 sili start using perl6, program more, read more programming news
12:00 sili rakudo, that is.
12:05 masak sili: great! maybe you could help me find an elusive bug? :)
12:06 masak I wrote a game in Perl 6, and it behaves correctly except in one small case.
12:06 masak I can't really nail it down; the code looks correct, and it only occurs in one rare (but reproducible) circumstance.
12:06 sili pastebot?
12:07 masak the game is here: https://github.com/masak/farm
12:07 masak (it's explained in the README)
12:07 masak here's the bug: when a player makes the trade "1 sheep for 6 rabbit with stock", sometimes the game just gives the player *all* the rabbits, instead of 6 rabbits.
12:08 masak I can make a nopaste that exhibits the problem.
12:10 sili github highlighting sucks
12:11 tadzik is there a way, in git, to checkout one file from a different revision than we're on?
12:11 masak sili: here it is: https://gist.github.com/1116739
12:11 masak sili: well, I don't think github highlighting is made for Perl 6.
12:12 sili shoot. vim 7.3 has perl6 and I've only got 7.2
12:14 sili I suck too much at perl6 to do this
12:14 tadzik whoa, 2 PM? A day started at 4AM is loong
12:14 jnthn :)
12:14 masak sili: ah, too bad. well, let me know if there's something I can help you with.
12:15 masak tadzik: 4AM!? what were you thinking? :)
12:15 jnthn That's only one hour off when I ended yesterday :P
12:15 tadzik masak: I accidentally got asleep on like 9PM yesterday
12:15 sili it's 5am
12:15 tadzik jnthn: so, how do I correctly add a PAST::Block as a phaser?
12:16 sili What is Z=>
12:16 jnthn tadzik: I probably need a bit more info than that.
12:16 jnthn tadzik: What sort of phaser?
12:16 masak sili: here, I'll show you.
12:16 masak rakudo: my %h = <a b c> Z=> <1 2 3>; say %h.perl
12:16 p6eval rakudo 922500: OUTPUT«{"a" => "1", "b" => "2", "c" => "3"}␤»
12:17 sili what is that called?
12:17 masak sili: "zip".
12:17 jnthn tadzik: And how are you getting/creating the PAST::Block?
12:17 sili oh, okay
12:17 tadzik jnthn: my $a := PAST::Block.new()
12:17 masak sili: the zip operation intermingles two or more lists into one single list.
12:17 sili ya, I know zip
12:17 tadzik whatever I put inside, I want to add a block as a phaser
12:17 tadzik and, INIT
12:17 masak sili: then we just realized that Z should be a metaoperator and apply to other operators, like =>
12:18 jnthn tadzik: What's going inside, ooc?
12:18 masak std: <a b c> Z=> <1 2 3> Z=> <α β γ>
12:18 p6eval std 516268a: OUTPUT«ok 00:01 120m␤»
12:18 jnthn tadzik: The thing is that add_phaser expects a Block object (Perl 6 one), not a PAST::Block.
12:18 tadzik jnthn: use Pod::To::Text; say pod2text($=POD)
12:18 masak niecza: say (<a b c> Z=> <1 2 3> Z=> <α β γ>).perl
12:18 p6eval niecza v8-9-g2bbb19a: OUTPUT«("a" => "1" => "α", "b" => "2" => "β", "c" => "3" => "γ").list␤»
12:18 masak \o/
12:19 jnthn tadzik: OK, so you really do need to introduce a lexical scope to import Pod::To::Text into.
12:19 masak niecza: say (<a b c> Z=> <1 2 3> Z+ <4 5 6>).perl
12:19 p6eval niecza v8-9-g2bbb19a: OUTPUT«Unhandled exception: Cannot use value like Pair as a number␤  at /home/p6eval/niecza/lib/CORE.setting line 685 (CORE die @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 41 (CORE Any.Numeric @ 4) ␤  at  line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/…
12:19 tadzik jnthn: okay
12:19 masak ah. precedence
12:19 jnthn tadzik: Checking what to do :)
12:19 masak niecza: say (<a b c> Z=> (<1 2 3> Z+ <4 5 6>)).perl
12:19 p6eval niecza v8-9-g2bbb19a: OUTPUT«("a" => 5, "b" => 7, "c" => 9).list␤»
12:19 tadzik (:
12:20 sili masak: that produces tupes?
12:20 sili tuples
12:20 tadzik Pairs
12:20 jnthn tadzik: make_simple_code_object($the_past_block, 'Block')
12:21 jnthn tadzik: That will give you back something you can pass as the second arg to add_phaser
12:21 tadzik nice, thanks
12:22 sili "a" => "1" =>  "3" is a pair of 3?
12:22 masak sili: you can think of it like Lisp's list data structures.
12:22 sili gotcha
12:23 masak rakudo: sub car(Pair $_) { .key }; sub cdr(Pair $_) { .value }; sub cddr(Pair $_) { .&cdr.&cdr }; say cddr("a" => "1" => "3")
12:23 p6eval rakudo 922500: OUTPUT«3␤»
12:23 masak rakudo: sub car(Pair $_) { .key }; sub cdr(Pair $_) { .value }; sub cddr(Pair $_) { .&cdr.&cdr }; say (cddr "a" => "1" => "3")
12:24 p6eval rakudo 922500: OUTPUT«3␤»
12:24 masak shoulda written it like that, of course :P
12:24 espadrine left #perl6
12:25 espadrine joined #perl6
12:26 masak TimToady: re the conjectural section on Z and X subprecedence, as a naive user who just playfully explored that area (above), let me assure you that that is indeed what I would've expected. if it were up to me, that part shouldn't be conjectural. :)
12:26 masak s/shouldn't/wouldn't/
12:27 masak std: [==>] foo, bar
12:27 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't reduce with ==> because sequencer operators are too fiddly at /tmp/Vx4yfUD9sj line 1:␤------> [32m[==>][33m⏏[31m foo, bar[0m␤Undeclared routines:␤ 'bar' used at line 1␤   'foo' used at line 1␤Check failed␤FAILED 00:01 120m␤»…
12:27 masak fiddly. yes. :)
12:28 sili what's ==>
12:28 sili perldoc -f '==>' :(
12:28 masak :)
12:29 masak sili: it's a pipe for sending lists from one statement to another.
12:29 jnthn nom: 1,2,3,4,5 ==> map * - 3 ==> say
12:29 p6eval nom: OUTPUT«-2 -1 0 1 2␤»
12:29 jnthn nom: 1,2,3,4,5 ==> map * - 3 ==> grep * < 0 ==> say
12:29 sili got it, so you don't have to write your stuff from right-to-left
12:29 p6eval nom: OUTPUT«-2 -1␤»
12:30 jnthn Yeah, it can look really pretty
12:30 jedai left #perl6
12:30 masak sili: you could think of it like a semicolon, except that the next statement gets "primed" with values. very much like pipes in Unix.
12:30 masak nom: say <== grep * < 0 <== map * - 3 <== 1,2,3,4,5
12:30 sili long live perl6
12:30 p6eval nom: OUTPUT«-2 -1␤»
12:30 masak \o/
12:30 jnthn masak: Unpretty. :P
12:31 masak jnthn: bigot! :P
12:31 tadzik ytterp
12:31 masak rakudo: say flip "pretty"
12:31 p6eval rakudo 922500: OUTPUT«ytterp␤»
12:31 whiteknight left #perl6
12:32 jedai joined #perl6
12:33 sili How would I do `map say, qw(a b c d)`
12:33 tadzik <a b c d>.map(say(*))
12:33 tadzik rakudo: <a b c d>.map(say(*))
12:33 p6eval rakudo 922500: OUTPUT«Whatever()<0x238d7c8>␤No candidates found to invoke for method 'map' on object of type 'Parcel'; available candidates have signatures:␤:(Mu : &block;; *%_)␤:(Mu : %block;; *%_)␤␤  in main program body at line 22:/tmp/AJ1uy2LhjX␤»
12:33 tadzik eek
12:34 tadzik rakudo: <a b c d>.map({say($_)})
12:34 p6eval rakudo 922500:  ( no output )
12:34 jnthn rakudo: map *.say, qw(a b c d)
12:34 p6eval rakudo 922500: OUTPUT«Could not find sub &d␤  in main program body at line 22:/tmp/QiG7YhsJhU␤»
12:34 jnthn er :)
12:34 jnthn rakudo: map *.say, <a b c d>
12:34 p6eval rakudo 922500:  ( no output )
12:34 jnthn oh
12:34 jnthn rakudo: eager map *.say, <a b c d>
12:34 p6eval rakudo 922500: OUTPUT«a␤b␤c␤d␤»
12:35 jnthn ...should really be eager automatically in void context though.
12:35 sili is that a bug or a side effect of the eval bot?
12:35 jnthn Bug.
12:35 sili cool.
12:36 sili it's raining.
12:36 dalek rakudo/nom: 28e322a | jonathan++ | src/Perl6/Metamodel/ (3 files):
12:36 dalek rakudo/nom: Get private methods in roles composed in (simple case).
12:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/28e322a480
12:36 dalek rakudo/nom: afb25a0 | jonathan++ | t/spectest.data:
12:36 dalek rakudo/nom: Two more passing test files.
12:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/afb25a0216
12:36 dalek rakudo/nom: eab6c06 | jonathan++ | src/Perl6/Actions.pm:
12:36 dalek rakudo/nom: Fix issue where you couldn't mention implicit %_ in a method.
12:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eab6c06130
12:38 kaare_ left #perl6
12:39 dalek rakudo/nom: 267b63b | jonathan++ | t/spectest.data:
12:39 dalek rakudo/nom: Another passing text file thanks to getting privates sorted out.
12:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/267b63b067
12:39 tadzik yes, it's raining
12:39 tadzik although I doubt that it's the same rain
12:40 jnthn heh heh. S12-attributes/undeclared.t will not compile with nom
12:40 jnthn Why not?
12:40 jnthn Attribute $!d not declared in class D at line 20, near " = 1 }}; D"
12:40 jnthn :D
12:40 tadzik :D
12:40 tadzik ETOOSMART
12:42 masak \o/
12:42 masak The Compiler That Knew Too Much.
12:42 sili why is it useful to allow a different invocant name? (other than self)
12:43 masak sili: I sometimes make it $_
12:43 sili method myMethod($invocant: $x, $y)'
12:43 flussence re: that GGE thing that generates strings; I was wanting to do exactly that with the sprintf grammar on S32/Str:429, to catch any missing bits in sprintf.t... I might give it a try :)
12:43 masak sili: then I can do .foo and .[] and stuff.
12:43 masak flussence: \o/
12:43 masak flussence: keep me posted.
12:44 masak oh wait. it's a grammar. :/
12:44 masak um.
12:44 mj41 joined #perl6
12:44 masak I never quite got grammars to work, I think. I was well on my way though.
12:44 sili .perl is like Data::Dumper::Dumper?
12:44 masak sili: yep.
12:44 sili handy
12:44 * masak should probably dust off GGE and finish the grammars
12:45 flussence bah, this got wedged on an infinite-looping test in the night: http://i.imgur.com/UxD1W.png
12:45 PacoLinux joined #perl6
12:46 masak flussence++ # for the effort
12:47 flussence it'll get done, eventually. I like shiny things :)
12:50 jnthn If anybody fancies fixing that test file up a bit, they'd be welcome :)
13:03 jimmy1980 left #perl6
13:03 jimmy1980 joined #perl6
13:15 PacoLinux left #perl6
13:21 dalek roast: 6dbcddb | jonathan++ | S12-methods/instance.t:
13:21 dalek roast: A correction and unfudge for a test.
13:21 dalek roast: review: https://github.com/perl6/roast/commit/6dbcddb6ce
13:21 dalek rakudo/nom: 7bfa218 | jonathan++ | src/ (2 files):
13:21 dalek rakudo/nom: Couple more corrections to implicit %_ handling.
13:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7bfa2180f6
13:21 jnthn There's another masakbug down :)
13:28 Chillance joined #perl6
13:35 bluescreen10 joined #perl6
13:55 tadzik tea makes me hungry :\
13:56 tadzik no that I shouldn't eat more, but I've run out of food:)
13:57 masak it's so hot here today, I have no apetite at all :(
13:57 jnthn It's not so much the temperature, it's the stuffiness.
14:00 jnthn masak: Could always visit an air conditioned nommery :P
14:01 masak "get thee to a nommery"
14:02 jnthn :D
14:03 PacoLinux joined #perl6
14:03 dalek rakudo/podparser: 5ed0e09 | tadzik++ | src/Perl6/Grammar.pm:
14:03 dalek rakudo/podparser: Bring mysterious COMPILING := 1 back to Grammar.pm
14:03 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/5ed0e09c3a
14:03 dalek rakudo/podparser: 585cd06 | tadzik++ | / (9 files):
14:03 dalek rakudo/podparser: The Pod tree should not contain bare strings. Use Pod::Block::Para, adjust the tests and Pod::To::Text
14:03 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/585cd06cb2
14:04 tadzik jnthn: obtw, what is that %?COMPILING := 1 for?
14:04 jnthn tadzik: er
14:04 jnthn I did know :)
14:04 tadzik I'm quite sure it's a hash now, but when I remove it, stuff breaks :)
14:04 jnthn Oh, I remember adding it for a reason :)
14:04 jnthn I just forget the reason.
14:04 tadzik is export, to be exact, when compiling Test.pm
14:05 jnthn oh!
14:05 jnthn yes :)
14:05 jnthn is export checks it
14:05 jnthn It can go away when we get BS
14:05 jnthn (the serialization stuff)
14:05 tadzik can't 'is export' be satisfied with it having a true value?
14:05 jnthn probably
14:06 jnthn All it cares about is "am I being called by the compiler"
14:06 tadzik if $*COMPILING
14:06 tadzik huh
14:06 jnthn Whihc of course a trait always should be. Alas... :)
14:07 tadzik oh, it's $*COMPILING, not %?COMPILING
14:07 tadzik asd!
14:07 tadzik I may be able to fix this now
14:08 drbean left #perl6
14:09 tadzik even $*COMPILING and %*COMPILING. Pff
14:10 jnthn Confusion. You has it.
14:10 jnthn :)
14:10 jnthn .oO( Or...I caused it. :) )
14:10 tadzik (:
14:10 tadzik $*CONFUSION
14:10 tadzik or, wait, %?CONFUSION
14:11 tadzik no, %*CONFUSION
14:13 bluescreen10 left #perl6
14:14 bluescreen10 joined #perl6
14:15 jnthn Too much hash may cause confusion. :P
14:19 PacoLinux left #perl6
14:19 PacoLinux__ joined #perl6
14:21 bluescreen10 left #perl6
14:22 jaldhar left #perl6
14:23 TimToady btw, "Hashes with non-Str keys" is already in there with Sets as "Object hashes"
14:24 TimToady (in features)
14:24 PacoLinux__ left #perl6
14:24 masak oops
14:24 * masak fixes
14:24 woosley left #perl6
14:25 dalek features: 56d6494 | masak++ | features.json:
14:25 dalek features: [features.json] removed duplicate entry
14:25 dalek features:
14:25 dalek features: TimToady++ for spotting it.
14:25 dalek features: review: https://github.com/perl6/f​eatures/commit/56d64945d9
14:25 jnthn masak: While you're in there, could you mark nom as doing currying? :)
14:26 masak ok.
14:27 dalek features: 7705c56 | masak++ | features.json:
14:27 dalek features: [features.json] nom now does currying
14:27 dalek features:
14:27 dalek features: jnthn++ for reporting.
14:27 dalek features: review: https://github.com/perl6/f​eatures/commit/7705c56ac6
14:28 Mowah joined #perl6
14:28 jnthn thanks! :)
14:36 dalek rakudo/podparser: bdb7627 | tadzik++ | src/ (3 files):
14:36 dalek rakudo/podparser: Remove $*COMPILING
14:36 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/bdb7627bf4
14:37 jnthn tadzik: Are you sure those were the only usages?
14:38 jnthn tadzik: I think there may be one more...
14:38 tadzik ack didn't find it
14:38 jaldhar joined #perl6
14:47 f00li5h left #perl6
14:48 f00li5h joined #perl6
14:52 jaldhar left #perl6
14:54 mj41 left #perl6
15:03 im2ee left #perl6
15:04 kaare_ joined #perl6
15:06 im2ee joined #perl6
15:06 mj41 joined #perl6
15:09 birdwindupbird joined #perl6
15:10 im2ee left #perl6
15:16 jnthn tadzik: Then ack fail. Line 52 of src/Perl6/ModuleLoader.pm.
15:22 masak rakudo: sub balanced($s, $l = 0) { return !$l unless $s; my ($c, $r) = $s.comb(/^.|.*$/); return balanced($r, $c eq "[" ?? $l + 1 !! $l - 1) }; repeat until balanced(my $s) { $s = [~] <] [>.roll(10) }; say $s
15:22 p6eval rakudo 922500: OUTPUT«]]][[[][[]␤»
15:22 masak oops :)
15:23 jaldhar joined #perl6
15:23 masak rakudo: sub balanced($s, $l = 0) { return !$l unless $s; my ($c, $r) = $s.comb(/^.|.*$/); return False if $c eq "]" && !$l; return balanced($r, $c eq "[" ?? $l + 1 !! $l - 1) }; repeat until balanced(my $s) { $s = [~] <] [>.roll(10) }; say $s
15:23 daniel-s left #perl6
15:23 p6eval rakudo 922500: OUTPUT«[][[]][][]␤»
15:23 masak does anyone know if there's a faster way to randomly generate a string of balanced parentheses?
15:24 masak (of a given length. such that each such string has an equal probability of being generated.)
15:27 jnthn Recursive approach could work (random choice of wether to deeper, but curtailed by length) but not sure if it'd get the equal probabilities...
15:28 jnthn *to go deeper
15:29 satyavvd joined #perl6
15:32 masak well, let's see. a [[][]][] string is isomorphic to a binary search tree.
15:32 jnthn nom: sub gen($*l) { sub g() { $*l -= 2; '[' ~ ($*l > 0 && <0 1>.pick ?? gen() ~ ']' }; g() }; g(2); gen(10)
15:32 p6eval nom: OUTPUT«Found ?? but no !! at line 1, near "}; g() }; "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
15:32 jnthn nom: sub gen($*l) { sub g() { $*l -= 2; '[' ~ ($*l > 0 && <0 1>.pick ?? gen() !! ') ~ ']' }; g() }; g(2); gen(10)
15:32 p6eval nom: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:244)␤»
15:32 masak no wait. it's isomorphic to a rooted tree, period.
15:33 masak and in fact, the mapping can be seen as a pre-order traversal of the tree, generating [s when going down and ]s when going back up.
15:33 jnthn nom: sub gen($*l) { sub g() { $*l -= 2; '[' ~ ($*l > 0 && <0 1>.pick ?? gen() !! '') ~ ']' }; g() }; say gen(2); say gen(10)
15:33 p6eval nom: OUTPUT«Cannot assign to a readonly variable or a value␤current instr.: '_block10908' pc 603878 (src/gen/CORE.setting.pir:152395) (src/gen/CORE.setting:4867)␤»
15:33 jnthn oh, duh
15:33 jnthn nom: sub gen($len) { my $*l = $len; sub g() { $*l -= 2; '[' ~ ($*l > 0 && <0 1>.pick ?? gen() !! '') ~ ']' }; g() }; say gen(2); say gen(10)
15:33 p6eval nom: OUTPUT«[]␤[]␤»
15:33 jnthn oh, darn
15:33 jnthn :)
15:34 jnthn Has to be 10, chars, not just up to 10 :)
15:34 jnthn Yeah, that way won't work.
15:37 masak does it help to know that the two "extreme" forms of the strings are [[[[[]]]]] and [][][][][], and that each of the other valid strings of that length are, in some loose sense, "combinations" of those two extremes?
15:38 tadzik jnthn: look closer at the patch :)
15:40 jnthn tadzik: oh, I missed that :)
15:40 jnthn nom: sub gen($len) { my $*l = $len; sub g() { my $r = ''; while $*l { $*l -= 2; $r ~= '[' ~ ($*l > 0 && <0 1>.pick ?? gen() !! '') ~ ']' }; $r }; g() }; say gen(2); say gen(10)
15:40 p6eval nom: OUTPUT«[]␤Not enough positional parameters passed; got 0 but expected 1␤current instr.: 'gen' pc 426 ((file unknown):59693026) (/tmp/onRqwqV5WB:1)␤»
15:40 jnthn nom: sub gen($len) { my $*l = $len; sub g() { my $r = ''; while $*l { $*l -= 2; $r ~= '[' ~ ($*l > 0 && <0 1>.pick ?? g() !! '') ~ ']' }; $r }; g() }; say gen(2); say gen(10)
15:41 p6eval nom: OUTPUT«[]␤[[][[[]]]]␤»
15:41 jnthn nom: sub gen($len) { my $*l = $len; sub g() { my $r = ''; while $*l { $*l -= 2; $r ~= '[' ~ ($*l > 0 && <0 1>.pick ?? g() !! '') ~ ']' }; $r }; g() }; say gen(2); say gen(10)
15:41 p6eval nom: OUTPUT«[]␤[[[][][]]]␤»
15:41 jnthn That works.
15:41 jnthn :)
15:41 bluescreen10 joined #perl6
15:41 jnthn Not sure it's any prettier than what masak++ originally had though.
15:42 jnthn nom: sub gen($*l is copy) { (sub { my $r = ''; while $*l { $*l -= 2; $r ~= '[' ~ ($*l > 0 && <0 1>.pick ?? &?ROUTINE() !! '') ~ ']' }; $r }).() } say gen(2); say gen(10)
15:42 masak I have a feeling it will generate all but with unequal distribution.
15:42 p6eval nom: OUTPUT«Confused at line 1, near "sub gen($*"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
15:42 jnthn meh
15:42 masak because it favours the beginning of the string, in a way.
15:42 jnthn masak: Kinda
15:43 jnthn I dunno. I never liked probability much and avoid it at every chance. :)
15:43 masak :P
15:43 masak rakudo: sub balanced($s, $l = 0) { return !$l unless $s; my ($c, $r) = $s.comb(/^.|.*$/); return False if $c eq "]" && !$l; return balanced($r, $c eq "[" ?? $l + 1 !! $l - 1) }; my $s = "[]"; while $s.chars < 10 { my ($p1, $p2) = (^$s.chars).roll, (^($s.chars + 1)).roll; next unless $p2 > $p1; $s = $s.substr(0, $p1) ~ "[" ~ $s.substr($p1, $p2 - $p1) ~ "]" ~ $s.substr($p2); }; say $s
15:43 p6eval rakudo 922500: OUTPUT«[[[[][]]]]␤»
15:43 masak I thought this was a good one, but...
15:44 masak ...running it a few times, it seems to me it favours the [[[[[]]]]] case too much.
15:44 jnthn Well, I guess you could generate them all
15:44 jnthn And then .roll the list :)
15:44 masak yes, that's a possibility.
15:44 TimToady rakudo: say '[' ~ (<[ ]> xx 8).pick(*) ~ ']'
15:44 p6eval rakudo 922500: OUTPUT«[] ] ] [ ] ] [ [ [ [ ] [ [ ] [ ]]␤»
15:44 masak let's define that as cheating, though :P
15:44 jnthn Sucks for big lengths though. :)
15:44 TimToady rakudo: say '[' ~ (<[ ]> xx 4).pick(*) ~ ']'
15:44 p6eval rakudo 922500: OUTPUT«[] ] ] [ [ [ [ ]]␤»
15:44 TimToady hmm
15:45 tadzik jnthn: http://wklej.org/id/570329/ do you see anything wrong in that?
15:46 jnthn tadzik: Not right off, aside from the block being empty
15:47 tadzik yeah, but it's this error whatever I put inside
15:47 jnthn tadzik: oh wait
15:47 TimToady rakudo: my $b; substr($b, (0..@b.chars).pick, 0, '[]') for ^4
15:47 p6eval rakudo 922500: OUTPUT«===SORRY!===␤Symbol '@b' not predeclared in <anonymous> (/tmp/Pjizm3k7Wl:22)␤»
15:47 jnthn you're doing it too late.
15:47 TimToady rakudo: my $b; substr($b, (0..$b.chars).pick, 0, '[]') for ^4
15:47 tadzik oh?
15:48 p6eval rakudo 922500: OUTPUT«Method 'chars' not found for invocant of class ''␤  in <anon> at line 22:/tmp/E72BKzY3Yh␤  in main program body at line 1:src/metamodel/RoleToInstanceApplier.nqp␤»
15:48 jnthn tadzik: By the time we're where you've done it, we already popped all the lexpads off the stack.
15:48 tadzik I was trying not to make it too early :)
15:48 TimToady rakudo: my $b = ''; substr($b, (0..$b.chars).pick, 0, '[]') for ^4
15:48 p6eval rakudo 922500: OUTPUT«No applicable candidates found to dispatch to for 'substr'. Available candidates are:␤:(Mu : Any $start, Any $length?;; *%_)␤␤  in <anon> at line 22:/tmp/_FJ5fzhHcB␤  in main program body at line 1:src/metamodel/RoleToInstanceApplier.nqp␤»
15:48 jnthn tadzik: See end of comp_unit in the grammar
15:48 TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0, '[]') for ^4
15:48 p6eval pugs:  ( no output )
15:48 jnthn tadzik: Probably you want to add it before CHECK time :)
15:48 TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0, '[]') for ^4; say $b
15:48 p6eval pugs: OUTPUT«␤»
15:48 TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^4; say $b
15:48 p6eval pugs: OUTPUT«[[][]][]␤»
15:49 TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
15:49 p6eval pugs: OUTPUT«[[]][][][]␤»
15:49 TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
15:49 p6eval pugs: OUTPUT«[[][]][][]␤»
15:49 TimToady pugs: srand; my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
15:49 p6eval pugs: OUTPUT«[[[]]][][]␤»
15:49 satyavvd left #perl6
15:49 TimToady pugs: srand; my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
15:49 p6eval pugs: OUTPUT«[][][][][]␤»
15:49 tadzik hrm
15:49 TimToady pugs: srand; my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
15:49 p6eval pugs: OUTPUT«[[[]]][][]␤»
15:50 masak now, there's an idea.
15:50 bluescreen10 left #perl6
15:51 jnthn finally, we found a use for lvalue substr!
15:51 masak all is forgiven!
15:51 TimToady niecza: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
15:51 p6eval niecza v8-9-g2bbb19a: OUTPUT«Unhandled exception: Unable to resolve method pick in class Range␤  at /tmp/0kRxspQN5S line 1 (MAIN mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1933 (CORE C906_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1934 (CORE module-CORE…
15:52 TimToady alpha: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
15:52 p6eval alpha : OUTPUT«␤»
15:52 mj41 left #perl6
15:52 masak Range doesn't have a .pick in Niecza? LHF!
15:53 TimToady alpha: my $b = ''; substr($b, Int($b.chars.rand), 0) = '[]' for ^5; say $b
15:53 p6eval alpha : OUTPUT«invoke() not implemented in class 'Integer'␤in Main (file <unknown>, line <unknown>)␤»
15:53 TimToady niecza: my $b = ''; substr($b, Int($b.chars.rand), 0) = '[]' for ^5; say $b
15:53 p6eval niecza v8-9-g2bbb19a: OUTPUT«Unhandled exception: Unable to resolve method rand in class Int␤  at /tmp/sfoL7JsJYP line 1 (MAIN mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1933 (CORE C906_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1934 (CORE module-CORE @…
15:53 donri joined #perl6
15:53 TimToady niecza: my $b = ''; substr($b, Int($b.chars * rand), 0) = '[]' for ^5; say $b
15:53 p6eval niecza v8-9-g2bbb19a: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Int␤  at /tmp/JqcSUMylwe line 1 (MAIN mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1933 (CORE C906_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1934 (COR…
15:54 TimToady niecza: my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; say $b
15:54 p6eval niecza v8-9-g2bbb19a: OUTPUT«[[][][][]]␤»
15:54 TimToady niecza: my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; say $b
15:54 p6eval niecza v8-9-g2bbb19a: OUTPUT«[[][][][]]␤»
15:55 TimToady niecza: for 1..10 { my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; say $b }
15:55 p6eval niecza v8-9-g2bbb19a: OUTPUT«[[][][[]]]␤[[[[]]][]]␤[][[][][]]␤​[[]][][][]␤[[]][[][]]␤[[]][[][]]␤[][[[[]​]]]␤[[][][[]]]␤[[][]][[]]␤[[][][[]]]␤»
15:55 masak it seems to favor the [[][][][]] case... :)
15:56 TimToady srand
15:57 TimToady niecza: my %dist; for 1..100 { my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; %dist{$b}++ }; say %dist.values
15:57 p6eval niecza v8-9-g2bbb19a: OUTPUT«12111412744145434322211451243525␤»
15:58 masak hard to see where one value ends and the next begins... :)
15:58 TimToady niecza: my %dist; for 1..100 { my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; %dist{$b}++ }; say ~%dist.values
15:58 p6eval niecza v8-9-g2bbb19a: OUTPUT«1 3 4 1 3 2 1 2 1 3 2 1 3 1 2 4 4 3 4 7 1 4 5 3 7 4 5 1 3 8 1 6␤»
15:58 masak ah.
15:58 masak not so hard after all :P
15:59 masak niecza: my %dist; for 1..1e4 { my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; %dist{$b}++ }; say ~%dist.values
15:59 p6eval niecza v8-9-g2bbb19a: OUTPUT«20 65 111 51 51 290 287 202 608 72 202 615 326 314 160 331 310 143 93 654 665 340 615 210 30 183 221 89 324 145 77 321 194 158 310 322 325 104 136 74 156 96␤»
16:00 TimToady doesn't seem equal
16:00 masak I'd *guess*... right.
16:00 masak probably easier to see with the keys...
16:00 masak niecza: my %dist; for 1..1e4 { my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; %dist{$b}++ }; say %dist.perl
16:00 p6eval niecza v8-9-g2bbb19a: OUTPUT«{"[[[[][]]]]" => 56, "[][[[]]][]" => 116, "[[[]]][[]]" => 93, "[[[][[]]]]" => 69, "[[][[]]][]" => 74, "[[[]][[]]]" => 164, "[][[][][]]" => 635, "[][[[[]]]]" => 92, "[][[[]][]]" => 300, "[[][[]][]]" => 295, "[][[][]][]" => 210, "[[[][][]]]" => 158, "[][][[]][…
16:01 masak things that are more [][][][][]-y seem more favored.
16:01 TimToady there are more ways to generate them?
16:01 TimToady yes, there's only one way to generate [[[[[]]]]]
16:02 TimToady there are 5! or so ways to do [][][][][]
16:02 TimToady or maybe 4!
16:05 masak right.
16:05 masak need a mechanism that counteracts that.
16:05 masak but not too much :P
16:06 TimToady I wonder what percentage have to be thrown away if you just shuffle randomly
16:07 masak hm, maybe something inductive/recursive? given an evenly distributed length-$N-2 string, give an evenly distributed length-$N string...
16:07 TimToady just the ones that hit "gambler's ruin" and go negative
16:07 pmichaud good morning, #perl6
16:07 TimToady so higher than 50%, but how much?
16:07 masak pmichaud! \o/
16:07 TimToady o/
16:08 jnthn morning, pmichaud
16:08 masak TimToady: here's your answer, I think: http://oeis.org/A006318
16:10 tadzik good morning pmichaud
16:11 TimToady royal paths, eh?
16:12 TimToady doesn't seem quite right; we don't have diagonals
16:18 masak indeed.
16:19 masak this one looks better: http://oeis.org/A000081
16:20 masak it even talks about inserting parentheses :)
16:21 JimmyZ_ left #perl6
16:27 sorear good * #perl6
16:29 sorear o/ sili
16:32 Mowah left #perl6
16:32 Aridai joined #perl6
16:34 TimToady aron figgered it out
16:35 TimToady 1  1  1  1  1
16:35 TimToady 4  3  2  1
16:35 TimToady 9  5  2
16:35 djanatyn joined #perl6
16:35 TimToady 14 5
16:35 TimToady 14
16:35 djanatyn Hello.
16:35 sorear o/ djanatyn
16:36 TimToady now go the other way and use the relative probabilities
16:36 * djanatyn was reading up on some Perl 5 CGI.
16:36 djanatyn Are there any libraries to make CGI easier with perl 6?
16:38 djanatyn sorear: why -1 to an official perl pastebin?
16:40 soh_cah_toa joined #perl6
16:41 djanatyn Also, does anyone here use Padre?
16:43 sorear well, incase you couldn't tell from our CPAN discussion, I feel pretty strongly about not reinventing wheels... :)
16:43 TimToady but what if it's a better wheel?
16:44 djanatyn reinventing the wheel? but what other pastebin is there out there for perl 6, besides pastebin.com?
16:46 pmichaud lots of us use gist.github.com
16:47 djanatyn Hmm, I used that as well for my first perl6 paste.
16:47 djanatyn Do they seem like they're going to add perl6 syntax highlighting soon?
16:47 pmichaud I'm sure that if someone helped to build the highlighter, they'd add it.
16:47 pmichaud if we sit around waiting for them to do it, it might take a while
16:48 dalek rakudo/nom: e028411 | jonathan++ | src/ (4 files):
16:48 dalek rakudo/nom: Register Capture type so we can use it in the binder.
16:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e0284114e1
16:48 dalek rakudo/nom: 3588736 | jonathan++ | src/core/Capture.pm:
16:48 dalek rakudo/nom: Fix a thinko.
16:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/358873603f
16:48 dalek rakudo/nom: 0bc9883 | jonathan++ | src/ (2 files):
16:48 dalek rakudo/nom: Make |$c work again in signatures; $c becomes a Capture with the current unbound stuff in it.
16:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0bc9883a45
16:48 sorear usefully highlighting perl 6 is impossible, I think
16:48 jlaire one useful feature of dedicated pastebins is that a bot can monitor them and post links to new pastes automagically
16:49 sorear like Alias said, it's the price we pay for a programmable programming language
16:50 pmichaud for me, most highlighters are more annoying than useful anyway
16:51 djanatyn still, I want to play with this: http://search.cpan.org/~azawawi/Syntax-Highli​ght-Perl6-0.88/lib/Syntax/Highlight/Perl6.pm
16:51 djanatyn it'll take perl6 code as a string, and output formatted, syntax highlighted HTML, it seems.
16:51 djanatyn Even if people don't use a perl 6 pastebin, it would be a fun project to write.
16:52 masak djanatyn: hey!
16:52 masak djanatyn: tadzik alluded to this blog post last night, but didn't post a link to it: http://strangelyconsistent.o​rg/blog/perl-6-is-my-mmorpg
16:53 djanatyn masak: I read that, thought it was pretty awesome.
16:53 masak djanatyn: summary: if you want to contribute, there are tons of ways, not all of which require you to be a compiler writer.
16:53 masak oh, ok :)
16:53 masak (thanks)
16:53 * djanatyn has been looking for ways to contribute
16:53 masak here's my tip: look for ways to have fun that involve Perl 6.
16:53 masak it's kind of a bottom-up approach to contributing.
16:54 masak sooner or later, you'll find yourself doing something not only meaningful, but something probably closely related to the things you enjoy the most.
16:54 pmichaud also, don't feel as though you need our permission to do something.  :-)
16:55 pmichaud we can hazard guesses as to what might be useful... but we can also be wrong.
16:56 djanatyn I don't know how safe it would be to give me that advice.
16:56 djanatyn It took me much longer than it should have to realize that I should have been using "use strict;" ;)
16:57 donri left #perl6
16:57 Aridai left #perl6
16:57 donri joined #perl6
16:57 daxim left #perl6
16:58 masak djanatyn: do you have Rakudo installed?
16:58 djanatyn masak: Yep!
16:59 masak djanatyn: could you do me a favor?
16:59 djanatyn Is it time to install niecza?
16:59 djanatyn Sure.
16:59 masak djanatyn: download https://github.com/masak/farm and see if you can reproduce this bug: https://gist.github.com/1116739
16:59 * djanatyn was looking at farm
16:59 masak it's at the end of that gist. the stock shouldn't give away all of its rabbits!
16:59 djanatyn reminds me a little bit of hamurabi :D
16:59 masak I have no clue why that's happening.
16:59 masak kthx.
17:00 * masak goes for a run
17:00 crked joined #perl6
17:02 djanatyn ...hmm.
17:02 donri left #perl6
17:02 djanatyn should it be taking over a minute for this code to run?
17:02 djanatyn oh, there we go.
17:04 crked Hi #perl6, I have a problem with regex in Rakudo.  How can I use negative char class to express one or more non-space?  I tried  <-[ ]>+ but it seems doesn't work
17:04 soh_cah_toa left #perl6
17:05 pmichaud need to quote the space
17:05 pmichaud <-[\ ]>+
17:05 pmichaud (I think that works)
17:06 crked Yes, you are right. Thank you.
17:06 pmichaud rakudo:  say 'abc def' ~~ / <-[\ ]>+ /
17:06 p6eval rakudo 922500: OUTPUT«abc␤»
17:07 sorear note that \H means <-[\ \t]>, approximately, and might work for you, crked
17:07 sorear \S includes vertical space too
17:07 sorear well
17:07 sorear not-includes ;)
17:07 crked Thank you. So if I want to use exact 1 space outside the char class, do I still need to quote it?
17:09 crked Like  /[<-[\ ]>+ /  or   /[<-[\ ]>+\ /
17:09 jnthn excludes? :)
17:10 pmichaud spaces always have to be quoted to be matched literally.
17:10 crked Otherwise it will obey the .ws rule, right?
17:11 pmichaud in a rule, yes.
17:11 crked Thanks.
17:11 pmichaud (not in a token or regex)
17:12 crked if m/.../    is it a rule or token or regex?
17:12 tadzik pmichaud: what do you think about merging podparser into nom? No regressions, and it fixes quite a few things in the compiler (commandline options, symboltable, grammar etc)
17:12 tadzik jnthn and moritz are +1'ing the idea
17:13 pmichaud tadzik: I really want to have a bit of time to review the code first.
17:13 tadzik okay
17:13 pmichaud what's the branch name?
17:13 pmichaud podparser, yes?
17:13 tadzik yes
17:13 pmichaud is it currently up-to-date with nom?
17:14 tadzik I merged nom today
17:14 Mowah joined #perl6
17:15 tadzik 14 commits behind nom I believe
17:15 pmichaud you claimed no performance regression earlier... how was that determined?
17:16 sorear crked: only spaces in the regex proper become <.ws>.  Inside a character class, they are simply ignored.
17:16 sorear crked: m/.../ is equivalent to regex { ... }
17:16 moritz ... except that it's run immediately
17:16 sorear crked: (except that the latter makes a new lexical scope)
17:16 donri joined #perl6
17:17 tadzik pmichaud: spectest runtime
17:17 pmichaud tadzik: okay.
17:19 pmichaud has TimToady++ looked at the grammar rules?  Are they likely to be merged into STD.pm6?
17:19 tadzik no, I don't think so
17:19 pmichaud hmmmm
17:20 pmichaud (I'm reviewing the diff now.)
17:21 soh_cah_toa joined #perl6
17:21 pmichaud I wonder if Pod is going to end up being its own grammar, similar to the way that Q, Regex, and Quasi are
17:24 pmichaud I wish that Pod::Block wasn't "Block".
17:25 pmichaud or that our current "Block" class was named something else.
17:25 pmichaud there's an unfortunate pun there.
17:25 jnthn .oO( But will it Block the merge :P )
17:26 jnthn tadzik: Was the Pod::Block name from S26 ooc?
17:26 tadzik yes
17:26 jnthn ah, ok
17:26 tadzik Damian's Perl 5 implementation has it too
17:26 pmichaud right
17:27 jnthn *nod*
17:27 pmichaud I'm just saying we might want to change that.
17:27 jnthn Yeah, I can see the potential for confusion.
17:27 pmichaud it was confusing to me in the diff to see
17:27 pmichaud +    class Block {
17:27 pmichaud +        has @.content;
17:27 pmichaud +    }
17:27 tadzik The whole S26 also calls everything Pod6::Foo, rather than Pod::Foo
17:31 pmichaud I don't see anything in the diff that I strongly object to -- my minor considerations are above.
17:31 djanatyn would it be wrong to write a perl 6 pastebin in perl 5? :)
17:32 djanatyn Maybe I could write it in perl 5, and then later on translate it to p6.
17:32 moritz tadzik: time for an s:g/Pod6/Pod/ in S26, it seems
17:32 pmichaud if moritz++ and jnthn++ (especially jnthn++) are comfortable with a merge, then I'm good with it.
17:33 jnthn pmichaud: tadzik++ has asked me quite a few questions along the way, and I've had a decent feeling about the direction it's gone in.
17:33 pmichaud jnthn: right, that's why I'm not reviewing it in huge detail :)
17:33 pmichaud I know that both you and moritz++ have been following and working closely with it
17:34 jnthn If you don't see any massive OH NOES then I'd say let's get it in.
17:34 pmichaud and I should be clear that overall I find the diff to be... refreshing.
17:34 pmichaud it was easy to follow.
17:34 pmichaud (at least at a high level)
17:34 jnthn :)
17:35 pmichaud so, yes, let's get it in, then add a .WHY entry to features :-P
17:35 pmichaud and then we can definitely claim that a gsoc made it into the mainline :)
17:35 pmichaud and we should get some blog posts about it
17:35 pmichaud and someone should get tadzik++ a beer.  :)
17:36 jnthn :D
17:36 pmichaud Actually, that someone should be me.  :)
17:36 jnthn tadzik++ will be at YAPC::EU, I believe. :)
17:37 pmichaud really?
17:37 tadzik :)
17:37 pmichaud oh that will be awesome
17:37 tadzik of course
17:37 pmichaud tadzik: are you presenting?
17:37 tadzik everything's booked already
17:37 tadzik pmichaud: I thought about lightning talk about how Pod and Perl 6 collaborate
17:37 jnthn tadzik: There's always a lightning talk slot...they still have those. :)
17:37 tadzik still haven't submitted that one
17:37 pmichaud yeah, but this really deserves a full talk, I think.
17:38 tadzik I didn't have a courage to take a full talk
17:38 tadzik I can try at the Perl 6 hackathon maybe :)
17:38 pmichaud a 20 minute talk, then.
17:38 tadzik so, to merge?
17:38 pmichaud I see a 20 minute slot on Monday, at 15:10
17:39 tadzik for a full talk?
17:39 pmichaud 20 minute talk, yes.
17:39 pmichaud (talks are usually 20 or 40 minutes)
17:39 tadzik oh oh, who'd be there to hold me hand? :)
17:39 pmichaud 20 minutes is _nothing_
17:40 pmichaud I can barely get through my intro in 20 mins sometimes :)
17:40 tadzik my Rakudo Star talk was, I think, 40 or even 60
17:40 tadzik but that were like 12 people, from whom I knew half :)
17:41 pmichaud anyway, this is a cool Perl 6 feature that has not been discussed much of anywhere, afaik.  I think the talk would be very well received.
17:41 jnthn tadzik: You'll be fine. If you want to rehearse it in front of a few of us you know first, we can arrange that too :)
17:42 pmichaud that slot woudl conflict with the "why time is difficult" talk, though :-|
17:42 tadzik yes :/
17:43 pmichaud anyway, I highly encourage contacting ash and saying "I've a new 20 minute talk if you end up with a slot that doesn't conflict with another Perl 6 talk"
17:43 tadzik maybe I can split it into a few lightning talk :)
17:43 pmichaud it's generally tough to get multiple lightning talk slots at yapc::eu
17:44 pmichaud but as a lightning talk would be good also.
17:44 pmichaud this is one of those "oh wow" features of Perl 6 that tends to get people interested and excited
17:46 pmichaud anyway, that's my pressure for today.  I'd even go so far as to say that I'd be willing to give the talk if you backed out :)
17:46 tadzik so maybe a lightning talk is enough to get everyone excited. Something like "oh, wait, I want to know more!" reaction
17:46 pmichaud I guarantee that we (collectively) could put together slides and content for a 20-minute talk in just an hour or two on Saturday or Sunday :)
17:46 tadzik I'd like to give one, but it's probably too late to find a good slot for that
17:47 tadzik on monday everyone's coming for Time anyway
17:47 jnthn brb, dinner
17:47 tadzik maybe we can make it a Hackathon feature
17:47 tadzik so, are we merging podparser?
17:47 pmichaud well, that may be because there's nothing else they really want to see in the other tracks
17:47 pmichaud tadzik: I've given my approval.  :)
17:47 tadzik okay :) Find yourselves a trenches
17:47 pmichaud it's up to you, jnthn++, and moritz++ after that :)
17:48 tadzik I'll give it a last spectest, Justin Case
17:48 pmichaud be sure to do a nom-merge first in your branch -- you're behind by a few commits
17:48 tadzik yes, I've done that already
17:48 tadzik I'll do some nice blogging after that
17:48 pmichaud +1
17:49 tadzik especially since the remaining GSoC stuff is basically Formatting Codes, DOC use, the remaining cases of .WHY, default DOC INIT... hmm
17:50 tadzik maybe a more polished Pod::To::Text
17:50 tadzik and Pod::Parser module. Fin
17:50 tadzik that was one productive day today
17:55 tadzik http://yapceurope.lv/ye2011/talk/3717
17:58 masak djanatyn: hi, I'm back from my run. I see you got the program running.
17:58 masak djanatyn: did you also manage to reproduce the bug?
17:58 djanatyn masak: nope :\
17:58 djanatyn I did manage to get the game running, though!
17:58 masak yes, kudos.
17:58 djanatyn I'm...not exactly sure how to play the game.
17:58 masak ah.
17:58 masak I guess it's not self-evident.
17:58 masak have you found the README.md?
17:59 pmichaud tadzik: 3717 gives me a 404 Not Found
17:59 tadzik weird
17:59 tadzik http://i.imgur.com/RPhGD.png though
18:00 tadzik jnthn: t/spec/S02-builtin_data_types/capture.rakudo dies with Cannot use this form of method call with a private method at line 11, known?
18:00 djanatyn ...oh. reading the README helps. :)
18:00 lichtkind joined #perl6
18:00 masak thought it might :)
18:00 lichtkind cheers
18:01 tadzik hello lichtkind
18:01 lichtkind :)
18:01 masak djanatyn: fwiw, the short-term goal is to have automated players, coded in Perl 6, play this game against each other. :)
18:01 djanatyn Huh. Seems like a pretty fun game.
18:01 masak but got to iron out all the bugs first.
18:01 tadzik we must play it at the YAPC
18:01 masak yes \o/
18:02 djanatyn YAPC?
18:02 masak Yet Anoterh Perl Conference.
18:02 djanatyn !
18:02 djanatyn Where is that?
18:02 masak the one 's up next is in Europe.
18:02 djanatyn I'd love to attend.
18:02 jnthn tadzik: Same in master
18:02 djanatyn Oh. never mind ._.
18:02 masak the one 's just was was in the US.
18:02 tadzik mhm
18:02 * [Coke] finds some coffee.
18:03 jnthn tadzik: I'm working on capture stuff at the moment though.
18:03 masak but don't worry, there's one each year in both locations.
18:03 djanatyn [Coke]: Lucky :P
18:03 djanatyn masak: Ooh, nice.
18:03 masak ...and in Asia, and in Russia...
18:03 djanatyn Where in the US was this Perl Conference?
18:03 jnthn oh noes
18:03 [Coke] moritz: (forgot to commit) I look clean here. maybe I wasn't full up to date before I /did/ the fudges? hurm.
18:03 jnthn nom: my ($a, $b, $c); say "$a!$b!$c"
18:03 p6eval nom: OUTPUT«Cannot use this form of method call with a private method at line 1, near "!$c\""␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
18:03 jnthn grrr
18:04 * djanatyn installs panda
18:04 tadzik (:
18:04 djanatyn last night, I was so tired that I forgot to run "make install" >_>
18:04 djanatyn I was just running the perl6 executable from the rakudo directory
18:05 jnthn Guess it's the interpolation thing. :/
18:05 jnthn But I'm a bit surprised it's hitting the action method.
18:07 mj41 joined #perl6
18:08 moritz jnthn: I'd be fine with changing that test, because it's not about interpolation syntax, but about captures
18:09 jnthn moritz: well, I need to try and fix the interpolation bustage too
18:10 * [Coke] is resycning and refudging.
18:10 [Coke] (though the resync will take tensofminutesw
18:11 jnthn [Coke]: I'm working on it Right Now, so feel free to leave it.
18:11 jnthn [Coke]: Especially as I'm looking at captures generally at the moment too.
18:12 am0c left #perl6
18:12 [Coke] hoaky
18:13 [Coke] er, okay.
18:13 [Coke] Sorry I screwed it up
18:13 jnthn [Coke]: Huh? I screwed it up more than you :)
18:14 tadzik rakudo: my $c = 1; say $c >== 2
18:14 p6eval rakudo 922500: OUTPUT«Bool::False␤»
18:14 tadzik what is that >==?
18:15 masak rakudo: my $x = 1; $c >== 2; say $c
18:15 p6eval rakudo 922500: OUTPUT«Rebuild in progress␤»
18:15 masak grr.
18:15 [Coke] oh. then *whew*
18:16 soh_cah_toa left #perl6
18:16 [Coke] ugh. it really is going to take 10 minutes to compile the setting, isn't it. *sigh*
18:16 soh_cah_toa joined #perl6
18:17 pmichaud >== is likely the assignment metaop form of >=
18:17 tadzik oh, it's like +=
18:18 tadzik spectest clean on podparser, besides the known capture bug. Merging, take cover...
18:19 dalek rakudo/nom: d74aaa8 | tadzik++ | / (19 files):
18:19 dalek rakudo/nom: Merge branch 'nom' into podparser
18:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d74aaa8c6a
18:20 tadzik oh, I expected something more effective :)
18:20 tadzik oh, that's not it yet
18:20 masak std: my $x = 1; $c >== 2; say $c
18:20 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $c is not predeclared at /tmp/Ec1fjQ0nZC line 1:␤------> [32mmy $x = 1; $c[33m⏏[31m >== 2; say $c[0m␤Can't make assignment out of >= because chaining operators are diffy at /tmp/Ec1fjQ0nZC line 1:␤------> [32mmy $x = 1; $c…
18:20 masak std: my $c = 1; $c >== 2; say $c
18:20 p6eval std 516268a: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't make assignment out of >= because chaining operators are diffy at /tmp/3WqZa0yz2t line 1:␤------> [32mmy $c = 1; $c >==[33m⏏[31m 2; say $c[0m␤Check failed␤FAILED 00:01 121m␤»
18:20 masak there you go.
18:21 tadzik no, that's it. Commit message's wrong
18:22 Su-Shee left #perl6
18:24 tadzik weird. Anyway, podparser landed :0
18:24 tadzik :)
18:24 jnthn \o/
18:24 jnthn tadzik++ tadzik++
18:24 masak tadzik++!
18:25 [Coke] tadzik++
18:25 tadzik now it will get some testing, you want it or not :P
18:26 tadzik now, the blogging
18:26 * moritz wants
18:26 espadrine left #perl6
18:27 djanatyn masak: *poke*
18:27 djanatyn so, about using this HTML::Template library that I just installed with panda...
18:27 djanatyn do I use it just like I would in perl 5?
18:28 masak djanatyn: depends what you mean by "just".
18:28 masak the basics are the same: 'use HTML::Template;'
18:29 moritz perl6: class Foo { method !a() { say "!a" }; method public() { self!a }; Foo.new.public
18:29 p6eval niecza v8-9-g2bbb19a: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Unable to parse block at /tmp/Rxu4iVvJDN line 1:␤------> [32mclass Foo {[33m⏏[31m method !a() { say "!a" }; method public[0m␤Couldn't find final '}'; gave up at /tmp/Rxu4iVvJDN line 1 (EOF):␤------> [32mthod public() { se…
18:29 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "{"␤    expecting operator, ":", "," or "}"␤    at /tmp/Lj7J62cD5G line 1, column 25␤»
18:29 p6eval ..rakudo 922500: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
18:29 djanatyn Would I use "HTML::Template.new" instead of "HTML::Template->new"?
18:30 moritz djanatyn: well yes, you need to use the Perl 6 syntax. Look at the tests for example
18:30 masak djanatyn: you would.
18:30 djanatyn *oh*!
18:31 djanatyn that's what the "t" directory is :D
18:31 * djanatyn was looking for examples in the git repo, but couldn't find them
18:31 [Coke] aye, that'll have some samples, usually.
18:33 tadzik erm, did the merge actually get it to github?
18:33 Su-Shee joined #perl6
18:33 tadzik okay, it did
18:33 masak tadzik: it did if dalek reported it.
18:34 tadzik I just got confused by the commit messages
18:36 [Coke] as did I. has anyone done a pull to make sure it did what you think it did? ;)
18:36 tadzik the commit history on GH looks ok
18:37 * [Coke] writes a program to figure out which tests we're not running might be worth fudging.
18:42 djanatyn hmm..
18:42 djanatyn I feel stupid, but I can't figure out what I'm doing wrong :P
18:44 moritz [Coke]: are you aware of tools/update_passing_test_data.pl?
18:44 [Coke] moritz: does it run tests that are explicitly skipped in t/spectest.data ?
18:44 [Coke] (and no. ;)
18:45 moritz [Coke]: it runs all tests that a 'make spectest' doesn't run
18:47 djanatyn masak: perl6 seems to be complaining that the param method for the HTML::Template object I created needs two paramaters.
18:47 [Coke] thank you. (good thing that other thing only took 15 seconds to write based on another script. ;)
18:47 djanatyn I'm calling it as such: $template.param(FOO => $bar);
18:47 moritz and does .param actually want a named argument?
18:48 djanatyn not sure, how can I check?
18:48 moritz read the documentation (if it exists), read the tests
18:49 [Coke] moritz: I had stopped looking around in there when the last tool I found required a threaded p5. Thanks.
18:49 djanatyn Ah! Got it.
18:49 djanatyn Thanks for the advice, reading the tests helped.
18:49 [Coke] moritz: it seems to generate non-sensical output, e.g.: [ PA] ( 0/2  )
18:52 djanatyn ...hmm.
18:53 moritz [Coke]: have you seen the first 5 lines of output?
18:54 [Coke] Yes. so, the plan was ok, all tests passed, but it passed 0 out of 2 tests.
18:54 moritz that can happen if all 2 tests were skipped
18:55 envi left #perl6
18:55 moritz or if the harness miscounts
18:55 [Coke] .... fair enough.
18:56 tadzik wordpress--
18:57 djanatyn Is there any obvious reason why my template object's output method is returning "Any()"?
18:58 flussence usually means it's returning an undef thing
18:58 djanatyn Ah, that would kinda make sense.
18:58 moritz rakudo: class A { method !private() { } }
18:58 p6eval rakudo 922500:  ( no output )
18:58 moritz niecza: class A { method !private() { } }
18:58 p6eval niecza v8-9-g2bbb19a:  ( no output )
18:59 moritz rakudo: class A { submethod private() { } }
19:00 p6eval rakudo 922500:  ( no output )
19:00 moritz niecza: class A { submethod private() { } }
19:00 p6eval niecza v8-9-g2bbb19a:  ( no output )
19:00 thundergnat joined #perl6
19:02 birdwindupbird left #perl6
19:04 thundergnat masak: I tried out farm.pl. After about 50 rounds or so, fell into a loop where the player 1 turn never ended and I had to ctrl-c out. See https://gist.github.com/1117089 for the last "round".
19:05 sorear is player_1 an AI?
19:05 thundergnat sorear: no, me playing both players
19:05 dalek roast: 96fb4d9 | moritz++ | S02-builtin_data_types/int-uint.t:
19:05 dalek roast: make autoskipping smarter in int-unit.t
19:05 dalek roast: review: https://github.com/perl6/roast/commit/96fb4d9ab8
19:06 djanatyn Man, my code can't get much simpler than this.
19:06 djanatyn https://gist.github.com/1117074 <-- anyone know what's going on here?
19:07 djanatyn I'm not really sure why it's returning Any().
19:09 dalek rakudo/nom: 0f60583 | jonathan++ | src/Perl6/ (2 files):
19:09 dalek rakudo/nom: Avoid interpolation bug with private methods, introduced earlier today.
19:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0f60583f9c
19:10 dalek roast: abea019 | jonathan++ | S02-builtin_data_types/capture.t:
19:10 dalek roast: Unfudge some capture tests for nom.
19:10 dalek roast: review: https://github.com/perl6/roast/commit/abea019205
19:14 tadzik loliblogg'd! http://ttjjss.wordpress.com/2011/07/31/gsoc​-%E2%80%93-the-podparser-branch-has-landed/
19:16 mj41 left #perl6
19:16 dalek features: ed0395c | moritz++ | features.json:
19:16 dalek features: private methods, submethods
19:16 dalek features: review: https://github.com/perl6/f​eatures/commit/ed0395cb2a
19:18 pmichaud back from lunch
19:19 jnthn moritz: trusts could be another addition there too
19:21 dalek features: d19425f | moritz++ | features.json:
19:21 dalek features: trusts
19:21 dalek features: review: https://github.com/perl6/f​eatures/commit/d19425f937
19:22 moritz jnthn++
19:22 * jnthn likes seeing rows where nom beats master :)
19:24 arnsholt joined #perl6
19:24 tadzik it's good it's better at the LoLs :)
19:25 * tadzik encounters another double-bacon-alike bug
19:25 arnsholt left #perl6
19:25 tadzik given enough backtracking, is it possible for an action method to be executed twice, with the same arguments?
19:25 pmichaud yes, of course.
19:25 tadzik snap
19:26 sorear luckily, the grammar is set up quite deliberately to make backtracking over a general expression impossible
19:27 arnsholt joined #perl6
19:28 moritz tadzik: there's not much backtracking in the rakudo grammar, or in STD for that matter
19:29 tadzik for some reason my pod_content_toplevel passes twice for the same block
19:29 tadzik that's easily workaroundable, fwiw
19:29 tadzik try http://wklej.org/id/570460/ for example
19:29 pmichaud I don't know to what extent backtracking over whitespace has been avoided.
19:30 pmichaud (where "whitespace" means <.ws> which includes pod comments)
19:30 moritz tadzik: check $/.from and $/.to in the action method to be sure
19:31 jnthn tadzik++ # excellent blog post
19:31 tadzik moritz: I checked ~<pod_block>, can check the match to
19:32 djanatyn Wow, input is kind of weird.
19:32 djanatyn How could I grab a line from the user, and assign it to a variable, "$var"?
19:33 pmichaud djanatyn: my $var = prompt "enter a line, user"
19:33 djanatyn oh!
19:33 tadzik moritz: yes, exactly the same matches
19:33 moritz or  my $var = get; # without the prompt
19:33 tadzik how do I compare two objects in nqp, if they're the same thing?
19:33 pmichaud =:= should work
19:34 pmichaud if not, maybe pir::issame__IPP(...)
19:34 tadzik I feel like writing something like "How to live with NQP"
19:34 * flussence is rewriting progress-graph.pl from scratch using Chart::Gnuplot... just because.
19:35 tadzik okay, =:= works fine
19:35 flussence (well, I wanted to see if it can handle arbitrary dates properly)
19:37 dalek rakudo/nom: da964eb | tadzik++ | src/Perl6/Actions.pm:
19:37 dalek rakudo/nom: Workaround a backtracking issue, don't add the same block to $=POD twice
19:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/da964eb128
19:38 pmichaud that workaround could get very expensive :(
19:38 tadzik possibly, yes
19:38 pmichaud I'm guessing the problem is in statementlist
19:39 tadzik hmm, it could get pretty cheap if we iterate backwards
19:39 jnthn Not in the case you don't find it.
19:39 tadzik oh, true
19:39 jnthn hash of positions you saw POD blocks already would be cheap
19:39 pmichaud yes, then it's _really_ expensive.  O(n**2)
19:39 tadzik hmm
19:40 jnthn O(1) to check
19:40 pmichaud [
19:40 pmichaud | $
19:40 pmichaud | <?before <[\)\]\}]>>
19:40 pmichaud | [<statement><eat_terminator> ]*
19:40 pmichaud { self.mark_sinks($<statement>) }
19:40 pmichaud ]
19:40 pmichaud that backtracks over <.ws>
19:40 pmichaud (many times)
19:40 tadzik is it alike in STD?
19:40 pmichaud that is from STD.
19:40 tadzik oh
19:40 pmichaud well, it doesn't backtrack if LTM is in place.
19:40 pmichaud maybe.
19:41 tadzik jnthn: is there a way to get that identifier of the serialized object in nqp? Like Pod::Block<12459125>
19:41 tadzik We could make a hash of those, O(1) then
19:42 molaf_ left #perl6
19:42 pmichaud actually, I'm quite certain the above involves some potential backtracking.
19:42 tadzik anyway, the Action methods will be called anyway, which is a loss too (e.g. tables are fairly expensive ot parse)
19:43 pmichaud STD.pm6 might avoid it by memoizing the <.ws> locations.  Not sure if it memoizes the actual cursor/objects.
19:43 * tadzik wonders if there's any grocery store open on sunday, 10 PM
19:44 moritz not in .de
19:44 jnthn tadzik: See .perl, but it uses get_addr
19:44 thundergnat left #perl6
19:44 pmichaud might be able to use nqp::which
19:44 pmichaud er,  nqp::where
19:44 jnthn oh, which pmichaud++ has added an NQP op for :)
19:44 jnthn right, where.
19:45 tadzik that's a memory address?
19:45 pmichaud yes.
19:45 pmichaud it's the address (or unique ID) of the PMC
19:46 tadzik cool
19:48 tadzik works fine
19:49 pmichaud we probably need to find a way to avoid re-calling the action method, though.
19:49 tadzik memoization :)
19:50 pmichaud might be able to use <?MARKER ...>  or something like that.
19:51 pmichaud afk for a while, soccer match
19:52 dalek rakudo/nom: eef0851 | tadzik++ | src/Perl6/ (2 files):
19:52 dalek rakudo/nom: Optimize the already-added block lookup
19:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eef0851de8
19:58 MayDaniel joined #perl6
20:02 y3llow left #perl6
20:03 shachaf left #perl6
20:05 kaare_ left #perl6
20:06 y3llow joined #perl6
20:06 shachaf joined #perl6
20:07 dalek rakudo/nom: 0934d74 | jonathan++ | src/core/ (2 files):
20:07 dalek rakudo/nom: Add back some methods for coercing to a Capture.
20:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0934d74c60
20:07 dalek rakudo/nom: ac3cb1e | jonathan++ | src/Perl6/SymbolTable.pm:
20:07 dalek rakudo/nom: Stash sub-signature in Parameter object.
20:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac3cb1ea26
20:07 dalek rakudo/nom: 6a9ab9c | jonathan++ | src/binder/bind.c:
20:07 dalek rakudo/nom: Get nested signature handling in the binder basically working again.
20:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6a9ab9c517
20:07 dalek rakudo/nom: b5a8621 | jonathan++ | src/binder/bind.c:
20:07 dalek rakudo/nom: Eliminate an unused variable to avoid a warning.
20:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b5a862160f
20:15 * masak gets bleary-eyed from staring at listings of [[]][][[]] strings
20:17 moritz transliterate them to A and B or so
20:20 masak yes, or . and O
20:21 moritz l and 1 :-)
20:24 Su-Shee left #perl6
20:24 masak moritz: ;)
20:25 Su-Shee joined #perl6
20:28 Reaganomicon joined #perl6
20:38 SHODAN left #perl6
20:38 Moukeddar joined #perl6
20:39 Moukeddar Hello \o
20:39 rgrau joined #perl6
20:40 masak Moukeddar! \o/
20:41 Moukeddar how are you Sir?
20:41 masak thank you Sir, I am well. how about you, Sir?
20:41 Moukeddar Doing very well actually :) my Kind Sir
20:42 sorear Moukeddar! \o/
20:43 Moukeddar Hi sorear :), i'm happy to be here :)
20:43 masak Moukeddar: no Sir, you are the kind Sir... Sir. :)
20:44 Moukeddar what's cooking ?
20:44 Moukeddar Sir, Yes Sir :)
20:44 tadzik nom :P
20:44 masak lasagna.
20:44 masak mmmm.
20:44 Moukeddar mmmmmm.....Garfield
20:45 masak ...without Garfield :P
20:45 Moukeddar i mean , what are your current projects :)
20:45 Moukeddar and garfield is a badass :)
20:46 masak Moukeddar: I wrote an adventure game, and then I wrote a game for trading farm animals :)
20:47 Moukeddar Nice :), i'm writing an app to calculate prayer times using longitude and latitude  :)
20:47 steampunkey joined #perl6
20:48 masak Moukeddar: good. we need more Islamic influences in here.
20:48 masak Moukeddar: if you write it in Perl 6, make sure to share.
20:48 Moukeddar and i'm thinking of making it  a webservice :)
20:48 masak Moukeddar: also, have a look at DateTime in Rakudo.
20:48 Moukeddar perl6 ? that would be a good port :)
20:48 Moukeddar just need to finish it first, the astro calculations are baffling
20:49 Moukeddar hey, i'm using the comma in a good way now :)
20:50 MayDaniel left #perl6
20:51 masak Moukeddar: so you are :)
20:51 masak Moukeddar++
20:52 Moukeddar thanks :)
20:52 masak karma Moukeddar
20:52 aloha Moukeddar has karma of 3.
20:53 Moukeddar karma? what's that?
20:53 soh_cah_toa left #perl6
20:55 Moukeddar i'm downloading OpenSuse, sounds like the right distro to me :)
20:56 shinobicl joined #perl6
20:56 shinobicl hi
20:57 Moukeddar shinobi , oh that was a nice game :)
20:57 shinobicl yes it was :)
20:57 shinobicl i have a dilemma
20:57 Moukeddar why is that?
20:57 shinobicl from Jul-7-2011 to Jul-14-2011
20:57 shinobicl how many weekdays are?
20:58 Moukeddar weekdays?
20:58 masak shinobicl: depends how you count the endpoints, I guess.
20:58 Moukeddar 8 days if you cound the start and end
20:58 shinobicl ah ok
20:58 shinobicl and from Jul-7-2011 to Jul-7-2011?
20:59 shinobicl one or zero?
20:59 Moukeddar wut?
20:59 masak shinobicl: you need to define the question more clearly for there to be clear answers.
20:59 noganex_ joined #perl6
20:59 Moukeddar that's one day
20:59 shinobicl one day.. ahmm ok..
20:59 masak shinobicl: when you say "from .., to ...", what do you mean? what will you use this information for?
20:59 Moukeddar sure it's a dilemma
20:59 shinobicl the thing is excel thinks like Muokeddar
20:59 masak no, it's not a dilemma.
20:59 masak it's an underspecified problem :)
20:59 shinobicl MS Excel has NETWORKDAY function
21:00 shinobicl that reasons like Moukeddar did
21:00 shinobicl but i'm not convinced yet
21:00 Moukeddar that's how i count :)
21:00 masak if the question is "how many workdays are in this interval?", then I agree with Moukeddar and Excel.
21:00 Moukeddar thanks to mom ;)
21:00 masak if the question is something else, then I may not agree. :)
21:01 Moukeddar hope that helps shinobicl
21:01 shinobicl i want to implement a funtion that says "how many workdays until some date"
21:01 shinobicl with the Excel logic, it should be "There is one day from Friday to Friday"
21:01 Moukeddar then you calculate the diff than add 2 : the start and the end
21:01 Su-Shee shinobicl: work day or week day?
21:01 shinobicl "two days from Friday to Monday"
21:01 shinobicl workday
21:02 Moukeddar it's the same day
21:02 Moukeddar so not 2
21:02 noganex left #perl6
21:02 Su-Shee shinobicl: that's defined by law per country.
21:02 Moukeddar Su-Shee, didn't know that
21:02 shinobicl oh, didn't knew that... But i need to stick to one logic
21:02 Su-Shee and I would expect any software actually calculating _work_ days to obey that definition
21:02 shinobicl so i guess i should stick to what Excel says
21:03 Moukeddar that would be  a good decision
21:03 sorear presumably Excel is doing things like marking July 4 as "not a work day" even if it's a Wednesday
21:03 sorear important subtleties
21:03 Su-Shee I'm pretty sure excel can distinguish for example wether sunday counts as workday or friday does not.
21:03 shinobicl Oh, no, you have to speify a range with cells speifiyng the holidays
21:03 Su-Shee sorear: exactly
21:03 Moukeddar depends on the PC culture
21:04 sorear at least we don't have to deal with the French (10 day/week) and Russian (5) Revolutionary Calendars anymore...
21:04 shinobicl in Excel the function is NETWORKDAYS(start,end,holidays)
21:05 Su-Shee shinobicl: you're touching heavy business logic with "work days", be careful.
21:05 benabik left #perl6
21:05 kolibrie left #perl6
21:05 benabik joined #perl6
21:05 shinobicl yes, i know. I guess the safest default is using Excel, assuming that lot's of business logic around the world is built around spreadsheets
21:06 Moukeddar Good luck shinobicl
21:06 jferrero left #perl6
21:06 Su-Shee also, usally you define what counts as a year, then what counts as "weekend days", then you load national holidays, load the exceptions by region and _then_ you can count workdays
21:07 shinobicl su-shee, that's what i have until now: https://github.com/shinobi/TaskSched​uler/blob/master/WorkdayCalendar.pm
21:07 Su-Shee shinobicl: if you'd do it for germany, the work day of a year depend on wether a region is catholic or protestant ;)
21:07 shinobicl i can use the workdays using holidays, or not.
21:08 shinobicl and specify the workweek too
21:08 Su-Shee I would make holidays a role externally.
21:08 * [Coke] returns from driving his son to a ... not a playdate. jam session?
21:08 shinobicl i work in as support in a financial software
21:08 Su-Shee same for weekends
21:08 shinobicl each country has it's own calendar
21:08 shinobicl and workweeks
21:09 shinobicl i think some arabs has the weekend in Thu and Fri instead of Sat Sun like most of the world
21:09 Su-Shee shinobicl: that's only the christian world.
21:09 sorear Su-Shee: is that a function of the $TOP_LEVEL_ADMINISTRATIVE_SUBDIVISIONS?
21:09 sorear (Bundes right?)
21:09 * [Coke] works someplace where knowing what is a work day in a particular legal locale would be very useful. and it's too complicated, so we ignore it.
21:09 MayDaniel joined #perl6
21:10 [Coke] (probably because there are too many jurisdictions)
21:10 Moukeddar [Coke], seriously?
21:10 Su-Shee sorear: here, yes. I don't know who of all the institutions actually does it ;)
21:10 sorear that would be useful information to have in the zoneinfo files
21:10 sorear those *already* define a 2D map (jurisdiction x year -> offset)
21:10 sorear and it's more than just the offset, as they do procedural stuff like DST shifts
21:10 Su-Shee I think it actually is in de/DE, ch/DE and at/DE locales..
21:11 [Coke] Moukeddar: yes.
21:11 sorear is ch/DE the same as de_CH?
21:11 sorear lang=de country=ch
21:12 Su-Shee yes, I just scrambled it while typing :)
21:12 shinobicl well... i'm going to remake my workdaycalendar class/role to adopt the excel way of calculating stuff
21:12 shinobicl thanks for the feedback :)
21:14 Su-Shee I'm pretty sure you get the correct information via locale settings. you should load those..
21:14 shinobicl but for holidays too?
21:14 Su-Shee for holidays exactly.
21:14 shinobicl and how do i get acess to locale info in perl6?
21:15 Su-Shee shinobicl: I have no idea :)
21:15 Coleoid joined #perl6
21:16 shinobicl i'll keep the locale stuff in my TODO list. Thanks su-shee
21:16 Su-Shee shinobicl: and 2011/05/07 is one of the worst date formats to use ;)
21:16 shinobicl y m d ?
21:16 Su-Shee shinobicl: in your culture. I can't parse that.
21:17 shinobicl what do you suggest then?
21:17 Su-Shee because I can't distinguish properly wether 05/04 is may, fourth or fifth of april
21:17 Su-Shee shinobicl: use one of the standards but let users input it in a couple of common formats
21:17 benabik Generally I see YMD written with -, as in 2011-07-31
21:18 shinobicl i'll improve on that
21:19 Coleoid is now known as Coleoid_
21:19 Su-Shee shinobicl: the date format atom feeds use rfc26something I think or iso26whatever for example. it also contains the timezone information you need
21:19 jferrero joined #perl6
21:19 Su-Shee shinobicl: use something giving you sorting for the cheap :)
21:20 kthakore_ hi perl6
21:21 tadzik hello kthakore_
21:22 masak hi kthakore_
21:22 Coleoid_ Hi, kthakore_.
21:23 Coleoid_ Good *, #perl6.
21:23 masak good *, Coleoid_
21:23 masak sorear: July 4 is a workday in Sweden, provided it's a weekday.
21:25 masak I still don't think shinobicl has nailed down the definition of "number of workdays between day1 and day2" enough.
21:25 benabik Does `has $.attr` default to ro or rw?
21:25 masak even if workday is given the simplest possible definition of "not a Saturday or a Sunday", it's still ambiguous whether to count day2 among the workdays.
21:26 masak benabik: the accessor defaults to ro.
21:26 Coleoid_ Wanted to delurk for several notes:  The features matrix is BOSS.  The Rakudo Star release notice has several missing data.
21:27 benabik masak: And how does one write a custom setter method?  Is it returning an lvalue with an appropriate STORE method?
21:28 masak benabik: ideally, you'd just make any method 'is rw'.
21:28 masak benabik: as in 'method foo() is rw { ... }'
21:28 masak don't think that works yet in Rakudo.
21:28 benabik masak: How would you do validation on the value?
21:28 masak but I also think that all methods are 'is rw' by default :)
21:28 benabik masak++
21:28 masak benabik: with a .STORE method, yes.
21:28 masak benabik: you'll probably have lots more luck getting that to work in nom.
21:29 jnthn Certainly. nom knows about 'is rw' too
21:29 masak \o/
21:29 benabik masak: More a spec question than a "me getting it to work" question.  :-D  I'm trying to remember how things work as I watch them get implemented.
21:29 masak everything is just so... perfect... in nom-land :)
21:30 Moukeddar lasania
21:30 masak benabik: I see. that's fine, too.
21:30 Moukeddar lazania
21:30 masak Moukeddar: lasagna.
21:30 Moukeddar ah, right
21:30 tadzik lazania!
21:30 shinobicl masak: i have defined that the amount of days between 2 days is the same as day1+amount = day2
21:30 jnthn masak: not perfect yet :P
21:30 benabik lazania++
21:30 masak Moukeddar: the spelling is Italian, where 'ng' is pronounced 'ny'.
21:31 masak jnthn: sssh! don't ruing my daydream! :P
21:31 Moukeddar thanks for the Tip :)
21:31 jnthn masak: nom is SO wonderful that occasionally a rainbow burts forth from the REPL!
21:31 masak er, I meant 'gn', of course.
21:31 sorear masak: that's what I meant.  Actually I'm suprised, I expected Excel to be more UScentric.
21:31 shinobicl that's way the Excel way doen't make sense to me. But it's Excel, it can't be THAT wrong.
21:31 jnthn *bursts
21:31 masak jnthn: I've been wanting the rainbow-REPL feature for *ages*! \o/
21:32 jnthn .oO( well, we have ANSI::Term::Color... :) )
21:32 benabik Shouldn't it be called nyan instead of nom then?
21:32 benabik The phrase "Excel can't be THAT wrong" makes my head hurt.
21:33 tadzik jnthn: it works in nom too :)
21:35 benabik masak: Actually, I really hope methods don't default to `is rw`, otherwise people will be accidentally breaking encapsulation left and right.  Making `return $!private_var` allow people to alter $!private_var is probably not a good idea.
21:35 jnthn benabik: It defaults to ro
21:35 jnthn er, readonly
21:35 benabik jnthn: \o/
21:36 jnthn nom: sub foo() { my $a = 42; $a }; foo() = 100
21:36 p6eval nom: OUTPUT«Cannot assign to a readonly variable or a value␤current instr.: '_block1002' pc 88 ((file unknown):63458626) (/tmp/2SSnj7Ctv8:1)␤»
21:36 jnthn nom: sub foo() is rw { my $a = 42; $a }; foo() = 100
21:36 p6eval nom:  ( no output )
21:37 Moukeddar masak, what's a good way to optimize heavy calculations?
21:37 Moukeddar using parallel maybe?
21:37 masak Moukeddar: first off, (1) make it run, (2) make it run correctly, (3) make it fast.
21:37 masak Moukeddar: there's something called "premature optimization" that you need be aware of.
21:38 Moukeddar i'm at step 2 , premature ? like using No-SQL ?
21:38 masak probably.
21:38 Moukeddar is it good?
21:38 masak usually the choice of algorithm is the most important choice you make for speed.
21:39 masak after that, you measure, and you apply fixes judiciously.
21:39 Moukeddar there's nothing i could optimize there, just plain math calculations
21:41 masak are we still on the latitude/longitude thing?
21:41 Moukeddar yes
21:41 masak that shouldn't be too computationally heavy.
21:42 Moukeddar it is a bit heavy
21:44 Psyche^ joined #perl6
21:44 Moukeddar i first need to fix something, it returns the wrong Equation of Time
21:47 masak yup still at step 2... :)
21:47 Patterner left #perl6
21:47 Psyche^ is now known as Patterner
21:48 tadzik g'night #perl6
21:49 jnthn night, tadzik
21:51 Moukeddar true
21:52 djanatyn Uhh, I made a game thing in pure perl6 :D
21:53 benabik Nom seems a little funny.  It's grinning all the time.  :D
21:54 djanatyn You mean the branch of rakudo?
21:55 wolfman2000 left #perl6
21:56 benabik djanatyn: Yes.  `git grep ':D' | wc -l` == 288
21:56 masak TimToady: there's this algorithm: http://okmij.org/ftp/Scheme/random-tree-node.scm -- so if it's possible to arrange all the valid balanced strings into a BST, it's also possible to select them randomly and uniformly.
21:56 TimToady masak: I have a solution for you
21:56 masak o.O
21:57 masak djanatyn: you did? show us!
21:57 masak TimToady: so, where's the solution? :)
21:57 djanatyn masak: one sec
21:57 TimToady https://gist.github.com/1117259
21:58 TimToady runs much faster under niecza
21:58 djanatyn Umm, how could I say, not "eq"?
21:58 Mowah left #perl6
21:58 djanatyn as in, return true if string "foo" is *not* equivalent to string "bar"
21:58 djanatyn without using unless ;)
21:59 masak TimToady: the first part looks like some kind of dynamic programming.
21:59 TimToady it's just setting up the triangular matrix I mentioned earlier today
21:59 jnthn djanatyn: ne
22:00 masak I must've missed that.
22:00 masak TimToady: so it's basically using a triangular matrix of weights to steer the random choices?
22:00 TimToady http://irclog.perlgeek.de/​perl6/2011-07-31#i_4196730
22:00 Tene djanatyn: ne
22:01 djanatyn Tene: thanks
22:01 djanatyn jnthn: thanks
22:01 Tene oh, EtooLATE
22:01 drbean joined #perl6
22:01 TimToady masak: correct, you just have to construct the weights from the end
22:02 masak ah, it was Aron who figgered it out. :)
22:02 masak Aron++ TimToady++
22:02 Moukeddar left #perl6
22:02 TimToady you can run the lop to 10000 in niecza in a reasonable amount of time
22:02 * masak tweets the solution
22:02 TimToady and the statistics appear to even out
22:02 * djanatyn pastebins his *cough* game
22:02 djanatyn It looks like Perl 5 >_>
22:02 djanatyn well, knda
22:02 djanatyn *kinda
22:03 TimToady in fact, I can generate 100000 of them in 11 seconds on my machine
22:03 TimToady (using niecza)
22:04 djanatyn https://gist.github.com/1117266 <-- take a look at the array, @map
22:05 djanatyn It's...messy-line-noise-perl. :)
22:05 masak djanatyn: ooh!
22:05 masak djanatyn: hm, you're depending on a parsing bug in Rakudo.
22:05 masak djanatyn: using @map before declaring it.
22:05 djanatyn heh. :)
22:06 masak djanatyn: for future portability, I'd recommend not doing that...
22:06 masak anyway, kudos!
22:06 djanatyn Yeah, doesn't seem too difficult to just move @map further up.
22:06 benabik djanatyn++
22:06 djanatyn Well, it's still really messy.
22:06 djanatyn I mean, look at how it handles walking.
22:07 masak ah! so the level is hidden to the player, and she has to guess her way forward? nice.
22:07 masak I wrote a game like that once :)
22:07 masak called it BONQ.
22:07 djanatyn Hah :D
22:08 djanatyn I should add a method tht shows you the possible exits.
22:08 masak djanatyn: my $new_y = $!ypos; given prompt '> ' { when /north/ { $new_y = $!ypos - 1 } # etc
22:11 masak just a suggestion. ;)
22:11 djanatyn thanks :)
22:11 * djanatyn is really trying to make his code cleaner, more maintainable, and more readable.
22:11 djanatyn So I'm migrating from p5 to p6 ;)
22:13 masak \o/
22:15 djanatyn masak: What do you write Perl 6 in, vim?
22:18 masak djanatyn: yes.
22:20 djanatyn Woah, wait a second here.
22:20 djanatyn subroutine declarations include parameters? O_o
22:20 djanatyn So, no more "my ($self) = @_;" and all that?
22:20 djanatyn Woah!
22:20 masak :D
22:20 djanatyn I mean...*woah*
22:20 djanatyn that's crazy
22:20 masak pretty neat.
22:20 djanatyn I feel like I should go tell all my friends.
22:21 djanatyn Of course, they don't write Perl. :)
22:21 masak and that's just the beginning. trust me.
22:21 djanatyn I've only been playing with Perl 6 for what, two days?
22:21 djanatyn I already feel obligated to help, because I like awesome things.
22:21 djanatyn And Perl 6 is that.
22:22 djanatyn obligated isn't the right word, though. Do you understand what I mean?
22:22 djanatyn I want to do *something* make this awesome thing more tangible.
22:24 masak djanatyn: compelled.
22:25 djanatyn Yes. :D
22:25 djanatyn And wow, that's why I could just use @array[0][0] instead of $array[0][0]
22:25 djanatyn sigils don't matter o_o
22:26 masak well, they do.
22:26 masak but they matter in a simpler way than Perl 5.
22:26 masak @array is always @array.
22:26 masak even if you index an element.
22:27 rgrau left #perl6
22:27 masak djanatyn: also, in Perl 6, you can do @array[ 0 ; 0 ]. provided you declare @array to be two-dimensional.
22:28 djanatyn ...umm, wow. That would make things a little easier :D
22:28 TimToady NYI though
22:28 masak (doesn't work in Rakudo or Niecza yet, though)
22:28 * djanatyn had to mess with two dimensional arrays a lot when working on his perl6 roguelike.
22:28 masak let's see who gets it first :P
22:28 masak my bets are on Niecza.
22:28 djanatyn It was somewhat of a pain in the neck to load a raw text file into a two dimensional array.
22:28 djanatyn Which was really just an array full of anonymous arrays.
22:28 masak right.
22:29 djanatyn I had a bunch of text files with characters seperated by spaces.
22:30 djanatyn I used split(' ',$line) to chop the charaters up into elements in an array, and created a new anonymous array for each line.
22:30 djanatyn it got a little messy, and when I woke up it was hard to tell what was going on.
22:30 djanatyn I'm sure that a talented perl 5 programmer could have implemented a better solution, or even the same solution with cleaner code, though.
22:31 masak it mostly comes down to practice, IMHO.
22:32 Tene .ie
22:34 pochi left #perl6
22:35 masak Tene: Ireland?
22:37 * masak *finally* found the farm.pl trading bug himself
22:38 masak riddle: when does 59 min 6 come out as 59?
22:38 djanatyn Uhh. Sorry about that. ^_^;
22:38 djanatyn masak: He was agreeing with you.
22:38 jnthn masak: When one is a string.
22:38 jnthn or both
22:38 jnthn :)
22:39 djanatyn {.ie} is lojban (a constructed language based on logic) for "agreement"
22:39 masak jnthn: right. "59" min 6 in this case.
22:39 djanatyn Tene does not live in Ireland :)
22:39 masak oh. Lojban :)
22:39 masak I'm aware of it, though I don't speak it.
22:39 masak why did they pick Ireland for indicating agreement? :P
22:43 masak this bug could've been averted if we'd had typed hashes :)
22:46 Tene Yeah, djan is right.  I know him primarily from the lojban irc channels, so I got a bit confused about which channel i was in.
22:46 masak :)
22:46 masak you Lojbanists. always doin something crazy
22:47 masak 'night, #perl6
22:47 masak left #perl6
22:47 wolfman2000 joined #perl6
22:51 jnthn Teaching tomorrow...should sleep o/
23:00 MayDaniel left #perl6
23:01 benabik nom: [ne] "a"
23:01 p6eval nom: OUTPUT«chaining reduce NYI␤current instr.: 'die' pc 576872 (src/gen/CORE.setting.pir:135292) (src/gen/CORE.setting:290)␤»
23:01 benabik Bah.
23:02 benabik If I'm reading src/core/Stringy.pm:23 correctly `[ne] "a"` will be true…  Which seems wrong.
23:03 * benabik doesn't know how to trigger one arg infix without [] meta-op.
23:03 [Coke] rakudo: [ne] "a"
23:03 p6eval rakudo 922500:  ( no output )
23:03 [Coke] rakudo: say [ne] "a"
23:03 p6eval rakudo 922500: OUTPUT«Bool::True␤»
23:03 [Coke] yah, I think false is a better answer there.
23:03 benabik rakudo: say [eq] "a"
23:03 p6eval rakudo 922500: OUTPUT«Bool::True␤»
23:04 benabik ^^^ That's my problem with it.
23:04 benabik rakudo: my @a = "a"; say [ne] @a; say [eq] @a
23:04 p6eval rakudo 922500: OUTPUT«Bool::True␤Bool::True␤»
23:06 benabik Also, http://perl6.org/compilers/features says nom doesn't do CATCH, but it looks like jnthn implemented it in 0dc9006
23:10 pochi joined #perl6
23:17 PacoLinux joined #perl6
23:25 [Coke] one of the disadvantages of having a features list not based on the actual spectest run.
23:26 [Coke] benabik: you have commit rights to github/perl6, no?
23:27 fbass joined #perl6
23:27 fbass left #perl6
23:28 fbass joined #perl6
23:34 lue joined #perl6
23:35 rdesfo joined #perl6
23:38 wamba left #perl6
23:38 Chillance left #perl6
23:38 tokuhirom joined #perl6
23:42 whiteknight joined #perl6
23:46 [particle]1 joined #perl6
23:47 [particle] left #perl6
23:49 benabik [Coke]: I don't think so.  I've just hacked on parrot to date
23:53 pmichaud S03 is pretty clear that one-arg [ne] returns True.
23:53 pmichaud Same for [!=]
23:53 pmichaud rakudo:  say &infix:<ne>('a');
23:53 p6eval rakudo 922500: OUTPUT«Bool::True␤»
23:53 pmichaud nom:  say &infix:<ne>('a');
23:53 p6eval nom: OUTPUT«Bool::True␤»
23:53 pmichaud S03:4462
23:54 pmichaud benabik: what's your github id?
23:57 lue I wish Perl6 would convert fractional parts of numbers from decimal to other radices, just like :16<> and friends does going to decimal...
23:57 pmichaud lue: example?
23:58 pmichaud rakudo:   say :2("0.1");
23:58 p6eval rakudo 922500: OUTPUT«0.5␤»
23:58 pmichaud looks like it works to me :-)
23:59 lue no, base 10 *to* other bases [imagine .fmt("%x") working with fractional numbers, not just integers]

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

Perl 6 | Reference Documentation | Rakudo