[ANN] NativeBoost v 1.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] NativeBoost v 1.3

Igor Stasenko
Hi, all

yesteray i committed new version of NativeBoost configuration.

Some details about last few months changes:

NativeBoost:

- introduced a NBExternalTypeValue class
- introduced a NBNativeFunction class, a reification of external
function generated dynamically
- introduced an NBExternalResourceManager and integration with other classes
- a lot of cleanup and better comments
- some updates to NativeBoost-Help package (currently it is not part
of configuration by default, so you have to
load this package manually from NB repository)

AsmJit:

- the package is split on several small packages + configuration to load it
- more documentation
- more nicer instruction printing output
- fixed some instructions (some FPU / jump instructions was non-functional)
- and a lot of effort by Camillo, who made x64 assembler working. (but
we cannot use it with NB since our VMs is 32bit)

To load NativeBoost you can follow an instructions on project page:


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Igor Stasenko
> To load NativeBoost you can follow an instructions on project page:
>
http://code.google.com/p/nativeboost/wiki/Installation


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Stéphane Ducasse
;D

Stef

On Aug 24, 2012, at 3:49 PM, Igor Stasenko wrote:

>> To load NativeBoost you can follow an instructions on project page:
>>
> http://code.google.com/p/nativeboost/wiki/Installation
>
>
> --
> Best regards,
> Igor Stasenko.
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Stéphane Ducasse
In reply to this post by Igor Stasenko
thanks a lot for this new version.


On Aug 24, 2012, at 3:24 PM, Igor Stasenko wrote:

> Hi, all
>
> yesteray i committed new version of NativeBoost configuration.
>
> Some details about last few months changes:
>
> NativeBoost:
>
> - introduced a NBExternalTypeValue class
> - introduced a NBNativeFunction class, a reification of external
> function generated dynamically
> - introduced an NBExternalResourceManager and integration with other classes
> - a lot of cleanup and better comments
> - some updates to NativeBoost-Help package (currently it is not part
> of configuration by default, so you have to
> load this package manually from NB repository)
>
> AsmJit:
>
> - the package is split on several small packages + configuration to load it
> - more documentation
> - more nicer instruction printing output
> - fixed some instructions (some FPU / jump instructions was non-functional)
> - and a lot of effort by Camillo, who made x64 assembler working. (but
> we cannot use it with NB since our VMs is 32bit)
>
> To load NativeBoost you can follow an instructions on project page:
>
>
> --
> Best regards,
> Igor Stasenko.
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

S Krish
In reply to this post by Igor Stasenko
On loading up and testing NB:

I get possibly a very basic hurdle... Obliged for a heads up..

Can send the stack if its needed..

SmallInteger(Object)>>doesNotUnderstand: #&
Receiver: 3
Arguments and temporary variables: 
aMessage: & 3
exception: MessageNotUnderstood: SmallInteger>>&
resumeValue: nil
Receiver's instance variables: 
3

AJx86Instruction>>emitMod:reg:rm:
Receiver: <<error during printing>>
Arguments and temporary variables: 
mod: 3
reg: 37
rm: 36
Receiver's instance variables: 
name: #mov
operands: an Array(EBP ESP)
machineCode: a WriteStream
position: 1
next: <<error during printing>>

On Fri, Aug 24, 2012 at 7:19 PM, Igor Stasenko <[hidden email]> wrote:
> To load NativeBoost you can follow an instructions on project page:
>
http://code.google.com/p/nativeboost/wiki/Installation


--
Best regards,
Igor Stasenko.


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Nicolas Cellier
Pharo 2.0 has implemented & -> bitAnd: and | -> bitOr:

For who is dealing with bits, that's convenient, however it creates
one more case of false polymorphism, these messages being used for
Boolean already...

Nicolas

2012/8/27 S Krish <[hidden email]>:

> On loading up and testing NB:
>
> I get possibly a very basic hurdle... Obliged for a heads up..
>
> Can send the stack if its needed..
>
> SmallInteger(Object)>>doesNotUnderstand: #&
> Receiver: 3
> Arguments and temporary variables:
> aMessage: & 3
> exception: MessageNotUnderstood: SmallInteger>>&
> resumeValue: nil
> Receiver's instance variables:
> 3
>
> AJx86Instruction>>emitMod:reg:rm:
> Receiver: <<error during printing>>
> Arguments and temporary variables:
> mod: 3
> reg: 37
> rm: 36
> Receiver's instance variables:
> name: #mov
> operands: an Array(EBP ESP)
> machineCode: a WriteStream
> position: 1
> next: <<error during printing>>
>
> On Fri, Aug 24, 2012 at 7:19 PM, Igor Stasenko <[hidden email]> wrote:
>>
>> > To load NativeBoost you can follow an instructions on project page:
>> >
>> http://code.google.com/p/nativeboost/wiki/Installation
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Igor Stasenko
On 27 August 2012 09:01, Nicolas Cellier
<[hidden email]> wrote:
> Pharo 2.0 has implemented & -> bitAnd: and | -> bitOr:
>
> For who is dealing with bits, that's convenient, however it creates
> one more case of false polymorphism, these messages being used for
> Boolean already...
>

