Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-08-06

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:02 xenoterracide joined #perl6
00:12 ventica joined #perl6
00:15 BenGoldberg joined #perl6
00:37 aoseki joined #perl6
00:40 kuroseki joined #perl6
00:43 akaseki joined #perl6
00:44 aoseki joined #perl6
00:46 kuroseki joined #perl6
00:53 hoelzro is there a way to create a native array of ints? for optimization reasons, I mean
00:53 hoelzro I figured my int @matrix?
00:55 [Coke] I don't think we have a REPR that will give you what you want.
00:55 hoelzro oh, but that probably means that @matrix[0] and friends *won't* be containerized..
00:56 [Coke] m: my int @matrix;
00:56 camelia rakudo-moar 574266: ( no output )
00:56 [Coke] m: my int @matrix; @matrix.push(1); say @matrix.perl;
00:56 camelia rakudo-moar 574266: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in block  at /tmp/4cywFob37A:1␤␤»
00:57 [Coke] m: my int @matrix; @matrix[0] = 1; say @matrix.perl;
00:57 camelia rakudo-moar 574266: OUTPUT«Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1765␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2457␤  in block  at /tmp/zEzlEB7hs4:1␤␤»
00:59 thou joined #perl6
01:00 raiph joined #perl6
01:01 timotimo hoelzro: you can use nqp::list_i() which will probably only react to nqp::push/shift/pop/unshift/atpos/bindpos
01:01 hoelzro =/
01:02 hoelzro I'm not that gung ho about optimization =)
01:03 japhb Who's working on the #= and #| stuff?  Is that you, hoelzro?
01:03 hoelzro japhb: that's me!
01:04 hoelzro have you feedback or questions?
01:05 japhb Just wondering state, and when it merges back to nom (assuming it hasn't already)?  I've got an idea for a fun-for-me project that I want to try going whole hog on the WHY comments with.
01:05 hoelzro japhb: well, I'm pleased to tell you that it's passing all of its current tests as of this morning =)
01:06 hoelzro I would like more testing on it, though
01:06 hoelzro I've been using it for my subcommander module, and so far so good!
01:06 klapperl joined #perl6
01:06 hoelzro I'm hoping to get it into nom before Rakudo 2014.08
01:07 japhb Oh, cool.
01:08 japhb What is your subcommander module?
01:08 hoelzro oh, it's a module that should make writing CLI apps much easier
01:08 japhb Ah, OK
01:08 japhb That I'd like to see too.  :-)
01:08 * hoelzro drums up an example
01:13 hoelzro japhb: https://gist.github.com/ho​elzro/b7bdbc125849e4aff3a2
01:14 hoelzro hmm...that language option should probably tell you the default
01:15 hoelzro if you want to play with it, it's at https://github.com/hoelzro/Subcommander
01:23 [Coke] ~>~.
01:25 dayangkun joined #perl6
01:26 japhb hoelzro: Thanks, I'll look at that on the bus ride.  :-)
01:35 klapperl_ joined #perl6
01:37 thou joined #perl6
01:38 FROGGS__ joined #perl6
01:38 japhb hoelzro: Looking at that example, it feels a little P5-ish.  Like what we really want there is a module to be able to override the command line parser (no hook defined in the spec, IIRC) and the usage generator (USAGE hook defined, but NYI in MAIN_HELPER)
01:39 japhb And then continue using multi MAIN, but with improved parsing and help system
01:39 hoelzro I thought about that, but I ended up doing this
01:39 hoelzro I'm sure why, ultimately =/
01:39 hoelzro probably because I wanted the application to be a class itself
01:40 hoelzro oh, and I wanted "app options"
01:40 nbrown___ joined #perl6
01:40 hoelzro which are options that are present for any command
01:40 hoelzro I think I had other reasons, but I started more than a month ago
01:42 hoelzro I know I was originally going to write my application with MAIN, but decided against it
01:45 timotimo tadzik: did you see the issue on panda ezra1 made?
01:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:56 * [Coke] points timotimo @ https://github.com/coke/poker
02:03 ventica joined #perl6
02:10 noganex_ joined #perl6
02:17 lustlife joined #perl6
02:19 chenryn joined #perl6
02:48 akaseki joined #perl6
02:56 adu joined #perl6
03:04 egrep Hrm... seems I get an error when trying to build moarvm on OS X Yosemite...
03:11 cognome joined #perl6
03:18 egrep I still don't understand one thing... how does it all link together? And by it, I mean: rakudo, moarvm, nqp... how are they all tied together?
03:22 chenryn joined #perl6
03:26 lustlife joined #perl6
03:34 egrep Okay... so what's the relationship between rakudo and nqp?
03:34 rurban joined #perl6
03:35 mosasiru joined #perl6
03:38 hoelzro NQP is a subset of Perl 6
03:38 hoelzro it's lower level
03:38 egrep Okay, got that...
03:38 egrep So... how is it used?
03:38 hoelzro typically NQP constructs map more closely to the underlying VM instructions
03:38 mosasiru left #perl6
03:38 hoelzro well, Rakudo is written in a combination of Perl 6 and NQP
03:39 egrep And how does that tie in to the VM...
03:40 hoelzro well, let's say you have the open function
03:40 hoelzro the bootstrapped Perl 6 environment doesn't know how to open files
03:40 hoelzro so it asks the VM (via nqp::open, iirc) to carry out the instruction
03:40 hoelzro it's a little confusing =/
03:41 egrep And the bootstrapped perl6 environment is... ?
03:41 hoelzro I think that working with rakudo clears it up
03:41 hoelzro anything under src/core
03:41 * egrep shrugs.
03:41 hoelzro I'm probably doing a poor job explaining...I only just recently really started working on rakudo
03:41 egrep Heh, it's okay. I'm relatively new to perl in general, let alone perl6... so... yeah.
03:42 hoelzro well, welcome =)
03:42 egrep Thanks.
03:42 hoelzro I find the relationships between all of the different pieces can be daunting for new users
03:42 hoelzro it certainly was for me!
03:42 egrep Heh.
03:43 egrep Technically... couldn't this just work like so: VM->NQP->Perl6 ?
03:44 egrep And technically you could do without the NQP.
03:44 egrep But with NQP, we can then change VM, or the language. I mean, that's what I thought it was more or less like at first... but it seems to all be tied together into a knot. :P
03:44 hoelzro well, I think you could
03:44 hoelzro originally, NQP was married to Parrot
03:45 hoelzro now, however, NQP supports various compilation backends
03:45 hoelzro namely Parrot, the JVM, and MoarVM
03:45 egrep Okay... but isn't parrot supposedly coded horrifically?
03:45 egrep According to some random page on the internet?
03:46 hoelzro umm
03:46 egrep Well... I don't know. I give up for now... I just care about the fact that I can't build it on my laptop. :(
03:46 hoelzro well, there are strong opinions on Parrot
03:46 hoelzro that's all I'll say
03:46 egrep Heh.
03:47 egrep Well, this page was apparently by a previous coder.
03:47 hoelzro I can look at your issue
03:47 egrep http://sprunge.us/OOdK
03:47 egrep I think that's it...
03:47 hoelzro hoo boy
03:47 egrep I have a bunch more text if necessary.
03:47 hoelzro that's, umm...
03:47 hoelzro well, lay that extra text on me
03:47 hoelzro I can try
03:47 egrep Well... I'll shove it in a few gist then...
03:48 egrep what I did was: $ make -d > somefile.txt
03:48 egrep Some of the text went into the file.
03:48 egrep Some didn't.
03:48 hoelzro you're on OS X, right?
03:48 egrep Yeah.
03:48 egrep Might be a problem with Yosemite, though... I have versionitis.
03:49 hoelzro hmm
03:49 rindolf joined #perl6
03:50 egrep https://gist.github.com/egr​epnix/ecf20c44365e26afbf2e
03:50 egrep Aaaand...
03:51 egrep https://gist.github.com/egr​epnix/a90a9a29040f2c8bd5a9
03:51 egrep There.
03:51 egrep The first one is huge...
03:52 hoelzro yeah, I don't think I can help much here...
03:52 hoelzro soryr
03:52 hoelzro *sorry
03:53 egrep Yeah. :(
03:53 hoelzro most of the Moar experts (and the Perl 6 experts) live in Europe
03:53 egrep What time is it there?
03:54 egrep Early in the morning... *shrug*
03:54 hoelzro 5-6 AM
03:54 ventica egrep: I'm even more of a Perl6 n00b, but my understanding is that Perl6 is "just a spec"... i.e. any implementation that can pass the test suite is "Genuine Perl6". NQP is a subset of Perl6 that makes it much easier to parse text (incl. in this case Perl6) and some other niceties, but is too high level to be considered itself a VM... thus, there is a VM underneath NQP.
03:54 ventica I may have butchered the rationale but that's the present state of my comprehension of the overall arch.
03:55 egrep That makes sense.
03:55 egrep And judging by the fact that you came up with that, you're not a perl6 n00b. :)
03:56 ventica egrep: Complicating matters, the Rakudo implementation does not generate a bytecode at all... it generates an AST and passes that off to "the backend" where "the backend" is any of several VM's... those VM's have to have the ability to read and understand the AST.
03:56 ventica haha, just joined this channel a little over a week ago... so yeah
03:56 ventica but I did do Perl5 before and have been casually following the Perl6 literature over the years
03:57 ventica so that is helping a little but not nearly as much as I'd like lol
03:57 egrep It seems to help more than you think.
03:58 egrep But that's interesting.
03:58 hoelzro ventica: that's pretty good for a week =)
03:58 ventica I guess I shouldn't say "did Perl5 before" since I still do it! Definitely my fav language
03:58 ventica hoelzro: haha thx
03:58 hoelzro I've been a regular lurker here for two years now =)
03:59 lue Just to point out, NQP is just what Rakudo uses to make its job easier. There's nothing standardized or required about it.
03:59 ventica I want Perl6 to be my next fav language... hopefully it becomes that :D
04:00 egrep Judging by learnxinyminutes.com... I really like perl6.
04:01 egrep I guess for now I'll stick to running my perl programs on my vps.
04:01 egrep s/erl/erl6/
04:02 ventica +1 learnxinyminutes.. also, check out RosettaCode: http://rosettacode.org/wiki/Category:Perl_6
04:02 smash joined #perl6
04:04 egrep It seems like the most informative place for perl6 knowledge is http://perlcabal.org/syn/ :P
04:05 Sqirrel joined #perl6
04:06 kaare_ joined #perl6
04:08 egrep Make that https://github.com/perl6/specs
04:09 egrep Oh... github links to it... it's one and the same.
04:15 egrep Should I just install it with parrot...
04:18 slavik joined #perl6
04:25 chenryn joined #perl6
04:27 chenryn joined #perl6
04:39 xinming joined #perl6
04:49 * egrep decides to sleep on it... not literally
04:56 chenryn joined #perl6
04:59 BooK joined #perl6
05:04 dalek rakudo/nom: 3f3abe7 | duff++ | docs/ChangeLog:
05:04 dalek rakudo/nom: mention minor improvement in Changelog
05:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3f3abe732b
05:16 [particle] joined #perl6
05:16 PotatoGim joined #perl6
05:22 telex joined #perl6
05:25 dayangkun joined #perl6
05:40 gfldex joined #perl6
05:43 vendethiel .tell sjn well, it actually needs rebasing
05:43 yoleaux vendethiel: I'll pass your message to sjn.
05:49 vendethiel .tell ventica thanks for reminding me of the RC :)
05:49 yoleaux vendethiel: I'll pass your message to ventica.
05:57 chenryn joined #perl6
05:57 ventica joined #perl6
06:01 denis_boyun_ joined #perl6
06:08 chenryn joined #perl6
06:08 [Sno] joined #perl6
06:23 sergot o/
06:31 anaeem1 joined #perl6
06:34 chenryn joined #perl6
06:39 jack_rabbit joined #perl6
06:40 Woodi hallo :)
06:40 jack_rabbit Would someone be kind enough to explain or direct me to documentation on this list syntax? (0,1, *+* ... *)
06:40 ventica joined #perl6
06:42 grondilu joined #perl6
06:43 grondilu jack_rabbit: you want to look at *autopriming* in S02 and infix:<...> in S03
06:44 jack_rabbit Thanks.
06:45 Woodi [Coke]: about poker... for a while I wondered what cauld be used to make bids... commits ? :)
07:03 moritz \o
07:04 moritz jack_rabbit:  ... is the series operator; in the form you use it, it takes an initial list (0, 1), a generator (*+*) and a limit (*, aka unlimited)
07:05 moritz the generator is a short form for -> $a, $b { $a + $b }, so a block that sums its two arguments
07:05 jack_rabbit moritz, yeah, I'm reading the docs now.
07:05 jack_rabbit It's an interesting operator.
07:07 chenryn joined #perl6
07:07 grondilu I think it's called the sequence operator, though.
07:08 grondilu (if anything, the series operator would be [\+])
07:13 moritz it's been renamed once
07:13 moritz from sequence to series, or the other way round
07:14 * vendethiel knows it as the sequence operator
07:16 yakudza joined #perl6
07:16 darutoko joined #perl6
07:25 kaleem joined #perl6
07:25 masak good morning, #perl6
07:28 chenryn joined #perl6
07:29 dmol joined #perl6
07:32 smash joined #perl6
07:32 btyler joined #perl6
07:33 brrt joined #perl6
07:39 salv0 joined #perl6
07:42 kivutar joined #perl6
07:43 cognome joined #perl6
07:49 dakkar joined #perl6
07:50 virtualsue joined #perl6
07:57 mattp_ joined #perl6
07:58 chenryn_ joined #perl6
07:58 [particle]1 joined #perl6
07:59 btyler joined #perl6
08:03 synopsebot joined #perl6
08:04 thou joined #perl6
08:04 fhelmberger joined #perl6
08:04 fhelmberger joined #perl6
08:13 daxim_ joined #perl6
08:26 chenryn_ joined #perl6
08:28 grondilu r: my @a = ^10; say "4" ~~ / <@a> /;
08:28 camelia rakudo-jvm 3f3abe: OUTPUT«(timeout)»
08:28 camelia ..rakudo-moar 3f3abe: OUTPUT«This type cannot unbox to a native string␤  in sub MAKE_REGEX at src/gen/m-CORE.setting:13281␤  in block  at src/gen/m-CORE.setting:13162␤  in method reify at src/gen/m-CORE.setting:7771␤  in method reify at src/gen/m-CORE.setting:7607␤  in metho…»
08:28 camelia ..rakudo-parrot 3f3abe: OUTPUT«「4」␤␤»
08:46 cosimo joined #perl6
08:47 robins joined #perl6
08:47 dayangkun joined #perl6
08:51 [particle] joined #perl6
08:52 ggoebel1111110 joined #perl6
08:53 chenryn__ joined #perl6
08:53 btyler joined #perl6
08:54 pecastro joined #perl6
08:54 Psyche^ joined #perl6
08:54 psch joined #perl6
08:54 kaleem joined #perl6
08:54 sergot joined #perl6
08:54 krunen joined #perl6
08:54 ashleydev joined #perl6
08:54 hugme joined #perl6
08:55 fling joined #perl6
08:55 Pleiades` joined #perl6
08:55 lue joined #perl6
09:03 vendethiel http://prog21.dadgum.com/121.html
09:08 masak vendethiel: yeah, I always liked that post.
09:08 vendethiel at first, I thought that blog was cool, then I realized it was like j's advent calendar :B
09:09 masak vendethiel: I mentioned a very similar idea in the backlog, at http://irclog.perlgeek.de/​perl6/2014-07-25#i_9081488
09:09 brrt joined #perl6
09:09 masak (though that was more on the type level, I guess)
09:10 vendethiel yeah
09:10 vendethiel the post reminds me more of given+ARC, though.
09:10 vendethiel ie `given open 'foo'` -- but I think we already talked about that
09:10 masak yeah.
09:15 masak http://crsmithdev.com/arrow/ looks exceedingly sane.
09:16 * vendethiel thought this was about theoretical arrows
09:22 masak you wish :P
09:38 dalek specs: d5dfeca | (L. Grondin)++ | S99-glossary.pod:
09:38 dalek specs: adding NFA
09:38 dalek specs: review: https://github.com/perl6/specs/commit/d5dfeca2a5
09:40 virtualsue joined #perl6
09:44 spider-mario joined #perl6
09:48 * masak .oO( National Fecurity Agency )
09:50 lizmat vendethiel: looking at XinY, I'm wondering about the example "$c .= say; # method call and assignment"
09:51 vendethiel lizmat: I think I'm explaining compound operators somewhere else, though
09:51 lizmat maybe we need a better method than "say" there
09:51 vendethiel I see what you mean.
09:51 masak +1
09:51 lizmat maybe $c .= Int
09:52 masak or .=abs or .=uc
09:52 vendethiel still a bit confusing, though.
09:52 thou joined #perl6
09:52 vendethiel Yeah, .=uc is probably better
09:52 jnthn @a .= grep: *.fluffy; # can be a nice one
09:52 jnthn Yes, uc is easier and works too :)
09:52 vendethiel jnthn: I don't explain the bar: foo syntax
09:52 jnthn ah, ok :)
09:52 lizmat .uc ++
09:52 vendethiel (not yet, at least)
09:52 jnthn Well, can use paren syntax too :)
09:52 jnthn But yeah, .uc is easier.
09:53 vendethiel I don't want to do .= Int because people might think that's how you have to coerce stuff
09:53 jnthn .= sort is probably an easier list example too...
09:53 vendethiel I'm just waiting for sjn++ to rebase his PR and fix all those little things :)
09:54 masak m: my @pets = .new(:name<Ben>, :fluffy), .new(:name<Rick>), .new(:name<Kim>, :fluffy) given class :: { has Str $.name; has Bool $.fluffy }; @pets .= grep: *.fluffy; say @pets.elems
09:54 camelia rakudo-moar 3f3abe: OUTPUT«2␤»
09:54 masak \o/
09:55 masak I think if my 2004 self saw the Perl 6 code I was writing nowadays, he would be quite jealous :)
09:57 vendethiel masak: my 2014 self is kinda jealous of the Perl 6 code he reads :)
09:58 masak :)
09:58 brrt joined #perl6
10:01 ivanshmakov joined #perl6
10:01 lizmat m: sub a(% (:v($val))) { say "Got val $val" }; a({v=>42})   # works
10:01 camelia rakudo-moar 3f3abe: OUTPUT«Got val 42␤»
10:01 vendethiel well, nothing's wrong with ruby ... except activerecord, but then :(.
10:01 lizmat m: sub a(% (:v($val))) { say "Got val $val" }; a({x=>42})   # strange errorless error
10:01 camelia rakudo-moar 3f3abe: OUTPUT«␤  in sub a at /tmp/cnTs0wF8lk:1␤  in block  at /tmp/cnTs0wF8lk:1␤␤»
10:01 FROGGS[mobile] joined #perl6
10:01 vendethiel lizmat: yeah, I pulled my hair quite a bit with that one
10:02 kaare_ joined #perl6
10:02 lizmat m: sub a(% (:v($val) = 10)) { say "Got val $val" }; a({x=>42})   # setting default doesn't fix it
10:02 camelia rakudo-moar 3f3abe: OUTPUT«␤  in sub a at /tmp/zeFzFZVIbD:1␤  in block  at /tmp/zeFzFZVIbD:1␤␤»
10:04 vendethiel m: sub a(% (:v($val) = 10, *%)) { say "Got val $val" }; a({x=>42}) # lizmat
10:04 camelia rakudo-moar 3f3abe: OUTPUT«Got val 10␤»
10:04 lizmat aha!
10:04 lizmat seems we're missing the implicit *% in that case
10:05 jnthn You only get that in a method.
10:05 jnthn And not in a sub-sig
10:05 lizmat ah, good point  :-)
10:06 vendethiel the error is a bit LTA, though ;)
10:07 ivanshmakov joined #perl6
10:07 lizmat what error  :-)
10:07 vendethiel exactly ;)
10:08 lizmat nqp::die(@error[0]) with @error being empty by the look of it
10:09 lizmat it returns from the bind operation with BIND_RESULT_FAIL
10:10 jnthn Mebbe there's something sttting $error and not $error[0] somewhere
10:11 * lizmat is checking
10:12 chenryn__ joined #perl6
10:14 robinsmidsrod joined #perl6
10:20 gr33n7007h joined #perl6
10:28 Akagi201_ joined #perl6
10:29 rindolf joined #perl6
10:44 chenryn__ joined #perl6
11:22 timotimo o/
11:28 rurban joined #perl6
11:29 timotimo egrep: if you're back, i think i'd be able to give a better description of what the role of nqp is
11:40 thou joined #perl6
11:41 xragnar_ joined #perl6
12:00 ChoHag Am I just really good at killing the grammar engine or is it supposed to just sit there a lot sucking at my battery?
12:02 timotimo maybe you're stumbling over one of those cases where backtracking causes exponential work?
12:02 jnthn Well, if you're writing a gramamr, presumbably it's using token/rule and very little in the way of regex..
12:02 jnthn Is it chewing memory too?
12:02 jnthn A common mistake is trying to do left-recursion.
12:09 dayangkun joined #perl6
12:12 ChoHag I've no idea what left-recursion is, but backtracking is quite likely.
12:15 rindolf joined #perl6
12:16 ChoHag The unicode characters displayed when I print a Match are reqlly screwing up less.
12:18 cognome joined #perl6
12:19 ChoHag Interesting it's not hanging on parse, it's hanging on say on the variable created from processing the Match.
12:21 timotimo the match object may be gigantic
12:24 ChoHag It appears to be.
12:29 ChoHag I'm trying to create dot graphs from some log output, some of the terms matched by the grammar which should be turned into dot nodes contain characters dot nodes may not.
12:30 ChoHag My first thought was a sub which returned a safely-stringified form of the node's name and the original (part of the) match object. This works but feels Wrong.
12:31 ChoHag ISTR made or make or something in the grammar doc.s
12:36 lizmat could it be we have recursion in the Match object, that makes the gist go into a infinite loop ?
12:36 lizmat *an
12:37 jnthn That'd be very odd, unless you build a recursive data structure hanging off .made
12:41 dakkar joined #perl6
12:43 jnap joined #perl6
12:54 chenryn joined #perl6
12:56 rurban joined #perl6
12:57 ren1us ChoHag: when "say" on an object instance dies for me, it's usually because I have a reference loop between the objects somewhere.  ie A has B and B has A (and they're often hiding in hashes >_>)
12:59 ChoHag It doesn't die, it just eats all of my resources.
13:00 ChoHag Which is less than helpful on a train when you forgot to charge since previously going on a train.
13:00 ren1us does everything just freeze up like it caught in an infinite loop?
13:03 ren1us because if it's continuing to take up resources but it's not progressing it does sound like it's infinitely building that larger string
13:06 PerlJam greetings!
13:06 brrt joined #perl6
13:13 psch i'm unsure about m:g/./.join.  there's tests that assume that join gets the list-context version of $/, but they don't.  does .join coerce to list?
13:13 masak PerlJam: ahoj!
13:13 psch s/does/should/
13:13 psch s/they don't/it doesn't/ # :/
13:15 psch S05:4239 and the following bulled point seem related.  my branch currently makes those tests pass by wrapping the m// in @(), but i'm unsure if the list should be what comes out of m:g//
13:15 synopsebot Link: http://perlcabal.org/syn/S05.html#line_4239
13:15 psch ugh, bullet point...
13:20 PerlJam psch: maybe it's time to step away from the keyboard ;)
13:22 lizmat commute to Kyffhäuser Denkmal &
13:24 psch PerlJam: good idea, i think.  i'll save the rebasing for later as well :)
13:25 guru joined #perl6
13:26 woolfy left #perl6
13:31 dayangkun joined #perl6
13:33 lichtkind joined #perl6
13:39 bjz joined #perl6
13:44 ChoHag God damn programmers.
13:45 ChoHag "How do you do foo?"
13:45 ChoHag "Why would you want to do foo?"
13:45 ChoHag GAH! Just fucking tell me!
13:45 tadzik it's a valid question in some cases
13:46 tadzik see also: "how do I get a pony on the moon"
13:46 PerlJam ChoHag: usually the "why" is asked because "foo" seems weird in some way.
13:46 PerlJam (or maybe "foo" is underspecified)
13:46 ChoHag s/foo/simple_foo_with_no_ambiguity/g
13:47 ChoHag Programmers have an arrogant streak. How could a petitioner possible have the right idea? If they did, they wouldn't be asking questions!
13:47 PerlJam ChoHag: people ask *seemingly* simple questions all the time, not realizing that things may not be so simple  ;)
13:47 ChoHag It's a disgusting attitude.
13:47 tadzik pffft
13:47 tadzik just tell us what your foo was
13:47 ChoHag (in bash) "Can you make a readonly variable (made with declare -r) readwrite?"
13:47 PerlJam yeah ... so we can ask why you want to do it ;>
13:48 tadzik I can see why any programmer would ask "why?"
13:48 tadzik you don't need to be an arrogant asshat to see a design flaw here
13:49 ChoHag Indeed, but you do need to in order to immediately assume as though the alternative were simply unthinkable that the questioner has not also seen the design flaw.
13:50 ChoHag In fact, chances are the questioner, knowing more of the system in play, knows of more design flaws than just the particular one they are trying to work around at that specific point.
13:50 PerlJam ChoHag: sure ... and the people you're asking need to know more too
13:50 ChoHag None of that is relevant.
13:50 PerlJam ChoHag: so, I'm pretty sure the answer is "no".
13:50 ChoHag It is a simple yes/no question. "Can this thing be done?"
13:50 ChoHag Why is irrelevant.
13:51 ChoHag It is no.
13:51 PerlJam ChoHag: though, the readonlyness won't carry over to subshells (if that helps)
13:51 tadzik 1545         ChoHag | "How do you do foo?"
13:51 ChoHag There are some helpful people on IRC.
13:51 tadzik how is not a boolean question
13:52 chenryn_ joined #perl6
13:53 * ChoHag sighs
13:55 PerlJam ChoHag: so ... I'm still a little curious ... why *do* you want to make a readonly become read/write?  What's the problem you're trying to work around?
14:00 thou joined #perl6
14:00 ChoHag I didn't.
14:00 ChoHag I was curious.
14:01 ChoHag The attempt to audit users on the server here consists of 'declare -r HISTFILE=...'. I wondered how easy it was to break.
14:01 ChoHag See? Developers almost never consider the entire problem.
14:01 ChoHag Just the one they think they understand.
14:26 colomon ChoHag: the reason people try to ask "why" around here is surprisingly often, the best answer to a question is something totally different than the questioner has even considered, and if you don't understand the why, then you can never give the best answer.
14:30 dakkar joined #perl6
14:31 hoelzro morning #perl6
14:31 timotimo hey hoelzro
14:31 hoelzro o/ timotimo
14:36 ChoHag colomon: Actually the point I never got on to is that #perl* tends to be more helpful and less obstructive.
14:37 ChoHag But then it became a lie...
14:37 * masak .oO( YOU LIE! /me throws shoe )
14:38 cxreg No such method 'moar' for invocant of type 'Supply'
14:38 cxreg :-(
14:38 masak anyway, I remember MJD writing something somewhere about the XY problem. the conclusion was "damned if you do, damned if you don't" wrt trying to get to the actual cause for the questioner's question.
14:42 Alina-malina joined #perl6
14:43 masak can't find it now, though.
14:45 [Coke] masak: https://groups.google.com/forum/#!msg/comp.lang.perl/wu0T7a9orc0/3Q4PVIbEzZUJ is one version
14:45 lichtkind masak: hai , see you in the city of wisdom?
14:45 masak [Coke]++
14:46 [Coke] though that is the longer form about asking good question, I see.
14:46 hoelzro I found a bug with DOC INIT this moarning
14:46 masak lichtkind: provided the whole world doesn't go down the drain before then, yes, definitely.
14:46 hoelzro m: DOC INIT {}
14:46 camelia rakudo-moar 3f3abe: ( no output )
14:46 hoelzro hmm
14:47 brrt joined #perl6
14:47 lichtkind masak: common in medieval ages every one who could read knew that sophia is the personification of wisdom, that where the word pilosophy comes from
14:48 hoelzro oh, duh
14:48 masak *nod*
14:48 hoelzro you actually have to use --doc for that!
14:48 hoelzro perl6 --doc -e 'DOC INIT {}'
14:48 hoelzro that demonstrates the bug
14:48 hoelzro I have an outstanding PR to fix it, though
14:49 masak lichtkind: for those of us who know our Greek, that's  pretty well known, too.
14:50 lichtkind i just ask because now i plan my ways and hope to see you, my nect p6 talk will definitevly have something to learn from
14:50 masak \o/
14:51 masak how appropriate -- it being the city of wisdom and all, I mean.
14:51 ventica joined #perl6
14:51 lichtkind hahah
14:53 ventica2 joined #perl6
14:53 anaeem1 joined #perl6
14:55 Ven joined #perl6
14:55 chenryn_ joined #perl6
14:55 Ven $str.match(/:s public var $<name>=<.ident> ':' $<type>=<.ident> /, :g).list.map(*<name type>>>.Str).hash.perl
14:55 Ven masak: not jealous anymore, now I just do it :D.
14:56 lichtkind masak: its the talk from prague but this time with more ... wait you were not in prague, did you?
14:56 masak I believe I was.
14:57 masak maybe I didn't make a lasting impression on you. ;)
14:57 lichtkind masak: you said so
14:57 raiph joined #perl6
14:58 lichtkind no mee gut feeling was you were but i was not sure
14:58 lichtkind so you mostly know the talk even you didnt understood it
14:58 lichtkind but i exetended the neurology part
14:58 Ven is there something like `%hash<key1 key2>` that returns a hash with the keys instead ?
14:59 jdv79 joined #perl6
14:59 ren1us you mean like, a subhash?
14:59 masak "didn't understand it" -- pffft, I trolled you during that talk! the nerve, forgetting something like that. :P
15:00 jnthn m: my %h = a => 1, b => 2, c => 3; %(%h<a b>:p)
15:00 camelia rakudo-moar 3f3abe: ( no output )
15:00 jnthn m: my %h = a => 1, b => 2, c => 3; say %(%h<a b>:p)
15:00 camelia rakudo-moar 3f3abe: OUTPUT«("a" => 1, "b" => 2).hash␤»
15:01 jdv79 curious why JSON::Jansson reportedly parsed "big.json" in 2s?  JSON::XS does it in about 400ms and that includes File::Slurp picking it off the fs.
15:01 Ven jnthn++ adverbs++
15:02 masak m: my %h = a => 1, b => 2, c => 3; say %(%h<a b>:k X=> "@")
15:02 camelia rakudo-moar 3f3abe: OUTPUT«("a" => "\@", "b" => "\@").hash␤»
15:02 jdv79 JSON::Tiny taking 4 minutes is just crazy
15:02 jnthn Ven: Note that if you're just immediately assigning it into another hash then you can drop the outer %(...) coercer and let hash assignment take care of it.
15:02 Ven erm.
15:03 * masak is enjoying the acerbic but dry humor of http://perl.plover.com/IAQ/IAQlist.html
15:03 jnthn m: my %h = a => 1, b => 2, c => 3; my %x = %h<a b>:p; say %x
15:03 camelia rakudo-moar 3f3abe: OUTPUT«("a" => 1, "b" => 2).hash␤»
15:03 jnthn m: my %h = a => 1, b => 2, c => 3; my %x = %h<a b>:kv; say %x
15:03 camelia rakudo-moar 3f3abe: OUTPUT«("a" => 1, "b" => 2).hash␤»
15:03 Ven masak: this is like the C++ FQA ?
15:03 jnthn Ven: I just meant ^
15:04 Ven jnthn:  not sure what's the diff in the output ?
15:04 masak Ven: not really. this is just messing around.
15:04 robinsmidsrod joined #perl6
15:05 jnthn Ven: None, just in what I originally gave you I wasn't assigning into an intermediate hash
15:05 masak Ven: it's what happens if you never answer XY questions with "why?", instead opting for having some fun on the questioner's expense.
15:05 Ven hahaha
15:07 Ven "$string x .5" this one is hilarious
15:09 jnthn m: say "fooooo" x .5
15:09 camelia rakudo-moar 3f3abe: OUTPUT«␤»
15:09 jnthn aww!
15:09 chenryn_ joined #perl6
15:09 jnthn m: say "fooooo".substr(0, * * .5)
15:09 camelia rakudo-moar 3f3abe: OUTPUT«foo␤»
15:09 jnthn :D
15:10 Ven *++
15:10 Ven "gcc -larry -Wall" I KNEW IT
15:12 tadzik :D
15:16 pmurias joined #perl6
15:19 btyler jdv79: I hope you noted the disclaimer in the README
15:19 btyler re jansson/json::tiny
15:19 btyler anyways JSON::XS is still faster than the p6 jansson binding. I think that's to be expected, since JSON::XS is sticking stuff directly into perl guts
15:20 btyler aside from any potential difference in raw speed
15:20 btyler I tried a ~200mb JSON blob. only measuring parse time, JSON::XS was ~3-5 seconds on my machine, while p6-jansson was around 12-15 seconds
15:21 jdv79 so, the only reason its really interesting to me is because i do a bunch of json based services and rely on JSON::XS being awesome in terms of perf
15:21 jdv79 p6 would have to get a lot closer to ever be used for somethign like that
15:22 timotimo right. JSON::Tiny is a very "clean" implementation of json parsing
15:22 btyler I didn't go searching too hard for the very blindingly fastest JSON C library. jansson had great API docs and emphasized correct utf8 handling, which seemed a good match for p6
15:22 timotimo it's not really performance-tuned
15:22 jdv79 and those sizes are not outside the realm of reality.  i see json blobs in the 10s of MB regularly.
15:22 btyler there were some others that prioritize speed more, but were limited in other ways
15:22 ventica2 masak: nice one... I love the clear_the_screen sub! x-D
15:22 Ven I guess grammars are always gonna be slower than hand-written parsers anyway :)
15:22 timotimo not so sure about that
15:23 FROGGS jnthn: I was working on the v5 grammar/NFA issues yesternight again... Are there docs about how it is meant to work?
15:23 btyler jdv79: if you know of another general purpose JSON library with a strong emphasis on performance, I'd be happy to whip up a nativecall binding to see how it compares
15:23 brrt left #perl6
15:24 timotimo jdv79: parsing performance is really something we want to be improving all the time
15:24 FROGGS jnthn: because again I have cases where the rule I want is not in the first list of the nfa run, so my rule is dismissed
15:24 btyler my suspicion, though, is that jansson's performance is 'good enough' for the vast majority of services
15:24 Ven timotimo: can we attain p5's perf, though ?
15:24 btyler at least in my line of work I don't often encounter 50+mb JSON blobs
15:24 Ven (without a JIT 'cause that's cheating :P.)
15:24 timotimo that's cheating?
15:25 timotimo how about the bytecode specializer?
15:25 Ven isn't that like a small jit ?
15:25 timotimo i think it's a question of definitions
15:25 Ven when is it run? that's mainly my question here
15:25 timotimo it's a jit that compiles to bytecode instead of native code
15:26 timotimo it is run after a frame has been considered hot and then logging has observed values and types for a few calls
15:26 lichtkind FROGGS: you come to bulgaria?
15:27 FROGGS lichtkind: no, sadly :/
15:27 raiph joined #perl6
15:28 masak FROGGS: oh, you're not coming? you will be missed. :/
15:28 Ven timotimo: I'm mainly talking about removing while-running optimizations.
15:28 Ven But I get that with such a vm, it's pretty unfair. Well, I think ruby does that tho
15:28 timotimo in that case, nah, we won't reach that same performance
15:28 FROGGS masak: I stay here because of $smallest-kid
15:29 masak FROGGS: I guess congratulations are in order :>
15:29 moritz FROGGS++
15:29 moritz or rather, FROGGS.family++
15:29 FROGGS she is almost a month old :o)
15:30 * masak .oO( because, for some reason, .family is an Int ) :P
15:30 timotimo Ven: jnthn would probably be in a better position to answer if we have many opportunities left to improve parsing without specialization/jit
15:30 ventica2 masak: I hope it's not a Rat anyway... :P
15:30 moritz masak: as if Int was the only ++able type
15:32 masak moritz: right, there's all the other Real types, and Date, I guess :P
15:32 jnthn timotimo: Yes, we do :)
15:32 moritz masak: an Str, even
15:32 moritz masak: and a family isn't too far from a String of people
15:32 timotimo jnthn: would you like to point out some? :)
15:32 moritz though it's more like a graph :-)
15:32 * masak .oO( familz )
15:33 jnthn timotimo: Well, not redoing the matching the NFA does is one :) But that's le hard :)
15:33 timotimo i once had an approach for that which would have meant a tiny win and not be le hard ... i don't recall why it b0rked
15:33 masak timotimo: l'hard
15:33 masak :P
15:33 ventica2 m: my $a='a'; $a++; say $a
15:33 camelia rakudo-moar 3f3abe: OUTPUT«b␤»
15:34 timotimo ventica2: that feature succs.
15:34 ventica2 haha
15:35 ventica2 it's on the verge of too DWIMmy... but I have a nice little one-liner password generator in mind that could use this feature... ;)
15:36 masak m: my $lang = "perl"; $lang++ for ^45_565; say $lang
15:36 camelia rakudo-moar 3f3abe: OUTPUT«ruby␤»
15:36 * masak grins widely
15:37 ventica2 masak: true programming gems...
15:37 jnthn masak: You'd got that number memorized, hadn't you? :P
15:37 masak how to make yourself popular on your home IRC channel...
15:37 masak jnthn: no, I had to re-compute it by bisection :P
15:38 masak jnthn: it looks familiar, though.
15:38 jnthn Wonder why :P
15:39 pmurias re JSON::XS sticking stuff directly into p5 guts will MoarVM expose such an API?
15:40 btyler (note that's my fairly uneducated theory for why JSON::XS is so much faster than jansson. it could just be a way better parser)
15:44 robinsmidsrod joined #perl6
15:45 robinsmidsrod joined #perl6
15:47 pmurias btyler: doesn't your binding wrap the jansson structs as Perl6 classes lazily?
15:48 btyler more or less. I haven't implemented a "just load it all into p6 land and let jansson clean up" API yet
15:48 btyler lazy in that the json stuff all stays in jansson's domain
15:51 * TimToady notes that you can't get to php by incrementing 'perl'...
15:52 pmurias btyler: so the NativeCall penalty should be high
15:52 pmurias for just parsing and doing nothing
15:53 TimToady does it use the Cstruct repr?
15:53 btyler cpointer
15:54 btyler it peeks into the underlying struct in order to extract a few bits of data, like what jansson thinks the JSON type is
15:56 btyler https://github.com/kanatohodets/p6-json-j​ansson/blob/master/lib/JSON/Jansson.pm#L7 is the code in question
15:57 pmurias measuring the JSON::XS vs jansson from C would be an interesting comparision
15:59 timotimo pmurias: "directly sticking stuff into the guts" is kind of what the code that results from specialization usually does
15:59 timotimo pmurias: things like boxing/unboxing or attribute access are usually compiled to "write the address to the target as a pointer to this offset"
15:59 guru joined #perl6
16:00 timotimo object creation oftentimes becomes "allocate this many zeroes and put the owner's thread ID here and the STable address here"
16:00 hoverboard joined #perl6
16:04 pmurias what I meant is are there plans to expose an API to manipulate MoarVM objects from C code
16:04 pmurias ?
16:05 timotimo well, you can NativeCall libmoar.so and use ObjAt to get the pointer to an object ... :P
16:05 jnthn timotimo: That'd force people to couple to implementation details...
16:06 timotimo right
16:06 jnthn We already mark various things as MVM_PUBLIC; a superset of that can become API at some point.
16:06 jnthn The REPR conveience functions are the typical way to do it.
16:06 pmurias using NativeCall instead of manipulating the objects from C helps with portability between VMs
16:07 jnthn Yes, NativeCall is most certainly the first resort.
16:07 pmurias the way Perl 5 modules use XS blocks easily porting Perl5 on MoarVM
16:07 jnthn Also if you're going to use such a MoarVM API to deal with data structures, you'll have to know a good bit about such horrors as write barriers.
16:08 jnthn And object/stack management.
16:08 jnthn You don't have to do reference counts at least. :)
16:08 btyler and causes agonizing discussions on p5p about which bits of the internals are ok for XS to touch and which can be freely changed
16:11 jnthn Example of thing you'd need to know to work with a MoarVM object API from C: some_function(an_object_pointer, call_some_moarvm_thing_that_allocates()) may well be valid C, but it would violate MoarVM API usage rules.
16:11 pmurias being able to change all the MoarVM internals seems helpfull at this point
16:12 jnthn (Because you're not allowed to have any object references on the C stack that MoarVM doesn't know about)
16:12 pmurias so how are you supposed to store them?
16:12 jnthn The correct way to write the above is
16:12 jnthn MVMROOT(tc, an_object_pointer, {
16:13 jnthn temp = call_some_moarvm_thing_that_allocates();
16:13 jnthn });
16:13 jnthn some_function(an_object_pointer, temp);
16:13 jnthn (Note that by allocates I mean "a GC-able objec", not malloc and friends)
16:14 pmurias so not exposing such an API at this moment seems sensible ;
16:14 pmurias ;)
16:14 jnthn Yeah, I'm not in a huge hurry to until somebody's use case is way too pressing to ignore.
16:14 timotimo jnthn: do i need to root something in the initialize function of MVMCompUnit here? https://github.com/MoarVM/MoarVM/commit/e​f00cc5900d36ee6a81befad51feefdede1842c2#d​iff-76fbeaf0b46ebf0ce07a514a79f8e65cL27
16:14 robinsmidsrod joined #perl6
16:14 timotimo (dat link o_O)
16:15 jnthn timotimo: Yes. root
16:16 jnthn timotimo: And don't use data, use a case of root to store in update_mutex. Furthermore, needs doing with MVM_ASSIGN_REF
16:16 jnthn Also, that probably is more OT on #moarvm ;)
16:16 jnthn uh
16:16 jnthn less :)
16:16 denis_boyun joined #perl6
16:18 timotimo oke
16:18 FROGGS TimToady: do you see in that piece of grammar why it would choose the wrong thing? https://gist.github.com/FR​OGGS/e991e1b3bf8796d91b82
16:19 sqirrel joined #perl6
16:19 FROGGS I just cannot imagine why it works when being written in NQP (and inheriting from HLL::Grammar) but not working when being written in Perl 6
16:26 denis_boyun_ joined #perl6
16:26 TimToady didn't you already figure out that if you changed the <sym> to a literal it worked better?
16:26 TimToady or am I misremembering?
16:27 FROGGS I had to put in a <?before ...> hint in an upper rule to make it work
16:27 erkan joined #perl6
16:28 TimToady well, it still sounds like it's doing the tiebreakers wrong
16:29 guru joined #perl6
16:29 FROGGS like in here: https://github.com/rakudo-p5/v5/commit/3​7ef09b70379fb10288e3eeb920502e4837e2027
16:31 FROGGS I guess I have to strip the grammar down to a short example of my problem
16:32 denis_boyun joined #perl6
16:32 TimToady or instrument the tiebreaker code to log what it's doing there
16:32 TimToady or both
16:32 FROGGS how do I recognize that code?
16:33 TimToady probably talks about fates
16:33 FROGGS this? https://github.com/MoarVM/MoarVM/blo​b/master/src/6model/reprs/NFA.c#L321
16:35 TimToady I wonder if the problem is that quicksort is not stable...
16:35 FROGGS or here: https://github.com/perl6/nqp/b​lob/master/src/QRegex/NFA.nqp
16:36 FROGGS no, before doing the quicksort my rule is not in the list
16:36 TimToady then something else has gone wrong before that to prevent that rule from matching
16:36 FROGGS err, wrong
16:37 FROGGS it ids in the list, but...
16:37 TimToady we could try putting a stable sort in there to see if it makes a difference
16:37 FROGGS in the second iteration of the while at L354 the term:identifier and term:name are pushed to it and prefred
16:38 FROGGS (only have one hand to type right now)
16:39 denis_boyun joined #perl6
16:39 FROGGS[mobile] joined #perl6
16:39 FROGGS I am trying the sort approach then
16:40 TimToady well, BEGIN oughta win anyway on longest literal, but that still appears to be NYI
16:40 itz joined #perl6
16:40 FROGGS true
16:40 TimToady I wonder if it's using the wrong rule to check rule ordering
16:40 TimToady it should be using the term: rule, not identifier
16:41 TimToady what happens if you move the identifier rule to after BEGIN
16:42 * TimToady goes back to logging some backlogging
16:42 Rotwang joined #perl6
16:43 FROGGS doesn't help
16:44 FROGGS first it has six fates, containing the right one
16:44 FROGGS but when I dump all checks for a literal (fate codepoint), there is none that can match a 'B'
16:45 FROGGS then, in the next iter of the while loop two more fates come into being, name and identifier
16:46 FROGGS so maybe the nqp code compiles the fates wrong?
16:46 FROGGS hmmm
16:46 TimToady do you get a 'B' if you use literal 'BEGIN' rather than <sym>?
16:46 TimToady maybe <sym> is busticated
16:47 FROGGS no
16:47 FROGGS still no B
16:47 TimToady I assume your input has a B there...
16:47 FROGGS when I put a <?before BEGIN> in statement_prefix, I see all first chars of these rules
16:47 FROGGS e, d, B, U, ...
16:48 FROGGS that's my input: perl6-m -I../v5/lib -e 'use v5; BEGIN { say 1 }'
16:48 TimToady so statement_prefix isn't gathering the NFA correctly, maybe
16:48 TimToady does it also fail if you take out the space before BEGIN?
16:49 FROGGS yes and yes
16:49 TimToady so probably not a ws foulup
16:50 TimToady could statement prefix be failing somehow so you end up dropping into term instead?
16:51 TimToady oh, wait, that's a proto :)
16:51 FROGGS I dont think so, because it matches when I comment name and identifier
16:51 TimToady but it sure seems like a transitivity problem via statement_prefix at this point
16:51 FROGGS yeah
16:52 TimToady hasn't somehow got itself into :ignorecase mode has it?
16:52 FROGGS it is like it does not want to look that many levels deep
16:52 FROGGS hmmm
16:52 TimToady when there's no 'B', is there a 'b'?
16:53 FROGGS no 'b'
16:53 TimToady so probably not :i
16:54 TimToady well, the set of first chars of all the subrules ought to end up in the upper rule's set of first chars
16:54 jnthn I think the NFA class has a dump method on it that can show what it looks like, which may (or may not) help
16:55 FROGGS jnthn: I have to find a good place to call it then :o)
16:56 FROGGS TimToady: that is what happens when I put in the mentioned <?before BEGIN>... then I see all first chars of the five or six statement_prefix rules
16:56 TimToady and does the BEGIN rule have a 'B' in its NFA to begin with?
16:57 TimToady when you put before into which rule?
16:57 FROGGS I think so, but I guess I have to dump the NFA to be sure
16:57 FROGGS token term:sym<statement_prefix> { <statement_prefix> } -> token term:sym<statement_prefix> { <?before BEGIN> <statement_prefix> }
16:58 TimToady but then it should not show the other statement prefix's first chars, only BEGIN's
16:59 FROGGS but the others show up
16:59 TimToady before is supposed to clobber anything after it
17:00 TimToady well, <?before> is, and <!before> is supposed to ignore the before and take what comes after
17:01 jnthn I believe anything after a before just shoves a fate edge there and ignores what's beyond it.
17:01 jnthn That is, it takes foo in <?before foo>
17:01 TimToady S05:2854
17:01 synopsebot Link: http://perlcabal.org/syn/S05.html#line_2854
17:02 TimToady but then how are the other prefix chars getting in there?
17:02 TimToady there should only be a 'B' in that case
17:03 TimToady does <?before BEGIN> vs <before BEGIN> make a difference?
17:05 TimToady (though that wouldn't explain the original bug)
17:08 FROGGS[mobile] I'll check in a bit
17:10 gfldex joined #perl6
17:12 dmol joined #perl6
17:23 dalek rakudo-star-daily: 5627f0d | coke++ | log/ (14 files):
17:23 dalek rakudo-star-daily: today (automated commit)
17:23 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/5627f0d1fc
17:23 dalek perl6-roast-data: 2e92aa4 | coke++ | / (3 files):
17:23 dalek perl6-roast-data: today (automated commit)
17:23 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/2e92aa4f1e
17:37 pecastro joined #perl6
17:48 dalek rakudo/nom: 1cf7ca6 | moritz++ | tools/lib/NQP/Configure.pm:
17:48 dalek rakudo/nom: [Configure] pass --git-protocol on to NQP's Configure.pl, [Coke]++
17:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1cf7ca61ed
17:51 kurahaupo joined #perl6
17:55 virtualsue joined #perl6
17:55 [Coke] moritz++!
17:58 rindolf TimToady: hi, how do you feel?
17:59 TimToady much the same
17:59 rindolf TimToady: I See. So not worse?
18:00 TimToady my eye doesn't like the stitch rotting in it much, but that's just a waiting game
18:01 FROGGS TimToady: <before BEGIN> also works, and also the other rules (basically forbidden by the <before...>) show up
18:04 TimToady so that appears to be an additional bug
18:05 FROGGS I am trying now to create a v5 grammar that can just be used to parse my snippet and shows the bug
18:05 FROGGS m: say "abc" ~~ / <before a> abc /
18:05 camelia rakudo-moar 3f3abe: OUTPUT«「abc」␤ before => 「」␤␤»
18:06 TimToady should turn into a roast test or two...
18:06 FROGGS n: say "abc" ~~ / <before a> abc /
18:06 camelia niecza v24-109-g48a8de3: OUTPUT«「abc」␤␤»
18:07 FROGGS that is not supposed to match, right?
18:07 TimToady sure it is, it's just not putting anything into $<before> like it should
18:07 FROGGS ahh
18:07 TimToady that's why we use ?
18:07 TimToady to suppress that
18:07 FROGGS m: say "abc" ~~ / <.before a> abc /
18:07 camelia rakudo-moar 3f3abe: OUTPUT«「abc」␤␤»
18:08 FROGGS why don't we use that?
18:08 FROGGS I had thought that ? and ! mean zerowidth, and zerowidth mean that it doesnt capture
18:09 TimToady no, it's simply the existence of any punctuation before the word that suppresses capture
18:09 FROGGS ahh
18:09 TimToady . also works because 'before' already implies ?
18:10 TimToady so the ? is redundant, except for suppressing capture, which . also does
18:10 FROGGS ahh, I see
18:11 [Sno] joined #perl6
18:12 TimToady m: say "abc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] /
18:12 camelia rakudo-moar 3f3abe: OUTPUT«HERE␤「a」␤␤»
18:12 TimToady m: say "bc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] /
18:12 camelia rakudo-moar 3f3abe: OUTPUT«HERE␤HERE␤HERE␤Nil␤»
18:12 TimToady that should not say HERE at all
18:14 TimToady well, maybe I have to work harder
18:15 TimToady m: say "bc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] | x /
18:15 camelia rakudo-moar 3f3abe: OUTPUT«Nil␤»
18:15 TimToady m: say "abc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] | x /
18:15 camelia rakudo-moar 3f3abe: OUTPUT«HERE␤「a」␤␤»
18:15 TimToady okay, that's better
18:15 TimToady in this case it's not copying the b into the NFA
18:16 TimToady so the fate is rejecting the b match before getting to the before
18:17 TimToady I had to add the |x because without an alternation it doesn't bother to copy out the NFA to the outer level
18:23 Sqirrel joined #perl6
18:25 Akagi201 joined #perl6
18:27 Akagi201_ joined #perl6
18:31 * TimToady wonders whether a reasonable cross-vm optimization would be to detect when a given dynvar is used multiple times within a routine, and throw a 'temp $*FOO;' it at the top to cache it in the current lexical table
18:34 zby_home_ joined #perl6
18:52 dalek joined #perl6
18:56 TimToady though it kinda looks like nqp doesn't implement temp
18:58 anaeem1 joined #perl6
19:00 FROGGS hmmm, 2154 lines of code is not really 'golfed down' :/
19:02 FROGGS but now I have a Perl5::Grammar that is kinda stand-alone
19:04 FROGGS TimToady: nqp does not have temp, aye
19:06 nwc10 stand alone from what?
19:07 FROGGS nwc10: before you could only switch to it by compiling a program that has 'use v5' in it
19:08 FROGGS now I can use the stripped down version to parse a string and it gives me a tree of match objects
19:08 FROGGS so it is a little bit easier to debug I hope
19:12 dwarring joined #perl6
19:16 denis_boyun_ joined #perl6
19:21 denis_boyun__ joined #perl6
19:24 guru joined #perl6
19:27 FROGGS I think that is my issue:
19:27 FROGGS m: grammar G { token TOP { <a> }; proto token a { * }; token a:sym<foo> { <b> }; token a:sym<indirect> { \w+ }; token b { <c> }; token c { <d> }; token d { 'foo' } }; say G.parse("foo")
19:27 camelia rakudo-moar 1cf7ca: OUTPUT«「foo」␤ a => 「foo」␤  b => 「foo」␤   c => 「foo」␤    d => 「foo」␤␤»
19:27 FROGGS this works as expected, the literal 'foo' gets used even when it is several tokens away...
19:28 FROGGS m: grammar G { token TOP { <a> }; proto token a { * }; token a:sym<foo> { <b> }; token a:sym<indirect> { \w+ }; token b { <c> }; token c { <d> }; proto token d { * }; token d:sym<foo> { <sym> } }; say G.parse("foo")
19:28 camelia rakudo-moar 1cf7ca: OUTPUT«「foo」␤ a => 「foo」␤␤»
19:28 FROGGS but a multi breaks it
19:29 FROGGS m: grammar G { token TOP { <a> }; proto token a { * }; token a:sym<foo> { <b> }; token a:sym<indirect> { \w+ }; proto token b { * }; token b:sym<foo> { <sym> } }; say G.parse("foo")
19:29 camelia rakudo-moar 1cf7ca: OUTPUT«「foo」␤ a => 「foo」␤␤»
19:29 FROGGS even here
19:29 FROGGS m: grammar G { token TOP { <a> }; proto token a { * }; token a:sym<foo> { <b> }; token a:sym<indirect> { \w+ }; proto token b { * }; token b:sym<foo> { 'foo' } }; say G.parse("foo")
19:29 camelia rakudo-moar 1cf7ca: OUTPUT«「foo」␤ a => 「foo」␤␤»
19:29 FROGGS and <sym> is not the issue
19:30 raiph joined #perl6
19:31 FROGGS nqp-m: grammar G { token TOP { <a> }; proto token a {*}; token a:sym<foo> { <b> }; token a:sym<indirect> { <?{ say('bad') }> \w+ }; proto token b {*}; token b:sym<foo> { <?{ say('good') }> <sym> } }; say(G.parse("foo"))
19:31 camelia nqp-moarvm: OUTPUT«good␤foo␤»
19:31 FROGGS but it works in nqp
19:32 FROGGS m: grammar G { token TOP { <a> }; proto token a {*}; token a:sym<foo> { <b> }; token a:sym<indirect> { <?{ say('bad') }> \w+ }; proto token b {*}; token b:sym<foo> { <?{ say('good') }> <sym> } }; say(G.parse("foo"))
19:32 camelia rakudo-moar 1cf7ca: OUTPUT«bad␤「foo」␤ a => 「foo」␤␤»
19:32 FROGGS here
19:32 FROGGS that line of code is identical to the one above that
19:33 FROGGS and it behaves differently
19:33 FROGGS jnthn: can you make sense out of that?
19:34 FROGGS p: grammar G { token TOP { <a> }; proto token a {*}; token a:sym<foo> { <b> }; token a:sym<indirect> { <?{ say('bad') }> \w+ }; proto token b {*}; token b:sym<foo> { <?{ say('good') }> <sym> } }; say(G.parse("foo"))
19:34 camelia rakudo-parrot 1cf7ca: OUTPUT«good␤「foo」␤ a => 「foo」␤  b => 「foo」␤   sym => 「foo」␤␤»
19:34 FROGGS and it is a moarvm issue :/
19:34 denis_boyun_ joined #perl6
19:39 FROGGS gah, sometimes I don't enjoy silence :o)
19:40 brrt joined #perl6
20:02 iarna joined #perl6
20:05 denis_boyun_ joined #perl6
20:08 FROGGS jnthn: NFA.__dump is broken because it uses sprintf which has a grammar nowadays :o)
20:09 timotimo it infiniloops, eh?
20:10 FROGGS it does
20:10 timotimo well, infinicurses i suppose
20:10 FROGGS yes
20:11 FROGGS but hopefully not any longer...
20:13 sqirrel_ joined #perl6
20:19 ChoHag Why do the proto token foo {*} examples always have ':sym<something>'? I tried :something (as in token foo:something { ... }) and it Seems To Work.
20:19 ChoHag What's the :sym<> for?
20:20 beastd joined #perl6
20:20 timotimo what you have between the < > will be what is literally matched by <sym> inside the rule
20:22 hoelzro huh, I never knew that
20:22 hoelzro I'd always assumed <sym> was special
20:22 ChoHag Does it need to be sym?
20:23 timotimo does what exactly have to be sym?
20:23 hoelzro from what timotimo just said, I assume not
20:24 hoelzro m: regex foo:rob<five> { <rob> } ; 'five' ~~ /<foo>/
20:24 camelia rakudo-moar 1cf7ca: OUTPUT«Useless declaration of a has-scoped method in mainline (did you mean 'my regex foo:rob<five>'?)␤No such method 'foo' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:13331␤  in block  at /tmp/WCTpVrePrc:1␤␤»
20:24 ChoHag The bit between the : and the <, and between the < and the > in the rule itself.
20:24 ChoHag That.
20:24 hoelzro m: my regex foo:rob<five> { <rob> } ; 'five' ~~ /<foo>/
20:24 camelia rakudo-moar 1cf7ca: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:13331␤  in block  at /tmp/QiAr2FvxYl:1␤␤»
20:24 hoelzro I think I'm Doing It Wrong.
20:24 ChoHag m: my regex foo:rob<five> { <rob> } ; 'five' ~~ /<foo>/
20:24 camelia rakudo-moar 1cf7ca: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:13331␤  in block  at /tmp/iZ0oKM8eky:1␤␤»
20:24 timotimo i'm not sure what the spec says; it is only for changing the meaning of <sym>, but i think you are allowed to just write "rule foo:bar" instead of "rule foo:sym<bar>"
20:25 ChoHag m: proto regex foo {*};  regex foo:rob<five> { <rob> } ; 'five' ~~ /<foo>/
20:25 camelia rakudo-moar 1cf7ca: OUTPUT«Useless declaration of a has-scoped method in mainline (did you mean 'my regex foo'?)␤Useless declaration of a has-scoped method in mainline (did you mean 'my regex foo:rob<five>'?)␤No such method 'foo' for invocant of type 'Cursor'␤  in method ACCEP…»
20:25 ChoHag Bah.
20:25 ChoHag I'm totally new at this.
20:25 hoelzro I guess that if a regex isn't lexical, it *must* belong to a Grammar?
20:25 PerlJam I think sym *is* special right now.
20:25 timotimo something like that
20:25 hoelzro that's one thing that continues to throw me
20:25 timotimo PerlJam: i think someone patched that a few months ago
20:29 jnap1 joined #perl6
20:30 denis_boyun joined #perl6
20:35 klaas-janstol joined #perl6
20:38 mhasch joined #perl6
21:09 ventica joined #perl6
21:14 egrep timotimo: I'm here now. :P
21:15 zengargo1le joined #perl6
21:16 timotimo hi
21:16 egrep Hi.
21:17 timotimo er, what was i going to explain again? %)
21:18 egrep nqp I think. :P
21:18 timotimo right. what confused you about it again?
21:18 timotimo what it's for?
21:18 egrep 11:29:52*      timotimo | egrep: if you're back, i think i'd be able to give a better description of what the role of nqp is
21:18 timotimo NQP is a nice little language to build a compiler in
21:18 telex joined #perl6
21:18 timotimo it gives a decent amount of convenience features, the grammar engine in it is "fully" there
21:19 timotimo but it has quite limited semantics; for example, there is no such thing as the scalar containers and friends in NQP
21:19 timotimo that means you cannot assign to variables, you can only bind
21:19 timotimo there is mo multiple dispatch except for type-dispatch on the first argument or something
21:19 timotimo there's no metaoperators, there's only very few classes in the "setting"
21:20 timotimo but NQP is self-hosting; the NQP compiler is actually written in NQP nowadays (and has been for several years now)
21:21 timotimo all the higher-level things we offer in perl6 are based on nqp::foobar ops that get you much closer to the VM
21:22 egrep So... rakudo's written in nqp and therefore can be build/run on any vm that supports nqp?
21:23 timotimo right
21:23 [Coke] and which also (should) hide any vm-specific differences from rakudo's point of view. (some work left to go there, which is why you'll see some stuff in rakudo that has VM ifdefs.
21:23 timotimo parts of rakudo are written in perl6, but that's only the built-in classes in the "setting"
21:23 timotimo that's right
21:23 [Coke] (and) the nqp::foobar ops, I mean.
21:27 jnthn The other part is that while full-blown Perl 6 is rather challening to optimize well, the restrictions in NQP make simple code-gen a load easier.
21:27 timotimo oh, i meant to say that! damn it
21:27 jnthn Which makes writing the compiler in a (restricted) Perl 6 a viable approach without ruining compiler developer productivity.
21:31 egrep Okay.
21:32 * rindolf hopes TimToady is OK - he left for lunch two hours ago.
21:32 egrep Maybe TimToady wants to have a long, delicious lunch?
21:33 masak some of my best lunches were two hours long.
21:34 lizmat joined #perl6
21:37 PerlJam Maybe, just maybe ... TimToady has a life outside of IRC  ;)
21:37 masak *gasp*
21:37 egrep I find it hard to believe that anybody has a life outside of IRC.
21:38 masak is it contagious?
21:38 egrep Also some of my best lunches were edible.
21:38 egrep I hope not.
21:39 rindolf egrep: IRC is much more important than life. get your priorities straight!
21:39 rindolf egrep: also - WTF is life?
21:39 PerlJam Weird Al has a solution for the contagion: https://www.youtube.com/watch?v=w-0TEJMJOhk
21:39 rindolf egrep: where can i download it from?
21:39 egrep rindolf: http://uncyclopedia.wikia.com/wiki/Life
21:40 rindolf egrep: uncyclopedia ♥!
21:42 rindolf egrep: this reminds me of the people who told me they can solve the mideast's problems by dropping an atomic bomb on Israel!
21:42 rindolf egrep: which may be offensively off topic here.
21:43 rindolf egrep: people think that happy, good, productive, people are a strain on society.
21:45 masak oh, rindolf, you huggable you. thank you for bringing spice and randomness to this channel. reading you is a bit like watching a traffic accident. :)
21:45 woolfy joined #perl6
21:45 PerlJam hugme: hug rindolf
21:45 * hugme hugs rindolf
21:46 PerlJam hugme: hug woolfy too
21:46 * hugme hugs woolfy
21:46 * woolfy hugs all of you
21:46 masak hugme: hug all in #perl6
21:46 * hugme hugs all
21:46 woolfy I just logged in...  why the happy hugging?  No reason?  Is ok too...
21:47 masak woolfy: we're happy you're here!
21:47 PerlJam woolfy: does there need to be a *reason*?!?
21:47 PerlJam :)
21:47 BenGoldberg joined #perl6
21:47 ingy if you are not following kentfredric on github, please do now. he needs 10-20 more followers to be the #1 contributor on GitHub by more than double the current leader, and thus Perl becomes #1.
21:48 woolfy PerlJam: no reason needed...  I am just a curious canine.
21:49 * woolfy hugs ingy too!
21:49 ingy is a woolf a canine?
21:49 woolfy duh
21:49 ingy :D
21:49 PerlJam ingy: <cynic>Sure ... until github figures out what's going on and changes the rules</cynic>   :-)
21:49 rindolf hugme: hug masak
21:49 * hugme hugs masak
21:49 rindolf hugme: hug PerlJam
21:49 * hugme hugs PerlJam
21:49 * masak hugs PerlJam
21:49 woolfy canine hugs for masak
21:49 * masak hugs hugme
21:50 rindolf hugme: hug Chuck Norris
21:50 * hugme hugs Chuck
21:50 egrep hugme: help
21:50 hugme egrep: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
21:50 timotimo do we have an implementation of hmac that is compatible with python's hmac module?
21:50 woolfy (The Perl 6 community is going to wear flowers in their hair and sing along songs around a campfire and proclaims peace for all)
21:50 masak hugme: hug egrep
21:50 * hugme hugs egrep
21:50 egrep hugme: hug hugme
21:50 * hugme hugs hugme and blushes
21:50 timotimo (with sha256)
21:55 woolfy joined #perl6
21:57 FROGGS jnthn: I added the NFA.dump of nqp-m/perl6-m/perl6-p... https://gist.github.com/FR​OGGS/e991e1b3bf8796d91b82
21:57 FROGGS jnthn: in what way can perl6-m be different here?
21:59 ingy here's a list of all the perl6 members not following kentfredic that I generated with `git-hub`: https://gist.github.com/f132f20c0e63038be155
22:00 rindolf ingy: I'm following kentnl now.
22:00 ingy rindolf: I was just about to call you out :)
22:00 * ingy looks at masak and jnthn :)
22:01 rindolf ingy: note that I'd appreciate you people following me or watching some of the repositories of my screenplays/stories.
22:01 retupmoca timotimo: Digest::HMAC should work
22:01 retupmoca timotimo: use Digest for the sha256 function
22:01 retupmoca timotimo: https://github.com/retupmoca/P6-Digest-HMAC/
22:02 timotimo and that's compatible with the python module?
22:02 timotimo ah, i see you do the inner/outer pad dance
22:02 retupmoca timotimo: as far as I know
22:03 retupmoca I don't recall what I needed it for, but I was writing something based on python example code, so it should be compatible
22:03 timotimo sounds good to me
22:03 timotimo are you interested in helping with implementing an ipython-compatible kernel based on p6?
22:04 timotimo it'll require understanding and improving the net-zmq module
22:04 timotimo one thing that absolutely puzzles me is the section on how the heartbeat thing works
22:04 retupmoca not right now probably, I'm somewhat lacking in time in the near future
22:05 timotimo that's all right
22:05 timotimo i suppose i'll try bothering the ipython devs a bit
22:06 timotimo http://ipython.org/ipython-doc/2/developm​ent/messaging.html#heartbeat-for-kernels - seriously ... how is this explanation supposed to explain anything?
22:08 masak 'night, #perl6
22:08 FROGGS gnight masak
22:11 jnthn FROGGS: I wonder if the way we compile <?{ say("good") }> differs enough to throw off the NFA builder?
22:14 FROGGS jnthn: I stripped these and updated the gist
22:14 FROGGS no change
22:20 jnthn The perl6-m one looks like a syntax error now?
22:21 FROGGS jnthn: ohh, copy&paste error
22:22 FROGGS the shown output is correct
22:22 FROGGS well, it is not really a copy&paste error, it is bash history + buffering error
22:22 timotimo oooh, i think i know how the heartbeat thing on ipython works now
22:23 jnthn FROGGS: Have you compared the QAST::Regex trees we get?
22:24 FROGGS ohh, good point
22:25 klaas-janstol joined #perl6
22:25 jnthn Sorry I've not been much help. JIT + deopt = non-trivial distraction...
22:26 FROGGS sure
22:26 FROGGS ast differs just for p6bindsig
22:27 jnthn Between Rakudo and NQP?
22:27 jnthn Or r-p and r-m?
22:28 FROGGS r-p and r-m
22:28 FROGGS nqp-m and perl6-m is not that easy to check
22:28 jnthn I was curious about r-m vs nqp-m
22:28 FROGGS will take a few minutes
22:29 jnthn But that it's the same on r-p and r-m eliminates one source of variance.
22:31 Psyche^_ joined #perl6
22:35 xragnar joined #perl6
22:35 FROGGS the ast of nqp-m to perl6-m looks identical too
22:36 jnthn o.O
22:36 FROGGS instead of nqp: - QAST::Regex+{QAST::RegexCu​rsorType}(:rxtype(concat)) perl6: - QAST::Regex(:rxtype(concat))
22:37 jnthn Well, that's us just not getting an opt in Perl 6 that NQP gets, but that diff only relates to code-gen, not the NFGs, iirc.
22:37 jnthn *NFAs
22:37 FROGGS I only compared the regex blocks btw (starting with a concat)
22:38 FROGGS should i look for other stuff too?
22:38 jnthn Don't think so really; it's only QAST::Regex that is considered by the NFA builder.
22:41 zengargoyle joined #perl6
22:46 Alina-malina joined #perl6
22:46 raiph joined #perl6
23:00 rurban joined #perl6
23:06 BenGoldberg P: my @a = 12, '12a', 2; my %b; %b{@a.pick(*).sort.Str} += 1 for 1..99; say %b;
23:06 camelia pugs: OUTPUT«12 12a 2   3412a 2 12      252 12 12a      40␤»
23:06 klaas-janstol joined #perl6
23:07 BenGoldberg rn: my @a = 12, '12a', 2; my %b; %b{@a.pick(*).sort.Str} += 1 for 1..99; say %b;
23:07 camelia rakudo-jvm 1cf7ca: OUTPUT«(timeout)»
23:07 camelia ..rakudo-moar 1cf7ca: OUTPUT«("12 12a 2" => 31, "12a 2 12" => 35, "2 12 12a" => 33).hash␤»
23:07 camelia ..niecza v24-109-g48a8de3: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 301 (Any.Numeric @ 8) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/tmpfile line…»
23:07 camelia ..rakudo-parrot 1cf7ca: OUTPUT«("12 12a 2" => 33, "12a 2 12" => 28, "2 12 12a" => 38).hash␤»
23:07 ventica joined #perl6
23:08 kurahaupo_ joined #perl6
23:34 dalek perl6-bench: a2f6856 | (Geoffrey Broadwell)++ | / (2 files):
23:34 dalek perl6-bench: Add --min-time option to set timing noise threshold
23:34 dalek perl6-bench:
23:34 dalek perl6-bench: As requested by jnthn++.
23:34 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/a2f6856c8f
23:35 SevenWolf joined #perl6
23:35 oetiker joined #perl6
23:36 ventica m: say "i am here"
23:36 yoleaux 05:49Z <vendethiel> ventica: thanks for reminding me of the RC :)
23:36 camelia rakudo-moar 1cf7ca: OUTPUT«i am here␤»
23:37 ventica vendethiel: sure thing...

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

Perl 6 | Reference Documentation | Rakudo