»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
00:32
benabik joined
00:41
jaldhar_ joined
00:44
abnorman left
00:47
fridim_ left
00:57
jaldhar_ left
01:00
jaldhar_ joined
01:02
bruges joined
01:11
ssutch left
|
|||
raiph | jnthn++ # O(MG) | 01:33 | |
01:37
abnorman joined
01:48
FROGGS_ joined
01:51
FROGGS left
02:07
crab2313 joined
02:29
abnorman left
02:36
konundra left
02:56
konundra joined
03:05
jaldhar_ left
|
|||
sorear | good * #perl6 | 03:17 | |
diakopter | sorear: hi | ||
sorear | so which one of you had the bright idea of trying to load the JVM interop engine at SETTING INIT TIME? | ||
diakopter doesn't know enough to cringe or giggle | 03:18 | ||
sorear | diakopter: I haven't completely read the backlog yet, but it looks like someone thought rakudo didn't load slowly enough, so they unconditionally initialized a major subsystem in the setting init | 03:19 | |
03:19
jaldhar_ joined
|
|||
sorear | s/major/expensive/ | 03:19 | |
diakopter | oh. | ||
sorear | also it leaks memory when initialized, which is probably breaking the eval server | ||
and the testsuite | 03:20 | ||
sorear goes into full backlog mode | |||
03:52
preflex_ joined,
ChanServ sets mode: +v preflex_
03:53
preflex left,
preflex_ is now known as preflex
04:04
crab2313 is now known as i_am_old_w_
|
|||
sorear | done, anyway | 04:17 | |
to fix the jvm problems we need to modify Threading.pm so that it doesn't try to instantiate a full scheduler immediately | 04:18 | ||
in every process | |||
we could probably add initialized flags and do it that way | |||
but a large part of me is going "why are you making the setting 200 lines bigger? use a module!" | 04:19 | ||
cognominal | sorear, what do you think of gist.github.com/cognominal/5989429 | 04:35 | |
04:36
i_am_old_w_ left
|
|||
sorear | I'm having trouble parsing it | 04:37 | |
cognominal | sorear: what do you have trouble with? | 04:39 | |
sorear | that's a really dubious grammar | ||
here's why it doesn't work: | |||
C<aa> | 04:40 | ||
you start to parse in, you now are looking at 'aa>' and try to parse <chunk>+? | |||
start by calling chunk zero times. '>' can't match | |||
now try one time. it gobbles aa>. '>' can't match '' | 04:41 | ||
so try two times. <chunk> itself fails. | |||
so the whole <chunk>+? fails. | |||
+? is almost never what anyone wants | |||
jnthn wrote a regex single stepper for parrakudo, you don't have to ask me to single-step your regexes :) | 04:43 | ||
cognominal | when you try one time it should gobble 'aa', not 'aa>' | ||
sorear | that requires read-your-mind functionality, which is not enabled in this version of perl 6 | 04:44 | |
cognominal | I will try jnthn's stepper | 04:45 | |
sorear | [ <!before 'C<' > . ]+ treats '>' as any other character | ||
cognominal | ho, now I see | 04:46 | |
thx | |||
sorear | .oO( RYM not supported in free version of P6 ) |
||
cognominal | that's a big problem :( :) | 04:47 | |
I will learn to use jnthn's stepper | 04:48 | ||
sorear | that was sort of a joke | ||
I'm not sure perl6-debug has seen much real use yet | 04:49 | ||
lue | RYM? | 04:52 | |
cognominal | jokes often offers big wisdom. With the Perl power come many way to go astray. I suspect that's why many people avoid Perl. I know better because with a simpler language you end up with bigger code. I usually trust more Perl implementers code than mine. | ||
RYM is Read Your Mind | |||
lue | figures I'd guess it the instant I ask :) | ||
sorear sadfaces | 04:55 | ||
someone did something to cause an O(0.5s) regression in jakudo startup time | |||
diakopter wonders what jakudo could mean in Japanese | 04:56 | ||
sorear | nevermind, forgot I had a cpu-hungry background process | 04:59 | |
it's back to hugging 6.000s like it should be | |||
05:07
crab2313 joined
05:08
crab2313 left
05:25
benabik left
05:26
benabik joined
05:27
mtk joined
05:36
SamuraiJack joined
05:38
crab2313 joined
05:46
kaare__ joined
05:58
itz joined
06:00
itz_ left
06:02
cooper joined,
cooper left,
cooper joined
|
|||
PerlJam | anyone awake? | 06:08 | |
Teratogen | yes | ||
but probably not very useful =) | 06:09 | ||
PerlJam | I want to use classify, but modify the values en passant and I don't quite see how to do it. | 06:11 | |
i.e., if I have my @values = <+foo +bar -baz>, I'd like to colect those into two lists <foo bar> and <baz>. | 06:13 | ||
sorear | hmm | 06:14 | |
r: my @values = <+foo +bar -baz>; my %h; %h.push(@values.map: { .substr(0,1) => .substr(1) }); say %h.perl | 06:15 | ||
camelia | rakudo 00cd34: OUTPUT«No such method 'substr' for invocant of type 'Any' in block at /tmp/gtYXrEq2Mo:1» | ||
sorear | r: my @values = <+foo +bar -baz>; my %h; %h.push(@values.map: { $^a.substr(0,1) => $a.substr(1) }); say %h.perl | 06:16 | |
camelia | rakudo 00cd34: OUTPUT«("+" => ["foo", "bar"], "-" => "baz").hash» | ||
PerlJam | oh, I can do it "manually". I was wishing for a way to do it with classify | ||
sorear | yes, it's possible to install a screw with a hammer | 06:17 | |
TimToady | sounds a bit XY to me too | ||
PerlJam | Maybe so. | 06:18 | |
TimToady | have you tried modifying $_? | 06:19 | |
sorear | that probably shouldn't work, even if it does :) | 06:20 | |
r: my @values = <+foo +bar -baz>; say @values.classify(<-> $_ { s/.//; $0 }).perl | 06:21 | ||
camelia | rakudo 00cd34: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/PSGybg8EKJ:1use of uninitialized value of type Any in string context in block at /tmp/PSGybg8EKJ:1use of uninitialized value of type Any in string context in block at /tmp/PSGybg8EK… | ||
sorear | r: my @values = <+foo +bar -baz>; say @values.classify(<-> $_ { $_ = "foo"; "bar" }).perl | ||
camelia | rakudo 00cd34: OUTPUT«("bar" => ["foo", "foo", "foo"]).hash» | ||
PerlJam | huh | ||
sorear | r: my @values = <+foo +bar -baz>; say @values.classify(<-> $_ { substr($_,0,1,'') }).perl | 06:22 | |
camelia | rakudo 00cd34: OUTPUT«Too many positional parameters passed; got 4 but expected between 2 and 3 in sub substr at src/gen/CORE.setting:2846 in block at /tmp/HW4zwvewGF:1» | ||
sorear | r: my @values = <+foo +bar -baz>; say @values.classify(<-> $_ { substr-rw($_,0,1,'') }).perl | ||
camelia | rakudo 00cd34: OUTPUT«Too many positional parameters passed; got 4 but expected between 1 and 3 in sub substr-rw at src/gen/CORE.setting:5452 in block at /tmp/pp3cpGSR2w:1» | ||
sorear | isn't there supposed to be a 4-arg verison of substr? | ||
n: my @values = <+foo +bar -baz>; say @values.classify(<-> $_ { substr($_,0,1,'') }).perl | |||
camelia | niecza v24-86-g39ab531: OUTPUT«{"b" => ["bar", "baz"], "f" => ["foo"]}» | ||
sorear | it works in niecza. sort of :D | 06:23 | |
n: sub what(\l, \r) { my $o = l; l = r; $o }; my @values = <+foo +bar -baz>; say @values.classify(<-> $_ { what(substr-rw($_,0,1),'') }).perl | |||
camelia | niecza v24-86-g39ab531: OUTPUT«{"+" => ["foo", "bar"], "-" => ["baz"]}» | ||
sorear | what() should probably have a name and become a builtin | 06:24 | |
if it's not already | |||
n: my $str = 'foo'; say substr($foo,0,1,'') | 06:26 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Variable $foo is not predeclared at /tmp/4Si2k_5hkG line 1:------> my $str = 'foo'; say substr(⏏$foo,0,1,'')Potential difficulties: $str is declared but not used at /tmp/4Si2k_5hkG line 1:------> [3… | ||
sorear | n: my $str = 'foo'; say substr($str,0,1,''); say $str; | ||
camelia | niecza v24-86-g39ab531: OUTPUT«ooo» | ||
sorear | clearly wrong | ||
06:27
daniel-s_ left
|
|||
TimToady | nr: my @values = <+foo +bar -baz>; say @values.classify({ s/(<[+\-]>)//; ~$0 }).perl | 06:27 | |
camelia | rakudo 00cd34: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/etehveaOuB:1use of uninitialized value of type Any in string context in block at /tmp/etehveaOuB:1use of uninitialized value of type Any in string context in block at /tmp/etehveaOu… | ||
..niecza v24-86-g39ab531: OUTPUT«{"+" => ["foo", "bar"], "-" => ["baz"]}» | |||
sorear | TimToady: I tried that first :[ | 06:28 | |
TimToady | it works in niecza++ :) | ||
PerlJam | yeah, I tried that already too (rakudo--) | ||
moritz | \o | 06:29 | |
TimToady | o/ | 06:30 | |
sorear | o/ moritz | 06:31 | |
06:32
crab2313 left
06:50
raiph left
07:04
daniel-s_ joined
07:10
PacoAir joined
07:12
Rotwang1 joined
07:18
PacoAir left
07:20
PacoAir joined,
FROGGS_ left
07:22
FROGGS joined
07:30
Ayiko joined
07:31
drbean joined
|
|||
dalek | p: c154ef8 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/ (5 files): Remove a bunch of FOR_STAGE0 stuff. |
07:46 | |
sorear | I have two failing sprintf tests. I hope that's expected | ||
FROGGS | sorear: I think so, yes | 07:47 | |
sorear | .tell jnthn Your problems are because you're initializing the JVM interop module in the setting blocks, which means it initializes on every run. Because the JVM interop leaks memory (this can be fixed) and is slow to start (this probably can't), I'd really rather we didn't start it every time the setting loads | 07:58 | |
yoleaux | sorear: I'll pass your message to jnthn. | ||
sorear | .tell jnthn We should either have the threads stuff do initialize-on-first-use, or evict it to a module which is loaded only when needed | 07:59 | |
yoleaux | sorear: I'll pass your message to jnthn. | ||
sorear | sleep& | ||
08:00
PacoAir left
08:09
mtk left,
SamuraiJack left
08:12
mtk joined
08:16
Rotwang1 left
|
|||
moritz | I'll migrate the IRC logs to a new DB schema in a few minutes, and do a major software upgrade | 08:21 | |
there'll be a short downtime | |||
08:21
daniel-s_ left,
dmol1 left
08:22
spider-mario joined
08:23
domidumont joined,
_ilbot left
08:26
dmol joined
08:27
SamuraiJack joined
08:29
mtk left
08:33
mtk joined
08:39
_ilbot joined,
_ilbot left
08:42
_ilbot joined
|
|||
moritz | logger is back. | 08:43 | |
08:46
SamuraiJack left
08:47
dmol left
08:50
domidumont left,
domidumont joined
08:54
estrabd joined
09:07
berekuk joined
|
|||
moritz | d) and is slow to start (this probably can't), I'd really rather we didn't start it every time the setting loads | 09:09 | |
09:58 <+yoleaux> sorear: I'll pass your message to jnthn. | |||
sorry, Ronja discovered copy&paste :-) | |||
nwc10 | Guten tag, Ronja | 09:14 | |
kanst du lesen? | |||
:-) | |||
moritz | she can't, being 2.5 years old :-) | 09:15 | |
nwc10 | yes, I kind of guessed that. E is almost 4 and doesn't even reliably know all letters yet | 09:16 | |
one of E's friends *had* cracked reading by about 2.75, but she is a bit special | |||
moritz | wow, that's scary | 09:17 | |
when I was young it was an accomplishment to read when you came into school | |||
nwc10 | not sure whether it was more than just simple words | ||
moritz | still scary | ||
nwc10 | but still, yes, scary | ||
moritz | anyway, the 'today' page from the IRC logs now has a button which loads new lines via ajax | 09:21 | |
nwc10 | nice | 09:22 | |
moritz | if anybody wants to improve the UI (nicer layout, display a spinning wheel, whatever), that would be great | ||
I'm not nearly as good with UI as I'd like to be :-/ | |||
(but it has worked in the past a couple of times that I came up with something useful but really ugly, and somebody else contributed a nice design; happend with the IRC logs, perl6.org, the 'features' matrix) | 09:24 | ||
09:44
pmurias joined
09:55
dmol joined
09:59
berekuk left
10:05
berekuk joined
10:10
berekuk left
10:14
PacoAir joined
10:15
mstefanko left
|
|||
dalek | p: f888397 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test nqp::istrue on lists. |
10:19 | |
p: d1b71f3 | (Pawel Murias)++ | t/nqp/25-class.t: Expand test 25 to check that methods have access to surrounding nonstatic lexicals. |
|||
10:23
mstefanko joined
|
|||
jnthn | .tell sorear well, how was I to know the interop engine was too inefficient to bind a few types at startup :/ | 10:33 | |
yoleaux | 07:58Z <sorear> jnthn: Your problems are because you're initializing the JVM interop module in the setting blocks, which means it initializes on every run. Because the JVM interop leaks memory (this can be fixed) and is slow to start (this probably can't), I'd really rather we didn't start it every time the setting loads | ||
jnthn: I'll pass your message to sorear. | |||
07:59Z <sorear> jnthn: We should either have the threads stuff do initialize-on-first-use, or evict it to a module which is loaded only when needed | |||
dalek | kudo/nom: 5cab663 | jonathan++ | src/vm/jvm/core/Threading.pm: Delay initialization of interop until later. It doesn't take well to being initialized once per spectest run in the eval server due to a memory leak. This may introduce a race condition, but it's better than hosed spectests. |
10:37 | |
jnthn | .tell sorear I've done initialize on first use, hopefully it helps. | ||
yoleaux | jnthn: I'll pass your message to sorear. | ||
jnthn | & | 10:38 | |
dalek | kudo-js: dd354d7 | (Pawel Murias)++ | / (4 files): Implement setinvocationspec. |
10:51 | |
kudo-js: 2b4ac4d | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp: Fix typo in comment. |
|||
kudo-js: 7c0b2f8 | (Pawel Murias)++ | / (3 files): Update code refs once the outer lexpad for them is ready. |
|||
kudo-js: 33e6d00 | (Pawel Murias)++ | runtime.js: Empty lists boolify to false and others to true. |
|||
pmurias | jnthn: should I merge fix-set-invocation-spec? | 10:52 | |
10:54
berekuk joined
12:02
daniel-s_ joined
12:03
spider-mario left
12:06
spider-mario joined
|
|||
timotimo | it's pretty good that you're contributing all those tests :) | 12:19 | |
12:40
Rotwang1 joined
12:41
ztt joined
12:57
ztt left,
berekuk left
13:04
domidumont left
13:14
frdmn left
13:15
frdmn joined
13:18
berekuk joined
|
|||
timotimo | can i use niecza as a base to figuring out how nodal hyper should work? | 13:32 | |
sorear | good * #pelr6 | 13:35 | |
yoleaux | 10:33Z <jnthn> sorear: well, how was I to know the interop engine was too inefficient to bind a few types at startup :/ | ||
10:37Z <jnthn> sorear: I've done initialize on first use, hopefully it helps. | |||
timotimo | tadzik: in your comment, do you mean "why .Str.path rather than .path" or "why not IO.path.new(...) instead of ...Str.path"? | 13:41 | |
tadzik | the latter | 13:42 | |
well, not even .new | |||
just adding .path seems to work | |||
timotimo | i think it was because Cool didn't have a .path method that worked i believe | 13:43 | |
i fixed that some time ago in rakudo | |||
er, wait, that explains the former, not the latter | 13:44 | ||
i think i thought it was prettier to have $thing.path rather than IO.path($thing) | |||
tadzik | I mean, now panda uses IO.copy | 13:45 | |
in your path it's IO.str.copy | |||
* patch | |||
why not IO.path.copy? | |||
timotimo | oh? hold on | ||
tadzik | I feel a bit confused about Str.copy being file copying, frankly | ||
timotimo | hold on, i don't do that | 13:46 | |
tadzik | hmm | ||
timotimo | isn't .path a constructor to create paths? | ||
tadzik | I think so | ||
timotimo | r: "foo/bar".path.perl.say | ||
camelia | rakudo 5cab66: OUTPUT«IO::Path.new(path => "foo/bar")» | ||
tadzik | yep | ||
oh, wait | 13:47 | ||
I'm confused again :) | |||
.Str.path | |||
timotimo | well, i think .Str.path can be replaced with .path in all those places? | ||
except, wasn't there some strange Find::Result class? | |||
tadzik | ...I'm confused again | ||
Find::Result is obsolete now that we have proper Path objects | |||
I'll remove it and get back to you | |||
timotimo | i think the reason behind making the .Str was because Find::Result had a "path" method that returned a string | ||
tadzik | yeah | 13:48 | |
timotimo | so i had to use the .Str method instead and turn the result fo that into an actual path | ||
tadzik | I see | ||
yeah, that'll explain it | |||
timotimo | after removing Find::Result, you can throw away my pull request and just replace .IO.copy with .path.copy globally or something | ||
so, if i see that correctly, the only spot where "is nodal" really changes anything is for unary pre- or postfix things, like .[] or .{} | 13:53 | ||
13:54
dmol left
13:59
jlaire joined
|
|||
timotimo | turns out even the "is nodal" marker trait isn't declared yet | 13:59 | |
13:59
dmol joined
|
|||
tadzik | wow, File::Find becomes so much simplier with IO::Path | 14:00 | |
everything Just Works | |||
labster++ | |||
timotimo | \o/ | ||
sorear | o/ | 14:01 | |
tadzik | any idea how do I make submodules point to the latest revision, The Right Way? | 14:02 | |
timotimo | cd submodule && git fetch && git checkout origin/master && cd .. && git add submodule - i *think* | ||
rom1504 | no not add submodule, commit | 14:03 | |
tadzik | something happened :) | ||
timotimo | ah, o | ||
thanks rom1504 | |||
rom1504 | oh I thought this was #git :D | 14:04 | |
tadzik | :D | 14:05 | |
14:06
birdwindupbird joined,
crab2313_ joined
|
|||
timotimo is going to test his very first, probably wrong, prototype for "is nodal" unary hypers | 14:07 | ||
huh. | 14:13 | ||
timotimo typo'd "nodal" to "nodl" and wondered why there were exceptions >_< | 14:16 | ||
14:18
crab2313_ left
|
|||
timotimo | apparently it's not enough or actually wrong to put "is nodal" on the proto method :| | 14:23 | |
14:26
Rotwang1 left
|
|||
timotimo | huh! | 14:28 | |
it's parsing, then World gets called to throw a typed exception and then it bombs | 14:29 | ||
14:30
ecocode joined
14:45
Rotwang1 joined
|
|||
dalek | nda: aa8e228 | tadzik++ | ext/File__Tools: Bump File::Tools version |
14:47 | |
nda: 7b2d7b2 | tadzik++ | / (5 files): Chase File::Find changes and IO::Handle.copy deprecations |
|||
tadzik | I suppose I broke All The Things on the way | ||
after a release of 2013.07 I'm going to tag panda with 2013.07 as well, and advice people to keep the two in sync | 14:48 | ||
<3 'rakudobrew update all' | 14:50 | ||
14:52
raiph joined
14:55
ecocode left
15:03
konundra left
|
|||
pmurias | tadzik: we have a rakudobrew? | 15:05 | |
tadzik | pmurias: yeah, sort of :) | 15:06 | |
github.com/tadzik/rakudobrew | |||
pmurias | tadzik: what would be super awesome would be a way to build (and test) rakudo on a specified nqp branch | ||
tadzik | if you could add rakudo-js to it, that'd be great :) | 15:07 | |
pmurias: as noted in the readme, the only requests I accept are pull requests :P | |||
pmurias | there's only nqp-js at this point, rakudo-js is still vapourware | ||
tadzik | I see | ||
well, I know, but that'd still be cool :) | |||
the moar the merrier | 15:08 | ||
15:09
mst joined
15:12
rindolf joined
15:22
domidumont joined
|
|||
moritz | .oO( moarvm the merriervm ) |
15:28 | |
timotimo | now i know why my "is modal" stuff doesn't end up in the hyperop | ||
because making the hyperop apparently creates a block for that? | 15:29 | ||
huf | that v looks like it feels roman and wants to be a u | ||
timotimo | oh, actually ... it's a sub from further above apparently? METAOP_HYPER_CALL thet is used for >>.[], that would certainly make sense and explain things | ||
15:30
FROGGS left
|
|||
timotimo | no, that's wrong, hyper_call is >>(...) isn't it? | 15:30 | |
15:34
FROGGS joined,
xilo joined
|
|||
timotimo | i ... really don't know how to fix Mu::dispatch:<hyper> to pass on wether or not the op is nodal, because it depends on the object that gets passed in *later* >_< | 15:36 | |
that can't be right | |||
yeah, how is that even supposed to work. | 15:37 | ||
ah, but of course | |||
(<a b>, <c d>>>[0] should look up wether or not [] is nodal in relation to the object that's to the left of the >>, so (...) | 15:38 | ||
and *that* can certainly work | |||
but if the logic for that is in dispatch:<hyper> only, that can't be enough; otherwise if there's a hypothetical blorp method that is not nodal in List, but it is nodal in Fish, it would have to descend into a List and then not-iterate over Fish (which is, incidentally, Iterable) | 15:41 | ||
15:48
rindolf left
|
|||
TimToady | I think we can safely assume that the topmost method represents all of them in this regard, and if you're duck-typing harder than that, it's just erroneous | 15:51 | |
otoh, if the algorithm itself is recursively hyper, it can make the decision again, I suppose | 15:53 | ||
15:53
Rotwang1 left
|
|||
TimToady doesn't really have enough caffeine in him yet to think... | 15:53 | ||
16:00
berekuk left
16:02
rindolf joined
16:03
SamuraiJack joined
16:08
Rotwang1 joined
16:21
Rotwang1 left
|
|||
timotimo | early prototype ready to get tested | 16:22 | |
only need to come up with a whole bunch of tests | |||
what other operations are supposed to be nodal? | 16:23 | ||
what about something like .elems? | |||
TimToady | yes, anything that presumes a structure that would otherwise be recursed into | 16:24 | |
.elems on leaves would be rather uninteresting | 16:25 | ||
timotimo | i seem to still be doing "it" wrong | ||
TimToady | just as subscripting on leaves tends to be rather too interesting :) | ||
16:25
lelf joined
|
|||
timotimo | should the "is nodal" be placed on the proto method or on all candidates or on both? | 16:26 | |
TimToady | generally the proto would be the &foo that gets passed in to the higher-order function, I'd think | ||
arguably any trait on the proto maybe oughta be reflected in the multis though | 16:27 | ||
timotimo | okay; but that's what i have and i'm not getting IS_NODAL here; could it be because i'm checking in the method dispatch:<hyper> of the Mu class? and it says Mu \SELF: ...? | 16:28 | |
TimToady | dunno, I've never actually looked at how rakudo does HOP | ||
timotimo | OK | ||
TimToady | it's possible it's assuming something for optimization that makes it harder in the general case... | 16:29 | |
you'd need a rakudo expert for that, though | |||
TimToady is just the chief handwaver here... | 16:30 | ||
pmurias | jnthn: ping? | ||
timotimo | :) | ||
jnthn: ping from me, too (putting traits on protos vs multi candidates) | |||
16:33
domidumont left,
lelf left
|
|||
pmurias | jnthn: should the class really be in the list of it's parents? as returned my .HOW.parents? | 16:33 | |
16:33
lelf joined
|
|||
moritz | r: say Int.^parents | 16:34 | |
camelia | rakudo 5cab66: OUTPUT«» | ||
moritz | r: say Int.^parents.perl | ||
camelia | rakudo 5cab66: OUTPUT«()» | ||
moritz | huh. | ||
pmurias | moritz: in nqp | 16:36 | |
dalek | osystem: 7e6294d | duff++ | META.list: Add Questhub to META.list |
||
16:37
benabik left
|
|||
pmurias | nqp: my $parent := NQPMu.HOW.parents(NQPMu)[0];say($parent.HOW.name($parent)) | 16:37 | |
camelia | nqp: OUTPUT«NQPMu» | ||
pmurias | moritz: ^^ | ||
[Coke] wonders if it is now safe to run the daily spectest run | |||
16:37
benabik joined
|
|||
timotimo | for a custom-built operator that "is nodal", the hyper operator will not flatten nor descend | 16:39 | |
[Coke] hurls regexcrossword.com/ | |||
timotimo | oh that's nicer than the one that went around the net half a year ago | 16:40 | |
16:40
konundra joined
|
|||
moritz | pmurias: ok | 16:40 | |
maybe it's easier for mro calculation that way? | |||
moritz has no idea | 16:41 | ||
timotimo | In order to save your progress you have to login with Facebook. <- ... wat :( | ||
moritz | github login would be the far more natural choice, IMHO | 16:42 | |
timotimo | javascript localstorage even more so. | ||
oh, i know why i'm failing. i'm calling Parcel's postcircumfix:<[ ]> all the time >_> | 16:44 | ||
and i neglected to mark that nodal | |||
benabik | Hm. A* down, .* .* across. That _should_ match anything I fill out, including nothing, yes? Or are the patterns all surrounded by ^$ ? | ||
timotimo | but parcel calls self.flat; does that make sense? | ||
benabik: apparently they are surrounded by ^$ | |||
is (<a b>, <c d>)>>[0] supposed to give <a c>? because if that's the case, then the flattening aspect of Parcel's [ ] must be given up; that's gotta explode somewhere else. | 16:46 | ||
er, actually ... no | 16:47 | ||
does nqp::p6listitems(obj.tree.eager) perhaps not work the way i think it does? does it flatten anyway? | 16:48 | ||
16:50
grondilu joined
|
|||
moritz | the annoying part of regexcrosswords is that the punctuation is so small that I have trouble reading it when vertical | 16:51 | |
TimToady | perhaps the underlying problem is that things like .flat are defined operationally when in fact they should be define HOPishly | ||
timotimo | "higher order programmingishly"? | 16:52 | |
TimToady | yes, so all you have to do is look at the 'is nodal' of the flattening meta-operator | 16:53 | |
seems to me that flattening implies nodal | 16:54 | ||
and you don't even have to look at what it is you're flattening | |||
pmurias | moritz: it's calculated from the mro, by the use of the identity function ;) | ||
TimToady | but if the flat is buried operationally in the other thing, rather than being a higher-order function, you can't just look a the flat op, but have to distribute that info elsewhere | 16:55 | |
benabik | It would be better if the vertical clues were rotated 45° instead of being fully vertical | ||
timotimo | benabik: my thoughts exactly | 16:56 | |
timotimo doesn't like running into walls like in the flat case now | 16:58 | ||
that doesn't seem quite like something i myself could try fixing just like that | |||
17:00
berekuk joined
|
|||
TimToady | well, I wouldn't worry too much about Parcels, if you can get the other bits to work | 17:03 | |
timotimo | right. it seems like when i write [<a b c>, <d e f>]>>[0] it will see that a nodal hyper is needed and knows not to descend | ||
and then it calls [0] on a, b, c, d, e and f | 17:04 | ||
TimToady | in the normal case, it probably doesn't matter whether the flat is hidden or not, since the thing that flat is applied to will also be nodal | ||
dalek | pan style="color: #395be5">perl6-examples: 32f57e6 | (Lucien Grondin)++ | parsers/Newick.pm: style |
||
timotimo | i think it has to do with: $items := nqp::p6listitems(obj.flat.eager) (which was there before), which i changed to depend on $descend and have $items := nqp::p6listitems(obj.eager) instead | ||
oh, eager flattens! | 17:05 | ||
and .tree.eager and .lol.eager all flatten, too | 17:06 | ||
oh | |||
[<...>, <...>] is actually syntax for something else isn't it >_< | |||
that was pretty darn dumb. | |||
r: say [<a b>.item, <c d>.item] | 17:07 | ||
camelia | rakudo 5cab66: OUTPUT«a b c d» | ||
timotimo | r: say [<a b>.item, <c d>.item].perl | ||
camelia | rakudo 5cab66: OUTPUT«[$("a", "b"), $("c", "d")]» | 17:08 | |
timotimo | that's what it should have been | ||
yays, it actually works! | 17:10 | ||
17:12
zby_home_ joined
17:13
census_ joined
|
|||
timotimo | i may end up making a pullrequest this evening, maybe tomorrow. | 17:16 | |
commute& | |||
oh, next tram in 30 minutes, guess i'll code some more | 17:17 | ||
17:19
birdwindupbird left
|
|||
timotimo | TimToady: should the specs include a list of nodal methods and post/prefix operators? i'll probably build a bunch of spectests that ensure each of those that I (we) think should be nodal actually is | 17:24 | |
17:25
mstefanko left
17:30
ajr joined,
ajr is now known as Guest16306,
Guest16306 is now known as ajr_
17:31
census_ left
17:36
jaldhar_ left,
jaldhar_ joined
|
|||
benabik | I find the crossword to be slightly easier to read after using the element inspector to set the clues to be non-bold monospace. | 17:49 | |
lelf | I find it to be a lot easier with pen & paper | 17:52 | |
... maybe cause I dislike to tilt my head | 17:54 | ||
benabik has been tilting his laptop. | |||
lelf | but... but.. then you have to tilt your hands | 17:56 | |
timotimo | does it seem sensible to have a S03-operator/hyper-nodal.t? | 18:04 | |
dalek | p: 83e79a3 | (Pawel Murias)++ | t/nqp/71-setboolspec.t: Add a test for setboolspec. |
18:07 | |
p: c39ed26 | (Pawel Murias)++ | t/nqp/ (2 files): Test using the metamodel at runtime more. Expand test 65 and test 72 which tests using the metamodel for inspecting and applying roles at runtime. |
|||
18:09
lob joined,
lob is now known as dodolob
|
|||
timotimo | hm. nodal things: elems, uniq... what about pick, roll? reverse? sort? values? keys? kv? pairs? | 18:10 | |
that all seems to be nodal in some way | |||
dalek | kudo-js: 67218aa | (Pawel Murias)++ | / (7 files): Implement MODE_CALL_METHOD for setbootspec. nqp::rebless, fixed getting the method name, fixed mixing in roles and a couple of other small things. All that to get QAST::Node.set_compile_time_value to works. |
18:11 | |
timotimo | .min and .max seem nodal, too | 18:15 | |
and .shift and .pop, too :| | |||
i can't just go around and throw an "is nodal" on almost all of the methods of Any and List and Hash now can i? | 18:16 | ||
and also: how about derived classes? a user-derived class would then have to plop an is nodal to their reimplementation? maybe that is sensible to ask of them, though. | |||
sorear | o/ | 18:21 | |
timotimo | "as well as various methods that assume they are already working something Positional or Associative", that does sound like i can just go aronud slapping "is nodal" on everything and their dog | ||
tadzik | I keep reading that as "is nadal", which in Polish means "is still" | 18:22 | |
like "it's still not working :(" | |||
timotimo | hehe | ||
TimToady | hang in there a sec | 18:26 | |
timotimo prepares for sage advice and wisdom about the nodality issue to trickle down from TimToady | 18:28 | ||
dalek | ecs: 948f48a | larry++ | S32-setting-library/Containers.pod: Don't use Nil to mean () anymore |
18:30 | |
ecs: 674a76b | larry++ | S03-operators.pod: clarify what is nodal |
|||
timotimo | hum. okay. | 18:31 | |
that clarifies things | |||
TimToady | that's the general principle of the thing, which is more extensible than a list | ||
the first conjecture there would save a whole lot of 'is nodal' declarations | 18:32 | ||
but we can't just declare Any to be Iterable... | |||
timotimo | that's true. but i'm not sure how to implement the check properly | 18:34 | |
the conjecture about "methods declared in a class that is iterable" | 18:36 | ||
TimToady | probably need jnthn++ to help with that; I see something like 'is Iterable' sets a dynamic variable in the compiler $*NODAL or some such, and maybe there's a 'use nodal' pragma that can also set it for the rest of the statements in a class | 18:37 | |
unless we want .ACCEPTS declared in Any to also be nodal | |||
benabik | `role Iterable is nodal` perhaps? | ||
TimToady | can argue that both ways | 18:38 | |
benabik: maybe, jnthn can probably suggest the best way to go about that | |||
timotimo | and then i'll have to go through the classes and roles that "is nodal" and change all the methods in it? | ||
benabik | (as opposed to just making Iterable magical in some way) | 18:39 | |
TimToady | maybe we just do the 'is Iterable' thing, and mark every method in Any as nodal | ||
timotimo | "mark every method in any as nodal" by hand? ;) | ||
(by hand == with a macro) | |||
TimToady | the point is not to put 'is nodal' all over | 18:40 | |
timotimo | right. | ||
TimToady | you'd only need it in a class like Any that isn't Iterable | 18:41 | |
and only the proto's location should matter | |||
timotimo | textual location, yes? | ||
yeah, of course | |||
TimToady | I'm assuming that protos are not autogenerated in a class higher than they ought to be here | 18:42 | |
but that they're generated in the highest class that actually has a multi | |||
if that is a bad assumption, proto location won't work | 18:43 | ||
but I think protos should be generated no higher in the hierarchy than they need to be | |||
18:44
dodolob left
18:45
preflex left
|
|||
dalek | p: 48d3bde | (Solomon Foster)++ | src/vm/ (3 files): Add pow_n operation. This adds a test for raising 1.0 to a power, which allows 1.0 ** Inf to work. |
18:46 | |
p: 260c3b5 | (Solomon Foster)++ | src/vm/ (3 files): Add mod_n that fits NQP definition. |
|||
p: b625b30 | (Solomon Foster)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Make div_I conform to p6 spec for infix<div>. |
|||
18:46
colomon joined
|
|||
TimToady | r: class Foo { multi method bar() { say "!!!" } }; Any.bar | 18:46 | |
camelia | rakudo 5cab66: OUTPUT«No such method 'bar' for invocant of type 'Any' in block at /tmp/RG5jktP1Q1:1» | ||
sorear | o/ colomon | ||
TimToady | looks like the assumption is good | ||
colomon | \o sorear! | ||
18:47
preflex joined,
ChanServ sets mode: +v preflex
18:48
kaare_ joined
18:51
kaare__ left
|
|||
dalek | kudo/nom: aa75b03 | (Solomon Foster)++ | src/core/Num.pm: Remove JVM-specific hack. Now that JVM's pow_n works correctly, the hack is no longer needed. |
18:52 | |
kudo/nom: e62b1a3 | (Solomon Foster)++ | src/core/Num.pm: Remove JVM-specific hack. Now that JVM's mod_n works correctly, the hack is no longer needed. |
|||
kudo/nom: ee08521 | (Solomon Foster)++ | src/core/Real.pm: Note spec issue on infix:<mod>. |
|||
pmurias | sorear: where should the opcode be documented? | 18:53 | |
dalek | ast: 705a673 | (Solomon Foster)++ | S03-operators/arith.t: Unfudge for rakudo.jvm. |
18:54 | |
sorear | pmurias: if it needs special documentation, make a pod or markdown file in docs/. otherwise, we don't really have a place for general opcode docs, you should start one. | 18:56 | |
pmurias: note: I have no idea what opcode you're talking about. | 18:57 | ||
pmurias | sorry, should have said 'a opcode' | 18:59 | |
19:00
preflex left
|
|||
pmurias | I'm thinking of documenting them in docs/qast.markdown | 19:00 | |
what tool should I use for previewing markdown? | 19:01 | ||
tadzik | I use markdown_calibre | ||
it comes with calibre, an ebook thingy | |||
you can use Text::Markdown from panda ;) | 19:02 | ||
labster | tadzik: why does the new File::Find still use .IO? *hint hint* | ||
19:02
preflex joined,
ChanServ sets mode: +v preflex
|
|||
tadzik | labster: *hmm hmm* | 19:10 | |
labster: for, uh, clarity? :) | 19:11 | ||
labster | my pull request from YAPC:NA already removed them | 19:12 | |
19:13
ecocode joined
|
|||
dalek | rl6-roast-data: f9842f8 | coke++ | / (5 files): today (automated commit) |
19:15 | |
19:22
rindolf left
|
|||
[Coke] | slight loss on rakudo.jvm as rakudo.parrot's fudging issue is resolved; sorear++ or jnthn++ got the spec tests running again, yay. | 19:26 | |
19:28
colomon left
|
|||
timotimo | r: class Foo { }; say Foo.^find_method('elems') === Any.^find_method('elems') | 19:33 | |
camelia | rakudo ee0852: OUTPUT«True» | ||
sorear | yay | 19:35 | |
r: role Foo { }; say Foo.^find_method('elems') === Foo.^find_method('elems') | |||
camelia | rakudo ee0852: OUTPUT«True» | ||
benabik | r: role Foo {}; role Bar { sub elems { 0 } }; say Foo.^find_method('elems') === Bar.^find_method('elems') | 19:37 | |
camelia | rakudo ee0852: OUTPUT«True» | ||
benabik | Hmmmmm.... | ||
Oh. sub. | |||
r: role Foo {}; role Bar { method elems { 0 } }; say Foo.^find_method('elems') === Bar.^find_method('elems') | |||
camelia | rakudo ee0852: OUTPUT«False» | ||
benabik | \o/ | ||
labster | I finally have tuits to look at the io-spec-unix error. Hm. It looks like java returns cwd with a slash appended to the end. | 19:38 | |
GlitchMr | I was reading commits log. I found github.com/rakudo/rakudo/commit/a2...0fca7d6cfd | 19:40 | |
diakopter | pmurias: google chrome plugin renders .markdown files okay | ||
GlitchMr | But I was confused when (1.0 ** 3) properly returned 1.0 (not 1). | ||
I assume that it was already fixed. | |||
benabik | GlitchMr: It's been removed again: github.com/rakudo/rakudo/commit/aa...9cb2c66435 | ||
sorear | r: role Foo { method elems { 0 } }; say Foo.^find_method('elems') === Foo.^find_method('elems') | 19:41 | |
camelia | rakudo ee0852: OUTPUT«True» | ||
GlitchMr | Makes sense. | ||
I never understood why it needed such hack anyway. Is ** operator that slow? | |||
(I don't think 1 ** is common case anyway) | |||
sorear | GlitchMr: pow_n was returning bogus values for that case on jvm, so it had to be worked around | 19:42 | |
GlitchMr: see github.com/perl6/nqp/commit/48d3bdef27 | 19:43 | ||
grondilu | List.combinations is NYI? | ||
sorear | unperl6y values, anyway | ||
grondilu | n: .say for <a b c>.combinations(2) | ||
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Unable to resolve method combinations in type Parcel at /tmp/PkmLgNW09p line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576)  … | ||
grondilu | r: .say for <a b c>.combinations(2) | ||
camelia | rakudo ee0852: OUTPUT«No such method 'combinations' for invocant of type 'Parcel' in block at /tmp/R34S7snKyo:1» | ||
dalek | kudo-js: 6ce9794 | (Pawel Murias)++ | / (4 files): Implement nqp::findmethod. Test QAST::Node.{flat,named}. |
19:44 | |
kudo-js: 9af914f | (Pawel Murias)++ | t/qast-node.t: Test QAST::Node.unique. |
19:49 | ||
19:56
SamuraiJack left
20:00
Khisanth joined
|
|||
pmurias | diakopter: Markdown Preview? | 20:03 | |
diakopter | pmurias: maybe | 20:04 | |
I don't remember | |||
20:08
Stygia joined
|
|||
pmurias | stackedit | 20:08 | |
jnthn back-ish | 20:09 | ||
diakopter | pmurias: neat | ||
not quite github dialect, but close enough I'm sure | |||
tadzik | labster: oh, indeed. | 20:11 | |
20:11
berekuk left
|
|||
tadzik | I now see that there were 2 pull requests doing this :) | 20:11 | |
I blame github interface | |||
pmurias | jnthn: have you seen my .parents question? | 20:12 | |
jnthn | pmurias: Not yet... | 20:13 | |
jnthn just looks in the ir clog | 20:14 | ||
20:14
berekuk joined
|
|||
jnthn | r: class A { }; class B is A { }; say B.^parents | 20:14 | |
camelia | rakudo ee0852: OUTPUT«(A)» | ||
jnthn | r: class A { }; class B is A { }; say B.^parents(:all) | ||
camelia | rakudo ee0852: OUTPUT«(A) (Any) (Mu)» | ||
jnthn | pmurias: Those answers are correct | ||
pmurias | jnthn: in nqp | ||
jnthn | oh. | ||
pmurias | nqp: my $parent := NQPMu.HOW.parents(NQPMu)[0];say($parent.HOW.name($parent)) | 20:15 | |
camelia | nqp: OUTPUT«NQPMu» | ||
jnthn | Well, parents should not include the class itself, no | ||
.HOW.mro should. | |||
pmurias | I'll fix that then | ||
writing test for nqp-js appears to be succesfull at find nqp bugs ;) | 20:16 | ||
* finding | |||
sorear | nqp: say(nqp::elems(NQPMu.HOW.parents(NQPMu))) | ||
camelia | nqp: OUTPUT«1» | ||
timotimo | jnthn: can you suggest how to efficiently and correctly as well as simply implement "is the method given by $name implemented in a class that is marked 'Iterable'?" and/or "does the proto for this method come from Any?" | 20:17 | |
jnthn | Is the first one not just "it has a method of that name and it istype Iterable"? | 20:18 | |
pmurias | jnthn: to avoid rakudo breakage what should I check before merging fix-help and fix-set-invocation-spec? | 20:19 | |
20:19
konundra left
|
|||
jnthn | pmurias: Run a Rakudo spectest, making sure (if Rakudo has dependnet changes) to bump NQP_REVISION | 20:19 | |
timotimo | jnthn: no, if the method comes from a superclass that on't work | 20:20 | |
jnthn | oh. | ||
20:21
kaare_ left
|
|||
jnthn | No, there's not a good way to do that. That sounds horribly like the duck typing thing I didn't figure out how to make fast ;) | 20:21 | |
[Coke] | so, I have a copy of the eval server running, started by hand. if I run replace my perl6 with the eval client, and invoke ./perl6 -e 'say 3', I get a new line but no 3. ?? | 20:23 | |
jnthn | timotimo: How hot path is it? | ||
sorear | [Coke]: any output on the terminal where you started the eval server? (there shouldn't be, but...) | 20:25 | |
[Coke] | sorear: ope. | 20:26 | |
*n | |||
sorear | how did you "replace my perl6 with the eval client"? | ||
[Coke] | github.com/coke/perl6-roast-data/b...jvm.sh#L31 | 20:28 | |
(just did those 3 lines in a fresh checkout) | |||
and started the eval server with: ./perl6-eval-server -bind-stdin -cookie TESTCOOKIE -app perl6.jar | |||
sorear | ah | 20:31 | |
@ARGV = ("-e", "say 3") | |||
"perl eval-client.pl TESTCOOKIE run @ARGV" = "perl eval-client.pl TESTCOOKIE run -e say 3" | |||
arnsholt | Is NQP on JVM failing two sprintf tests expected? | ||
sorear | so it's like you ran ./perl6 -e say 3 normally | ||
the program is say(), @*ARGS = ("3") | 20:32 | ||
arnsholt | Git checkout from this morning plus some of my changes | ||
sorear | 06:33 < sorear> I have two failing sprintf tests. I hope that's expected | ||
FROGGS | arnsholt: yes | ||
sorear | 06:33 < FROGGS> sorear: I think so, yes | ||
arnsholt | Right, so my NativeCall hacking didn't magically break sprintf. Good =) | 20:33 | |
FROGGS | arnsholt: relieved? :o) | ||
arnsholt | Moderately, let's say =D | ||
FROGGS | hehe | 20:34 | |
[Coke] | sorear: so, ./perl6 -e say 3 actually works. | 20:36 | |
[Coke] just reverts ./perl6 to something he can test with. | 20:37 | ||
sorear | [Coke]: your problem is a lack of quoting in the perl file. | 20:39 | |
interpolating @ARGV into an exec(STRING) command means you lose the distinction between strings | 20:40 | ||
20:40
konundra joined
20:41
ecocode` joined
20:42
ecocode` left,
ecocode left,
ecocode` joined
|
|||
[Coke] | Yes. didn't feel like fighting with it. | 20:47 | |
arnsholt | Heh. I like how the commit dates on my branch aren't monotonically increasing anymore, after a bit of rebasing | 20:50 | |
[Coke] | sorear: thanks for diagnosing, though. will save me time later when I feel like fixing it. | 20:52 | |
argh. lost my fix to t/fudgeandrun... | |||
FROGGS | :/ we really need a gitfs | 20:54 | |
20:55
ajr_ left
|
|||
dalek | kudo/nom: bce1048 | coke++ | t/fudgeandrun: allow script to work on parrot & jvm |
21:03 | |
ast: 15c110c | coke++ | S06-multi/type-based.t: fudge for rakudo.jvm |
21:10 | ||
pmurias | jnthn: any ideas/hints what could cause "No code ref at index 2" when compiling pastie.org/8138308 with pastie.org/8138304 | ||
jnthn | we still have spew in nqp? :) | 21:13 | |
pmurias | github.com/perl6/nqp/blob/master/s...IO.nqp#L38 | 21:15 | |
jnthn | hah | ||
Not much idea aside from something to do with the clone callback stuff perhaps... | |||
Givne it's a role | 21:16 | ||
pmurias | I'll saturate nqp with say statements and look some more ;) | ||
21:18
cooper left
21:20
zby_home_ left
|
|||
jnthn | pmurias: It's almost certainly something to do with closure handling | 21:21 | |
pmurias | it's some wird interaction between backends, as not emitting javascript got rid of this | 21:25 | |
what is the compiling SC stack? | 21:26 | ||
21:27
snoopy left
|
|||
jnthn | When we start compiling someting we push the SC onto the stack | 21:28 | |
it gets popped in QAST::Compiler, or QAST::CompilerJAST, etc. | |||
pmurias | that was the source of the error | 21:30 | |
so if I compile something on two backends when should this get popped? | |||
timotimo | jnthn: it'd be either in hyper(\op, \obj) or in dispatch:<hyper>, probably only in the latter | ||
so it's a kind of warm path | |||
21:31
berekuk left
|
|||
timotimo | the nodal-or-not decision could possibly be compile-time evaluated. | 21:33 | |
huh. no probably not | 21:35 | ||
pmurias | jnthn: the SC stack is used just for determining the current SC, for repossesion purposes? | ||
jnthn | pmurias: yes; it should be popped at the point of SC serialization, I think, but I don't know the exactly timing once you reach the QAST -> backend stage matters terribly | 21:36 | |
pmurias | jnthn: and it's used for what I think? | 21:37 | |
jnthn | repo, yes | 21:38 | |
we scwbObject or so in Ops.java on the JVM backend, for example | 21:39 | ||
timotimo: OK, will have to ponder it when I'm not drinking a tripel... :) | |||
timotimo | aah, don't worry about it; i'm having some rum right now ;) | 21:40 | |
alternatively, it may make more sense to just make something that'll automatically set "is nodal" on everything that's defined in a class | 21:41 | ||
less searching that way; and it'll mostly be at compile-time | |||
(and it would require no more changes in the hyper code i have) | |||
i should probably push to a branch and put it up for a little bit of review | 21:42 | ||
grondilu | rn: my @a = <foo bar>; say join ":", $@a | 21:46 | |
camelia | rakudo bce104, niecza v24-86-g39ab531: OUTPUT«foo bar» | ||
grondilu | maybe the fact that we don't actually need parenthesis should be mentioned in S07:100-111 | 21:47 | |
synopsebot | Link: perlcabal.org/syn/S07.html#line_100 | ||
grondilu hates parenthesis and he's happy whenever he can not use them | 21:48 | ||
FROGGS | nqp@parrot HEAD is broken? | 21:51 | |
error:imcc:syntax error, unexpected NREG, expecting '(' ('$N5001') | |||
lelf | r: say 'ababa' ~~ m:ex/aba/ | 21:53 | |
camelia | rakudo bce104: OUTPUT«False» | ||
timotimo | is there a shorter thing than "git checkout -b things_i_have_done && git push -f . origin/nom:nom" for when i commited my changes on nom but want them on a new branch? | 21:55 | |
benabik | (on nom) git branch new ; git reset @{u} ; git check new ? | 21:57 | |
Maybe not shorter. :-/ | |||
git config alias.oops '!sh -c "git branch $1 && git reset @{u} && git checkout $1"' ? | 21:58 | ||
timotimo | what is @{u}? | 22:00 | |
benabik | Upstream | ||
timotimo | ah, cool | 22:01 | |
github.com/timo/rakudo/compare/nodal - this is what i've done so far and it apparently works | 22:02 | ||
i ought to make some more test cases, though. | |||
22:03
berekuk joined
|
|||
grondilu reads 'Perl 6 changes - 2013W28' and have no clue what 'Promise' is :/ | 22:06 | ||
grondilu found nothing relelvant in the spec | |||
jnthn | grondilu: I'll write some stuff about that when I get chance | 22:11 | |
22:15
spider-mario left
|
|||
TimToady | "As Nil is (), it shouldn’t affect code returning Nil." This is incorrect. Nil is not supposed to return (). | 22:20 | |
FROGGS | this is the commit which breaks nqp@parrot: 260c3b5f00c50ca0595ac3a1392b13faf9c386bc | 22:21 | |
timotimo | so the _n is wrong? | 22:26 | |
FROGGS | looks like | 22:27 | |
22:27
berekuk left
|
|||
benabik | grondilu: en.wikipedia.org/wiki/Promise_(programming) ? | 22:27 | |
22:30
berekuk joined
|
|||
grondilu | benabik: yep I eventually figured it out. I didn't know about this. | 22:35 | |
not related at all: is there any plan to have fmt support large integers? I mean, for instance to print a big integer in binary: say (2^80).fmt("%b") | 22:37 | ||
r: say .fmt("%040b") given 2**39 | |||
camelia | rakudo bce104: OUTPUT«0000000000000000000000000000000000000000» | ||
grondilu | r: say .fmt("%032b") given 2**31 | 22:38 | |
camelia | rakudo bce104: OUTPUT«10000000000000000000000000000000» | ||
grondilu | see? | ||
FROGGS | r: say sprintf("%#b", 2**31) | ||
camelia | rakudo bce104: OUTPUT«0b10000000000000000000000000000000» | ||
FROGGS | nqp-jvm: say(sprintf("%#b", 2**31)) | ||
camelia | nqp-jvm: OUTPUT«Lexical '&sprintf' not found in <anon> in <anon> in eval in evalfiles in command_eval in command_line in MAIN in <anon> in <anon>» | ||
FROGGS | nqp-jvm: say(nqp::sprintf("%#b", 2**31)) | 22:39 | |
camelia | nqp-jvm: OUTPUT«No registered operation handler for 'sprintf' in compile_op in as_jast in as_jast in <anon> in process_args in <anon> in <anon> in compile_op in as_jast in as_jast in <anon> in compile_all_the_stmts in as_jast in as_jast in <anon> in compi… | ||
grondilu | r: printf("%#b", 2**32) | ||
camelia | rakudo bce104: OUTPUT«0b0» | ||
FROGGS | huh | ||
grondilu: I thought nqp@jvm does already do that, but it seems not | 22:40 | ||
once this new sprintf is capable of all needed features, it will land on nqp@parrot too | |||
grondilu | notice that in order to test it, you should use 2**32, not 2**31 (on a 32-bit machine) | 22:41 | |
22:44
abnorman joined
|
|||
FROGGS | the machine doesnt when using bigints | 22:44 | |
22:45
raiph left
|
|||
TimToady | r: say (2**39).base(2) | 22:45 | |
camelia | rakudo bce104: OUTPUT«1000000000000000000000000000000000000000» | ||
lue | I have a 64-bit machine, and 2**32 wfm (but not, predictably, 2**64) | ||
TimToady | r: say (2**65).base(2) | ||
camelia | rakudo bce104: OUTPUT«100000000000000000000000000000000000000000000000000000000000000000» | ||
TimToady | how hard can it be? | ||
22:46
abnorman left
22:47
abnorman joined
|
|||
grondilu | ok | 22:49 | |
r: my $x = 2**100; say $x +& $x | 22:50 | ||
camelia | rakudo bce104: OUTPUT«1267650600228229401496703205376» | ||
grondilu | r: my $x = 2**100; say ($x +& $x).base(2) | ||
camelia | rakudo bce104: OUTPUT«10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000» | ||
grondilu | r: my $x = 2**65; say ($x +& ($x + 1)).base(2) | ||
camelia | rakudo bce104: OUTPUT«100000000000000000000000000000000000000000000000000000000000000000» | ||
22:50
Stygia left
|
|||
grondilu | r: my $x = 2**65; say ($x +| ($x + 1)).base(2) | 22:50 | |
camelia | rakudo bce104: OUTPUT«100000000000000000000000000000000000000000000000000000000000000001» | ||
grondilu | oh, so bitwise logic does work with big integers. Good. | 22:51 | |
r: say +^ 2**65 # just an other check | 22:52 | ||
camelia | rakudo bce104: OUTPUT«-36893488147419103233» | ||
grondilu | r: say (+^ 2**65).base(2) # just an other check | ||
camelia | rakudo bce104: OUTPUT«-100000000000000000000000000000000000000000000000000000000000000001» | ||
grondilu | hum | ||
r: say (+^ 2**10).base(2) # just an other check | |||
camelia | rakudo bce104: OUTPUT«-10000000001» | ||
grondilu is confused by negative integers in bitwise logic | 22:53 | ||
benabik | Bit inverting a signed x is same as -x-1 due to 2s compliment. | 22:54 | |
TimToady | +^ is 1's complement but the representation always pretends to be 2's complement | 22:55 | |
r: say (+^ 0) | |||
camelia | rakudo bce104: OUTPUT«-1» | ||
TimToady | there's the degenerate case, flipping all the bits | ||
well, it always flips all the bits | |||
setting all the bits, in this case | 22:56 | ||
pmurias | jnthn: it wasn't the stack poping | ||
TimToady | the fact that there are in infinite number of them is okay, since we can represent an infinite number of 1 bits with a - | ||
grondilu | ok. I guess I won't use ^+ as it won't suit my need, then | ||
pmurias | jnthn: serialize_sc seems to have some global state, will try to chase it down tommorow | ||
grondilu meant +^ | 22:57 | ||
TimToady | grondilu: it should work exactly the same when stored into a 2's complement native (in the absence of overflow, of course) | ||
r: say (2**65).msb | 22:59 | ||
camelia | rakudo bce104: OUTPUT«65» | ||
TimToady | but if you're just looking for the magnitude of a binary number, .msb is what you want | ||
grondilu | no I want to do bitwise logic on large number (I'm working on rosalind.info/problems/cset/) | 23:00 | |
because there are large boolean arrays stored as 000001011100000111... | |||
(as strings of 0 and 1, that is) | 23:01 | ||
TimToady | if you want to limit it to a certain number of bits, and not go negative, then you'll want to xor with a large positive 2n-1 number | ||
grondilu | or just do 2**MAX - x | ||
I think that's what I'll do | |||
TimToady | but if you don't care about the number of bits actually used, or the sign of the result, unary +^ should work fine | ||
it does, in fact do a 1's complement | 23:02 | ||
grondilu | but getting back the boolean array would be tricky, wouldn't it? | ||
I mean, +^ would confuse me too much. But I guess I need to take some time to think clearly about these stuff | 23:03 | ||
TimToady | you might have to & with a sized 2n-1 at that point to make it positive, but all the intermediate stuff doesn't have to | ||
jnthn | pmurias: are you generating code for two backends in one process? | 23:04 | |
jnthn never did it that way :) | |||
pmurias | jnthn: yes | ||
jnthn | k :) | ||
dalek | kudo/nom: 6c80bf5 | (Solomon Foster)++ | src/core/Rational.pm: Fix broken div uses. Rational.pm was written to work with NQP Parrot's broken infix:<div>. Since NQP JVM now has a properly working infix:<div>, a bunch of these functions started failing. This corrects floor, ceiling, and Int. |
||
pmurias | jnthn: a prop is being attached to code refs to mark them as cloned | 23:05 | |
jnthn | pmurias: yes | ||
pmurias: oh, hm | |||
pmurias: I think that ops abstract that though | 23:06 | ||
23:06
colomon joined
|
|||
colomon | turns out that getting infix:<div> working properly on jakudo (it never has on parrakudo) broke some of the basic Rat methods. So now I've fixed those, too. | 23:07 | |
pmurias | abstract that? the problem is that they get cloned and put into the closure table of one backend, and on the other one are already marked | ||
jnthn | pmurias: ah | ||
pmurias | but it should be fairly easy to workaround that if that is the case | ||
jnthn | pmurias: thats entirely possible. I never really designed it with your use case in mind. | ||
BS in general is a kind of marking thing. | 23:08 | ||
pmurias | BS? | 23:09 | |
FROGGS | colomon: github.com/perl6/nqp/commit/260c3b...nt-3628793 | ||
jnthn: ------^ any idea about that? | |||
jnthn | pmurias: bound serialization | ||
FROGGS | anybody else has problems building nqp@parrot HEAD? | 23:10 | |
colomon | I must have modified the wrong file somehow. :( | ||
jnthn | FROGGS: that looks like sokmebody confusssed a nqp:: and pir:: | ||
oh wow my typing rocks | |||
FROGGS | I can read it :o) | 23:11 | |
colomon didn't even notice | |||
jnthn | pmurias: um, bounded, not bound | 23:12 | |
FROGGS | gnight, see ya in a few hours | ||
jnthn | 'night, FROGGS | ||
23:12
FROGGS left
|
|||
colomon | FROGGS++ | 23:12 | |
23:17
dmol left
|
|||
dalek | ecs: 8f30d2d | larry++ | S03-operators.pod: nodal ok on normal methods too, not just protos |
23:17 | |
p: a60837b | (Solomon Foster)++ | src/vm/parrot/QAST/Operations.nqp: Undo changes that didn't belong in NQP Parrot. |
23:18 | ||
colomon | With luck that undoes the damage I did to Parrot. | ||
o/ # back to cabin | |||
23:18
colomon left
|
|||
pmurias | jnthn: I could either move to the stable sc way of doing things or we could cache the serialization somehow | 23:20 | |
TimToady | r: say [].can('elems').perl | 23:22 | |
camelia | rakudo 6c80bf: OUTPUT«(method elems(List : Mu *%_) { ... }, method elems(Iterable : Mu *%_) { ... }, method elems(: Mu *%_) { ... })» | ||
TimToady | r: say [].can('elems')[*-1].perl | ||
camelia | rakudo 6c80bf: OUTPUT«method elems(: Mu *%_) { ... }» | ||
TimToady | r: say [].can('elems')[*-1].WHO | ||
camelia | rakudo 6c80bf: OUTPUT«().hash» | ||
TimToady | r: say [].can('elems')[*-1].WHAT | ||
camelia | rakudo 6c80bf: OUTPUT«(Method)» | ||
TimToady | r: say [].can('elems')[*-1].WHICH | 23:23 | |
camelia | rakudo 6c80bf: OUTPUT«Method|-172260614» | ||
TimToady | any way to tell which class that method is declared in? | ||
jnthn | TimToady: well, can always introspect the signature's first arg's type | ||
TimToady | uh, I though we didn't require the self to do typing | 23:24 | |
in fact, Any doesn't show up above, though List and Iterable do | 23:25 | ||
just trying to figure out how to best to look up nodal in those cases we can intuit it | 23:26 | ||
jnthn | The type of the self is what makes multi-dispatch disambiguate in a subclass | ||
Yeah...I need to read le spec more carefully and ponder it :) | |||
TimToady | well, except most of the methods in Any aren't multis | ||
jnthn | Sure, but the type is still set on the invocant | 23:27 | |
It's user-selectable though so it can lie | |||
Though iirc S12 is like, "don't do that" :) | 23:28 | ||
TimToady | nodnod | 23:29 | |
jnthn | I mean, any kind of custom dispatch is possible given we keep a hash of methods at each level (walk MRO and se .^method_table) but I guess we want something more efficient. | 23:30 | |
*see | |||
If we have a typed array, are we meant to consider nodality of the individual things and respect subtyping, ooc? | 23:31 | ||
.oO( is that even a sensible question... :) ) |
|||
TimToady | well, put 'is nodal' on every &foo that might be used in a hyper is probably best, given it requires no additional run-time lookup in the hyper | ||
jnthn | Oh, of course, it's on hte operator... | ||
TimToady | so probably the compiler needs to just have some way of setting that on all the appropriate &foo's | ||
jnthn | k | ||
TimToady | probably just a $?NODAL (or compile-time $*NODAL) that declarators can examine is an okay hack, and we just force it on when a class has 'is Iterable' in the declaration, or we see a 'use nodal;' | 23:33 | |
or somethin' | |||
it doesn't seem like it needs to be an extensible mechanism, so a compiler hack is probably okay in this case | |||
23:34
census_ joined
|
|||
TimToady | unless we can think of something elegant that doesn't violate S12 :) | 23:34 | |
in any event, there should be no run-time component to determining whether a function is nodal, other than looking up its trait directly | 23:35 | ||
"has 'is Iterable' in the declaration" is misstated. shoulda said "derived from Iterable" | 23:45 | ||
maybe a compose-time thing, to handle methods coming from roles correctly | 23:46 | ||
pmurias | jnthn: do you think it would break anything if I made serialization caching on parrot? | 23:47 | |
23:47
ecocode` left
|
|||
jnthn | pmurias: What do you mean by serialization caching? | 23:48 | |
pmurias | if serialize_sc is called a second time on the same sc, it should return the same thing | ||
jnthn | ah | 23:49 | |
probably ok, I mean, the serialization string should come out the same both times | |||
Prolly don't want it to be a "default" though | 23:50 | ||
pmurias | the serialization string might change if the object in QAST::WVal change | ||
jnthn | yeah, that doens' tnormally happen though | 23:52 | |
TimToady | .oO(constant folding, immutability, value identity...) |
||
jnthn | TimToady: I menat once it reaches the backend | 23:57 |