yeah.. and it created some problems with NB, since i using those
methods internally
as extensions , disregarding false/true polymorphism.
perhaps i should refactor all senders of & and | to use bitAnd:/bitOr:
to avoid being a victim of this.

> Nicolas
>
> 2012/8/27 S Krish <[hidden email]>:
>> On loading up and testing NB:
>>
>> I get possibly a very basic hurdle... Obliged for a heads up..
>>
>> Can send the stack if its needed..
>>
>> SmallInteger(Object)>>doesNotUnderstand: #&
>> Receiver: 3
>> Arguments and temporary variables:
>> aMessage: & 3
>> exception: MessageNotUnderstood: SmallInteger>>&
>> resumeValue: nil
>> Receiver's instance variables:
>> 3
>>
>> AJx86Instruction>>emitMod:reg:rm:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> mod: 3
>> reg: 37
>> rm: 36
>> Receiver's instance variables:
>> name: #mov
>> operands: an Array(EBP ESP)
>> machineCode: a WriteStream
>> position: 1
>> next: <<error during printing>>
>>
>> On Fri, Aug 24, 2012 at 7:19 PM, Igor Stasenko <[hidden email]> wrote:
>>>
>>> > To load NativeBoost you can follow an instructions on project page:
>>> >
>>> http://code.google.com/p/nativeboost/wiki/Installation
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

LawsonEnglish
In reply to this post by Nicolas Cellier
I get this using Pharo 1.4. Thing is, it was working a few weeks ago and
now not.

I was hoping to do a video on how to add simple ultra-fast assembler
methods using NB but still can't because the target is moving way too
fast. My usual strategy is to show how to load a package in a brief
intro video, and then how to use it in the second part. During the time
I learned how to use NB at the assembler level, everything that I was
doing broke.

Kinda hard to make a video to show how to install and then use it those
circumstances.

L


On 8/27/12 12:01 AM, Nicolas Cellier wrote:

> Pharo 2.0 has implemented & -> bitAnd: and | -> bitOr:
>
> For who is dealing with bits, that's convenient, however it creates
> one more case of false polymorphism, these messages being used for
> Boolean already...
>
> Nicolas
>
> 2012/8/27 S Krish <[hidden email]>:
>> On loading up and testing NB:
>>
>> I get possibly a very basic hurdle... Obliged for a heads up..
>>
>> Can send the stack if its needed..
>>
>> SmallInteger(Object)>>doesNotUnderstand: #&
>> Receiver: 3
>> Arguments and temporary variables:
>> aMessage: & 3
>> exception: MessageNotUnderstood: SmallInteger>>&
>> resumeValue: nil
>> Receiver's instance variables:
>> 3
>>
>> AJx86Instruction>>emitMod:reg:rm:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> mod: 3
>> reg: 37
>> rm: 36
>> Receiver's instance variables:
>> name: #mov
>> operands: an Array(EBP ESP)
>> machineCode: a WriteStream
>> position: 1
>> next: <<error during printing>>
>>
>> On Fri, Aug 24, 2012 at 7:19 PM, Igor Stasenko <[hidden email]> wrote:
>>>> To load NativeBoost you can follow an instructions on project page:
>>>>
>>> http://code.google.com/p/nativeboost/wiki/Installation
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>


--
Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and compleate beginner).
https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Igor Stasenko
On 27 August 2012 23:58, Lawson English <[hidden email]> wrote:
> I get this using Pharo 1.4. Thing is, it was working a few weeks ago and now
> not.
>
> I was hoping to do a video on how to add simple ultra-fast assembler methods
> using NB but still can't because the target is moving way too fast. My usual
> strategy is to show how to load a package in a brief intro video, and then
> how to use it in the second part. During the time I learned how to use NB at
> the assembler level, everything that I was doing broke.
>

