Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-12-07

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00: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.
00:00 jnthn hoelzro: I'm wondering if we've a $*LEFTSIGIL leak or something.
00:01 hoelzro I suspected $*LEFTSIGIL
00:01 hoelzro but didn't know what I was doing =P
00:01 mtk joined #perl6
00:01 * hoelzro tries some moar prints
00:03 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 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.
00:06 pdcawley Hmm... I'm _so_ unlikely to step up to that particular plate :)
00:06 xenoterracide joined #perl6
00:06 moritz though 'make spectest' would form a good base for that
00:07 jnthn Time for some rest...'night o/
00:07 pdcawley g'night mate.
00:07 cognominal joined #perl6
00:07 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
00:08 japhb Is anyone around that can check out why feather.perl6.nl:3000/projects.json is timing out?
00:10 thou joined #perl6
00:15 [Coke] (smoking the perl6 build) yes, we do that daily. You could run my stuff ad hoc if you wanted.
00:16 * [Coke] hurls https://github.com/coke/perl6-roast-data
00:16 [Coke] (that tests rakudo-j, rakudo-p, niecza, and pugs every day)
00:16 [Coke] er. we have no smoke server yet though. )we have the parrot one, but no one uses it.)
00:16 [Coke] that's another of my backburner projects.
00:20 [Coke] liz - I think we had mixbag for a day.
00:20 [Coke] TimToady was in a renaming frenzy.
00:23 * TimToady foams a little at the mouth.
00:24 * 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...
00:25 itz_ how long does the moar "please wait stage" take? I'm sure its just going to core dump :)
00:27 TimToady colomon: easy peasy, just look at the P5 that code turns into :)
00:30 TimToady colomon: the important thing with respect to :s is that quantified_atom determined all the sigspace, in cahoots with sigmaybe
00:31 TimToady and all the constructs that enable sigspace set $*SIGOK so sigmaybe knows whether to treat the space as significant
00:31 TimToady *determines
00:32 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
00:32 TimToady so you could check out Mouq's changes and see what he did
00:34 TimToady or wait till he gets back online and ask him :)
00:40 TimToady the complicated bit is that the sigspace attaches at a different place in the AST, if I recall
00:45 preflex_ joined #perl6
00:50 BenGoldberg So I was reading the irc log, and came across S32/Containers ...
00:50 BenGoldberg Specifically http://perlcabal.org/syn/S32/Containers.html#grab
00:51 BenGoldberg And I'm curious as to why only QuantHash has a .grab method, and not any other container
00:54 TimToady QuantHash is a role
00:54 TimToady r: say SetHash ~~ QuantHash
00:54 camelia rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«True␤»
00:55 TimToady r: say Set ~~ QuantHash
00:55 camelia rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«True␤»
00:55 TimToady hmm, that seems wrong
00:55 TimToady sets are immutable, so .grab makes no sense
00:56 TimToady 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.…»
00:56 camelia ..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…»
00:57 TimToady anyway, Set shouldn't do QuantHash in my book
00:57 TimToady (or Bag, or Mix)
00:58 TimToady so rakudobug on reporting Set ~~ QuantHash as true
00:59 TimToady on the compiling jvm, I've often run into the OOM that piers hit, but recompiling with the same command immediately generally works!
01:00 TimToady dunno why that happens, unless jvm is keeping some state around from run to run
01:00 TimToady (this is openjdk)
01:01 TimToady maybe it's jvm keeping process around after they've 'exited' somehow
01:04 pdcawley TimToady: Weird.
01:04 pdcawley Sooner I can get off JVM and onto Moar, the better, methinks.
01:15 xenoterracide joined #perl6
01:26 Entonian joined #perl6
01:28 skyheights joined #perl6
01:30 BenGoldberg Why isn't there an Array.grab method?
01:36 TimK1 left #perl6
01:36 xenoterracide joined #perl6
01:39 jnap joined #perl6
01:40 lue BenGoldberg: because Array.pick and Array.roll should do the job already :) .
01:47 xenoterracide joined #perl6
01:59 timotimo lue: except grab is supposed to remove the item at the same time as returning it, no?
02:09 aindilis joined #perl6
02:13 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
02:14 TimToady 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. :)
02:17 TimToady well, if you did implement Array.grab, you'd probably want it to do a splice, not a delete
02:18 lue I meant that as in method grab(<params>) { self.pick(<params>) }
02:20 colomon lue: Arrays are mutable.
02:20 lue oh?
02:20 lue r: say ++(Array.new(1,2,3)[1]);
02:20 TimToady mapping .grab to .pick is always wrong
02:20 camelia rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«3␤»
02:20 lue r: say (++Array.new(1,2,3)[1]).perl;
02:20 camelia rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«3␤»
02:21 TimToady pick is "without replacement", but the array itself is not modified
02:21 TimToady grab always modifies whatever you're grabbing from
02:21 TimToady it's not polite that way :)
02:22 * 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:23 lue s/numbers/elements/
02:27 * colomon just timed his ISO 10303-21 test suite, and it's 4x faster under jakudo.
02:28 colomon shaves 75% off the timing, I mean.
02:36 colomon also, having perl-j available for easy testing is really nice.
02:37 kaare_ joined #perl6
02:49 jnap joined #perl6
02:57 filly joined #perl6
03:19 segomos joined #perl6
03:23 diakopter forwarded something to p6-l
03:25 colomon p6-l?
03:26 colomon r: say (32 < * < 128)(1000)
03:26 camelia rakudo-parrot de5c8f, rakudo-jvm de5c8f: OUTPUT«True␤»
03:26 colomon rakudobug
03:27 timotimo known :(
03:28 colomon no need to call you-know-who, then.  timotimo++
03:29 * colomon mourns his beautiful code which …. no, I can do this.
03:29 colomon actually looks better this way.
03:41 atroxaper joined #perl6
03:46 xinming_ joined #perl6
03:51 diakopter p
03:51 diakopter colomon: perl6-language?
03:52 diakopter 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?"
03:54 diakopter heh oh
03:54 colomon I've come to associate it strongly with endless pointless chatter.  :)
03:56 diakopter take a look at what I sebt
03:56 diakopter sent
03:57 colomon diakopter++ # hopefully that's safe
03:58 diakopter what's safe?
03:58 colomon your message
03:58 colomon people won't start arguing about the color of the benchmarks, or something like that.
04:01 colomon bikeshedding, that's the term.
04:20 atroxaper joined #perl6
04:21 preflex_ joined #perl6
04:27 atroxaper joined #perl6
04:49 Entonian joined #perl6
05:01 adu joined #perl6
05:16 atroxaper joined #perl6
05:18 thou joined #perl6
05:20 itz joined #perl6
05:37 diakopter well, you could build it entirely out of paint.
05:37 diakopter or paint thinner it into nothing.
05:40 Entonian joined #perl6
06:08 rurban1 joined #perl6
06:12 rurban2 joined #perl6
06:15 SamuraiJack_ joined #perl6
06:19 rindolf joined #perl6
06:30 SamuraiJack joined #perl6
06:38 rurban1 joined #perl6
06:39 SamuraiJack joined #perl6
06:50 zakharyas joined #perl6
07:06 darutoko joined #perl6
07:08 [Coke] diakopter: wow, if that was on a weekend, I'd make the drive.
07:19 quester joined #perl6
07:38 dalek perl6-roast-data: 2d5a20e | coke++ | / (5 files):
07:38 dalek perl6-roast-data: today (automated commit)
07:38 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/2d5a20eaaf
07:45 FROGGS japhb: I am working on that: http://irclog.perlgeek.de/​perl6/2013-12-06#i_7967667
07:52 SamuraiJack_ joined #perl6
07:53 lizmat joined #perl6
07:57 adu_ joined #perl6
07:59 moritz m\orning
07:59 sqirrel joined #perl6
07:59 FROGGS morning mo/ritz
08:02 FROGGS 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 FROGGS lee_: same for you
08:10 FROGGS jnthn: rakudo-p's stage parse dropped from ~124s to ~117s # jnthn++
08:12 * moritz thought the optimizations where jvm only?
08:13 moritz oh, there's the "Optimize QAST node creation" commit in nqp
08:13 FROGGS yeah, must be that then...
08:14 FROGGS 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
08:15 FROGGS both are likely to save seconds
08:16 quester left #perl6
08:16 quester joined #perl6
08:24 Guest62135 help set
08:25 Guest62135 left #perl6
08:26 xenoterracide joined #perl6
08:30 FROGGS I have an idea about installing several modules that provide a binary that has the same name as the other modules
08:30 FROGGS when installing it a wrapper is created with that file name, that would execute the binary of the "best" module [more]
08:30 FROGGS like a "use Foo" would need/import the best module
08:31 FROGGS 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:36 quester_ joined #perl6
08:36 quester_ joined #perl6
08:36 FROGGS moritz: what is your opinion on that?
08:37 quester_ left #perl6
08:37 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:41 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 FROGGS so, panda-j would work then in theory
08:51 quester__ joined #perl6
08:51 quester__ joined #perl6
09:08 quester left #perl6
09:14 lizmat joined #perl6
09:22 lizmat FROGGS: isn't that the responsability of CompUnitRepo.candidates ?
09:23 PacoAir joined #perl6
09:23 lizmat and morning #perl6!
09:28 FROGGS joined #perl6
09:29 FROGGS lizmat: the wrapper would ask the CompUnitRepos for candidates, as for "use Foo", yes
09:31 lizmat so I'm not sure you would need a wrapper ?
09:31 FROGGS lizmat: I am talking about installed scripts
09:31 FROGGS how will that work without a wrapper?
09:32 FROGGS say you have installed version 1 of panda and version 2 of panda in home
09:33 FROGGS both provide a panda executable
09:33 lizmat that would be 2  CompUnitRepo objects, no?
09:33 FROGGS no
09:33 FROGGS home is a CompUnitRepo
09:33 lizmat one for the installed version, and one for home?
09:34 FROGGS err, I meant that both are installed in home
09:34 FROGGS so, when you execute `panda`, you should clearly execute the binary from version 2
09:35 FROGGS but what if you want to execute `panda` from version one?
09:35 FROGGS you are unable to do so
09:35 FROGGS (without a wrapper)
09:36 lizmat I'm unsure whether it should be possible at all to have this situation
09:37 FROGGS why?
09:37 lizmat assuming a CompUnitRepo maintains a database of sorts in the directory for which it is responsible
09:37 FROGGS yes
09:38 lizmat how would both panda 1 and panda 2 be installed in there without either two databases clashing
09:38 lizmat or the one database knowing about both of them
09:38 FROGGS you have a single bin folder per CompUnitRepo
09:38 lizmat perhaps
09:39 lizmat 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?
09:39 lizmat whether or not that uses a bin dir, is entirely up to the implementation of that CompUnitRepo
09:39 FROGGS you need a bin dir to execute scripts
09:39 FROGGS there is no other way
09:40 lizmat hmmm
09:40 lizmat so we're extending "use" and "need" now to qx() ?
09:40 FROGGS you need somewhere a folder that contains a thing called "panda" to run panda
09:40 FROGGS no
09:40 FROGGS it is about executing script from your shell
09:41 FROGGS you don't run panda from a use statement
09:41 FROGGS it is a command line tool
09:41 lizmat ok, I misunderstood your original statement
09:41 woolfy joined #perl6
09:41 FROGGS good
09:41 FROGGS :o)
09:41 lizmat .oO( must wake up first, get more tea )
09:41 FROGGS so the problem is:
09:42 FROGGS you type "panda" or "perl6-debug" into your shell, and press enter
09:42 FROGGS it looks up a binary in you PATH
09:42 FROGGS and then, this script is from a specific version of its distro
09:43 FROGGS it will usually do a "use" of a module of its distro
09:43 FROGGS which might even be the wrong one for that script version
09:43 lizmat hmmm... I guess this touches on the more general issues of non-source files associated with a distribution
09:44 FROGGS true, but binaries are a thing on its own
09:44 FROGGS locating files you might load from within your module is another problem
09:44 * FROGGS .oO( File::ShareDir )
09:49 FROGGS 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:50 lizmat TimToady: re http://irclog.perlgeek.de/​perl6/2013-12-07#i_7969313 : there is no QuantHash role implemented just yet
09:51 lizmat 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:54 Piers_ joined #perl6
09:55 cognominal joined #perl6
09:57 Rotwang joined #perl6
09:57 kivutar joined #perl6
10:12 * lizmat saved a conversation with jnthn of about 6 weeks ago
10:12 lizmat https://gist.github.com/lizmat/7839326/raw/e2921b​d409c86d62b5495fedf73d8e825e1cdc9a/gistfile1.txt
10:13 lizmat and is going to look at it while at the patch -p1
10:15 rindolf joined #perl6
10:17 FROGGS nice
10:18 rindolf Hi all.
10:18 rindolf FROGGS: hi.
10:18 FROGGS hi rindolf
10:18 rindolf FROGGS: there's a pull request for the SDL_manual.
10:19 FROGGS rindolf: PR applied, thanks for reporting :o)
10:20 rindolf FROGGS: OK.
10:20 rindolf FROGGS: you're welcome.
10:20 rindolf FROGGS: and thanks for applying it.
10:20 FROGGS sure
10:20 FROGGS :o)
10:24 araujo joined #perl6
10:29 sivoais joined #perl6
10:29 Timbus joined #perl6
10:34 jnthn morning o/
10:34 Piers_ joined #perl6
10:34 diakopter mawrnig
10:36 lizmat jnthn, diakopter: good *!
10:36 lizmat jnthn: re "At the moment, when we see a $!foo, we immediately ask the class, "do you know of a $!foo"?"
10:36 lizmat I'm having trouble locating where that is done
10:37 lizmat do you have a pointer  :-)
10:37 jnthn Well, it'll be some code-path from variable...
10:38 lizmat check_variable perhaps ?
10:40 szabgab joined #perl6
10:40 jnthn No
10:40 szabgab hi everyone,
10:40 FROGGS don't you see the location when you run that code with --ll-exception?
10:40 FROGGS szabgab: hi
10:40 szabgab I wonder if someone could give me a hand with a Grammar
10:41 FROGGS sure
10:41 jnthn lizmat: In make_variable_from_parts
10:41 szabgab https://github.com/szabgab/perl6-xml-sax
10:41 szabgab I have that stupid XML parser
10:41 jnthn lizmat: In the elsif $twigil eq '!' { ... } branch
10:41 szabgab it passed its test in february - the last time I checked
10:41 szabgab but now, with * 2013.11 it fails
10:42 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 ...
10:42 szabgab hi lizmat , long time not seen!
10:42 lizmat hi szabgab, see you at FOSDEM?  :-)
10:43 szabgab unlikely :(
10:43 lizmat well, you are responsible for woolfy and me having gone there for the past 4 years!
10:44 lizmat so you should come every now and then as well  :-)
10:46 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)
10:47 szabgab lizmat: I know, and I am really sorry
10:47 FROGGS szabgab: I'll check
10:47 szabgab FROGGS: thanks!
10:47 lizmat don't!  although exhausting, it's always been fun!
10:48 szabgab lizmat: I am really sorry I cant' come :(
10:48 lizmat ah, ok
10:48 lizmat :-)
10:48 lizmat we too  :-(
10:48 FROGGS perl6-xml-sax$ PERL6LIB=lib prove -e perl6 t
10:48 FROGGS t/xml.t .. 1/39 Left over string: '<chapter id="12" name="perl"  ></chapter>'
10:48 FROGGS szabgab: is that what you get?
10:48 szabgab yes
10:49 szabgab this is the first test case with attributes
10:49 szabgab so I think the problem in the grammar is somewhere matching attr
10:50 szabgab the grammar does not match that string
10:51 FROGGS szabgab: gimme a few minutes
10:51 rindolf szabgab: hi.
10:52 jnthn FROGGS: Mebbe sigspace changes...
10:52 szabgab hi rindolf
10:52 FROGGS that is possible
10:52 FROGGS https://github.com/szabgab/perl6-xml-sax​/blob/master/lib/XML/SAX/Grammar.pm#L13
10:53 FROGGS maybe that should be a rule?
10:54 jnthn Well, but does it rely on backtracking semantics?
10:54 jnthn But yeah, it's an issue 'cus
10:54 jnthn \< <element> <attr>* \/\> }
10:54 jnthn And then
10:54 jnthn rule  attr    { [<name>\=\"<value>\"] }
10:55 jnthn Will no longer match whitespace at the start
10:55 jnthn Alternatively, turning token element { \w+ } into a rule may be the quickest fix (to match whitespace after the element name)
10:55 jnthn Oh...but that may screw up the actions :)
10:56 FROGGS szabgab: I changed all regexes to "rule", and now it fails four tests only
10:58 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 szabgab and if those changes were intentional ?
10:58 FROGGS no too hard
10:59 szabgab the question if it is important to know
10:59 FROGGS after an hour or two of bisecting you should know
10:59 szabgab :)
10:59 FROGGS and I bet these changes where intentional :o)
10:59 raydiak :w
10:59 FROGGS szabgab: after dinner I'll have a fix
10:59 szabgab then it ok
10:59 raydiak erm
11:00 FROGGS err lunch
11:00 szabgab FROGGS: appreciate
11:00 szabgab but if there is working XML parser, I could use that too
11:01 FROGGS dunno, is there?
11:06 jnthn btw, from a performance perspective it's best to avoid regex in grammars....
11:07 diakopter heh.
11:10 szabgab I also tried to switch all the regexes to rules
11:10 szabgab it seems the test failures are now all    about   leaving out the spaces
11:11 szabgab from the text
11:11 szabgab Expected: ' before ' #   Received: 'before '
11:12 denis_boyun joined #perl6
11:15 lizmat jnthn: what is the significance of "$past.unshift(QAST::Var.new( :name('self'), :scope('lexical') ));" in "make_variable_from_parts" ?
11:15 lizmat is that creating self ?
11:15 lizmat so, if we have multiiple $!vars, we would get multiple "self"s?
11:18 jnthn lizmat: When you look up an attribute, you need two children.
11:18 jnthn The object to do the lookup against, and then the class the attribute lives in.
11:18 lizmat ah, ok
11:19 jnthn That unshift is doing the first of those.
11:19 jnthn A QAST::Var is only declaring anything if there's also a :decl(...) in it.
11:19 jnthn Otherwise it's just a lookup
11:19 lizmat gotcha
11:21 spider-mario joined #perl6
11:22 lizmat so how would I hang something off of $*PACKAGE ?
11:22 lizmat jnthn: because that's where I would to need to hang the hash of arrays of from, right ?
11:23 lizmat create another hash with $*PACKAGE as the key ?
11:23 jnthn No
11:24 jnthn Just declare a my %*ATTR_USAGES; or so in package_def, right where my $*PACKAGE is declared.
11:24 jnthn Then you'll automatically get the right behavior if one package is nested inside another.
11:25 lizmat gotcha
11:25 jnthn https://github.com/rakudo/rakudo/bl​ob/nom/src/Perl6/Grammar.nqp#L1896 is where I mean, just to be clear
11:25 jnthn Though the comment is full of it...should say type object, not meta-object :)
11:26 lizmat will fix
11:28 jnthn Hm, my apartment is darker than usual 'cus snow has covered the skylights :)
11:29 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:30 lizmat so that we can fix up the $past when we compose the class?
11:31 xinming joined #perl6
11:31 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 :)
11:31 jnthn And then just do .node if you need to look it up.
11:32 lizmat ah, gotcha again
11:35 szabgab joined #perl6
11:36 lizmat jnthn: https://github.com/rakudo/rakudo/bl​ob/nom/src/Perl6/Actions.nqp#L3689 contains a call to get_attribute_meta_object
11:36 lizmat but apparently it is not interested in the side effect
11:36 lizmat only to throw if it doesn't exist
11:37 lizmat this implies there is nothing to fix up
11:37 lizmat so, should I just remove the test?
11:37 jnthn lizmat: Well, it's *only* interested in the side-effect. :)
11:37 lizmat (as I intend to resolve *all* $!private at compose time)
11:38 lizmat jnthn: duh, must wake up some more
11:38 lizmat so, get_attribute_meta_object will never throw
11:38 jnthn Well, today it does throw
11:38 jnthn That's why it calls it.
11:39 lizmat package_def will throw later
11:39 jnthn It's for the method foo($!bar) { } case.
11:39 jnthn Right, but you need to make sure that happens.
11:39 szabgab FROGGS: thanks!
11:39 colomon jnthn++ # Stage parse      :  84.557
11:39 lizmat but there is no $past there to fix up?
11:40 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
11:40 jnthn So I'd just turn that line into a %*ATTR_USAGES{$name}.push(QAST::Var.new( :node($/) )) or so
11:41 jnthn (Won't be quite that simple as no auto-viv in NQP. Maybe factor that out into an add_attr_to_check sub...)
11:42 lizmat ok
11:45 FROGGS colomon: what backend is that?
11:46 tgt joined #perl6
11:46 colomon FROGGS: parrot
11:46 FROGGS wow, nice machine :o)
11:47 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? :)
11:47 colomon give me a mine...
11:47 colomon minuget
11:47 colomon minute
11:47 colomon two early
11:47 * jnthn hands colomon a mine and runs away
11:48 colomon silver or gold?
11:48 jnthn Oh, I thought you meant the explosive kind
11:48 jnthn My bad P
11:48 jnthn :P
11:49 colomon compiling now.
12:17 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
12:18 jnthn Where is the crate_code_object you're thinking about?
12:18 lizmat Actions, 1914
12:18 lizmat well, in my version, a few lines less in yours, I guess
12:19 jnthn lizmat: I think you may want to do it outside of that if/else
12:19 jnthn e.g. put it above the # Document
12:19 lizmat also for a role?
12:19 jnthn Sure, we need to check attribute declarations in roles too...
12:19 lizmat ah, duh
12:19 lizmat ok
12:20 jnthn That's why I'm suggesting putting out outside of the if/else
12:20 jnthn Note that both branches call compose.
12:21 lizmat ok
12:22 lizmat do we have .kv in nqp ?
12:23 jnthn No
12:23 jnthn Just do for %hash { ... }
12:23 jnthn And then you can do $_.key and $_.value
12:33 lizmat yeah, found that meme in the code  :-)
12:34 markov joined #perl6
12:39 lizmat jnthn: Stage start      :   0.000
12:39 lizmat Error while compiling op p6decontrv: No scope specified or locatable in the symbol table for '$!WHY'
12:40 lizmat jnthn: the diff so far: https://gist.github.com/lizmat/7840724
12:41 jnthn yeah, I can see what's up
12:42 jnthn You can't move as much as you have
12:42 jnthn These:
12:42 jnthn -                my $attr := get_attribute_meta_object($/, $past.name());
12:42 jnthn -                $past.returns($attr.type);
12:42 jnthn Are correctly moved, and should be.
12:42 jnthn But the other lines...
12:42 jnthn -                $past.scope('attribute');
12:42 jnthn -                $past.unshift(instantiated_type(['$?CLASS'], $/));
12:43 lizmat need to be at the original location
12:43 jnthn -                $past.unshift(QAST::Var.new( :name('self'), :scope('lexical') ));
12:43 lizmat ok, gotcha
12:43 jnthn Noeed to stay put.
12:43 jnthn Otherwise role compilation likely explodes.
12:55 tipdbmp joined #perl6
12:55 lizmat hmmm... seems I can't build rakudo now because it dies on the delayed get_attribute_meta_object
13:14 denisboyun joined #perl6
13:17 lizmat found thinko
13:21 FROGGS uhh
13:21 FROGGS jnthn++ # blog post!
13:29 lizmat ah, yes, jnthn++ (was too focused on my patching)
13:29 lizmat good to read http://6guts.wordpress.com/20​13/12/07/a-few-quick-updates/
13:29 clkao_ joined #perl6
13:30 lizmat Cannot assign to a non-container
13:30 lizmat current instr.: 'BUILD' pc 42 ((file unknown):-2113359804) (gen/parrot/CORE.setting:10024)
13:31 lizmat jnthn: I think I need to add the (original) $*PACKAGE to get_attribute_meta_object
13:32 lizmat because it's now running at another time, so it may be wrong?
13:36 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 jnthn So I don't think that's your problem.
13:36 lizmat hmmm....... still, it seems to die on the first private attribute it encounters in the setting
13:37 lizmat ah!
13:37 lizmat has num $.re;
13:37 lizmat $!re = re;
13:37 lizmat so the attribute is defined as public
13:37 lizmat but referenced as private
13:37 lizmat could that be the problem?
13:38 jnthn Well, that's perfectly allowed, since has num $.re means "declare has num $!re, then ccreate an accessor"
13:39 jnthn Oh...hmm
13:39 jnthn This could be a nasty problem.
13:39 lizmat https://gist.github.com/lizmat/7841431
13:39 lizmat is my diff so far
13:40 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 jnthn Whih, of course, isn't set yet...
13:40 jnthn *which
13:40 lizmat ah, yuck, so we go down deeper into the rabbit hole
13:41 jnthn +                add_attr_to_check($/, $_<variable_name>, QAST::Var.new);
13:41 jnthn That wants a :node passed to new so we can report the error properly, I think...
13:42 lizmat the node is added inside the sub
13:42 jnthn oh, so it is..
13:42 jnthn Well, yes, yuck.
13:42 jnthn We'll have to solve the deeper issue here at some point I guess.
13:43 jnthn For now there's a cheat that'll get us most of the way.
13:43 jnthn 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.
13:44 lizmat well, that would build the setting
13:44 lizmat but would not fix the problem I'm trying to fix, afaik
13:44 jnthn That way, everything that works today works the same, and it's only those from roles that get this new handling.
13:44 jnthn Well, it'd fix it for talking about attributes from roles unless those attributes are natively typed...
13:45 jnthn Which most attributes aren't.
13:45 lizmat ah, ok
13:45 lizmat ok, will change it like that
13:45 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:52 darutoko joined #perl6
13:53 woolfy jnthn++  http://6guts.wordpress.com/20​13/12/07/a-few-quick-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 jnap joined #perl6
14:00 woolfy jnthn: nice blog (& I found no more typos)
14:06 lizmat $ perl6-p --ll-exception -e 'role A { has $!a }; class B does A { method b { say $!a } }'
14:06 lizmat yeah!
14:12 lizmat ok, so you will not be able to have a native private attribute in a role be visible in the class
14:14 moritz it seems the Dancer adevent calendar is stuck at day 2
14:14 SamuraiJack_ joined #perl6
14:15 jnthn woolfy: Fixed; thanks!
14:15 jnthn lizmat: yay!
14:15 jnthn lizmat: yeah, we'll have to fix the native private attr thing up later, but that's a trickier fix
14:16 lizmat which I will gladly leave to you
14:16 lizmat anyway, I learned a lot today  :-)
14:17 jnthn :-)
14:17 jnthn *and* got us an important improvement.
14:18 atroxaper joined #perl6
14:18 woolfy Christmas gets closer!
14:23 hummeleB1 joined #perl6
14:23 kaare__ joined #perl6
14:30 tgt joined #perl6
14:35 kivutar joined #perl6
14:44 dalek rakudo/nom: 56ee1a5 | (Elizabeth Mattijsen)++ | src/Perl6/ (2 files):
14:44 dalek rakudo/nom: Private role attributes are now visible in class
14:44 dalek rakudo/nom:
14:44 dalek rakudo/nom: Thanks to extensive support by jnthn++.  Unfortunately, getting this to work
14:44 dalek rakudo/nom: for private *native* role attributes, proved to be needing to go deeper into
14:44 dalek rakudo/nom: the rabbit hole.  Which will be for another day.
14:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/56ee1a5889
14:47 xinming_ joined #perl6
14:49 dalek joined #perl6
14:52 dalek joined #perl6
14:52 Juerd joined #perl6
14:53 Util joined #perl6
14:54 dalek joined #perl6
14:54 PerlJam joined #perl6
14:58 masak joined #perl6
15:00 Juerd joined #perl6
15:04 sergot joined #perl6
15:08 telex joined #perl6
15:10 lizmat hmmm...  seems dalek quit?
15:10 lizmat anyway, I added tests for role attribute visibility
15:11 jnthn lizmat++
15:13 rurban1 joined #perl6
15:13 sergot joined #perl6
15:15 dalek joined #perl6
15:17 masak joined #perl6
15:24 hugme joined #perl6
15:33 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:35 dalek joined #perl6
15:35 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
15:36 nwc10 2 billion negative synthetics, and each takes at least 4 bytes of input to define
15:36 nwc10 (I think.)
15:36 Juerd joined #perl6
15:37 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: https://github.com/rakudo/rakudo/commit/84e430f241
15:37 diakopter er
15:37 nwc10 I thought we had 2147483648 negative synthetics to play with
15:38 jnthn nwc10: It eliminates a check that will always come out as "true"
15:38 nwc10 jnthn: aha
15:38 jnthn nwc10: So yes, better code.
15:38 diakopter bye bye feather?
15:39 d4l3k_ joined #perl6
15:39 diakopter nwc10: well yes a huge input. but it would also require at least that much memory on the system
15:39 masak joined #perl6
15:39 diakopter which is too much
15:39 Util joined #perl6
15:40 PerlJam joined #perl6
15:41 dalek joined #perl6
15:43 dalek joined #perl6
15:45 sergot joined #perl6
15:45 synopsebot joined #perl6
15:48 Juerd joined #perl6
15:48 dalek joined #perl6
15:51 sergot joined #perl6
15:51 masak joined #perl6
15:53 dalek joined #perl6
15:56 jeffreykegler joined #perl6
15:57 masak good UGT, #perl6
15:57 Woodi o/
15:57 diakopter slutations
15:57 diakopter salutations
15:58 diakopter o/
15:59 Psyche^ joined #perl6
15:59 lizmat masak!
16:00 Woodi so what is CompUnitRepo ?
16:01 FROGGS Woodi: it is a repository of installed modules
16:02 FROGGS Woodi: and a piece of code that tells you which candidates are installed for a given use-statement for example
16:02 lizmat actually, a CompUnitRepo could represent remotely installed modules as well
16:02 FROGGS true
16:03 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
16:04 lizmat but any developer is free to develop another implementation and sitck it in @INC
16:04 Woodi looking...
16:04 FROGGS the compiler should already have some sort of CompUnitRepo built in, but it is intended that one can odd custom ones
16:05 FROGGS panda should just talk to the CompUnitRepo
16:06 lizmat jnthn: it appears that my private role attribute visibility fix does not work in settings :-(
16:06 hugme joined #perl6
16:07 jnthn lizmat: There's no reason why it shouldn't...
16:07 masak diakopter: slutations to you too :P
16:08 atroxaper joined #perl6
16:08 SamuraiJack_ joined #perl6
16:08 markov joined #perl6
16:08 sivoais joined #perl6
16:08 cognominal joined #perl6
16:08 woolfy joined #perl6
16:08 awwaiid_ joined #perl6
16:08 labster joined #perl6
16:08 kst joined #perl6
16:08 segomos joined #perl6
16:08 [particle] joined #perl6
16:08 sjn joined #perl6
16:08 ribasushi joined #perl6
16:08 Exodist joined #perl6
16:15 Woodi 404s in S11 for links to CompUnitRepo::Local::...
16:20 Woodi 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:21 FROGGS huh?
16:22 Woodi TGT maybe ? :) but nvm...
16:23 Woodi how compunitrepo looks in @INC ? path name ?
16:24 lizmat CompUnitRepo objects should be in @INC, it's not implemented like that yet
16:24 Woodi object ?
16:25 Woodi ok, got it
16:26 FROGGS p: class A::B { }; sub foo(A::B $bar) { }
16:26 camelia rakudo-parrot 56ee1a: ( no output )
16:31 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:â�¤------> [32mclass A::B { }; sub foo(A::B [33mâ��[31m$bar) { }[0mâ�¤ok 00:02 126mâ�¤Â»
16:31 FROGGS p: class Panda::Project { }; class Panda::Ecosystem { method add-project(Panda::Project $p) { } }
16:32 camelia rakudo-parrot 56ee1a: ( no output )
16:32 FROGGS this blows up in panda and I don't know why
16:34 lizmat how?
16:35 FROGGS ===SORRY!=== Error while compiling /home/froggs/dev/panda/lib/Panda/Ecosystem.pm
16:35 FROGGS Invalid typename 'Panda::Project' in parameter declaration.
16:35 moritz did you use Panda::Project?
16:36 FROGGS moritz: yes
16:37 FROGGS p: class Panda::Ecosystem { method add-project(Panda::Project $p) { } }
16:37 camelia rakudo-parrot 56ee1a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/k2b18w192W�Invalid typename 'Panda::Project' in parameter declaration.�at /tmp/k2b18w192W:1�------> [32mstem { method add-project(Panda::Project[33m�[31m $p) { } }[0m�»
16:37 FROGGS okay, at least it would fail that way
16:38 FROGGS hmmm, then it must be something with my CompUnitRepo stuff
16:42 c1sung joined #perl6
16:46 moritz star: use Panda::Project; class Panda::Ecosystem { method add-project(Panda::Project $p) { } }
16:46 camelia star 2013-09: ( no output )
16:46 moritz huh, works here..
16:46 moritz FROGGS: maybe leave out the type constraint as a workaround
16:46 Piers_ joined #perl6
16:53 tadzik joined #perl6
16:55 lizmat *sigh*
16:55 lizmat https://gist.github.com/lizmat/7845244
16:55 lizmat trying to make a proper QuantHash role with %!elems private role attribute
16:56 lizmat but apparently, it can not be found: package-kind: %!elems
16:57 jnthn lizmat: Oh, but there you're referring to the attribute of one role inside another...
16:57 pmurias joined #perl6
16:57 lizmat similar situation outside of settings seems to work
16:57 jnthn lizmat: But since composition is flattening...
16:57 lizmat I have a test for that, and that works
16:57 jnthn Really?
16:57 pmurias the use of STM for concurency in Perl6 was abandoned?
16:57 lizmat let me double check
16:57 lizmat pmurias: not as far as I'm concerned, but from the spec at the moment: yes
16:57 masak pmurias: I think TimToady expressed it as not being as firmly believed in as it used to.
16:58 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 }
16:58 lizmat role BB does AA {}
16:58 lizmat class Baz does BB { method baz { $!aa++ } }
16:58 lizmat my $baz = Baz.new;
16:58 lizmat works in test
16:59 pmurias it might be best to leave it to modules
16:59 jnthn lizmat: But that's not your scenario.
16:59 jnthn lizmat: Move the method baz into role BB
16:59 lizmat no?  am I missing something ?
17:00 jnthn I think that's what you have?
17:01 jnthn my role Setty does QuantHash {
17:01 jnthn -    has %!elems; # key.WHICH => key
17:01 jnthn
17:01 jnthn method BUILD (:%!elems) {}
17:01 lizmat hmmm... so why would a role not see a private attribute in another role it does ?
17:01 FROGGS maybe the role that has the method would need some sort of "has $!aa = ..." ?
17:02 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
17:02 FROGGS this scenario here seems related
17:03 jnthn Not so sure it's related...
17:03 lizmat jnthn: that feels like an implementation restriction, rather than a language feature
17:03 jnthn I can see why we have it. I agree its inconvenient...
17:04 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 lizmat just like the class will at the end
17:05 lizmat is that a strange thought?
17:05 jnthn What happens at each of those composition times is fundementally different, is all.
17:05 jnthn In the class composition, we actually concretize all the roles.
17:06 jnthn We need the target class to do so.
17:06 lizmat not disagreeing with that
17:06 lizmat but this feels like a big drawback on code reuse to me
17:06 jnthn Here's the gory bit
17:07 V_S_C joined #perl6
17:08 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:10 lizmat ok, am too tired now to think this through
17:10 lizmat and patch -p1 is about to fold for today
17:11 lizmat so I'll see if I can wrap my head around it tomorrow
17:12 jnthn OK. I don't know an answer, I'm afraid. :(
17:12 * jnthn will ponder it too
17:13 lizmat maybe TimToady / masak / moritz would like to chime in
17:13 lizmat :-)
17:14 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 jnthn Class comp, that is...
17:14 jnthn Will be "fun" go make error reporting not suck
17:14 jnthn *to
17:15 * TimToady is running a quiz meet today, so won't have much brane
17:16 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:23 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
17:24 Woodi and two roles can use the same attr: class User does Admin does Gamer {...
17:24 Woodi eg. password
17:25 FROGGS sure
17:25 FROGGS would be weird to do it in another way
17:29 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:30 FROGGS well, the user is responsible to choose roles that play well together
17:30 FROGGS and yes, roles an do other roles
17:32 Woodi but what was orginal, lizmat++ problem  ? :)
17:33 woolfy left #perl6
17:35 jnap joined #perl6
17:36 SamuraiJack_ joined #perl6
17:48 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 japhb Known issue?
17:48 japhb (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:48 japhb )
17:49 denis_boyun joined #perl6
17:52 raydiak http://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
17:53 moritz japhb: or there's a dangling symlink involved, or something
17:55 moritz raydiak: say $vec.length; # 1
17:55 moritz raydiak: shouldn't that be $vec.magnitude?
17:55 japhb moritz: The only symlinks in that tree are the top level (rakudo-jvm -> rakudo-jvm-de5c8f874e6ec2f​560a4538fee00661e529098f4) and libparrot.so in the parrot version of the tree
17:56 raydiak moritz: oh yeah, I renamed it...thanks :)
17:57 moritz raydiak: also minor point, the other posts so far used 4 spaces for indentation
17:57 raydiak moritz: good to know, will fix
17:57 moritz raydiak: as for the methods x, y, z: you already made them 'is rw', so there's no need for the optional argument
17:58 moritz you can simply use them as  $vec.x = 42
17:58 moritz r: sub f($x) { say VAR($x).defined }; f 42;
17:58 raydiak moritz: but the default autogen accessors support passing the value as a param as well, don't they?
17:58 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«True␤»
17:59 moritz raydiak: no
17:59 moritz r: sub f($x?) { say VAR($x).defined }; f
17:59 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«False␤»
17:59 raydiak moritz: hoory!  I hated how it made them look when I added that param garbage
17:59 moritz r: sub f($x?) { say VAR($x).defined }; f Any
17:59 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«False␤»
18:00 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:01 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
18:02 moritz p: sub f($x?) { say VAR($x).defined }; f Any
18:02 camelia rakudo-parrot 56ee1a: OUTPUT«False␤»
18:02 moritz raydiak: ^^ doesn't look like it
18:02 moritz raydiak: otherwise very nice post. Thank you!
18:03 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 #perl6
18:14 japhb AAAUUUGGGHHH  I found it.  PEBCAK, where the P happened a month ago.  Gah.
18:16 raydiak japhb: where was it?
18:20 hummeleBop1 joined #perl6
18:22 raiph joined #perl6
18:22 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 japhb The bash builtin `type` is, btw, your friend in these cases.
18:24 raydiak ah ha...tricky
18:24 moritz ok, the dangling thing wasn't a symlink, but an alias :-)
18:28 * raydiak tends to prefer single-line scripts in ~/bin over alias definitions
18:30 * moritz tends to prefer $PATH changes over aliases and single-line scripts in ~/bin
18:33 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:35 raydiak we should collaborate on a project based around writing an alias to a script in ~/bin which modifies $PATH :)
18:36 jnap joined #perl6
18:36 ajr joined #perl6
18:36 japhb yipes.
18:36 japhb Oh, raydiak, did you release your source?  I see you were discussing your post with moritz ....
18:40 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:42 raydiak I am hoping to have another advent post this month for the Pray release, though, if that's the one you mean
18:45 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:46 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?
18:47 japhb You can already build the classes with native num attributes IIRC.
18:48 japhb 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
18:48 japhb japhb: Oh?  Did it get renamed or somesuch?
18:48 FROGGS japhb: my bad, it should work
18:48 japhb :-)
18:49 FROGGS maybe perl6-j does not search for echo in /bin?
18:49 Mouq joined #perl6
18:49 FROGGS does that work? run(< /bin/echo foo >)
18:49 japhb Hmmm, plausible.  In fact, perhaps it doesn't search the path at all?
18:49 * japhb checks
18:49 raydiak iirc, when I last tried, native nums couldn't be assigned to or operated on or coerced to, or something along those lines...
18:49 FROGGS japhb: that can well be
18:49 japhb Hmmm, nope /bin/echo doesn't work either
18:49 FROGGS run() should fake the searching in path that shell does...
18:50 FROGGS hmmm
18:52 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'␤»
18:52 japhb Ah, I see the problem
18:53 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;
18:53 FROGGS japhb: I have no idea why run(< /bin/echo foo >) fails :/
18:53 camelia rakudo-parrot 56ee1a: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'Vec3d' is not declared. Did you mean 'Vec3D'?�at /tmp/3BlTY8skhq:1�------> [32mx; has num $.y; has num $.z; }; my Vec3d[33m�[31m $v .= new(:x(0e0), :y(1e0), :x(2e0)); s[0m�Malformed my�at /tmp/3BlTY8sk…»
18:53 camelia ..rakudo-jvm 56ee1a: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'Vec3d' is not declared. Did you mean 'Vec3D'?�at /tmp/C57Za9JAyV:1�------> [32mx; has num $.y; has num $.z; }; my Vec3d[33m�[31m $v .= new(:x(0e0), :y(1e0), :x(2e0)); s[0m�Malformed my�at /tmp/C57Za9JAyV:…»
18:53 japhb FROGGS: Dang it.  :-(
18:53 raydiak r: say int(1).perl
18:53 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…»
18:53 camelia ..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…»
18:53 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;
18:53 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/…»
18:53 camelia ..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…»
18:54 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…»
18:54 japhb Yup, that's a killer all right.
18:54 raydiak I suspect this sort of thing will become higher-priority as native call for jvm comes online
18:56 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
18:57 moritz you'd have to write separate setters
18:58 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
18:58 moritz and rw-ness works through containers
18:59 moritz so you'd basically have to invent a separate calling convention, where a pointer to the native is passed instead
18:59 moritz and then try to know at compile time whether that's the case, and guard at runtime for cases where you can't know
19:01 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
19:01 jnthn And then rely on inlining to optimize that cost away.
19:02 jnthn In the common case, anyways.
19:02 japhb nodnod
19:10 timotimo jnthn: do you think it makes sense to rewrite some cases of junctions into QAST-constructed for-loops?
19:10 timotimo like $n %% any(@primes), for example
19:18 jnthn timotimo: No
19:21 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 raydiak days that gets a little sticky
19:21 raydiak wow, that didn't look so long when I could only see one line at a time :)
19:23 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?
19:25 jnthn timotimo: Yeah, I didn't see that pattern show up so much in real code.
19:25 jnthn With the optimizer, we have to remember that it takes time to run.
19:25 timotimo http://sd.jtimothyking.com/2013/0​9/17/how-fast-or-slow-is-perl-6/ - search for %%-any here :P
19:25 jnthn So if we make it do more work, we need to be fairly confident it will pay off
19:25 timotimo but yeah.
19:26 timotimo i *think* we already have analysis that goes there partially
19:26 timotimo 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"
19:27 timotimo that either means that doing that loop transformation is not much more costly, or that the existing analysis is too costly as well :)
19:32 Piers_ joined #perl6
19:36 jnap joined #perl6
19:47 nebuchadnezzar joined #perl6
19:53 sqirrel joined #perl6
20:01 thou joined #perl6
20:19 sqirrel_ joined #perl6
20:20 Piers_ joined #perl6
20:24 benabik joined #perl6
20:30 timotimo not convinced, jnthn?
20:32 jnthn timotimo: I think we need to look deeper into why junction auto-threading is so slow.
20:34 timotimo but that's hard :)
20:36 sqirrel joined #perl6
20:37 jnap joined #perl6
20:39 colomon joined #perl6
20:42 rurban2 joined #perl6
20:42 sqirrel_ joined #perl6
20:43 colomon jnthn: answering your question from this morning very late, JVM time: Stage parse      :  48.800
20:45 timotimo is munch not specced?
20:46 timotimo 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␤␤»
20:47 FROGGS here is how my CompUnitRepo explodes: https://gist.github.com/FR​OGGS/392471225039d60749d7
20:50 TimToady raydiak: subscripts are no longer methods
20:51 TimToady your article thinks they're inheritable, and they aren't
20:51 TimToady (they turned out to be too hard to optimize that way)
20:52 raiph joined #perl6
20:52 raydiak TimToady: what would be more accurate to say there?  or should I just remove the offending statement entirely?
20:52 raydiak and why does my class support subscripts? where *do* they come from?
20:53 TimToady how old is your rakudo?
20:53 raydiak hrm
20:53 raydiak well, I can't know that for my readers
20:54 TimToady I think I'd just remove that statement, since operators aren't inheritable in that sense either
20:54 TimToady operators are all lexically scoped, since they define the language
20:54 TimToady some operators will delegate to the object's method underlyingly though
20:55 raydiak ah, I see...I had it backwards and inside-out
20:56 raydiak 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
20:56 TimToady they come from the setting
20:56 TimToady as do all other operators
20:57 raydiak got it...I think
20:57 timotimo TimToady: there's no mention of "munch" in the specs, is it deliberately unspecced?
20:57 timotimo (also, i don't think i really understand what it's supposed to do)
20:58 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)␤»
20:58 raydiak ^ no Foo at all
20:58 TimToady well, we're waiting for pmichaud++ to finish respeccing that, but he's been busy with his kids, and rightfully so
20:58 timotimo ah, right
20:59 sqirrel joined #perl6
20:59 TimToady hmm
20:59 raydiak it's working like it says in the article, the part that shows what not to do
21:00 TimToady r: class Foo is Array {}; say Foo.new(1,2,3).WHAT;
21:00 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«(Foo)␤»
21:00 raydiak create an array, then assigns the list of values entirely ignroing the class on the right
21:00 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␤»
21:01 TimToady hmm, I guess it flattens anyway
21:01 timotimo yeah, the .perl method just writes "Array.new" regardless wether or not it's actually an array
21:01 * timotimo whips up a quick fix patch
21:01 Mouq colomon: what was it you were asking about parsing grammars?
21:01 timotimo oh, what is this
21:01 TimToady yes, it's just interpolating the Foo into the list flat, which is okay, I guess
21:02 raydiak b/c it does Positional?
21:02 timotimo someone else needs to look at this :\
21:04 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:05 kivutar joined #perl6
21:05 * 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
21:06 TimToady that would be an array of Vectors
21:06 TimToady you want my @vec is Vector = 1,2,3 for the other thing
21:06 dwarring joined #perl6
21:06 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
21:07 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 #perl6
21:08 Fatalnix hey guys
21:08 diakopter howdy
21:08 Mouq *':i '
21:08 colomon Mouq: yes, I more or less understand that.  I'm wondering how Niecza implemented the old method of doing it.
21:08 Mouq Oh.
21:09 benabik_ joined #perl6
21:10 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
21:10 Fatalnix never compiled last time heh
21:11 Fatalnix is there a document on the features Parrot vs JVM differ?
21:11 Fatalnix for rakdo
21:11 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
21:11 Fatalnix rakudo*
21:11 zakalwe_ joined #perl6
21:11 zakalwe_ joined #perl6
21:12 ggoebel112 joined #perl6
21:12 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 #perl6
21:13 Mouq r: say 'AbCd' ~~ /:i abcd/
21:13 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«「AbCd」␤␤»
21:13 Mouq r: say 'AbCd' ~~ /:i(True) abcd/ # :(
21:13 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«Nil␤»
21:14 Mouq r: say 'AbCd' ~~ /:i(1) abcd/ # ?
21:14 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«「AbCd」␤␤»
21:14 Mouq Ahhh, compile time value
21:14 jnthn Fatalnix: Not really; the big difference is Rakudo on JVM has support for concurrency stuff. Differences besides that are minor.
21:15 Fatalnix ah
21:15 Fatalnix is there a way do you know to do annotations on the JVM? Like Java's annotations
21:15 Fatalnix I wanna try and see if I can get Forge for Minecraft to just load a Perl6 program and say something
21:15 Fatalnix as a proof of concept
21:16 Fatalnix Forge requires annotations to setup the mod. though I can always make a Java main class if I had to.
21:17 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:18 Fatalnix oh really? I figured that the JVM took care of most of the bumps
21:20 dwarring I've written a demo grammar to parse and rank poker hands - https://gist.github.com/dwarring/7848868
21:22 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«TrueTrue␤True(Any)␤»
21:22 FROGGS dwarring: nice!
21:22 lue Or is that supposed to be understood by Perl 6 as an adverb applied to an adverb? :)
21:22 jnthn lue: Work like the first, but multi-colon thingies are NYI
21:23 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.
21:23 * Mouq &
21:24 dwarring i wrote a prolog version quite a few years ago
21:24 Fatalnix lol prolog
21:24 Fatalnix the almost useless Erlang
21:24 Fatalnix :D
21:25 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?
21:26 jnthn dwarring: Nice
21:26 Fatalnix I almost said Mhz lol
21:26 Fatalnix oh, looks like its done already
21:28 dwarring could write it up for advent
21:28 * dwarring but not for tomorrow
21:29 jnthn dwarring: I think there's some open days a bit further ahead
21:30 dwarring i'll start on a write up
21:31 Fatalnix all tests pass!
21:33 raiph joined #perl6
21:36 Fatalnix ls
21:36 Fatalnix oops
21:36 moritz no such file or directory :-)
21:36 Fatalnix haha
21:37 Fatalnix trying to find out if there is a way to compile the perl6 code into a .class
21:38 jnap joined #perl6
21:38 benabik joined #perl6
21:39 jnthn Fatalnix: perl6-j --target=classfile --classname=Foo --output=Foo.class something.p6
21:39 jnthn or .pm
21:39 Fatalnix ohhh
21:39 Fatalnix hmm
21:39 Fatalnix no wonder I couldnt find perl6
21:39 Fatalnix :D
21:39 Fatalnix its perl6-j
21:40 Fatalnix lets see if this works
21:41 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
21:41 raydiak ^^ same for anyone else with suggestions :)
21:42 FROGGS raydiak++ # very nice post btw
21:44 raydiak thanks! glad you like it
21:51 Rotwang joined #perl6
21:53 woolfy joined #perl6
21:54 lizmat joined #perl6
21:58 thou joined #perl6
22:04 colomon joined #perl6
22:04 rurban1 joined #perl6
22:13 raydiak timotimo: sorry, I missed what you were telling me about .perl earlier, just got it reviewing the log
22:13 raydiak r: class Foo is Array {}; my @foo := Foo.new; say @foo.perl;
22:13 camelia rakudo-parrot 56ee1a, rakudo-jvm 56ee1a: OUTPUT«Foo.new()␤»
22:13 raydiak timotimo: ^
22:17 telex joined #perl6
22:18 timotimo k
22:18 FROGGS joined #perl6
22:19 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: https://gist.github.com/lue/7761244
22:37 pmurias joined #perl6
22:38 FROGGS joined #perl6
22:39 jnap joined #perl6
22:44 rurban1 joined #perl6
22:48 cognominal joined #perl6
23:06 FROGGS joined #perl6
23:12 xenoterracide joined #perl6
23:16 pmurias joined #perl6
23:18 thou joined #perl6
23:19 jnap joined #perl6
23:21 Mouq joined #perl6
23:23 FROGGS joined #perl6
23:31 woolfy left #perl6
23:33 jnthn sleep &
23:57 FROGGS joined #perl6

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

Perl 6 | Reference Documentation | Rakudo