he has not provided documentation for Nativeboost that's true, but he never left a question unanswered either ;)
I think I will come around eventually to adding documentation to Nativeboost. Imagine every Pharoer adding 10 lines of documentation every day. Say 100 people . That's 33 pages per day , 12167 pages per year. Thats 30 books of the size of PBE per year. An insane amount of documentation. On Fri, May 30, 2014 at 10:57 AM, stepharo <steph...@free.fr> wrote: > Hi joachim > > could you spend some time and helping us to write a documentation on > nativeboost? > Else it will always stay the same. I cannot systematically try to write > documentation on things I do not have expertise > because it is killing me. > > For igor everything is obvious :) but we spent some afternoons improving > the x11 tutorial. > > Stef > > > > On 30/5/14 08:50, Joachim Geidel wrote: > > Hello Clément, > > Am 29.05.2014 um 17:23 schrieb Clément Bera <bera.clem...@gmail.com>: > > NativeBoost is clearly the best option because it is the fastest, it is > mostly implemented in the image so you can look at the code and it is by > default in the image. > > FFI from the VM typically manages much better callbacks, so if you plan > to extensively use callbacks you should look at it, by loading the package > of Aliens (It does not rely any more on the old implementation of aliens > but still have the same image side API and library). Alternatively you can > improve NativeBoost so it manages better call back, this is "easy" as it is > mostly implemented in the image. > > > Could you explain why FFI is better at managing callbacks? I have used > NativeBoost or implementing JNIPort, and callbacks were one of the easier > parts of the work I had to do. As far as I know, both FFI and NativeBoost > don’t support callbacks from threads other than the thread in which the > Smalltalk code is executed, but that’s a limitation of both of them. > > As to improving NativeBoost: That’s not „easy“ at all. Some parts of it > are quite cryptic if you are not familiar with x86 assembler code, the > documentation is still sparse, and I am under the impression that there are > some unfinished parts. It is practically impossible to add something to > NativeBoost if you are not Igor, and just want to use it for your own > project as opposed to spending many hours trying to figure out how > NativeBoost works. I was somewhat lucky that I found everything I needed in > the archives of the pharo-dev and pharo-users mailing list., but i wouldn’t > call this documentation. > > I explained how to compile and bind a dll with NativeBoost here > (subsection Implementing the FFI calls) : > > http://clementbera.wordpress.com/2013/06/19/optimizing-pharo-to-c-speed-with-nativeboost-ffi/ > It is a very basic but very simple example. > > > Yes, this page helped, but as you wrote: basic and simple example - the > more involved stuff remains undocumented. When working on JNIPort, I > struggled with simple things like de-referencing a pointer to a pointer to > a struct etc. - I didn’t find documentation for this, and this is a basic > feature in my opinion. > > Best regards, > Joachim Geidel > > Additional examples can be found in the class NBBasicExamples in the > package NativeBoost-Examples. > There are also tests (For example NBFFICallbackTests>>#benchQSort) that > you can look at, they work and show how to use NativeBoost. > > Else there is the chapter in Pharo for the entrerprise. Other people > will give you a link. > > > >