I need you to say what is broken. The extension methods which was lost
due to 1.4/2.0 disturbance
is not a big deal (i hope), i am added them back, so things should do
not break out of the box on 1.4.

And if you have more problems with it, please tell, because there was
not many changes at that level
and in overall most of changes are cosmetic and not functional (like
changing decorate:while: to decorate:during:). All of the code i wrote
works without changes, so if you have different problem just say,
Lawson. And please be more specific, because "everything" is not very
precise word for describing a problem :)

> Kinda hard to make a video to show how to install and then use it those
> circumstances.

I trying to keep the installation instructions up to date on project web site.

>
> L
>


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Stéphane Ducasse
In reply to this post by LawsonEnglish
If you do not provide a decent description of what could be the problem
how igor can help you? Because if you see each time jan for a precise question
he gets an answer or an enhancement.

Stef

On Aug 27, 2012, at 11:58 PM, Lawson English wrote:

> I get this using Pharo 1.4. Thing is, it was working a few weeks ago and now not.
>
> I was hoping to do a video on how to add simple ultra-fast assembler methods using NB but still can't because the target is moving way too fast. My usual strategy is to show how to load a package in a brief intro video, and then how to use it in the second part. During the time I learned how to use NB at the assembler level, everything that I was doing broke.
>
> Kinda hard to make a video to show how to install and then use it those circumstances.
>
> L
>
>
> On 8/27/12 12:01 AM, Nicolas Cellier wrote:
>> Pharo 2.0 has implemented & -> bitAnd: and | -> bitOr:
>>
>> For who is dealing with bits, that's convenient, however it creates
>> one more case of false polymorphism, these messages being used for
>> Boolean already...
>>
>> Nicolas
>>
>> 2012/8/27 S Krish <[hidden email]>:
>>> On loading up and testing NB:
>>>
>>> I get possibly a very basic hurdle... Obliged for a heads up..
>>>
>>> Can send the stack if its needed..
>>>
>>> SmallInteger(Object)>>doesNotUnderstand: #&
>>> Receiver: 3
>>> Arguments and temporary variables:
>>> aMessage: & 3
>>> exception: MessageNotUnderstood: SmallInteger>>&
>>> resumeValue: nil
>>> Receiver's instance variables:
>>> 3
>>>
>>> AJx86Instruction>>emitMod:reg:rm:
>>> Receiver: <<error during printing>>
>>> Arguments and temporary variables:
>>> mod: 3
>>> reg: 37
>>> rm: 36
>>> Receiver's instance variables:
>>> name: #mov
>>> operands: an Array(EBP ESP)
>>> machineCode: a WriteStream
>>> position: 1
>>> next: <<error during printing>>
>>>
>>> On Fri, Aug 24, 2012 at 7:19 PM, Igor Stasenko <[hidden email]> wrote:
>>>>> To load NativeBoost you can follow an instructions on project page:
>>>>>
>>>> http://code.google.com/p/nativeboost/wiki/Installation
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Igor Stasenko.
>>>>
>>
>
>
> --
> Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and compleate beginner).
> https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

S Krish
In reply to this post by Igor Stasenko
It works for most parts. There are few examples I will send in a note that is broken.

viz: AthensSurfaceExamples >> #exampleStrokeRect should probably in its subclass AthensCairoSurfaceExamples

* #exampleDrawText.. and believe other Text drawing expect FreeTypeFont only as asserted ... but are sent StrikeFont.. 

* AthensTestRenderTest >> #testWindowRender  fails as the PluggableTextMorph >> initialize has a an empty text #setText: '' call.. 

Need to go down lot more.. and play with it.. seems really neat for external module callout..

Great stuff, need to get down to bottom of it.. incentive enough to re-learn the necessary bits about assembly lang. Will look at integrating this permanently with my works till it fails to live up  as stable.. 


BTW: is it extensible to ARM..? I believe so.. also for Raspberry kind of kits.. 

Long way off to try that out.. but just interested in knowing..



On Tue, Aug 28, 2012 at 6:48 AM, Igor Stasenko <[hidden email]> wrote:
On 27 August 2012 23:58, Lawson English <[hidden email]> wrote:
> I get this using Pharo 1.4. Thing is, it was working a few weeks ago and now
> not.
>
> I was hoping to do a video on how to add simple ultra-fast assembler methods
> using NB but still can't because the target is moving way too fast. My usual
> strategy is to show how to load a package in a brief intro video, and then
> how to use it in the second part. During the time I learned how to use NB at
> the assembler level, everything that I was doing broke.
>

