Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-03-17

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:40 arnsholt ENOPHENNY
00:41 arnsholt jnthn: There's a hardcoded REPR id for the bigint REPR in sixmodelobject.pmc I suspect is bitrotted
00:41 diakopter should be a symbol, yeah
00:41 census joined #perl6
00:41 timotimo what does "Postcircumfix calls can be cached now." mean? o_O
00:42 diakopter invoking a thing
00:43 diakopter (I assume it means the lookup of the postcircumfix:<()> method is cacheable
00:43 diakopter )
00:44 timotimo oh, interesting
00:44 jtpalmer joined #perl6
00:45 timotimo GlitchMr: you didn't mention the merge of md-nqp for rakudo in your blog post ;)
00:47 timotimo so md got slower, but () calls get faster
00:47 timotimo hmm
02:03 timotimo i've found a strange bug with my lexical suggestion code
02:07 timotimo hmm
02:08 timotimo when i have our sub foobar and our sub foobaz in Test.pm6 and then use Test and foobar(); foobaz(); in otherfile.pl6, i get     foobar used at line 3. Did you mean '&foobaz'?
02:08 timotimo foobaz used at line 4. Did you mean '&foobar'?
02:14 lue r: {sub abc() { say "A" }; sub abd { say "B" };}; abc(); abd();
02:14 p6eval rakudo d98dd5: OUTPUT«[31m===[0mSORRY![​31m===[0m�Undeclared routines:�    abc used at line 1. Did you mean '&abs'?�    abd used at line 1. Did you mean '&abs'?��»
02:14 lue r: {our sub abc() { say "A" }; our sub abd { say "B" };}; abc(); abd();
02:14 p6eval rakudo d98dd5: OUTPUT«[31m===[0mSORRY![​31m===[0m�Undeclared routines:�    abc used at line 1. Did you mean '&abs', '&abd'?�    abd used at line 1. Did you mean '&abs', '&abc'?��»
02:58 FROGGS_ joined #perl6
03:04 orafu joined #perl6
03:41 woosley joined #perl6
03:56 timotimo lue: you found it. great!
04:15 lue r: {our sub xyzzy() { say "A" }; our sub xyzzyx { say "B" };}; xyzzy(); xyzzyx(); # not limited to character replacement, it seems
04:15 p6eval rakudo d98dd5: OUTPUT«[31m===[0mSORRY![​31m===[0m�Undeclared routines:�    xyzzy used at line 1. Did you mean '&xyzzyx'?�    xyzzyx used at line 1. Did you mean '&xyzzy'?��»
04:17 timotimo the problem is the way lexicals are discovered
04:17 lue yeah. I just wanted to see if was only occurring with character replacement cases.
04:19 timotimo nah, the calculation does a full levenshtein distance search
04:20 JimmyZ joined #perl6
04:22 JimmyZ r: { our sub xyzzy() is export { say "A" }; our sub xyzzyx { say "B" };}; &xyzzy(); xyzzyx();
04:22 p6eval rakudo d98dd5: OUTPUT«[31m===[0mSORRY![​31m===[0m�Undeclared name:�    &xyzzy used at line 1�Undeclared routine:�    xyzzyx used at line 1. Did you mean '&xyzzy'?��»
04:24 lue r: {our sub xyzzy() { say "A" };}; xyzzy();
04:24 p6eval rakudo d98dd5: OUTPUT«[31m===[0mSORRY![​31m===[0m�Undeclared routine:�    xyzzy used at line 1��»
04:26 preflex joined #perl6
04:34 timotimo lue: https://github.com/timo/rakudo/​blob/nom/src/Perl6/World.pm#L50
04:44 preflex_ joined #perl6
04:51 kshannon joined #perl6
04:54 Sifr Does this still hold for perl6, http://perldoc.perl.org/perlstyle.html ?
04:54 Sifr or is there a newer version at all?
04:55 timotimo you don't have to (and i don't think even can) use "use strict"
04:56 Sifr Oh great. Is 'use warnings' still used?
04:56 Sifr I am just figuring out a project to do in perl6/reading documentation
05:14 isBEKaml joined #perl6
05:20 sorear n: $x = 5; say $x;
05:20 p6eval niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31​m===[0m��Variable $x is not predeclared at /tmp/urF95bLA6X line 1:�------> [32m<BOL>[33m�[31m$x = 5; say $x;[0m��Variable $x is not predeclared at /tmp/urF95bLA6X line 1:�------> [32m$x = 5; say [33m�[31m$x;[0m��Unhandled exc…
05:20 sorear n: no strict; $x = 5; say $x;
05:20 p6eval niecza v24-35-g5c06e28: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at Niecza.StashCursor.Core (System.String key, Boolean final, Niecza.StashCursor& sc, Niecza.Variable& v, Niecza.Variable bind_to) [0x00000] in <file…
05:20 sorear n: no strict; $x := 5; say $x;
05:20 p6eval niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![3​1m===[0m��Cannot find definition for binding??? at /tmp/zQh9Y_svSm line 1:�------> [32mno strict; $x := 5[33m�[31m; say $x;[0m��Unhandled exception: Check failed��  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) …
05:20 sorear hey, someone broke no strict in niecza
05:29 isBEKaml joined #perl6
05:32 am0c joined #perl6
05:32 kaare__ joined #perl6
05:42 woosley joined #perl6
05:47 isBEKaml hello, #perl6!
05:58 m0ss joined #perl6
06:05 isBEKaml (To any debian users here): What's the convention used by Debian to generate Debian native packages? dh_make?
06:07 SamuraiJack joined #perl6
06:13 vaelxon joined #perl6
06:31 isBEKaml joined #perl6
06:36 census joined #perl6
06:42 rmp joined #perl6
06:45 sorear isBEKaml: if you have a source package, cd into it and run "debian/rules build"
06:45 sorear you might have to do some config step first
06:45 sorear dh_xxx are helper commands for use by the debian/rules file.  They do not need to be used by debian/rules, and should NEVER be run manually
06:46 sorear to clarify part 2: debian/rules is free to use the helpers or not, as long as the result is the same
06:46 isBEKaml sorear: Well, the reason I asked for that info is to help in building a similar R* binary for Slackware.
06:47 isBEKaml sorear: I'm also looking at debian maintainers' guide. Non-relocatable binaries are a problem in building packages for slackware.
06:48 isBEKaml sorear: I'm currently experimenting with fakeroot to see if that helps in mitigating this problem.
06:48 sorear isBEKaml: i guess I'm unsure precisely what you're asking
06:48 sorear debian binary packages are created using /usr/bin/ar
06:48 moritz fakeroot just fakes being a user "root"
06:49 moritz so I don't see how it helps with relocation
06:49 sorear isBEKaml: why are you asking about debian packages if you actually want to know about slackroot packages?
06:49 isBEKaml moritz: with the cwd marked as root?
06:49 sorear isBEKaml: no
06:50 sorear root user and root directory have literally nothing to do with each other
06:50 moritz isBEKaml: fakeroot fakes a *USER* root, not a path
06:50 isBEKaml sorear: Well, it looks like perl6 was successfully was built for debian packages. I was asking after how it does that.
06:50 moritz isBEKaml: maybe you are confusiong fakeroot with chroot?
06:50 sorear isBEKaml: by someone with the mindset to memorize thousands of pages of completely arbitrary rules spread across dozens of debian policy manuals
06:51 sorear Oh wait
06:51 sorear I think I get it
06:51 sorear You're trying to find out how Debian gets around relocatability problems
06:51 isBEKaml moritz: chroot was what I thought at first - but when I looked over at debian maintainer's guide, it mentioned fakeroot.
06:51 isBEKaml sorear: yes
06:51 sorear It doesn't.
06:52 isBEKaml oof
06:52 moritz I think the rakudo packages build binaries that expect to be installed in /usr/
06:52 isBEKaml sorear: Doesn't debian use a sandbox folder to compile all binaries and build a final packages using relative paths?
06:52 sorear In order for something to be buildable using the standard Debian process flow, it _absolutely must_ be possible to build and install with PREFIX=$PWD/package/ and then copy the binaries to /
06:53 moritz so that means when they are built $SRC_DIR/debian/<whatever>, they simply won't work in that location
06:53 moritz but they'll work again once copied to /usr/
06:53 sorear so you have two options:
06:53 ANswer_777 joined #perl6
06:53 sorear 1. build binaries that don't work (usual approach, but for gnarly multipass build protocols like perl6 not so hot)
06:53 sorear 2. be relocatib le
06:54 isBEKaml sorear: 2. is out
06:54 isBEKaml sorear: 1. - like you said, gnarly. I'm listening - if it's complicated, that's fine as long as we can work around it in some way or fix that problem in future.
06:54 moritz 1. isn't too bad, because the version in source dir still works
06:55 sorear I think that you're going to need to solve the relocatability problem
06:56 sorear maybe not today, but before christmas
06:56 isBEKaml moritz: The problem I had was lib, bin and data dir paths were all compiled into binaries. *those* paths happened to point to the sandbox folder used for building packages on my machine. perl6 will fail to boot if I blow away those sandbox folders.
06:56 isBEKaml sorear: *christmas* ? Boy, does that ever get old? :)
06:57 moritz isBEKaml: well, you shouldn't configure parrot with a prefix of the sandbox folder
06:57 moritz isBEKaml: you should configure parrot with a prefix of /usr
06:57 moritz isBEKaml: and then copy to the sandbox folder anyway
06:57 moritz isBEKaml: that way the binaries work when installed
06:58 isBEKaml moritz: so, --prefix=/usr and make DESTDIR=$SANDBOX install?
06:58 moritz isBEKaml: yes
06:58 isBEKaml moritz: I think I tried that. Let me try once again.
07:04 moritz and for build nqp, you need the parrot package already installed
07:04 moritz and for building rakudo, you need the nqp package already installed
07:05 isBEKaml moritz: this is R*
07:07 moritz isBEKaml: well yes, but for R* you need parrot, nqp and rakudo
07:07 isBEKaml moritz: Here's the build script that I use: https://github.com/svatsan/RakudoStar-SlackBuild​s/blob/master/rakudo-star/rakudo-star.SlackBuild
07:08 isBEKaml moritz: It follows the same steps used for building R* from source + some more to get a final .txz slack package.
07:09 moritz well, I don't know much about slackware packaging
07:09 moritz but if it takes the same approach as debian, it won't work
07:09 moritz perl Configure.pl --gen-parrot --prefix=/usr
07:09 moritz this step tries to install parrot into /usr
07:10 moritz not into some install/ dir
07:10 moritz which is why you need a separate package for parrot
07:10 moritz rakudo and nqp need a successfully installed parrot; non-relocation means that needs to be done in a separate package
07:11 moritz the R* approach isn't well suited for direct copying into a linux package manager
07:18 isBEKaml moritz: hmm, I already have rakudo and parrot slackbuilds.
07:18 isBEKaml moritz: does nqp take the same configuration as rakudo? I mean, I can bundle nqp along with rakudo?
07:18 Sifr left #perl6
07:19 moritz isBEKaml: nqp takes its prefix from parrot
07:19 moritz isBEKaml: and rakudo needs an installed nqp, afaict
07:19 moritz so nqp needs to be a separate package
07:19 isBEKaml moritz: okay
07:31 rmp left #perl6
07:39 bonsaikitten isBEKaml: I wouldn't recommend "bundling" - let nqp be an independent package
07:40 spider-mario joined #perl6
07:41 isBEKaml bonsaikitten: Yes, that's what I'm working on.
07:53 kaare_ joined #perl6
07:54 SamuraiJack joined #perl6
07:55 diakopter .
07:56 zby_home joined #perl6
07:56 domidumont joined #perl6
08:08 domidumont joined #perl6
08:57 isBEKaml \o/
08:58 isBEKaml parrot, nqp and rakudo compiled and installed successfully with slackbuild scripts! :)
08:58 isBEKaml moritz++, sorear++
08:59 isBEKaml I'll work on fetching modules later. I will now just make rakudo, nqp available from slackbuilds.org repo.
08:59 isBEKaml and update parrot.
09:01 xinming_ joined #perl6
09:03 moritz isBEKaml++
09:07 rindolf joined #perl6
09:16 FROGGS morning
09:26 isBEKaml FROGGS: hi (It's nearly 3pm here :)
09:27 masak greetings, #perl6
09:27 FROGGS nearly 11pm on my side :o)
09:27 FROGGS moin masak
09:27 isBEKaml and morning? eh...
09:28 isBEKaml greetings, masak
09:28 FROGGS err, morning isBEKaml of course
09:28 * FROGGS needs moar coffee
09:28 kaare_ joined #perl6
09:30 FROGGS btw, I have heard there were attempts to support Perl 5 from rakudo directly (not blizkost), is that true?
09:30 FROGGS that was years before nom I suppose?
09:30 * masak .oO( good moarning )
09:30 isBEKaml FROGGS: coffee works.
09:34 moritz good masak, morning
09:38 FROGGS moritz: the workshop was great btw, 129 ppl, and very good feedback so far
09:39 FROGGS but only one one p6 talk as far as I know (lichtkind about p6oo, was very good)
09:40 * moritz would have loved to be there
09:41 FROGGS moritz: well, there will be other conferences, I hope I can make it to kiev
09:41 SamuraiJack joined #perl6
09:41 isBEKaml left #perl6
09:42 FROGGS I've missed thursday evening and most parts of friday because my youngest son and my wife are in hospital :/
09:42 FROGGS it looks like they will be out to wednesday or so
09:43 moritz FROGGS: I hope they get well soon
09:48 FROGGS moritz: where would I find something about slangs in the synopsis?
09:49 moritz FROGGS: dunno
09:50 moritz probably S02 or so
09:50 FROGGS ahh, found it http://perlcabal.org/syn/S02.html#Slangs
09:50 FROGGS thanks
09:55 Liz_ joined #perl6
09:57 FROGGS r: use MONKEY_TYPING; augment slang Regex { token numish { } };
09:57 p6eval rakudo d98dd5: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Sub 'cuid_3_1363514278.31078' not found␤␤ in file '(file unknown)' line 120␤»
09:57 FROGGS r: use MONKEY_TYPING; augment slang Regex { };
09:57 p6eval rakudo d98dd5: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Sub 'cuid_2_1363514288.28484' not found␤␤ in file '(file unknown)' line 337␤»
09:58 FROGGS r: use MONKEY_TYPING; augment slang MAIN { };
09:58 p6eval rakudo d98dd5: OUTPUT«[31m===[0mSORRY![31m===[0m�You tried to augment slang MAIN, but it does not exist�at /tmp/9HE_twdGM1:1�------> [32muse MONKEY_TYPING; augment slang MAIN [33m�[31m{ };[0m�    expecting any of:�        scoped declarator�        generic role�»
09:59 moritz r: use MONKEY_TYPING; augment slang Perl6 { };
09:59 p6eval rakudo d98dd5: OUTPUT«[31m===[0mSORRY![31m===[0m�You tried to augment slang Perl6, but it does not exist�at /tmp/fFehxhhg23:1�------> [32muse MONKEY_TYPING; augment slang Perl6 [33m�[31m{ };[0m�    expecting any of:�        scoped declarator�        generic role�»
09:59 masak for all the cool stuff slangs purportedly do, they have a very weak level of existence.
09:59 FROGGS ahh, looks like only packages are supported right now
10:00 * masak submits rakudobug for the internal Parrot error
10:37 masak r: sub infix:<c> { $^prev * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; sub b { return "" if !$^n; my $i = (^C[$n]).roll; for ^$n -> $n2 { my $n1 = $n - $n2 - 1; my ($s, $t) = b($n1), b($n2) and return "[$s]$t" if $i < my $p = C[$n1] * C[$n2]; $i -= $p }; die }; say b 3
10:37 p6eval rakudo d98dd5: OUTPUT«[[[]]]␤»
10:38 FROGGS masak: is that your new signature?
10:38 masak 274 characters. still far too long.
10:38 masak I bet people on this channel could golf this one down a fair bit... :)
10:40 tadzik hello hello
10:40 FROGGS hi tadzik
10:41 masak tadzik! \o/
10:41 masak r: sub infix:<c> { $^prev * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; sub b { return "" if !$^n; my $i = (^C[$n]).roll; for ^$n -> $n2 { my $n1 = $n - $n2 - 1; return "[{b $n1}]{b $n2}" if $i < my $p = C[$n1] * C[$n2]; $i -= $p }; die }; say b 3
10:41 p6eval rakudo d98dd5: OUTPUT«[[[]]]␤»
10:41 masak 251 characters. but that seems to have introduced a bug :/
10:42 masak it should be possible to turn that 'for' loop into a statement modifier, with some unholy reshuffling.
10:44 masak oh oh!
10:44 masak I know!
10:44 masak I can replace it all with a .first call
10:45 isBEKaml joined #perl6
10:45 FROGGS where does thind $^n come from?
10:45 masak there are two $^n. one in infix:<c> and one in b
10:47 FROGGS hmm, $^n is the thing on the left of the infix and $^prev is the thing on the right?
10:47 FROGGS r: sub infix:<c> { say $^n; say $^prev; $^prev * (4*$^n - 2) / ($n+1) }; say 7 c 8
10:47 p6eval rakudo d98dd5: OUTPUT«7␤8␤26␤»
10:48 masak yeah. just found a bug there.
10:48 masak got the order wrong, because 'prev' gt 'n'
10:48 masak r: sub infix:<c> { $^prev * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; say C[^10]
10:48 p6eval rakudo d98dd5: OUTPUT«1 1 2 6 12.571429 17.789474 22.084034 26.180561 30.234032 34.2711166␤»
10:48 masak r: sub infix:<c> { $^m * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; say C[^10]
10:48 p6eval rakudo d98dd5: OUTPUT«1 1 2 5 14 42 132 429 1430 4862␤»
10:48 masak ah. much better.
10:51 sorear FROGGS: supporting perl 5 syntax and semantics directly in rakudo was something I agitated for at the PRS
10:52 sorear FROGGS: i don't remember who supported what and when, but we managed to goad TimToady into dusting off the p5 grammar
10:53 sorear i'm afraid the p5-on-rakudo project may have slid back into dormancy
10:54 masak r: sub infix:<c> { $^m * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; sub b { return "" if !$^n; my $i = (^C[$n]).roll; my $n1 = ([\+] map { C[$n - $_ - 1] * C[$_] }, ^$n).pairs.first(*.value > $i).key; return "[{b $n1}]{b $n - $n1 - 1}" }; say b 3
10:54 p6eval rakudo d98dd5: OUTPUT«[][[]]␤»
10:54 spider-mario even without being able to directly embed p5 syntax in a p6 lexical scope, being able to communicate with external p5 code would be neat
10:54 masak g'ah! still 251 characters.
10:54 spider-mario is that still planned?
10:55 masak but perhaps easier to compress this one...
10:55 masak r: sub infix:<c> { $^m * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; sub b { $^n or return ""; my $i = (^C[$n]).roll; my $n1 = ([\+] map { C[$n - $_ - 1] * C[$_] }, ^$n).pairs.first(*.value > $i).key; return "[{b $n1}]{b $n - $n1 - 1}" }; say b 3
10:55 p6eval rakudo d98dd5: OUTPUT«[[][]]␤»
10:55 FROGGS spider-mario: it is, that's why there is blizkost
10:56 spider-mario ok, thanks. :)
10:56 FROGGS spider-mario: there is just a lack of devs
10:56 FROGGS sorear: PRS?
10:56 spider-mario I think I lack knowledge to help but I should have a look anyway, I guess
10:57 sorear spider-mario: there are a couple of partially independant quesitons here.  Embed p5 in p6?  Support p5 code?  Support XS/bug-compatibility?
10:57 sorear blizkost is a great approach for #3, and can probably be made to support #1, but is lousy for #2
10:57 sorear performance sucks and there are a ton of semantic traps with the interface
10:58 spider-mario I’m not sure how useful #2 would actually be
10:58 spider-mario I can’t think of any relevant use case
10:58 sorear a reimplementation of Perl 5 on top of NQP  gives you a much better shot at #1 and #2
10:58 FROGGS sorear: right
10:58 FROGGS well, using Perl 5 modules from within rakudo is #2, right?
10:58 sorear spider-mario: #2 is the one that matters.  Like I'm currently busy writing a pure-perl-5 parser for ASC X12 and UN/EDIFACT files
10:59 spider-mario oops, sorry, I mixed them up
10:59 spider-mario I meant #1
10:59 sorear it does not need XS, but it'll be awesome if you don't have to rewrite for 6
10:59 sorear yeah #1 is less compelling
10:59 sorear FROGGS: perl reunification summit
11:00 FROGGS ahh, yeah
11:00 crab2313 joined #perl6
11:03 FROGGS sorear: have to prepare lunch now, but I am thinking about how to inject Perl 5 into nqp, my first test arn't that successful yet, but I've spend only a few hours yet
11:04 * masak .oO( you dawg, I know you like Perl, so I put Perl 5 in your Perl 6 so you can Perl while you Perl )
11:05 FROGGS tried to let a  block like '{:p5' ~ '}' hook into another grammar, but I only get "Method 'ast' not found for invocant of class 'NQPMu'" and I dont know where that happens
11:06 FROGGS that as in rakudo though, will do that then in nqp
11:13 sorear yo masak
11:13 sorear FROGGS: look at how categoricals work
11:14 sorear the spec syntax isn't that, the spec syntax is use v6;
11:14 sorear use v5; rather
11:14 sorear and it can occur anywhere in a block
11:14 sorear this isn't hard to implement, and it makes it consistant with every other scoped change
11:14 mberends Git users might enjoy The Git Parable by github's founder http://tom.preston-werner.com/2​009/05/19/the-git-parable.html (linked from #Node.js, btw sorear, you might like to lurk there)
11:15 FROGGS sorear: thanks, every input is welcome :o)
11:15 sorear well actuallly it is hard, but not for you because jnthn++ already put all the work in
11:21 Liz joined #perl6
11:23 xinming joined #perl6
11:33 masak yo sorear
11:34 jnthn afternoon, #perl6 o/
11:34 masak \o
11:34 jnthn It's sunny! \o/
11:34 masak oh yeah, you're right!
11:35 masak perfect day to sit inside and hack!
11:35 jnthn :P
11:37 FROGGS hehe
11:38 masak &
11:42 FROGGS jnthn: this allows me to execute a statement within another %*LANGuage? https://github.com/rakudo/rakudo/commit/​dbd8130e83417d8cdc4a57ccf6f9e68bd5f5fa59
11:43 FROGGS does that mean it gets parsed using another grammar?
11:43 jnthn That's just meaning that %*LANG are temporaried per statementlist
11:43 jnthn So language changes down inside that scope don't leak up to outer ones.
11:44 FROGGS if I change Main or Regex or Q or so...
11:45 FROGGS so, what exactly do I have to do to add a language? :P
11:47 FROGGS my first attempt was to add Perl6::P5Grammar and ...::P5Actions, and nibble a block into it, but I really should do that in nqp
11:48 jnthn Well, the initial set of languages is set up in %*LANG up in TOP, or maybe comp_unit
11:48 jnthn If you look there you'll see an entry for Perl 5 regex langauge, for example
11:49 jnthn Then if you search for the same key you should see some use of LANG to do the language switch itself.
11:49 jnthn LANG also sets $*ACTIONS
11:49 jnthn Again, based on %*LANG
11:49 jnthn %*LANG represents the current braid of langauges
11:50 jnthn If we were to declare a new operator, then write a regex, then put a Perl 6 block inside of that regex, the language should be the Perl 6 with the new operator, not the base Perl 6 language.
11:50 jnthn It's the contextual/temporized nature of %*LANG that makes that happen.
11:54 SamuraiJack joined #perl6
11:57 FROGGS jnthn: that's the diff: https://gist.github.com/FR​OGGS/f2d7c5f145af54eecf3f I thought this should let this work: ./perl6 -e '{:p5 7 }'
11:58 FROGGS atm I dont know if quibble, sibble, nibble or shwivvle is right/wrong
12:03 jnthn FROGGS: p5 isn't a quote language :)
12:04 FROGGS jnthn: is there a method I could use instead?
12:04 jnthn Hm, moment
12:05 jnthn hm, we actually do nibble regexes that way...
12:05 hoelzro ahoy #perl6
12:06 jnthn no, seems nibble is what you want
12:06 hoelzro I added posixerrno to NQP today; would someone mind looking over my changes? https://github.com/hoelzro/nqp
12:06 jnthn FROGGS: Well, the thing is...
12:06 jnthn FROGGS: quote_lang sets up various starter/stopper things too
12:07 jnthn FROGGS: It then calls a method nibbler inside of the target language
12:08 arnsholt jnthn: So I'm thinking that I need to set up something more or less similar to what GlobalContext does on JVM
12:09 FROGGS jnthn: ohh okay, I previously had nibble, and the nibbler+do_nibbling inside
12:10 jnthn FROGGS: Looking at STD around https://github.com/perl6/st​d/blob/master/STD.pm6#L1438
12:10 jnthn It seems that for Perl 5 it sets up a new braid entirely
12:10 jnthn Then switches to it
12:11 jnthn For now though you could just try something like <LANG('P5', 'statementlist')> or so
12:11 jnthn arnsholt: The easiest way is to root it somewhere in Parrot's namespace system.
12:12 pmurias joined #perl6
12:12 daviduagain joined #perl6
12:12 masak hello from a train! :)
12:12 pmurias hoelzro: tests when adding new opcodes would be great
12:13 masak has anyone given any thought about the composability of language mutations?
12:13 hoelzro pmurias: noted! but are the values of errno portable?
12:13 masak I have a feeling slangs are a lot less composable than roles...
12:13 arnsholt jnthn: That makes sense, yeah. So it'll be a Parrot hash containing the various things we care about, right?
12:14 jnthn arnsholt: That's probably the easiest way, yes...it's fine unless we have to look them up really often, then it'll get slow I guess..
12:15 jnthn arnsholt: Maybe better to make it work at all first, though...
12:15 arnsholt That true. But I'll go for easy for now, and refactor for speed later, if it turns out to be a problem
12:15 arnsholt Yeah. Make it run, make it right, make if fast and all that
12:15 pmurias hoelzro: neither the man page or msdn docs document the exact integer values
12:16 jnthn arnsholt: On the HLL stuff, one thing to keep in mind is that Parrot already has some stuff in this space.
12:17 jnthn arnsholt: Of note, subs already have a HLL_id. And it'd be nice if we could make sure we map well with that for doing stuff like "is this an object of the current language" cheaply.
12:17 arnsholt Point
12:18 hoelzro pmurias: I guess that it should test that it's non-zero for failures?
12:18 hoelzro is the value of errno defined for success?
12:18 * hoelzro guesses no
12:18 arnsholt I think errno is only set on an actual error
12:18 hoelzro probably
12:19 jnthn hoelzro: Also I'd group the op in Operations.nqp into the native call related section
12:20 PacoAir joined #perl6
12:22 pmurias joined #perl6
12:23 FROGGS ===SORRY!===
12:23 FROGGS Method 'statementlist' not found for invocant of class 'Perl6::P5Grammar'
12:23 FROGGS \o/
12:24 hoelzro ok, good suggestion!
12:24 FROGGS jnthn++
12:24 pmurias if we have errno shouldn't we also have a way to portably look up error codes?
12:26 hoelzro that's probably a good idea
12:26 pmurias as otherwise it's not very usefull
12:28 pmurias btw what do we need that for?
12:28 * masak .oO( otherwise it won't contain a bit of information! oh wait )
12:34 arnsholt pmurias: Is that even possible? I think most of them are just C #defines
12:35 hoelzro arnsholt: I think we'd need a map of names -> values
12:35 hoelzro so add_map("ENOMEM", ENOMEM)
12:36 arnsholt Right, that'll work
12:36 arnsholt And sprinkle some #ifdef on top when some platforms have that code
12:37 hoelzro pmurias: I was adding it for my POSIX module, but others said it would be pretty useful generally
12:38 kivutar joined #perl6
13:09 crab2313 joined #perl6
13:10 masak r: sub b { sub C { $^n ?? C($n-1) * (4*$^n - 2) / ($n+1) !! 1 }; return "" if !$^n; my $i = (^C($n)).roll; "[{b $_}]{b $n - $_ - 1}" given ([\+] map { C($n - $_ - 1) * C($_) }, ^$n).pairs.first(*.value > $i).key }; say b 3
13:10 p6eval rakudo d98dd5: OUTPUT«[][][]␤»
13:11 masak 219 characters.
13:11 jnthn Still can't tweet it :P
13:12 masak heh.
13:12 masak I think it's possible to get under 140, fwiw.
13:13 masak we're coming up on a year-long search for good solutions to this problem. maybe more than one year.
13:14 masak I'm getting ready to blog it.
13:49 itz joined #perl6
13:50 moritz masak: speaking of blogging, how's the t2 review coming along?
14:01 masak moritz: I'm on a train. meaning to start looking at t2 during this train journey.
14:01 masak it'll be a fun one to review ;)
14:01 masak though there is some t1 fallout that I should be looking at first.
14:02 masak contestants actually emailed me with some feedback on my review of their program. it's the first time that happens, I believe.
14:02 census joined #perl6
14:17 moritz right, I only commented on the reviews per IRC :-)
14:22 sizz_ joined #perl6
14:23 Psyche^ joined #perl6
14:28 SamuraiJack_ joined #perl6
14:30 * masak learns about (and is sligtly shocked by) http://en.wikipedia.org/wi​ki/Richardson%27s_theorem
14:32 masak it's as if "any sufficiently advanced algebra is indistinguishable from an algorithm", and then the algorithm suffers the usual problems of undecidability.
14:32 masak I can sort of see it with |x|, because the abs function contains an if statement.
14:33 Chillance joined #perl6
14:35 cognominal joined #perl6
14:36 yves_ joined #perl6
14:37 masak the author of https://github.com/masak/p6cc201​2/blob/master/t1/review/pkai.md wrote back, but he doesn't seem to have any objects. just wanted to talk about the review a bit. fair enough :)
14:38 jnthn .oO( no objects, just functions )
14:39 rindolf joined #perl6
14:39 masak I had pointed out that .uniq would have been better in a certain case. he supplanted with the fact that it would't work straight off, but would need conversion to Str first. (because .uniq uses === semantics)
14:39 masak which is a good point, but not one that I feel is necessary to add to the review.
14:40 masak now, the author of https://github.com/masak/p6cc201​2/blob/master/t1/review/bruce.md has a slightly more interesting argument he wants to make.
14:41 masak he says I may have miscategorized his algorithm as exponential, and he lays out the case for why it isn't.
14:41 masak this clearly requires my attention.
14:41 masak he ends the email with "Please do not feel obligated to revisit my code." -- but I do feel I should, if only to lay to rest a possible miscategorization.
14:42 jnthn uniq is spec'd as ===; I think I fixed that in Rakudo a bit ago
14:42 masak he wrote his email on the 24th. I replied on the same day with "I will read your explanation carefully and ponder whether it actually proves that the algorithm runs faster than I thought. If it does I will definitely revisit my review. Before looking closely at it though, I kinda doubt it'd be O(n), since even Gaussian elimination is O(n**3)."
14:43 masak more generally, I don't think an algorithm which has to correlate info across n things *can* be O(n)
14:45 masak the structure of this problem is "A: B is a liar; B: no, A is a liar" -- all the structure has to be extracted from the utterances and traversed. I think it's comparable to sorting, so O(n**2) at least.
14:46 jnthn Sorting can be n*log(n)
14:46 masak yes.
14:47 masak but I've yet to see a sorting algorithm whose *worst case* isn't O(n**2) or worse.
14:48 masak anyway, I doubt someone solved t1 in linear time. the claim is wrong enough on the surface to merit examination. :)
14:51 masak hm, his argument is interesting. I'm going to post it here as a gist.
14:52 jnthn masak: mergesort is n*log(n) worst case
14:52 jnthn probably a bunch of others
14:54 masak hm, ok.
14:54 masak anyway, superlinear.
14:56 masak here's the email and my response: https://gist.github.com/masak/5181910
14:58 kurahaupo joined #perl6
14:58 masak hm, I think I can easily show that the algorithm isn't O(n).
14:58 masak both "put into set" and "check whether X is in a set" are non-constant operations.
15:04 jnthn masak: Oh? If the set is backed by a hash, those operations are O(1)?
15:05 * jnthn goes for a walk
15:10 FROGGS joined #perl6
15:20 cognominal joined #perl6
15:22 LlamaRider joined #perl6
15:25 masak gist updated with my reasoning: https://gist.github.com/masak/5181910
15:26 am0c joined #perl6
15:26 masak there. now I'm freed up to work on t2 reviews ;)
15:30 pmichaud good morning, #perl6
15:31 arnsholt 'lo pmichaud
15:32 cognominal joined #perl6
15:33 bloonix joined #perl6
15:35 rindolf pmichaud: good morning.
15:35 rindolf pmichaud: how are you this fine Sunday?
15:36 masak pmichaud! \o/
15:37 pmichaud rindolf: I'm doing okay so far.  :)
15:38 Chillance joined #perl6
15:39 isBEKaml joined #perl6
15:43 rindolf pmichaud: nice.
15:43 rindolf pmichaud: what are you working on?
15:43 pmichaud at the moment, just catching up on email and news :)
15:45 pmichaud and backscroll
15:48 FROGGS jnthn: I copied all from Perl6::Grammar/Actions to Perl6::P5Grammar/P5Actions, so '{:p5' ~ '}' is working (almost) fine... now I just need to make it more Perl5y
15:50 SamuraiJack__ joined #perl6
15:53 SunilJoshi joined #perl6
15:54 rindolf pmichaud: nice.
15:57 jnthn FROGGS: tbh, I'd suggest you start small and build towards STD_P5
15:57 jnthn o/ pmichaud
16:02 cognominal joined #perl6
16:03 * arnsholt discovers that he forgot to commit his changes from last night
16:04 arnsholt 's what happens when you get too caught up in the hacking, I suppose =)
16:07 FROGGS jnthn: I guess I will use STD_P5 as a preset only for the grammar, and take most parts of the actions from rakudo
16:07 * masak .oO( I have discovered a truly remarkable solution to this problem which my memory is too small to push )
16:08 isBEKaml masak: Fermat? :)
16:08 jnthn FROGGS: Well, even there things will be interesting due to semantic differences. I guess it's an interesting experiment though...and if it's -Ofun for you to hack on, go for it :)
16:14 masak isBEKaml: well spotted.
16:15 geekosaur .oO { I fermatted over my patches }
16:16 isBEKaml .oO( and they were too small! )
16:19 FROGGS jnthn: well, I dont think we'll have problems if everything will still be an object, as long as "normal" Perl 5 code works
16:22 LlamaRider FROGGS++ I'd be very interested in watching your progress if you're hosting this somewhere public, maybe even contribute if I understand enough
16:25 FROGGS LlamaRider: be back in a bit...
16:26 * masak .oO( git fermat-patch )
16:26 isBEKaml yeah, that's what caught me - fermat compressor! :P
16:28 isBEKaml er, compression
16:46 kurahaupo joined #perl6
16:50 crab2313 joined #perl6
16:53 jaldhar_ joined #perl6
16:56 arnsholt jnthn: Is there anything I should keep in sixmodelobject.pmc's current VTABLE_get_iter()?
16:57 arnsholt Or rather, should I keep the vtable mapping for get_iter?
17:06 FROGGS joined #perl6
17:07 FROGGS LlamaRider: about hosting in public: it will be a branch of the rakudo repo
17:08 FROGGS jnthn: it is more like -Oneed that -Ofun I suppose :o)
17:08 FROGGS *than
17:10 domidumont joined #perl6
17:13 SamuraiJack joined #perl6
17:13 jnthn arnsholt: It may be depended on somewhere... Check BOOTSTRAP.pm in Rakudo; I have a suspicion that something relies on it there.
17:14 jnthn arnsholt: Maybe for stashes
17:19 pmichaud (generic note while working on the 2013.02 .msi)    It would be better to not have a Star release than to create a release that fails tests.
17:22 moritz it fails its tests?
17:23 masak I agree. if we generate a release (compiler or distribution) that fails its own tests, then there is something wrong with the release process.
17:23 pmichaud the 2013.02 release failed tests is bailador and perl6-lwp-simple
17:23 pmichaud s/is/in/
17:23 sisar joined #perl6
17:23 pmichaud (failures were on my linux box)
17:24 FROGGS jnthn: what do I need to do to split up the Perl6/Grammar.pm so that the parts are concatenated before compiling?
17:25 pmichaud I'm not so concerned about failures in compiler releases; after all, we can fudge.  But in distribution releases, where we aim for at least some form of stability, having failing modules is a Bad Thing.
17:25 FROGGS dont wanna have a 6k+ lines big file
17:25 benabik joined #perl6
17:25 jnthn FROGGS: I'd just put the P5 bits in separate files and compile them as separate moduels
17:26 jnthn FROGGS: Rather do a "use"
17:26 jnthn FROGGS: We may even want to investigate load-on-first-use.
17:26 pmichaud I'm going to update the star release guide to say "if there are any failures in modules-test, stop."
17:26 jnthn pmichaud: +1
17:27 moritz speaking of stability
17:27 moritz did we ever get around to nailing down a deprecation policy?
17:28 pmichaud for Star, or for the compiler, or ... ?
17:28 moritz star
17:28 moritz though iirc we got zero feedback
17:28 pmichaud don't think we nailed one down, no.
17:29 FROGGS jnthn: the funny thing is that it doesnt matter that I added 3k lines, it compiles exactly as fast as without it
17:29 FROGGS jnthn: so this gen-cat script is looking for 'use'-statements?
17:29 jnthn FROGGS: gen-cat just concatentates things
17:30 jnthn I'm saying compile the P5 things you're doing into a separate PBC
17:30 jnthn And then "use" that module from where you need it
17:33 dalek star: 1e25cdd | pmichaud++ | tools/star/release-guide.pod:
17:33 dalek star: Update release-guide to stop release process (and file tickets) if tests do not pass.
17:33 dalek star: review: https://github.com/rakudo/star/commit/1e25cddd83
17:37 raiph joined #perl6
17:37 arnsholt jnthn: Right. I'll keep it for now and we can see what happens if it's torn out later
17:43 pmurias FROGGS: re -Oneed just embedding the perl5 interpreter would be much easier then reimplementing perl5
17:44 pmichaud Is zavolaj expected to run under Windows?
17:45 FROGGS pmurias: well, shuffling Perl 6 objects to Perl 5 isnt that easy
17:46 jnthn pmichaud: Should do. After all, I did all the initial development on Windows...
17:46 jnthn pmurias: It's worth doing both approaches, imo. They're have different strengths/weaknesses.
17:47 pmichaud jnthn: hmm.   https://github.com/rakudo/star/issues/20
17:47 * FROGGS .oO( There Is More Than One Way We Do It(TM) )
17:48 jnthn pmichaud: That looks like recently added tests using a type that MSVC doesn't know natively
17:48 pmichaud I'm using gcc, but okay.  Still there's a failure :)
17:49 jnthn t/05-arrays.c:65:5: error: unknown type name 'int8_t'
17:49 jnthn I'm pretty sure the failure is while compiling the library it runs the tests against
17:49 jnthn arnsholt: Any ideas on ^? Maybe just use "char"? :)
17:49 pmichaud feel free to assign tickets :)   https://github.com/rakudo/star/issues?state=open
17:50 pmurias jnthn: yes, both approaches would be usefull
17:51 arnsholt Hmm. That's odd...
17:52 * FROGGS .oO( are they even when both are odd? )
17:52 dalek rakudo-js: 8964ead | (Pawel Murias)++ | runtime/serialization.js:
17:52 dalek rakudo-js: Split up long line to pleas gjslint.
17:52 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/8964eade0b
17:52 dalek rakudo-js: 73c3d15 | (Pawel Murias)++ | / (8 files):
17:52 dalek rakudo-js: Update to new version of nqp.
17:53 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/73c3d155f8
17:53 dalek rakudo-js: a5814e4 | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp:
17:53 dalek rakudo-js: Remove dead code.
17:53 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/a5814e4e25
17:53 skids joined #perl6
17:54 arnsholt jnthn: Anyways, I wouldn't be opposed to replacing int8_t with char. But if int8_t doesn't exist, do any of the other int types exist?
17:55 jnthn arnsholt: good question...
17:56 LlamaRider FROGGS: So are you thinking of reimplementing the P5 interpreter in NQP? Or in P6? Or something different yet.
17:56 * jnthn would guess FROGGS is thinking of doing P5 -> QAST
17:57 arnsholt jnthn: Oh, and a thing from last night: sixmodelobject.pmc has a hardcoded value for the bigint REPR id I'm pretty sure is bitrotted. Could you take a look?
17:57 dalek star: c918f60 | pmichaud++ | tools/star/release-guide.pod:
17:57 dalek star: Rephrase the stop-release note a little more strongly.
17:57 dalek star: review: https://github.com/rakudo/star/commit/c918f60052
17:57 jnthn arnsholt: I've been bumping that by hand for a bit, knowing I really should fix it...
17:58 jnthn arnsholt: Will have a think on how to do it.
17:58 arnsholt 'k
17:58 pmichaud I'd like to see p5 on nqp, myself.
17:58 jnthn *nod*
17:58 FROGGS LlamaRider: jnthn guesses right
17:58 jnthn arnsholt: The test fail certainly fails to compile here for zavolaj
17:59 FROGGS LlamaRider: I'm trying to port std/STD_P5.pm6 to rakudo
17:59 arnsholt Right. Using the MS C compiler?
17:59 jnthn yeah
17:59 jnthn gut...Pm got it with gcc too...
17:59 jnthn gcc on Windows but still...
18:00 jnthn arnsholt: http://tdistler.com/2011/11/13/a​dding-stdint-h-to-visual-studio
18:00 arnsholt OH NOES!
18:01 arnsholt I didn't know those types were C99
18:01 jnthn So if I fix that things look better
18:01 jnthn for that test at least
18:03 arnsholt From a quick grep it seems that's the only C file that uses those types
18:03 masak (p5 on nqp)++
18:03 jnthn 06 too
18:04 arnsholt Oh, right you are. I fail at reading \=
18:04 jnthn Pushed fixes for those two
18:04 arnsholt s/=\\/=)
18:04 dalek zavolaj: 4638245 | jnthn++ | t/0 (2 files):
18:04 dalek zavolaj: s/int8_t/char/ (C89 compat)
18:04 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/4638245113
18:04 arnsholt Cheers!
18:04 jnthn I do get a couple of failures on MSVC still
18:04 jnthn But not due to failing to compile C code
18:04 LlamaRider FROGGS: When that succeeds, how much rope would it provide? I.e. what parts of P5 would be usable in Rakudo?
18:04 jnthn Curious if Pm gets them on gcc on ~Windows...
18:04 arnsholt Definitely
18:05 dalek rakudo/nom: 2a41b33 | jnthn++ | src/Perl6/Optimizer.pm:
18:05 dalek rakudo/nom: Two pir:: => nqp:: in the optimizer.
18:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2a41b33411
18:05 FROGGS LlamaRider: if everything goes well, all pure Perl5 modules (with only pure Perl 5 deps) should work
18:06 LlamaRider FROGGS: Nice!
18:06 jnthn That sounds like a good bit of work ;)
18:06 dalek perl6-most-wanted: f3476f6 | (Geoffrey Broadwell)++ | most-wanted/bindings.md:
18:06 dalek perl6-most-wanted: I don't think GeoIP is an XML parser.  ;-)
18:06 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/f3476f6972
18:10 arnsholt Hmm. I don't think "invoke() not implemented in class 'NQPRoutine'" is supposed to happen ^_^
18:18 dalek nqp/vmarray-list: 37bad15 | (Arne Skjærholt)++ | src/ (3 files):
18:18 dalek nqp/vmarray-list: Set up a BOOTArray type.
18:18 dalek nqp/vmarray-list: review: https://github.com/perl6/nqp/commit/37bad1545b
18:18 dalek nqp/vmarray-list: d65d88f | (Arne Skjærholt)++ | src/ (2 files):
18:18 dalek nqp/vmarray-list: Make nqp::hlllist return the BOOTArray type.
18:18 arnsholt Aww. I killed the bot again =(
18:18 jnthn You commit too hard :)
18:18 jnthn arnsholt++
18:18 dalek joined #perl6
18:18 arnsholt Or push too rarely ;)
18:19 arnsholt Anyways, could you take a look at the head commit in that branch? First stab at global context stuff
18:22 jnthn Looks sane, overall
18:23 jnthn Apart from leaving behind a commented out line ;)
18:23 arnsholt Whoops ^_^
18:26 Chillance joined #perl6
18:34 LlamaRider Is Rakudo's spectest supposed to run error-free? It fails for me at S32-temporal
18:35 moritz worked here last I tried
18:35 moritz LlamaRider: how young/old is your rakudo?
18:35 LlamaRider fresh checkout from 2 hours ago
18:35 LlamaRider but I had the error a few days back as well, so it's not something too recent
18:36 moritz rebuilding here...
18:41 sizz joined #perl6
18:42 LlamaRider I rebuilt rakudo, running the spectest again
18:59 dalek nqp/vmarray-list: 09c5aea | (Arne Skjærholt)++ | src/ (3 files):
18:59 dalek nqp/vmarray-list: Implement ITER boolification and set up BOOTIter type.
18:59 dalek nqp/vmarray-list: review: https://github.com/perl6/nqp/commit/09c5aea0c0
18:59 dalek nqp/vmarray-list: 461b2eb | (Arne Skjærholt)++ | src/pmc/sixmodelobject.pmc:
18:59 dalek nqp/vmarray-list: Create iterators for objects with the VMArray REPR.
18:59 dalek nqp/vmarray-list: review: https://github.com/perl6/nqp/commit/461b2eb156
19:00 arnsholt jnthn: With that latest commit, the next error to remove is that some piece of code expects VTABLE_get_string_keyed to be implemented
19:00 arnsholt Should I try to dispatch to VTABLE_get_pmc_keyed and coerce the return value of that to STRING, or is something else needed?
19:05 LlamaRider moritz: I'm still getting the error. In "t/spec/S32-temporal/local.rakudo" Failed tests: 7-22
19:08 LlamaRider seems to be something very minor in any case
19:08 zamolxes joined #perl6
19:31 masak I'm idly thinking of that Perl 6 course I mentioned last week.
19:32 masak kind of excited about the idea :)
19:34 masak what day of the week would suit people best, do you think? assume we dedicate four hours of undivided attention to the course. it will likely be afternoon/evening CET, and morning/noon AST/CST/EST.
19:35 masak (unless people in Asia really want in, but so fat that hasn't happened)
19:46 szabgab joined #perl6
19:46 szabgab rakudo: say sprintf "<a>%s </a>", 42
19:46 p6eval rakudo 2a41b3: OUTPUT«<a>42 </a>␤»
19:47 szabgab rakudo: say sprintf "<a>%s</a>", 42
19:47 p6eval rakudo 2a41b3: OUTPUT«[31m===[0mSORRY!​[31m===[0m�Variable '%s' is not declared�at /tmp/qBXRpevGDa:1�------> [32msay sprintf "<a>%s</a>[33m�[31m", 42[0m�    expecting any of:�        postfix�»
19:47 szabgab how can I do the latter properly?
19:47 szabgab rakudo: say sprintf '<a>%s</a>', 42
19:47 p6eval rakudo 2a41b3: OUTPUT«<a>42</a>␤»
19:47 szabgab rakudo: say sprintf '<a>%s</a>\n', 42
19:47 p6eval rakudo 2a41b3: OUTPUT«<a>42</a>\n␤»
19:47 szabgab ...with a trailing newline?
19:48 FROGGS rakudo: say sprintf "<a>\%s</a>\n", 42
19:48 p6eval rakudo 2a41b3: OUTPUT«<a>42</a>␤␤»
19:48 FROGGS szabgab: escape it
19:48 szabgab I could have guessed
19:48 szabgab thanks
19:48 FROGGS :o)
19:48 moritz r: say Q:b "<a>%s</a>\n", 42
19:48 p6eval rakudo 2a41b3: OUTPUT«<a>%s</a>␤42␤»
19:48 masak szabgab: if you want '%s' to mean "directive" and not "hash variable", don't put it in qq quotes :)
19:48 moritz r: say sprintf Q:b "<a>%s</a>\n", 42
19:48 p6eval rakudo 2a41b3: OUTPUT«<a>42</a>␤␤»
19:48 moritz szabgab: or like this
19:49 masak r: say sprintf q[<a>%s</a>], 42
19:49 p6eval rakudo 2a41b3: OUTPUT«<a>42</a>␤»
19:49 moritz the Q:b enables backslash escapes, but not hash interpolation
19:49 szabgab ah
19:49 masak rn: say sprintf "<a>%s\</a>\n", 42
19:49 p6eval rakudo 2a41b3, niecza v24-35-g5c06e28: OUTPUT«<a>42</a>␤␤»
19:50 masak escaping the < also works.
19:50 _sri http://www.python.org/dev/peps/pep-3156/ # very interesting PEP about non-blocking I/O and event loops, if perl6 would manage to provide all those features too it would already be significantly better than perl5
19:51 szabgab masak, moritz , FROGGS thank you!
19:51 _sri a simple thing like non-blocking gethostbyname() is something perl5 can't do
19:52 geekosaur "perl5" can't, perl5's Net::DNS can
19:52 _sri not the same
19:52 szabgab moritz: I wanted to ask you about p6doc , would it be ok to integrated the indexer in the p6doc and to add features that will enable     p6doc split
19:52 _sri you want the platform specific stuff too
19:52 _sri DNS only sucks
19:53 lue hello world o/
19:53 masak lue! \o/
19:53 _sri geekosaur: when you look at modern event loops like libuv you'll notice that they all warp gethostbyname() in a pool of threads
19:53 _sri *wrap
19:53 moritz szabgab: yes. You just have to figure out where to install generated files like an index
19:54 * geekosaur is actually using Net::DNS for that in a custom event loop already
19:55 szabgab moritz: ok, so when the tuits come again I'll try to do that
19:55 _sri geekosaur: i don't think you understand the problem
19:56 geekosaur I understand that arbitrary code already using the builtins can't be made to use asynch dns, if that's your point
19:59 moritz LlamaRider: I just see that the timezone tests skip tests depending on the local timezone
19:59 moritz LlamaRider: which might explain why I don't see the failures you get
19:59 _sri geekosaur: my point is that gethostbyname() or getaddrinfo() check other sources than DNS too, such as mDNS on OS X or all those Windows specific services
20:00 dalek doc: f4d12f3 | (Gabor Szabo)++ | lib/Str.pod:
20:00 dalek doc: sprintf examples
20:00 dalek doc: review: https://github.com/perl6/doc/commit/f4d12f3a79
20:00 LlamaRider moritz: The discrepancy was using a + instead of a - in the date syntax. I updated the spectest and am rerunning again, will give you a specific diff in a minute
20:00 _sri geekosaur: if your event loop uses Net::DNS exclusively, it's a very bad event loop i'm afraid
20:01 _sri just like AnyEvent::DNS is basically terrible
20:02 LlamaRider er, or is this really a time zone difference that's exactly 10 hours?
20:02 LlamaRider #      got: '2007-01-01T21:22:00+0500'
20:02 LlamaRider # expected: '2007-01-01T21:22:00-0500'
20:02 geekosaur actually it's fine for its intended purpose
20:03 * LlamaRider is certain he misread the date syntax anyway, it has been a while since i worked with DateTime things
20:03 _sri geekosaur: i'm talking about general purpose resolvers, and you chimed in and claimed that Net::DNS can do it well
20:03 moritz LlamaRider: yes, could be a typo
20:04 geekosaur I pointed out it existed. I don't think I made a claim that it was the ultimate fix, but it could be part of one
20:04 moritz LlamaRider: do you have commit access to the spectests?
20:04 LlamaRider I am pretty sure I don't , I have never asked for anything of the sort
20:04 moritz LlamaRider: if not, what's your github ID?
20:05 LlamaRider moritz: dginev
20:05 _sri point is, if perl6 can wrap getaddrinfo() in a bunch of threads it is already way ahead of perl5
20:05 moritz LlamaRider: you should now have write access to perl6/roast (and a bunch of other repos)
20:06 _sri geekosaur: no it can't be part of one, since it doesn't get you any further in reaching all those platform specific services
20:07 LlamaRider moritz: well, that escalated quickly :) thanks. Will patch it up, when I am sure it's really a typo
20:07 geekosaur so every platform is guaranteed to have a nonblocking interface to whatever services it provides?
20:07 geekosaur and perl is guaranteed to know what it is?
20:08 geekosaur that's at least as much of a leap as assuming that a "custom event loop" must be general purpose according to whatever definition you're using (but not saying, of couse)
20:08 _sri geekosaur: do you know what getaddrinfo() is?
20:22 LlamaRider moritz: There's more to it than a simple typo, will have to get to understand the DateTime implementation better to figure it out. Will do that later today.
20:23 kurahaupo joined #perl6
20:24 moritz LlamaRider++ # looking into test failures
20:32 * jnthn back
20:34 jnthn arnsholt: repr funcs don't do coercion; you're meant to use the op to match the type of the elements. However, Parrot's v-tables have tended to not make that distinction (same in some other places, where boxing/unboxing was confused with coercion). In nqpjvm they're de-confused; atpos_s means the thing underneath must have elements that are native strings, for example.
20:35 jnthn _sri: Thanks for the link; added it to my reading list :)
20:37 * _sri is amazed with the quality of many PEPs
21:10 Liz joined #perl6
21:11 cognominal joined #perl6
21:14 LlamaRider r: say ~$*TZ
21:14 p6eval rakudo 2a41b3: OUTPUT«<local time zone>␤»
21:15 LlamaRider How can I see its value? it either prints ^^ or just prints $*TZ back
21:17 lue r: say $*TZ
21:17 p6eval rakudo 2a41b3: OUTPUT«$*TZ␤»
21:18 jnthn r: say $*TZ.WHAT
21:18 p6eval rakudo 2a41b3: OUTPUT«(DateTime-local-timezone)␤»
21:18 jnthn r: say $*TZ.^methods(:local)
21:18 p6eval rakudo 2a41b3: OUTPUT«postcircumfix:<( )> offset of returns Str perl␤»
21:18 jnthn r: say $*TZ.offset
21:18 p6eval rakudo 2a41b3: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in method offset at src/gen/CORE.setting:11653␤  in block  at /tmp/t5yKJ5m4fW:1␤␤»
21:18 jnthn Hm :)
21:18 jnthn r: say $*TZ.Str
21:18 p6eval rakudo 2a41b3: OUTPUT«<local time zone>␤»
21:18 jnthn Beats me...
21:19 lue r: my $a = DateTime.new(now); say $a; say $*TZ.offset($a,0);
21:19 p6eval rakudo 2a41b3: OUTPUT«DateTime.new(year => 2013, month => 3, day => 17, hour => 21, minute => 19, second => 29.830353975296e0)␤3600␤»
21:19 cognominal trying to compile the post merge rakudo on a mac, I get this error :
21:19 cognominal multi_dispatch.c:98:9: error: void function 'add_to_cache' should not return a value [-Wreturn-type]
21:19 cognominal return NULL;
21:20 LlamaRider r: DateTime.new(:timezone => $*TZ).timezone.say
21:20 p6eval rakudo 2a41b3: OUTPUT«Default constructor for 'DateTime' only takes named arguments␤  in method new at src/gen/CORE.setting:731␤  in method new at src/gen/CORE.setting:726␤  in block  at /tmp/dK1yS6Qiom:1␤␤»
21:20 LlamaRider r: DateTime.new(:timezone($*TZ)).timezone.say
21:20 p6eval rakudo 2a41b3: OUTPUT«$*TZ␤»
21:20 LlamaRider that's one shy variable
21:21 cognominal indeed the declaration is :  void add_to_cache(PARROT_INTERP, NQP_md_cache *cache, PMC *capture, INTVAL num_args, PMC *result);
21:22 arnsholt jnthn: Hmm, right. That's no fun
21:24 dalek nqp: 39d7d37 | jnthn++ | src/guts/multi_dispatch.c:
21:24 dalek nqp: Fix copy-pasto (void function returning value).
21:24 dalek nqp:
21:24 dalek nqp: cognominal++ for reporting.
21:24 dalek nqp: review: https://github.com/perl6/nqp/commit/39d7d374b4
21:25 cognominal jnthn++ for the hard work
21:25 jnthn arnsholt: Well, it's a mismatch
21:25 jnthn arnsholt: OTOH, the NQP code-base as largely been updated to avoid such mismatches
21:25 jnthn arnsholt: Otherwise nothing would work over on the JVM. And it works enough to self-host, so... :)
21:28 arnsholt Right. So tracking down the offending piece of code and replacing it with list_s should be acceptable, right?
21:28 jnthn arnsholt: Yes, or tweaking the op it uses
21:28 jnthn arnsholt: There are some bogus use of atpos_s around too
21:29 arnsholt Right, right
21:29 jnthn arnsholt: I think I sync'd most I found back over to NQP land but maybe not
21:31 arnsholt I'll try to merge master into my branch first
21:31 arnsholt Might be a commit I've missed since I branched off
21:34 LlamaRider Reading Temporal.pm, $*TZ is a singleton object of DateTime-local-timezone, in the end being syntax sugar for its offset method, which does some pir magic
21:35 LlamaRider the Str method in that class looks like a stub to me.
21:45 am0c joined #perl6
21:50 arnsholt jnthn: The backtraces from NQP compilation errors are a bit useless, it seems =/
21:52 arnsholt Or maybe not...
21:53 arnsholt There we go, I think
21:55 arnsholt jnthn: I think the offender is stable_publish_vtable_mapping in nqp::ops, which does VTABLE_shift_string
21:56 arnsholt Or maybe not, come to think of it
21:56 arnsholt It's iterating over a hash, which shouldn't touch any of my code
22:02 jnthn hm, yeah...I think that's an iterator it's shifting off
22:04 arnsholt Hmm. If it's called from one of the NQP custom ops, I might be able to do something clever with GDB
22:10 arnsholt Oh, there we go. It was indeed stable_publish_vtable_mapping
22:10 arnsholt Oh, now I see
22:11 arnsholt jnthn: stable_publish_vtable_mapping uses a heterogenous list. The first element is a PMC, the second one is a STRING. Thoughts?
22:13 jnthn arnsholt: Hm, and that's Parrot specific and also probably on the chopping block at some point...
22:13 jnthn I'd pull them out with the get_pmc form of the aggregate, and then get_string it in the op.
22:13 arnsholt Indeed it is. It's called directly as a pir::op as well
22:13 arnsholt Yeah, that was my first thought as well
22:28 LlamaRider Who is maintaining the P6 DateTime code in Temporal.pm ? I'm wondering why it has been implemented the way it was and if the timezone logic shouldn't be rewritten to follow much more closely the P5 DateTime::TimeZone
22:29 arnsholt jnthn: Found some spurious atpos_s in NQPMu's BUILDALL, in case you want a list
22:30 arnsholt I suspect I'm going to kill the bot again
22:30 * arnsholt pushes
22:31 dalek Heuristic branch merge: pushed 17 commits to nqp/vmarray-list by arnsholt
22:31 arnsholt Oh, good bot! =D
22:38 masak LlamaRider: everyone and no-one is the maintainer, I guess. I initiated the last Temporal refactor, but the code was quickly appropriated and improved by various people.
22:39 masak LlamaRider: there have been suggestions now and then that we take a wider grasp around timezone handling. my response is always the same: "go ahead, commit away! if we like the result enough, we'll put it in the spec, too!"
22:39 LlamaRider masak: I am getting timezone failures in the spectest and when I debugged my way into the timezone code my instinct was to rewrite rather than patch.
22:40 masak what kind of timezone failures? why did you feel like rewriting instead of patching?
22:40 LlamaRider well, the timezones were mismatched, in a variety of ways. I suspect there is more than one bug there. I can upload a gist if you wish.
22:41 LlamaRider I felt like rewriting since timezones are a lie in the current code - they're just syntax sugar behind doing offset arithmetic
22:42 LlamaRider at least that's the impression I got from the DateTime-local-timezone class
22:44 masak if something is outright wrong in Temporal, then of course we should fix that.
22:44 masak and yes, I got that impression too last time I looked at both the spec and the Rakudo implementation.
22:44 LlamaRider well, a timezone is just an Int that has a negative or positive number of minutes in it. But $*TZ isn't conforming to that and is being the above-mentioned syntax sugar. I have gripes mainly with $*TZ right now
22:44 masak we need to be really, really clear how we handle timezones.
22:45 masak please outline what you observe and what you expected. :)
22:45 jnthn I think part of the idea was that it's an invokable
22:47 LlamaRider Well, I didn't expect anything since I am not an experienced DateTime user myself. But I did expect $*TZ to be a real variable, in the sense that it has a value. Instead it is a singleton object that has no timezone value in itself but is a facade for an offset method.
22:49 masak jnthn: it can be invokable.
22:50 LlamaRider that's the other inconsistency btw - most of the Temporal code thinks of timezones as Ints of minutes, except when dealing with $*TZ. I'm not too sure how that is even working right now, still staring at the code.
22:51 masak I'm pretty sure I wasn't the one who messed up $*TZ the way it is now. we should think about killing our darlings a bit there, I believe.
22:53 LlamaRider https://github.com/rakudo/rakudo/b​lob/nom/src/core/Temporal.pm#L430
22:54 LlamaRider This guy takes care that both Ints and the singleton object will work.
22:54 * masak .oO( this little pig went to town )
22:55 masak I want to kill $*TZ being a Callable in spec, and make it just an Int. any objections?
22:57 LlamaRider I don't know enough to have any. Sounds sane to me.
23:07 LlamaRider Also, the next 2 weeks should be quite nice for stress testing DateTime. DST is on from March 10 here (in the US), while it's only March 30 in Europe. That ought to cause troubles.
23:09 masak again, patch away. all I know is I won't be the one adding full time zone support to Rakudo. :)
23:10 jnthn Oh hah... When we do the upcoming DST change here in Sweden, I'll be away on vacation...in a country that doesn't do DST. :)
23:20 LlamaRider The spec doesn't mention anything about the nature of $*TZ ... I guess I will switch it to an int and refactor... Though to actually compute the TZ I will need to port some of the DateTime::Timezone magic. Will see
23:20 LlamaRider Also, now I feel awkward since moritz threw push permissions on me and I don't know how the submission cycle to rakudo works. Should I wait for someone to review my code in a branch and then push it? Or just push directly in Temporal.pm?
23:20 masak right. I guess the proposal is to put more of such magic in src/core/Temporal.pm
23:21 masak LlamaRider: short answer: do what you feel is appropriate.
23:21 masak do a branch if you're unsure. do a direct commit if you're relatively sure.
23:21 masak run the spectests more often than I usually do ;)
23:22 LlamaRider ok, let's see how this ends up. thanks :)
23:26 jnthn 'night, #perl6
23:40 cognominal joined #perl6
23:49 masak 'night, #perl6
23:56 FROGGS nqp: say("abc" x 7);
23:56 p6eval nqp: OUTPUT«Confused at line 2, near "say(\"abc\" "␤current instr.: 'panic' pc 14698 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.pm:278)␤»
23:59 FROGGS nqp: say(nqp::x("abc", 7));
23:59 p6eval nqp: OUTPUT«abcabcabcabcabcabcabc␤»

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

Perl 6 | Reference Documentation | Rakudo