Colin Paul Adams wrote:
"Colin" == Colin Paul Adams <[EMAIL PROTECTED]> writes:
"Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> What's the difference WRT va_list? If the interface code
Leopold> can stuff things into an array, it sould as well be able
Leopold> t
> "Colin" == Colin Paul Adams <[EMAIL PROTECTED]> writes:
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> What's the difference WRT va_list? If the interface code
Leopold> can stuff things into an array, it sould as well be able
Leopold> to prepare a va_list
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> BTW (again) which interface generator for which Eiffel?
Oops. I missed that last bit.
All current Eiffel compilers are supported.
--
Colin Adams
Preston Lancashire
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> Colin Paul Adams wrote:
>>> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> What's the difference WRT va_list? If the interface code
Leopold> can stuff things into an array, it sould as we
Colin Paul Adams wrote:
"Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> What's the difference WRT va_list? If the interface code
Leopold> can stuff things into an array, it sould as well be able
Leopold> to prepare a va_list.
You are quite right. I'll harass the
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> 1) Someone fixes the Eiffel interface generator to understand C
> variadic functions.
Yep :)
> 2) We provide a function and method call interface that assumes
> you've already pre-filled in the registers according to parrot's
> calling conventions
That
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> What's the difference WRT va_list? If the interface code
Leopold> can stuff things into an array, it sould as well be able
Leopold> to prepare a va_list.
You are quite right. I'll harass the author of the interfac
> "Dan" == Dan Sugalski <[EMAIL PROTECTED]> writes:
Dan> So, I see four real options:
Dan> 1) Someone fixes the Eiffel interface generator to understand
Dan> C variadic functions. 2) We provide a function and method
Dan> call interface that assumes you've already pre-filled i
On Fri, 20 May 2005, Dan Sugalski wrote:
So, I see four real options:
1) Someone fixes the Eiffel interface generator to understand C variadic
functions.
2) We provide a function and method call interface that assumes you've
already pre-filled in the registers according to parrot's calling
conve
On Fri, 20 May 2005, Colin Paul Adams wrote:
Leopold> interpreter, PMC *sub, const char *sig, va_list args)>
And as for hand-writing interfaces, I'm not sure I know HOW to create
a va_list.
void *Parrot_runops_fromc_argsN(Parrot_Interp i, PMC *sub,
const char *si
Dan Sugalski wrote:
There are interfaces in the extension system to get a void * and length
back from a PMC when fetching string data out, but I see we don't have
that for plain strings. I'll probably fix that this weekend if someone
doesn't beat me to it.
There was a disucssion WRT that on #par
At 4:35 PM -0400 5/20/05, C. Scott Ananian wrote:
On Fri, 20 May 2005, Dan Sugalski wrote:
Well, mostly. string->cstring conversion is potentially lossy, if
for no other reason than embedded nulls will get in your way. I see
we're not exposing anything to do that, though, which we ought to
fix.
On Fri, 20 May 2005, Dan Sugalski wrote:
Well, mostly. string->cstring conversion is potentially lossy, if for no
other reason than embedded nulls will get in your way. I see we're not
exposing anything to do that, though, which we ought to fix.
pascal-style strings (ie, char* and length) are the
At 8:10 PM +0100 5/20/05, Colin Paul Adams wrote:
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> Colin Paul Adams <[EMAIL PROTECTED]> wrote:
>> I have a problem with this - namely that the function is
>> variadic, and the interface generator can't cope with thi
Colin Paul Adams wrote:
"Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> interpreter, PMC *sub, const char *sig, va_list args)>
Despite what I said before, this is actually worse than
Parrot_call_sub.
The interface generator ignores it completely,
What interface generator?
.
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> Colin Paul Adams <[EMAIL PROTECTED]> wrote:
>> I have a problem with this - namely that the function is
>> variadic, and the interface generator can't cope with this.
Leopold> Have a look at src/inter_run.c e.
At 1:15 AM +0800 5/21/05, Autrijus Tang wrote:
On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote:
Yeah, I bumped against that too. You need to look at the "strstart"
field in the ParrotString struct.
In Haskell I use:
peekCString =<< #{peek STRING, strstart} s5
Actually, never
On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote:
> Yeah, I bumped against that too. You need to look at the "strstart"
> field in the ParrotString struct.
>
> In Haskell I use:
>
> peekCString =<< #{peek STRING, strstart} s5
Actually, never mind; string_to_cstring is the way t
On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote:
> On Fri, May 20, 2005 at 05:42:48PM +0100, Colin Paul Adams wrote:
> > There is a function declaration
> > Parrot_string_cstring
> >
> > in string_funcs.h, but it appears to have no definitoon anywhere, so
> > that's not much use to m
On Fri, May 20, 2005 at 05:42:48PM +0100, Colin Paul Adams wrote:
> The problem I'm finding with this, is getting back the returned string
> characters.
> I assume the void * returned is pointing to a Parrot String.
> Certainly it's not a const char *.
Yes.
> There is a function declaration
> Par
> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:
Autrijus> You may wish to use Parrot_call_sub's "SS" form, where
Autrijus> you pass in a string and get back a string. Something
Autrijus> like this:
Autrijus> my $interp = Parrot_new(undef);
Autrijus> # .
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> Colin Paul Adams <[EMAIL PROTECTED]> wrote:
>> I have a problem with this - namely that the function is
>> variadic, and the interface generator can't cope with this.
Leopold> Have a look at src/inter_run.c e.
> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:
Autrijus> On Fri, May 20, 2005 at 10:34:39AM +0100, Colin Paul
Autrijus> Adams wrote:
>> I have a problem with this - namely that the function is
>> variadic, and the interface generator can't cope with this.
Autrij
Colin Paul Adams <[EMAIL PROTECTED]> wrote:
> I have a problem with this - namely that the function is variadic, and
> the interface generator can't cope with this.
Have a look at src/inter_run.c e.g.
leo
On Fri, May 20, 2005 at 10:34:39AM +0100, Colin Paul Adams wrote:
> I have a problem with this - namely that the function is variadic, and
> the interface generator can't cope with this.
Hmm, in Haskell FFI, we hard-coded two cases of invocation, treating
the function as two distinct, non-variadic
> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:
Autrijus> On Tue, May 17, 2005 at 03:00:14PM +0100, Colin Paul
Autrijus> Adams wrote:
>> But when I look at http://www.parrotcode.org/docs/embed.html, I
>> can see no way of getting information back from the script -
> "Leopold" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
Leopold> Yeah. I'm sorry to say that: you are just hitting a part
Leopold> of Parrot labeled "under (re)construction" and the docs
Leopold> aren't all up to date.
>> So does that mean I'm limited to singlebyte string
Colin Paul Adams wrote:
Parrot_new_string
and I'm passing "UTF-8" as the encoding name.
I get back:
Can't make 'UTF-8' charset strings
^^^
Despite what the documentation says:
encoding
Yeah. I'm sorry to say that: you are just hitting a part of Parrot
labeled "under (re)co
> "Colin" == Colin Paul Adams <[EMAIL PROTECTED]> writes:
> "Jeff" == Jeff Horwitz <[EMAIL PROTECTED]> writes:
Colin> Can't make 'UTF-8' charset strings
Colin> Despite what the documentation says:
Colin> encoding
Colin> This specifies the encoding used to encode the cha
> "Jeff" == Jeff Horwitz <[EMAIL PROTECTED]> writes:
Jeff> all you should need to include is embed.h, extend.h and for
Jeff> now, resources.h. i'm actually working on fleshing these
Jeff> files out to be more consistent wrt the public API.
I'm getting real close now.
But I'm hav
> "Jeff" == Jeff Horwitz <[EMAIL PROTECTED]> writes:
>> What headers do I need to read for the parrot_find_global call?
Jeff> Parrot_PMC is the public type, and behind the scenes it's
Jeff> defined as PMC *.
Jeff> all you should need to include is embed.h, extend.h and for
On 19 May 2005, Colin Paul Adams wrote:
[snip]
> I'm having a problem with this.
> For Parrot_find_global, I'm specifying global.h as one of the header
> files which must be read to generate definitions from.
> But this is failing, apparently because PMC isn't defined.
>
> So I tried to find wher
> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:
Autrijus> You may wish to use Parrot_call_sub's "SS" form, where
Autrijus> you pass in a string and get back a string. Something
Autrijus> like this:
Autrijus> my $interp = Parrot_new(undef);
Autrijus> # .
Colin Paul Adams wrote:
Autrijus> my $return_str = Parrot_call_sub( $interp,
Autrijus> $code_pmc, const_string("SS"),
Autrijus> const_string("Your_input_string_here"), );
I'm confused by this - what language is it written in? Perl?
APL: Autrijus' Pseudocde Language
And will:
Parrot_
> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:
Autrijus> On Tue, May 17, 2005 at 03:00:14PM +0100, Colin Paul
Autrijus> Adams wrote:
>> But when I look at http://www.parrotcode.org/docs/embed.html, I
>> can see no way of getting information back from the script -
On 5/17/05, Autrijus Tang <[EMAIL PROTECTED]> wrote:
> On Tue, May 17, 2005 at 05:31:32PM +0100, Colin Paul Adams wrote:
> > I take it SS stands for String-to-String?
>
> Yes. "PPC" would stand for PMC -> PMC -> String, i.e. take two PMCs
> and returns a String.
>
of course, you meant PPS here,
On Tue, May 17, 2005 at 05:31:32PM +0100, Colin Paul Adams wrote:
> I take it SS stands for String-to-String?
Yes. "PPC" would stand for PMC -> PMC -> String, i.e. take two PMCs
and returns a String.
> Which section within http://www.parrotcode.org/docs/ covers this sort
> of thing?
`perldoc ex
On 17 May 2005, Colin Paul Adams wrote:
> Actually, examples in any language are fine.
> I'm actually writing in Eiffel, but I shall use an interface generator
> to automatically build low-level bridging classes from the C header
> files.
> I intend to make it available as a general extension mech
> "Jeff" == Jeff Horwitz <[EMAIL PROTECTED]> writes:
>> Why's that a but? Haskell's a good language.
Jeff> no argument there -- just assumed you were looking for
Jeff> examples in C! :)
Actually, examples in any language are fine.
I'm actually writing in Eiffel, but I shall use
> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:
Autrijus> You may wish to use Parrot_call_sub's "SS" form, where
Autrijus> you pass in a string and get back a string.
I take it SS stands for String-to-String?
Which section within http://www.parrotcode.org/docs/ covers this
On 17 May 2005, Colin Paul Adams wrote:
> Jeff> also have a look at the mod_parrot source
> Jeff> (http://www.smashing.org/mod_parrot), which is one of the
> Jeff> few apps embedding parrot at the moment. the other is pugs
> Jeff> (http://www.pugscode.org), but it's written in has
> "Jeff" == Jeff Horwitz <[EMAIL PROTECTED]> writes:
Jeff> you'll probably want to use the Parrot_call_sub_* API to
Jeff> call individual subroutines and get return values. "perldoc
Jeff> extend.c" in the parrot source for more info. you might
Thanks - I'll take a look at that.
On Tue, May 17, 2005 at 03:00:14PM +0100, Colin Paul Adams wrote:
> But when I look at http://www.parrotcode.org/docs/embed.html, I can
> see no way of getting information back from the script - not even an
> exit code. Is there anyway of doing this that I have missed?
You may wish to use Parrot_c
you'll probably want to use the Parrot_call_sub_* API to call individual
subroutines and get return values. "perldoc extend.c" in the parrot
source for more info. you might also have a look at the mod_parrot source
(http://www.smashing.org/mod_parrot), which is one of the few apps
embedding parro
44 matches
Mail list logo