Re: embedding

2007-01-12 Thread Jeff Horwitz
On Fri, 12 Jan 2007, Isaac Freeman wrote: Hello, I am looking to embed parrot in a project of mine, sort of as a configuration/scripting engine. I've looked at embed.h, and it does show how to start an interpreter, and how to make it run code, but I don't see any mechanism for communication bet

Re: Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread leif . eriksen
[EMAIL PROTECTED] wrote: You may wish to look at Test::Inline and Test::Class which are different approaches to putting your tests near your code. Test::Inline looks like what I'm thinking - thanx Also __TEST__ is not legal Perl which gets into source filters and then the burning and itc

Re: Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread Michael G Schwern
On Fri, Aug 12, 2005 at 10:28:36AM +1000, [EMAIL PROTECTED] wrote: > I'm thinking that the code, tests, data and pod are all there in the pm > file - that seems on the surface a good thing. Does this seem like a > reasonable idea ? > > Against it is the significant inertia the current .t regime

Re: embedding ParTcl

2005-07-28 Thread Will Coleda
On Jul 27, 2005, at 9:46 PM, Thilo Planz wrote: Hi, I have a few beginner's question about ParTcl. I am trying to embed ParTcl into a PIR application, which seems to work quite nicely, except that I have not yet figured out how to do certain things. This is almost certainly no fault

Re: embedding/extending interface

2005-07-14 Thread Leopold Toetsch
chromatic wrote: On Wed, 2005-07-13 at 15:41 +0100, Nicholas Clark wrote: Did anything come of this? Or is chromatic still waiting in the wings for confirmation that this is the right way to go? I'm still waiting for confirmation. I can send my existing (needs polish) patch if that will he

Re: embedding/extending interface

2005-07-13 Thread chromatic
On Wed, 2005-07-13 at 15:41 +0100, Nicholas Clark wrote: > Did anything come of this? Or is chromatic still waiting in the wings for > confirmation that this is the right way to go? I'm still waiting for confirmation. I can send my existing (needs polish) patch if that will help speed the discus

Re: embedding/extending interface

2005-07-13 Thread Jeff Horwitz
On Wed, 13 Jul 2005, Nicholas Clark wrote: > On Wed, May 11, 2005 at 11:18:30AM +0100, Nicholas Clark wrote: > > On Tue, May 10, 2005 at 01:13:48PM -0400, Jeff Horwitz wrote: > > > as part of both the pugs and mod_parrot effort, i've started working on > > > bringing the embedding and extending in

Re: embedding/extending interface

2005-07-13 Thread Nicholas Clark
On Wed, May 11, 2005 at 11:18:30AM +0100, Nicholas Clark wrote: > On Tue, May 10, 2005 at 01:13:48PM -0400, Jeff Horwitz wrote: > > as part of both the pugs and mod_parrot effort, i've started working on > > bringing the embedding and extending interfaces into the modern parrot > > era. i'd like t

Re: embedding w/ new calling conventions

2005-07-07 Thread Leopold Toetsch
Jeff Horwitz wrote: mod_parrot is running into a bit of trouble calling subs written in PIR with the new calling conventions. [ ... ] this may all be premature, as leo's branch is still brand-spanking new, Yep, very premature. I'd be glad to get some test cases, though. -jeff Thanks,

Re: embedding/extending interface

2005-05-11 Thread Nicholas Clark
On Tue, May 10, 2005 at 01:13:48PM -0400, Jeff Horwitz wrote: > as part of both the pugs and mod_parrot effort, i've started working on > bringing the embedding and extending interfaces into the modern parrot > era. i'd like to start by adding public APIs (Parrot_*) where necessary > and adding mi

Re: embedding initialization

2005-05-05 Thread Jeff Horwitz
excellent! now i can get rid of that silly no-op bytecode i've been using. thanks for the quick turnaround, leo. -jeff On Thu, 5 May 2005, Leopold Toetsch wrote: > Jeff Horwitz wrote: > > i'm neck deep in writing the IMC eval code for pugs. ... > > > ... but i imagine there's a more > > elegan

Re: embedding initialization

2005-05-05 Thread Leopold Toetsch
Jeff Horwitz wrote: i'm neck deep in writing the IMC eval code for pugs. ... ... but i imagine there's a more elegant solution out there. t/src/compiler.t has now all the steps to run a PIR code string from C. It's not elegant though, because there are no APIs, but it should make things running.

Re: embedding initialization

2005-05-04 Thread Leopold Toetsch
Jeff Horwitz wrote: i'm neck deep in writing the IMC eval code for pugs. if i've already loaded bytecode using Parrot_readbc/loadbc, i can then successfully call the PIR compiler and eval code at will from C/Haskell. great! however, without the Parrot_readbc step, everything bombs out because the

