»ö« 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:35
census left
|
|||
arnsholt | ENOPHENNY | 00:41 | |
jnthn: There's a hardcoded REPR id for the bigint REPR in sixmodelobject.pmc I suspect is bitrotted | |||
diakopter | should be a symbol, yeah | ||
00:41
census joined
|
|||
timotimo | what does "Postcircumfix calls can be cached now." mean? o_O | 00:42 | |
diakopter | invoking a thing | ||
(I assume it means the lookup of the postcircumfix:<()> method is cacheable | 00:44 | ||
) | |||
timotimo | oh, interesting | ||
00:44
jtpalmer joined
|
|||
timotimo | GlitchMr: you didn't mention the merge of md-nqp for rakudo in your blog post ;) | 00:45 | |
so md got slower, but () calls get faster | 00:48 | ||
hmm | |||
01:03
grondilu left
|
|||
timotimo | i've found a strange bug with my lexical suggestion code | 02:03 | |
hmm | 02:07 | ||
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 | ||
foobaz used at line 4. Did you mean '&foobar'? | |||
lue | r: {sub abc() { say "A" }; sub abd { say "B" };}; abc(); abd(); | 02:14 | |
p6eval | rakudo d98dd5: OUTPUT«===SORRY!===Undeclared routines: abc used at line 1. Did you mean '&abs'? abd used at line 1. Did you mean '&abs'?» | ||
lue | r: {our sub abc() { say "A" }; our sub abd { say "B" };}; abc(); abd(); | ||
p6eval | rakudo d98dd5: OUTPUT«===SORRY!===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
03:01
FROGGS left
03:04
orafu left,
orafu joined
03:41
woosley joined
03:51
Chillance_ left
|
|||
timotimo | lue: you found it. great! | 03:56 | |
04:01
census left
04:09
woosley left
|
|||
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«===SORRY!===Undeclared routines: xyzzy used at line 1. Did you mean '&xyzzyx'? xyzzyx used at line 1. Did you mean '&xyzzy'?» | ||
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:18 | |
timotimo | nah, the calculation does a full levenshtein distance search | 04:20 | |
04:20
JimmyZ joined
|
|||
JimmyZ | r: { our sub xyzzy() is export { say "A" }; our sub xyzzyx { say "B" };}; &xyzzy(); xyzzyx(); | 04:22 | |
p6eval | rakudo d98dd5: OUTPUT«===SORRY!===Undeclared name: &xyzzy used at line 1Undeclared routine: xyzzyx used at line 1. Did you mean '&xyzzy'?» | ||
04:22
JimmyZ left
|
|||
lue | r: {our sub xyzzy() { say "A" };}; xyzzy(); | 04:24 | |
p6eval | rakudo d98dd5: OUTPUT«===SORRY!===Undeclared routine: xyzzy used at line 1» | ||
04:25
preflex left
04:27
preflex joined
|
|||
timotimo | lue: github.com/timo/rakudo/blob/nom/sr...rld.pm#L50 | 04:34 | |
04:44
preflex_ joined
04:45
preflex left,
preflex_ is now known as preflex
04:52
kshannon joined
|
|||
Sifr | Does this still hold for perl6, perldoc.perl.org/perlstyle.html ? | 04:54 | |
or is there a newer version at all? | |||
timotimo | you don't have to (and i don't think even can) use "use strict" | 04:55 | |
Sifr | Oh great. Is 'use warnings' still used? | 04:56 | |
I am just figuring out a project to do in perl6/reading documentation | 04:57 | ||
05:15
isBEKaml joined
|
|||
sorear | n: $x = 5; say $x; | 05:20 | |
p6eval | niecza v24-35-g5c06e28: OUTPUT«===SORRY!===Variable $x is not predeclared at /tmp/urF95bLA6X line 1:------> <BOL>⏏$x = 5; say $x;Variable $x is not predeclared at /tmp/urF95bLA6X line 1:------> $x = 5; say ⏏$x;Unhandled exc… | ||
sorear | n: no strict; $x = 5; say $x; | ||
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… | ||
sorear | n: no strict; $x := 5; say $x; | ||
p6eval | niecza v24-35-g5c06e28: OUTPUT«===SORRY!===Cannot find definition for binding??? at /tmp/zQh9Y_svSm line 1:------> no strict; $x := 5⏏; say $x;Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) … | ||
sorear | hey, someone broke no strict in niecza | 05:21 | |
05:29
isBEKaml left
05:30
isBEKaml joined
05:32
am0c joined,
kaare__ joined
05:41
am0c left
05:42
woosley joined
|
|||
isBEKaml | hello, #perl6! | 05:47 | |
05:59
m0ss joined
|
|||
isBEKaml | (To any debian users here): What's the convention used by Debian to generate Debian native packages? dh_make? | 06:06 | |
06:07
SamuraiJack joined
06:10
woosley left
06:13
vaelxon joined
06:29
isBEKaml left
06:32
isBEKaml joined
06:36
census joined
06:43
rmp joined
|
|||
sorear | isBEKaml: if you have a source package, cd into it and run "debian/rules build" | 06:45 | |
you might have to do some config step first | |||
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 | ||
to clarify part 2: debian/rules is free to use the helpers or not, as long as the result is the same | |||
isBEKaml | sorear: Well, the reason I asked for that info is to help in building a similar R* binary for Slackware. | 06:47 | |
sorear: I'm also looking at debian maintainers' guide. Non-relocatable binaries are a problem in building packages for slackware. | |||
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 | ||
debian binary packages are created using /usr/bin/ar | 06:49 | ||
moritz | fakeroot just fakes being a user "root" | ||
so I don't see how it helps with relocation | |||
sorear | isBEKaml: why are you asking about debian packages if you actually want to know about slackroot packages? | ||
isBEKaml | moritz: with the cwd marked as root? | ||
sorear | isBEKaml: no | ||
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 | ||
isBEKaml | sorear: Well, it looks like perl6 was successfully was built for debian packages. I was asking after how it does that. | ||
moritz | isBEKaml: maybe you are confusiong fakeroot with chroot? | ||
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 | |
Oh wait | |||
I think I get it | |||
You're trying to find out how Debian gets around relocatability problems | |||
isBEKaml | moritz: chroot was what I thought at first - but when I looked over at debian maintainer's guide, it mentioned fakeroot. | ||
sorear: yes | |||
sorear | It doesn't. | 06:52 | |
isBEKaml | oof | ||
moritz | I think the rakudo packages build binaries that expect to be installed in /usr/ | ||
isBEKaml | sorear: Doesn't debian use a sandbox folder to compile all binaries and build a final packages using relative paths? | ||
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 / | ||
moritz | so that means when they are built $SRC_DIR/debian/<whatever>, they simply won't work in that location | 06:53 | |
but they'll work again once copied to /usr/ | |||
sorear | so you have two options: | ||
06:53
ANswer_777 joined
|
|||
sorear | 1. build binaries that don't work (usual approach, but for gnarly multipass build protocols like perl6 not so hot) | 06:53 | |
2. be relocatib le | |||
isBEKaml | sorear: 2. is out | 06:54 | |
06:54
ANswer_777 left
|
|||
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:55 | |
moritz | 1. isn't too bad, because the version in source dir still works | ||
sorear | I think that you're going to need to solve the relocatability problem | 06:56 | |
maybe not today, but before christmas | |||
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. | ||
sorear: *christmas* ? Boy, does that ever get old? :) | |||
moritz | isBEKaml: well, you shouldn't configure parrot with a prefix of the sandbox folder | 06:57 | |
isBEKaml: you should configure parrot with a prefix of /usr | |||
isBEKaml: and then copy to the sandbox folder anyway | |||
isBEKaml: that way the binaries work when installed | 06:58 | ||
isBEKaml | moritz: so, --prefix=/usr and make DESTDIR=$SANDBOX install? | ||
moritz | isBEKaml: yes | ||
isBEKaml | moritz: I think I tried that. Let me try once again. | ||
moritz | and for build nqp, you need the parrot package already installed | 07:04 | |
and for building rakudo, you need the nqp package already installed | 07:05 | ||
isBEKaml | moritz: this is R* | 07:06 | |
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: github.com/svatsan/RakudoStar-Slac...SlackBuild | 07:08 | |
moritz: It follows the same steps used for building R* from source + some more to get a final .txz slack package. | |||
moritz | well, I don't know much about slackware packaging | 07:09 | |
but if it takes the same approach as debian, it won't work | |||
perl Configure.pl --gen-parrot --prefix=/usr | |||
this step tries to install parrot into /usr | 07:10 | ||
not into some install/ dir | |||
which is why you need a separate package for parrot | |||
rakudo and nqp need a successfully installed parrot; non-relocation means that needs to be done in a separate package | 07:11 | ||
the R* approach isn't well suited for direct copying into a linux package manager | |||
isBEKaml | moritz: hmm, I already have rakudo and parrot slackbuilds. | 07:18 | |
moritz: does nqp take the same configuration as rakudo? I mean, I can bundle nqp along with rakudo? | |||
07:18
Sifr left
|
|||
moritz | isBEKaml: nqp takes its prefix from parrot | 07:19 | |
isBEKaml: and rakudo needs an installed nqp, afaict | |||
so nqp needs to be a separate package | |||
isBEKaml | moritz: okay | 07:20 | |
07:20
kaare__ left
07:32
rmp left
|
|||
bonsaikitten | isBEKaml: I wouldn't recommend "bundling" - let nqp be an independent package | 07:39 | |
07:41
spider-mario joined
|
|||
isBEKaml | bonsaikitten: Yes, that's what I'm working on. | 07:42 | |
07:52
SamuraiJack left
07:53
kaare_ joined
07:55
SamuraiJack joined
|
|||
diakopter | . | 07:55 | |
07:56
zby_home joined,
domidumont joined
08:08
domidumont left
08:09
domidumont joined
08:31
kaare_ left
08:45
labster left
|
|||
isBEKaml | \o/ | 08:58 | |
parrot, nqp and rakudo compiled and installed successfully with slackbuild scripts! :) | |||
moritz++, sorear++ | |||
I'll work on fetching modules later. I will now just make rakudo, nqp available from slackbuilds.org repo. | 08:59 | ||
and update parrot. | |||
09:02
xinming_ joined
|
|||
moritz | isBEKaml++ | 09:04 | |
09:05
xinming left
09:07
rindolf joined
09:16
FROGGS_ is now known as FROGGS
|
|||
FROGGS | morning | 09:16 | |
isBEKaml | FROGGS: hi (It's nearly 3pm here :) | 09:27 | |
masak | greetings, #perl6 | ||
FROGGS | nearly 11pm on my side :o) | ||
moin masak | |||
isBEKaml | and morning? eh... | 09:28 | |
greetings, masak | |||
FROGGS | err, morning isBEKaml of course | ||
FROGGS needs moar coffee | |||
09:28
kaare_ joined
|
|||
FROGGS | btw, I have heard there were attempts to support Perl 5 from rakudo directly (not blizkost), is that true? | 09:30 | |
that was years before nom I suppose? | |||
masak .oO( good moarning ) | |||
isBEKaml | FROGGS: coffee works. | 09:31 | |
moritz | good masak, morning | 09:34 | |
FROGGS | moritz: the workshop was great btw, 129 ppl, and very good feedback so far | 09:38 | |
but only one one p6 talk as far as I know (lichtkind about p6oo, was very good) | 09:39 | ||
moritz would have loved to be there | 09:40 | ||
09:40
SamuraiJack left
|
|||
FROGGS | moritz: well, there will be other conferences, I hope I can make it to kiev | 09:41 | |
09:41
SamuraiJack joined
09:42
isBEKaml left
|
|||
FROGGS | I've missed thursday evening and most parts of friday because my youngest son and my wife are in hospital :/ | 09:42 | |
it looks like they will be out to wednesday or so | 09:43 | ||
moritz | FROGGS: I hope they get well soon | 09:44 | |
09:46
zby_home left
|
|||
FROGGS | moritz: where would I find something about slangs in the synopsis? | 09:48 | |
moritz | FROGGS: dunno | 09:49 | |
probably S02 or so | 09:50 | ||
FROGGS | ahh, found it perlcabal.org/syn/S02.html#Slangs | ||
thanks | |||
09:55
Liz_ joined,
Liz_ is now known as lizmat
|
|||
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 contextuse 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» | ||
FROGGS | r: use MONKEY_TYPING; augment slang Regex { }; | 09:58 | |
p6eval | rakudo d98dd5: OUTPUT«use of uninitialized value of type Mu in string contextuse 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» | ||
FROGGS | r: use MONKEY_TYPING; augment slang MAIN { }; | ||
p6eval | rakudo d98dd5: OUTPUT«===SORRY!===You tried to augment slang MAIN, but it does not existat /tmp/9HE_twdGM1:1------> use MONKEY_TYPING; augment slang MAIN ⏏{ }; expecting any of: scoped declarator generic role» | ||
moritz | r: use MONKEY_TYPING; augment slang Perl6 { }; | 09:59 | |
p6eval | rakudo d98dd5: OUTPUT«===SORRY!===You tried to augment slang Perl6, but it does not existat /tmp/fFehxhhg23:1------> use MONKEY_TYPING; augment slang Perl6 ⏏{ }; expecting any of: scoped declarator generic role» | ||
masak | for all the cool stuff slangs purportedly do, they have a very weak level of existence. | ||
FROGGS | ahh, looks like only packages are supported right now | ||
masak submits rakudobug for the internal Parrot error | 10:00 | ||
10:17
census left
10:24
kurahaupo left
|
|||
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«[[[]]]» | ||
FROGGS | masak: is that your new signature? | 10:38 | |
masak | 274 characters. still far too long. | ||
I bet people on this channel could golf this one down a fair bit... :) | |||
tadzik | hello hello | 10:40 | |
FROGGS | hi tadzik | ||
masak | tadzik! \o/ | 10:41 | |
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 | |||
p6eval | rakudo d98dd5: OUTPUT«[[[]]]» | ||
masak | 251 characters. but that seems to have introduced a bug :/ | ||
it should be possible to turn that 'for' loop into a statement modifier, with some unholy reshuffling. | 10:42 | ||
oh oh! | 10:44 | ||
I know! | |||
I can replace it all with a .first call | 10:45 | ||
10:45
isBEKaml joined
|
|||
FROGGS | where does thind $^n come from? | 10:45 | |
masak | there are two $^n. one in infix:<c> and one in b | 10:46 | |
FROGGS | hmm, $^n is the thing on the left of the infix and $^prev is the thing on the right? | 10:47 | |
r: sub infix:<c> { say $^n; say $^prev; $^prev * (4*$^n - 2) / ($n+1) }; say 7 c 8 | |||
p6eval | rakudo d98dd5: OUTPUT«7826» | ||
masak | yeah. just found a bug there. | 10:48 | |
got the order wrong, because 'prev' gt 'n' | |||
r: sub infix:<c> { $^prev * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; say C[^10] | |||
p6eval | rakudo d98dd5: OUTPUT«1 1 2 6 12.571429 17.789474 22.084034 26.180561 30.234032 34.2711166» | ||
masak | r: sub infix:<c> { $^m * (4*$^n - 2) / ($n+1) }; constant C = [\c] 1, 1..*; say C[^10] | ||
p6eval | rakudo d98dd5: OUTPUT«1 1 2 5 14 42 132 429 1430 4862» | ||
masak | ah. much better. | ||
sorear | FROGGS: supporting perl 5 syntax and semantics directly in rakudo was something I agitated for at the PRS | 10:52 | |
FROGGS: i don't remember who supported what and when, but we managed to goad TimToady into dusting off the p5 grammar | 10:53 | ||
i'm afraid the p5-on-rakudo project may have slid back into dormancy | |||
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«[][[]]» | ||
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 | ||
masak | g'ah! still 251 characters. | ||
spider-mario | is that still planned? | 10:55 | |
masak | but perhaps easier to compress this one... | ||
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 | |||
p6eval | rakudo d98dd5: OUTPUT«[[][]]» | 10:56 | |
FROGGS | spider-mario: it is, that's why there is blizkost | ||
spider-mario | ok, thanks. :) | ||
FROGGS | spider-mario: there is just a lack of devs | ||
sorear: PRS? | |||
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? | ||
blizkost is a great approach for #3, and can probably be made to support #1, but is lousy for #2 | |||
performance sucks and there are a ton of semantic traps with the interface | |||
spider-mario | I’m not sure how useful #2 would actually be | 10:58 | |
I can’t think of any relevant use case | |||
sorear | a reimplementation of Perl 5 on top of NQP gives you a much better shot at #1 and #2 | ||
10:58
lizmat left
|
|||
FROGGS | sorear: right | 10:58 | |
well, using Perl 5 modules from within rakudo is #2, right? | 10:59 | ||
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 | ||
spider-mario | oops, sorry, I mixed them up | ||
I meant #1 | |||
sorear | it does not need XS, but it'll be awesome if you don't have to rewrite for 6 | ||
yeah #1 is less compelling | |||
FROGGS: perl reunification summit | 11:00 | ||
FROGGS | ahh, yeah | ||
11:01
crab2313 joined
|
|||
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:03 | |
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:04 | ||
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 | |
that as in rakudo though, will do that then in nqp | |||
sorear | yo masak | 11:13 | |
FROGGS: look at how categoricals work | 11:14 | ||
the spec syntax isn't that, the spec syntax is use v6; | |||
use v5; rather | |||
and it can occur anywhere in a block | |||
this isn't hard to implement, and it makes it consistant with every other scoped change | |||
mberends | Git users might enjoy The Git Parable by github's founder tom.preston-werner.com/2009/05/19/t...rable.html (linked from #Node.js, btw sorear, you might like to lurk there) | 11:15 | |
sorear | well actuallly it is hard, but not for you because jnthn++ already put all the work in | ||
FROGGS | sorear: thanks, every input is welcome :o) | ||
11:16
isBEKaml left
11:21
xinming_ left,
Liz joined
11:22
Liz is now known as Guest67520
11:23
xinming joined
|
|||
masak | yo sorear | 11:33 | |
jnthn | afternoon, #perl6 o/ | 11:34 | |
masak | \o | ||
jnthn | It's sunny! \o/ | ||
masak | oh yeah, you're right! | ||
perfect day to sit inside and hack! | 11:35 | ||
jnthn | :P | ||
FROGGS | hehe | 11:37 | |
masak | & | 11:38 | |
11:42
crab2313 left
|
|||
FROGGS | jnthn: this allows me to execute a statement within another %*LANGuage? github.com/rakudo/rakudo/commit/db...8bd5f5fa59 | 11:42 | |
does that mean it gets parsed using another grammar? | 11:43 | ||
jnthn | That's just meaning that %*LANG are temporaried per statementlist | ||
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... | ||
so, what exactly do I have to do to add a language? :P | 11:45 | ||
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:47 | ||
jnthn | Well, the initial set of languages is set up in %*LANG up in TOP, or maybe comp_unit | 11:48 | |
If you look there you'll see an entry for Perl 5 regex langauge, for example | |||
Then if you search for the same key you should see some use of LANG to do the language switch itself. | 11:49 | ||
LANG also sets $*ACTIONS | |||
Again, based on %*LANG | |||
%*LANG represents the current braid of langauges | 11:50 | ||
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. | |||
It's the contextual/temporized nature of %*LANG that makes that happen. | 11:51 | ||
11:54
SamuraiJack left,
SamuraiJack joined
|
|||
FROGGS | jnthn: that's the diff: gist.github.com/FROGGS/f2d7c5f145af54eecf3f I thought this should let this work: ./perl6 -e '{:p5 7 }' | 11:57 | |
atm I dont know if quibble, sibble, nibble or shwivvle is right/wrong | 11:58 | ||
jnthn | FROGGS: p5 isn't a quote language :) | 12:03 | |
12:04
Guest67520 left
|
|||
FROGGS | jnthn: is there a method I could use instead? | 12:04 | |
jnthn | Hm, moment | ||
hm, we actually do nibble regexes that way... | 12:05 | ||
hoelzro | ahoy #perl6 | 12:06 | |
jnthn | no, seems nibble is what you want | ||
hoelzro | I added posixerrno to NQP today; would someone mind looking over my changes? github.com/hoelzro/nqp | ||
jnthn | FROGGS: Well, the thing is... | ||
FROGGS: quote_lang sets up various starter/stopper things too | 12:07 | ||
FROGGS: It then calls a method nibbler inside of the target language | |||
arnsholt | jnthn: So I'm thinking that I need to set up something more or less similar to what GlobalContext does on JVM | 12:08 | |
FROGGS | jnthn: ohh okay, I previously had nibble, and the nibbler+do_nibbling inside | 12:09 | |
jnthn | FROGGS: Looking at STD around github.com/perl6/std/blob/master/STD.pm6#L1438 | 12:10 | |
It seems that for Perl 5 it sets up a new braid entirely | |||
Then switches to it | |||
For now though you could just try something like <LANG('P5', 'statementlist')> or so | 12:11 | ||
arnsholt: The easiest way is to root it somewhere in Parrot's namespace system. | 12:12 | ||
12:12
pmurias joined,
daviduagain joined
|
|||
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? | ||
hoelzro | pmurias: noted! but are the values of errno portable? | ||
masak | I have a feeling slangs are a lot less composable than roles... | ||
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.. | ||
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 | ||
Yeah. Make it run, make it right, make if fast and all that | 12:16 | ||
pmurias | hoelzro: neither the man page or msdn docs document the exact integer values | ||
12:17
daviduagain left
|
|||
jnthn | arnsholt: On the HLL stuff, one thing to keep in mind is that Parrot already has some stuff in this space. | 12:17 | |
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. | |||
arnsholt | Point | 12:18 | |
hoelzro | pmurias: I guess that it should test that it's non-zero for failures? | ||
is the value of errno defined for success? | |||
hoelzro guesses no | |||
arnsholt | I think errno is only set on an actual error | ||
hoelzro | probably | ||
12:19
pmurias left
|
|||
jnthn | hoelzro: Also I'd group the op in Operations.nqp into the native call related section | 12:19 | |
12:19
rindolf left
12:20
PacoAir joined
12:23
pmurias joined
|
|||
FROGGS | ===SORRY!=== | 12:24 | |
Method 'statementlist' not found for invocant of class 'Perl6::P5Grammar' | |||
\o/ | |||
hoelzro | ok, good suggestion! | ||
FROGGS | jnthn++ | ||
pmurias | if we have errno shouldn't we also have a way to portably look up error codes? | ||
hoelzro | that's probably a good idea | 12:26 | |
pmurias | as otherwise it's not very usefull | ||
btw what do we need that for? | 12:28 | ||
masak .oO( otherwise it won't contain a bit of information! oh wait ) | |||
12:31
FROGGS left
|
|||
arnsholt | pmurias: Is that even possible? I think most of them are just C #defines | 12:34 | |
hoelzro | arnsholt: I think we'd need a map of names -> values | 12:35 | |
so add_map("ENOMEM", ENOMEM) | |||
arnsholt | Right, that'll work | 12:36 | |
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
13:10
crab2313 joined
|
|||
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:11 | |
p6eval | rakudo d98dd5: OUTPUT«[][][]» | ||
masak | 219 characters. | ||
jnthn | Still can't tweet it :P | ||
masak | heh. | 13:12 | |
I think it's possible to get under 140, fwiw. | |||
we're coming up on a year-long search for good solutions to this problem. maybe more than one year. | 13:13 | ||
I'm getting ready to blog it. | 13:14 | ||
13:24
domidumont left
13:50
itz joined
|
|||
moritz | masak: speaking of blogging, how's the t2 review coming along? | 13:51 | |
masak | moritz: I'm on a train. meaning to start looking at t2 during this train journey. | 14:01 | |
it'll be a fun one to review ;) | |||
though there is some t1 fallout that I should be looking at first. | |||
contestants actually emailed me with some feedback on my review of their program. it's the first time that happens, I believe. | 14:02 | ||
14:02
census joined
14:09
crab2313 left
|
|||
moritz | right, I only commented on the reviews per IRC :-) | 14:17 | |
14:22
sizz_ joined
14:23
sizz left,
Psyche^ joined
14:25
Patterner left,
Psyche^ is now known as Patterner
14:28
SamuraiJack_ joined,
SamuraiJack left
|
|||
masak learns about (and is sligtly shocked by) en.wikipedia.org/wiki/Richardson%27s_theorem | 14:30 | ||
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 | ||
I can sort of see it with |x|, because the abs function contains an if statement. | 14:33 | ||
14:33
Chillance joined
14:35
cognominal joined
14:36
yves_ joined
|
|||
masak | the author of github.com/masak/p6cc2012/blob/mas...ew/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:37 | |
jnthn | .oO( no objects, just functions ) |
14:38 | |
14:39
rindolf joined
|
|||
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 | |
which is a good point, but not one that I feel is necessary to add to the review. | 14:40 | ||
now, the author of github.com/masak/p6cc2012/blob/mas...w/bruce.md has a slightly more interesting argument he wants to make. | |||
he says I may have miscategorized his algorithm as exponential, and he lays out the case for why it isn't. | 14:41 | ||
this clearly requires my attention. | |||
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 | ||
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)." | ||
more generally, I don't think an algorithm which has to correlate info across n things *can* be O(n) | 14:43 | ||
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:45 | ||
jnthn | Sorting can be n*log(n) | 14:46 | |
masak | yes. | ||
but I've yet to see a sorting algorithm whose *worst case* isn't O(n**2) or worse. | 14:48 | ||
anyway, I doubt someone solved t1 in linear time. the claim is wrong enough on the surface to merit examination. :) | 14:49 | ||
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 | ||
probably a bunch of others | |||
masak | hm, ok. | 14:55 | |
anyway, superlinear. | |||
14:55
itz left
|
|||
masak | here's the email and my response: gist.github.com/masak/5181910 | 14:56 | |
14:58
kurahaupo joined
|
|||
masak | hm, I think I can easily show that the algorithm isn't O(n). | 14:58 | |
both "put into set" and "check whether X is in a set" are non-constant operations. | 14:59 | ||
jnthn | masak: Oh? If the set is backed by a hash, those operations are O(1)? | 15:04 | |
jnthn goes for a walk | 15:05 | ||
15:10
cognominal left,
FROGGS joined
15:20
kivutar left
15:21
cognominal joined
15:23
LlamaRider joined
|
|||
masak | gist updated with my reasoning: gist.github.com/masak/5181910 | 15:25 | |
15:26
am0c joined
|
|||
masak | there. now I'm freed up to work on t2 reviews ;) | 15:26 | |
15:28
Chillance left,
cognominal left
|
|||
pmichaud | good morning, #perl6 | 15:31 | |
arnsholt | 'lo pmichaud | 15:32 | |
15:32
cognominal joined
15:33
bloonix joined
|
|||
rindolf | pmichaud: good morning. | 15:35 | |
pmichaud: how are you this fine Sunday? | |||
masak | pmichaud! \o/ | 15:36 | |
15:36
kurahaupo left
|
|||
pmichaud | rindolf: I'm doing okay so far. :) | 15:37 | |
15:38
Chillance joined
15:39
isBEKaml joined
|
|||
rindolf | pmichaud: nice. | 15:43 | |
pmichaud: what are you working on? | |||
pmichaud | at the moment, just catching up on email and news :) | 15:44 | |
and backscroll | 15:46 | ||
15:47
raiph left
|
|||
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:49 | |
15:50
SamuraiJack__ joined,
SamuraiJack_ left
15:53
SunilJoshi joined,
cognominal left
|
|||
rindolf | pmichaud: nice. | 15:54 | |
jnthn | FROGGS: tbh, I'd suggest you start small and build towards STD_P5 | 15:57 | |
o/ pmichaud | |||
16:02
cognominal joined
|
|||
arnsholt discovers that he forgot to commit his changes from last night | 16:04 | ||
's what happens when you get too caught up in the hacking, I suppose =) | |||
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
cognominal left
|
|||
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:09 | |
masak | isBEKaml: well spotted. | 16:14 | |
geekosaur | .oO { I fermatted over my patches } | 16:15 | |
isBEKaml | .oO( and they were too small! ) |
16:16 | |
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:19 | |
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:22 | |
FROGGS | LlamaRider: be back in a bit... | 16:25 | |
16:25
FROGGS left
|
|||
masak .oO( git fermat-patch ) | 16:26 | ||
isBEKaml | yeah, that's what caught me - fermat compressor! :P | 16:27 | |
er, compression | 16:29 | ||
16:30
SunilJoshi left
16:32
Chillance left
16:43
isBEKaml left
16:46
kurahaupo joined
16:50
crab2313 joined
16:53
jaldhar_ joined
16:54
_jaldhar left
|
|||
arnsholt | jnthn: Is there anything I should keep in sixmodelobject.pmc's current VTABLE_get_iter()? | 16:57 | |
Or rather, should I keep the vtable mapping for get_iter? | |||
17:06
FROGGS joined
|
|||
FROGGS | LlamaRider: about hosting in public: it will be a branch of the rakudo repo | 17:07 | |
jnthn: it is more like -Oneed that -Ofun I suppose :o) | 17:09 | ||
*than | |||
17:10
domidumont joined
17:13
SamuraiJack joined
|
|||
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 | |
arnsholt: Maybe for stashes | |||
17:14
SamuraiJack__ left
17:15
kurahaupo left
|
|||
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:20 | |
moritz | it fails its tests? | 17:22 | |
17:23
crab2313 left
|
|||
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 | ||
s/is/in/ | |||
17:23
sisar joined
|
|||
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. | ||
FROGGS | dont wanna have a 6k+ lines big file | ||
17:25
benabik joined
|
|||
jnthn | FROGGS: I'd just put the P5 bits in separate files and compile them as separate moduels | 17:26 | |
FROGGS: Rather do a "use" | |||
FROGGS: We may even want to investigate load-on-first-use. | |||
pmichaud | I'm going to update the star release guide to say "if there are any failures in modules-test, stop." | ||
jnthn | pmichaud: +1 | ||
moritz | speaking of stability | 17:27 | |
did we ever get around to nailing down a deprecation policy? | 17:28 | ||
pmichaud | for Star, or for the compiler, or ... ? | ||
moritz | star | ||
though iirc we got zero feedback | |||
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 | ||
jnthn: so this gen-cat script is looking for 'use'-statements? | |||
jnthn | FROGGS: gen-cat just concatentates things | ||
I'm saying compile the P5 things you're doing into a separate PBC | 17:30 | ||
And then "use" that module from where you need it | |||
dalek | ar: 1e25cdd | pmichaud++ | tools/star/release-guide.pod: Update release-guide to stop release process (and file tickets) if tests do not pass. |
17:33 | |
17:37
raiph joined
|
|||
arnsholt | jnthn: Right. I'll keep it for now and we can see what happens if it's torn out later | 17:37 | |
pmurias | FROGGS: re -Oneed just embedding the perl5 interpreter would be much easier then reimplementing perl5 | 17:43 | |
pmichaud | Is zavolaj expected to run under Windows? | 17:44 | |
17:45
ggoebel_ left
|
|||
FROGGS | pmurias: well, shuffling Perl 6 objects to Perl 5 isnt that easy | 17:45 | |
jnthn | pmichaud: Should do. After all, I did all the initial development on Windows... | 17:46 | |
pmurias: It's worth doing both approaches, imo. They're have different strengths/weaknesses. | 17:47 | ||
pmichaud | jnthn: hmm. github.com/rakudo/star/issues/20 | ||
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 | ||
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' | ||
I'm pretty sure the failure is while compiling the library it runs the tests against | |||
arnsholt: Any ideas on ^? Maybe just use "char"? :) | |||
pmichaud | feel free to assign tickets :) github.com/rakudo/star/issues?state=open | 17:50 | |
pmurias | jnthn: yes, both approaches would be usefull | ||
arnsholt | Hmm. That's odd... | 17:52 | |
FROGGS .oO( are they even when both are odd? ) | |||
dalek | kudo-js: 8964ead | (Pawel Murias)++ | runtime/serialization.js: Split up long line to pleas gjslint. |
17:53 | |
kudo-js: 73c3d15 | (Pawel Murias)++ | / (8 files): Update to new version of nqp. |
|||
kudo-js: a5814e4 | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp: Remove dead code. |
|||
17:53
skids joined
|
|||
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:54 | |
jnthn | arnsholt: good question... | 17:55 | |
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 | |||
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 | ar: c918f60 | pmichaud++ | tools/star/release-guide.pod: Rephrase the stop-release note a little more strongly. |
||
jnthn | arnsholt: I've been bumping that by hand for a bit, knowing I really should fix it... | ||
arnsholt: Will have a think on how to do it. | 17:58 | ||
arnsholt | 'k | ||
pmichaud | I'd like to see p5 on nqp, myself. | ||
jnthn | *nod* | ||
FROGGS | LlamaRider: jnthn guesses right | ||
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 | ||
arnsholt | Right. Using the MS C compiler? | ||
jnthn | yeah | ||
gut...Pm got it with gcc too... | |||
gcc on Windows but still... | |||
arnsholt: tdistler.com/2011/11/13/adding-stdi...ual-studio | 18:00 | ||
arnsholt | OH NOES! | 18:01 | |
I didn't know those types were C99 | |||
jnthn | So if I fix that things look better | ||
for that test at least | 18:02 | ||
arnsholt | From a quick grep it seems that's the only C file that uses those types | 18:03 | |
masak | (p5 on nqp)++ | ||
jnthn | 06 too | ||
arnsholt | Oh, right you are. I fail at reading \= | 18:04 | |
jnthn | Pushed fixes for those two | ||
arnsholt | s/=\\/=) | ||
dalek | volaj: 4638245 | jnthn++ | t/0 (2 files): s/int8_t/char/ (C89 compat) |
||
arnsholt | Cheers! | ||
jnthn | I do get a couple of failures on MSVC still | ||
But not due to failing to compile C code | |||
LlamaRider | FROGGS: When that succeeds, how much rope would it provide? I.e. what parts of P5 would be usable in Rakudo? | ||
jnthn | Curious if Pm gets them on gcc on ~Windows... | ||
arnsholt | Definitely | 18:05 | |
dalek | kudo/nom: 2a41b33 | jnthn++ | src/Perl6/Optimizer.pm: Two pir:: => nqp:: in the optimizer. |
||
FROGGS | LlamaRider: if everything goes well, all pure Perl5 modules (with only pure Perl 5 deps) should work | 18:06 | |
LlamaRider | FROGGS: Nice! | ||
jnthn | That sounds like a good bit of work ;) | ||
dalek | rl6-most-wanted: f3476f6 | (Geoffrey Broadwell)++ | most-wanted/bindings.md: I don't think GeoIP is an XML parser. ;-) |
18:07 | |
arnsholt | Hmm. I don't think "invoke() not implemented in class 'NQPRoutine'" is supposed to happen ^_^ | 18:10 | |
dalek | p/vmarray-list: 37bad15 | (Arne Skjærholt)++ | src/ (3 files): Set up a BOOTArray type. |
18:18 | |
p/vmarray-list: d65d88f | (Arne Skjærholt)++ | src/ (2 files): Make nqp::hlllist return the BOOTArray type. Implement ITER boolification and set up BOOTIter type. |
|||
18:18
dalek left
|
|||
arnsholt | Aww. I killed the bot again =( | 18:18 | |
jnthn | You commit too hard :) | ||
arnsholt++ | |||
18:19
dalek joined,
ChanServ sets mode: +v dalek
|
|||
arnsholt | Or push too rarely ;) | 18:19 | |
Anyways, could you take a look at the head commit in that branch? First stab at global context stuff | |||
jnthn | Looks sane, overall | 18:22 | |
Apart from leaving behind a commented out line ;) | 18:23 | ||
arnsholt | Whoops ^_^ | ||
18:25
am0c left
18:27
Chillance joined
|
|||
LlamaRider | Is Rakudo's spectest supposed to run error-free? It fails for me at S32-temporal | 18:34 | |
moritz | worked here last I tried | 18:35 | |
LlamaRider: how young/old is your rakudo? | |||
LlamaRider | fresh checkout from 2 hours ago | ||
but I had the error a few days back as well, so it's not something too recent | 18:36 | ||
moritz | rebuilding here... | ||
18:42
sizz joined
|
|||
LlamaRider | I rebuilt rakudo, running the spectest again | 18:42 | |
18:43
sizz_ left
|
|||
p/vmarray-list: 461b2eb | (Arne Skjærholt)++ | src/pmc/sixmodelobject.pmc: Create iterators for objects with the VMArray REPR. |
|||
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 | |
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:01 | ||
LlamaRider | moritz: I'm still getting the error. In "t/spec/S32-temporal/local.rakudo" Failed tests: 7-22 | 19:05 | |
seems to be something very minor in any case | 19:08 | ||
19:08
zamolxes joined
|
|||
masak | I'm idly thinking of that Perl 6 course I mentioned last week. | 19:32 | |
kind of excited about the idea :) | |||
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:34 | ||
(unless people in Asia really want in, but so fat that hasn't happened) | 19:35 | ||
19:46
szabgab joined
|
|||
szabgab | rakudo: say sprintf "<a>%s </a>", 42 | 19:47 | |
p6eval | rakudo 2a41b3: OUTPUT«<a>42 </a>» | ||
szabgab | rakudo: say sprintf "<a>%s</a>", 42 | ||
p6eval | rakudo 2a41b3: OUTPUT«===SORRY!===Variable '%s' is not declaredat /tmp/qBXRpevGDa:1------> say sprintf "<a>%s</a>⏏", 42 expecting any of: postfix» | ||
szabgab | how can I do the latter properly? | ||
rakudo: say sprintf '<a>%s</a>', 42 | |||
p6eval | rakudo 2a41b3: OUTPUT«<a>42</a>» | ||
szabgab | rakudo: say sprintf '<a>%s</a>\n', 42 | ||
p6eval | rakudo 2a41b3: OUTPUT«<a>42</a>\n» | ||
szabgab | ...with a trailing newline? | 19:48 | |
FROGGS | rakudo: say sprintf "<a>\%s</a>\n", 42 | ||
p6eval | rakudo 2a41b3: OUTPUT«<a>42</a>» | ||
FROGGS | szabgab: escape it | ||
szabgab | I could have guessed | ||
thanks | |||
FROGGS | :o) | ||
moritz | r: say Q:b "<a>%s</a>\n", 42 | ||
p6eval | rakudo 2a41b3: OUTPUT«<a>%s</a>42» | ||
masak | szabgab: if you want '%s' to mean "directive" and not "hash variable", don't put it in qq quotes :) | ||
moritz | r: say sprintf Q:b "<a>%s</a>\n", 42 | 19:49 | |
p6eval | rakudo 2a41b3: OUTPUT«<a>42</a>» | ||
moritz | szabgab: or like this | ||
masak | r: say sprintf q[<a>%s</a>], 42 | ||
p6eval | rakudo 2a41b3: OUTPUT«<a>42</a>» | ||
moritz | the Q:b enables backslash escapes, but not hash interpolation | ||
szabgab | ah | ||
masak | rn: say sprintf "<a>%s\</a>\n", 42 | 19:50 | |
p6eval | rakudo 2a41b3, niecza v24-35-g5c06e28: OUTPUT«<a>42</a>» | ||
masak | escaping the < also works. | ||
_sri | 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 | ||
szabgab | masak, moritz , FROGGS thank you! | 19:51 | |
_sri | a simple thing like non-blocking gethostbyname() is something perl5 can't do | ||
geekosaur | "perl5" can't, perl5's Net::DNS can | 19:52 | |
_sri | not the same | ||
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 | ||
_sri | you want the platform specific stuff too | ||
DNS only sucks | |||
lue | hello world o/ | 19:53 | |
masak | lue! \o/ | ||
_sri | geekosaur: when you look at modern event loops like libuv you'll notice that they all warp gethostbyname() in a pool of threads | ||
*wrap | |||
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 | |||
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 | ||
geekosaur | I understand that arbitrary code already using the builtins can't be made to use asynch dns, if that's your point | 19:56 | |
moritz | LlamaRider: I just see that the timezone tests skip tests depending on the local timezone | 19:59 | |
LlamaRider: which might explain why I don't see the failures you get | |||
_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 | ||
dalek | c: f4d12f3 | (Gabor Szabo)++ | lib/Str.pod: sprintf examples |
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 | ||
_sri | geekosaur: if your event loop uses Net::DNS exclusively, it's a very bad event loop i'm afraid | 20:01 | |
just like AnyEvent::DNS is basically terrible | |||
LlamaRider | er, or is this really a time zone difference that's exactly 10 hours? | 20:02 | |
# got: '2007-01-01T21:22:00+0500' | |||
# expected: '2007-01-01T21:22:00-0500' | |||
geekosaur | actually it's fine for its intended purpose | ||
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:04 | |
moritz | LlamaRider: yes, could be a typo | ||
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 | ||
moritz | LlamaRider: do you have commit access to the spectests? | ||
LlamaRider | I am pretty sure I don't , I have never asked for anything of the sort | ||
moritz | LlamaRider: if not, what's your github ID? | 20:05 | |
LlamaRider | moritz: dginev | ||
_sri | point is, if perl6 can wrap getaddrinfo() in a bunch of threads it is already way ahead of perl5 | 20:06 | |
moritz | LlamaRider: you should now have write access to perl6/roast (and a bunch of other repos) | ||
_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 | ||
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? | ||
and perl is guaranteed to know what it is? | |||
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:09
SamuraiJack left,
szabgab left
20:13
domidumont left
20:14
kaare_ left
20:20
arlinius left
20:21
rindolf left
|
|||
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 | |
20:23
kurahaupo joined
|
|||
moritz | LlamaRider++ # looking into test failures | 20:24 | |
jnthn back | 20:32 | ||
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 | ||
_sri: Thanks for the link; added it to my reading list :) | |||
_sri is amazed with the quality of many PEPs | 20:37 | ||
20:56
raiph left
21:11
Liz joined,
Liz is now known as Guest4367,
cognominal joined,
Guest4367 is now known as lizmat
|
|||
LlamaRider | r: say ~$*TZ | 21:14 | |
p6eval | rakudo 2a41b3: OUTPUT«<local time zone>» | ||
LlamaRider | How can I see its value? it either prints ^^ or just prints $*TZ back | 21:15 | |
lue | r: say $*TZ | 21:17 | |
p6eval | rakudo 2a41b3: OUTPUT«$*TZ» | ||
jnthn | r: say $*TZ.WHAT | 21:18 | |
p6eval | rakudo 2a41b3: OUTPUT«(DateTime-local-timezone)» | ||
jnthn | r: say $*TZ.^methods(:local) | ||
p6eval | rakudo 2a41b3: OUTPUT«postcircumfix:<( )> offset of returns Str perl» | ||
jnthn | r: say $*TZ.offset | ||
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» | ||
jnthn | Hm :) | ||
r: say $*TZ.Str | |||
p6eval | rakudo 2a41b3: OUTPUT«<local time zone>» | ||
jnthn | Beats me... | 21:19 | |
lue | r: my $a = DateTime.new(now); say $a; say $*TZ.offset($a,0); | ||
p6eval | rakudo 2a41b3: OUTPUT«DateTime.new(year => 2013, month => 3, day => 17, hour => 21, minute => 19, second => 29.830353975296e0)3600» | ||
cognominal | trying to compile the post merge rakudo on a mac, I get this error : | ||
multi_dispatch.c:98:9: error: void function 'add_to_cache' should not return a value [-Wreturn-type] | |||
return NULL; | |||
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» | ||
LlamaRider | r: DateTime.new(:timezone($*TZ)).timezone.say | ||
p6eval | rakudo 2a41b3: OUTPUT«$*TZ» | ||
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); | ||
arnsholt | jnthn: Hmm, right. That's no fun | 21:22 | |
dalek | p: 39d7d37 | jnthn++ | src/guts/multi_dispatch.c: Fix copy-pasto (void function returning value). cognominal++ for reporting. |
21:24 | |
cognominal | jnthn++ for the hard work | 21:25 | |
jnthn | arnsholt: Well, it's a mismatch | ||
arnsholt: OTOH, the NQP code-base as largely been updated to avoid such mismatches | |||
arnsholt: Otherwise nothing would work over on the JVM. And it works enough to self-host, so... :) | 21:26 | ||
21:26
pmurias left
|
|||
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 | ||
arnsholt: There are some bogus use of atpos_s around too | 21:29 | ||
arnsholt | Right, right | ||
jnthn | arnsholt: I think I sync'd most I found back over to NQP land but maybe not | ||
arnsholt | I'll try to merge master into my branch first | 21:31 | |
Might be a commit I've missed since I branched off | |||
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:34 | |
the Str method in that class looks like a stub to me. | 21:35 | ||
21:40
PacoAir left
21:46
am0c joined
|
|||
arnsholt | jnthn: The backtraces from NQP compilation errors are a bit useless, it seems =/ | 21:51 | |
Or maybe not... | 21:52 | ||
There we go, I think | 21:53 | ||
jnthn: I think the offender is stable_publish_vtable_mapping in nqp::ops, which does VTABLE_shift_string | 21:55 | ||
Or maybe not, come to think of it | 21:56 | ||
It's iterating over a hash, which shouldn't touch any of my code | |||
jnthn | hm, yeah...I think that's an iterator it's shifting off | 22:02 | |
arnsholt | Hmm. If it's called from one of the NQP custom ops, I might be able to do something clever with GDB | 22:04 | |
22:08
vaelxon left
|
|||
arnsholt | Oh, there we go. It was indeed stable_publish_vtable_mapping | 22:10 | |
Oh, now I see | 22:11 | ||
jnthn: stable_publish_vtable_mapping uses a heterogenous list. The first element is a PMC, the second one is a STRING. Thoughts? | |||
jnthn | arnsholt: Hm, and that's Parrot specific and also probably on the chopping block at some point... | 22:13 | |
I'd pull them out with the get_pmc form of the aggregate, and then get_string it in the op. | |||
arnsholt | Indeed it is. It's called directly as a pir::op as well | ||
Yeah, that was my first thought as well | 22:14 | ||
22:16
m0ss left
|
|||
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:28 | |
arnsholt | jnthn: Found some spurious atpos_s in NQPMu's BUILDALL, in case you want a list | 22:29 | |
22:30
spider-mario left
|
|||
arnsholt | I suspect I'm going to kill the bot again | 22:31 | |
arnsholt pushes | |||
dalek | Heuristic branch merge: pushed 17 commits to nqp/vmarray-list by arnsholt | ||
arnsholt | Oh, good bot! =D | ||
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:38 | |
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. | ||
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 | |
I felt like rewriting since timezones are a lie in the current code - they're just syntax sugar behind doing offset arithmetic | |||
at least that's the impression I got from the DateTime-local-timezone class | 22:42 | ||
masak | if something is outright wrong in Temporal, then of course we should fix that. | 22:44 | |
and yes, I got that impression too last time I looked at both the spec and the Rakudo implementation. | |||
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 | ||
masak | we need to be really, really clear how we handle timezones. | 22:45 | |
please outline what you observe and what you expected. :) | |||
jnthn | I think part of the idea was that it's an invokable | ||
22:45
cognominal left
|
|||
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:47 | |
masak | jnthn: it can be invokable. | 22:49 | |
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:50 | |
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:51 | |
LlamaRider | github.com/rakudo/rakudo/blob/nom/...al.pm#L430 | 22:53 | |
This guy takes care that both Ints and the singleton object will work. | 22:54 | ||
masak .oO( this little pig went to town ) | |||
I want to kill $*TZ being a Callable in spec, and make it just an Int. any objections? | 22:55 | ||
LlamaRider | I don't know enough to have any. Sounds sane to me. | 22:57 | |
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:07 | ||
masak | again, patch away. all I know is I won't be the one adding full time zone support to Rakudo. :) | 23:09 | |
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:10 | |
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 | |
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:21 | ||
masak | right. I guess the proposal is to put more of such magic in src/core/Temporal.pm | ||
LlamaRider: short answer: do what you feel is appropriate. | |||
do a branch if you're unsure. do a direct commit if you're relatively sure. | |||
run the spectests more often than I usually do ;) | |||
LlamaRider | ok, let's see how this ends up. thanks :) | 23:22 | |
jnthn | 'night, #perl6 | 23:26 | |
23:40
cognominal joined
|
|||
masak | 'night, #perl6 | 23:49 | |
23:56
lue left,
cognominal left
|
|||
FROGGS | nqp: say("abc" x 7); | 23:57 | |
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)» |