»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:02 xenoterracide joined 00:12 ventica joined 00:15 BenGoldberg joined 00:17 raiph left 00:20 xenoterracide left 00:21 ajr_ left 00:37 aoseki joined 00:39 akaseki left 00:40 kuroseki joined 00:43 akaseki joined, aoseki left 00:44 aoseki joined 00:45 kuroseki left 00:46 kuroseki joined 00:47 akaseki left 00:48 aoseki left 00:51 kuroseki left
hoelzro is there a way to create a native array of ints? for optimization reasons, I mean 00:53
I figured my int @matrix?
[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..
[Coke] m: my int @matrix; 00:56
camelia ( no output )
[Coke] m: my int @matrix; @matrix.push(1); say @matrix.perl;
camelia rakudo-moar 574266: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤ in block at /tmp/4cywFob37A:1␤␤»
[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 01:00 raiph joined, kivutar left
timotimo hoelzro: you can use nqp::list_i() which will probably only react to nqp::push/shift/pop/unshift/atpos/bindpos 01:01
hoelzro =/
I'm not that gung ho about optimization =) 01:02
japhb Who's working on the #= and #| stuff? Is that you, hoelzro? 01:03
hoelzro japhb: that's me!
have you feedback or questions? 01:04
01:04 thou left
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 =)
I would like more testing on it, though 01:06
I've been using it for my subcommander module, and so far so good!
01:06 klapperl_ left, klapperl joined
hoelzro I'm hoping to get it into nom before Rakudo 2014.08 01:06
japhb Oh, cool. 01:07
What is your subcommander module? 01:08
hoelzro oh, it's a module that should make writing CLI apps much easier
japhb Ah, OK
That I'd like to see too. :-)
hoelzro drums up an example
japhb: gist.github.com/hoelzro/b7bdbc125849e4aff3a2 01:13
hmm...that language option should probably tell you the default 01:14
if you want to play with it, it's at github.com/hoelzro/Subcommander 01:15
[Coke] ~>~. 01:23
01:25 dayangkun joined
japhb hoelzro: Thanks, I'll look at that on the bus ride. :-) 01:26
01:35 klapperl_ joined 01:37 thou joined 01:38 FROGGS__ joined
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:38
01:39 klapperl left
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
I'm sure why, ultimately =/
probably because I wanted the application to be a class itself
oh, and I wanted "app options" 01:40
01:40 nbrown___ joined
hoelzro which are options that are present for any command 01:40
01:40 Sqirrel left
hoelzro I think I had other reasons, but I started more than a month ago 01:40
01:41 FROGGS_ left
hoelzro I know I was originally going to write my application with MAIN, but decided against it 01:42
timotimo tadzik: did you see the issue on panda ezra1 made?
01:44 ilbot3 left 01:46 ilbot3 joined
[Coke] points timotimo @ github.com/coke/poker 01:56
02:00 ventica left 02:03 ventica joined 02:10 noganex_ joined 02:12 nbrown___ left, noganex left 02:17 lustlife joined 02:19 chenryn joined 02:48 akaseki joined 02:55 dwarring left 02:56 adu joined
egrep Hrm... seems I get an error when trying to build moarvm on OS X Yosemite... 03:04
03:05 BenGoldberg left 03:11 cognome_ left, cognome joined 03:16 lustlife left
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:18
03:19 rurban left 03:20 chenryn left 03:22 chenryn joined 03:26 lustlife joined
egrep Okay... so what's the relationship between rakudo and nqp? 03:34
03:34 rurban joined 03:35 mosasiru joined
hoelzro NQP is a subset of Perl 6 03:38
it's lower level
egrep Okay, got that...
So... how is it used?
hoelzro typically NQP constructs map more closely to the underlying VM instructions
03:38 mosasiru left
hoelzro well, Rakudo is written in a combination of Perl 6 and NQP 03:38
egrep And how does that tie in to the VM... 03:39
hoelzro well, let's say you have the open function 03:40
the bootstrapped Perl 6 environment doesn't know how to open files
so it asks the VM (via nqp::open, iirc) to carry out the instruction
it's a little confusing =/
egrep And the bootstrapped perl6 environment is... ? 03:41
hoelzro I think that working with rakudo clears it up
anything under src/core
egrep shrugs.
hoelzro I'm probably doing a poor job explaining...I only just recently really started working on rakudo
egrep Heh, it's okay. I'm relatively new to perl in general, let alone perl6... so... yeah.
hoelzro well, welcome =) 03:42
egrep Thanks.
hoelzro I find the relationships between all of the different pieces can be daunting for new users
it certainly was for me!
egrep Heh.
Technically... couldn't this just work like so: VM->NQP->Perl6 ? 03:43
And technically you could do without the NQP. 03:44
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
hoelzro well, I think you could
03:44 adu left
hoelzro originally, NQP was married to Parrot 03:44
now, however, NQP supports various compilation backends 03:45
namely Parrot, the JVM, and MoarVM
egrep Okay... but isn't parrot supposedly coded horrifically?
According to some random page on the internet?
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. :(
hoelzro well, there are strong opinions on Parrot
that's all I'll say
egrep Heh.
Well, this page was apparently by a previous coder. 03:47
hoelzro I can look at your issue
egrep sprunge.us/OOdK
I think that's it...
hoelzro hoo boy
egrep I have a bunch more text if necessary.
hoelzro that's, umm...
well, lay that extra text on me
I can try
egrep Well... I'll shove it in a few gist then...
what I did was: $ make -d > somefile.txt 03:48
Some of the text went into the file.
Some didn't.
hoelzro you're on OS X, right?
egrep Yeah.
Might be a problem with Yosemite, though... I have versionitis.
hoelzro hmm 03:49
03:49 rindolf joined
egrep gist.github.com/egrepnix/ecf20c44365e26afbf2e 03:50
Aaaand...
gist.github.com/egrepnix/a90a9a29040f2c8bd5a9 03:51
There.
The first one is huge...
hoelzro yeah, I don't think I can help much here... 03:52
soryr
*sorry
egrep Yeah. :( 03:53
hoelzro most of the Moar experts (and the Perl 6 experts) live in Europe
egrep What time is it there?
Early in the morning... *shrug* 03:54
hoelzro 5-6 AM
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.
I may have butchered the rationale but that's the present state of my comprehension of the overall arch.
egrep That makes sense. 03:55
And judging by the fact that you came up with that, you're not a perl6 n00b. :)
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
haha, just joined this channel a little over a week ago... so yeah
but I did do Perl5 before and have been casually following the Perl6 literature over the years
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.
But that's interesting. 03:58
hoelzro ventica: that's pretty good for a week =)
ventica I guess I shouldn't say "did Perl5 before" since I still do it! Definitely my fav language
hoelzro: haha thx
hoelzro I've been a regular lurker here for two years now =)
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
egrep Judging by learnxinyminutes.com... I really like perl6. 04:00
I guess for now I'll stick to running my perl programs on my vps. 04:01
04:01 smash left
egrep s/erl/erl6/ 04:01
ventica +1 learnxinyminutes.. also, check out RosettaCode: rosettacode.org/wiki/Category:Perl_6 04:02
04:02 smash joined
egrep It seems like the most informative place for perl6 knowledge is perlcabal.org/syn/ :P 04:04
04:05 Sqirrel joined, chenryn left 04:06 kaare_ joined
egrep Make that github.com/perl6/specs 04:08
Oh... github links to it... it's one and the same. 04:09
Should I just install it with parrot... 04:15
04:15 [particle] left 04:18 slavik joined 04:25 chenryn joined, chenryn left 04:27 chenryn joined 04:28 [Sno] left 04:31 chenryn left 04:38 xinming left 04:39 rurban left, xinming joined
egrep decides to sleep on it... not literally 04:49
04:56 chenryn joined 04:58 BooK left 04:59 BooK joined 05:01 chenryn left
dalek kudo/nom: 3f3abe7 | duff++ | docs/ChangeLog:
mention minor improvement in Changelog
05:04
05:16 [particle] joined, PotatoGim joined 05:20 telex left 05:21 ventica left 05:22 telex joined, dayangkun left 05:25 dayangkun joined 05:27 Rotwang left 05:40 gfldex joined
vendethiel .tell sjn well, it actually needs rebasing 05:43
yoleaux vendethiel: I'll pass your message to sjn.
vendethiel .tell ventica thanks for reminding me of the RC :) 05:49
yoleaux vendethiel: I'll pass your message to ventica.
05:55 gfldex left 05:57 chenryn joined, ventica joined 06:01 chenryn left, denis_boyun_ joined 06:08 chenryn joined, [Sno] joined 06:12 ventica left 06:22 thou left
sergot o/ 06:23
06:31 anaeem1 joined 06:32 chenryn left 06:34 chenryn joined 06:39 jack_rabbit joined
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 06:42 grondilu joined
grondilu jack_rabbit: you want to look at *autopriming* in S02 and infix:<...> in S03 06:43
jack_rabbit Thanks. 06:44
Woodi [Coke]: about poker... for a while I wondered what cauld be used to make bids... commits ? :) 06:45
06:51 yakudza left 06:53 chenryn left
moritz \o 07:03
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:04
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.
It's an interesting operator.
07:07 chenryn joined, robins is now known as robinsmidsrod
grondilu I think it's called the sequence operator, though. 07:07
(if anything, the series operator would be [\+]) 07:08
moritz it's been renamed once 07:13
from sequence to series, or the other way round
vendethiel knows it as the sequence operator 07:14
07:16 yakudza joined, darutoko joined 07:25 kaleem joined
masak good morning, #perl6 07:25
07:27 chenryn left 07:28 chenryn joined 07:29 dmol joined 07:31 smash left 07:32 smash joined, btyler left, btyler joined, salv0 left 07:33 brrt joined 07:39 salv0 joined 07:42 kivutar joined 07:43 cognome left, cognome joined 07:48 cognome left 07:49 dakkar joined 07:50 virtualsue joined 07:57 mattp_ joined 07:58 chenryn_ joined, [particle]1 joined, synopsebot left, chenryn left, mattp__ left, btyler left 07:59 btyler joined, [particle] left, daxim_ left 08:01 Sqirrel left 08:03 synopsebot joined 08:04 thou joined, fhelmberger joined, fhelmberger left, fhelmberger joined 08:08 thou left 08:13 daxim_ joined 08:21 chenryn_ left 08:26 chenryn_ joined 08:27 jack_rabbit left
grondilu r: my @a = ^10; say "4" ~~ / <@a> /; 08:28
camelia rakudo-jvm 3f3abe: OUTPUT«(timeout)»
..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…»
..rakudo-parrot 3f3abe: OUTPUT«「4」␤␤»
08:30 raiph left 08:31 dayangkun left 08:38 brrt left 08:41 ventica left 08:44 robinsmidsrod left 08:46 cosimo joined 08:47 robins joined, virtualsue left, dayangkun joined 08:51 [particle] joined 08:52 ggoebel1111110 joined 08:53 mhasch left, psch left, krunen left, btyler left, [particle]1 left, chenryn__ joined, ggoebel111119 left, fling left, Pleiades` left, lue left, hugme left, sergot left, chenryn_ left, btyler joined, kaleem left, Psyche^_ left 08:54 ashleydev left, pecastro joined, Psyche^ joined, psch joined, kaleem joined, sergot joined, krunen joined, ashleydev joined, hugme joined, ChanServ sets mode: +v hugme 08:55 fling joined, Pleiades` joined, lue joined
vendethiel prog21.dadgum.com/121.html 09:03
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
masak vendethiel: I mentioned a very similar idea in the backlog, at irclog.perlgeek.de/perl6/2014-07-25#i_9081488 09:09
09:09 brrt joined
masak (though that was more on the type level, I guess) 09:09
vendethiel yeah 09:10
the post reminds me more of given+ARC, though.
ie `given open 'foo'` -- but I think we already talked about that
masak yeah.
crsmithdev.com/arrow/ looks exceedingly sane. 09:15
vendethiel thought this was about theoretical arrows 09:16
masak you wish :P 09:22
09:26 brrt left
dalek ecs: d5dfeca | (L. Grondin)++ | S99-glossary.pod:
adding NFA
09:38
09:40 virtualsue joined 09:44 spider-mario joined
masak .oO( National Fecurity Agency ) 09:48
lizmat vendethiel: looking at XinY, I'm wondering about the example "$c .= say; # method call and assignment" 09:50
vendethiel lizmat: I think I'm explaining compound operators somewhere else, though 09:51
lizmat maybe we need a better method than "say" there
vendethiel I see what you mean.
masak +1
lizmat maybe $c .= Int
masak or .=abs or .=uc 09:52
vendethiel still a bit confusing, though.
09:52 thou joined
vendethiel Yeah, .=uc is probably better 09:52
jnthn @a .= grep: *.fluffy; # can be a nice one
Yes, uc is easier and works too :)
vendethiel jnthn: I don't explain the bar: foo syntax
jnthn ah, ok :)
lizmat .uc ++
vendethiel (not yet, at least)
jnthn Well, can use paren syntax too :)
But yeah, .uc is easier.
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...
vendethiel I'm just waiting for sjn++ to rebase his PR and fix all those little things :)
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␤»
masak \o/
I think if my 2004 self saw the Perl 6 code I was writing nowadays, he would be quite jealous :) 09:55
09:56 thou left 09:57 rindolf left
vendethiel masak: my 2014 self is kinda jealous of the Perl 6 code he reads :) 09:57
masak :) 09:58
09:58 brrt joined 10:01 ivanshmakov joined
lizmat m: sub a(% (:v($val))) { say "Got val $val" }; a({v=>42}) # works 10:01
camelia rakudo-moar 3f3abe: OUTPUT«Got val 42␤»
vendethiel well, nothing's wrong with ruby ... except activerecord, but then :(.
10:01 kaare_ left
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
vendethiel lizmat: yeah, I pulled my hair quite a bit with that one 10:01
10:02 kaare_ joined
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:02 chenryn__ left 10:03 ivanshmakov left
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␤»
lizmat aha!
seems we're missing the implicit *% in that case
jnthn You only get that in a method. 10:05
And not in a sub-sig
lizmat ah, good point :-)
vendethiel the error is a bit LTA, though ;) 10:06
10:07 ivanshmakov joined
lizmat what error :-) 10:07
vendethiel exactly ;)
lizmat nqp::die(@error[0]) with @error being empty by the look of it 10:08
it returns from the bind operation with BIND_RESULT_FAIL 10:09
jnthn Mebbe there's something sttting $error and not $error[0] somewhere 10:10
lizmat is checking 10:11
10:11 robins left 10:12 chenryn__ joined 10:14 robinsmidsrod joined 10:20 gr33n7007h joined 10:28 Akagi201_ joined 10:29 rindolf joined, Akagi201 left 10:30 chenryn__ left 10:43 kurahaupo left 10:44 chenryn__ joined 11:05 dakkar left
timotimo o/ 11:22
11:24 rindolf left 11:28 rurban joined
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:29
11:38 chenryn__ left 11:40 thou joined 11:41 xragnar_ joined 11:42 xragnar is now known as Guest3913, Guest3913 left, xragnar_ is now known as xragnar 11:44 thou left 11:52 dayangkun left
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:00
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..
Is it chewing memory too?
A common mistake is trying to do left-recursion.
12:09 dayangkun joined
ChoHag I've no idea what left-recursion is, but backtracking is quite likely. 12:12
12:15 rindolf joined
ChoHag The unicode characters displayed when I print a Match are reqlly screwing up less. 12:16
12:18 cognome joined
ChoHag Interesting it's not hanging on parse, it's hanging on say on the variable created from processing the Match. 12:19
timotimo the match object may be gigantic 12:21
ChoHag It appears to be. 12:24
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:29
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:30
ISTR made or make or something in the grammar doc.s 12:31
12:33 brrt left
lizmat could it be we have recursion in the Match object, that makes the gist go into a infinite loop ? 12:36
*an
jnthn That'd be very odd, unless you build a recursive data structure hanging off .made 12:37
12:41 dakkar joined 12:43 jnap joined 12:45 rurban left 12:51 PotatoGim left 12:54 chenryn joined 12:56 rurban joined
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:57
ChoHag It doesn't die, it just eats all of my resources. 12:59
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?
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:03
PerlJam greetings! 13:06
13:06 brrt joined
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!
psch s/does/should/
s/they don't/it doesn't/ # :/
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: perlcabal.org/syn/S05.html#line_4239
psch ugh, bullet point...
13:17 dayangkun left
PerlJam psch: maybe it's time to step away from the keyboard ;) 13:20
lizmat commute to Kyffhäuser Denkmal & 13:22
13:22 lizmat left
psch PerlJam: good idea, i think. i'll save the rebasing for later as well :) 13:24
13:25 guru joined 13:26 guru is now known as Guest2784, Guest2784 is now known as ajr_, woolfy left 13:31 dayangkun joined 13:33 lichtkind joined 13:39 bjz joined 13:40 brrt left 13:43 dakkar left
ChoHag God damn programmers. 13:45
"How do you do foo?"
"Why would you want to do foo?"
GAH! Just fucking tell me!
tadzik it's a valid question in some cases
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.
(or maybe "foo" is underspecified)
ChoHag s/foo/simple_foo_with_no_ambiguity/g
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 ;)
ChoHag It's a disgusting attitude.
tadzik pffft
just tell us what your foo was
ChoHag (in bash) "Can you make a readonly variable (made with declare -r) readwrite?"
PerlJam yeah ... so we can ask why you want to do it ;>
tadzik I can see why any programmer would ask "why?" 13:48
you don't need to be an arrogant asshat to see a design flaw here
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:49
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
ChoHag None of that is relevant.
PerlJam ChoHag: so, I'm pretty sure the answer is "no".
ChoHag It is a simple yes/no question. "Can this thing be done?"
Why is irrelevant.
It is no. 13:51
PerlJam ChoHag: though, the readonlyness won't carry over to subshells (if that helps)
tadzik 1545 ChoHag | "How do you do foo?"
ChoHag There are some helpful people on IRC.
tadzik how is not a boolean question
13:52 chenryn_ joined
ChoHag sighs 13:53
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? 13:55
13:56 chenryn left 14:00 thou joined
ChoHag I didn't. 14:00
I was curious.
The attempt to audit users on the server here consists of 'declare -r HISTFILE=...'. I wondered how easy it was to break. 14:01
See? Developers almost never consider the entire problem.
Just the one they think they understand.
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:26
14:28 kaleem left 14:30 dakkar joined
hoelzro morning #perl6 14:31
timotimo hey hoelzro
hoelzro o/ timotimo
ChoHag colomon: Actually the point I never got on to is that #perl* tends to be more helpful and less obstructive. 14:36
But then it became a lie... 14:37
masak .oO( YOU LIE! /me throws shoe )
cxreg No such method 'moar' for invocant of type 'Supply' 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:40 Alina-malina left 14:42 Alina-malina joined
masak can't find it now, though. 14:43
[Coke] masak: groups.google.com/forum/#!msg/comp...4PVIbEzZUJ is one version 14:45
lichtkind masak: hai , see you in the city of wisdom?
14:45 anaeem1 left
masak [Coke]++ 14:45
[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
masak lichtkind: provided the whole world doesn't go down the drain before then, yes, definitely.
hoelzro m: DOC INIT {}
camelia ( no output )
hoelzro hmm
14:47 brrt joined
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:47
hoelzro oh, duh 14:48
masak *nod*
hoelzro you actually have to use --doc for that!
perl6 --doc -e 'DOC INIT {}'
that demonstrates the bug
I have an outstanding PR to fix it, though
masak lichtkind: for those of us who know our Greek, that's pretty well known, too. 14:49
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/
how appropriate -- it being the city of wisdom and all, I mean. 14:51
14:51 ventica joined
lichtkind hahah 14:51
14:53 ventica2 joined, anaeem1 joined 14:54 anaeem1 left, chenryn_ left 14:55 Ven joined, ventica left, chenryn_ joined
Ven $str.match(/:s public var $<name>=<.ident> ':' $<type>=<.ident> /, :g).list.map(*<name type>>>.Str).hash.perl 14:55
masak: not jealous anymore, now I just do it :D.
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.
maybe I didn't make a lasting impression on you. ;) 14:57
lichtkind masak: you said so
14:57 raiph joined
lichtkind no mee gut feeling was you were but i was not sure 14:58
so you mostly know the talk even you didnt understood it
but i exetended the neurology part
Ven is there something like `%hash<key1 key2>` that returns a hash with the keys instead ?
14:59 jdv79 joined
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
14:59 chenryn_ left
jnthn m: my %h = a => 1, b => 2, c => 3; %(%h<a b>:p) 15:00
camelia ( no output )
jnthn m: my %h = a => 1, b => 2, c => 3; say %(%h<a b>:p)
camelia rakudo-moar 3f3abe: OUTPUT«("a" => 1, "b" => 2).hash␤»
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:01 robinsmidsrod left
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␤»
jdv79 JSON::Tiny taking 4 minutes is just crazy
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.
Ven erm.
15:03 raiph left
masak is enjoying the acerbic but dry humor of 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
camelia rakudo-moar 3f3abe: OUTPUT«("a" => 1, "b" => 2).hash␤»
jnthn m: my %h = a => 1, b => 2, c => 3; my %x = %h<a b>:kv; say %x
camelia rakudo-moar 3f3abe: OUTPUT«("a" => 1, "b" => 2).hash␤»
Ven masak: this is like the C++ FQA ?
jnthn Ven: I just meant ^
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
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.
Ven hahaha
"$string x .5" this one is hilarious 15:07
jnthn m: say "fooooo" x .5 15:09
camelia rakudo-moar 3f3abe: OUTPUT«␤»
jnthn aww!
15:09 chenryn_ joined
jnthn m: say "fooooo".substr(0, * * .5) 15:09
camelia rakudo-moar 3f3abe: OUTPUT«foo␤»
jnthn :D
Ven *++ 15:10
15:10 denis_boyun_ left
Ven "gcc -larry -Wall" I KNEW IT 15:10
tadzik :D 15:12
15:16 pmurias joined
btyler jdv79: I hope you noted the disclaimer in the README 15:19
re jansson/json::tiny
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
aside from any potential difference in raw speed 15:20
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
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
p6 would have to get a lot closer to ever be used for somethign like that
timotimo right. JSON::Tiny is a very "clean" implementation of json parsing 15:22
15:22 FROGGS__ is now known as FROGGS
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
jdv79 and those sizes are not outside the realm of reality. i see json blobs in the 10s of MB regularly.
btyler there were some others that prioritize speed more, but were limited in other ways
ventica2 masak: nice one... I love the clear_the_screen sub! x-D
Ven I guess grammars are always gonna be slower than hand-written parsers anyway :)
timotimo not so sure about that
15:23 fhelmberger left
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
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
btyler my suspicion, though, is that jansson's performance is 'good enough' for the vast majority of services
Ven timotimo: can we attain p5's perf, though ?
btyler at least in my line of work I don't often encounter 50+mb JSON blobs
Ven (without a JIT 'cause that's cheating :P.)
timotimo that's cheating?
how about the bytecode specializer? 15:25
Ven isn't that like a small jit ?
15:25 dayangkun left
timotimo i think it's a question of definitions 15:25
Ven when is it run? that's mainly my question here
timotimo it's a jit that compiles to bytecode instead of native code
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?
FROGGS lichtkind: no, sadly :/ 15:27
15:27 raiph joined
masak FROGGS: oh, you're not coming? you will be missed. :/ 15:28
Ven timotimo: I'm mainly talking about removing while-running optimizations.
But I get that with such a vm, it's pretty unfair. Well, I think ruby does that tho
timotimo in that case, nah, we won't reach that same performance
FROGGS masak: I stay here because of $smallest-kid
masak FROGGS: I guess congratulations are in order :> 15:29
moritz FROGGS++
or rather, FROGGS.family++
FROGGS she is almost a month old :o)
15:29 Ven left
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
ventica2 masak: I hope it's not a Rat anyway... :P
moritz masak: as if Int was the only ++able type
masak moritz: right, there's all the other Real types, and Date, I guess :P 15:32
jnthn timotimo: Yes, we do :)
moritz masak: an Str, even
masak: and a family isn't too far from a String of people
timotimo jnthn: would you like to point out some? :)
moritz though it's more like a graph :-)
masak .oO( familz )
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
masak timotimo: l'hard
:P
ventica2 m: my $a='a'; $a++; say $a
camelia rakudo-moar 3f3abe: OUTPUT«b␤»
timotimo ventica2: that feature succs. 15:34
ventica2 haha
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:35
15:35 raiph left
masak m: my $lang = "perl"; $lang++ for ^45_565; say $lang 15:36
camelia rakudo-moar 3f3abe: OUTPUT«ruby␤»
masak grins widely
ventica2 masak: true programming gems... 15:37
jnthn masak: You'd got that number memorized, hadn't you? :P
masak how to make yourself popular on your home IRC channel...
jnthn: no, I had to re-compute it by bisection :P
jnthn: it looks familiar, though. 15:38
jnthn Wonder why :P
pmurias re JSON::XS sticking stuff directly into p5 guts will MoarVM expose such an API? 15:39
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:40
15:43 robinsmidsrod left 15:44 robinsmidsrod joined, robinsmidsrod left 15:45 robinsmidsrod joined
pmurias btyler: doesn't your binding wrap the jansson structs as Perl6 classes lazily? 15:47
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
lazy in that the json stuff all stays in jansson's domain
15:50 pecastro left
TimToady notes that you can't get to php by incrementing 'perl'... 15:51
pmurias btyler: so the NativeCall penalty should be high 15:52
for just parsing and doing nothing
TimToady does it use the Cstruct repr? 15:53
btyler cpointer
it peeks into the underlying struct in order to extract a few bits of data, like what jansson thinks the JSON type is 15:54
github.com/kanatohodets/p6-json-ja...sson.pm#L7 is the code in question 15:56
pmurias measuring the JSON::XS vs jansson from C would be an interesting comparision 15:57
15:58 FROGGS[mobile] left, ajr_ left
timotimo pmurias: "directly sticking stuff into the guts" is kind of what the code that results from specialization usually does 15:59
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
timotimo object creation oftentimes becomes "allocate this many zeroes and put the owner's thread ID here and the STable address here" 16:00
16:00 guru is now known as ajr_, hoverboard joined
pmurias what I meant is are there plans to expose an API to manipulate MoarVM objects from C code 16:04
?
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...
timotimo right 16:06
jnthn We already mark various things as MVM_PUBLIC; a superset of that can become API at some point.
The REPR conveience functions are the typical way to do it.
pmurias using NativeCall instead of manipulating the objects from C helps with portability between VMs
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
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.
And object/stack management. 16:08
You don't have to do reference counts at least. :)
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
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 robinsmidsrod left
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?
jnthn The correct way to write the above is
MVMROOT(tc, an_object_pointer, {
temp = call_some_moarvm_thing_that_allocates(); 16:13
});
some_function(an_object_pointer, temp);
(Note that by allocates I mean "a GC-able objec", not malloc and friends)
pmurias so not exposing such an API at this moment seems sensible ; 16:14
;)
jnthn Yeah, I'm not in a huge hurry to until somebody's use case is way too pressing to ignore.
timotimo jnthn: do i need to root something in the initialize function of MVMCompUnit here? github.com/MoarVM/MoarVM/commit/ef...9f8e65cL27
16:14 robinsmidsrod joined
timotimo (dat link o_O) 16:14
jnthn timotimo: Yes. root 16:15
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
Also, that probably is more OT on #moarvm ;)
uh
less :)
16:16 denis_boyun joined
timotimo oke 16:18
FROGGS TimToady: do you see in that piece of grammar why it would choose the wrong thing? gist.github.com/FROGGS/e991e1b3bf8796d91b82
16:19 sqirrel joined
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:19
16:19 pmurias left 16:21 denis_boyun left 16:24 ajr_ left 16:26 denis_boyun_ joined
TimToady didn't you already figure out that if you changed the <sym> to a literal it worked better? 16:26
or am I misremembering?
FROGGS I had to put in a <?before ...> hint in an upper rule to make it work 16:27
16:27 erkan joined
TimToady well, it still sounds like it's doing the tiebreakers wrong 16:28
16:29 guru joined
FROGGS like in here: github.com/rakudo-p5/v5/commit/37e...e4837e2027 16:29
16:29 guru is now known as Guest24513 16:30 Guest24513 is now known as ajr_, denis_boyun_ left
FROGGS I guess I have to strip the grammar down to a short example of my problem 16:31
16:32 denis_boyun joined
TimToady or instrument the tiebreaker code to log what it's doing there 16:32
or both
FROGGS how do I recognize that code?
TimToady probably talks about fates 16:33
16:33 dmol left
FROGGS this? github.com/MoarVM/MoarVM/blob/mast...NFA.c#L321 16:33
TimToady I wonder if the problem is that quicksort is not stable... 16:35
FROGGS or here: github.com/perl6/nqp/blob/master/s...ex/NFA.nqp
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
FROGGS err, wrong
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
FROGGS in the second iteration of the while at L354 the term:identifier and term:name are pushed to it and prefred
(only have one hand to type right now) 16:38
16:38 denis_boyun left 16:39 denis_boyun joined, FROGGS[mobile] joined
FROGGS I am trying the sort approach then 16:39
TimToady well, BEGIN oughta win anyway on longest literal, but that still appears to be NYI 16:40
16:40 itz joined
FROGGS true 16:40
TimToady I wonder if it's using the wrong rule to check rule ordering
it should be using the term: rule, not identifier
16:41 itz_ left
TimToady what happens if you move the identifier rule to after BEGIN 16:41
TimToady goes back to logging some backlogging 16:42
16:42 Rotwang joined
FROGGS doesn't help 16:43
first it has six fates, containing the right one 16:44
but when I dump all checks for a literal (fate codepoint), there is none that can match a 'B'
16:45 [Sno] left
FROGGS then, in the next iter of the while loop two more fates come into being, name and identifier 16:45
16:46 virtualsue left
FROGGS so maybe the nqp code compiles the fates wrong? 16:46
hmmm
TimToady do you get a 'B' if you use literal 'BEGIN' rather than <sym>?
maybe <sym> is busticated
FROGGS no 16:47
still no B
TimToady I assume your input has a B there...
16:47 chenryn_ left
FROGGS when I put a <?before BEGIN> in statement_prefix, I see all first chars of these rules 16:47
e, d, B, U, ... 16:48
that's my input: perl6-m -I../v5/lib -e 'use v5; BEGIN { say 1 }'
TimToady so statement_prefix isn't gathering the NFA correctly, maybe
does it also fail if you take out the space before BEGIN? 16:49
FROGGS yes and yes
TimToady so probably not a ws foulup
could statement prefix be failing somehow so you end up dropping into term instead? 16:50
oh, wait, that's a proto :) 16:51
FROGGS I dont think so, because it matches when I comment name and identifier
TimToady but it sure seems like a transitivity problem via statement_prefix at this point
FROGGS yeah
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
hmmm
TimToady when there's no 'B', is there a 'b'?
FROGGS no 'b' 16:53
TimToady so probably not :i
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
FROGGS jnthn: I have to find a good place to call it then :o) 16:55
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?
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
token term:sym<statement_prefix> { <statement_prefix> } -> token term:sym<statement_prefix> { <?before BEGIN> <statement_prefix> }
TimToady but then it should not show the other statement prefix's first chars, only BEGIN's 16:58
FROGGS but the others show up 16:59
TimToady before is supposed to clobber anything after it
well, <?before> is, and <!before> is supposed to ignore the before and take what comes after 17:00
jnthn I believe anything after a before just shoves a fate edge there and ignores what's beyond it. 17:01
That is, it takes foo in <?before foo>
TimToady S05:2854
synopsebot Link: perlcabal.org/syn/S05.html#line_2854
TimToady but then how are the other prefix chars getting in there? 17:02
there should only be a 'B' in that case
does <?before BEGIN> vs <before BEGIN> make a difference? 17:03
(though that wouldn't explain the original bug) 17:05
FROGGS[mobile] I'll check in a bit 17:08
17:10 gfldex joined 17:12 dmol joined 17:15 dakkar left
dalek kudo-star-daily: 5627f0d | coke++ | log/ (14 files):
today (automated commit)
17:23
rl6-roast-data: 2e92aa4 | coke++ | / (3 files):
today (automated commit)
17:32 sqirrel left 17:37 pecastro joined
dalek kudo/nom: 1cf7ca6 | moritz++ | tools/lib/NQP/Configure.pm:
[Configure] pass --git-protocol on to NQP's Configure.pl, [Coke]++
17:48
17:51 kurahaupo joined 17:55 virtualsue joined, grondilu left
[Coke] moritz++! 17:55
17:58 denis_boyun left
rindolf TimToady: hi, how do you feel? 17:58
TimToady much the same 17:59
rindolf TimToady: I See. So not worse?
TimToady my eye doesn't like the stitch rotting in it much, but that's just a waiting game 18:00
FROGGS TimToady: <before BEGIN> also works, and also the other rules (basically forbidden by the <before...>) show up 18:01
TimToady so that appears to be an additional bug 18:04
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
m: say "abc" ~~ / <before a> abc /
camelia rakudo-moar 3f3abe: OUTPUT«「abc」␤ before => 「」␤␤»
TimToady should turn into a roast test or two... 18:06
FROGGS n: say "abc" ~~ / <before a> abc /
camelia niecza v24-109-g48a8de3: OUTPUT«「abc」␤␤»
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
FROGGS ahh
TimToady that's why we use ?
to suppress that
FROGGS m: say "abc" ~~ / <.before a> abc /
camelia rakudo-moar 3f3abe: OUTPUT«「abc」␤␤»
FROGGS why don't we use that? 18:08
I had thought that ? and ! mean zerowidth, and zerowidth mean that it doesnt capture
TimToady no, it's simply the existence of any punctuation before the word that suppresses capture 18:09
FROGGS ahh
TimToady . also works because 'before' already implies ?
so the ? is redundant, except for suppressing capture, which . also does 18:10
FROGGS ahh, I see
18:11 [Sno] joined
TimToady m: say "abc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] / 18:12
camelia rakudo-moar 3f3abe: OUTPUT«HERE␤「a」␤␤»
TimToady m: say "bc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] /
camelia rakudo-moar 3f3abe: OUTPUT«HERE␤HERE␤HERE␤Nil␤»
TimToady that should not say HERE at all
well, maybe I have to work harder 18:14
m: say "bc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] | x / 18:15
camelia rakudo-moar 3f3abe: OUTPUT«Nil␤»
TimToady m: say "abc" ~~ / <!!{ say "HERE" }> <?before a> [a|b|c] | x /
camelia rakudo-moar 3f3abe: OUTPUT«HERE␤「a」␤␤»
TimToady okay, that's better
in this case it's not copying the b into the NFA
18:16 cognome left
TimToady so the fate is rejecting the b match before getting to the before 18:16
I had to add the |x because without an alternation it doesn't bother to copy out the NFA to the outer level 18:17
18:23 Sqirrel joined 18:24 Akagi201_ left, ajr_ left 18:25 Akagi201 joined 18:27 Akagi201_ joined
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:31
18:31 Akagi201 left 18:34 zby_home_ joined 18:35 Akagi201_ left 18:45 ventica2 left 18:51 dalek left 18:52 dalek joined, ChanServ sets mode: +v dalek 18:54 khisanth_ is now known as Khisanth
TimToady though it kinda looks like nqp doesn't implement temp 18:56
18:58 anaeem1 joined
FROGGS hmmm, 2154 lines of code is not really 'golfed down' :/ 19:00
but now I have a Perl5::Grammar that is kinda stand-alone 19:02
TimToady: nqp does not have temp, aye 19:04
nwc10 stand alone from what? 19:06
FROGGS nwc10: before you could only switch to it by compiling a program that has 'use v5' in it 19:07
now I can use the stripped down version to parse a string and it gives me a tree of match objects 19:08
so it is a little bit easier to debug I hope
19:11 darutoko left 19:12 dwarring joined 19:16 denis_boyun_ joined 19:21 denis_boyun_ left, denis_boyun__ joined 19:24 guru joined 19:25 guru is now known as Guest74408, Guest74408 is now known as ajr_
FROGGS I think that is my issue: 19:27
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")
camelia rakudo-moar 1cf7ca: OUTPUT«「foo」␤ a => 「foo」␤ b => 「foo」␤ c => 「foo」␤ d => 「foo」␤␤»
FROGGS this works as expected, the literal 'foo' gets used even when it is several tokens away...
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」␤␤»
FROGGS but a multi breaks it
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」␤␤»
FROGGS even here
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")
camelia rakudo-moar 1cf7ca: OUTPUT«「foo」␤ a => 「foo」␤␤»
FROGGS and <sym> is not the issue
19:30 denis_boyun__ left, raiph joined
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␤»
FROGGS but it works in 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:32
camelia rakudo-moar 1cf7ca: OUTPUT«bad␤「foo」␤ a => 「foo」␤␤»
FROGGS here
that line of code is identical to the one above that
and it behaves differently 19:33
jnthn: can you make sense out of that?
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」␤␤»
FROGGS and it is a moarvm issue :/
19:34 denis_boyun_ joined
FROGGS gah, sometimes I don't enjoy silence :o) 19:39
19:39 denis_boyun_ left 19:40 brrt joined 20:02 iarna joined 20:05 denis_boyun_ joined 20:06 brrt left 20:08 denis_boyun_ left
FROGGS jnthn: NFA.__dump is broken because it uses sprintf which has a grammar nowadays :o) 20:08
timotimo it infiniloops, eh? 20:09
FROGGS it does 20:10
timotimo well, infinicurses i suppose
FROGGS yes
but hopefully not any longer... 20:11
20:13 sqirrel_ joined 20:18 hoverboard left
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
What's the :sym<> for? 20:20
20:20 beastd joined
timotimo what you have between the < > will be what is literally matched by <sym> inside the rule 20:20
hoelzro huh, I never knew that 20:22
I'd always assumed <sym> was special
ChoHag Does it need to be sym?
timotimo does what exactly have to be sym? 20:23
hoelzro from what timotimo just said, I assume not
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␤␤»
ChoHag The bit between the : and the <, and between the < and the > in the rule itself.
That.
hoelzro m: my regex foo:rob<five> { <rob> } ; 'five' ~~ /<foo>/
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␤␤»
hoelzro I think I'm Doing It Wrong.
ChoHag m: my regex foo:rob<five> { <rob> } ; 'five' ~~ /<foo>/
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␤␤»
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>"
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…»
ChoHag Bah.
I'm totally new at this.
hoelzro I guess that if a regex isn't lexical, it *must* belong to a Grammar?
PerlJam I think sym *is* special right now.
timotimo something like that
hoelzro that's one thing that continues to throw me
timotimo PerlJam: i think someone patched that a few months ago
20:29 jnap1 joined, jnap left 20:30 denis_boyun joined 20:35 klaas-janstol joined 20:38 kaare_ left, mhasch joined 20:39 kurahaupo left 20:42 zby_home_ left 20:48 kivutar left 20:55 Rotwang left 20:58 sqirrel_ left 21:09 lichtkind left, ventica joined
egrep timotimo: I'm here now. :P 21:15
21:15 zengargo1le joined 21:16 gfldex left
timotimo hi 21:16
21:16 telex left
egrep Hi. 21:16
timotimo er, what was i going to explain again? %) 21:17
egrep nqp I think. :P 21:18
timotimo right. what confused you about it again?
what it's for?
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
timotimo NQP is a nice little language to build a compiler in
21:18 zengargoyle left, telex joined
timotimo it gives a decent amount of convenience features, the grammar engine in it is "fully" there 21:18
but it has quite limited semantics; for example, there is no such thing as the scalar containers and friends in NQP 21:19
that means you cannot assign to variables, you can only bind
there is mo multiple dispatch except for type-dispatch on the first argument or something
there's no metaoperators, there's only very few classes in the "setting"
but NQP is self-hosting; the NQP compiler is actually written in NQP nowadays (and has been for several years now) 21:20
all the higher-level things we offer in perl6 are based on nqp::foobar ops that get you much closer to the VM 21:21
egrep So... rakudo's written in nqp and therefore can be build/run on any vm that supports nqp? 21:22
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.
timotimo parts of rakudo are written in perl6, but that's only the built-in classes in the "setting"
that's right
[Coke] (and) the nqp::foobar ops, I mean.
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
jnthn Which makes writing the compiler in a (restricted) Perl 6 a viable approach without ruining compiler developer productivity.
egrep Okay. 21:31
rindolf hopes TimToady is OK - he left for lunch two hours ago. 21:32
egrep Maybe TimToady wants to have a long, delicious lunch?
masak some of my best lunches were two hours long. 21:33
21:34 lizmat joined
PerlJam Maybe, just maybe ... TimToady has a life outside of IRC ;) 21:37
masak *gasp*
egrep I find it hard to believe that anybody has a life outside of IRC.
masak is it contagious? 21:38
egrep Also some of my best lunches were edible.
I hope not.
21:39 ventica left
rindolf egrep: IRC is much more important than life. get your priorities straight! 21:39
egrep: also - WTF is life?
PerlJam Weird Al has a solution for the contagion: www.youtube.com/watch?v=w-0TEJMJOhk
rindolf egrep: where can i download it from?
egrep rindolf: uncyclopedia.wikia.com/wiki/Life
rindolf egrep: uncyclopedia ♥! 21:40
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
egrep: which may be offensively off topic here.
egrep: people think that happy, good, productive, people are a strain on society. 21:43
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
21:45 woolfy joined
PerlJam hugme: hug rindolf 21:45
hugme hugs rindolf
PerlJam hugme: hug woolfy too 21:46
hugme hugs woolfy
woolfy hugs all of you
masak hugme: hug all in #perl6
hugme hugs all
woolfy I just logged in... why the happy hugging? No reason? Is ok too...
masak woolfy: we're happy you're here! 21:47
PerlJam woolfy: does there need to be a *reason*?!?
:)
21:47 BenGoldberg joined
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:47
woolfy PerlJam: no reason needed... I am just a curious canine. 21:48
woolfy hugs ingy too! 21:49
ingy is a woolf a canine?
woolfy duh
ingy :D
PerlJam ingy: <cynic>Sure ... until github figures out what's going on and changes the rules</cynic> :-)
rindolf hugme: hug masak
hugme hugs masak
rindolf hugme: hug PerlJam
hugme hugs PerlJam
masak hugs PerlJam
woolfy canine hugs for masak
masak hugs hugme
rindolf hugme: hug Chuck Norris 21:50
hugme hugs Chuck
egrep hugme: help
hugme egrep: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
timotimo do we have an implementation of hmac that is compatible with python's hmac module?
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)
masak hugme: hug egrep
hugme hugs egrep
egrep hugme: hug hugme
hugme hugs hugme and blushes
timotimo (with sha256)
21:54 woolfy left 21:55 woolfy joined
FROGGS jnthn: I added the NFA.dump of nqp-m/perl6-m/perl6-p... gist.github.com/FROGGS/e991e1b3bf8796d91b82 21:57
jnthn: in what way can perl6-m be different here?
ingy here's a list of all the perl6 members not following kentfredic that I generated with `git-hub`: gist.github.com/f132f20c0e63038be155 21:59
21:59 dmol left
rindolf ingy: I'm following kentnl now. 22:00
ingy rindolf: I was just about to call you out :)
ingy looks at masak and jnthn :)
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
timotimo: use Digest for the sha256 function
timotimo: github.com/retupmoca/P6-Digest-HMAC/
timotimo and that's compatible with the python module? 22:02
ah, i see you do the inner/outer pad dance
retupmoca timotimo: as far as I know
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 lustlife left
timotimo are you interested in helping with implementing an ipython-compatible kernel based on p6? 22:03
it'll require understanding and improving the net-zmq module 22:04
one thing that absolutely puzzles me is the section on how the heartbeat thing works
retupmoca not right now probably, I'm somewhat lacking in time in the near future
timotimo that's all right 22:05
i suppose i'll try bothering the ipython devs a bit
ipython.org/ipython-doc/2/developme...or-kernels - seriously ... how is this explanation supposed to explain anything? 22:06
masak 'night, #perl6 22:08
FROGGS gnight masak
22:09 anaeem1 left
jnthn FROGGS: I wonder if the way we compile <?{ say("good") }> differs enough to throw off the NFA builder? 22:11
22:13 virtualsue left
FROGGS jnthn: I stripped these and updated the gist 22:14
no change
22:15 denis_boyun left 22:18 klaas-janstol left
jnthn The perl6-m one looks like a syntax error now? 22:20
FROGGS jnthn: ohh, copy&paste error 22:21
the shown output is correct 22:22
well, it is not really a copy&paste error, it is bash history + buffering error
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?
FROGGS ohh, good point 22:24
22:25 klaas-janstol joined
jnthn Sorry I've not been much help. JIT + deopt = non-trivial distraction... 22:25
FROGGS sure 22:26
ast differs just for p6bindsig
22:27 klaas-janstol left
jnthn Between Rakudo and NQP? 22:27
Or r-p and r-m?
FROGGS r-p and r-m 22:28
nqp-m and perl6-m is not that easy to check
jnthn I was curious about r-m vs nqp-m
FROGGS will take a few minutes
jnthn But that it's the same on r-p and r-m eliminates one source of variance. 22:29
22:29 raiph left 22:31 Psyche^_ joined 22:34 xragnar left 22:35 xragnar joined, Psyche^ left
FROGGS the ast of nqp-m to perl6-m looks identical too 22:35
jnthn o.O 22:36
FROGGS instead of nqp: - QAST::Regex+{QAST::RegexCursorType}(:rxtype(concat)) perl6: - QAST::Regex(:rxtype(concat))
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
*NFAs
FROGGS I only compared the regex blocks btw (starting with a concat)
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 22:44 zengargo1le left 22:45 Alina-malina left 22:46 Alina-malina joined, raiph joined 22:51 rurban left 22:54 beastd left 23:00 rurban joined
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
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)»
..rakudo-moar 1cf7ca: OUTPUT«("12 12a 2" => 31, "12a 2 12" => 35, "2 12 12a" => 33).hash␤»
..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…»
..rakudo-parrot 1cf7ca: OUTPUT«("12 12a 2" => 33, "12a 2 12" => 28, "2 12 12a" => 38).hash␤»
23:07 ventica joined 23:08 kurahaupo_ joined 23:14 bjz left 23:16 oetiker left 23:24 klaas-janstol left 23:26 spider-mario left
dalek rl6-bench: a2f6856 | (Geoffrey Broadwell)++ | / (2 files):
Add --min-time option to set timing noise threshold

As requested by jnthn++.
23:34
23:35 SevenWolf joined, oetiker joined
ventica m: say "i am here" 23:36
yoleaux 05:49Z <vendethiel> ventica: thanks for reminding me of the RC :)
camelia rakudo-moar 1cf7ca: OUTPUT«i am here␤»
ventica vendethiel: sure thing... 23:37
23:42 labster left 23:50 Possum left 23:55 ventica left 23:58 rurban left