Hi,
I'm wanting to write a proper 'plugin' instead of using the FFI for my D-Bus stuff. Looking at the sources for Sockets etc., it would seem I need to use aio.h in platforms/unix/vm/, and then squeak will watch my file-descriptors for me. Is this correct? More generally, is there documentation (other than source code :) for how things work at the C-level?
thanks, Daniel Faken
Hi squeaker! Have you already checked this?? www.iam.unibe.ch/~ducasse/FreeBooks/ CollectiveNBlueBook/greenberg.pdf.
This could help you to start with.
One important thing is that you must define the functions the VM will call ("loadModule()" and "char* getModuleName()", if my memories are good) if you want to get it to work.
I don't remember much more, but I still hope this helps. Mail me back if you have other specific problems.
Regards.
In message 1117721699.429f1463968dd@tournedix.iutc3.unicaen.fr François THIMON thimof@iutc3.unicaen.fr wrote:
Hi squeaker! Have you already checked this?? www.iam.unibe.ch/~ducasse/FreeBooks/ CollectiveNBlueBook/greenberg.pdf.
You'll want to lose the space between FreeBooks/ and Collective.. www.iam.unibe.ch/~ducasse/FreeBooks/CollectiveNBlueBook/greenberg.pdf
and you might find my chapter useful as well www.iam.unibe.ch/~ducasse/FreeBooks/CollectiveNBlueBook/Rowledge-Final.pdf
and maybe Ian's www.iam.unibe.ch/~ducasse/FreeBooks/CollectiveNBlueBook/porting-subfinal 2.pdf (include the space!)
Please note that the greenberg chapter is a little out of date (actually pretty much all of them are by now, but still very useful) particularly as we renamed 'TestInterpreterPlugin' et al. to SmartSyntaxInterpreterPlugin a couple of releases ago. 'Test' just didn't seem right after it had been thoroughly tested and approved.
This could help you to start with.
One important thing is that you must define the functions the VM will call ("loadModule()" and "char* getModuleName()", if my memories are good) if you want to get it to work.
Not if you are writing a proper plugin with Slang. a) I think you mean 'initialiseModule() since loadModule is part of thecore vm b) getModuleName() is made for you automatically c) initialiseModule is optional and only needed if you need to do some work when the plugin is initialised (duh)
Do take a little time to read the code for some of the subclasses of SmartSyntaxInterpreterPlugin along with Andy Greenberg's chapter. And do read the swiki pages on VMMaker and VMMakerTool.
tim -- Tim Rowledge, tim@rowledge.org, http://www.rowledge.org/tim No single raindrop believes it is to blame for the flood
More generally, is there documentation (other than source code :) for
how things work at the C-level?
You are a fine comedian....
The more elite the hacker, the sparser the documentation.
Allegedly there are some books that cover how it was supposed to work several years ago.
As for me, the current SVN sources don't even compile. [I'll download the 3.8 image today and try again but then I have to figure out how to migrate all the stuff in my 3.7 image...... ]
On Wed, Jun 02, 2004 at 12:08:22PM -0500, Alan Grimes wrote:
More generally, is there documentation (other than source code :) for how things work at the C-level?
The more elite the hacker, the sparser the documentation.
Evidently you have not had occasion to read Ian's excellent VM platform documentation. This has been cleverly hidden in a ./doc directory, so it is certainly understandable that it might have been overlooked by someone expecting something more elite.
Dave
David T. Lewis wrote:
Evidently you have not had occasion to read Ian's excellent VM platform documentation. This has been cleverly hidden in a ./doc directory, so it is certainly understandable that it might have been overlooked by someone expecting something more elite.
I'll confess that it's a start but it still is nothing more than user documentation. The issues that are likely to drive the prospective VM h4x0r insane aren't even mentioned. Most notably absent is the build system; how the makefiles are generated, and the crucial interfaces between the varrious major subsystems such as the video drivers...
On Thu, Jun 02, 2005 at 10:08:03AM -0400, Daniel B. Faken wrote:
I'm wanting to write a proper 'plugin' instead of using the FFI for my D-Bus stuff. Looking at the sources for Sockets etc., it would seem I need to use aio.h in platforms/unix/vm/, and then squeak will watch my file-descriptors for me. Is this correct?
Have a look at AioPlugin on SqueakMap, and plagiarize freely. This partially duplicates some primitives in OSProcessPlugin (also on SqueakMap), but I split the aio stuff out into a separate package in hopes of making Ian's aio functions available in a more general form. Note that you are getting into platform-specific territory here, as the aio functions are part of the Unix VM code basel As far as I know the equivalent Windows/RiscOS/etc functions are not available (but of course it must be possible to do on any platform for which Tk/tcl is available).
HTH,
Dave
squeak-dev@lists.squeakfoundation.org