»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:08 jaldhar joined 00:12 benabik joined 00:21 stopbit left 00:27 jaldhar left 00:41 replore_ joined 00:44 nnunley left 00:48 yarp left 01:02 replore_ left 01:09 FROGGS__ left 01:10 FROGGS left, FROGGS__ joined 01:16 benabik left 01:23 FROGGS joined 01:32 benabik joined 01:44 MikeFair_ joined
MikeFair_ Good evening p6 :) 02:04
[Coke] hio 02:12
02:13 jaldhar joined
sorear o/ 02:17
02:28 PacoAir left 02:41 replore joined
[Coke] ok. last non-grammar/action cleanup pending for partcl is nqp issue #52 02:54
03:00 replore left
MikeFair_ [Coke]: Hey, I've got a couple functions that I'm running into problems with using NQP that are resulting in "method not found" errors 03:05
First is this one: #NQP::getinterp__P().recursion_limit(100000);
Second is: #NQP::hll-config($comp.config);
If I simply comment those two out, then I can get into the interactive shell, but if I type anything that successfully parses, 03:06
03:06 replore joined
MikeFair_ I get: Method 'ast' not found for invocant of class 'NQPMu' 03:06
[Coke]: Any ideas on what I'm looking for here? 03:07
(BTW, in case it wasn't clear, the getinterp__P.recursion_limit call and NQP:hll-config call 03:08
produce this: invoke() not implemented in class 'NQPMu'
sorear MikeFair_: it would be more useful to say 'invocant is null' 03:16
NQPMu is NQP's null value 03:17
MikeFair_ sorear: So NQPMu as I understand it is the compiler instance? 03:20
sorear: Or is it something NQP specific? 03:21
or wait
NQPMu is NQP's null value
03:22 oops left
MikeFair_ So the class that represents "NULL" in NQP has not implemented the command I'm trying to invoke 03:22
(the class that represents "NULL" being NPQMu 03:23
I get that
now. :)
03:26 replore left
sorear MikeFair_: you say $obj.foo but $obj is null. 03:27
03:34 oops joined 03:54 Chillance left
moritz good morning 03:55
03:59 tokuhiro_ left
sorear o/ 04:01
04:04 popl joined 04:09 telex left 04:16 telex joined 04:20 thou_ joined 04:23 thou left 04:24 telex left
MikeFair_ sorear: (Was putting kids to bed) Yep I see that / understand that error now 04:29
So it looks like I'm having problems with this line here: hll-config($comp.config); 04:35
Could not find sub &hll-config
04:35 telex joined
MikeFair_ Which seems an obvious enough description of what's going on 04:35
NQP.pm has an implementation of hll-config... 04:38
Which I'm assuming comes in as partof the "use NPQHLL;" line
sorear I would not make that assumption 04:49
MikeFair_ ok - tracked it down 04:50
it was a separate sub in the same file as another "MAIN" function
I don't know where the examples I was looking were getting their hll-config function from, but in this file, it was clearly a sibling sub to MAIN 04:51
it had exactly two lines in it:
$config<version> := '2012.09-220-g962ffbe';
$config<build-date> := '2012-09-07T07:16:59Z';
So once I copied in that hll-config sub that stopped being a problem 04:52
MikeFair_ still doesn't know if that was the _right_ way to fix it, but it works for now until I learn why that was the wrong move later on. :)
ok, so that exaplains everything there was to know about _that_ main executable file (main.nqp -> safirce.pir -> safire.c -> safire.o -> installable_safire) 04:54
There may be a pbc just after the pir but I don't recall immediately. :) 04:55
that being said I'm now on to why my Compiler.pm / Actions.pm / Grammar.pm are producing an Method 'ast' called on a null object reference. :) 04:56
(but only when there is a parse match) 04:57
05:07 skids left
moritz MikeFair_: but your stuff in a repo on github, so that I can have a look at it 05:12
MikeFair_ moritz: Ok... I'll have to set up an account first... if it doesn't take too long 05:15
moritz it doesn't. You just pick a username, past a public SSH key, and be done
sorear this assumes you have a public ssh key 05:21
ISTR having a lot of trouble with that step 05:22
there's very little documentation for something a typical person will do exactly once
MikeFair_ github.com/MikeFair/Safire 05:24
I skipped the ssh key
when I did a git push it asked me for an https login 05:25
I was able to use my github username/pass successfully
So build.sh is my stupid hand made build program because I'm not so sophisticated as to be able make setup.pir do the right thing, nor am I able to make Makefiles work for me (I never got the hang of them - spent most of my development life on the windows side or in scripting langauages) 05:27
src/safire.nqp is my clone of Perl 6's main.nqp tweaked to load the safire language instead of Perl 05:28
and src/safire is what you'd expect 05:29
Grammar/Actions/Compiler/Runtime pretty much exactly out of mk_language_shell save for my bad attempts at 'fixing" stuff 05:30
moritz: Thanks for looking at it btw
moritz almost got it to build 05:38
MikeFair_ hehe 05:39
Hmm, I think I had a languages library reference that I had to add (which I only had because I did a make install of NQP after I built it)
But I think that might have been causing runtime, not compile time errors 05:40
moritz MikeFair_: safire.c seems to be a generated file -- you shouldn't put that into git 05:41
otherwise you have a huge diff after each recompilation
MikeFair_ nods
yes, as is the .o, all the .pbcs, and all the .pirs too 05:42
I will need to make a .gitignore for that stuff
And the executable itself
moritz I'm about to send you a pull request that makes build.sh easier to adapt to other paths
should I remove the generated files from git too? 05:43
MikeFair_ please do
though without the ignore won't it just put them back?
moritz only if you do a 'git add .' or so
MikeFair_ right
don't expect I'll need to do that so that won't be a problem then 05:44
moritz MikeFair_: pull request sent. 05:49
MikeFair_: sorry, need to go now, $daughter is going beserk; I hope to get around to look at your actual problem soon :-) 05:50
MikeFair_ So how does that work? Will it show up somewhere that someone has made that request?
moritz: No worries! I have a 10 year old and a 7 year old myself :)
moritz MikeFair_: github.com/MikeFair/Safire/pull/1 05:53
MikeFair_ I figured it out - I had to click the "open" button over the request 05:54
At least that seemed to be the right thing :)
now wait
err nope - let's try "submitted"
moritz there should be "merge" button or so 05:55
MikeFair_ Click through the UI to "Pull Requests" then "Open" on the request didn't work 05:56
navigating direct with the URL you gave showed the merge button
It's now closed
moritz "Merge pull request", a very green button
oh, you merged it. Thanks. 05:57
MikeFair_ I wonder if I clicked "close" instead of 'open' on the "Pull Requests" tab if that would have made a difference
moritz: my pleasure! :)
moritz MikeFair_: ok, I see a problem now 05:58
./installable_safire -e 'say 42' 05:59
enter statement_control: say 42
Null PMC access in find_method('push')
current instr.: '' pc 795 (src/gen_actions.pir:333) (src/safire/Actions.pm:28)
the "Null PMC access in find_method('push')" means:
you've called $something.push
and $something is Null
MikeFair_ moritz: right, try -e 'say "42"'
moritz so, let's look at line src/safire/Actions.pm line 28
for $<EXPR> { $past.push( $_.ast ); }
so, we now know that $past is Null 06:00
the line before is
my $qast := QAST::Op.new( :name<say>, :op<callmethod>, :node($/) );
$qast vs. $past
it seems that nqp doesn't complain about misspelled variables :( 06:01
MikeFair_ moritz: hhe - nqp doesn't seem to complain about a lot of things :)
moritz so, when I fix the variable names, it gets further in the compilation 06:02
MikeFair_ I get to "enter TOP" 06:03
moritz MikeFair_: do you want to give commit access to that repo right away? then we don't have to go through the pull requests every time :-)
MikeFair_ nods. 06:04
How do I jsut make it totally open to whoever is willing to actually bother with branching/cloning it or whatever? 06:05
moritz I don't think there's such an option
MikeFair_ I think you've been added as a Collaborator
is that all I need to do? 06:06
moritz yes 06:07
I've pushed my fixes
MikeFair_ tries a git pull.
moritz now 06:08
./installable_safire -e 'say "42"'
enter quote:sym<">: "42"
exit quote:sym<">: "42"
enter quote: "42"
Method 'ast' not found for invocant of class 'NQPMu'
current instr.: 'term:sym<quote>' pc 1054 (src/gen_actions.pir:441) (src/safire/Actions.pm:42)
line 42 is make $<quote_EXPR>.ast;
the error message implies that $<quote_EXPR> is NQPMu, i.e. empty 06:09
so, let's look at rule term:sym<quote>
token term:sym<quote> { <quote> }
no quote_EXPR there, just a quote 06:10
so it must be changed to
make $<quote>.ast
MikeFair_: with me so far?
MikeFair_ sort of 06:11
the quote stuff is actually a merging of a couple different examples
moritz yes, I figured :-)
the important thing is not what you did wrong, but how to figure out what's wrong
MikeFair_ nods. 06:12
So I get really confused about this part
on the one hand quote is a term, and on the other it's a match rule
moritz well, you have token quote 06:13
which matches either "foo" or 'foo'
MikeFair_ The part I think I understand is that term:sym<"> is somehow saying that a <"> match is a terminal match
moritz right
MikeFair_ moritz: Which is handled by the two quote<'> and quote<"> tokens 06:14
moritz so, you have that token quote
06:14 mucker joined
moritz right 06:14
on the other hand you have to tell the grammar where to look for a quote
and of course you need to look for it in term position
for example in say '42' the grammar looks for a term after it has parsed the say 06:15
MikeFair_ but what I don't quite get is how the two are related.... I mean I kind of get that term:sym<"> is a terminal match rule, so it will go hunting for those... I think, and that one says go match <quote> which then fire off the token rules
moritz so, the term:sym<quote> rule is a way to tell the grammer "when you look for a term, one option is to look for a <quote>"
MikeFair_ right, well it's term:sym<"> { <quote> } 06:16
moritz token quote:sym<"> { <?["]> <quote_EXPR: ':qq'> }
sorear The :sym<"> part is mostly just a human readable name.
What matters is "term" (this is a terminal symbol) and { <quote> } (delegate responsibility to the 'quote' rule) 06:17
MikeFair_ Right
moritz MikeFair_: the quote:sym<something> rules are just all the alternative branches that might match when you write <quote>
you could just as well write token quote { <?[']> <quote_EXPR: ':q'> | <?["]> <quote_EXPR: ':qq'> } 06:18
MikeFair_ and the <quote> part on the term:sym<quote> is actually a completely different thing that is only meaningful in the context of distinguishing among the multiple term possibilities
moritz: Right, and there has to be a proto line to enable that to work
moritz both correct
MikeFair_: I think you did understand the concepts, it just needs a little time to sink in 06:19
MikeFair_ nods.
The more I work with it, bang my head, read the docs, the more the docs make sense
moritz MikeFair_: I've pushed another small fix 06:20
what I get now is
enter TOP: say "42"
Method 'ast' not found for invocant of class 'NQPMu'
current instr.: 'TOP' pc 273 (src/gen_actions.pir:145) (src/safire/Actions.pm:7)
line 7 is
make QAST::Block.new( $<statement_list>.ast, :node($/) );
so, $<statement_list> is empty
why?
let's look at token TOP 06:21
MikeFair_ I found the tutorials are doing a great job at walking me through "what" to do, and explaining the concepts behind what we're doing, but are a bit light on the "why I'm doing this particular line, and exactly what this line is exactly doing"
moritz token TOP { <statement_control> [ $ || <.panic: "Syntax error"> ]
}
so, not $<statement_list>, just a $<statement_control>
so you need to change the line to
make QAST::Block.new( $<statement_control>.ast, :node($/) );
MikeFair_ or make TOP a list 06:22
moritz correct
MikeFair_ ok, made it control 06:23
(I'll get to list, eventually, let's just take it one statement at a time for now)
moritz aye, small steps are good
MikeFair_ and it crashes in a way that I can't read exactly 06:24
Error while compiling block : Error while compiling op callmethod: invoke() not implemented in class 'NQPMu' 06:25
current instr.: '' pc 42925 (src/stage2/QAST.pir:15042) (src/stage2/QAST.nqp:2252)
so "op" is NULL?
which is part of "block"?
moritz well, the problem has to do with callmethod
what do you call the method on?
MikeFair_ say
in Runtime.pm
moritz no, the method name is 'say' 06:26
but what object do you call the method on?
MikeFair_ hehe - I think we're now in a "I'm going to cross that bridge when I come to it"
moritz you can't just say "call a method" without saying on which object
that's what the error message explains about, though in an obscure manner 06:27
MikeFair_ So this is where NQP differs a bit, I think
moritz: Now I totally get it
s/Now/No
but in PCT land, the Runtime.pm was just accessible
again, this is just taking the mk_language_shell and tweaking it as much as required to make that much work again 06:28
moritz but in PCT you couldn't call a method without saying what to call it on either :-)
MikeFair_ Wrapping in a class and adding use NQPHLL was the bulk of the changes
moritz maybe mk_languages_shell was borked too :(
MikeFair_ moritz: Nope it worked :)
but there was likely magic I couldn't see 06:29
Somehow Runtime.pm and Actions.pm got connected
If you look at Runtime.pm you'll see where callmethod ended up
moritz MikeFair_: let's simplify things by making 'say' a subroutine, not a method
MikeFair_ I just can't tell you how it got there 06:30
moritz so just change :op<callmethod> to :op<call>
MikeFair_ moritz: Ahh the original mk_language_shell was a pasttype<cal> 06:31
<call>
moritz that explains it
exit TOP: say "42"
Could not find sub say
that's progress
it means that the compilation finished successfully
and only died at runtime
MikeFair_ would a missing use NPQHLL do it? 06:32
or would those subs need to be wrapped in an accessible clas or namespace? 06:33
moritz use NPQHLL is not enough 06:34
note that NQP has a sub say(), but it doesn't make that available to generated code
(so that it doesn't pollute the namespace of the generated code)
MikeFair_ nods.
moritz so, you need to write your own sub say 06:35
MikeFair_ I think PIR has the same thing
oh wait
moritz pir has a 'say' opcode
MikeFair_ I think I see what you're saying, the code is trying to call nqp::say
what about print?
same thing? 06:36
moritz it also has as 'print' opcde
but
both don't quite do what you want
because both only accept one argument
MikeFair_ which is why they used the ::join
moritz but you can still use the 'say' opcode for now 06:37
so change :name<say>, :op<call> to :op<say>
./installable_safire -e 'say "42"' now prints 42
but now you get a compilation error when you do something like -e 'say "42", "23"' 06:38
because nqp::say doesn't like multiple arguments
the proper thing to do is to start write a 'say' built-in
so, create an src/builtins.nqp with something like 06:39
sub say(*@args) { for @args { nqp::print($_) }; nqp::print("\n") } 06:40
add a build step that compiles that down to PIR
and in the action rule for TOP, generate an .include 'src/gen_builtins.pir'
MikeFair_ moritz: So kind of like what's in Runtime.pm 06:41
rename that to builtins.npq
moritz I don't see a Runtime.pm 06:42
it doesn't really matter what you call it
as long as it works :-)
MikeFair_ src/safire/Runtime.pm really?
06:42 janosik joined
moritz oh, right 06:42
yes, that's fine
moritz wonders how to emit an .include 'runtime.pir' 06:45
MikeFair_ an op? 06:48
06:49 lizmat joined
moritz no idea, and currently no time, sorry 06:49
MikeFair_ moritz: No worries 06:54
06:54 popl left 06:56 tokuhiro_ joined 07:02 s1n left 07:05 janosik left 07:08 MikeFair_ left 07:10 marmay joined 07:24 lizmat left 07:31 marmay left 08:07 jerome joined 08:20 Psyche^ joined, Patterner left, Psyche^ is now known as Patterner
masak morning, #perl6! 08:27
moritz masak, morning! 08:29
masak 'tis a loverly Saturday antenoon in southern Sweden. sunlight. slight chance of rain. significant chance of hacking. 08:31
moritz \o/ 08:32
how is jnthn doing? last time I saw him here he said he was sick
Su-Shee in north-eastern germany, one and a half hour of hacking has already happened. ;) good morning everyone.
moritz \o Su-Shee 08:33
sorear o/ o/ o/ 08:34
FROGGS good morning 08:40
Su-Shee, where exactly you're from?
Su-Shee Berlin 08:41
*hihi* I learned a great new word today, very useful for us tech folks: "frankenstandard". I'll put it right next to "paleocode" and "heisenbug" :) 08:42
FROGGS frankenstandard??
is it about undead code? 08:43
Su-Shee: we'll meet at the gpw2013?
Su-Shee at the what?
FROGGS german perl workshop in berlin 08:44
Su-Shee no, it's a word for a bastardized "standard" as in "assembled a couple of ideas and maybe best practices, thrown together under one label" ;)
masak moritz: jnthn is not recovered, and may not be for a few days. yesterday when I saw him he *appeared* well, though, even though he still self-reported as being sick.
Su-Shee FROGGS: no, probably not.
masak moritz: I believe modulo being busy with $work, he may be back on the channel today. 08:45
FROGGS Su-Shee: k
sorear WHAT! jnthn? sick? 08:47
FROGGS ya, since wednesday or so
08:47 thou_ left 08:48 am0c joined
masak sorear: it's an instance of the common cold. he got it on Sunday, and instead of slowing down and recovering, he worked long hours for most of the week. 08:52
Su-Shee that's a great way to make a flu last longer - if you do it right, up until 4 weeks. I speak of experience ;) 08:54
sorear masak: good to know it's something generally survivable :D
bonsaikitten Su-Shee: sure it doesn't mean "north bavarian confusion pretending to be a standard" ? ;) 08:55
08:55 xinming_ left
FROGGS bonsaikitten: thats what I thought 08:56
Su-Shee ?! 08:59
08:59 xinming joined
FROGGS the question is, is it oberfranken, mittelfranken or unterfranken? 08:59
09:04 mucker left, jaldhar left 09:06 FROGGS left 09:07 FROGGS__ left
masak Su-Shee: I wonder if the set of SOAP standard documents counts as a frankenstandard. 09:26
moritz I think that's the prime example, no? 09:27
masak .oO( to the extent anything having to do with SOAP can be regarded as indivisible, yes... ) :P 09:32
I'm forever amused that the "S" in "SOAP" used to stand for "Simple", but *they backtracked on that*.
moritz what does it stand for now? 09:33
Su-Shee I decided it stands for "sad"
sergot hi o/ ! 09:34
masak moritz: it doesn't stand for anything.
sergocie! \o/
moritz Su-Shee: "sad" is good. I like that.
tadzik o/
sergot \o/
moritz \o tadzik, sergot o/ 09:35
sorear sleep& 09:37
moritz good night sorear 09:38
masak $sorear.sleep(:well); 10:04
10:18 pmurias joined
jnthn afternoon o/ 10:37
10:37 yarp joined
masak jnthn! \o/ 10:37
moritz \o jnthn 10:38
jnthn finally got a decentish night's sleep
mhasch SOAP should perhaps be renamed SMOAP 10:40
10:40 snearch joined
mhasch \o jnthn 10:40
jnthn
.oO( I thought it was called SOAP to reflect that the design needed to be cleaner )
10:41
mhasch good one, jnthn. Or perhaps for slipperiness (is that an English word?)
jnthn I think so :) 10:42
masak phenny: en pl "slipperiness"?
phenny masak: "śliskość" (en to pl, translate.google.com)
masak heh, that word even looks slippery :P
jnthn SOAP is a bit overdesigned, but if there's any bit of the web service stack that screws things up, it's probably WSDL.
"Yes, let's do RPC all over again!"
masak only because WSDL projects the whole thing down into something very boring... yeah, RPC.
"SOAP is not RPC! Here, have this WSDL." 10:43
jnthn Yeah. It can't effectively capture ongoing conversations.
And thus we end up with BPEL, WS-Choreography, etc. 10:44
masak hm, that's a nice summary of what it loses. I wonder how a standard that captured conversations would look. 10:45
a "WSDL done right" kind of thing.
<and-then-she-said />
jnthn Well, see BPEL.
But these days I'm a bit fonder of the hypermedia approach.
masak I don't think BPEL ever took off to any significant extent. 10:46
jnthn I've ran into people using it while teaching.
masak oh!
jnthn There is tooling around it. 10:47
masak bet there is.
jnthn
.oO( It's probably quite enterprisey ;) )
Time for some errands and brunch. Then I guess I'd better figure out my keynote for the seminars next week... :) 10:50
10:51 buubot_backup left 10:53 marmay joined
masak :) 10:54
10:54 yarp left
masak thou++ # ode-to-camelia.tumblr.com/post/3104...-in-perl-6 11:06
11:08 Su-Shee left 11:09 buubot_backup joined 11:10 Su-Shee joined
Woodi I met "frankenstandards" in newspaper last week describing approuch or activity of our goverment... but missed that ocassion to make my disctionary richer... noted now :) 11:36
hallo today :)
11:37 whiteknight joined
masak today greets you back :) 11:37
Woodi it's nice :) 11:38
masak .oO( is a disctionary a collection of various-sized disks? like the hanoi game in crypt? )
Woodi no, probably my irssi miss one more script, for spelling :) 11:39
11:39 snearch left 11:40 JimmyZ joined
masak of all the words to misspell... ;) 11:40
Woodi anyone saw "War Photographer" ? 11:48
11:49 crab2313 joined 11:53 GlitchMr joined
dalek p: b4dec6c | jnthn++ | src/PASTRegex.pir:
Stop exporting the dummy PAST package.
11:54
p: e19b5fd | jnthn++ | src/stage0/ (9 files):
Update stage0 to eliminate PAST package cross-refs.
p: 1ff9f02 | jnthn++ | src/PASTRegex.pir:
Further gut the PAST inclusion code.
12:03 replore joined 12:07 JimmyZ left 12:08 JimmyZ joined
dalek p: 718a3fc | jnthn++ | src/ (5 files):
Eliminate a bunch more PAST references.
12:17
kudo/nom: 0ead9e4 | jnthn++ | tools/build/NQP_REVISION:
Bump to an NQP that doesn't load/import PAST.
12:18
12:22 MayDaniel joined 12:33 oops left 12:41 FROGGS__ joined, FROGGS joined
masak .oO( an NQP free of the PAST ) 12:52
12:59 marmay left 13:04 jaldhar joined 13:20 jaldhar left 13:23 jaldhar joined
GlitchMr Just wondering, is there any sort of shortcut for grep? 13:30
So, I could shortcut stuff like grep * > 20, @array
13:36 replore left
masak r: my @a = 44, 13, 59, 22, 18; .say if $_ > 20 for @array 13:38
p6eval rakudo 0ead9e: OUTPUT«===SORRY!===␤Variable @array is not declared␤at /tmp/zBMBswBvuw:1␤»
masak r: my @a = 44, 13, 59, 22, 18; .say if $_ > 20 for @a
p6eval rakudo 0ead9e: OUTPUT«44␤59␤22␤»
13:38 PacoAir joined
GlitchMr gather .take if $_ > 20 for 1, 2, 40, 3 13:40
I'm almost sure I'm doing it incorrectly
(ok, at this point grep is better)
masak the only thing shorter than grep I could imagine would be if you declared a postcircumfix operator for lists that delegated to .grep 13:41
but playing around with that idea locally, I couldn't get it to work, unfortunately.
GlitchMr Well, map has shortcut (> 1, 2, 3 X** 2 13:42
1 4 9
oops
whatever
And reduce has shortcut too
I was wondering why not grep
masak um, X** is not a shortcut for map.
GlitchMr It isn't? 13:43
But... it works, doesn't it? 13:44
pmurias jnthn: re js backend (which I plan to resume hacking on today ;) do you think it makes sense to have it in a rakudo fork, or make it seperate in a repo of itself combinable with a rakudo repo? 13:45
phenny pmurias: 19 Aug 05:40Z <JimmyZ_> tell pmurias speaking of rakudo-js, you may be interested in github.com/kripken/emscripten/wiki
masak GlitchMr: 'X**' is a shortcut for 'map { $_ ** 2 }'. 13:46
GlitchMr "Emscripten is an LLVM-to-JavaScript compiler."
13:47 skids joined
GlitchMr Interesting. I was thinking about making x86 emulator in JavaScript, but I guess that way is faster. 13:47
masak pretty sure someone has made an x86 emulator in JavaScript already. 13:49
jnthn pmurias: The fork approach makes it harder to benefit from Rakudo improvements I guess. The separate repo approach may work out better...it depends on Rakudo not breaking too many APIs you depend on, but given the main thing you depend on for now is probably QAST, that may not be a great problem.
(I don't see any notable changes to QAST coming) 13:50
13:51 Khisanth left
jnthn The approach I'd had in mind for porting Rakudo was "first port NQP", but that may be drawn out and less -Ofun than your current path :) 13:51
GlitchMr But if Ruby works, why Parrot wouldn't?
pmurias it could work 13:52
but would end up horribly slow
GlitchMr Hmmm... yeah
And Perl 6 has bigger compiler compared to Ruby 13:53
13:53 Cofyc joined
pmurias jnthn: has NQP fully transitioned to QAST? 13:53
jnthn: the problem with having the backend in a seperate repo is how integrate it with the build system 13:54
jnthn pmurias: Yes, NQP is fully using QAST now 13:56
13:56 crab2313 left, Cofyc left
masak \o/ 13:58
14:02 yarp joined
pmurias jnthn: would it be possible to have rakudo support "backend plugins"? seeing as other backends beside js are planned? 14:03
14:04 sirrobert left 14:06 am0c left
jnthn pmurias: It's already possible to create alternative frontends to Rakudo that do different things with the compilation. That's the easiest way to go for now. 14:07
pmurias: I posted something in a gist a while back for cognominal on how to get Rakudo to do the compilation stage and then dump the parse tree as JSON
pmurias jnthn: I already have a alternate frontend that does what I want 14:10
jnthn: what I'm having trouble is getting everything to build correctly
or does just coping fils into the rakudo dir and patching the build system seem sane 14:12
jnthn If you already did a "make install of Rakudo", then you should be able to just "use" various bits of the existing compiler 14:16
See in github.com/jnthn/rakudo-debugger/b...-debug.nqp for example 14:17
There it just does "use" of the grammar, actions, etc.
Then you just build a rakudo-js executable and any of the other libraries you are adding 14:18
14:19 Khisanth joined
GlitchMr warning: LLVM version appears incorrect (seeing "Ubuntu clang vers", expected "clang version 3.1") 14:23
That could be fun
Who has added "Ubuntu" there? 14:24
Perhaps I could try it on feather and not on my machine... perhaps 14:26
It's dev machine, isn't it? 14:29
"nice make" 14:35
ok
14:42 colomon left 14:45 tokuhiro_ left, JimmyZ left 14:51 yarp left 14:58 JimmyZ joined 15:09 gongyiliao joined 15:23 kaare__ joined 15:26 crab2313 joined 15:42 crab2313 left 15:44 UncleFester6 joined
pmurias jnthn: I get pastie.org/4685840 when compiling rakudo-debugger 15:52
jnthn pmurias: Interesting. Wonder if that's a result of the NQP move to QAST. 15:53
pmurias I'm trying make clean, hoping it might help 15:54
jnthn: I have seen a similiar error trying to compile the js backend
jnthn pmurias: See if what I just pushed helps 15:57
15:57 JimmyZ left
GlitchMr gist.github.com/3676439 16:02
Wait... feather doesn't have bits/predefs.h?
16:03 Chillance joined
GlitchMr glitchmr@feather /usr/include> find -name 'predefs.h' 16:04
./i386-linux-gnu/bits/predefs.h
I guess I should somehow learn clang about it 16:05
16:13 mucker joined 16:15 raiph joined
raiph hi all 16:15
Ulti hi 16:16
raiph moritz: is any of perl6.org dynamically served via p6 code?
Ulti: hi
TimToady not that I'm aware of 16:17
GlitchMr Most of perl6.org is static webpages generated using mowyw 16:28
raiph TimToady, GlitchMr: thanks 16:30
16:30 raiph left
GlitchMr Also, there is ecosystem (the real one, not modules.perl6.org page) which uses Dancer 16:32
But it's hosted on feather1, not feather2
feather.perl6.nl:3000/ 16:33
(it's also sort of slow)
pmurias jnthn: thanks, that fixed the build error 16:35
jnthn: how do I get Term::ANSIColor the debugger needs? 16:36
GlitchMr pmurias: use panda
panda install Term::ANSIColor
If you don't have panda then either compile it or (if you're on feather) use one of already compiled pandas (I've one in my directory) 16:37
TimToady just added rosettacode.org/wiki/Hofstadter_Q_s...c_solution 16:50
(doesn't work with rakudo, btw, due to not introducing the symbol soon enough on a constant declaration) 16:52
16:58 fgomez left
pmurias jnthn: I get the following error pastie.org/4686155 17:03
17:03 fgomez joined
pmurias jnthn: it disappears when I replace Perl6::Compiler::JavaScript.new with Perl6::Compiler pastie.org/4686157 17:04
UncleFester6 http:://perlcabal.org appears to be down (also checked downforeveryoneorjustme.com) 17:05
pmurias * Perl6::Compiler.new 17:09
jnthn: Perl6::Compiler::JavaScript.new seems to return an NQPMu
17:09 lizmat joined 17:18 am0c joined
pmurias jnthn: the name Perl6::Compiler::JavaScript seems to cause trouble 17:20
Perl::Compiler::JavaScript works fine
Ulti TimToady: those are easily the cleanest solutions for that algorithm on rosetta 17:28
pmurias jnthn: git remote add origin [email@hidden.address] 17:29
git push -u origin master
sorry
17:29 am0c left
pmurias jnthn: github.com/pmurias/rakudo-js # haven't yet migrate the actual backend yet 17:29
17:31 fgomez left
pmurias jnthn: re porting nqp first, I could try that 17:32
s/porting/supporting
17:47 fgomez joined 17:48 MikeFair joined
TimToady Ulti: yeah, kinda surprised that Haskell doesn't do better on that one 17:48
MikeFair Heya #p6! 17:54
17:55 mrblobby joined 18:00 marmay joined, xinming left 18:02 xinming joined 18:03 mrblobby left
masak MikeFair! \o/ 18:06
18:08 mucker left 18:10 mucker joined
MikeFair anyone have any ideas about what makes this useful?: 18:12
_dumper($statement_list, 'SAFIRE')
unless (pir::getinterp__P()).stdhandle(1).tell > $*AUTOPRINTPOS;
It seems to run after every command in the interactive shell 18:13
moritz MikeFair: it calls the dumper only if no output was produced 18:16
masak which isn't completely foolproof; sometimes the output "" was produced. 18:17
MikeFair ok it looks like the function "stdhandle(1)" doesn't exist, I replaced it with stdout_handle() and it seemed happier about that 18:18
masak > print "OH HAI"
OH HAI 18:19
> print ""
True
but it's goodenuf, I guess. :)
18:29 benabik left
MikeFair So I'm trying to really understand this .ast thing 18:37
I get that .ast is a node in the AST tree
18:37 benabik joined
MikeFair I think I get that make SOMEASTOBJ put that's node into the tree 18:38
I get that: my $qast := QAST::Op.new( :name<print>, :op<print>, :node($/) );
sorear good * #perl6 18:39
MikeFair will make a new AST object of the QAST::OP kind
masak sorear! \o/
MikeFair hehe
MikeFair moves to #parrot
masak MikeFair: .ast is the place where you hang your AST. most commonly the action methods do this. parse tree != AST.
MikeFair: parse tree == the subdivision of the parsed text into things that belong together. AST == a more high-level description of the semantics of the program. 18:40
specifically, the AST nodes can be rearranged to match the semantics more than the syntax. 18:41
someone stop me if I am explaining this wrong ;)
moritz no, masak is completely right
in rakudo's codegen this is especially apparent for blocks 18:42
MikeFair masak: Right, well if I'm seeing it right, there realy isn't a "parse tree" that I work with, I create Grammar rules, and the Regex engine is managing the parse tree for me
masak indeed.
moritz which get all sorts of hooks, lexpads and so on
masak the parse tree is what ends up in $/
moritz or for BEGIN blocks
MikeFair exactly, right, ok so I think I'm getting that right 18:43
masak and the thing in $/ is completely isomorphic to the grammar's call graph (modulo hidden rules).
MikeFair What's confusing me is the part where this occurs: $<somematchrule>.ast
masak MikeFair: well, each parse node under $/ has an .ast attribute.
MikeFair OHHHHh
masak MikeFair: what happens in practice is that the recursive descent parsing creates ASTs as rules succeed, leaves-first. 18:44
MikeFair That makes more sense, IIRC from earlier explanations $/ is technically a cursor type object
tadzik good evening #perl5
masak MikeFair: so you sorta-kinda build your AST from smaller pieces, and put them together.
tadzik er, #perl6 that is
masak tadzik! \o/
tadzik masak! \o/
how are things! 18:45
masak MikeFair: took me a while to get this part. but when your rule in the middle succeeds, all its subrules have already succeeded, and contain useful .ast things already.
MikeFair: it's a kind of structural induction, I guess.
MikeFair Yeah, I don't think the part where $<matchrule> is an object that has an AST property has been mentioned that clearly in the tutorials/docs, or at least I didn't comprehend it when I read it the first time :)
masak tadzik: things are perfectly satisfactory, thank you. how's with you?
MikeFair masak: Yeah, I'm getting the bottom up nature of the matches I think, that's what makes "term" so important 18:46
masak MikeFair: another thing: the 'make' keyword just sets the .ast of the current $/
moritz MikeFair: please write a tutorial now, because now you still remember how it was when you didn't understand it
masak +1
tadzik masak: things are nice. I managed to fix my phone today :)
that was quite satisfying
masak tadzik: finally found a screwdriver?
tadzik lots of small pieces, screwdrivers, glues, hair dryers
yes
MikeFair moritz: Is there a good accessible place I can scratch the notes 18:47
moritz: A wiki of some kind
moritz MikeFair: wiki.perl6.org exists
MikeFair I guess a .md
in my project is as good a place to start as any
tadzik I never thought a strong connection to hardware, but I find it strangely satisfying to fix my stuff myself, and not waiting weeks for warranty service
moritz MikeFair: also each github project has a wiki, where you can put stuff
MikeFair moritz: Yeah, thanks to you having me get a githup and project setup, I've got a place to hang the stuff that's easily sharable 18:48
Like all things it's likely to suck at first, but I think it'll have some good reusable bits that others can make sense of in a real tutorial 18:49
I'll make sure I get some of this added to my project and then have one of you guys, or someone from #parrot review it for accuracy 18:50
masak has learned a ton of stuff about git in the past few days 18:51
turns out writing a course about something you know makes you examine it more thoroughly'n usual :) 18:52
moritz I can confirm that :-) 18:55
huf explaining things is the best way to understand them
moritz guess why I wrote so many blog posts about Perl 6 :-)
masak is pleased that $work++ pays him to understand and then explain things 18:56
moritz this week I learned that push.default should be set to 'upstream' if you want sanity 18:57
masak moritz: by gosh, you're right! and the default is 'matching' -- a very dangerous default. 19:00
masak configures his local git with a quickness
moritz and I also learned that it's not so easy to maintain commit messages over ammends/rebases if they start with a # sign
masak hehehe 19:01
moritz at $work we start commits with #ticketnumber 19:02
I've now gone over to start them with <space>#ticketnumber
masak I think I would make an even bigger distinction than just a space. 19:03
moritz I also thought about [#ticketnumber] or OTRS#ticketnumber 19:04
but I need to check with cow-orkers first
moritz scrolls through 'man git-config' 19:05
masak .oO( they need to chew on it a bit... ruminate on it... ) 19:06
moritz: heh, that's what I did when you mentioned push.default ;)
now I might include that bit in the course.
moritz woah, you can set mergetool to vimdiff
19:07 REPLeffect joined
masak nice. didn't know that. 19:15
today I created my first commit with three parents :)
moritz woah, how does that work? 19:16
masak on branch b1, 'git merge b2 b3'
just make sure that neither of them fast-forwards ;)
moritz or add --no-ff, I guess
masak or that. 19:17
tadzik merging two branches at once? huh 19:19
masak yeah.
I asked on #git if there was ever a use case for that.
moritz I wonder how well tools that support it
like gitk 19:20
masak got the answer "if the branches are on the same topic", which, hm.
tadzik . o O ( git merge nom nom nom
)
masak if the branches are on the same topic, they might as well have some further relation, like one is a branch of the other.
and then you could always merge the three branches in two steps. which seems saner to me anyway.
19:23 mucker left
moritz it sounds like a very perlish thing to just not introducing a limitation where limit or no limit would be possible 19:23
masak it does. 19:24
moritz though I might argue that the 'merge a b' syntax might be better for merging a into b, no matter on what branch you are 19:29
masak well, git-rebase has an --onto option which does what you want there. git-merge doesn't, however. 19:31
19:35 marmay left
benabik As I recall, when git merges A B & C, it basically does "merge(merge(A,B),C)" but records the result as a single commit. 19:39
masak benabik: that sounds more like recursive merge to me. 19:40
benabik: which happens with complicated-enough topologies even for "ordinary" two-commit merges.
moritz well, the semantics of the merge are left to the merge tool
masak benabik: if what you're saying is true for tree-commit merges, then I no longer know what the "octopus" merge strategy does :) 19:41
benabik Merge recursive merges multiple merge bases before merging 2 branches. 19:43
Octopus merges the trees one by one, and I think dies if there are any conflicts.
masak hm.
19:44 cognominal joined
benabik Recursive merge is about creating a reasonable single base for a 3-way merge for complex history. Octopus just keeps iteratively merging trees in the dumbest possible way and fails if it gets conflicts. 19:48
19:50 fgomez left
masak heh! 19:51
benabik++
19:51 fgomez joined
masak that sounds simple enough to be the truth :) 19:52
benabik d9f3be7: [PATCH] Infamous 'octopus merge'
Or at least that was the original design. The less shell scripts there are in git, the less sure I am how it works. :-D
benabik followed the git list for a few years. 19:53
masak nice.
benabik Oh! Octo is still a script! 19:54
masak oh!
yeah, here: github.com/git/git/blob/master/git...octopus.sh 19:55
hehe, I got that error message today! "Should not be doing an Octopus." 19:56
I was all like, "dude, I didn't ask you to!"
wow, that's really a refreshingly short script.
19:57 gongyiliao left
benabik Git can be remarkably simple. The individual parts are highly composable. 19:57
20:08 fgomez left
masak rn: { say "$^thing, remarkably simple and composable" }($_) for <Git Perl> 20:10
p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«Git, remarkably simple and composable␤Perl, remarkably simple and composable␤»
GlitchMr rn: say "$_, remarkably simple and composable" for <Git Perl> 20:11
p6eval rakudo 0ead9e, niecza v21-1-ga8aa70b: OUTPUT«Git, remarkably simple and composable␤Perl, remarkably simple and composable␤»
GlitchMr There is more than one way to do it
masak rn: say "{ 'Git' & 'Perl' }, remarkably simple and composable" 20:13
p6eval niecza v21-1-ga8aa70b: OUTPUT«all("Git", "Perl"), remarkably simple and composable␤»
..rakudo 0ead9e: OUTPUT«all(Git, remarkably simple and composable, Perl, remarkably simple and composable)␤»
masak heh :)
20:37 GlitchMr left
masak good ♞, #perl6 20:38
20:49 lichtkind joined
lichtkind may i know why err is gone? 20:50
sorear what was err? 20:51
lichtkind low precedence version of // (defined or) 20:52
once called dor by p5p
jnthn
.oO( we showed that one the dor)
lichtkind yes but why? 20:53
sorear it's spelled "orelse" now
20:53 fgomez joined
geekosaur "err" was kinda a lousy name for the concept 20:55
20:55 sqirrel joined 20:56 cognominal left
FROGGS good morning pals 20:56
20:56 cognominal joined
sorear good morning FROGGS, sqirrel 21:01
lichtkind sorear: but orelse was for some time around when err was too
sorear I wonder why we ever had both 21:03
21:09 ggoebel__ left 21:13 ggoebel__ joined 21:19 cognominal left 21:30 cognominal joined
dalek blets: 51a3f1b | (Herbert Breunung)++ | docs/ (2 files):
err is gone
21:30
pmurias jnthn: everything has been ported succesfully to the new scheme, thanks for help 21:45
22:00 mathw left 22:01 tokuhiro_ joined 22:06 sqirrel left, raiph joined 22:08 MayDaniel left
raiph hi all 22:08
tadzik hi raiph
raiph pondering a #perl6 summary request 22:09
"can you give a percentage progress of how much of rakudo matches the spec as it exists today."
22:09 spider-mario joined
raiph perlmonks.org/?node_id=991556 22:09
i'd appreciate a response from #perl6ers to my response to that request 22:10
er, the response at perlmonks.org/?node_id=992426 22:11
sorear hmm 22:12
perl6.org/compilers/features 22:13
there was at one point a fancy infographic based on that 22:14
ah raw.github.com/mj41/Perl-6-GD/mast...odData.png
somewhere else on the internet there is a graph of spectest data vs time
raiph sorear: right. all three of those are linked or mentioned in my response. 22:15
22:16 kaare__ left
sorear raiph: I have nothing to add to your response 22:18
raiph the issues for me are 1) to be careful about the metamessage (p6 is not done) and 2) which of the three metrics do i add, if any?
sorear add any metrics which are important enough for people on IRC to find remarkable. 22:22
raiph sorear: interesting. you are implying the summary audience is "people on IRC", right? 22:26
i haven't defined the summary audience. it should have been the first thing i did, but i've chosen to do things the hard way.
sorear raiph: As I understood it, the audience is people who would follow IRC if only there werent' so much of it. 22:28
raiph: so the people on IRC would be a good proxy for interest
szabgab should probably use a different metric because he has a very different audience 22:29
raiph sorear: i hadn't thought of it that way.
(the audience being #perl6 followers)
22:32 benabik left
timotimo will perl6 get a benchmark suite any time soon? to see if performance improves or regresses in the implementations? or is that too early? 22:32
raiph i've not been able to reach perlcabal.org for about 24 hours. is this known about? anyone else have that problem?
22:33 benabik joined
FROGGS timotimo: there was a guy at YAPC::EU who did that for perl5, maybe you can get him doing it for perl6... 22:34
timotimo: you might google for perlformance
timotimo well, first those benchmarks would have to be written :)
sorear timotimo: perl6 has a benchmark framework, but only one benchmark has been written for it yet
timotimo oh, it's the same thing they have on speed.pypy.org, that's sweet. 22:35
tadzik we used to have that (perf suite) 22:40
raiph my ping tests suggest perlcabal.org is down
timotimo perlformance has a line in its documentation saying =item L<Benchmark::Perl::Formance::Plugin::P6STD|Benchmark::Perl::Formance::Plugin::P6STD> 22:43
tadzik STD.pm5 is probably quite a stresstest :) 22:45
there's github.com/pmichaud/rpbench
TimToady there was never a time when we had both err and orelse 22:47
I yanked out err and replaced it with orelse
timotimo tadzik: the readme is completely empty :( 22:48
tadzik yes
I remember seeing some graphs from github.com/perl6/bench-scripts 22:49
22:51 supernovus joined
supernovus It appears perlcabal is down, at least from where I'm at. Is there an indexOf equivilent in Array? 22:52
tadzik supernovus! \o/ 22:53
no, I don't think there's one
supernovus Darn, I hate having to create a loop just to find the index of an element in an array. Maybe I should add indexof to the spec ;-)
tadzik :) 22:58
gfldex it's indeed a little odd to have splice require an index but no method that can give you one
supernovus Ah well, a manual loop will do for now. 23:03
sorear there's always .kv.first({ .value == foo }).key 23:04
supernovus Project xyzzy coming up shortly. My own take on text adventures in Perl 6. For no reason but for fun :-) 23:05
[Coke] MikeFair: it's not "nqp::getinterp__P()", but pir:: 23:07
supernovus Anyway, time to go for now, have a good * all! 23:08
23:08 supernovus left
TimToady good night #OK timezone 23:08
[Coke] adios, TimToady. 23:09
TimToady I'm not going away!
23:13 pmurias left 23:14 simcop2387 left, jaldhar left
MikeFair [Coke]: Thanks! 23:17
23:17 simcop2387 joined
MikeFair [Coke]: I think I eventually discovered that, but it's not working even then, I think the real culprit is stdout_handle instead of stdhandle(1) 23:18
[Coke] tries to crawl out of the skyrim hole.
diakopter [Coke]: what's skyrim? something I should look into?
[Coke] diakopter: RPG game that came out last year. I finally got around to playing it. I finally managed to pull myself away from the screen a little while ago. 23:20
[Coke] wonders if any NQP people are about.
diakopter hm
I've never tried an RPG
I'm deprived
23:25 araujo left 23:35 cognominal left
MikeFair [Coke]: Other than those that are stumbling their way through and getty bloody as it goes along? I can't tell 23:37
lichtkind good night
sorear [Coke]: jnthn is sick I hear 23:38
MikeFair: are you still having problems post-moritz? I might be able to help
MikeFair sorear: Well I'm now to the point of being able to build and test 23:43
sorear: So that's great!
23:44 cognominal joined
[Coke] wonders what the replacement for PAST::Op(:pirop) is. 23:56
QAST::Op(:name) ?
23:56 jaldhar joined
sorear [Coke]: look at what rakudo does for pir::foo 23:57