I need you to say what is broken. The extension methods which was lost
due to 1.4/2.0 disturbance
is not a big deal (i hope), i am added them back, so things should do
not break out of the box on 1.4.

And if you have more problems with it, please tell, because there was
not many changes at that level
and in overall most of changes are cosmetic and not functional (like
changing decorate:while: to decorate:during:). All of the code i wrote
works without changes, so if you have different problem just say,
Lawson. And please be more specific, because "everything" is not very
precise word for describing a problem :)

> Kinda hard to make a video to show how to install and then use it those
> circumstances.

I trying to keep the installation instructions up to date on project web site.

>
> L
>


--
Best regards,
Igor Stasenko.


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Igor Stasenko
On 28 August 2012 08:48, S Krish <[hidden email]> wrote:

> It works for most parts. There are few examples I will send in a note that
> is broken.
>
> viz: AthensSurfaceExamples >> #exampleStrokeRect should probably in its
> subclass AthensCairoSurfaceExamples
>
> * #exampleDrawText.. and believe other Text drawing expect FreeTypeFont only
> as asserted ... but are sent StrikeFont..
>
> * AthensTestRenderTest >> #testWindowRender  fails as the PluggableTextMorph
>>> initialize has a an empty text #setText: '' call..
>

this is what i do, when i get something working, i have a small
"doits" which then eventually turned into methods like above.
some of them became obsolete as project evolves.. and need to be
changed/cleaned up.
Certainly, i need to do a pass on it to keep things clean and free
from confusion.

> Need to go down lot more.. and play with it.. seems really neat for external
> module callout..
>
> Great stuff, need to get down to bottom of it.. incentive enough to re-learn
> the necessary bits about assembly lang. Will look at integrating this
> permanently with my works till it fails to live up  as stable..
>
Cannot parse. You want to integrate it till it fails? :)

>
> BTW: is it extensible to ARM..? I believe so.. also for Raspberry kind of
> kits..
>
> Long way off to try that out.. but just interested in knowing..
>
All of the code is in image, at our disposal.
So, it is doable, of course. The only question is who is willing to do
that and invest his/her time on it. :)



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

S Krish
>
Cannot parse. You want to integrate it till it fails? :) 


Yes.. keep it in from now on in the main base till it shows up as unusable. I do not mind occasional instability.. or something I can workaround... :).

Need to learn and deep dive to use it to exploit its potential ... which is huge.. at the minimum as a replacement to FFI.. I guess more efficiently.. 


****

Rest is all fine.. its a great piece of work.. will dive into ARM / et als when I do need them over the next year.. 

On Tue, Aug 28, 2012 at 2:12 PM, Igor Stasenko <[hidden email]> wrote:
On 28 August 2012 08:48, S Krish <[hidden email]> wrote:
> It works for most parts. There are few examples I will send in a note that
> is broken.
>
> viz: AthensSurfaceExamples >> #exampleStrokeRect should probably in its
> subclass AthensCairoSurfaceExamples
>
> * #exampleDrawText.. and believe other Text drawing expect FreeTypeFont only
> as asserted ... but are sent StrikeFont..
>
> * AthensTestRenderTest >> #testWindowRender  fails as the PluggableTextMorph
>>> initialize has a an empty text #setText: '' call..
>

this is what i do, when i get something working, i have a small
"doits" which then eventually turned into methods like above.
some of them became obsolete as project evolves.. and need to be
changed/cleaned up.
Certainly, i need to do a pass on it to keep things clean and free
from confusion.

> Need to go down lot more.. and play with it.. seems really neat for external
> module callout..
>
> Great stuff, need to get down to bottom of it.. incentive enough to re-learn
> the necessary bits about assembly lang. Will look at integrating this
> permanently with my works till it fails to live up  as stable..
>
Cannot parse. You want to integrate it till it fails? :)

>
> BTW: is it extensible to ARM..? I believe so.. also for Raspberry kind of
> kits..
>
> Long way off to try that out.. but just interested in knowing..
>
All of the code is in image, at our disposal.
So, it is doable, of course. The only question is who is willing to do
that and invest his/her time on it. :)



--
Best regards,
Igor Stasenko.


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Igor Stasenko
On 28 August 2012 16:31, S Krish <[hidden email]> wrote:
>>
> Cannot parse. You want to integrate it till it fails? :)
>
>
> Yes.. keep it in from now on in the main base till it shows up as unusable.
> I do not mind occasional instability.. or something I can workaround... :).
>

