»ö« 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. |
|||
hoelzro | I thought I had the algorithm wrong for a good 30 minutes before I figured it out =/ | 00:00 | |
jnthn | hoelzro: It doesn't have to be an assignment to @!values. Declare a my @x; there and assign to it and you get the same. | ||
hoelzro: I'm wondering if we've a $*LEFTSIGIL leak or something. | |||
hoelzro | I suspected $*LEFTSIGIL | 00:01 | |
but didn't know what I was doing =P | |||
00:01
mtk joined
|
|||
hoelzro tries some moar prints | 00:01 | ||
colomon | pdcawley: wonder if anyone else is building it with 10.9. | 00:03 | |
colomon is very slow to upgrade … only upgraded from 10.6 to 10.8 back in July. | |||
00:05
xenoterracide left
|
|||
pdcawley | colomon: any docs anywhere on smoking the perl6 build? | 00:05 | |
colomon | pdcawley: on different build platforms? I don't think we've got anything like that set up yet. | ||
pdcawley | Hmm... I'm _so_ unlikely to step up to that particular plate :) | 00:06 | |
00:06
xenoterracide joined
|
|||
moritz | though 'make spectest' would form a good base for that | 00:06 | |
jnthn | Time for some rest...'night o/ | 00:07 | |
pdcawley | g'night mate. | ||
00:07
cognominal joined
|
|||
colomon | pdcawley: I've got a p6 module smoker, but so far it only tests on Parrot Rakudo on my Linux box. | 00:07 | |
japhb | o/ jnthn | ||
Is anyone around that can check out why feather.perl6.nl:3000/projects.json is timing out? | 00:09 | ||
00:10
thou joined
00:12
dayangkun left
00:14
cognominal left
00:15
zakharyas left
|
|||
[Coke] | (smoking the perl6 build) yes, we do that daily. You could run my stuff ad hoc if you wanted. | 00:15 | |
[Coke] hurls github.com/coke/perl6-roast-data | 00:16 | ||
(that tests rakudo-j, rakudo-p, niecza, and pugs every day) | |||
er. we have no smoke server yet though. )we have the parrot one, but no one uses it.) | |||
that's another of my backburner projects. | |||
liz - I think we had mixbag for a day. | 00:20 | ||
TimToady was in a renaming frenzy. | |||
TimToady foams a little at the mouth. | 00:23 | ||
hoelzro goes to bed too | 00:24 | ||
colomon | TimToady: can you quickly explain how STD handles parsing regexes? I'm trying to sort out what Niecza is doing... | ||
itz_ | how long does the moar "please wait stage" take? I'm sure its just going to core dump :) | 00:25 | |
TimToady | colomon: easy peasy, just look at the P5 that code turns into :) | 00:27 | |
00:29
kivutar left
|
|||
TimToady | colomon: the important thing with respect to :s is that quantified_atom determined all the sigspace, in cahoots with sigmaybe | 00:30 | |
and all the constructs that enable sigspace set $*SIGOK so sigmaybe knows whether to treat the space as significant | 00:31 | ||
*determines | |||
colomon | and those are all new / modified with the new sigspace rules, right? | 00:32 | |
TimToady | plus anything else I said back when Mouq++ was fixing rakudo | ||
so you could check out Mouq's changes and see what he did | 00:33 | ||
or wait till he gets back online and ask him :) | 00:34 | ||
the complicated bit is that the sigspace attaches at a different place in the AST, if I recall | 00:40 | ||
00:42
ajr_ left
00:45
preflex left,
preflex_ joined,
ChanServ sets mode: +v preflex_
00:46
preflex_ is now known as preflex
|
|||
BenGoldberg | So I was reading the irc log, and came across S32/Containers ... | 00:50 | |
Specifically perlcabal.org/syn/S32/Containers.html#grab | |||
And I'm curious as to why only QuantHash has a .grab method, and not any other container | 00:51 | ||
TimToady | QuantHash is a role | 00:54 | |
r: say SetHash ~~ QuantHash | |||
camelia | rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«True» | ||
TimToady | r: say Set ~~ QuantHash | 00:55 | |
camelia | rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«True» | ||
TimToady | hmm, that seems wrong | ||
sets are immutable, so .grab makes no sense | |||
r: my $s = set(<a b c>); say $s.grab | 00:56 | ||
camelia | rakudo-parrot de5c8f: OUTPUT«Cannot call 'grab' on an immutable 'Set' in method grab at gen/parrot/CORE.setting:15300 in block at /tmp/j7jTJDNa3r:1 in any at /tmp/j7jTJDNa3r:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.…» | ||
..rakudo-jvm de5c8f: OUTPUT«Cannot call 'grab' on an immutable 'Set' in block at /tmp/309gmtPfNA:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196 in any command…» | |||
TimToady | anyway, Set shouldn't do QuantHash in my book | 00:57 | |
(or Bag, or Mix) | |||
so rakudobug on reporting Set ~~ QuantHash as true | 00:58 | ||
00:58
pmurias left
|
|||
TimToady | on the compiling jvm, I've often run into the OOM that piers hit, but recompiling with the same command immediately generally works! | 00:59 | |
dunno why that happens, unless jvm is keeping some state around from run to run | 01:00 | ||
(this is openjdk) | |||
01:01
xenoterracide left
|
|||
TimToady | maybe it's jvm keeping process around after they've 'exited' somehow | 01:01 | |
pdcawley | TimToady: Weird. | 01:04 | |
Sooner I can get off JVM and onto Moar, the better, methinks. | |||
01:06
emma_ is now known as emma
01:09
jnap left
01:15
xenoterracide joined
01:19
pdcawley left
01:26
Entonian joined
01:28
skyheights joined
01:29
skyheights left,
jlaire left
|
|||
BenGoldberg | Why isn't there an Array.grab method? | 01:30 | |
01:32
xenoterracide left
01:36
TimK1 left,
xenoterracide joined
01:39
jnap joined
|
|||
lue | BenGoldberg: because Array.pick and Array.roll should do the job already :) . | 01:40 | |
01:42
xenoterracide left
01:43
thou left
01:44
jnap left
01:47
Entonian left,
xenoterracide joined
01:59
jeffreykegler left
|
|||
timotimo | lue: except grab is supposed to remove the item at the same time as returning it, no? | 01:59 | |
02:07
lizmat left
02:09
aindilis` left,
aindilis joined
|
|||
lue | timotimo: .pick acts as though you're removing items already. Arrays are immutable, AFAIK, so .grab really doesn't provide anything Array.pick doesn't already do. | 02:13 | |
TimToady | removing items from an Array is not generally what you want to do, either | ||
you should probably be using a SetHash in that case | 02:14 | ||
lue | Array.grab would only serve as a useful synonym for too-liberally type-constrained variables. :) | ||
TimToady | well, if you did implement Array.grab, you'd probably want it to do a splice, not a delete | 02:17 | |
lue | I meant that as in method grab(<params>) { self.pick(<params>) } | 02:18 | |
colomon | lue: Arrays are mutable. | 02:20 | |
lue | oh? | ||
r: say ++(Array.new(1,2,3)[1]); | |||
TimToady | mapping .grab to .pick is always wrong | ||
camelia | rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«3» | ||
lue | r: say (++Array.new(1,2,3)[1]).perl; | ||
camelia | rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«3» | ||
TimToady | pick is "without replacement", but the array itself is not modified | 02:21 | |
grab always modifies whatever you're grabbing from | |||
it's not polite that way :) | |||
lue would then contest that changing the size of an Array via randomly removing certain numbers is perhaps not the best idea. I'm with TimToady on that being a more SetHashy thing. | 02:22 | ||
s/numbers/elements/ | 02:23 | ||
colomon just timed his ISO 10303-21 test suite, and it's 4x faster under jakudo. | 02:27 | ||
shaves 75% off the timing, I mean. | 02:28 | ||
also, having perl-j available for easy testing is really nice. | 02:36 | ||
02:37
kaare_ joined
02:48
filly left
02:50
jnap joined
02:57
filly joined,
jnap left
03:05
hummeleBop1 left
03:08
jeff_s1 left
03:19
segomos left,
segomos joined
|
|||
diakopter | forwarded something to p6-l | 03:23 | |
colomon | p6-l? | 03:25 | |
r: say (32 < * < 128)(1000) | 03:26 | ||
camelia | rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«True» | ||
colomon | rakudobug | ||
timotimo | known :( | 03:27 | |
colomon | no need to call you-know-who, then. timotimo++ | 03:28 | |
colomon mourns his beautiful code which …. no, I can do this. | 03:29 | ||
actually looks better this way. | |||
03:42
atroxaper joined
03:46
xinming_ joined
03:49
xinming left
|
|||
diakopter | p | 03:51 | |
colomon: perl6-language? | |||
you know, on that thing we used before github, email | 03:52 | ||
colomon | diakopter: that was more along the lines of "why would a sensible person send something to perl6-language?" | ||
diakopter | heh oh | 03:54 | |
colomon | I've come to associate it strongly with endless pointless chatter. :) | ||
diakopter | take a look at what I sebt | 03:56 | |
sent | |||
colomon | diakopter++ # hopefully that's safe | 03:57 | |
diakopter | what's safe? | 03:58 | |
colomon | your message | ||
people won't start arguing about the color of the benchmarks, or something like that. | |||
bikeshedding, that's the term. | 04:01 | ||
04:20
atroxaper left,
atroxaper joined
04:21
preflex_ joined,
ChanServ sets mode: +v preflex_
04:22
preflex left,
preflex_ is now known as preflex
04:26
atroxaper left
04:27
atroxaper joined
04:32
BenGoldberg left
04:49
Entonian joined
05:01
adu joined
05:05
atroxaper left
05:09
raiph left
05:16
atroxaper joined
05:18
thou joined
05:20
araujo left,
itz joined
05:21
Entonian left
|
|||
diakopter | well, you could build it entirely out of paint. | 05:37 | |
or paint thinner it into nothing. | |||
05:40
Entonian joined
05:46
Entonian left
05:52
atroxaper left
06:08
rurban1 joined
06:12
rurban2 joined
06:13
rurban1 left
06:15
SamuraiJack_ joined
06:19
rindolf joined
06:22
rurban2 left
06:27
SamuraiJack_ left
06:30
SamuraiJack joined
06:38
SamuraiJack left,
rurban1 joined
06:39
SamuraiJack joined
06:50
zakharyas joined
06:52
rurban1 left
07:06
darutoko joined
|
|||
[Coke] | diakopter: wow, if that was on a weekend, I'd make the drive. | 07:08 | |
07:11
zakharyas left
07:19
quester joined
07:23
rindolf left
|
|||
dalek | rl6-roast-data: 2d5a20e | coke++ | / (5 files): today (automated commit) |
07:38 | |
FROGGS | japhb: I am working on that: irclog.perlgeek.de/perl6/2013-12-06#i_7967667 | 07:45 | |
07:52
SamuraiJack_ joined
07:53
lizmat joined
07:56
SamuraiJack left
07:57
adu left,
adu_ joined,
adu_ is now known as adu
|
|||
moritz | m\orning | 07:59 | |
07:59
sqirrel joined
|
|||
FROGGS | morning mo/ritz | 07:59 | |
preflex: tell pdcawley that your problem seems to be that java's classpath environment variable is set, can you unset it and try again? | 08:02 | ||
preflex | Consider it noted. | 08:03 | |
08:03
adu left
|
|||
FROGGS | lee_: same for you | 08:03 | |
jnthn: rakudo-p's stage parse dropped from ~124s to ~117s # jnthn++ | 08:10 | ||
moritz thought the optimizations where jvm only? | 08:12 | ||
oh, there's the "Optimize QAST node creation" commit in nqp | 08:13 | ||
FROGGS | yeah, must be that then... | ||
I mean, I didn't make a proper benchmark | 08:14 | ||
moritz | and a commit not use slurpies in the accessors of the QAST nodes | ||
FROGGS | both are likely to save seconds | 08:15 | |
08:16
quester left,
xenoterracide left,
quester joined
08:17
quester is now known as Guest62135
08:18
sqirrel left
|
|||
Guest62135 | help set | 08:24 | |
08:25
Guest62135 left
08:26
xenoterracide joined
|
|||
FROGGS | I have an idea about installing several modules that provide a binary that has the same name as the other modules | 08:30 | |
when installing it a wrapper is created with that file name, that would execute the binary of the "best" module [more] | |||
like a "use Foo" would need/import the best module | |||
and then the wrapper would provide options like --auth, --name and --ver, that does the lookup if you want to execute an older binary or a dev version | 08:31 | ||
08:36
quester_ joined,
quester_ left,
quester_ joined,
genehack_ is now known as genehack
|
|||
FROGGS | moritz: what is your opinion on that? | 08:36 | |
08:37
quester_ left
|
|||
FROGGS | it would even work with development modules, since their bin folder should be in path first (and the user is responsible for that) | 08:37 | |
08:39
lizmat left
|
|||
FROGGS | and btw, I am thinking about creating a wrapper that defaults to `perl6`, and a wrapper-p for perl6-p, and a wrapper-j for perl6-j | 08:41 | |
so, panda-j would work then in theory | |||
08:51
quester__ joined,
quester__ left,
quester__ joined
09:06
quester__ is now known as quester
09:08
FROGGS left,
quester left
09:14
lizmat joined
|
|||
lizmat | FROGGS: isn't that the responsability of CompUnitRepo.candidates ? | 09:22 | |
09:23
PacoAir joined
|
|||
lizmat | and morning #perl6! | 09:23 | |
09:28
FROGGS joined
|
|||
FROGGS | lizmat: the wrapper would ask the CompUnitRepos for candidates, as for "use Foo", yes | 09:29 | |
lizmat | so I'm not sure you would need a wrapper ? | 09:31 | |
FROGGS | lizmat: I am talking about installed scripts | ||
how will that work without a wrapper? | |||
say you have installed version 1 of panda and version 2 of panda in home | 09:32 | ||
both provide a panda executable | 09:33 | ||
lizmat | that would be 2 CompUnitRepo objects, no? | ||
FROGGS | no | ||
home is a CompUnitRepo | |||
lizmat | one for the installed version, and one for home? | ||
FROGGS | err, I meant that both are installed in home | 09:34 | |
so, when you execute `panda`, you should clearly execute the binary from version 2 | |||
but what if you want to execute `panda` from version one? | 09:35 | ||
you are unable to do so | |||
(without a wrapper) | |||
lizmat | I'm unsure whether it should be possible at all to have this situation | 09:36 | |
FROGGS | why? | 09:37 | |
lizmat | assuming a CompUnitRepo maintains a database of sorts in the directory for which it is responsible | ||
FROGGS | yes | ||
lizmat | how would both panda 1 and panda 2 be installed in there without either two databases clashing | 09:38 | |
or the one database knowing about both of them | |||
FROGGS | you have a single bin folder per CompUnitRepo | ||
lizmat | perhaps | ||
that's the responsibiliuty of the CompUnitRepo | 09:39 | ||
FROGGS | so, if you install several versions of panda to the same CompUnitRepo, then you would be in that situation, no? | ||
lizmat | whether or not that uses a bin dir, is entirely up to the implementation of that CompUnitRepo | ||
FROGGS | you need a bin dir to execute scripts | ||
there is no other way | |||
lizmat | hmmm | 09:40 | |
so we're extending "use" and "need" now to qx() ? | |||
FROGGS | you need somewhere a folder that contains a thing called "panda" to run panda | ||
no | |||
it is about executing script from your shell | |||
09:40
SevenWolf left
|
|||
FROGGS | you don't run panda from a use statement | 09:41 | |
it is a command line tool | |||
lizmat | ok, I misunderstood your original statement | ||
09:41
woolfy joined
|
|||
FROGGS | good | 09:41 | |
:o) | |||
lizmat | .oO( must wake up first, get more tea ) |
||
FROGGS | so the problem is: | ||
you type "panda" or "perl6-debug" into your shell, and press enter | 09:42 | ||
it looks up a binary in you PATH | |||
and then, this script is from a specific version of its distro | |||
it will usually do a "use" of a module of its distro | 09:43 | ||
which might even be the wrong one for that script version | |||
lizmat | hmmm... I guess this touches on the more general issues of non-source files associated with a distribution | ||
FROGGS | true, but binaries are a thing on its own | 09:44 | |
locating files you might load from within your module is another problem | |||
FROGGS .oO( File::ShareDir ) | |||
btw, when doing "panda --ver=1", I'd propose that all use-statements within that panda script that use modules from its dist will get the :ver(1) passed implicitly | 09:49 | ||
lizmat | TimToady: re irclog.perlgeek.de/perl6/2013-12-07#i_7969313 : there is no QuantHash role implemented just yet | 09:50 | |
because of the attribute visibility issue with roles, I didn't start with refactoring all of the Set/Bag/Mix stuff to the role structure as specced just yet | 09:51 | ||
09:54
Piers_ joined
09:55
cognominal joined
09:57
Rotwang joined,
kivutar joined
|
|||
lizmat saved a conversation with jnthn of about 6 weeks ago | 10:12 | ||
gist.github.com/lizmat/7839326/raw...tfile1.txt | |||
and is going to look at it while at the patch -p1 | 10:13 | ||
10:15
rindolf joined
|
|||
FROGGS | nice | 10:17 | |
rindolf | Hi all. | 10:18 | |
FROGGS: hi. | |||
FROGGS | hi rindolf | ||
rindolf | FROGGS: there's a pull request for the SDL_manual. | ||
FROGGS | rindolf: PR applied, thanks for reporting :o) | 10:20 | |
rindolf | FROGGS: OK. | ||
FROGGS: you're welcome. | |||
FROGGS: and thanks for applying it. | |||
FROGGS | sure | ||
:o) | |||
10:23
Piers_ left
10:24
araujo joined
10:26
Timbus left
10:28
sivoais left
10:29
Rotwang left,
sivoais joined,
Timbus joined
|
|||
jnthn | morning o/ | 10:34 | |
10:34
Piers_ joined
|
|||
diakopter | mawrnig | 10:34 | |
lizmat | jnthn, diakopter: good *! | 10:36 | |
jnthn: re "At the moment, when we see a $!foo, we immediately ask the class, "do you know of a $!foo"?" | |||
I'm having trouble locating where that is done | |||
do you have a pointer :-) | 10:37 | ||
jnthn | Well, it'll be some code-path from variable... | ||
lizmat | check_variable perhaps ? | 10:38 | |
10:40
szabgab joined
|
|||
jnthn | No | 10:40 | |
szabgab | hi everyone, | ||
FROGGS | don't you see the location when you run that code with --ll-exception? | ||
szabgab: hi | |||
szabgab | I wonder if someone could give me a hand with a Grammar | ||
FROGGS | sure | 10:41 | |
jnthn | lizmat: In make_variable_from_parts | ||
szabgab | github.com/szabgab/perl6-xml-sax | ||
I have that stupid XML parser | |||
jnthn | lizmat: In the elsif $twigil eq '!' { ... } branch | ||
szabgab | it passed its test in february - the last time I checked | ||
but now, with * 2013.11 it fails | |||
lizmat | jnthn: thanks! | 10:42 | |
szabgab | of course if there is a good XML parser in Perl 6 , then I can start using that instead of mine ... | ||
hi lizmat , long time not seen! | |||
lizmat | hi szabgab, see you at FOSDEM? :-) | ||
szabgab | unlikely :( | 10:43 | |
lizmat | well, you are responsible for woolfy and me having gone there for the past 4 years! | ||
so you should come every now and then as well :-) | 10:44 | ||
jnthn | lizmat: Specifically, it's the call to get_attribute_meta_object that actually throws | 10:46 | |
lizmat | I just found that, using FROGGS++ suggestion: called from Sub 'get_attribute_meta_object' pc 14738 (src/gen/perl6-actions.pir:5834) (src/Perl6/Actions.nqp:1776) | ||
szabgab | lizmat: I know, and I am really sorry | 10:47 | |
FROGGS | szabgab: I'll check | ||
szabgab | FROGGS: thanks! | ||
lizmat | don't! although exhausting, it's always been fun! | ||
szabgab | lizmat: I am really sorry I cant' come :( | 10:48 | |
lizmat | ah, ok | ||
:-) | |||
we too :-( | |||
FROGGS | perl6-xml-sax$ PERL6LIB=lib prove -e perl6 t | ||
t/xml.t .. 1/39 Left over string: '<chapter id="12" name="perl" ></chapter>' | |||
szabgab: is that what you get? | |||
szabgab | yes | ||
this is the first test case with attributes | 10:49 | ||
so I think the problem in the grammar is somewhere matching attr | |||
the grammar does not match that string | 10:50 | ||
FROGGS | szabgab: gimme a few minutes | 10:51 | |
rindolf | szabgab: hi. | ||
jnthn | FROGGS: Mebbe sigspace changes... | 10:52 | |
szabgab | hi rindolf | ||
FROGGS | that is possible | ||
github.com/szabgab/perl6-xml-sax/b...mar.pm#L13 | 10:53 | ||
maybe that should be a rule? | |||
10:54
thou left
|
|||
jnthn | Well, but does it rely on backtracking semantics? | 10:54 | |
But yeah, it's an issue 'cus | |||
\< <element> <attr>* \/\> } | |||
And then | |||
rule attr { [<name>\=\"<value>\"] } | |||
Will no longer match whitespace at the start | 10:55 | ||
Alternatively, turning token element { \w+ } into a rule may be the quickest fix (to match whitespace after the element name) | |||
Oh...but that may screw up the actions :) | |||
FROGGS | szabgab: I changed all regexes to "rule", and now it fails four tests only | 10:56 | |
szabgab | I guess it would be hard to find out what changes were made to the regex engine that make this fail now. | 10:58 | |
and if those changes were intentional ? | |||
FROGGS | no too hard | ||
szabgab | the question if it is important to know | 10:59 | |
FROGGS | after an hour or two of bisecting you should know | ||
szabgab | :) | ||
FROGGS | and I bet these changes where intentional :o) | ||
raydiak | :w | ||
FROGGS | szabgab: after dinner I'll have a fix | ||
szabgab | then it ok | ||
raydiak | erm | ||
FROGGS | err lunch | 11:00 | |
szabgab | FROGGS: appreciate | ||
but if there is working XML parser, I could use that too | |||
FROGGS | dunno, is there? | 11:01 | |
jnthn | btw, from a performance perspective it's best to avoid regex in grammars.... | 11:06 | |
diakopter | heh. | 11:07 | |
szabgab | I also tried to switch all the regexes to rules | 11:10 | |
it seems the test failures are now all about leaving out the spaces | |||
from the text | 11:11 | ||
11:11
Piers_ left
|
|||
szabgab | Expected: ' before ' # Received: 'before ' | 11:11 | |
11:12
denis_boyun joined
|
|||
lizmat | jnthn: what is the significance of "$past.unshift(QAST::Var.new( :name('self'), :scope('lexical') ));" in "make_variable_from_parts" ? | 11:15 | |
is that creating self ? | |||
so, if we have multiiple $!vars, we would get multiple "self"s? | |||
jnthn | lizmat: When you look up an attribute, you need two children. | 11:18 | |
The object to do the lookup against, and then the class the attribute lives in. | |||
lizmat | ah, ok | ||
jnthn | That unshift is doing the first of those. | 11:19 | |
11:19
denis_boyun left
|
|||
jnthn | A QAST::Var is only declaring anything if there's also a :decl(...) in it. | 11:19 | |
Otherwise it's just a lookup | |||
lizmat | gotcha | ||
11:21
spider-mario joined
|
|||
lizmat | so how would I hang something off of $*PACKAGE ? | 11:22 | |
jnthn: because that's where I would to need to hang the hash of arrays of from, right ? | |||
create another hash with $*PACKAGE as the key ? | 11:23 | ||
jnthn | No | ||
Just declare a my %*ATTR_USAGES; or so in package_def, right where my $*PACKAGE is declared. | 11:24 | ||
Then you'll automatically get the right behavior if one package is nested inside another. | |||
lizmat | gotcha | 11:25 | |
jnthn | github.com/rakudo/rakudo/blob/nom/....nqp#L1896 is where I mean, just to be clear | ||
Though the comment is full of it...should say type object, not meta-object :) | |||
lizmat | will fix | 11:26 | |
jnthn | Hm, my apartment is darker than usual 'cus snow has covered the skylights :) | 11:28 | |
11:29
xinming_ left
|
|||
lizmat | so, if I understand you correctly, we would need to keep the $past around for each occurrence, as well as $/ for error reporting, right ? | 11:29 | |
so that we can fix up the $past when we compose the class? | 11:30 | ||
11:31
xinming joined
|
|||
FROGGS | szabgab: you've got a PR | 11:31 | |
jnthn | Yeah, though if you do $past.node($/) then you just can keep the $past around :) | ||
And then just do .node if you need to look it up. | |||
lizmat | ah, gotcha again | 11:32 | |
11:33
szabgab left
11:35
szabgab joined
|
|||
lizmat | jnthn: github.com/rakudo/rakudo/blob/nom/....nqp#L3689 contains a call to get_attribute_meta_object | 11:36 | |
but apparently it is not interested in the side effect | |||
only to throw if it doesn't exist | |||
this implies there is nothing to fix up | 11:37 | ||
so, should I just remove the test? | |||
jnthn | lizmat: Well, it's *only* interested in the side-effect. :) | ||
lizmat | (as I intend to resolve *all* $!private at compose time) | ||
jnthn: duh, must wake up some more | 11:38 | ||
so, get_attribute_meta_object will never throw | |||
jnthn | Well, today it does throw | ||
That's why it calls it. | |||
lizmat | package_def will throw later | 11:39 | |
jnthn | It's for the method foo($!bar) { } case. | ||
Right, but you need to make sure that happens. | |||
szabgab | FROGGS: thanks! | ||
colomon | jnthn++ # Stage parse : 84.557 | ||
lizmat | but there is no $past there to fix up? | ||
jnthn | Right, we could well just create a QAST::Var there with an appropriate name and $/. It'll be throw-away, but good enough for detecting the error. | 11:40 | |
lizmat | ok | ||
jnthn | So I'd just turn that line into a %*ATTR_USAGES{$name}.push(QAST::Var.new( :node($/) )) or so | ||
(Won't be quite that simple as no auto-viv in NQP. Maybe factor that out into an add_attr_to_check sub...) | 11:41 | ||
lizmat | ok | 11:42 | |
FROGGS | colomon: what backend is that? | 11:45 | |
11:46
tgt joined
|
|||
colomon | FROGGS: parrot | 11:46 | |
FROGGS | wow, nice machine :o) | ||
colomon | FROGGS: it's been routinely 90 for the last month or two, and was 100 for much of the summer | 11:47 | |
jnthn | Wow, indeed. What's it do JVM in? :) | ||
colomon | give me a mine... | ||
minuget | |||
minute | |||
two early | |||
jnthn hands colomon a mine and runs away | |||
colomon | silver or gold? | 11:48 | |
jnthn | Oh, I thought you meant the explosive kind | ||
My bad P | |||
:P | |||
colomon | compiling now. | 11:49 | |
11:51
markov left
11:53
Baggio left
11:54
szabgab left
11:59
SamuraiJack_ left
|
|||
lizmat | jnthn: if I understand this correctly, I should do the check *after* the pkg_compose, but before the create_code_object, right ? | 12:17 | |
jnthn | lizmat: Certainly after pkg_compose | ||
Where is the crate_code_object you're thinking about? | 12:18 | ||
lizmat | Actions, 1914 | ||
well, in my version, a few lines less in yours, I guess | |||
jnthn | lizmat: I think you may want to do it outside of that if/else | 12:19 | |
e.g. put it above the # Document | |||
lizmat | also for a role? | ||
jnthn | Sure, we need to check attribute declarations in roles too... | ||
lizmat | ah, duh | ||
ok | |||
jnthn | That's why I'm suggesting putting out outside of the if/else | 12:20 | |
Note that both branches call compose. | |||
lizmat | ok | 12:21 | |
do we have .kv in nqp ? | 12:22 | ||
jnthn | No | 12:23 | |
Just do for %hash { ... } | |||
And then you can do $_.key and $_.value | |||
lizmat | yeah, found that meme in the code :-) | 12:33 | |
12:34
markov joined
|
|||
lizmat | jnthn: Stage start : 0.000 | 12:39 | |
Error while compiling op p6decontrv: No scope specified or locatable in the symbol table for '$!WHY' | |||
jnthn: the diff so far: gist.github.com/lizmat/7840724 | 12:40 | ||
jnthn | yeah, I can see what's up | 12:41 | |
You can't move as much as you have | 12:42 | ||
These: | |||
- my $attr := get_attribute_meta_object($/, $past.name()); | |||
- $past.returns($attr.type); | |||
Are correctly moved, and should be. | |||
But the other lines... | |||
- $past.scope('attribute'); | |||
- $past.unshift(instantiated_type(['$?CLASS'], $/)); | |||
lizmat | need to be at the original location | 12:43 | |
jnthn | - $past.unshift(QAST::Var.new( :name('self'), :scope('lexical') )); | ||
lizmat | ok, gotcha | ||
jnthn | Noeed to stay put. | ||
Otherwise role compilation likely explodes. | |||
12:46
colomon left
12:52
tipdbmp left
12:55
tipdbmp joined
|
|||
lizmat | hmmm... seems I can't build rakudo now because it dies on the delayed get_attribute_meta_object | 12:55 | |
13:14
denisboyun joined
|
|||
lizmat | found thinko | 13:17 | |
FROGGS | uhh | 13:21 | |
jnthn++ # blog post! | |||
lizmat | ah, yes, jnthn++ (was too focused on my patching) | 13:29 | |
good to read 6guts.wordpress.com/2013/12/07/a-fe...k-updates/ | |||
13:29
clkao_ joined
|
|||
lizmat | Cannot assign to a non-container | 13:30 | |
current instr.: 'BUILD' pc 42 ((file unknown):-2113359804) (gen/parrot/CORE.setting:10024) | |||
jnthn: I think I need to add the (original) $*PACKAGE to get_attribute_meta_object | 13:31 | ||
because it's now running at another time, so it may be wrong? | 13:32 | ||
jnthn | lizmat: No, $*PACKAGE should be the same thing...you're in the action method for package_def, and that is called at the end of package_def in the grammar, before it returns. | 13:36 | |
So I don't think that's your problem. | |||
lizmat | hmmm....... still, it seems to die on the first private attribute it encounters in the setting | ||
ah! | 13:37 | ||
has num $.re; | |||
$!re = re; | |||
so the attribute is defined as public | |||
but referenced as private | |||
could that be the problem? | |||
jnthn | Well, that's perfectly allowed, since has num $.re means "declare has num $!re, then ccreate an accessor" | 13:38 | |
13:38
darutoko left
|
|||
jnthn | Oh...hmm | 13:39 | |
This could be a nasty problem. | |||
lizmat | gist.github.com/lizmat/7841431 | ||
is my diff so far | |||
jnthn | We're now attaching the type later. But the = operator looks at the type of the lhs to decide what to emit. | 13:40 | |
Whih, of course, isn't set yet... | |||
*which | |||
lizmat | ah, yuck, so we go down deeper into the rabbit hole | ||
jnthn | + add_attr_to_check($/, $_<variable_name>, QAST::Var.new); | 13:41 | |
That wants a :node passed to new so we can report the error properly, I think... | |||
lizmat | the node is added inside the sub | 13:42 | |
jnthn | oh, so it is.. | ||
Well, yes, yuck. | |||
We'll have to solve the deeper issue here at some point I guess. | |||
For now there's a cheat that'll get us most of the way. | 13:43 | ||
Which is to *try* and find the attribute as we compile, and only build up the %*ATTR_CHECK entries for those unknown at the point we encounter them. | |||
lizmat | well, that would build the setting | 13:44 | |
but would not fix the problem I'm trying to fix, afaik | |||
jnthn | That way, everything that works today works the same, and it's only those from roles that get this new handling. | ||
Well, it'd fix it for talking about attributes from roles unless those attributes are natively typed... | |||
Which most attributes aren't. | 13:45 | ||
lizmat | ah, ok | ||
ok, will change it like that | |||
jnthn | So it gets us much of the way. I'm quite sure it covers the stuff you wanted it for in the set/bag factoring. | ||
13:50
kivutar left
13:52
darutoko joined
|
|||
woolfy | jnthn++ 6guts.wordpress.com/2013/12/07/a-fe...k-updates/ typo: "Rakudo on MoarVM progress" in line 2/3: "The first step was the get the core of the compiler itself building." It says "was the get the" and I think should be "was to get the". | 13:53 | |
13:53
jnap joined
13:56
denisboyun left
|
|||
woolfy | jnthn: nice blog (& I found no more typos) | 14:00 | |
lizmat | $ perl6-p --ll-exception -e 'role A { has $!a }; class B does A { method b { say $!a } }' | 14:06 | |
yeah! | |||
ok, so you will not be able to have a native private attribute in a role be visible in the class | 14:12 | ||
moritz | it seems the Dancer adevent calendar is stuck at day 2 | 14:14 | |
14:14
SamuraiJack_ joined
|
|||
jnthn | woolfy: Fixed; thanks! | 14:15 | |
lizmat: yay! | |||
lizmat: yeah, we'll have to fix the native private attr thing up later, but that's a trickier fix | |||
lizmat | which I will gladly leave to you | 14:16 | |
anyway, I learned a lot today :-) | |||
jnthn | :-) | 14:17 | |
*and* got us an important improvement. | |||
14:18
atroxaper joined
|
|||
woolfy | Christmas gets closer! | 14:18 | |
14:23
hummeleB1 joined,
kaare__ joined
14:24
kaare_ left
14:30
tgt left,
tgt joined
14:35
kivutar joined
|
|||
dalek | kudo/nom: 56ee1a5 | (Elizabeth Mattijsen)++ | src/Perl6/ (2 files): Private role attributes are now visible in class Thanks to extensive support by jnthn++. Unfortunately, getting this to work for private *native* role attributes, proved to be needing to go deeper into the rabbit hole. Which will be for another day. |
14:44 | |
14:45
tadzik left
14:47
xinming_ joined
14:48
dalek left
14:49
xinming left,
dalek joined,
ChanServ sets mode: +v dalek
14:51
dalek left,
Juerd left
14:52
sergot left,
dalek joined,
ChanServ sets mode: +v dalek,
Juerd joined
14:53
Util left,
dalek left,
Util joined
14:54
dalek joined,
ChanServ sets mode: +v dalek,
PerlJam left,
PerlJam joined
14:58
masak left,
masak joined
14:59
Juerd left
15:00
Juerd joined
15:04
sergot joined
15:07
telex left
15:08
telex joined
|
|||
lizmat | hmmm... seems dalek quit? | 15:10 | |
anyway, I added tests for role attribute visibility | |||
jnthn | lizmat++ | 15:12 | |
15:12
sergot left
15:13
rurban1 joined,
sergot joined
15:14
dalek left,
hugme left
15:15
dalek joined,
ChanServ sets mode: +v dalek
15:16
masak left
15:17
masak joined
15:24
hugme joined,
ChanServ sets mode: +v hugme
15:28
PerlJam left
|
|||
nwc10 | sorry if it's obvious, but it's not obvious to me - why would having one shared NFG across the interpreter be potential for a DOS, but having it one-per string would not? | 15:33 | |
15:33
dalek left
15:34
Juerd left
15:35
dalek joined,
ChanServ sets mode: +v dalek
|
|||
diakopter | nwc10: b/c you could run out of negative synthetics if the mapping were shared | 15:35 | |
nwc10 | I think you'd need at least 8Gb of input to do that | ||
2 billion negative synthetics, and each takes at least 4 bytes of input to define | 15:36 | ||
(I think.) | |||
15:36
Juerd joined
|
|||
diakopter | 1 billion? | 15:37 | |
nwc10 | jnthn: does this commit actually generate "better" code, or is it just useful in deferring something to help get bootstrapping: github.com/rakudo/rakudo/commit/84e430f241 | ||
diakopter | er | ||
nwc10 | I thought we had 2147483648 negative synthetics to play with | ||
jnthn | nwc10: It eliminates a check that will always come out as "true" | 15:38 | |
nwc10 | jnthn: aha | ||
15:38
synopsebot left
|
|||
jnthn | nwc10: So yes, better code. | 15:38 | |
15:38
masak left
|
|||
diakopter | bye bye feather? | 15:38 | |
15:39
sergot left,
d4l3k_ joined,
Util left,
dalek left
|
|||
diakopter | nwc10: well yes a huge input. but it would also require at least that much memory on the system | 15:39 | |
15:39
masak joined
|
|||
diakopter | which is too much | 15:39 | |
15:39
Util joined
15:40
d4l3k_ left,
PerlJam joined
15:41
dalek joined,
ChanServ sets mode: +v dalek
15:42
atroxaper left,
SamuraiJack_ left,
markov left,
sivoais left,
cognominal left,
woolfy left,
awwaiid_ left,
labster left,
kst left,
segomos left,
[particle] left,
sjn left,
ribasushi left,
Exodist left,
Juerd left
15:43
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
15:45
sergot joined,
synopsebot joined
15:46
masak left,
hugme left
15:47
dalek left
15:48
Juerd joined,
dalek joined,
ChanServ sets mode: +v dalek
15:50
sergot left
15:51
dalek left,
sergot joined,
masak joined
15:53
dalek joined,
ChanServ sets mode: +v dalek
15:56
jeffreykegler joined
|
|||
masak | good UGT, #perl6 | 15:57 | |
Woodi | o/ | ||
diakopter | slutations | ||
salutations | |||
o/ | 15:58 | ||
15:59
Psyche^ joined
|
|||
lizmat | masak! | 15:59 | |
Woodi | so what is CompUnitRepo ? | 16:00 | |
FROGGS | Woodi: it is a repository of installed modules | 16:01 | |
Woodi: and a piece of code that tells you which candidates are installed for a given use-statement for example | 16:02 | ||
16:02
Psyche^_ left
|
|||
lizmat | actually, a CompUnitRepo could represent remotely installed modules as well | 16:02 | |
FROGGS | true | ||
Woodi | so it is code internal to Perl6-interpreter/compiler ? or sits in panda/packager ? | 16:03 | |
lizmat | Woodi: the spec describes 2 implementations of that interface | ||
but any developer is free to develop another implementation and sitck it in @INC | 16:04 | ||
Woodi | looking... | ||
FROGGS | the compiler should already have some sort of CompUnitRepo built in, but it is intended that one can odd custom ones | ||
panda should just talk to the CompUnitRepo | 16:05 | ||
lizmat | jnthn: it appears that my private role attribute visibility fix does not work in settings :-( | 16:06 | |
16:06
hugme joined,
ChanServ sets mode: +v hugme
|
|||
jnthn | lizmat: There's no reason why it shouldn't... | 16:07 | |
masak | diakopter: slutations to you too :P | ||
16:08
atroxaper joined,
SamuraiJack_ joined,
markov joined,
sivoais joined,
cognominal joined,
woolfy joined,
awwaiid_ joined,
labster joined,
kst joined,
segomos joined,
[particle] joined,
sjn joined,
ribasushi joined,
Exodist joined
16:10
xenoterracide left
|
|||
Woodi | 404s in S11 for links to CompUnitRepo::Local::... | 16:15 | |
wiki: The classic combination of a user account number or name and a secret password is a widely used example of IT credentials. # do we need passwords on compiled code ? :) | 16:20 | ||
FROGGS | huh? | 16:21 | |
Woodi | TGT maybe ? :) but nvm... | 16:22 | |
how compunitrepo looks in @INC ? path name ? | 16:23 | ||
lizmat | CompUnitRepo objects should be in @INC, it's not implemented like that yet | 16:24 | |
Woodi | object ? | ||
ok, got it | 16:25 | ||
16:25
c1sung left
|
|||
FROGGS | p: class A::B { }; sub foo(A::B $bar) { } | 16:26 | |
camelia | ( no output ) | ||
lizmat | std: class A::B { }; sub foo(A::B $bar) { } | 16:31 | |
camelia | std 3b262af: OUTPUT«Potential difficulties: $bar is declared but not used at /tmp/vL_lrB7Ddr line 1:------> class A::B { }; sub foo(A::B ⏏$bar) { }ok 00:02 126m» | ||
FROGGS | p: class Panda::Project { }; class Panda::Ecosystem { method add-project(Panda::Project $p) { } } | 16:32 | |
camelia | ( no output ) | ||
FROGGS | this blows up in panda and I don't know why | ||
lizmat | how? | 16:34 | |
FROGGS | ===SORRY!=== Error while compiling /home/froggs/dev/panda/lib/Panda/Ecosystem.pm | 16:35 | |
Invalid typename 'Panda::Project' in parameter declaration. | |||
moritz | did you use Panda::Project? | ||
FROGGS | moritz: yes | 16:36 | |
p: class Panda::Ecosystem { method add-project(Panda::Project $p) { } } | 16:37 | ||
camelia | rakudo-parrot 56ee1a: OUTPUT«===SORRY!=== Error while compiling /tmp/k2b18w192WInvalid typename 'Panda::Project' in parameter declaration.at /tmp/k2b18w192W:1------> stem { method add-project(Panda::Project⏏ $p) { } }» | ||
FROGGS | okay, at least it would fail that way | ||
hmmm, then it must be something with my CompUnitRepo stuff | 16:38 | ||
16:42
c1sung joined
|
|||
moritz | star: use Panda::Project; class Panda::Ecosystem { method add-project(Panda::Project $p) { } } | 16:46 | |
camelia | ( no output ) | ||
moritz | huh, works here.. | ||
FROGGS: maybe leave out the type constraint as a workaround | |||
16:46
Piers_ joined
16:53
tadzik joined
|
|||
lizmat | *sigh* | 16:55 | |
gist.github.com/lizmat/7845244 | |||
trying to make a proper QuantHash role with %!elems private role attribute | |||
but apparently, it can not be found: package-kind: %!elems | 16:56 | ||
jnthn | lizmat: Oh, but there you're referring to the attribute of one role inside another... | 16:57 | |
16:57
pmurias joined
|
|||
lizmat | similar situation outside of settings seems to work | 16:57 | |
jnthn | lizmat: But since composition is flattening... | ||
lizmat | I have a test for that, and that works | ||
jnthn | Really? | ||
pmurias | the use of STM for concurency in Perl6 was abandoned? | ||
lizmat | let me double check | ||
pmurias: not as far as I'm concerned, but from the spec at the moment: yes | |||
masak | pmurias: I think TimToady expressed it as not being as firmly believed in as it used to. | ||
jnthn | pmurias: Yes, so far as I'm concerned. I won't get in the way of anybody trying to do it, but I don't think it'll work out too well. | 16:58 | |
lizmat | jnthn: role AA { has Int $!aa } | ||
role BB does AA {} | |||
class Baz does BB { method baz { $!aa++ } } | |||
my $baz = Baz.new; | |||
works in test | 16:59 | ||
pmurias | it might be best to leave it to modules | ||
jnthn | lizmat: But that's not your scenario. | ||
lizmat: Move the method baz into role BB | |||
lizmat | no? am I missing something ? | ||
jnthn | I think that's what you have? | 17:00 | |
my role Setty does QuantHash { | 17:01 | ||
- has %!elems; # key.WHICH => key | |||
method BUILD (:%!elems) {} | |||
lizmat | hmmm... so why would a role not see a private attribute in another role it does ? | ||
FROGGS | maybe the role that has the method would need some sort of "has $!aa = ..." ? | ||
jnthn | Because role composition is flattening. A role doing a role simply means "and include this at composition time" | 17:02 | |
FROGGS | like when we mixin a role that depends on a method being implemented by the class | ||
this scenario here seems related | |||
jnthn | Not so sure it's related... | 17:03 | |
lizmat | jnthn: that feels like an implementation restriction, rather than a language feature | ||
jnthn | I can see why we have it. I agree its inconvenient... | ||
17:04
jnap left
|
|||
lizmat | I would think that when we compose the role, it would know which attributes it got from the roles it is doing | 17:04 | |
17:04
rindolf left
|
|||
lizmat | just like the class will at the end | 17:04 | |
is that a strange thought? | 17:05 | ||
jnthn | What happens at each of those composition times is fundementally different, is all. | ||
In the class composition, we actually concretize all the roles. | |||
We need the target class to do so. | 17:06 | ||
lizmat | not disagreeing with that | ||
but this feels like a big drawback on code reuse to me | |||
jnthn | Here's the gory bit | ||
17:07
V_S_C joined
|
|||
jnthn | role A[Numeric ::T] { has $!a }; role A[::T] { }; role B[::T] does A[T] { method m() { $!a } } # That both is and isn't valid depending on the class we compose it in to | 17:08 | |
17:10
V_S_C left
|
|||
lizmat | ok, am too tired now to think this through | 17:10 | |
and patch -p1 is about to fold for today | |||
so I'll see if I can wrap my head around it tomorrow | 17:11 | ||
jnthn | OK. I don't know an answer, I'm afraid. :( | 17:12 | |
jnthn will ponder it too | |||
lizmat | maybe TimToady / masak / moritz would like to chime in | 17:13 | |
:-) | |||
17:14
lizmat left
|
|||
jnthn | I wonder if we can just store the things to check in the meta-object somewhere and do it at composition time... | 17:14 | |
Class comp, that is... | |||
Will be "fun" go make error reporting not suck | |||
*to | |||
TimToady is running a quiz meet today, so won't have much brane | 17:15 | ||
FROGGS | I still think that "Attribute $.foo must be implemented by class Bar because a role requires it" is how it could be by stubbing the attribute in the role | 17:16 | |
17:22
atroxaper left
|
|||
Woodi | but we can have roles with implementation (right?) so would be nice to put attrs into r-class | 17:23 | |
FROGGS | Woodi: you can basically use a role like a class, yes | ||
Woodi | and two roles can use the same attr: class User does Admin does Gamer {... | 17:24 | |
eg. password | |||
FROGGS | sure | 17:25 | |
would be weird to do it in another way | |||
Woodi | on the other hand two roles can have attrs with same names for totally other purposes :) so kind of roles groupping needed. but roles can inherit roles ? | 17:29 | |
FROGGS | well, the user is responsible to choose roles that play well together | 17:30 | |
and yes, roles an do other roles | |||
17:31
cognominal left
|
|||
Woodi | but what was orginal, lizmat++ problem ? :) | 17:32 | |
17:33
woolfy left
17:35
jnap joined,
SamuraiJack_ left
17:36
SamuraiJack_ joined
17:39
jnap left
17:47
SamuraiJack_ left
|
|||
japhb | Something very weird with perl6-j (built last night): When I do `which perl6 perl6-j`, they're in the same place, .../rakudo-jvm/install/bin/ . And when I do `perl6 -v`, it works fine. But when I do `perl6-j -v`, I get bash: .../rakudo-jvm/install-jvm/bin/perl6: No such file or directory | 17:48 | |
Known issue? | |||
(FWIW, I can't figure out where it's still looking for .../install-jvm/... . My path is clean of that, and so are the launchers, as far as I can see. | |||
) | |||
17:49
denis_boyun joined
|
|||
raydiak | perl6advent.wordpress.com/?p=1945 # anyone feel free to offer corrections or improvements | 17:52 | |
moritz | japhb: sounds like something weird is going on, like you being in a working directory that has been delete, or something funny | ||
japhb: or there's a dangling symlink involved, or something | 17:53 | ||
raydiak: say $vec.length; # 1 | 17:55 | ||
raydiak: shouldn't that be $vec.magnitude? | |||
japhb | moritz: The only symlinks in that tree are the top level (rakudo-jvm -> rakudo-jvm-de5c8f874e6ec2f560a4538fee00661e529098f4) and libparrot.so in the parrot version of the tree | ||
raydiak | moritz: oh yeah, I renamed it...thanks :) | 17:56 | |
moritz | raydiak: also minor point, the other posts so far used 4 spaces for indentation | 17:57 | |
raydiak | moritz: good to know, will fix | ||
moritz | raydiak: as for the methods x, y, z: you already made them 'is rw', so there's no need for the optional argument | ||
you can simply use them as $vec.x = 42 | 17:58 | ||
r: sub f($x) { say VAR($x).defined }; f 42; | |||
raydiak | moritz: but the default autogen accessors support passing the value as a param as well, don't they? | ||
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«True» | ||
moritz | raydiak: no | 17:59 | |
r: sub f($x?) { say VAR($x).defined }; f | |||
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«False» | ||
raydiak | moritz: hoory! I hated how it made them look when I added that param garbage | ||
moritz | r: sub f($x?) { say VAR($x).defined }; f Any | ||
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«False» | ||
moritz | raydiak: also it looks to me like VAR($x).defined and $x.defined mostly do the same thing, so I would leave out the VAR() part | 18:00 | |
japhb | Any other ideas on where to look for my .../install-jvm/... problem? This is driving me nutters. | 18:01 | |
raydiak | moritz: from what I read, VAR.defined will return true if the value was passed, even if it's an undefined value, which is a big difference as opposed to not passing it at all | ||
moritz | p: sub f($x?) { say VAR($x).defined }; f Any | 18:02 | |
camelia | rakudo-parrot 56ee1a: OUTPUT«False» | ||
moritz | raydiak: ^^ doesn't look like it | ||
raydiak: otherwise very nice post. Thank you! | |||
raydiak | moritz: quite right, will make changes to that part. and thanks for the help! | 18:03 | |
moritz | raydiak: you're welcome | ||
18:10
rindolf joined
|
|||
japhb | AAAUUUGGGHHH I found it. PEBCAK, where the P happened a month ago. Gah. | 18:14 | |
raydiak | japhb: where was it? | 18:16 | |
18:18
hummeleB1 left
18:20
hummeleBop1 joined
18:22
raiph joined
|
|||
japhb | raydiak: I had a month ago set an alias for perl6-j, and with the new install location (install/bin/perl6-j, rather than install-jvm/...), that alias was out of date. :-( | 18:22 | |
The bash builtin `type` is, btw, your friend in these cases. | |||
raydiak | ah ha...tricky | 18:24 | |
moritz | ok, the dangling thing wasn't a symlink, but an alias :-) | ||
raydiak tends to prefer single-line scripts in ~/bin over alias definitions | 18:28 | ||
moritz tends to prefer $PATH changes over aliases and single-line scripts in ~/bin | 18:30 | ||
japhb | moritz: The path in question is on a network filesystem. Having every command-name tab completion go to sleep when the network FS is having trouble, because something on the network FS appears in your PATH, sucks. | 18:33 | |
raydiak | we should collaborate on a project based around writing an alias to a script in ~/bin which modifies $PATH :) | 18:35 | |
18:36
jnap joined,
ajr joined
|
|||
japhb | yipes. | 18:36 | |
18:36
ajr is now known as Guest29520
|
|||
japhb | Oh, raydiak, did you release your source? I see you were discussing your post with moritz .... | 18:36 | |
18:37
Guest29520 is now known as ajr_
18:39
kivutar left
18:40
jnap left
|
|||
raydiak | japhb: no, this was just a small unrelated advent post. now that it's done, I can get back to pray. I was thinking about extracting Pray::Math::Vector3D into Math::Vector3D, an optimized (or will be) vector class specifically for 3D...would you be interested in digging in to that before the rest of pray is out? | 18:40 | |
I am hoping to have another advent post this month for the Pray release, though, if that's the one you mean | 18:42 | ||
japhb | Hmmm, how optimized a class are you planning to write? In particular, are you going to be doing all native nums and packed arrays? | 18:45 | |
raydiak | it's definitely on the table when those things are a little more complete | 18:46 | |
japhb | Hmmm, why does shell("echo foo") work in both r-j and r-p, but run(< echo foo >) only works in r-p? | ||
You can already build the classes with native num attributes IIRC. | 18:47 | ||
I wonder if packing them in 'is repr(CStruct)' is a net win or loss performance- and memory-wise right now .... | 18:48 | ||
FROGGS | japhb: run(< echo foo >) should not work at all | ||
japhb | japhb: Oh? Did it get renamed or somesuch? | ||
18:48
darutoko left
|
|||
FROGGS | japhb: my bad, it should work | 18:48 | |
japhb | :-) | ||
FROGGS | maybe perl6-j does not search for echo in /bin? | 18:49 | |
18:49
Mouq joined
|
|||
FROGGS | does that work? run(< /bin/echo foo >) | 18:49 | |
japhb | Hmmm, plausible. In fact, perhaps it doesn't search the path at all? | ||
japhb checks | |||
raydiak | iirc, when I last tried, native nums couldn't be assigned to or operated on or coerced to, or something along those lines... | ||
FROGGS | japhb: that can well be | ||
japhb | Hmmm, nope /bin/echo doesn't work either | ||
FROGGS | run() should fake the searching in path that shell does... | 18:50 | |
hmmm | |||
japhb | r: class Vec3D { has num $.x is rw; has num $.y is rw; has num $.z is rw; }; my Vec3d $v .= new(:x(0e0), :y(1e0), :x(2e0)); say $v; $v.x = 4e0; say $v; | 18:52 | |
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«===SORRY!===Cannot create rw-accessors for natively typed attribute '$!x'» | ||
japhb | Ah, I see the problem | ||
r: class Vec3D { has num $.x; has num $.y; has num $.z; }; my Vec3d $v .= new(:x(0e0), :y(1e0), :x(2e0)); say $v; $v.x = 4e0; say $v; | 18:53 | ||
FROGGS | japhb: I have no idea why run(< /bin/echo foo >) fails :/ | ||
camelia | rakudo-parrot 56ee1a: OUTPUT«===SORRY!===Type 'Vec3d' is not declared. Did you mean 'Vec3D'?at /tmp/3BlTY8skhq:1------> x; has num $.y; has num $.z; }; my Vec3d⏏ $v .= new(:x(0e0), :y(1e0), :x(2e0)); sMalformed myat /tmp/3BlTY8sk…» | ||
..rakudo-jvm 56ee1a: OUTPUT«===SORRY!===Type 'Vec3d' is not declared. Did you mean 'Vec3D'?at /tmp/C57Za9JAyV:1------> x; has num $.y; has num $.z; }; my Vec3d⏏ $v .= new(:x(0e0), :y(1e0), :x(2e0)); sMalformed myat /tmp/C57Za9JAyV:…» | |||
japhb | FROGGS: Dang it. :-( | ||
raydiak | r: say int(1).perl | ||
camelia | rakudo-parrot 56ee1a: OUTPUT«invoke() not implemented in class 'int' in block at /tmp/Ghrvn5ep2c:1 in any at /tmp/Ghrvn5ep2c:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 in any evalfiles at gen/parrot/stage2/NQ…» | ||
..rakudo-jvm 56ee1a: OUTPUT«Can not invoke this object in block at /tmp/IszYDeWtJ3:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196 in any command_eval at src/P…» | |||
japhb | r: class Vec3D { has num $.x; has num $.y; has num $.z; }; my Vec3D $v .= new(:x(0e0), :y(1e0), :x(2e0)); say $v; $v.x = 4e0; say $v; | ||
camelia | rakudo-jvm 56ee1a: OUTPUT«Vec3D.new(x => 2e0, y => 1e0, z => 0e0)Cannot modify an immutable value in block at /tmp/_pvt4yGPJj:1 in any eval at gen/jvm/stage2/NQPHLL.nqp:1086 in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292 in any command_eval at gen/jvm/stage2/…» | ||
..rakudo-parrot 56ee1a: OUTPUT«Vec3D.new(x => 2e0, y => 1e0, z => NaN)Cannot modify an immutable value in block at /tmp/43hiqshbNZ:1 in any at /tmp/43hiqshbNZ:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 in an…» | |||
japhb | p: class Vec3D { has num $.x; has num $.y; has num $.z; }; my Vec3D $v .= new(:x(0e0), :y(1e0), :z(2e0)); say $v; $v.x = 4e0; say $v; | 18:54 | |
camelia | rakudo-parrot 56ee1a: OUTPUT«Vec3D.new(x => 0e0, y => 1e0, z => 2e0)Cannot modify an immutable value in block at /tmp/ATF6p_KHs3:1 in any at /tmp/ATF6p_KHs3:1 in any at gen/parrot/stage2/NQPHLL.nqp:1146 in any eval at gen/parrot/stage2/NQPHLL.nqp:1133 in an…» | ||
japhb | Yup, that's a killer all right. | ||
raydiak | I suspect this sort of thing will become higher-priority as native call for jvm comes online | ||
japhb | I would say just doing everything in immutable/functional style, but that doesn't really work for high-performance rendering work (too much GC churn) | 18:56 | |
moritz | yes, natives can't be rw yet | ||
you'd have to write separate setters | 18:57 | ||
japhb | OOC, what is the difficulty with making it work? Is there an architectural issue, or just a lack of tuits? | 18:58 | |
moritz | well, a native by defition doesn't have a container | ||
and rw-ness works through containers | |||
so you'd basically have to invent a separate calling convention, where a pointer to the native is passed instead | 18:59 | ||
and then try to know at compile time whether that's the case, and guard at runtime for cases where you can't know | |||
jnthn | The idea is that we'll have a kind of container that points to the object and its attribute, and its assign handling will do the right thing... | 19:01 | |
timotimo | Can't use unknown trait 'is equiv' in a sub+{precedence} declaration. o_O | ||
jnthn | And then rely on inlining to optimize that cost away. | ||
In the common case, anyways. | 19:02 | ||
japhb | nodnod | ||
timotimo | jnthn: do you think it makes sense to rewrite some cases of junctions into QAST-constructed for-loops? | 19:10 | |
like $n %% any(@primes), for example | |||
jnthn | timotimo: No | 19:18 | |
raydiak | japhb: to give you a more detailed answer to your original question (and kinda half making notes to myself), I've been agonizing over that advent post for a couple days, so I haven't touched Pray since the last image you saw except to get scaling half working, but iirc everything I want done before release is only 2 or 3 days worth of work...it's just shoehorning 2 or 3 full days of work into X number of RL | 19:21 | |
days that gets a little sticky | |||
wow, that didn't look so long when I could only see one line at a time :) | |||
FROGGS | weird, with my CompUnitRepo stuff, I can do "use Test; ok 1", but not "use Test; say Test" | 19:23 | |
timotimo | jnthn: happens too rarely? analysis too expensive? code-size increase not worth it? | ||
jnthn | timotimo: Yeah, I didn't see that pattern show up so much in real code. | 19:25 | |
With the optimizer, we have to remember that it takes time to run. | |||
timotimo | sd.jtimothyking.com/2013/09/17/how-...is-perl-6/ - search for %%-any here :P | ||
jnthn | So if we make it do more work, we need to be fairly confident it will pay off | ||
timotimo | but yeah. | ||
i *think* we already have analysis that goes there partially | 19:26 | ||
like, we'll already look at that piece of code and say "it's in bool context, it has a junction on one side. oh, the junction has an array argument. i guess i'll give up then" | |||
that either means that doing that loop transformation is not much more costly, or that the existing analysis is too costly as well :) | 19:27 | ||
19:28
nebuchadnezzar left
19:29
Piers_ left
19:32
Piers_ joined
19:36
jnap joined
19:41
jnap left
19:47
nebuchadnezzar joined
19:49
Piers_ left
19:53
raiph left,
sqirrel joined
19:56
rom1504_ is now known as rom1504
20:01
thou joined
20:17
rindolf left
20:19
sqirrel_ joined,
sqirrel left
20:20
Piers_ joined
20:23
sqirrel_ left
20:24
benabik joined
20:28
jeffreykegler left
|
|||
timotimo | not convinced, jnthn? | 20:30 | |
jnthn | timotimo: I think we need to look deeper into why junction auto-threading is so slow. | 20:32 | |
timotimo | but that's hard :) | 20:34 | |
20:36
sqirrel joined
20:37
jnap joined
20:39
colomon joined
20:42
rurban2 joined,
jnap left,
sqirrel_ joined,
sqirrel left
|
|||
colomon | jnthn: answering your question from this morning very late, JVM time: Stage parse : 48.800 | 20:43 | |
20:44
rurban1 left
|
|||
timotimo | is munch not specced? | 20:45 | |
r: my @a = 1, 2, 3, 4, 5; say @a.munch(3); say @a; | 20:46 | ||
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«1 2 3 4 5» | ||
FROGGS | here is how my CompUnitRepo explodes: gist.github.com/FROGGS/392471225039d60749d7 | 20:47 | |
TimToady | raydiak: subscripts are no longer methods | 20:50 | |
20:51
kaare__ left,
thou left
|
|||
TimToady | your article thinks they're inheritable, and they aren't | 20:51 | |
(they turned out to be too hard to optimize that way) | |||
20:52
raiph joined
|
|||
raydiak | TimToady: what would be more accurate to say there? or should I just remove the offending statement entirely? | 20:52 | |
and why does my class support subscripts? where *do* they come from? | |||
TimToady | how old is your rakudo? | 20:53 | |
raydiak | hrm | ||
well, I can't know that for my readers | |||
TimToady | I think I'd just remove that statement, since operators aren't inheritable in that sense either | 20:54 | |
operators are all lexically scoped, since they define the language | |||
some operators will delegate to the object's method underlyingly though | |||
raydiak | ah, I see...I had it backwards and inside-out | 20:55 | |
ooc, assuming a recent pull of nom, where do the subscripts come from? | 20:56 | ||
TimToady | on the binding vs assignment, I missed seeing a statement that the Array would end up containing a single element, which is the Vector you made | ||
they come from the setting | |||
as do all other operators | |||
raydiak | got it...I think | 20:57 | |
timotimo | TimToady: there's no mention of "munch" in the specs, is it deliberately unspecced? | ||
(also, i don't think i really understand what it's supposed to do) | |||
raydiak | r: class Foo is Array {}; my @foo = Foo.new(1,2,3); say @foo.perl; | 20:58 | |
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«Array.new(1, 2, 3)» | ||
raydiak | ^ no Foo at all | ||
TimToady | well, we're waiting for pmichaud++ to finish respeccing that, but he's been busy with his kids, and rightfully so | ||
timotimo | ah, right | ||
20:58
sqirrel_ left
20:59
sqirrel joined
|
|||
TimToady | hmm | 20:59 | |
raydiak | it's working like it says in the article, the part that shows what not to do | ||
20:59
sqirrel left
|
|||
TimToady | r: class Foo is Array {}; say Foo.new(1,2,3).WHAT; | 21:00 | |
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«(Foo)» | ||
raydiak | create an array, then assigns the list of values entirely ignroing the class on the right | ||
TimToady | r: class Foo is Array {}; my @foo = Foo.new(1,2,3); say @foo.elems | 21:01 | |
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«3» | ||
TimToady | hmm, I guess it flattens anyway | ||
timotimo | yeah, the .perl method just writes "Array.new" regardless wether or not it's actually an array | ||
timotimo whips up a quick fix patch | |||
Mouq | colomon: what was it you were asking about parsing grammars? | ||
timotimo | oh, what is this | ||
TimToady | yes, it's just interpolating the Foo into the list flat, which is okay, I guess | ||
raydiak | b/c it does Positional? | 21:02 | |
timotimo | someone else needs to look at this :\ | ||
colomon | Mouq: I'm trying to figure out how to fix sigspace in Niecza. and the first step is just trying to figure out how it works at all... | 21:04 | |
21:05
kivutar joined
|
|||
timotimo is always happy to hear work on niecza happening | 21:05 | ||
raydiak | not sure if this is at all related to the other behavior, or just wishful thinking, but it'd be nice if "my Vector @vec = 1, 2, 3" DWIMmed | ||
TimToady | that would be an array of Vectors | 21:06 | |
you want my @vec is Vector = 1,2,3 for the other thing | |||
21:06
dwarring joined
|
|||
raydiak | oh right...maybe I should have been trying my @vec is Vector :P | 21:06 | |
TimToady | the return type of a composite is always the individual type | ||
raydiak | I find myself making that mistake a lot | 21:07 | |
Mouq | colomon: well, basically, space is only significant after a construct that actually does matching. '{1} ', ':my $a = 5; ', ':i' aren't. '<a> ', 'abc ' is. Spaces can come before and/or after a quantifier, in which case they mean different things: 'a +' is ':!s [a <.ws>]+', 'a+ ' is 'a+<.ws>' | ||
21:08
Fatalnix joined
|
|||
Fatalnix | hey guys | 21:08 | |
diakopter | howdy | ||
Mouq | *':i ' | ||
colomon | Mouq: yes, I more or less understand that. I'm wondering how Niecza implemented the old method of doing it. | ||
Mouq | Oh. | ||
21:09
benabik_ joined
|
|||
Mouq | Rakudo's method was weird. I *think* it captured spaces as a seperate metachar before, but I really didn't understand what it was doing nor why it worked | 21:10 | |
Fatalnix | gonna try getting the JVM backend to work again | ||
never compiled last time heh | |||
is there a document on the features Parrot vs JVM differ? | 21:11 | ||
for rakdo | |||
Mouq | The way it does it now is based on parse-time variables, and then all the actions have to do is if $<sigspace> or whatever is defined, attach it to the appropriate thing | ||
Fatalnix | rakudo* | ||
21:11
zakalwe_ joined,
zakalwe_ left,
zakalwe_ joined
21:12
ggoebel112 left,
benabik left,
ggoebel112 joined,
pmurias left,
PerlJam left,
benabik_ is now known as benabik
|
|||
Mouq | Although I want to change that to be entirely in the actions, which will allow for :s($not-known-at-parse) to work | 21:12 | |
raydiak | 'is TypeObject' NYI...now I remember why that pattern didn't sink in when I was studying | ||
21:12
PerlPilot joined
|
|||
Mouq | r: say 'AbCd' ~~ /:i abcd/ | 21:13 | |
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«「AbCd」» | ||
Mouq | r: say 'AbCd' ~~ /:i(True) abcd/ # :( | ||
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«Nil» | ||
Mouq | r: say 'AbCd' ~~ /:i(1) abcd/ # ? | 21:14 | |
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«「AbCd」» | ||
Mouq | Ahhh, compile time value | ||
jnthn | Fatalnix: Not really; the big difference is Rakudo on JVM has support for concurrency stuff. Differences besides that are minor. | ||
Fatalnix | ah | 21:15 | |
is there a way do you know to do annotations on the JVM? Like Java's annotations | |||
I wanna try and see if I can get Forge for Minecraft to just load a Perl6 program and say something | |||
as a proof of concept | |||
Forge requires annotations to setup the mod. though I can always make a Java main class if I had to. | 21:16 | ||
jnthn | You'll probably be the first person to try and call Perl 6 from Java. While the other way around (call class libraries from Rakudo) has had some work, the other way really hasn't yet. | 21:17 | |
Fatalnix | oh really? I figured that the JVM took care of most of the bumps | 21:18 | |
dwarring | I've written a demo grammar to parse and rank poker hands - gist.github.com/dwarring/7848868 | 21:20 | |
lue | r: sub foo (:$bar, :$baz) { say $bar, $baz }; foo(:bar, :baz); foo(:bar :baz); # shouldn't the second call fail with TTIAR, or alternatively work like the first call? | 21:22 | |
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«TrueTrueTrue(Any)» | ||
FROGGS | dwarring: nice! | ||
lue | Or is that supposed to be understood by Perl 6 as an adverb applied to an adverb? :) | ||
jnthn | lue: Work like the first, but multi-colon thingies are NYI | ||
dwarring | just for fun | 21:23 | |
lue | jnthn: OK. I guess I'm surprised then that it doesn't fail with TTIAR or NYI in the meantime. | ||
Mouq & | |||
dwarring | i wrote a prolog version quite a few years ago | 21:24 | |
Fatalnix | lol prolog | ||
the almost useless Erlang | |||
:D | |||
dwarring | this is better | 21:25 | |
Fatalnix | how long do you think it would take to compile this JVM bild with make -j 5 (if it even usesthat) and a dual core hyperthreaded i5 @ 2.4 Ghz? | ||
jnthn | dwarring: Nice | 21:26 | |
Fatalnix | I almost said Mhz lol | ||
oh, looks like its done already | |||
dwarring | could write it up for advent | 21:28 | |
dwarring but not for tomorrow | |||
jnthn | dwarring: I think there's some open days a bit further ahead | 21:29 | |
dwarring | i'll start on a write up | 21:30 | |
21:30
raiph left
|
|||
Fatalnix | all tests pass! | 21:31 | |
21:33
raiph joined
|
|||
Fatalnix | ls | 21:36 | |
oops | |||
moritz | no such file or directory :-) | ||
Fatalnix | haha | ||
21:36
benabik left
|
|||
Fatalnix | trying to find out if there is a way to compile the perl6 code into a .class | 21:37 | |
21:38
jnap joined,
benabik joined
|
|||
jnthn | Fatalnix: perl6-j --target=classfile --classname=Foo --output=Foo.class something.p6 | 21:39 | |
or .pm | |||
Fatalnix | ohhh | ||
hmm | |||
no wonder I couldnt find perl6 | |||
:D | |||
its perl6-j | 21:40 | ||
lets see if this works | |||
raydiak | TimToady: made changes to text and code to skirt around the blurry parts and not subvert expectations if the flattening behavior changes in the future; any more feedback welcomed, as I might be leaving soon | 21:41 | |
Fatalnix | classname doesnt exist but lemme look at the usage here | ||
raydiak | ^^ same for anyone else with suggestions :) | ||
FROGGS | raydiak++ # very nice post btw | 21:42 | |
21:42
jnap left
|
|||
raydiak | thanks! glad you like it | 21:44 | |
21:51
Mouq left,
Rotwang joined,
ajr_ left
21:53
woolfy joined
21:54
lizmat joined
21:55
rurban2 left
21:58
thou joined
22:00
colomon left
22:04
colomon joined,
rurban1 joined
22:13
telex left
|
|||
raydiak | timotimo: sorry, I missed what you were telling me about .perl earlier, just got it reviewing the log | 22:13 | |
r: class Foo is Array {}; my @foo := Foo.new; say @foo.perl; | |||
camelia | rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«Foo.new()» | ||
raydiak | timotimo: ^ | ||
22:17
telex joined,
FROGGS left
|
|||
timotimo | k | 22:18 | |
22:18
FROGGS joined
|
|||
lue | Just added some Unicode information functions and a storage-method query to Str in my provisional S15, thought it was important enough to mention: gist.github.com/lue/7761244 | 22:19 | |
22:19
thou left
22:20
spider-mario left
22:30
denis_boyun left
22:36
FROGGS left
22:37
pmurias joined
22:38
FROGGS joined
22:39
jnap joined,
rurban1 left
22:43
jnap left
22:44
rurban1 joined
22:48
cognominal joined
23:04
FROGGS left
23:06
FROGGS joined
23:12
xenoterracide joined
23:14
pmurias left
23:16
pmurias joined
23:18
thou joined
23:19
jnap joined
23:21
Mouq joined
23:22
FROGGS left
23:23
FROGGS joined
23:25
xenoterracide left,
Mouq left
23:30
hummeleBop1 left
23:31
FROGGS left,
woolfy left
|
|||
jnthn | sleep & | 23:33 | |
23:38
dmol left
23:55
Piers_ left
23:57
FROGGS joined
|