On 30 September 2010 06:20, Schwab,Wilhelm K <bschwab@anest.ufl.edu> wrote:
Sig,
"A proper error handling is an important part of infrastructure-level project (such as NativeBoost), since then people who using it, can quickly determine what's wrong with their code."
Well said!!!! Â Still working on that grant proposal; I'll be glad when it's submitted. Â Do you have any sense of when callbacks will be available? Â Please don't feel any pressure from me, because I have a lot to do before I can make proper use of them.
I'd like to see someone, like you to start using it. And during it, i can start receiving feedback and so, NB could improve in quality and feature set :) See, i did most stuff , what i would need , but apparently i could miss something which may be userfull as well.
One really crazy idea: inline C. Â Is there any way that one could put C code into a method, have it compiled and captured somehow as part of the image? Â Perhaps I am underestimating Cog and will soon not need to bother with stuff like this, but a recent addition was
void LogOnePlus(double * data, unsigned long size) /* Â Â Â Â Add one and take log10() over the buffer; in-place transformation! */ { Â Â Â Â for(unsigned long i=0; i<size; i++){ Â Â Â Â data[i] = log10(data[i]+1); Â Â Â Â } }
That's a simple calculation, but do it millions of times and it adds up. Â Even if Cog is sufficiently far reaching to translate such things, there are still times when C/C++ does a far nicer job of translating formulas than does Smalltalk. Â Like I said, it's a crazy idea, and if I have to choose, I'd rather have callbacks :)
Of course its possible. After porting C parser/compiler into smalltalk :) Or perhaps some meta-language which looks like C, but which easier to translate to native code.
Bill
-- Best regards, Igor Stasenko AKA sig.