|
Parrot 4.7.0 "Hispaniolan" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC Set by moderator on 4 September 2012. |
|||
| MikeFair | Heya Parrot! | 02:07 | |
|
02:10
rurban_mobile joined
|
|||
| sorear | hello MikeFair. | 02:13 | |
| MikeFair continues on his quest for compilation and execution of his language using the new nqp. :) | 02:15 | ||
| It seems like "make" instead of parrot setup.pir is the tool of choice... in the two projects I've looked at (perl6 and Partcl-nqp) | 02:16 | ||
| benabik | The general choices seem to be Makefile or setup.winxed | 02:17 | |
| MikeFair | benabik: unfortuantely I started with mk_language_shell.pl | 02:19 | |
| benabik | mk_language_shell needs some love. | ||
| There's nothing _wrong_ with a setup.pir | |||
| Other than hand-writing PIR. | |||
| MikeFair | Well my problem seems to be that I need to call NQP's version of Compiler.new() and friends, but I can't seem to find a good hokk that works into making that happen | 02:20 | |
| err hook | |||
| I'm sure this is just my ignorance I'm struggling with | |||
| I like the parrot setup.pir just fine for my purposes, I just can't seem to get a working build out of it. :) | 02:21 | ||
| I was told that my problem, based on the error of not being able to find a parse function, was that the compiler didn't get registered | 02:22 | ||
| So what I'm not sure about is how to go about getting the right things in the right places to make it all work | 02:26 | ||
| I'm not married to NQP either, it just seemed more supported than winxed for my purposes | 02:29 | ||
| I think I see the problem... | 02:37 | ||
| .local pmc hllns, parrotns, imports | 02:38 | ||
| hllns = get_hll_namespace | |||
| parrotns = get_root_namespace ['parrot'] | |||
| imports = split ' ', 'PAST PCT HLL Regex Hash' | |||
| parrotns.'export_to'(hllns, imports) | |||
| benabik | ... Can anyone write a calm response to zhuomingliang on gh818? I keep coming to "let's not have this argument _again_" | ||
| MikeFair | in all the .pm files I had to add use NQPHLL; | ||
| benabik | MikeFair: Are you trying to use parrot-nqp or new nqp? | 02:39 | |
| MikeFair | nqp | ||
| parrot-nqp seems to have some challenges in certain areas that I thought should work but are causing problems. | 02:40 | ||
| benabik | mk_language_shell is based on parrot-nqp, and I would expect many subtle issues trying to just s/parrot-nqp/nqp/ in the result. | 02:41 | |
| MikeFair | I was having a hard time telling the difference between my ignorance/misunderstanding/mistakes and the limitations of parrot-nqp | ||
| benabik: I used a symlink | |||
| benabik | Symlinked nqp to parrot-nqp?!? | ||
| Even vice-versa seems like quite a bad idea. | 02:42 | ||
| MikeFair | other way around, but yeah, moved parrot-nqp to parrot-nqp.orig | ||
| benabik | `ln -s nqp parrot-nqp`? | ||
| MikeFair | Well I watched parrot setup.pirs execution, and the command line is the right command line | ||
| benabik: Yes | |||
| It builds | |||
| benabik | That's... not a good idea. There are differences between the two and I would expect many subtle issues. | ||
| MikeFair | benabik: I had to rebuild parrot and nqp to make sure they were aligned | 02:43 | |
| benabik | Simply replacing parrot-nqp with the new nqp is not the solution. | ||
| MikeFair | benabik: I don't exactly see why not? | 02:44 | |
| benabik: the nqp excutables take the .pms and output them to .pir | |||
| parrot doesn't see or even care what's in those .pms | |||
| benabik | nqp takes .pm and outputs .pir that requires 6model. | 02:45 | |
| I suppose the things we have written in nqp-rx are already compiled by that point... | |||
| MikeFair | 6model are is a language or pbc's that parrot can load? | 02:46 | |
| benabik | It just feels wrong. | ||
| parrot-nqp is not nqp. parrot-nqp is nqp-rx | |||
| Which is a generation behind. | |||
| MikeFair | Yes, I do need to change my source code | 02:47 | |
| Which I've been doing | |||
| benabik | Doing language development in nqp is fine, but I would suggest that making things that expect parrot-nqp run in nqp is error-prone. | ||
| MikeFair | benabik: I'm doing a full textual replacement of my source in straight nqp | ||
| benabik: I have like ten meaningful lines of code | 02:48 | ||
| I'm just working with the language shell atm | |||
| and even with that I'm primarily focused on the Grammar.pm parser part more than anything else | |||
| :) | |||
| benabik: I agree it feels wrong :) | 02:49 | ||
| benabik: My other option was to drop parrot entirely and just do the whole thing straight in rakudo | |||
| But I'd like to get to the point where I'm working on parrot's internasl | |||
| I'd like to try my hand eventually and trying out using a message queue model internal to Parrot (where rather than pirops being sequential in memory, the ParrotVM would be treated like a service consuming the pirops from the queued pipeline. Eventaully this is part of an end game I have to make a sane execution model for running parrot on GPU architectures). | 02:53 | ||
| (Namespaces, classes, and such would all have their own queues and a reference to an execution context would get passed around through the queues) | 02:54 | ||
| benabik | Sounds interesting. | 03:13 | |
| MikeFair | benabik: So what do you think? Can this be done? I only did a symlink because I didn't know how to get parrot setup.pir to execute the nqp command instead. :) | ||
| benabik comments on gh818 and hopes that he kept most of his frustration out of it. | 03:14 | ||
| MikeFair | benabik: I totally see what you're saying now if I was trying to build other langauges that expected nqp-rx then I just broke every one of those language compilations . :) | ||
| benabik++ | |||
| benabik | Getting setup.pir to run nqp would require mucking around with distutils. | 03:15 | |
| I seem to remember adding a new phase wasn't too difficult... | |||
| MikeFair | benabik: Wisdom for us all that we may acquire his patience | ||
| benabik: Actually, yeah, I remember seeing that distutils was straight in the middle of it | 03:16 | ||
| benabik | Adding winded to distutils: github.com/Whiteknight/Rosella/blo...ils.winxed | ||
| MikeFair | benabik: What do I do with that? | 03:18 | |
| replace the distutils.pir in my library? | |||
| or add it somewhere and rebuild parrot | |||
| benabik | MikeFair: No. That calls distutils functions to extend it. | ||
| You (or someone else) could use it as the basis of something similar for nqp. (rather than nqp-rx) | 03:19 | ||
| MikeFair | So download it, compile it and run it? | ||
| benabik | MikeFair: This is how I used it in PACT: github.com/parrot/PACT/blob/master...winxed#L69 | 03:20 | |
| That assumes Rosella is installed in the system. | |||
| MikeFair | Which it is not atm :) | 03:21 | |
| benabik | It's probably not directly useful to you as-is, but it might point the way towards getting distutils to use nqp. | ||
| MikeFair | Coke has managed to get Partcl to build with NQP and so I was trying to replicate the work he did | ||
| sorear | Was there not at one point a distutils that used setup.nqp ? | 03:22 | |
| opbots trust MikeFair | |||
| slavorg | Ok | ||
| MikeFair | sorear: The distutils library says I can use a setup.nqp but I couldn't make it work | ||
| benabik | I recall setup.nqp using distutls, but not really vice-versa. | 03:23 | |
| MikeFair | Wow, thanks :) | ||
| any idea what this is? | 03:26 | ||
| github.com/ekiru/tree-optimization.../setup.nqp | |||
| sorear | ekiru = tcurtis = tylercurtis, one of our past GSoC students | 03:27 | |
| benabik | That is an NQP script calling distutils. | ||
| sorear | tree-optimization was an attempt to create a generic optimization framework for PAST | ||
| MikeFair | benabik: Right, so that won't really help me because what I need is the distutils using nqp part | ||
| sorear | like so many things we've built, it never really got used :( | ||
| MikeFair thinks he'll just type it out by hand and put it in a shell script to compile everything | 03:28 | ||
| It's 6 files and they take like 1/2 a second to build and I only want it for testing purposes | 03:29 | ||
| I'll absorb more about the build processes as I go along | |||
| ok | 04:35 | ||
| so think I'm really close now | |||
| here's what I'm getting | |||
| "load_bytecode" couldn't find file 'NQPHLL.pbc' | |||
| That file is in ~/local/lib/parrot/4.7.0-devel/languages/nqp/lib | 04:36 | ||
| but that lib directory does not seem to be in the load path | |||
| any suggestions? | 04:38 | ||
| Woohoo it built! | 04:50 | ||
| But it can it "say" anything? | |||
| nope:Method 'pasttype' not found for invocant of class 'QAST::Op' | |||
| benabik | I've only found "It compiles" to have any relation to "does it work" in very strongly typed languages like Haskell. | 04:51 | |
| And even then it's not very strongly correlated. | |||
| MikeFair | benabik: hehe | 05:00 | |
| benabik: yeah, it seems that I'm now back to my early days of assembly when compilation and build meant almost nothng | 05:01 | ||
| benabik | For dynamic languages, "it compiles" just means you didn't screw up the syntax too badly. The compiler doesn't care if you're trying to do something non-sensical. | ||
| The runtime OTOH | 05:02 | ||
| MikeFair | yep | ||
| It seems that I've done something that registers say and print as viable parseable statements that are supposed to call "something" but that either go into some recursive loop or otherwise just disapear into and infinite blocking state when called | 05:03 | ||
| Yep, maximum recursion depth exceeded :) | 05:11 | ||
| Wel, it seems to be parsing, but I'm still getting a strange error | 05:24 | ||
| I put simply <integer> in TOP | 05:25 | ||
| and now get: Syntax error at line 2, near "\\n" | |||
| anytime I type an integer | |||
| If I type something "not an integer" then I get a parse error! :) | |||
| It's progress!! | 05:26 | ||
|
07:02
eternaleye joined
07:11
brrt joined
07:48
lucian joined
08:25
Psyche^ joined
09:52
alvis joined
|
|||
| brrt | hi #parrot, i need your help once more | 11:47 | |
| moritz | I can try :-) | 11:48 | |
| brrt | oh, moritz, i need your help for another thing entirely | 11:52 | |
| but my first and foremost problem | |||
| is that, when specifying parrot applications to run via the psgi handler | |||
| the actual script that should be run is Not Well Defined | |||
| case in point, i use an uri to specify the script | 11:53 | ||
| with the following structure: <compiler>://<script>/<class, optional, slashes are namespaces>#<routine, optional> | 11:54 | ||
| thus, if I have a script called foo.p6, which has a class called MyPsgiHanlder, and a routine called accept | |||
| it would be perl6://foo.p6/MyApp/MyPsgiHandler#accept | 11:55 | ||
| similarly for an error handler | |||
| perl6:://foo.p6/MyApp/MyPsgiHandler#onerror | |||
| but, where is foo.p6? | 11:56 | ||
| if you say 'server document root local', then fine, but it means i cannot put files anywhere but in the document root | |||
| which means $documentroot/somedirectory/foo.p6 would never work | 11:57 | ||
| wait.... this is a resolvable problem | |||
| i add yet another option | |||
| called ParrotApplicationDirectory | |||
| hmm no that is still not ideal | |||
| anyway, summarising | 11:58 | ||
| i use an uri scheme for specifying the langauge, script, class and routine | 11:59 | ||
| but using the hostname for the script component is Not Ideal | 12:00 | ||
| moritz | yet another option sounds quite sensible to me | ||
| and have it default to the document root | |||
| brrt | (virtual) server document root? | ||
| moritz | erm, what other document roots are there? | 12:01 | |
| brrt | hmm.. not many | ||
| moritz | but yes, I think that's what I mean | ||
| brrt | its just, i had put it in <directory> statements earlier... hmnmmmm | 12:05 | |
| bascially if it is in 'server' context, use document root | 12:06 | ||
| if in <directory> context, use directory specified | |||
| oh, and moritz, i get the 'raw parrot cannot load rakudo' problem | 12:35 | ||
| likely scenaroi, i must link something before i can load rakudo with load_language | 12:36 | ||
| moritz | brrt: I can look into it, but I'm not sure I'll know how to fix it | 12:42 | |
| brrt | well, yeah, it would be nice to know in general :-) otherwise, i have to inspect the rakudo build process by hand | 12:44 | |
| which i can, but don't in general | |||
| and haven't, and i was hoping you'd know | |||
| Coke yawns. | 12:46 | ||
| moritz | brrt: a load_language 'perl6' just succeeded for me | 12:47 | |
| brrt: after having rakudo installed, that is | 12:48 | ||
| brrt: what else do you need? | |||
| brrt | ... lets see if i can make that work | ||
| moritz | as in, it didn't throw any exception :-) | ||
| brrt | i recall that being broken | ||
| no you 'should' have seen a segfault :-) | |||
| moritz | yes, I recall that too | 12:49 | |
| but now it works, by magic :-) | |||
| brrt | sometimes magic is good | ||
| darn, i appear not to have perl6 on this box | 12:50 | ||
| wait, i'll get back to that | |||
| moritz | ah | 12:53 | |
| $P0 = compreg 'perl6' | |||
| $P0.'eval'('say 42') | |||
| brrt | wait wait! | ||
| moritz | Null PMC access in find_method('eval') | ||
| brrt | you /should/ call load_language('perl6') first | 12:54 | |
| moritz | yes, I did | ||
| what's the way to register a compiler with parrot so that compreg will find it? | |||
| brrt | ..... | 12:55 | |
| hmm | |||
| load_language :-p | |||
| no, really, its compreg($S0, $P0) | |||
| but | |||
| thats what load_language is /supposed/ to do | |||
| moritz | wait, how? | 12:56 | |
|
12:56
PacoAir joined
|
|||
| moritz | load_language looks for a file named language.pbc | 12:56 | |
| brrt | well, i can't claim to know that | ||
| probably in its init function? | |||
| or load | |||
| moritz | so the init function has to call compreg(S, P), so that compreg(P, S) will find it? | 12:57 | |
| brrt | as far as i know, yes | ||
| will have to check the documentaiton | |||
| moritz | yes, that's how it should work | 12:59 | |
| brrt | it is somewhat of a lack in my understanding | 13:00 | |
| whiteknight not here? | |||
| Coke | moritz: yes, that's true. | ||
| in nqp, you get this by... | 13:01 | ||
| brrt | nqp doesn't play nice with that at all | ||
| Coke | github.com/partcl/partcl-nqp/blob/...cl.pm#L100 | ||
| brrt | (it can do it, but doesn't, no idea why) | 13:02 | |
|
13:02
PacoAir joined
|
|||
| moritz | Coke: thanks, I'll try that in rakudo | 13:03 | |
| Coke | Oh, I thought rakudo already had all this figured out and that that was where this was cribbed from. ;) | 13:09 | |
| moritz | Coke: it probably was, in pre-nom days | 13:11 | |
.oO( nom ate it! ) |
13:12 | ||
| but it doesn't work | |||
| compreg still returns NULL | |||
| and no compreg in the generated .pir code | 13:13 | ||
| oh, and I know why | 13:14 | ||
| because it calls compreg at the time that you call $compiler.language($name) | |||
| but it doesn't generate code that calls compreg | |||
|
13:18
bluescreen joined
|
|||
| dalek | rtcl-nqp/nqp2: c5fc935 | coke++ | src/Partcl/commands/string.pm: partially fixup [string] commented out autovived hashes. |
13:19 | |
|
13:30
nnunley joined
13:52
benabik joined
|
|||
| nopaste | "Allison" at 112.68.48.67 pasted "Could I have an application form? <a href=" wheretoordernexiumro.devhub.com/ ">Where To Order Nexium </a> 059 * Invalid Profession Code 25 M/I Prescribe" (6 lines) at nopaste.snit.ch/163812 | 16:16 | |
|
16:30
pmichaud joined
17:26
tuxit joined
|
|||
| Coke | whee, nopaste bots. | 17:41 | |
| time to shut that down and just use github. | |||
|
17:54
rurban_mobile joined
18:03
contingencyplan joined
18:20
p6eval joined
19:24
benabik joined
19:40
rurban_mobile joined
21:22
sivoais joined
23:36
kid51 joined
23:45
whiteknight joined
|
|||
| whiteknight | good evening, #parrot | 23:52 | |