Re: embedding languages in Perl 6

2005-04-21 Thread Michele Dondi
On Wed, 20 Apr 2005, [ISO-8859-2] BÁRTHÁZI András wrote: I'm just wondering, if the following would be possible with Perl 6 or not? XML $a=Content #1Content #2; [snip] The ideas coming from Comega, the next version of CSharp(?). Here's an intro about it: Some time ago I asked a somewhat related qu

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Matt
On Wed, 20 Apr 2005 14:13:42 -0400, Larry Wall <[EMAIL PROTECTED]> wrote: Heredocs are variants on q:to these days, but if you're going to be mixing Perl and SQL syntax, it's probably better to dispense with the heredoc and just have a language variant so that you can parse it at compile time. A h

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread =?ISO-8859-1?Q?B=C1RTH=C1ZI_Andr=E1s?=
Hi, What is the benefit of this syntax over having a simple function that takes one argument, interpolating variables from CALLER::? for sql 'SELECT * FROM table WHERE id=$id' { ... } The difference is between compile time parsing and runtime parsing. This expression can be transformed to a pr

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Juerd
Matt skribis 2005-04-20 13:51 (-0400): > If not already possible, it would be neat to be able to define your own > quote blocks. Such as being able to define how to parse the below lines: It is possible to create your own sql// if you want it. > for q:sql/SELECT * FROM table WHERE id=$id/

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 01:51:11PM -0400, Matt wrote: : If not already possible, it would be neat to be able to define your own : quote blocks. Such as being able to define how to parse the below lines: : : $result = q:sql/SELECT * FROM table/; : : for q:sql/SELECT * FROM table WHERE id=$i

Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Matt
I sent this to BÁRTHÁZI only instead of BÁRTHÁZI and the list as well. So here's a forward of what I sent and he replied to. --- Forwarded message --- From: Matt <[EMAIL PROTECTED]> To: "BÁRTHÁZI András" <[EMAIL PROTECTED]> Cc: Subject: Re: embedding langua

Re: embedding languages in Perl 6

2005-04-20 Thread =?ISO-8859-15?Q?B=C1RTH=C1ZI_Andr=E1s?=
Hi Matt, Why didn't you sent it to the list, too? It would be nicer to say: $a=xmlContent #1Content #2; But native xml parsing is better, I think. :) Anyway, it's possible to write: $a=sql; If not already possible, it would be neat to be able to define your own quote blocks. Such as being able t

Re: embedding languages in Perl 6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 06:57:00PM +0200, BÁRTHÁZI András wrote: : It ends, when a non opened ')', a ';' or a '}' is coming. Of course, : that's not all cases, but it seems to be not so hard to find the all : possible cases. The question is what will be clear to the reader of the code. : >We sh

Re: embedding languages in Perl 6

2005-04-20 Thread =?ISO-8859-1?Q?B=C1RTH=C1ZI_Andr=E1s?=
Hi, : I'm just wondering, if the following would be possible with Perl 6 or not? : : > XML : : $a=Content #1Content #2; : : say $a.elems[0].elem[1].content; # "Content #1" : : for ($a.elems) { say $_.content; } : : or XPath like syntax on a structure? That's somewhat ambiguous with our curren

Re: embedding languages in Perl 6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 05:08:51PM +0200, BÁRTHÁZI András wrote: : Hi, : : I'm just wondering, if the following would be possible with Perl 6 or not? : : > XML : : $a=Content #1Content #2; : : say $a.elems[0].elem[1].content; # "Content #1" : : for ($a.elems) { say $_.content; } : : or XPath

Re: embedding/extending issues

2004-10-24 Thread Leopold Toetsch
Jeff Horwitz <[EMAIL PROTECTED]> wrote: > dan asked to keep everyone up to date on any issues i've had while > developing mod_parrot. Great thanks. > ... following are the problems i've encountered. > --- > i currently get parrot's configuration from config_lib.pasm. however, it > is not readi

Re: Embedding and stack

