The 'Pawn Language' Forum

An embedded scripting language

 

Reply To This Topic    Back To Forum Index
 
DanLanders
Posted On 2010-01-17 07:23 -- Subject: "Struct" type module for Pawn

Hello,

I was discussing the possibility of a struct type module for pawn so scripts could interact with binary data. I was communicating with the author of pawn on a specification. Well, the work has been done in the spirit of our conversation. So now I have several questions...

1. Is anyone interested in reviewing the code? (beware, it is not totally complete in the manner of pawn so there may need to be coaching on this)
2. I haven't heard from Thaidmer since July? Is he ok?

BAILOPAN



website

Posted On 2010-01-19 04:44 -- Subject: RE: "Struct" type module for Pawn

He appears once or twice a year with a new release in hand ;)

I'd be glad to take a look - native struct interop is something we're really interested in. We wrote a set of natives for it about a year ago. Pawn's memory model makes it difficult to deal with nested structures in a cross-platform way (unless you have GC). It's also particularly bad at type safety in general, and we wanted run-time errors trying to access, say, a float member as a string.

So it never went into production, though the code is public. We (SourceMod dev team) would definitely be interested in other approaches.
DanLanders
Posted On 2010-01-22 11:53 -- Subject: RE: "Struct" type module for Pawn

How do I get you the code?
DanLanders
Posted On 2010-01-22 11:58 -- Subject: RE: "Struct" type module for Pawn

Bailopan,

FYI, I had a pretty good conversation with Thaidmer about a "spec" so I followed the spirit of the conversation. The code was done in Visual Studio 6 so I could easily hook the DLL into the "installed" amx that comes in the distribution. Like I said before, I'm not sure how to make it more platform independent from a build standpoint (like the pawn version of autoconf if that makes sense) so some guidance would be appreciated.

I'll include the text from the email with the source as well.

Thanks
DanLanders
Posted On 2010-01-22 12:27 -- Subject: RE: "Struct" type module for Pawn

You know, I should have thought this through before I wildly post, but a couple of things.

It is based on the concepts of the python struct module so you have to know the native stucts and the scripts define them in a string of tokens.

It is based on the python struct interface with Thaidmer's suggestions but it is clean and written without visibility into the python source code.

I think I'm done now for today.
BAILOPAN



website

Posted On 2010-01-27 15:01 -- Subject: RE: "Struct" type module for Pawn

dvander at alliedmods dot net

or just post the source code somewhere :)
Dan Landers
Posted On 2010-03-23 07:40 -- Subject: RE: "Struct" type module for Pawn

Sorry for the delay. The code is now posted here:

http://code.google.com/p/amxstruct/

I will work on improving this with source code through SVN, a document, etc.

You Are On Page: 1/1 <<   <   1   >   >>




- BiTBOARD version 2.5 by the BiTSHiFTERS SDC -