»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:03 shinobicl left 00:21 PacoLinux__ joined, PacoLinux left, PacoLinux__ is now known as PacoLinux
dalek kudo/nom: 0dc9006 | jonathan++ | src/Perl6/Actions.pm:
Unbust CATCH enough so that it doesn't hang and passes all the catch.t that master did.
00:21
kudo/nom: d8c3c74 | jonathan++ | t/spectest.data:
Another passing test file.
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.
jnthn sleep & 00:23
00:33 tokuhirom joined
colomon Util++ 00:40
00:42 PacoLinux left 00:48 nbrown left 00:49 shinobicl joined
tadzik mathw: pong 00:52
oops, nvm
00:54 nbrown joined 00:56 soh_cah_toa left 00:57 soh_cah_toa joined 01:04 shinobicl left 01:05 tokuhirom left 01:06 tokuhirom joined 01:07 shinobicl joined
shinobicl I think i have finished my WorkdayCalendar module.... suggestions and criticism are _very_ velcome.. github.com/shinobi/TaskScheduler/b...alendar.pm 01:08
01:11 tokuhirom left
flussence using ternaries to return True/False is a bit pointless... just use prefix ?/! 01:11
shinobicl Ehmmm,, how's that? 01:12
flussence (or not/so if you prefer)
shinobicl i'm still learning,,, any suggestion is welcome. If it is more readable, the better
flussence you're using a boolean value to calculate whether to return... another boolean
shinobicl Ah, yes :) That's true
Iill fix it 01:13
I mean, "I'll"
tadzik jnthn: still segfaults :/ 01:17
will push it anyway soon 01:18
jnthn: "and my beer class is empty", didn'tcha mean "glass"? Or maybe not... :) 01:20
flussence (oh, I'm getting useful results from this script now) 01:22
gist.github.com/1116234 so far if anyone wants a look; it's not quite the format needed to draw that graph 01:23
oh wait, it is
the graph output's a bit blocky atm :) 01:24
tadzik flussence: anything to show? 01:33
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:34
I'll leave this running overnight, it might look more interesting by tomorrow :) 01:35
01:35 shinobicl left
flussence i.imgur.com/iBnEL.png if anyone's curious 01:36
01:38 benabik left
tadzik looks nice :) 01:42
01:46 daniel-s joined 01:50 daniel-s left 01:51 daniel-s joined
[Coke] flussence: is that on nom or master? 01:52
flussence nom
01:53 daniel-s left, daniel-s joined 01:56 woosley joined 01:58 daniel-s left, daniel-s_ joined
dalek kudo/podparser: 7a3a394 | moritz++ | t/spectest.data:
more passing test files, jnthn++
02:00
rakudo/podparser: 90f996e | moritz++ | / (2 files):
rakudo/podparser: move most of the build instructions into a separate INSTALL file
02:00 dalek left, dalek joined, ChanServ sets mode: +v dalek 02:01 benabik joined
tadzik hihi 02:02
02:02 daniel-s__ joined, daniel-s_ left
tadzik anyway, jnthn, the podparser HEAD now segfaults, either when trying to document subs or attributes 02:03
02:06 daniel-s__ left 02:07 daniel-s__ joined 02:11 daniel-s__ left, daniel-s__ joined 02:15 daniel-s__ left, daniel-s__ joined 02:20 daniel-s__ left, daniel-s__ joined 02:24 _daniel-s__ joined, soh_cah_toa left 02:25 daniel-s__ left 02:26 wjguo left, envi joined 02:29 daniel-s joined, _daniel-s__ left 02:33 daniel-s_ joined, daniel-s left 02:37 daniel-s_ left, daniel-s__ joined 02:42 _daniel-s__ joined, daniel-s__ left 02:46 daniel-s joined 02:47 _daniel-s__ left 02:49 sftp left, Instil left 02:51 daniel-s_ joined, daniel-s left 02:53 sftp joined 02:55 daniel-s_ left, daniel-s_ joined
dalek ast: 878f33b | Coke++ | / (9 files):
nom fudging
02:56
kudo/nom: b7a2185 | Coke++ | t/spectest.data:
run more (fudged) spec tests
02:58
02:59 colomon left 03:00 daniel-s__ joined, daniel-s_ left 03:01 gjfjfjh joined 03:02 gjfjfjh left 03:04 _daniel-s__ joined, daniel-s__ left 03:08 daniel-s joined 03:09 _daniel-s__ left 03:13 daniel-s left, daniel-s_ joined 03:14 colomon joined 03:17 daniel-s_ left, daniel-s__ joined
[Coke] Files=331, Tests=9254 03:18
(nom) 03:19
lots of non-zero exit statuses, though. (and one failure that seems to have crept in)
03:19 Instil joined
tadzik [Coke]++ 03:20
03:22 daniel-s__ left, _daniel-s__ joined
[Coke] tadzik: eh. I'm not writing any real code. 03:22
but thanks.
03:23 Su-Shee_ joined 03:26 _daniel-s__ left, _daniel-s__ joined, Su-Shee left 03:30 daniel-s joined 03:31 _daniel-s__ left, orevdiabl left 03:32 revdiablo joined, revdiablo left, revdiablo joined 03:35 daniel-s left, daniel-s joined 03:39 daniel-s_ joined 03:40 daniel-s left 03:43 Chillance left 03:44 daniel-s_ left, daniel-s_ joined 03:47 Chillance joined 03:48 daniel-s__ joined 03:49 daniel-s_ left
dalek ast: b4f7c45 | Coke++ | / (2 files):
nom (un)fudging
03:52
03:53 _daniel-s__ joined, daniel-s__ left 03:57 _daniel-s__ left, daniel-s joined 04:01 localhost joined, daniel-s left, daniel-s joined 04:04 localhost left 04:06 daniel-s left, daniel-s_ joined 04:09 kolibrie left 04:10 daniel-s_ left, daniel-s_ joined 04:11 woosley left 04:15 daniel-s_ left, daniel-s__ joined 04:19 localhost joined, _daniel-s__ joined 04:20 daniel-s__ left 04:23 kolibrie joined 04:24 daniel-s joined, _daniel-s__ left 04:28 daniel-s_ joined, daniel-s left 04:32 daniel-s__ joined 04:33 daniel-s_ left 04:35 kaare_ joined 04:37 _daniel-s__ joined, daniel-s__ left 04:41 Mowah joined, _daniel-s__ left, daniel-s joined
dalek ast: d3515cb | Coke++ | S0 (7 files):
nom fudging.
04:45
04:46 daniel-s_ joined
tadzik Term::ANSIColor works on nom without changes 04:46
[Coke] sweet
that should get us a few more dozen tests.
zz
04:46 daniel-s left
tadzik dream of PASSes :) 04:47
04:50 daniel-s_ left
dalek kudo/nom: 5361b09 | Coke++ | t/spectest.data:
run more (fudged) spectests.
04:50
05:02 Chillance left 05:04 ZaphrodZenovka left
dalek ecza: f58916b | sorear++ | src/ (2 files):
Name refactor part 2, package definition contexts
05:16
djanatyn I'm back :D
sorear Hello djanatyn!
djanatyn on my computer with Rakudo
Just had a wonderful experience.
My brother and I were pondering how difficult it would be to play through "New Super Mario Bros. Wii" in one session. 05:17
So, we beat it, from start to finish. It took us from 7:55pm-1:05am.
It was pretty intense, at points.
tadzik (:
djanatyn Anyway, I'm reading to start writing some Perl 6 now. 05:18
tadzik gist.github.com/1116439 # showoff :) 05:25
djanatyn Nice shell.
tadzik (:
sorear djanatyn: have you played with niecza yet? 05:26
djanatyn tadzik: That's pretty cool: :D
sorear: nope. I actually haven't even played with Rakudo yet.
How would I go about installing HTML::Template?
ooh, panda 05:27
sorear tadzik would know
but not I
djanatyn: you've talked in the past about languages having inaccessible elites. What did you mean by that? 05:28
djanatyn Oh, no.
sorear Oh YES
djanatyn TimToady said that. I think he was joking, being that he is, uhh...Mr. Wall. 05:29
tadzik Mr. Wall inaccessible? News.
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.
No, he was contrasting it. :) 05:30
Also, woah. We can go ahead and declare arrays without quoting?
sorear You mean my @foo = (1,2,3) versus my @foo = 1,2,3? 05:31
djanatyn Yep.
sorear Yes
djanatyn Also, what is @foo[*-1]?
sorear Last element
djanatyn The last element in an array? That syntax looks kind of weird.
why "*-1"?
why not @foo.last or somethign? 05:32
sorear * becomes the array length
djanatyn Oh! I see.
sorear you could just as well write @foo[*-2] or @foo[* div 2]
djanatyn That's very cool.
sorear *-2 is actually an anonymous code block 05:33
rakudo: say (*-2)(50)
p6eval rakudo 922500: OUTPUT«48␤»
sorear to a first approximation, any expression written using only unary and infix operators will become a code block if it contains a * 05:34
05:35 am0c left
djanatyn I see how hashes work, now. 05:36
05:36 Mowah left
sorear Oh? 05:36
djanatyn %hash{foo} can't be used, because that calls subroutine foo, and uses the return value as the key.
sorear Ah. Yes, exactly. 05:37
djanatyn %hash{'foo'} works, and is the same as %hash<foo>
wasn't it possible to leave out the quotes for a key in perl 5?
tadzik it was
sorear Yes
djanatyn I thin I recall myself doing that a couple times.
tadzik in Perl 6 they don't autoquote
well, not in {}. But in <>, yes
sorear Perl 6 generally has less magic
it tries to be more consistant and learnable
djanatyn Interesting.
I'm really starting to like Perl 6. :) 05:38
TimToady too
djanatyn I'd love to join the development team, but there's not much I can do.
I
TimToady note that %hash<foo bar> is a slice of two subscripts
tadzik djanatyn: you're wrong
djanatyn I'm not a good programmer, and I certainly can't write a compiler.
I can maybe write some applications, though.
TiMBuS im a terrible programmer and even i wrote one
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
TimToady anyone using Perl 6 and finding problems is good
TimToady is home now btw
djanatyn TimToady: That's good.
How was your drive back?
tadzik <obligatory Perl 6 MMORPG> post
djanatyn tadzik: I really enjoyed that post :)
I read it last night.
TimToady uneventful, which is good :)
djanatyn Ah, that's awesome. 05:40
sorear wonders why so many people have told themselves they can't write compilers
tadzik o, good :)
TimToady should have told himself that, but didn't :)
tadzik notice, that unlike RPG, a road from a warrior to a mage is really easy
djanatyn: have you seen the Perl 6 settings library?
TimToady
.oO(Rocket Propelled Grenades?) .oO(Report Program Generator?) :)
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.
tadzik: Nope.
tadzik I'll show you something
sorear djanatyn: Tadeusz' identity interests you? *deliberately misses point*
tadzik github.com/rakudo/rakudo/blob/mast...et/INET.pm 05:42
djanatyn: see above
just Perl 6, no Black Compiler Magic
djanatyn tadzik: ?
tadzik yes, really :)
djanatyn No, I'm just confused.
What were you referring to when you said "see above"? 05:43
tadzik see the link I pasted above my "see above"
TiMBuS who the heck wrote that mess D:
djanatyn Hey, I was going over Sockets in my copy of the camel book today :D
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
djanatyn I've mostly skipped over that section
djanatyn checks the link out
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 :)
TiMBuS hey it was kinda hard!
djanatyn well...looks mostly understandable, with a lot of weird names. 05:45
I'm also not sure exactly what it is, or the purpose.
tadzik in the nom branch we're currently developing, a huge work ahead consists of filling the new settings library
things like Socket::Inet.pm need moving and adjusting in a few places. That moves the work forward 05:46
(moving from master to nom)
sorear I object to this notion that "some stuff is easy"
tadzik (iirc that it's not yet there)
djanatyn so what is the eventual goal?
sorear almost all of it is easy
djanatyn a perl6 compiler written in C? :)
tadzik nope :)
sorear djanatyn: world domination. duh.
tadzik sorear++
djanatyn ah. 05:47
So, a perl6 compiler written in perl6.
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
TimToady a perl6 runtime in Go would be cool
tadzik erm, djanatyn : ^
djanatyn ...isn't rakudo kinda sorta written in perl 6?
tadzik it is
djanatyn TimToady: Ooh, that is interesting.
sorear kind of sort of
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.
TiMBuS tadzik, what needs fixing in socket::inet
tadzik TiMBuS: dunno
sorear which is a subset of Perl 6 that can be compiled without requiring Rakudo
tadzik I'm a bit outdated when it comes to nom awareness
TiMBuS is it the fact i abused BUILD/new? its probably that
tadzik mebbe
I like the abuse you use
sorear the builtin libraries are of course written in Perl 6
tadzik TiMBuS: there's no IO::Socket in nom at all it seems 05:49
TiMBuS well i wouldnt want to dirty a blank slate, 05:50
djanatyn ...huh.
TiMBuS ill see what i can do :p
djanatyn I wonder how difficult it would be to write a Scheme compiler in Go.
tadzik ++TiMBuS :)
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
Looking back at Go, it seems like I just treated it as C without semicolons. But, it seems really interesting and useful now.
But anyway, back to p6 ;)
So, you can put code blocks in interpolating double-quotes now? 05:52
sorear Yes
niecza: say "2 plus 2 makes {2+2}"
p6eval niecza v8-7-gf58916b: OUTPUT«2 plus 2 makes 4␤»
djanatyn awesome :D 05:53
What if the code block returns a variable, like $foo . would that be interpolated?
also, sorry, like "$foo".
TimToady yes, any expression 05:54
djanatyn that's really cool!
TimToady but if you were doing that, why not interpolate directly?
sorear Perl doesn't differentiate very much between returning $foo and returning 2
although 2 will have the "readonly" flag set
djanatyn Oh, and qw has a shorthand now?
sorear or will be marked in some equivalent way 05:55
djanatyn There's a lot of really convenient things here.
TimToady not only is <> a qw shorthand, but it's basically the same thing you're using for %hash<foo bar>
in general, whenever we steal a syntax from P5, we try to use it for something much more generally useful 05:56
djanatyn I really like the new methods and objects. 05:57
%hash.keys.sort, for example
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
djanatyn ...oh!
I should have remembered that, I've written that before >_> 05:59
So, what's the general practice regarding types? 06:00
TIMTOWTDI? ;)
Do people go around declaring the types for every single variable, or leave it up to the compiler to decide?
I'm kind of biased towards strong typing, as I programmed in haskell for a while. 06:01
sorear the compiler *won't* decide 06:02
any variable you don't annotate will be left at Any or Mu 06:03
we still haven't agreed which is which...
djanatyn So, does that mean that you have to name types?
You can't just go "my $x = 'string'; my $y = 42"?
sorear No, you can 06:04
niecza: say 'string' ~~ Any
p6eval niecza v8-7-gf58916b: OUTPUT«Bool::True␤»
sorear niecza: say 42 ~~ Any
p6eval niecza v8-7-gf58916b: OUTPUT«Bool::True␤»
djanatyn Also, wow, the syntax for "for" really reminds me of haskell
for 1..10 -> $x { say 2 * $x; } 06:05
[x * 2 | x <- [1..10]] 06:06
sorear rakudo: say [$_ * 2 for 1..10] 06:07
p6eval rakudo 922500: OUTPUT«2 4 6 8 10 12 14 16 18 20␤»
djanatyn woah, even cooler :D
perl 6 seems to be really multi-paradigm 06:08
sorear TimToady perfers to say "postmodern"
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␤»
tadzik djanatyn: no problems with panda and HTML::Template? 06:22
TimToady hits the hay & 06:23
06:24 jaldhar left, jaldhar joined
djanatyn tadzik: got kind of distracted with syntax :) 06:24
but, yeah, seems like a good time to install it.
tadzik: Oh, did you write panda? 06:29
tadzik aye 06:31
djanatyn Hmm. How difficult is it to port modules over from perl5 to perl6? 06:32
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
djanatyn sorear: myself, mostly. 06:34
I'm...more of a sysadmin guy than a programmer guy right now.
I do want to become a programmer guy though ;)
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
sorear Well I won't beleive em without more proof
djanatyn Your use of gender-neutral pronouns is kinda awesome. 06:35
Is anyone here besides TimToady interested in linguistics?
sorear is sort of interested in everything
djanatyn woah, me too :D
tadzik I think a plenty of now-asleep people are :)
djanatyn also, stupid question. 06:36
what's the slurp() function?
tadzik reads the file and produces a string
sorear like Prelude.readFile
djanatyn ah.
Oh, cool.
sorear and spew is writeFile
djanatyn so, wait, it takes a filehandle and reads the whole file? 06:37
tadzik it takes a file name
sorear filehandle or name
tadzik oh, ok
djanatyn ah, that's pretty awesome!
tadzik TIL
djanatyn was that in perl 5?
I used to just:
sorear note, perl6 doesn't have lazy strings (yet?) so this won't scale much past 1M
06:37 Trashlord joined
sorear it is in Perl 5 06:37
use File::Slurp
but I think that's a backport 06:38
tadzik spew() is a Perl6 builtin?
djanatyn while (my $line = <FILENAME>) { $contents .= $line; }
(that's how I used to slurp in a file)
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
djanatyn told you I'm a bad programmer >:)
sorear no
you're a young programmer
anyways 06:40
you should use $contents = do { local $/; <FILENAME> } 06:41
that way you aren't copying lines around a bajillion times
or use File::Slurp :p
dalek ecza: 78cd4b6 | sorear++ | src/niecza:
Name refactor part 3: Static type-name references
06:42 Trashlord left
snarkyboojum thinks it should be slurp/burb :P 06:42
djanatyn snarkyboojum: heh :) 06:43
sorear wjat's burb?
djanatyn will start using File::Slurp :D
tadzik burb like burp?
snarkyboojum burp even 06:44
:)
djanatyn Is File::Slurp in the standard libraries?
tadzik nope
djanatyn hates having too many depdencies when they aren't *really* needed ._.
sorear it's on cpan, I call that standard libraries
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.
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
tadzik shipping one file is not a pain either
sorear and once your code is on CPAN, cpanm will do all the dependency chasing for people
06:46 Trashlord joined
snarkyboojum btw, rocking' stuff with the latest compiler feature matrix 06:47
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.
tadzik true 06:49
djanatyn I can just use the cool new interpolation features :D
djanatyn goes off to write some perl 6 code
...oooh. I don't have to write a new method :D 06:54
tadzik nope :)
like in Moose
even though it's the other way around actually
djanatyn Yeah, I recall reading about how Moose copies perl 6 oop into perl 5 06:55
snarkyboojum djanatyn: at the least, is inspired by, and has innovated since afaik 06:56
djanatyn uhh, how does handling files work in perl 6? 06:58
for example, how would I open up a new file and write stuff to it?
tadzik hold on 06:59
perl6advent.wordpress.com/2010/12/0...perations/ 07:00
djanatyn thanks!
tadzik you're welcome!
my brain is like a Pawłow's dog. When I hear the alarm clock sound, I become sleepy
huf how is the "no l-s beyond this point" letter pronounced? 07:01
07:03 am0c joined
tadzik hmm 07:03
Polish pronounciacion of 'eu' is close to that. In english it'd be more like "eau" I think 07:04
and not the French "eau" :)
you read Pawłow as Pawuow, more-less 07:05
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.
tadzik oh, moritz! 07:08
I collected a bunch of questions for you :)
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:10
dalek ecza: 2bbb19a | sorear++ | src/ (5 files):
mergeback
07:11
djanatyn ...huh. 07:12
I afraid that I'm doing this really, really wrong. 07:13
wanna see my first non-working perl 6 program? :)
tadzik yeah, go on :)
djanatyn Uhh, is there a pastebin with perl6 syntax highlighting?
tadzik hmm
moritz no
tadzik ideone.com/ I think, no? 07:14
moritz tadzik: just make it a normal src/core/ modules for now
djanatyn gist.github.com/1116522 <-- huzzah
tadzik fun fact: you can do Entry.new().generate :)
also, you don't have to "$foo", it can be just $foo 07:15
djanatyn oh, yeah. -_-
tadzik plus, don't you need open() somewhere?
djanatyn ...oh. good idea :D
tadzik you have no tests! :P 07:16
djanatyn no tests?
my test was going to be "cat ./blog.txt"
tadzik moritz: any idea how much effort will be fixing the compilation options in nom?
moritz tadzik: managable 07:17
tadzik: src/main.nqp shows how to add a command line
tadzik I'm going to need that for --doc, and I just noticed it's just %*COMPILING := 1 in nom :)
djanatyn woah! :D
it actually ran :D
tadzik oh, cool
moritz installing the action for it might require to overload one of the methods from HML::Compiler in src/Perl6/Compiler.pm 07:18
djanatyn Woah, I just had a wonderful idea. 07:21
Lots of languages have their own individual pastebins.
there's a python pastebin, a lisp pastebin, and a haskell pastebin. I've used all of those, and they're top-notch quality.
...is there (currently) a perl 6 pastebin?
07:21 Jackneill joined
djanatyn like, paste.perl6.org/? 07:22
Because, actually, I think I could write that.
moritz that would be awesome 07:25
djanatyn ...that would be really simple, actually!
The more I think about it, the better it sounds. 07:26
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
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!
djanatyn g'night!
moritz good night djanatyn
djanatyn don't let anybody write any pastebins while I'm asleep
I want to be there to personally obfuscate the code myself 07:28
07:28 birdwindupbird joined
tadzik moritz: 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:32
sorear -1 to an official Perl 6 pastebin 07:35
tadzik Meh, Pod::To::Text does not compile when put into the setting 07:44
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:45
moritz what exactly does $?DOC do? indicate whether DOC phasers should be run? 07:46
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
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 07:49 jaldhar joined
moritz so compile a $?DOC in the source to what $*DOC (set in Perl6::Compiler) contains 07:49
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
so Actions don't really need to know that
so DOC INIT actually adds a new INIT phaser, wrapped in an if that executes it only if $?DOC is set 07:53
07:58 azawawi joined
azawawi hi 07:59
tadzik hello
azawawi Does rakudo 2011.07 work on win32/strawberry?
hmm, I do not see a win32 installer for it 08:00
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.
jnthn morning, #perl6 08:02
mberends o/
tadzik jnthn: o/
azawawi strawberry perl v5.12.3 here and it is failing when building 2011.07 from source
tadzik how do I write a PAST which evaluates to the value of a certain variable $foo? 08:03
08:04 djanatyn left
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'))
azawawi runs perl Configure.pl --gen-parrotcollects error log
azawawi runs 'perl Configure.pl --gen-parrot' and collects its build log 08:05
mberends azawawi: you might also use 2>errorlog on Windows (or you may know that already) 08:06
tadzik just PAST::Var?
azawawi mberends: ofcourse :)
08:10 mls joined
mls morning jnthn 08:10
and the other perl6 folks as well
08:10 im2ee joined
mls jnthn: I see that you merged part of the catch patch I did on Friday 08:11
Is there a reason why you excluded the "finalize" bits?
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
mls: Got a link to it? Or I can find it in backlog if not... 08:13
mls wait a sec...
jnthn tadzik: What socpe is the variable?
tadzik: But yes, PAST::Var.new( :name('$foo'), :scope('lexical_6model') ) # normally
mls jnthn: gist.github.com/1114368 08:14
tadzik jnthn: it's $?DOC 08:18
jnthn tadzik: OK 08:19
tadzik I don't think that's lexical, or is it?
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 wklej.org/id/570092/ ?
Can only use nqp_get_sc_for_object with a SixModelObject, it says
08:21 daxim left
jnthn tadzik: OK, I don't understand what you're doing there... 08:22
08:23 beekor left
jnthn tadzik: If you're calling add_phaser I guess you've patched that too? 08:23
oh
$if<code_object>
that makes no sense.
tadzik nope, not yet. I need to add a phaser that executes only if $?DOC
every add_phaser uses <code_object> on some .ast 08:24
jnthn OK, but when is $?DOC true?
08:24 woosley joined
tadzik when it's not false. Not undefined 08:24
jnthn No, I meant what does it represent?
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
tadzik oh
so S26 is kinda wrong
for $?DOC is not known at compile time at all
or maybe it is
jnthn Could you in theory pre-compile something, then run with --doc?
tadzik rethinks
that's what I'm wondering about now
jnthn Or do you always feed the source file straight to the compiler?
tadzik When the Perl 6 interpreter is run in this mode, it sets the compiler 08:26
hint C<$?DOC> to true
(in this mode: --doc is passed)
08:26 jdv79 left
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 :)
tadzik otoh, it ists perl --doc DBI::DBD::Metadata as an example 08:27
but I think that makes sense to omit pre-comp
sorear pines for the ability to suck the pod out of a file without running any of it
tadzik for you are not really running pre-comp stuff with perl6 binary :)
sorear or even parsing non-pod
tadzik so I can get back to adding those phasers only if --doc is passed
sorear but *sleep* now 08:28
08:28 jdv79 joined
tadzik so, I need the %*COMPILING fixed again :) 08:28
mberends 'night sorear
jnthn tadzik: The reason things don't work out the way you have them now is that not everything as a <code_object>
sorear: night
tadzik: In fact, very few things do - only blocks/thunks/routines etc
tadzik mhm 08:29
btw, did you see my segfaulting note from tonight? 08:30
jnthn yeah
tadzik ok
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.
tadzik std: sub foo {}; foo(); if 0 08:32
p6eval std 516268a: OUTPUT«===SORRY!===␤Missing block at /tmp/r9sMon4kPC line 1 (EOF):␤------> sub foo {}; foo(); if 0⏏<EOL>␤Parse failed␤FAILED 00:01 119m␤»
tadzik I'd like, one day, to see a warning like "you don't really want this semicolon before if"
08:33 im2ee left, im2ee joined
jnthn mls: Seems the bit of your patch for try already got in 08:34
mls yes, the &EXCEPTION part 08:35
oh, the finalize for try part? I didn't see that
jnthn Yeah 08:36
08:36 beekor joined
jnthn It's just the finalize for CATCH part that didn't. 08:36
Just added it and trying spectest.
mls thanks! 08:39
jnthn tadzik: Oh, and I did mean glass, not class ;) 08:40
tadzik :) 08:41
lolifixedoptions 08:42
mberends stumbled upon a voice synthesizer in debian: espeak 'perl6 rocks' # sounds pretty good 08:44
08:44 Instil left
tadzik :D 08:44
08:45 Su-Shee_ is now known as Su-She 08:46 Su-She is now known as Su-Shee
tadzik DOC phasers in action: gist.github.com/1116610 08:46
mberends ++tadzik++ 08:47
08:47 wamba joined
jnthn tadzik: nice! 08:48
dalek ast: 60fa582 | moritz++ | S04-statements/try.t:
refudge try.t for rakudo
08:48 kolibrie left
moritz jnthn: btw I didn't find any of these fudges weird :-) 08:48
jnthn moritz: It was the way the .rakudo file looked 08:49
tadzik fixing command-line switches were easier than we thought, moritz :)
moritz tadzik++
jnthn hmm...with some of the files Coke++ added, I get failures
dalek kudo/nom: 8e6925b | moritz++ | t/spectest.data:
run try.t
jnthn Like repeat.t and capture.t
dalek kudo/podparser: 0c0d929 | tadzik++ | / (4 files):
Generate Pod::Heading objects from =head directives
kudo/podparser: 8797ffa | tadzik++ | / (6 files):
Implement DOC phasers. Fix compilation options. Add a simple Pod::To::Text
tadzik sorry for a 3-in-1 commit 08:50
mls jnthn: you mean with the finalize patch?
tadzik reviews welcome 08:51
jnthn mls: I have it applied, but I highly doubt it's related.
moritz capture.t also fails here
jnthn mls: I think just some mis-fudging of tests added overnight
Aha
moritz maybe [Coke]++ forgot to commit his fudges
jnthn Aye
08:52 kolibrie joined
jnthn Though |$foo is on my todo list for today anyway. 08:52
08:52 azawawi left
tadzik goes to catch some air 08:53
moritz nom: say ([1, 2] xx 2).perl 08:54
p6eval nom: OUTPUT«(1, 2, 1, 2).list␤»
08:54 localhost left
moritz pmichaud: bug above 08:54
dalek ast: 0ebbab8 | moritz++ | S0 (2 files):
rakudo fudges
08:55
kudo/nom: e8cd5b0 | jonathan++ | src/Perl6/Actions.pm:
Apply patch from mls++ to finalize caught exceptions, thus unwinding any C stack frames that may be left.
08:56
08:56 Kivutarrr joined 08:58 Kivutarrr left
mls thanks jnthn! 09:01
09:16 daniel-s joined
moritz mls: your next patch should add yourself to CREDITS 09:17
mls ok, no objections ;)
09:20 daniel-s_ joined
jdhore question: Is there a date for nom being merged to master? 09:20
09:21 daniel-s left, Jackneill left 09:25 daniel-s_ left, daniel-s__ joined 09:27 SHODAN joined
jnthn jdhore: Not a set date yet, but "before YAPC::EU". 09:28
jdhore jnthn, When's YAPC::EU?
jnthn jdhore: Middle of August.
jdhore ah, fun
09:29 _daniel-s__ joined, daniel-s__ left
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:31
moritz and porting lots setting stuff 09:33
09:34 daniel-s joined
moritz like Instant, Duration, Date, DateTime, IO::Socket* 09:34
09:34 _daniel-s__ left
jnthn Yeah 09:35
I'd hope IO::Socket may go over quite cleanly.
mberends and Zavolaj! 09:36
09:36 mj41 joined
jnthn I suspect Zavolaj won't go over quite cleanly. :/ 09:36
mberends pm thought it would be ok though :)
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 www.cs.kent.ac.uk/people/staff/rej/gc.html and its Book) and feel dangerously close to inventing something "new". 09:37
jnthn Well, there's a new copy of that book out in August. :) 09:39
Within the categories you've mentioned I think there's multiple algorithms too. :) 09:40
jnthn is curious what mberends has come up with
mberends it's going into 6model/c and could be summarized as reference tracking
there is quite a gap between sketches on pieces of paper and C code, though ;) 09:41
09:42 mls left 09:45 daxim joined 09:54 masak joined
masak yawns 09:54
good... good morning, #perl6.
09:54 birdwindupbird left
masak tadzik: re-ping :) 09:55
jnthn ooh, just made it in by 5 mins :P
masak heh :) 09:56
yes, I was schzlow to wake today.
jnthn set up himself the alarm
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. :)
mberends masak: if you get here in the next 3 minutes, you can share a lunch of haggis with me :) 09:58
jnthn eww haggis! 09:59
09:59 wamba left
jnthn "The other bits of the sheep." :) 09:59
masak mberends: you know, that sounds perfect. "here" === .nl ? 10:00
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
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? en.wikipedia.org/wiki/File:Haggis_scoticus.jpg :)
dalek kudo/nom: ecef486 | jonathan++ | src/ (3 files):
Start to get handling of trusts in place. Treat it trait-ish, because I suspect it'll become one some day.
kudo/nom: 16c6780 | jonathan++ | / (3 files):
Add a Trusting role and make ClassHOW do it, so now 'trusts' makes an appropriate entry in the list.
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:03
jnthn figured if he was gonna put private methods back, we may as well do it properlyish. :) 10:04
10:10 daxim left 10:11 daxim joined, Woodi joined 10:12 Woodi left 10:14 jedai_ left, Woodi joined 10:17 jedai joined 10:19 MayDaniel joined
dalek kudo/nom: 3c24f51 | jonathan++ | / (3 files):
Add a PrivateMethodContainer role for storing private methods, and get ClassHOW to do it.
10:26
kudo/nom: d3ca4f7 | jonathan++ | src/Perl6/Actions.pm:
method !foo { ... } now calls add_private_method.
10:30 wamba joined 10:31 cosimo left 10:32 cosimo joined 10:36 buubot_backup left 10:37 mj41 left 10:38 MayDaniel left
tadzik masak: pong 10:46
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.
tadzik masak: nope, didn't
it's incomplete too 10:54
did you see the --doc showoff? :)
masak yeah! impressed! 10:56
tadzik++
10:57 Khisanth joined
moritz tadzik++ indeed 10:57
10:57 buubot_backup joined
moritz I get the impression that it's a very interesting project, partly because it touches so many parts of the compiler 10:57
parser, actions, built-ins, command line, MOP
tadzik yes :) 10:58
moritz hopes tadzik feels so too :-)
tadzik and serialization
that was fun
moritz right :-)
and double bacon!
tadzik yes!
jnthn :)
Really looking forward to tadzik++'s branch landing.
tadzik we can even merge it now, it brings no regressions to nom, even no performance regressions 10:59
and fixes a few things in Grammar and SymbolTable too
jnthn nice!
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 ;)
moritz speaking of food... yesterday night I cooked (and ate!) canard with sesame-honey coating, fried apples and nooldes. Yummy. 11:00
tadzik: +1
11:00 Khisanth left
jnthn tadzik: +1 from me...only wonder if we should wait to see if pmichaud++ is fine with it too 11:00
tadzik sure 11:02
dalek kudo/nom: 4a5f9b9 | jonathan++ | src/ (2 files):
First cut of private method calls, with trust checking. Also some notes on how this can be optimized in the future.
11:06
11:06 Khisanth joined
tadzik now, what was I up to... 11:08
masak does someone want to help me track down a bug in github.com/masak/farm/blob/master/farm.pl ? 11:09
no particular expertise required, just running the game and maybe inserting debug print statements here and there.
jnthn > my class A { method !y() { say 42 } }; my class B { method m() { A!A::y() } }; B.m 11:10
Cannot call private method 'y' on package A because it does not trust B at line 1, near " } }; B.m\n"
> my class B { ... }; my class A { trusts B; method !y() { say 42 } }; my class B { method m() { A!A::y() } }; B.m
42
tadzik hy
jnthn \o/
masak jnthn: \o/
jnthn++
tadzik jnthn++ indeed 11:11
jnthn The things compile time meta-objects make trivial... :)
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!
I can't reproduce it with a failing test. (!)
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 :)
masak tadzik: jnthn is our Chuck Norris, clearly :) 11:12
tadzik ok, so default phasers... 11:13
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?
masak even if there is, start with the simple version :) 11:15
tadzik :)
jnthn tadzik: Default phasers?
tadzik jnthn: yeah. The default action for --doc
11:16 whiteknight joined
tadzik By default, once the C<DOC INIT> phase is complete, the interpreter then 11:16
calls a special default C<DOC INIT> block that walks the AST and
generates the documentation
oh, so they're not excluding themselves
even easier
masak c2.com/xp/DoTheSimplestThingThatCou...yWork.html
tadzik and a bit misleading, imho, but ok
jnthn masak: The main thing people get wrong there is they forget it actually has to work. :) 11:17
masak jnthn: really? I see people all the time forgetting that it actually should be simple while making it work. :/ 11:18
11:19 JimmyZ_ joined
jnthn masak: I was presuming they were already settled on simple :) 11:20
masak: But yes, agree.
The simplest thing that actually works is quite hard. :)
masak getting into the habit is hard. 11:22
there's a sense of... um, "can I really cheat this much?", or something like that.
as if the problem *should* be harder.
even when it shouldn't.
I've always liked the accounts-and-transactions example at c2.com/xp/SpikeSolution.html for showing how much one can simplify things. 11:23
colomon I dunno, I think the whole idea is exaggerating a good notion into a silly law. 11:26
11:27 daxim left
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.
tadzik nom: use Test; use Test
p6eval nom: OUTPUT«error:imcc:Multiple declarations of lexical '&diag'␤␤ in file '(file unknown)' line 117␤»
masak it's so nice to have small increments, small feedback loops, and small steps between working states. 11:29
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)␤»
tadzik que?
nom: use Test; { use Test; 1 }
p6eval nom: ( no output )
tadzik nom: use Test; { use Test; 1 }; say 'alive'
p6eval nom: OUTPUT«alive␤»
tadzik ok
jnthn hm 11:31
rakudo: use Test; use Test;
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Cannot import symbol &plan because it already exists in this lexical scope␤␤»
jnthn Better. 11:32
Not so sure what the correct answer is though.
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.
tadzik jnthn: so, how do I correctly add a PAST::Block as a phaser?
masak colomon: a colleague of mine used to tell me the same. he sometimes found amusing the literalness with which I applied YAGNI. :) 11:33
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
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:35
masak full ACK. 11:37
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".
masak we seem to be in violent agreement. 11:39
colomon: did you ever see the XP blogger who wanted to TDD his way to a Sudoku solver?
colomon masak: yes. crash and burn.
masak and then Norvig (unrelatedly) solves it with 30-or-so lines of Python.
why did Norvig succeed? because he has a background in AI. 11:40
so he knows about constraing propagation.
colomon I think Norvig actually was inspired by seeing the TDD flop
?
*thought
masak that's news to me, but wouldn't be surprised.
11:40 ggoebel joined
masak anyway, he had a mental model for solving the Sudoku problem already when he started. 11:41
he didn't count on the tests leading him there.
sili lulz
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.
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?
masak in fact, I think it does more often for business apps and less often for algorithmic problems like Sudoku. 11:42
colomon: well, that's more what test-first means to me.
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
later on, I can put it in a context and enhance it in various ways.
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.
masak right.
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.
problem is, foresigh is hard, even when you feel you know the domain.
colomon sure
colomon may disappear suddenly, there are sounds of a young boy waking up on the monitor
masak that's why the best programs/modules are written by people who have already solved a problem in that domain 50 times. :)
their brains are already domain-shaped. 11:45
<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
sili: I wrote a piece of code a month or so back that does that.
sili: but it generates all strings, I think. could easily be made to generate a random one. 11:47
(sorry, your question was from 2007, but no-one seems to have answered it since.) :)
sili I vaguely remember asking that
you crazy. 11:48
masak :)
looking for the code now.
ah, here: gist.github.com/908829
as you see, it's just a trivial extension to GGE. 11:49
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
not complete by any means, but a proof-of-concept.
sili interesting.
masak if you have a finite-and-small number of strings, you could generate all of them and then pick one randomly with .roll
otherwise, you could generate random choices along the way. 11:51
depending how much you care about the resulting distribution, that should give pretty good results.
sili how far back are your IRC logs? 11:53
how far do they go, I mean 11:54
masak all the way. why? :) 11:55
moritz++
sili: you were more active during the Golden Age. 11:57
it's nice to have you still around.
11:58 baest joined
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
years*
masak sounds interesting. 11:59
what are you doing to stay on top of your game?
11:59 daxim joined
sili start using perl6, program more, read more programming news 12:00
rakudo, that is.
masak sili: great! maybe you could help me find an elusive bug? :) 12:05
I wrote a game in Perl 6, and it behaves correctly except in one small case. 12:06
I can't really nail it down; the code looks correct, and it only occurs in one rare (but reproducible) circumstance.
sili pastebot?
masak the game is here: github.com/masak/farm 12:07
(it's explained in the README)
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.
I can make a nopaste that exhibits the problem. 12:08
sili github highlighting sucks 12:10
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: gist.github.com/1116739
sili: well, I don't think github highlighting is made for Perl 6.
sili shoot. vim 7.3 has perl6 and I've only got 7.2 12:12
I suck too much at perl6 to do this 12:14
tadzik whoa, 2 PM? A day started at 4AM is loong
jnthn :)
masak sili: ah, too bad. well, let me know if there's something I can help you with.
tadzik: 4AM!? what were you thinking? :) 12:15
jnthn That's only one hour off when I ended yesterday :P
tadzik masak: I accidentally got asleep on like 9PM yesterday
sili it's 5am
tadzik jnthn: so, how do I correctly add a PAST::Block as a phaser?
sili What is Z=> 12:16
jnthn tadzik: I probably need a bit more info than that.
tadzik: What sort of phaser?
masak sili: here, I'll show you.
rakudo: my %h = <a b c> Z=> <1 2 3>; say %h.perl
p6eval rakudo 922500: OUTPUT«{"a" => "1", "b" => "2", "c" => "3"}␤»
sili what is that called? 12:17
masak sili: "zip".
jnthn tadzik: And how are you getting/creating the PAST::Block?
sili oh, okay
tadzik jnthn: my $a := PAST::Block.new()
masak sili: the zip operation intermingles two or more lists into one single list.
sili ya, I know zip
tadzik whatever I put inside, I want to add a block as a phaser
and, INIT
masak sili: then we just realized that Z should be a metaoperator and apply to other operators, like =>
jnthn tadzik: What's going inside, ooc? 12:18
masak std: <a b c> Z=> <1 2 3> Z=> <α β γ>
p6eval std 516268a: OUTPUT«ok 00:01 120m␤»
jnthn tadzik: The thing is that add_phaser expects a Block object (Perl 6 one), not a PAST::Block.
tadzik jnthn: use Pod::To::Text; say pod2text($=POD)
masak niecza: say (<a b c> Z=> <1 2 3> Z=> <α β γ>).perl
p6eval niecza v8-9-g2bbb19a: OUTPUT«("a" => "1" => "α", "b" => "2" => "β", "c" => "3" => "γ").list␤»
masak \o/
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
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/…
tadzik jnthn: okay
masak ah. precedence
jnthn tadzik: Checking what to do :)
masak niecza: say (<a b c> Z=> (<1 2 3> Z+ <4 5 6>)).perl
p6eval niecza v8-9-g2bbb19a: OUTPUT«("a" => 5, "b" => 7, "c" => 9).list␤»
tadzik (:
sili masak: that produces tupes? 12:20
tuples
tadzik Pairs
jnthn tadzik: make_simple_code_object($the_past_block, 'Block')
tadzik: That will give you back something you can pass as the second arg to add_phaser 12:21
tadzik nice, thanks
sili "a" => "1" => "3" is a pair of 3? 12:22
masak sili: you can think of it like Lisp's list data structures.
sili gotcha
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␤»
masak rakudo: sub car(Pair $_) { .key }; sub cdr(Pair $_) { .value }; sub cddr(Pair $_) { .&cdr.&cdr }; say (cddr "a" => "1" => "3")
p6eval rakudo 922500: OUTPUT«3␤» 12:24
masak shoulda written it like that, of course :P
12:24 espadrine left 12:25 espadrine joined
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
s/shouldn't/wouldn't/
std: [==>] foo, bar 12:27
p6eval std 516268a: OUTPUT«===SORRY!===␤Can't reduce with ==> because sequencer operators are too fiddly at /tmp/Vx4yfUD9sj line 1:␤------> [==>]⏏ foo, bar␤Undeclared routines:␤ 'bar' used at line 1␤ 'foo' used at line 1␤Check failed␤FAILED 00:01 120m␤»…
masak fiddly. yes. :)
sili what's ==> 12:28
perldoc -f '==>' :(
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
p6eval nom: OUTPUT«-2 -1 0 1 2␤»
jnthn nom: 1,2,3,4,5 ==> map * - 3 ==> grep * < 0 ==> say
sili got it, so you don't have to write your stuff from right-to-left
p6eval nom: OUTPUT«-2 -1␤»
jnthn Yeah, it can look really pretty 12:30
12:30 jedai left
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
nom: say <== grep * < 0 <== map * - 3 <== 1,2,3,4,5
sili long live perl6
p6eval nom: OUTPUT«-2 -1␤»
masak \o/
jnthn masak: Unpretty. :P
masak jnthn: bigot! :P 12:31
tadzik ytterp
masak rakudo: say flip "pretty"
p6eval rakudo 922500: OUTPUT«ytterp␤»
12:31 whiteknight left 12:32 jedai joined
sili How would I do `map say, qw(a b c d)` 12:33
tadzik <a b c d>.map(say(*))
rakudo: <a b c d>.map(say(*))
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␤»
tadzik eek
rakudo: <a b c d>.map({say($_)}) 12:34
p6eval rakudo 922500: ( no output )
jnthn rakudo: map *.say, qw(a b c d)
p6eval rakudo 922500: OUTPUT«Could not find sub &d␤ in main program body at line 22:/tmp/QiG7YhsJhU␤»
jnthn er :)
rakudo: map *.say, <a b c d>
p6eval rakudo 922500: ( no output )
jnthn oh
rakudo: eager map *.say, <a b c d>
p6eval rakudo 922500: OUTPUT«a␤b␤c␤d␤»
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?
jnthn Bug.
sili cool.
it's raining. 12:36
dalek kudo/nom: 28e322a | jonathan++ | src/Perl6/Metamodel/ (3 files):
Get private methods in roles composed in (simple case).
kudo/nom: afb25a0 | jonathan++ | t/spectest.data:
Two more passing test files.
kudo/nom: eab6c06 | jonathan++ | src/Perl6/Actions.pm:
Fix issue where you couldn't mention implicit %_ in a method.
12:38 kaare_ left
dalek kudo/nom: 267b63b | jonathan++ | t/spectest.data:
Another passing text file thanks to getting privates sorted out.
12:39
tadzik yes, it's raining
although I doubt that it's the same rain
jnthn heh heh. S12-attributes/undeclared.t will not compile with nom 12:40
Why not?
Attribute $!d not declared in class D at line 20, near " = 1 }}; D"
:D
tadzik :D
ETOOSMART
masak \o/ 12:42
The Compiler That Knew Too Much.
sili why is it useful to allow a different invocant name? (other than self)
masak sili: I sometimes make it $_ 12:43
sili method myMethod($invocant: $x, $y)'
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 :)
masak sili: then I can do .foo and .[] and stuff.
flussence: \o/
flussence: keep me posted.
oh wait. it's a grammar. :/ 12:44
um.
12:44 mj41 joined
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?
masak sili: yep.
sili handy
masak should probably dust off GGE and finish the grammars
flussence bah, this got wedged on an infinite-looping test in the night: i.imgur.com/UxD1W.png 12:45
12:45 PacoLinux joined
masak flussence++ # for the effort 12:46
flussence it'll get done, eventually. I like shiny things :) 12:47
jnthn If anybody fancies fixing that test file up a bit, they'd be welcome :) 12:50
13:03 jimmy1980 left, jimmy1980 joined 13:15 PacoLinux left
dalek ast: 6dbcddb | jonathan++ | S12-methods/instance.t:
A correction and unfudge for a test.
13:21
kudo/nom: 7bfa218 | jonathan++ | src/ (2 files):
Couple more corrections to implicit %_ handling.
jnthn There's another masakbug down :)
13:28 Chillance joined 13:35 bluescreen10 joined
tadzik tea makes me hungry :\ 13:55
no that I shouldn't eat more, but I've run out of food:) 13:56
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.
masak: Could always visit an air conditioned nommery :P 14:00
masak "get thee to a nommery" 14:01
jnthn :D 14:02
14:03 PacoLinux joined
dalek kudo/podparser: 5ed0e09 | tadzik++ | src/Perl6/Grammar.pm:
Bring mysterious COMPILING := 1 back to Grammar.pm
14:03
kudo/podparser: 585cd06 | tadzik++ | / (9 files):
The Pod tree should not contain bare strings. Use Pod::Block::Para, adjust the tests and Pod::To::Text
tadzik jnthn: obtw, what is that %?COMPILING := 1 for? 14:04
jnthn tadzik: er
I did know :)
tadzik I'm quite sure it's a hash now, but when I remove it, stuff breaks :)
jnthn Oh, I remember adding it for a reason :)
I just forget the reason.
tadzik is export, to be exact, when compiling Test.pm
jnthn oh! 14:05
yes :)
is export checks it
It can go away when we get BS
(the serialization stuff)
tadzik can't 'is export' be satisfied with it having a true value?
jnthn probably
All it cares about is "am I being called by the compiler" 14:06
tadzik if $*COMPILING
huh
jnthn Whihc of course a trait always should be. Alas... :)
tadzik oh, it's $*COMPILING, not %?COMPILING 14:07
asd!
I may be able to fix this now
14:08 drbean left
tadzik even $*COMPILING and %*COMPILING. Pff 14:09
jnthn Confusion. You has it. 14:10
:)
.oO( Or...I caused it. :) )
tadzik (:
$*CONFUSION
or, wait, %?CONFUSION
no, %*CONFUSION 14:11
14:13 bluescreen10 left 14:14 bluescreen10 joined
jnthn Too much hash may cause confusion. :P 14:15
14:19 PacoLinux left, PacoLinux__ joined 14:21 bluescreen10 left 14:22 jaldhar left
TimToady btw, "Hashes with non-Str keys" is already in there with Sets as "Object hashes" 14:23
(in features) 14:24
14:24 PacoLinux__ left
masak oops 14:24
masak fixes
14:24 woosley left
dalek atures: 56d6494 | masak++ | features.json:
[features.json] removed duplicate entry

  TimToady++ for spotting it.
14:25
jnthn masak: While you're in there, could you mark nom as doing currying? :)
masak ok. 14:26
dalek atures: 7705c56 | masak++ | features.json:
[features.json] nom now does currying

  jnthn++ for reporting.
14:27
14:28 Mowah joined
jnthn thanks! :) 14:28
dalek kudo/podparser: bdb7627 | tadzik++ | src/ (3 files):
Remove $*COMPILING
14:36
jnthn tadzik: Are you sure those were the only usages? 14:37
tadzik: I think there may be one more... 14:38
tadzik ack didn't find it
14:38 jaldhar joined 14:47 f00li5h left 14:48 f00li5h joined 14:52 jaldhar left 14:54 mj41 left 15:03 im2ee left 15:04 kaare_ joined 15:06 im2ee joined, mj41 joined 15:09 birdwindupbird joined 15:10 im2ee left
jnthn tadzik: Then ack fail. Line 52 of src/Perl6/ModuleLoader.pm. 15:16
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«]]][[[][[]␤»
masak oops :)
15:23 jaldhar joined
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
15:23 daniel-s left
p6eval rakudo 922500: OUTPUT«[][[]][][]␤» 15:23
masak does anyone know if there's a faster way to randomly generate a string of balanced parentheses?
(of a given length. such that each such string has an equal probability of being generated.) 15:24
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:27
*to go deeper 15:28
15:29 satyavvd joined
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)
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)␤»
jnthn nom: sub gen($*l) { sub g() { $*l -= 2; '[' ~ ($*l > 0 && <0 1>.pick ?? gen() !! ') ~ ']' }; g() }; g(2); gen(10)
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)␤»
masak no wait. it's isomorphic to a rooted tree, period.
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)
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)␤»
jnthn oh, duh
nom: sub gen($len) { my $*l = $len; sub g() { $*l -= 2; '[' ~ ($*l > 0 && <0 1>.pick ?? gen() !! '') ~ ']' }; g() }; say gen(2); say gen(10)
p6eval nom: OUTPUT«[]␤[]␤»
jnthn oh, darn
:)
Has to be 10, chars, not just up to 10 :) 15:34
Yeah, that way won't work.
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:37
tadzik jnthn: look closer at the patch :) 15:38
jnthn tadzik: oh, I missed that :) 15:40
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)
p6eval nom: OUTPUT«[]␤Not enough positional parameters passed; got 0 but expected 1␤current instr.: 'gen' pc 426 ((file unknown):59693026) (/tmp/onRqwqV5WB:1)␤»
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)
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)
p6eval nom: OUTPUT«[]␤[[[][][]]]␤»
jnthn That works.
:)
15:41 bluescreen10 joined
jnthn Not sure it's any prettier than what masak++ originally had though. 15:41
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.
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)␤»
jnthn meh
masak because it favours the beginning of the string, in a way.
jnthn masak: Kinda
I dunno. I never liked probability much and avoid it at every chance. :) 15:43
masak :P
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
p6eval rakudo 922500: OUTPUT«[[[[][]]]]␤»
masak I thought this was a good one, but...
...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
And then .roll the list :)
masak yes, that's a possibility.
TimToady rakudo: say '[' ~ (<[ ]> xx 8).pick(*) ~ ']'
p6eval rakudo 922500: OUTPUT«[] ] ] [ ] ] [ [ [ [ ] [ [ ] [ ]]␤»
masak let's define that as cheating, though :P
jnthn Sucks for big lengths though. :)
TimToady rakudo: say '[' ~ (<[ ]> xx 4).pick(*) ~ ']'
p6eval rakudo 922500: OUTPUT«[] ] ] [ [ [ [ ]]␤»
TimToady hmm
tadzik jnthn: wklej.org/id/570329/ do you see anything wrong in that? 15:45
jnthn tadzik: Not right off, aside from the block being empty 15:46
tadzik yeah, but it's this error whatever I put inside 15:47
jnthn tadzik: oh wait
TimToady rakudo: my $b; substr($b, (0..@b.chars).pick, 0, '[]') for ^4
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Symbol '@b' not predeclared in <anonymous> (/tmp/Pjizm3k7Wl:22)␤»
jnthn you're doing it too late.
TimToady rakudo: my $b; substr($b, (0..$b.chars).pick, 0, '[]') for ^4
tadzik oh?
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.
tadzik I was trying not to make it too early :)
TimToady rakudo: my $b = ''; substr($b, (0..$b.chars).pick, 0, '[]') for ^4
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␤»
jnthn tadzik: See end of comp_unit in the grammar
TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0, '[]') for ^4
p6eval pugs: ( no output )
jnthn tadzik: Probably you want to add it before CHECK time :)
TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0, '[]') for ^4; say $b
p6eval pugs: OUTPUT«␤»
TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^4; say $b
p6eval pugs: OUTPUT«[[][]][]␤»
TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b 15:49
p6eval pugs: OUTPUT«[[]][][][]␤»
TimToady pugs: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
p6eval pugs: OUTPUT«[[][]][][]␤»
TimToady pugs: srand; my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
p6eval pugs: OUTPUT«[[[]]][][]␤»
15:49 satyavvd left
TimToady pugs: srand; my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b 15:49
p6eval pugs: OUTPUT«[][][][][]␤»
tadzik hrm
TimToady pugs: srand; my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
p6eval pugs: OUTPUT«[[[]]][][]␤»
masak now, there's an idea. 15:50
15:50 bluescreen10 left
jnthn finally, we found a use for lvalue substr! 15:51
masak all is forgiven!
TimToady niecza: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b
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…
TimToady alpha: my $b = ''; substr($b, (0..$b.chars).pick, 0) = '[]' for ^5; say $b 15:52
p6eval alpha : OUTPUT«␤»
15:52 mj41 left
masak Range doesn't have a .pick in Niecza? LHF! 15:52
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>)␤»
TimToady niecza: my $b = ''; substr($b, Int($b.chars.rand), 0) = '[]' for ^5; say $b
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
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…
TimToady niecza: my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; say $b 15:54
p6eval niecza v8-9-g2bbb19a: OUTPUT«[[][][][]]␤»
TimToady niecza: my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; say $b
p6eval niecza v8-9-g2bbb19a: OUTPUT«[[][][][]]␤»
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«[[][][[]]]␤[[[[]]][]]␤[][[][][]]␤[[]][][][]␤[[]][[][]]␤[[]][[][]]␤[][[[[]]]]␤[[][][[]]]␤[[][]][[]]␤[[][][[]]]␤»
masak it seems to favor the [[][][][]] case... :)
TimToady srand 15:56
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␤»
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
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␤»
masak ah.
not so hard after all :P
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␤»
TimToady doesn't seem equal 16:00
masak I'd *guess*... right.
probably easier to see with the keys...
niecza: my %dist; for 1..1e4 { my $b = ''; substr($b, $b.chars * rand, 0) = '[]' for ^5; %dist{$b}++ }; say %dist.perl
p6eval niecza v8-9-g2bbb19a: OUTPUT«{"[[[[][]]]]" => 56, "[][[[]]][]" => 116, "[[[]]][[]]" => 93, "[[[][[]]]]" => 69, "[[][[]]][]" => 74, "[[[]][[]]]" => 164, "[][[][][]]" => 635, "[][[[[]]]]" => 92, "[][[[]][]]" => 300, "[[][[]][]]" => 295, "[][[][]][]" => 210, "[[[][][]]]" => 158, "[][][[]][…
masak things that are more [][][][][]-y seem more favored. 16:01
TimToady there are more ways to generate them?
yes, there's only one way to generate [[[[[]]]]]
there are 5! or so ways to do [][][][][] 16:02
or maybe 4!
masak right. 16:05
need a mechanism that counteracts that.
but not too much :P
TimToady I wonder what percentage have to be thrown away if you just shuffle randomly 16:06
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
pmichaud good morning, #perl6
TimToady so higher than 50%, but how much?
masak pmichaud! \o/
TimToady o/
jnthn morning, pmichaud 16:08
masak TimToady: here's your answer, I think: oeis.org/A006318
tadzik good morning pmichaud 16:10
TimToady royal paths, eh? 16:11
doesn't seem quite right; we don't have diagonals 16:12
masak indeed. 16:18
this one looks better: oeis.org/A000081 16:19
it even talks about inserting parentheses :) 16:20
16:21 JimmyZ_ left
sorear good * #perl6 16:27
o/ sili 16:29
16:32 Mowah left, Aridai joined
TimToady aron figgered it out 16:34
1 1 1 1 1 16:35
4 3 2 1
9 5 2
16:35 djanatyn joined
TimToady 14 5 16:35
14
djanatyn Hello.
sorear o/ djanatyn
TimToady now go the other way and use the relative probabilities 16:36
djanatyn was reading up on some Perl 5 CGI.
Are there any libraries to make CGI easier with perl 6?
sorear: why -1 to an official perl pastebin? 16:38
16:40 soh_cah_toa joined
djanatyn Also, does anyone here use Padre? 16:41
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?
djanatyn reinventing the wheel? but what other pastebin is there out there for perl 6, besides pastebin.com? 16:44
pmichaud lots of us use gist.github.com 16:46
djanatyn Hmm, I used that as well for my first perl6 paste. 16:47
Do they seem like they're going to add perl6 syntax highlighting soon?
pmichaud I'm sure that if someone helped to build the highlighter, they'd add it.
if we sit around waiting for them to do it, it might take a while
dalek kudo/nom: e028411 | jonathan++ | src/ (4 files):
Register Capture type so we can use it in the binder.
16:48
kudo/nom: 3588736 | jonathan++ | src/core/Capture.pm:
Fix a thinko.
kudo/nom: 0bc9883 | jonathan++ | src/ (2 files):
Make |$c work again in signatures; $c becomes a Capture with the current unbound stuff in it.
sorear usefully highlighting perl 6 is impossible, I think
jlaire one useful feature of dedicated pastebins is that a bot can monitor them and post links to new pastes automagically
sorear like Alias said, it's the price we pay for a programmable programming language 16:49
pmichaud for me, most highlighters are more annoying than useful anyway 16:50
djanatyn still, I want to play with this: search.cpan.org/~azawawi/Syntax-Hig...t/Perl6.pm 16:51
it'll take perl6 code as a string, and output formatted, syntax highlighted HTML, it seems.
Even if people don't use a perl 6 pastebin, it would be a fun project to write.
masak djanatyn: hey! 16:52
djanatyn: tadzik alluded to this blog post last night, but didn't post a link to it: strangelyconsistent.org/blog/perl-6-is-my-mmorpg
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.
oh, ok :)
(thanks)
djanatyn has been looking for ways to contribute
masak here's my tip: look for ways to have fun that involve Perl 6.
it's kind of a bottom-up approach to contributing.
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. :-)
we can hazard guesses as to what might be useful... but we can also be wrong. 16:55
djanatyn I don't know how safe it would be to give me that advice. 16:56
It took me much longer than it should have to realize that I should have been using "use strict;" ;)
16:57 donri left, Aridai left, donri joined, daxim left
masak djanatyn: do you have Rakudo installed? 16:58
djanatyn masak: Yep!
masak djanatyn: could you do me a favor? 16:59
djanatyn Is it time to install niecza?
Sure.
masak djanatyn: download github.com/masak/farm and see if you can reproduce this bug: gist.github.com/1116739
djanatyn was looking at farm
masak it's at the end of that gist. the stock shouldn't give away all of its rabbits!
djanatyn reminds me a little bit of hamurabi :D
masak I have no clue why that's happening.
kthx.
masak goes for a run 17:00
17:00 crked joined
djanatyn ...hmm. 17:02
17:02 donri left
djanatyn should it be taking over a minute for this code to run? 17:02
oh, there we go.
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
17:04 soh_cah_toa left
pmichaud need to quote the space 17:05
<-[\ ]>+
(I think that works)
crked Yes, you are right. Thank you. 17:06
pmichaud rakudo: say 'abc def' ~~ / <-[\ ]>+ /
p6eval rakudo 922500: OUTPUT«abc␤»
sorear note that \H means <-[\ \t]>, approximately, and might work for you, crked 17:07
\S includes vertical space too
well
not-includes ;)
crked Thank you. So if I want to use exact 1 space outside the char class, do I still need to quote it?
Like /[<-[\ ]>+ / or /[<-[\ ]>+\ / 17:09
jnthn excludes? :)
pmichaud spaces always have to be quoted to be matched literally. 17:10
crked Otherwise it will obey the .ws rule, right?
pmichaud in a rule, yes. 17:11
crked Thanks.
pmichaud (not in a token or regex)
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)
jnthn and moritz are +1'ing the idea
pmichaud tadzik: I really want to have a bit of time to review the code first. 17:13
tadzik okay
pmichaud what's the branch name?
podparser, yes?
tadzik yes
pmichaud is it currently up-to-date with nom?
tadzik I merged nom today 17:14
17:14 Mowah joined
tadzik 14 commits behind nom I believe 17:15
pmichaud you claimed no performance regression earlier... how was that determined?
sorear crked: only spaces in the regex proper become <.ws>. Inside a character class, they are simply ignored. 17:16
crked: m/.../ is equivalent to regex { ... }
moritz ... except that it's run immediately
sorear crked: (except that the latter makes a new lexical scope)
17:16 donri joined
tadzik pmichaud: spectest runtime 17:17
pmichaud tadzik: okay.
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
pmichaud hmmmm
(I'm reviewing the diff now.) 17:20
17:21 soh_cah_toa joined
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:21
I wish that Pod::Block wasn't "Block". 17:24
or that our current "Block" class was named something else. 17:25
there's an unfortunate pun there.
jnthn
.oO( But will it Block the merge :P )
tadzik: Was the Pod::Block name from S26 ooc? 17:26
tadzik yes
jnthn ah, ok
tadzik Damian's Perl 5 implementation has it too
pmichaud right
jnthn *nod* 17:27
pmichaud I'm just saying we might want to change that.
jnthn Yeah, I can see the potential for confusion.
pmichaud it was confusing to me in the diff to see
+ class Block {
+ has @.content;
+ }
tadzik The whole S26 also calls everything Pod6::Foo, rather than Pod::Foo
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? :)
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
pmichaud if moritz++ and jnthn++ (especially jnthn++) are comfortable with a merge, then I'm good with it.
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 :)
I know that both you and moritz++ have been following and working closely with it
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.
it was easy to follow.
(at least at a high level)
jnthn :)
pmichaud so, yes, let's get it in, then add a .WHY entry to features :-P 17:35
and then we can definitely claim that a gsoc made it into the mainline :)
and we should get some blog posts about it
and someone should get tadzik++ a beer. :)
jnthn :D 17:36
pmichaud Actually, that someone should be me. :)
jnthn tadzik++ will be at YAPC::EU, I believe. :)
pmichaud really? 17:37
tadzik :)
pmichaud oh that will be awesome
tadzik of course
pmichaud tadzik: are you presenting?
tadzik everything's booked already
pmichaud: I thought about lightning talk about how Pod and Perl 6 collaborate
jnthn tadzik: There's always a lightning talk slot...they still have those. :)
tadzik still haven't submitted that one
pmichaud yeah, but this really deserves a full talk, I think.
tadzik I didn't have a courage to take a full talk 17:38
I can try at the Perl 6 hackathon maybe :)
pmichaud a 20 minute talk, then.
tadzik so, to merge?
pmichaud I see a 20 minute slot on Monday, at 15:10
tadzik for a full talk? 17:39
pmichaud 20 minute talk, yes.
(talks are usually 20 or 40 minutes)
tadzik oh oh, who'd be there to hold me hand? :)
pmichaud 20 minutes is _nothing_
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
but that were like 12 people, from whom I knew half :)
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 :)
pmichaud that slot woudl conflict with the "why time is difficult" talk, though :-| 17:42
tadzik yes :/
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 :)
pmichaud it's generally tough to get multiple lightning talk slots at yapc::eu
but as a lightning talk would be good also. 17:44
this is one of those "oh wow" features of Perl 6 that tends to get people interested and excited
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
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 :)
tadzik I'd like to give one, but it's probably too late to find a good slot for that
on monday everyone's coming for Time anyway 17:47
jnthn brb, dinner
tadzik maybe we can make it a Hackathon feature
so, are we merging podparser?
pmichaud well, that may be because there's nothing else they really want to see in the other tracks
tadzik: I've given my approval. :)
tadzik okay :) Find yourselves a trenches
pmichaud it's up to you, jnthn++, and moritz++ after that :)
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
tadzik yes, I've done that already
I'll do some nice blogging after that
pmichaud +1
tadzik especially since the remaining GSoC stuff is basically Formatting Codes, DOC use, the remaining cases of .WHY, default DOC INIT... hmm 17:49
maybe a more polished Pod::To::Text 17:50
and Pod::Parser module. Fin
that was one productive day today
yapceurope.lv/ye2011/talk/3717 17:55
masak djanatyn: hi, I'm back from my run. I see you got the program running. 17:58
djanatyn: did you also manage to reproduce the bug?
djanatyn masak: nope :\
I did manage to get the game running, though!
masak yes, kudos.
djanatyn I'm...not exactly sure how to play the game.
masak ah.
I guess it's not self-evident.
have you found the README.md?
pmichaud tadzik: 3717 gives me a 404 Not Found 17:59
tadzik weird
i.imgur.com/RPhGD.png though
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
masak thought it might :) 18:00
lichtkind cheers
tadzik hello lichtkind 18:01
lichtkind :)
masak djanatyn: fwiw, the short-term goal is to have automated players, coded in Perl 6, play this game against each other. :)
djanatyn Huh. Seems like a pretty fun game.
masak but got to iron out all the bugs first.
tadzik we must play it at the YAPC
masak yes \o/
djanatyn YAPC? 18:02
masak Yet Anoterh Perl Conference.
djanatyn !
Where is that?
masak the one 's up next is in Europe.
djanatyn I'd love to attend.
jnthn tadzik: Same in master
djanatyn Oh. never mind ._.
masak the one 's just was was in the US.
tadzik mhm
[Coke] finds some coffee.
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.
djanatyn [Coke]: Lucky :P
masak: Ooh, nice.
masak ...and in Asia, and in Russia...
djanatyn Where in the US was this Perl Conference?
jnthn oh noes
[Coke] moritz: (forgot to commit) I look clean here. maybe I wasn't full up to date before I /did/ the fudges? hurm.
jnthn nom: my ($a, $b, $c); say "$a!$b!$c"
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)␤»
jnthn grrr
djanatyn installs panda 18:04
tadzik (:
djanatyn last night, I was so tired that I forgot to run "make install" >_>
I was just running the perl6 executable from the rakudo directory
jnthn Guess it's the interpolation thing. :/ 18:05
But I'm a bit surprised it's hitting the action method.
18:07 mj41 joined
moritz jnthn: I'd be fine with changing that test, because it's not about interpolation syntax, but about captures 18:08
jnthn moritz: well, I need to try and fix the interpolation bustage too 18:09
[Coke] is resycning and refudging. 18:10
(though the resync will take tensofminutesw
jnthn [Coke]: I'm working on it Right Now, so feel free to leave it. 18:11
[Coke]: Especially as I'm looking at captures generally at the moment too.
18:12 am0c left
[Coke] hoaky 18:12
er, okay. 18:13
Sorry I screwed it up
jnthn [Coke]: Huh? I screwed it up more than you :)
tadzik rakudo: my $c = 1; say $c >== 2 18:14
p6eval rakudo 922500: OUTPUT«Bool::False␤»
tadzik what is that >==?
masak rakudo: my $x = 1; $c >== 2; say $c 18:15
p6eval rakudo 922500: OUTPUT«Rebuild in progress␤»
masak grr.
[Coke] oh. then *whew*
18:16 soh_cah_toa left
[Coke] ugh. it really is going to take 10 minutes to compile the setting, isn't it. *sigh* 18:16
18:16 soh_cah_toa joined
pmichaud >== is likely the assignment metaop form of >= 18:17
tadzik oh, it's like +=
spectest clean on podparser, besides the known capture bug. Merging, take cover... 18:18
dalek kudo/nom: d74aaa8 | tadzik++ | / (19 files):
Merge branch 'nom' into podparser
18:19
tadzik oh, I expected something more effective :) 18:20
oh, that's not it yet
masak std: my $x = 1; $c >== 2; say $c
p6eval std 516268a: OUTPUT«===SORRY!===␤Variable $c is not predeclared at /tmp/Ec1fjQ0nZC line 1:␤------> my $x = 1; $c⏏ >== 2; say $c␤Can't make assignment out of >= because chaining operators are diffy at /tmp/Ec1fjQ0nZC line 1:␤------> my $x = 1; $c…
masak std: my $c = 1; $c >== 2; say $c
p6eval std 516268a: OUTPUT«===SORRY!===␤Can't make assignment out of >= because chaining operators are diffy at /tmp/3WqZa0yz2t line 1:␤------> my $c = 1; $c >==⏏ 2; say $c␤Check failed␤FAILED 00:01 121m␤»
masak there you go.
tadzik no, that's it. Commit message's wrong 18:21
18:22 Su-Shee left
tadzik weird. Anyway, podparser landed :0 18:24
:)
jnthn \o/
tadzik++ tadzik++
masak tadzik++!
[Coke] tadzik++ 18:25
tadzik now it will get some testing, you want it or not :P
now, the blogging 18:26
moritz wants
18:26 espadrine left
djanatyn masak: *poke* 18:27
so, about using this HTML::Template library that I just installed with panda...
do I use it just like I would in perl 5?
masak djanatyn: depends what you mean by "just". 18:28
the basics are the same: 'use HTML::Template;'
moritz perl6: class Foo { method !a() { say "!a" }; method public() { self!a }; Foo.new.public 18:29
p6eval niecza v8-9-g2bbb19a: OUTPUT«===SORRY!===␤␤Unable to parse block at /tmp/Rxu4iVvJDN line 1:␤------> class Foo {⏏ method !a() { say "!a" }; method public␤Couldn't find final '}'; gave up at /tmp/Rxu4iVvJDN line 1 (EOF):␤------> thod public() { se…
..pugs: OUTPUT«*** ␤ Unexpected "{"␤ expecting operator, ":", "," or "}"␤ at /tmp/Lj7J62cD5G line 1, column 25␤»
..rakudo 922500: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
djanatyn Would I use "HTML::Template.new" instead of "HTML::Template->new"?
moritz djanatyn: well yes, you need to use the Perl 6 syntax. Look at the tests for example 18:30
masak djanatyn: you would.
djanatyn *oh*!
that's what the "t" directory is :D 18:31
djanatyn was looking for examples in the git repo, but couldn't find them
[Coke] aye, that'll have some samples, usually.
tadzik erm, did the merge actually get it to github? 18:33
18:33 Su-Shee joined
tadzik okay, it did 18:33
masak tadzik: it did if dalek reported it.
tadzik I just got confused by the commit messages 18:34
[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
[Coke] writes a program to figure out which tests we're not running might be worth fudging. 18:37
djanatyn hmm.. 18:42
I feel stupid, but I can't figure out what I'm doing wrong :P
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 ?
(and no. ;)
moritz [Coke]: it runs all tests that a 'make spectest' doesn't run 18:45
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. ;)
djanatyn I'm calling it as such: $template.param(FOO => $bar);
moritz and does .param actually want a named argument?
djanatyn not sure, how can I check? 18:48
moritz read the documentation (if it exists), read the tests
[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.
Thanks for the advice, reading the tests helped.
[Coke] moritz: it seems to generate non-sensical output, e.g.: [ PA] ( 0/2 )
djanatyn ...hmm. 18:52
moritz [Coke]: have you seen the first 5 lines of output? 18:53
[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
moritz or if the harness miscounts 18:55
[Coke] .... fair enough.
tadzik wordpress-- 18:56
djanatyn Is there any obvious reason why my template object's output method is returning "Any()"? 18:57
flussence usually means it's returning an undef thing 18:58
djanatyn Ah, that would kinda make sense.
moritz rakudo: class A { method !private() { } }
p6eval rakudo 922500: ( no output )
moritz niecza: class A { method !private() { } }
p6eval niecza v8-9-g2bbb19a: ( no output )
moritz rakudo: class A { submethod private() { } } 18:59
p6eval rakudo 922500: ( no output ) 19:00
moritz niecza: class A { submethod private() { } }
p6eval niecza v8-9-g2bbb19a: ( no output )
19:00 thundergnat joined 19:02 birdwindupbird left
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 gist.github.com/1117089 for the last "round". 19:04
sorear is player_1 an AI? 19:05
thundergnat sorear: no, me playing both players
dalek ast: 96fb4d9 | moritz++ | S02-builtin_data_types/int-uint.t:
make autoskipping smarter in int-unit.t
djanatyn Man, my code can't get much simpler than this. 19:06
gist.github.com/1117074 <-- anyone know what's going on here?
I'm not really sure why it's returning Any(). 19:07
dalek kudo/nom: 0f60583 | jonathan++ | src/Perl6/ (2 files):
Avoid interpolation bug with private methods, introduced earlier today.
19:09
ast: abea019 | jonathan++ | S02-builtin_data_types/capture.t:
Unfudge some capture tests for nom.
19:10
tadzik loliblogg'd! ttjjss.wordpress.com/2011/07/31/gso...as-landed/ 19:14
19:16 mj41 left
dalek atures: ed0395c | moritz++ | features.json:
private methods, submethods
19:16
pmichaud back from lunch 19:18
jnthn moritz: trusts could be another addition there too 19:19
dalek atures: d19425f | moritz++ | features.json:
trusts
19:21
moritz jnthn++ 19:22
jnthn likes seeing rows where nom beats master :)
19:24 arnsholt joined
tadzik it's good it's better at the LoLs :) 19:24
tadzik encounters another double-bacon-alike bug 19:25
19:25 arnsholt left
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.
tadzik snap
sorear luckily, the grammar is set up quite deliberately to make backtracking over a general expression impossible 19:26
19:27 arnsholt joined
moritz tadzik: there's not much backtracking in the rakudo grammar, or in STD for that matter 19:28
tadzik for some reason my pod_content_toplevel passes twice for the same block 19:29
that's easily workaroundable, fwiw
try wklej.org/id/570460/ for example
pmichaud I don't know to what extent backtracking over whitespace has been avoided.
(where "whitespace" means <.ws> which includes pod comments) 19:30
moritz tadzik: check $/.from and $/.to in the action method to be sure
jnthn tadzik++ # excellent blog post 19:31
tadzik moritz: I checked ~<pod_block>, can check the match to
djanatyn Wow, input is kind of weird. 19:32
How could I grab a line from the user, and assign it to a variable, "$var"?
pmichaud djanatyn: my $var = prompt "enter a line, user" 19:33
djanatyn oh!
tadzik moritz: yes, exactly the same matches
moritz or my $var = get; # without the prompt
tadzik how do I compare two objects in nqp, if they're the same thing?
pmichaud =:= should work
if not, maybe pir::issame__IPP(...) 19:34
tadzik I feel like writing something like "How to live with NQP"
flussence is rewriting progress-graph.pl from scratch using Chart::Gnuplot... just because.
tadzik okay, =:= works fine 19:35
flussence (well, I wanted to see if it can handle arbitrary dates properly)
dalek kudo/nom: da964eb | tadzik++ | src/Perl6/Actions.pm:
Workaround a backtracking issue, don't add the same block to $=POD twice
19:37
pmichaud that workaround could get very expensive :( 19:38
tadzik possibly, yes
pmichaud I'm guessing the problem is in statementlist
tadzik hmm, it could get pretty cheap if we iterate backwards 19:39
jnthn Not in the case you don't find it.
tadzik oh, true
jnthn hash of positions you saw POD blocks already would be cheap
pmichaud yes, then it's _really_ expensive. O(n**2)
tadzik hmm
jnthn O(1) to check 19:40
pmichaud [
| $
| <?before <[\)\]\}]>>
| [<statement><eat_terminator> ]*
{ self.mark_sinks($<statement>) }
]
that backtracks over <.ws>
(many times)
tadzik is it alike in STD?
pmichaud that is from STD.
tadzik oh
pmichaud well, it doesn't backtrack if LTM is in place.
maybe.
tadzik jnthn: is there a way to get that identifier of the serialized object in nqp? Like Pod::Block<12459125> 19:41
We could make a hash of those, O(1) then
19:42 molaf_ left
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)
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
moritz not in .de 19:44
jnthn tadzik: See .perl, but it uses get_addr
19:44 thundergnat left
pmichaud might be able to use nqp::which 19:44
er, nqp::where
jnthn oh, which pmichaud++ has added an NQP op for :)
right, where.
tadzik that's a memory address? 19:45
pmichaud yes.
it's the address (or unique ID) of the PMC
tadzik cool 19:46
works fine 19:48
pmichaud we probably need to find a way to avoid re-calling the action method, though. 19:49
tadzik memoization :)
pmichaud might be able to use <?MARKER ...> or something like that. 19:50
afk for a while, soccer match 19:51
dalek kudo/nom: eef0851 | tadzik++ | src/Perl6/ (2 files):
Optimize the already-added block lookup
19:52
19:58 MayDaniel joined 20:02 y3llow left 20:03 shachaf left 20:05 kaare_ left 20:06 y3llow joined, shachaf joined
dalek kudo/nom: 0934d74 | jonathan++ | src/core/ (2 files):
Add back some methods for coercing to a Capture.
20:07
kudo/nom: ac3cb1e | jonathan++ | src/Perl6/SymbolTable.pm:
Stash sub-signature in Parameter object.
kudo/nom: 6a9ab9c | jonathan++ | src/binder/bind.c:
Get nested signature handling in the binder basically working again.
kudo/nom: b5a8621 | jonathan++ | src/binder/bind.c:
Eliminate an unused variable to avoid a warning.
masak gets bleary-eyed from staring at listings of [[]][][[]] strings 20:15
moritz transliterate them to A and B or so 20:17
masak yes, or . and O 20:20
moritz l and 1 :-) 20:21
20:24 Su-Shee left
masak moritz: ;) 20:24
20:25 Su-Shee joined 20:28 Reaganomicon joined 20:38 SHODAN left, Moukeddar joined
Moukeddar Hello \o 20:39
20:39 rgrau joined
masak Moukeddar! \o/ 20:40
Moukeddar how are you Sir? 20:41
masak thank you Sir, I am well. how about you, Sir?
Moukeddar Doing very well actually :) my Kind Sir
sorear Moukeddar! \o/ 20:42
Moukeddar Hi sorear :), i'm happy to be here :) 20:43
masak Moukeddar: no Sir, you are the kind Sir... Sir. :)
Moukeddar what's cooking ? 20:44
Sir, Yes Sir :)
tadzik nom :P
masak lasagna.
mmmm.
Moukeddar mmmmmm.....Garfield
masak ...without Garfield :P 20:45
Moukeddar i mean , what are your current projects :)
and garfield is a badass :)
masak Moukeddar: I wrote an adventure game, and then I wrote a game for trading farm animals :) 20:46
Moukeddar Nice :), i'm writing an app to calculate prayer times using longitude and latitude :) 20:47
20:47 steampunkey joined
masak Moukeddar: good. we need more Islamic influences in here. 20:48
Moukeddar: if you write it in Perl 6, make sure to share.
Moukeddar and i'm thinking of making it a webservice :)
masak Moukeddar: also, have a look at DateTime in Rakudo.
Moukeddar perl6 ? that would be a good port :)
just need to finish it first, the astro calculations are baffling
hey, i'm using the comma in a good way now :) 20:49
20:50 MayDaniel left
masak Moukeddar: so you are :) 20:51
Moukeddar++
Moukeddar thanks :) 20:52
masak karma Moukeddar
aloha Moukeddar has karma of 3.
Moukeddar karma? what's that? 20:53
20:53 soh_cah_toa left
Moukeddar i'm downloading OpenSuse, sounds like the right distro to me :) 20:55
20:56 shinobicl joined
shinobicl hi 20:56
Moukeddar shinobi , oh that was a nice game :) 20:57
shinobicl yes it was :)
i have a dilemma
Moukeddar why is that?
shinobicl from Jul-7-2011 to Jul-14-2011
how many weekdays are?
Moukeddar weekdays? 20:58
masak shinobicl: depends how you count the endpoints, I guess.
Moukeddar 8 days if you cound the start and end
shinobicl ah ok
and from Jul-7-2011 to Jul-7-2011?
one or zero? 20:59
Moukeddar wut?
masak shinobicl: you need to define the question more clearly for there to be clear answers.
20:59 noganex_ joined
Moukeddar that's one day 20:59
shinobicl one day.. ahmm ok..
masak shinobicl: when you say "from .., to ...", what do you mean? what will you use this information for?
Moukeddar sure it's a dilemma
shinobicl the thing is excel thinks like Muokeddar
masak no, it's not a dilemma.
it's an underspecified problem :)
shinobicl MS Excel has NETWORKDAY function
that reasons like Moukeddar did 21:00
but i'm not convinced yet
Moukeddar that's how i count :)
masak if the question is "how many workdays are in this interval?", then I agree with Moukeddar and Excel.
Moukeddar thanks to mom ;)
masak if the question is something else, then I may not agree. :)
Moukeddar hope that helps shinobicl 21:01
shinobicl i want to implement a funtion that says "how many workdays until some date"
with the Excel logic, it should be "There is one day from Friday to Friday"
Moukeddar then you calculate the diff than add 2 : the start and the end
Su-Shee shinobicl: work day or week day?
shinobicl "two days from Friday to Monday"
workday
Moukeddar it's the same day 21:02
so not 2
21:02 noganex left
Su-Shee shinobicl: that's defined by law per country. 21:02
Moukeddar Su-Shee, didn't know that
shinobicl oh, didn't knew that... But i need to stick to one logic
Su-Shee and I would expect any software actually calculating _work_ days to obey that definition
shinobicl so i guess i should stick to what Excel says
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
important subtleties
Su-Shee I'm pretty sure excel can distinguish for example wether sunday counts as workday or friday does not.
shinobicl Oh, no, you have to speify a range with cells speifiyng the holidays
Su-Shee sorear: exactly
Moukeddar depends on the PC culture
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)
Su-Shee shinobicl: you're touching heavy business logic with "work days", be careful. 21:05
21:05 benabik left, kolibrie left, benabik joined
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:05
Moukeddar Good luck shinobicl 21:06
21:06 jferrero left
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:06
shinobicl su-shee, that's what i have until now: github.com/shinobi/TaskScheduler/b...alendar.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 ;)
shinobicl i can use the workdays using holidays, or not.
and specify the workweek too 21:08
Su-Shee I would make holidays a role externally.
[Coke] returns from driving his son to a ... not a playdate. jam session?
shinobicl i work in as support in a financial software
Su-Shee same for weekends
shinobicl each country has it's own calendar
and workweeks
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.
sorear Su-Shee: is that a function of the $TOP_LEVEL_ADMINISTRATIVE_SUBDIVISIONS?
(Bundes right?)
[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
[Coke] (probably because there are too many jurisdictions) 21:10
Moukeddar [Coke], seriously?
Su-Shee sorear: here, yes. I don't know who of all the institutions actually does it ;)
sorear that would be useful information to have in the zoneinfo files
those *already* define a 2D map (jurisdiction x year -> offset)
and it's more than just the offset, as they do procedural stuff like DST shifts
Su-Shee I think it actually is in de/DE, ch/DE and at/DE locales..
[Coke] Moukeddar: yes. 21:11
sorear is ch/DE the same as de_CH?
lang=de country=ch
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
thanks for the feedback :)
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?
Su-Shee for holidays exactly.
shinobicl and how do i get acess to locale info in perl6?
Su-Shee shinobicl: I have no idea :) 21:15
21:15 Coleoid joined
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 ;)
shinobicl y m d ?
Su-Shee shinobicl: in your culture. I can't parse that.
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
shinobicl: use one of the standards but let users input it in a couple of common formats
benabik Generally I see YMD written with -, as in 2011-07-31
shinobicl i'll improve on that 21:18
21:19 Coleoid is now known as Coleoid_
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
21:19 jferrero joined
Su-Shee shinobicl: use something giving you sorting for the cheap :) 21:19
kthakore_ hi perl6 21:20
tadzik hello kthakore_ 21:21
masak hi kthakore_ 21:22
Coleoid_ Hi, kthakore_.
Good *, #perl6. 21:23
masak good *, Coleoid_
sorear: July 4 is a workday in Sweden, provided it's a weekday.
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?
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.
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.
benabik masak: And how does one write a custom setter method? Is it returning an lvalue with an appropriate STORE method? 21:27
masak benabik: ideally, you'd just make any method 'is rw'. 21:28
benabik: as in 'method foo() is rw { ... }'
don't think that works yet in Rakudo.
benabik masak: How would you do validation on the value?
masak but I also think that all methods are 'is rw' by default :)
benabik masak++
masak benabik: with a .STORE method, yes.
benabik: you'll probably have lots more luck getting that to work in nom.
jnthn Certainly. nom knows about 'is rw' too 21:29
masak \o/
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.
masak everything is just so... perfect... in nom-land :)
Moukeddar lasania 21:30
masak benabik: I see. that's fine, too.
Moukeddar lazania
masak Moukeddar: lasagna.
Moukeddar ah, right
tadzik lazania!
shinobicl masak: i have defined that the amount of days between 2 days is the same as day1+amount = day2
jnthn masak: not perfect yet :P
benabik lazania++
masak Moukeddar: the spelling is Italian, where 'ng' is pronounced 'ny'.
jnthn: sssh! don't ruing my daydream! :P 21:31
Moukeddar thanks for the Tip :)
jnthn masak: nom is SO wonderful that occasionally a rainbow burts forth from the REPL!
masak er, I meant 'gn', of course.
sorear masak: that's what I meant. Actually I'm suprised, I expected Excel to be more UScentric.
shinobicl that's way the Excel way doen't make sense to me. But it's Excel, it can't be THAT wrong.
jnthn *bursts
masak jnthn: I've been wanting the rainbow-REPL feature for *ages*! \o/
jnthn
.oO( well, we have ANSI::Term::Color... :) )
21:32
benabik Shouldn't it be called nyan instead of nom then?
The phrase "Excel can't be THAT wrong" makes my head hurt.
tadzik jnthn: it works in nom too :) 21:33
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
er, readonly
benabik jnthn: \o/
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)␤»
jnthn nom: sub foo() is rw { my $a = 42; $a }; foo() = 100
p6eval nom: ( no output )
Moukeddar masak, what's a good way to optimize heavy calculations? 21:37
using parallel maybe?
masak Moukeddar: first off, (1) make it run, (2) make it run correctly, (3) make it fast.
Moukeddar: there's something called "premature optimization" that you need be aware of.
Moukeddar i'm at step 2 , premature ? like using No-SQL ? 21:38
masak probably.
Moukeddar is it good?
masak usually the choice of algorithm is the most important choice you make for speed.
after that, you measure, and you apply fixes judiciously. 21:39
Moukeddar there's nothing i could optimize there, just plain math calculations
masak are we still on the latitude/longitude thing? 21:41
Moukeddar yes
masak that shouldn't be too computationally heavy.
Moukeddar it is a bit heavy 21:42
21:44 Psyche^ joined
Moukeddar i first need to fix something, it returns the wrong Equation of Time 21:44
masak yup still at step 2... :) 21:47
21:47 Patterner left, Psyche^ is now known as Patterner
tadzik g'night #perl6 21:48
jnthn night, tadzik 21:49
Moukeddar true 21:51
djanatyn Uhh, I made a game thing in pure perl6 :D 21:52
benabik Nom seems a little funny. It's grinning all the time. :D 21:53
djanatyn You mean the branch of rakudo? 21:54
21:55 wolfman2000 left
benabik djanatyn: Yes. `git grep ':D' | wc -l` == 288 21:56
masak TimToady: there's this algorithm: 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.
TimToady masak: I have a solution for you
masak o.O
djanatyn: you did? show us! 21:57
TimToady: so, where's the solution? :)
djanatyn masak: one sec
TimToady gist.github.com/1117259
runs much faster under niecza 21:58
djanatyn Umm, how could I say, not "eq"?
21:58 Mowah left
djanatyn as in, return true if string "foo" is *not* equivalent to string "bar" 21:58
without using unless ;)
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
jnthn djanatyn: ne
masak I must've missed that. 22:00
TimToady: so it's basically using a triangular matrix of weights to steer the random choices?
TimToady irclog.perlgeek.de/perl6/2011-07-31#i_4196730
Tene djanatyn: ne
djanatyn Tene: thanks 22:01
jnthn: thanks
Tene oh, EtooLATE
22:01 drbean joined
TimToady masak: correct, you just have to construct the weights from the end 22:01
masak ah, it was Aron who figgered it out. :) 22:02
Aron++ TimToady++
22:02 Moukeddar left
TimToady you can run the lop to 10000 in niecza in a reasonable amount of time 22:02
masak tweets the solution
TimToady and the statistics appear to even out
djanatyn pastebins his *cough* game
It looks like Perl 5 >_>
well, knda
*kinda
TimToady in fact, I can generate 100000 of them in 11 seconds on my machine 22:03
(using niecza)
djanatyn gist.github.com/1117266 <-- take a look at the array, @map 22:04
It's...messy-line-noise-perl. :) 22:05
masak djanatyn: ooh!
djanatyn: hm, you're depending on a parsing bug in Rakudo.
djanatyn: using @map before declaring it.
djanatyn heh. :)
masak djanatyn: for future portability, I'd recommend not doing that... 22:06
anyway, kudos!
djanatyn Yeah, doesn't seem too difficult to just move @map further up.
benabik djanatyn++
djanatyn Well, it's still really messy.
I mean, look at how it handles walking.
masak ah! so the level is hidden to the player, and she has to guess her way forward? nice. 22:07
I wrote a game like that once :)
called it BONQ.
djanatyn Hah :D
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
just a suggestion. ;) 22:11
djanatyn thanks :)
djanatyn is really trying to make his code cleaner, more maintainable, and more readable.
So I'm migrating from p5 to p6 ;)
masak \o/ 22:13
djanatyn masak: What do you write Perl 6 in, vim? 22:15
masak djanatyn: yes. 22:18
djanatyn Woah, wait a second here. 22:20
subroutine declarations include parameters? O_o
So, no more "my ($self) = @_;" and all that?
Woah!
masak :D
djanatyn I mean...*woah*
that's crazy
masak pretty neat.
djanatyn I feel like I should go tell all my friends.
Of course, they don't write Perl. :) 22:21
masak and that's just the beginning. trust me.
djanatyn I've only been playing with Perl 6 for what, two days?
I already feel obligated to help, because I like awesome things.
And Perl 6 is that.
obligated isn't the right word, though. Do you understand what I mean? 22:22
I want to do *something* make this awesome thing more tangible.
masak djanatyn: compelled. 22:24
djanatyn Yes. :D 22:25
And wow, that's why I could just use @array[0][0] instead of $array[0][0]
sigils don't matter o_o
masak well, they do. 22:26
but they matter in a simpler way than Perl 5.
@array is always @array.
even if you index an element.
22:27 rgrau left
masak djanatyn: also, in Perl 6, you can do @array[ 0 ; 0 ]. provided you declare @array to be two-dimensional. 22:27
djanatyn ...umm, wow. That would make things a little easier :D 22:28
TimToady NYI though
masak (doesn't work in Rakudo or Niecza yet, though)
djanatyn had to mess with two dimensional arrays a lot when working on his perl6 roguelike.
masak let's see who gets it first :P
my bets are on Niecza.
djanatyn It was somewhat of a pain in the neck to load a raw text file into a two dimensional array.
Which was really just an array full of anonymous arrays.
masak right. 22:29
djanatyn I had a bunch of text files with characters seperated by spaces.
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
it got a little messy, and when I woke up it was hard to tell what was going on.
I'm sure that a talented perl 5 programmer could have implemented a better solution, or even the same solution with cleaner code, though.
masak it mostly comes down to practice, IMHO. 22:31
Tene .ie 22:32
masak Tene: Ireland? 22:35
masak *finally* found the farm.pl trading bug himself 22:37
riddle: when does 59 min 6 come out as 59? 22:38
djanatyn Uhh. Sorry about that. ^_^;
masak: He was agreeing with you.
jnthn masak: When one is a string.
or both
:)
djanatyn {.ie} is lojban (a constructed language based on logic) for "agreement" 22:39
masak jnthn: right. "59" min 6 in this case.
djanatyn Tene does not live in Ireland :)
masak oh. Lojban :)
I'm aware of it, though I don't speak it.
why did they pick Ireland for indicating agreement? :P
this bug could've been averted if we'd had typed hashes :) 22:43
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 :)
you Lojbanists. always doin something crazy 22:47
'night, #perl6
22:47 masak left, wolfman2000 joined
jnthn Teaching tomorrow...should sleep o/ 22:51
23:00 MayDaniel left
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)␤»
benabik Bah.
If I'm reading src/core/Stringy.pm:23 correctly `[ne] "a"` will be true… Which seems wrong. 23:02
benabik doesn't know how to trigger one arg infix without [] meta-op. 23:03
[Coke] rakudo: [ne] "a"
p6eval rakudo 922500: ( no output )
[Coke] rakudo: say [ne] "a"
p6eval rakudo 922500: OUTPUT«Bool::True␤»
[Coke] yah, I think false is a better answer there.
benabik rakudo: say [eq] "a"
p6eval rakudo 922500: OUTPUT«Bool::True␤»
benabik ^^^ That's my problem with it. 23:04
rakudo: my @a = "a"; say [ne] @a; say [eq] @a
p6eval rakudo 922500: OUTPUT«Bool::True␤Bool::True␤»
benabik Also, perl6.org/compilers/features says nom doesn't do CATCH, but it looks like jnthn implemented it in 0dc9006 23:06
23:10 pochi joined 23:17 PacoLinux joined
[Coke] one of the disadvantages of having a features list not based on the actual spectest run. 23:25
benabik: you have commit rights to github/perl6, no? 23:26
23:27 fbass joined, fbass left 23:28 fbass joined 23:34 lue joined 23:35 rdesfo joined 23:38 wamba left, Chillance left, tokuhirom joined 23:42 whiteknight joined 23:46 [particle]1 joined 23:47 [particle] left
benabik [Coke]: I don't think so. I've just hacked on parrot to date 23:49
pmichaud S03 is pretty clear that one-arg [ne] returns True. 23:53
Same for [!=]
rakudo: say &infix:<ne>('a');
p6eval rakudo 922500: OUTPUT«Bool::True␤»
pmichaud nom: say &infix:<ne>('a');
p6eval nom: OUTPUT«Bool::True␤»
pmichaud S03:4462
benabik: what's your github id? 23:54
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?
rakudo: say :2("0.1"); 23:58
p6eval rakudo 922500: OUTPUT«0.5␤»
pmichaud looks like it works to me :-)
lue no, base 10 *to* other bases [imagine .fmt("%x") working with fractional numbers, not just integers] 23:59