On 19 November 2012 17:30, Max Leske <[email protected]> wrote: > > On 19.11.2012, at 21:26, Igor Stasenko <[email protected]> wrote: > >> On 19 November 2012 17:17, Max Leske <[email protected]> wrote: >>> Hi everyone. >>> >>> I want to announce the first (and *very* basic) version of Limbo. >>> Limbo is a simple wrapper around NativeBoost that lets you run commands on >>> the shell (via sh) or directly (no shell expansion). >>> >> >> why you need to wrap around NativeBoost? perhaps a more correct >> phrasing would be 'using nativeboost'? > > True. I chose "wrapper" with the idea that the NativeBoost part is hidden > from the user. The user does not need to know how to use NativeBoost. > >> >>> To use Limbo you will need the NBCog VM and install NativeBoost into your >>> image (with "NBInstaller install"). You will also need to build the shared >>> library from the archive attached to this e-mail and put it into the >>> "Plugins" directory of the VM (instructions inside the archive). I also >>> attached the xcode project. >>> >>> The Limbo repo: >>> >>> MCGemstoneRepository >>> location: 'http://ss3.gemstone.com/ss/Limbo' >>> user: '' >>> password: '' >>> >>> I am *not* an experienced C coder so there might be some horrible stuff in >>> the box. If you have any suggestions / requests / bug reports or would like >>> to contribute, let me know. >>> >>> Disclaimer: >>> NativeBoost uses direct memory access. I have written Limbo to the best of >>> my memory layout knowledge (I'm quite a n00b there) but cannot and will not >>> guarantee that you might not experience memory leaks or VM crashes (or any >>> type of crash for that matter). This is just a warning, I haven't had any >>> troubles at all with Limbo so far. >>> >> >> Hmm.. what is the C part for? The whole idea of using NativeBoost is >> to avoid writing a single line of C code. Because if you cannot avoid >> that, writing a VM plugin turns to be more preferable. >> But i didn't saw your code yet, so just commenting what on surface :) > > Very well possible that I got something wrong :) > Anyway, I figured that it would be easier for me to write C than NativeBoost. > Also, I use pipe / fork / execute, not sure how I would have done that in > NativeBoost (although it's probably possible) :) >
Sure thing it is easier to use C functions from C code :) But then think that anyone who would like to use your stuff will need to build this library by himself, copy it to right place etc etc.. Which means, less work for you turns into more work for users. Providing bindings to fork/pipe kernel functions is piece of cake. But writing a wrapper around it would be a bit of work.. but still it is possible. And you should try. And yes, using fork() stuff having many treacherous pitfalls, but don't think that if you call this function from code written in C instead of NB will make it less treacherous. I think Dave can give some more input on that, because he also using fork() in OSProcess. I am surely don't have good experience with this function to clearly tell if its usage is correct in context of VM or not. -- Best regards, Igor Stasenko.