i think you meant 'i will use it till i find a better alternative'. That's fine.
I do not pretend to have best of the best, which will answer all of
your needs :)

> Need to learn and deep dive to use it to exploit its potential ... which is
> huge.. at the minimum as a replacement to FFI.. I guess more efficiently..
>
you don't need to guess. You can measure it. :)

>
> ****
>
> Rest is all fine.. its a great piece of work.. will dive into ARM / et als
> when I do need them over the next year..
>
>
> On Tue, Aug 28, 2012 at 2:12 PM, Igor Stasenko <[hidden email]> wrote:
>>
>> On 28 August 2012 08:48, S Krish <[hidden email]>
>> wrote:
>> > It works for most parts. There are few examples I will send in a note
>> > that
>> > is broken.
>> >
>> > viz: AthensSurfaceExamples >> #exampleStrokeRect should probably in its
>> > subclass AthensCairoSurfaceExamples
>> >
>> > * #exampleDrawText.. and believe other Text drawing expect FreeTypeFont
>> > only
>> > as asserted ... but are sent StrikeFont..
>> >
>> > * AthensTestRenderTest >> #testWindowRender  fails as the
>> > PluggableTextMorph
>> >>> initialize has a an empty text #setText: '' call..
>> >
>>
>> this is what i do, when i get something working, i have a small
>> "doits" which then eventually turned into methods like above.
>> some of them became obsolete as project evolves.. and need to be
>> changed/cleaned up.
>> Certainly, i need to do a pass on it to keep things clean and free
>> from confusion.
>>
>> > Need to go down lot more.. and play with it.. seems really neat for
>> > external
>> > module callout..
>> >
>> > Great stuff, need to get down to bottom of it.. incentive enough to
>> > re-learn
>> > the necessary bits about assembly lang. Will look at integrating this
>> > permanently with my works till it fails to live up  as stable..
>> >
>> Cannot parse. You want to integrate it till it fails? :)
>>
>> >
>> > BTW: is it extensible to ARM..? I believe so.. also for Raspberry kind
>> > of
>> > kits..
>> >
>> > Long way off to try that out.. but just interested in knowing..
>> >
>> All of the code is in image, at our disposal.
>> So, it is doable, of course. The only question is who is willing to do
>> that and invest his/her time on it. :)
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>



--
Best regards,
Igor Stasenko.

cbc
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

cbc
On Tue, Aug 28, 2012 at 2:20 PM, Igor Stasenko <[hidden email]> wrote:

> On 28 August 2012 16:31, S Krish <[hidden email]> wrote:
>>>
>> Cannot parse. You want to integrate it till it fails? :)
>>
>>
>> Yes.. keep it in from now on in the main base till it shows up as unusable.
>> I do not mind occasional instability.. or something I can workaround... :).
>>
>
> i think you meant 'i will use it till i find a better alternative'. That's fine.
> I do not pretend to have best of the best, which will answer all of
> your needs :)
>
Hmm.  I read S Krish as saying that he wants to use it until it proves
itself so broken, he can't use it.

I suspect as long as you are interested in it, he won't find that to
actually happen...

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] NativeBoost v 1.3

Igor Stasenko
On 28 August 2012 23:41, Chris Cunningham <[hidden email]> wrote:

> On Tue, Aug 28, 2012 at 2:20 PM, Igor Stasenko <[hidden email]> wrote:
>> On 28 August 2012 16:31, S Krish <[hidden email]> wrote:
>>>>
>>> Cannot parse. You want to integrate it till it fails? :)
>>>
>>>
>>> Yes.. keep it in from now on in the main base till it shows up as unusable.
>>> I do not mind occasional instability.. or something I can workaround... :).
>>>
>>
>> i think you meant 'i will use it till i find a better alternative'. That's fine.
>> I do not pretend to have best of the best, which will answer all of
>> your needs :)
>>
> Hmm.  I read S Krish as saying that he wants to use it until it proves
> itself so broken, he can't use it.
>
and how is that possible? That's why i asked for clarification.
Because it doesn't makes sense to me.
The project is open source. So, if there a people interested in
keeping it in a good shape, that simply cannot happen, even if i will
disappear.
And part of my today's work is actually to eliminate the 'bus factor'.

> I suspect as long as you are interested in it, he won't find that to
> actually happen...
>

and how is that possible as well?
Of course, there is a probability that one day i will wake up and say
"that is enough"
and lose interest not only in NativeBoost , but in programming as a whole.
But that probability is not too high, something like meeting a
dinosaur on the street. :)

--
Best regards,
Igor Stasenko.