2004-05-08 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > +void * > +Parrot_Embed_PMC_get_pointer(Parrot_Interp interp, Parrot_PMC pmc) { > +if(interp->lo_var_ptr) { > +return Parrot_PMC_get_pointer(interp, pmc); > +} else { > +void *result; /* Doubles up as an indicator of stack top. *

Re: Embedding and stack

2004-05-07 Thread Nicholas Clark
On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > Okay, here's the rules for PMCs that live outside parrot, and calling > into parrot from the outside. > > 1) *ALL* PMCs which are created outside parrot must be registered > (unless they're otherwise anchored) > 2) No call into parr

Re: Embedding and stack

2004-05-04 Thread Leopold Toetsch
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > Dan Sugalski wrote: >> 3) The embedding wrapper is responsible for setting and resetting the >> top of stack. > Proof-of-concept: Looks good. Thanks, applied. leo

Re: Embedding and stack

2004-05-03 Thread Dan Sugalski
At 9:33 PM +0100 5/3/04, Nicholas Clark wrote: On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: 3) The embedding wrapper is responsible for setting and resetting the top of stack. I don't think that this is quite right. The embedding wrapper needs to set (and reset) the top of stack

Re: Embedding and stack

2004-05-03 Thread Nicholas Clark
On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > 3) The embedding wrapper is responsible for setting and resetting the > top of stack. I don't think that this is quite right. The embedding wrapper needs to set (and reset) the top of stack only if it's not set. Otherwise this scen

Re: Embedding and stack

2004-05-03 Thread Nicholas Clark
On Mon, May 03, 2004 at 04:36:38PM -0400, Dan Sugalski wrote: > At 9:33 PM +0100 5/3/04, Nicholas Clark wrote: > >On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > > > >> 3) The embedding wrapper is responsible for setting and resetting the > >> top of stack. > > > >I don't think that

Re: Embedding and stack

2004-05-03 Thread Dan Sugalski
At 9:43 PM +0100 5/3/04, Nicholas Clark wrote: On Mon, May 03, 2004 at 04:36:38PM -0400, Dan Sugalski wrote: At 9:33 PM +0100 5/3/04, Nicholas Clark wrote: >On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > >> 3) The embedding wrapper is responsible for setting and resetting the

Re: Embedding and stack

2004-05-03 Thread Brent 'Dax' Royal-Gordon
Dan Sugalski wrote: 3) The embedding wrapper is responsible for setting and resetting the top of stack. Proof-of-concept: --- src/embed.c 2 May 2004 10:47:54 - 1.113 +++ src/embed.c 3 May 2004 19:08:23 - @@ -666,6 +666,17 @@ void Parrot_runcode(Interp *interpreter, int argc, char

Re: Embedding vs. extending interface types

2004-01-25 Thread Gordon Henriksen
On Sunday, January 25, 2004, at 07:08 , Leopold Toetsch wrote: Gordon Henriksen <[EMAIL PROTECTED]> wrote: Speaking of cleaning and uniting, what is with this? #define bufstart obj.u.b.bufstart #define buflen obj.u.b.buflen These are *currently* necessary macros, until the PMC/PObj layout is

Re: Embedding vs. extending interface types

2004-01-25 Thread Leopold Toetsch
Gordon Henriksen <[EMAIL PROTECTED]> wrote: > Speaking of cleaning and uniting, what is with this? > #define bufstart obj.u.b.bufstart > #define buflen obj.u.b.buflen These are *currently* necessary macros, until the PMC/PObj layout is really carved in stones. You had in your proposal a differ

Re: Embedding vs. extending interface types

2004-01-25 Thread Gordon Henriksen
On Sunday, January 25, 2004, at 03:44 , Leopold Toetsch wrote: Gordon Henriksen <[EMAIL PROTECTED]> wrote: All embedders see is this: typedef struct Parrot_Interp *Parrot_Interp; I don't do decisions on embedding or extending interfaces. But it seems to be the time to decide (and clean/unite)

Re: Embedding vs. extending interface types

2004-01-25 Thread Leopold Toetsch
Gordon Henriksen <[EMAIL PROTECTED]> wrote: > All embedders see is this: > typedef struct Parrot_Interp *Parrot_Interp; I don't do decisions on embedding or extending interfaces. But it seems to be the time to decide (and clean/unite) the current names: struct Interp* / struct Parrot_Inte

Re: Embedding vs. extending interface types

2004-01-25 Thread Gordon Henriksen
On Saturday, January 24, 2004, at 02:28 , Leopold Toetsch wrote: Mattia Barbon <[EMAIL PROTECTED]> wrote: I feel I'm becoming annoying, but: the embedding and extending interfaces are still using different names for Parrot_Interp/Parrot_INTERP. Which one is correct? AFAIK both. Embedding and ex

Re: Embedding vs. extending interface types

2004-01-25 Thread Leopold Toetsch
Mattia Barbon <[EMAIL PROTECTED]> wrote: > Hello, > I feel I'm becoming annoying, but: the embedding and extending > interfaces are still using different names for Parrot_Interp/Parrot_INTERP. > Which one is correct? AFAIK both. Embedding and extending are to different APIs. The former has acc

Re: Embedding vs. extending interface types

2004-01-24 Thread Gordon Henriksen
I wrote: Mattia Barbon wrote: I feel I'm becoming annoying, but: the embedding and extending interfaces are still using different names for Parrot_Interp/Parrot_INTERP. Which one is correct? [blahblahblah] Spoke too soon. Parrot_INTERP looks unnecessary. Parrot_Interp already has the needed op

Re: Embedding vs. extending interface types

2004-01-24 Thread Gordon Henriksen
On Saturday, January 24, 2004, at 11:28 , Mattia Barbon wrote: I feel I'm becoming annoying, but: the embedding and extending interfaces are still using different names for Parrot_Interp/Parrot_INTERP. Which one is correct? Mattia, Both are correct. Sort of. :) Parrot_INTERP is an opaque type,

Re: Embedding interface to PMCs

2003-09-11 Thread Josh Wilmes
If the pdd is amended, let's not forget to update the check_source script- for that matter, if there are any other items that should be added (perhaps some specific checks for the embedding headers), let me know- I'll be happy to add them. --Josh At 18:57 on 09/11/2003 BST, Nicholas Clark <[E

Re: Embedding interface to PMCs

2003-09-11 Thread Nicholas Clark
On Thu, Sep 11, 2003 at 09:30:29PM +0300, Vladimir Lipskiy wrote: > to document the idea of Juergen Bommels to include the > > extern "C" { > I take it you meant the full game: #ifdef __cplusplus extern "C" { #endif > specification () in each header in pdd7_codingstd, no body had replied), >

Re: Embedding interface to PMCs

2003-09-11 Thread Vladimir Lipskiy
- Original Message - From: "Arthur Bergman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, September 11, 2003 7:14 PM Subject: Embedding interface to PMCs > Hi, > > Is there any documentation, or code I can read to figure out how use > PMCs in embedded m

Re: Embedding Parrot in Perl

2003-08-28 Thread Leopold Toetsch
Luke Palmer <[EMAIL PROTECTED]> wrote: > > 2) What do I put as stacktop in Parrot_init()? Its gone. stacktop is now set internally before entering the run loop. > Thanks, > Luke leo

Re: Embedding Parrot in Perl

2003-08-28 Thread Leopold Toetsch
Juergen Boemmels <[EMAIL PROTECTED]> wrote: > Benjamin Goldberg <[EMAIL PROTECTED]> writes: >> If our DoD is no longer walking the C stack, then stacktop should no >> longer be needed. Until the code is changed, just pass NULL. > AFAIK, the stack is still walked. (I don't like this but thats a >

Re: Embedding Parrot in Perl

2003-08-28 Thread Juergen Boemmels
Benjamin Goldberg <[EMAIL PROTECTED]> writes: > Luke Palmer wrote: > > > > I started working on some XS code for embedding a Parrot interpreter in > > Perl. I ran into a few problems: > > > > 1) I don't know XS :-) (good way to learn, though) > > > > 2) What do I put as stacktop in P

Re: Embedding Parrot in Perl

2003-08-25 Thread Nicholas Clark
On Mon, Aug 25, 2003 at 10:44:59AM -0600, Luke Palmer wrote: > I started working on some XS code for embedding a Parrot interpreter in > Perl. I ran into a few problems: > > 1) I don't know XS :-) (good way to learn, though) Have you looked at what Arthur's been up to with ponie? You can

Re: Embedding Parrot in Perl

2003-08-25 Thread Benjamin Goldberg
Luke Palmer wrote: > > I started working on some XS code for embedding a Parrot interpreter in > Perl. I ran into a few problems: > > 1) I don't know XS :-) (good way to learn, though) > > 2) What do I put as stacktop in Parrot_init()? I can't just use a >local variable in

Re: Embedding Questions

2003-02-17 Thread chromatic
On Thu, 13 Feb 2003 10:36:43 +0100, Alin Iacob wrote: > On February 13, 2003 2:00 chromatic wrote: >>I'm experimenting with embedding Parrot at the moment, and have a few > questions. > Some time ago Brent Dax propossed the following PDD: > http:[EMAIL PROTECTED]/msg11922.html Thanks, that answe

Re: Embedding Questions

2003-02-13 Thread Alin Iacob
On February 13, 2003 2:00 chromatic wrote: >I'm experimenting with embedding Parrot at the moment, and have a few questions. > >1) How do I get data into Parrot-space? I can pass arguments to >Parrot_runcode() or I could populate some registers directly, but both >approaches have their drawbacks.