Why FFI is not included with latest squeak ?

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

Re: Why FFI is not included with latest squeak ?

Chris Cunnington
On 12-08-19 6:26 PM, Igor Stasenko wrote:

> On 17 August 2012 22:21, Yanni Chiu <[hidden email]> wrote:
>> On 17/08/12 2:46 PM, Lawson English wrote:
>>>
>>> Which is a huge downside to the current implementation of NativeBoost,
>>> although, in theory, you could create a version that would compile to C
>>> via slang rather than using Igor's x86 assembler syntax.
>>
>> But it's called *Native*Boost. Are you suggesting non-native boost? Wouldn't
>> that be Cog/JIT?
>>
> Right. It is native. You can talk directly to metal. No layers on
> top.. you are the in total control.
> This is the main motivation behind a project.
> You can build abstractions on top of it, of course. And of course you
> can make it portable across
> as many platforms as you need.. It may be hard but it is doable.
> But conceptually one thing are not gonna change: you have direct
> access to machine code,
> which means no compiler standing in your way, which generating
> suboptimal code :)
> And for some cases it is simply impossible to implement things in C
> without heavy sacrifices in speed..
> consider arithmetic overflow - in CPU's you have a flag which indicates that..
> but in C there is no way how you can access it.. so you cannot just write:
>
> int a, b;
> if ( (result = a +b) > maxInt )
> {
>   .. switch to big integer arithmetic ..
> }
>
> and i guess you can find many other cases where direct machine code is
> more preferable than produced by compiler(s).
>
>
In the last few posts you just wrote as many words arguing for
NativeBoost as David did explaining how to get started writing a plugin.
Except when he was done a person could actually start to write a plugin.
If you and Lawson spent as much time providing examples for NativeBoost
as you do extolling its virtues, I could actually try it for myself.

Chris

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
On 20 August 2012 00:53, Chris Cunnington <[hidden email]> wrote:

> On 12-08-19 6:26 PM, Igor Stasenko wrote:
>>
>> On 17 August 2012 22:21, Yanni Chiu <[hidden email]> wrote:
>>>
>>> On 17/08/12 2:46 PM, Lawson English wrote:
>>>>
>>>>
>>>> Which is a huge downside to the current implementation of NativeBoost,
>>>> although, in theory, you could create a version that would compile to C
>>>> via slang rather than using Igor's x86 assembler syntax.
>>>
>>>
>>> But it's called *Native*Boost. Are you suggesting non-native boost?
>>> Wouldn't
>>> that be Cog/JIT?
>>>
>> Right. It is native. You can talk directly to metal. No layers on
>> top.. you are the in total control.
>> This is the main motivation behind a project.
>> You can build abstractions on top of it, of course. And of course you
>> can make it portable across
>> as many platforms as you need.. It may be hard but it is doable.
>> But conceptually one thing are not gonna change: you have direct
>> access to machine code,
>> which means no compiler standing in your way, which generating
>> suboptimal code :)
>> And for some cases it is simply impossible to implement things in C
>> without heavy sacrifices in speed..
>> consider arithmetic overflow - in CPU's you have a flag which indicates
>> that..
>> but in C there is no way how you can access it.. so you cannot just write:
>>
>> int a, b;
>> if ( (result = a +b) > maxInt )
>> {
>>   .. switch to big integer arithmetic ..
>> }
>>
>> and i guess you can find many other cases where direct machine code is
>> more preferable than produced by compiler(s).
>>
>>
> In the last few posts you just wrote as many words arguing for NativeBoost
> as David did explaining how to get started writing a plugin. Except when he
> was done a person could actually start to write a plugin. If you and Lawson
> spent as much time providing examples for NativeBoost as you do extolling
> its virtues, I could actually try it for myself.
>

Chris, its unfair. First, David only gave instructions how to set things up,
but not how to actually start writing a plugin.. if he would do that,
his post will be extended to dozens of pages :)

And second, if i remember, you were present at my presentation i
giving about NB,
so i really surprised to hear that from you.
But you right, i am not good at writing docs, because i am way too
lazy, and there's always more important things to do (well you know
;). But i am working on fixing that. :)

And for getting starting with NB you can just follow installation
instructions from here:
http://code.google.com/p/nativeboost/wiki/Installation

and if you need some examples of use, just recently i found this project:
http://www.squeaksource.com/ICU
which interesting in respect that it using two different FFI implementations,
so you can load both and browse code and compare the way how things done.
I am not sure in what state this project are, but since you don't need
to actually "run" things, you can just
browse the code to see how it done.

> Chris

--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Chris Cunnington
On 12-08-19 9:42 PM, Igor Stasenko wrote:

> On 20 August 2012 00:53, Chris Cunnington <[hidden email]> wrote:
>> On 12-08-19 6:26 PM, Igor Stasenko wrote:
>>> On 17 August 2012 22:21, Yanni Chiu <[hidden email]> wrote:
>>>> On 17/08/12 2:46 PM, Lawson English wrote:
>>>>>
>>>>> Which is a huge downside to the current implementation of NativeBoost,
>>>>> although, in theory, you could create a version that would compile to C
>>>>> via slang rather than using Igor's x86 assembler syntax.
>>>>
>>>> But it's called *Native*Boost. Are you suggesting non-native boost?
>>>> Wouldn't
>>>> that be Cog/JIT?
>>>>
>>> Right. It is native. You can talk directly to metal. No layers on
>>> top.. you are the in total control.
>>> This is the main motivation behind a project.
>>> You can build abstractions on top of it, of course. And of course you
>>> can make it portable across
>>> as many platforms as you need.. It may be hard but it is doable.
>>> But conceptually one thing are not gonna change: you have direct
>>> access to machine code,
>>> which means no compiler standing in your way, which generating
>>> suboptimal code :)
>>> And for some cases it is simply impossible to implement things in C
>>> without heavy sacrifices in speed..
>>> consider arithmetic overflow - in CPU's you have a flag which indicates
>>> that..
>>> but in C there is no way how you can access it.. so you cannot just write:
>>>
>>> int a, b;
>>> if ( (result = a +b) > maxInt )
>>> {
>>>    .. switch to big integer arithmetic ..
>>> }
>>>
>>> and i guess you can find many other cases where direct machine code is
>>> more preferable than produced by compiler(s).
>>>
>>>
>> In the last few posts you just wrote as many words arguing for NativeBoost
>> as David did explaining how to get started writing a plugin. Except when he
>> was done a person could actually start to write a plugin. If you and Lawson
>> spent as much time providing examples for NativeBoost as you do extolling
>> its virtues, I could actually try it for myself.
>>
> Chris, its unfair.
Thank you. Thank you very much. :)
> First, David only gave instructions how to set things up,
> but not how to actually start writing a plugin.. if he would do that,
> his post will be extended to dozens of pages :)
Yea, but it's a start. I mean he's got to start talking about
subclassing from InterpreterPlugin? He covers a lot of ground for a
beginning.
> And second, if i remember, you were present at my presentation i
> giving about NB,
> so i really surprised to hear that from you.
Hmmmm... this one http://osrcon.ca/AboutFFI.pdf ?

Yea, OK, you have a point. But in my defense DeepIntoSmalltalk was ...
let's just say there was a lot of material.
> But you right, i am not good at writing docs, because i am way too
> lazy, and there's always more important things to do (well you know
> ;). But i am working on fixing that. :)
I seem to recall Lawson makes movies.
>
> And for getting starting with NB you can just follow installation
> instructions from here:
> http://code.google.com/p/nativeboost/wiki/Installation
>
> and if you need some examples of use, just recently i found this project:
> http://www.squeaksource.com/ICU
That looks interesting.
> which interesting in respect that it using two different FFI implementations,
> so you can load both and browse code and compare the way how things done.
> I am not sure in what state this project are, but since you don't need
> to actually "run" things, you can just
> browse the code to see how it done.
>
But "I would like to know more" about NativeBoost. (As long as I don't
have to work too hard to know it. :p)

http://www.youtube.com/watch?feature=endscreen&v=l_5UZfwX0ss&NR=1

(That's an inside joke to people who were at DeepIntoSmalltalk. Igor's
slides showed him to be a big fan of Starship Troopers and Firefly.)
>> Chris


Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

kilon
WOW I only left for a day and the mailing list just exploded. 

First I thank you all for your help and yes I am a big fan of Starship Troopers too, its sad that this greaty movie never got the sequel it deserved and still is so misunderstood.. The truth is that Native boost is very tempting for that precise reason, it allows you to stay in smalltalk and do your magic and never leave the comforts of the smalltalk debugger but is also tool that overall documentation is not much. Still I guess I can alway ask Igor and he can answer back and even contribute myself in documenting things. Whats funny is that if you ask here at mailing list you get a lot of useful answer but those answers dont make it back to documentaion. People are bored making documentation but cant resist answering in malling list with often extremely detailed helpful info as Davind's pst which I think should be included with Squeaks onboard documentation. 

Saying that taking into considerina how non popular Squeak and Pharo are , documentation is not that bad actually. 

On my project goals Ephestos, is to take advantage of pure object orientated approach of smalltalk nature to provide a framework of attaching flexible documentation to smalltalk objects so the user can ask a method or class or any object  "help" (ie UIManager help  . UIManager default ChooseDirectory help. etc)

Anyway after Igor's explanation I am certainly more inclined to use Nativeboost but will certainly would like to test Vm plugin creation. I certainly hope Nativeboost gets included with both Squeak and Pharo. If its really stable and reliable as Igor is claiming then I most certainly would like to help documenting it in time when I get more experience with it.   

I did find great introduction to Nativeboost this presentation -> http://www.youtube.com/watch?v=Bd6mz6F167s which is what introduced me to nativeboost. 


Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
There is a more recent video, a presentation which i gave at ESUG:
http://www.youtube.com/watch?feature=endscreen&NR=1&v=a3paB9-iaCY

and for examples, i forgot to mention Athens..
http://www.squeaksource.com/Athens
which is a vector graphics engine we developing.
You load
ConfigurationOfAthens which is metacello configuration
and then just invoke
ConfigurationOfAthens loadVersion: '1.2'
which is latest available today.
It will automatically load nativeboost (so, you don't have to install
it by yourself)
and you can browse the code in Athens-Cairo package to see how i using
NB to bind with Cairo graphics library.. for example look at
AthensCairoCanvas class, like:

rectangleX: x y: y width: aWidth height: aHeight
        <primitive: #primitiveNativeCall module: #NativeBoostPlugin>
       
        ^ self nbCall: #(void cairo_rectangle (self,
                 double x, double y,
                 double aWidth, double aHeight) )


On 20 August 2012 11:12, dimitris chloupis <[hidden email]> wrote:

> WOW I only left for a day and the mailing list just exploded.
>
> First I thank you all for your help and yes I am a big fan of Starship
> Troopers too, its sad that this greaty movie never got the sequel it
> deserved and still is so misunderstood.. The truth is that Native boost is
> very tempting for that precise reason, it allows you to stay in smalltalk
> and do your magic and never leave the comforts of the smalltalk debugger but
> is also tool that overall documentation is not much. Still I guess I can
> alway ask Igor and he can answer back and even contribute myself in
> documenting things. Whats funny is that if you ask here at mailing list you
> get a lot of useful answer but those answers dont make it back to
> documentaion. People are bored making documentation but cant resist
> answering in malling list with often extremely detailed helpful info as
> Davind's pst which I think should be included with Squeaks onboard
> documentation.
>
> Saying that taking into considerina how non popular Squeak and Pharo are ,
> documentation is not that bad actually.
>
> On my project goals Ephestos, is to take advantage of pure object orientated
> approach of smalltalk nature to provide a framework of attaching flexible
> documentation to smalltalk objects so the user can ask a method or class or
> any object  "help" (ie UIManager help  . UIManager default ChooseDirectory
> help. etc)
>
> Anyway after Igor's explanation I am certainly more inclined to use
> Nativeboost but will certainly would like to test Vm plugin creation. I
> certainly hope Nativeboost gets included with both Squeak and Pharo. If its
> really stable and reliable as Igor is claiming then I most certainly would
> like to help documenting it in time when I get more experience with it.
>
> I did find great introduction to Nativeboost this presentation ->
> http://www.youtube.com/watch?v=Bd6mz6F167s which is what introduced me to
> nativeboost.
>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

kilon
Thank you . I have dowloaded Athens and NB and NBOpengl and will study all of them. I also downloaded the video and I am watching it. If I have any questions I will come back with them. 


From: Igor Stasenko [via Smalltalk] <[hidden email]>
To: kilon <[hidden email]>
Sent: Monday, 20 August 2012, 14:04
Subject: Re: Why FFI is not included with latest squeak ?

There is a more recent video, a presentation which i gave at ESUG:
http://www.youtube.com/watch?feature=endscreen&NR=1&v=a3paB9-iaCY

and for examples, i forgot to mention Athens..
http://www.squeaksource.com/Athens
which is a vector graphics engine we developing.
You load
ConfigurationOfAthens which is metacello configuration
and then just invoke
ConfigurationOfAthens loadVersion: '1.2'
which is latest available today.
It will automatically load nativeboost (so, you don't have to install
it by yourself)
and you can browse the code in Athens-Cairo package to see how i using
NB to bind with Cairo graphics library.. for example look at
AthensCairoCanvas class, like:

rectangleX: x y: y width: aWidth height: aHeight
        <primitive: #primitiveNativeCall module: #NativeBoostPlugin>
       
        ^ self nbCall: #(void cairo_rectangle (self,
                 double x, double y,
                 double aWidth, double aHeight) )


On 20 August 2012 11:12, dimitris chloupis <[hidden email]> wrote:

> WOW I only left for a day and the mailing list just exploded.
>
> First I thank you all for your help and yes I am a big fan of Starship
> Troopers too, its sad that this greaty movie never got the sequel it
> deserved and still is so misunderstood.. The truth is that Native boost is
> very tempting for that precise reason, it allows you to stay in smalltalk
> and do your magic and never leave the comforts of the smalltalk debugger but
> is also tool that overall documentation is not much. Still I guess I can
> alway ask Igor and he can answer back and even contribute myself in
> documenting things. Whats funny is that if you ask here at mailing list you
> get a lot of useful answer but those answers dont make it back to
> documentaion. People are bored making documentation but cant resist
> answering in malling list with often extremely detailed helpful info as
> Davind's pst which I think should be included with Squeaks onboard
> documentation.
>
> Saying that taking into considerina how non popular Squeak and Pharo are ,
> documentation is not that bad actually.
>
> On my project goals Ephestos, is to take advantage of pure object orientated
> approach of smalltalk nature to provide a framework of attaching flexible
> documentation to smalltalk objects so the user can ask a method or class or
> any object  "help" (ie UIManager help  . UIManager default ChooseDirectory
> help. etc)
>
> Anyway after Igor's explanation I am certainly more inclined to use
> Nativeboost but will certainly would like to test Vm plugin creation. I
> certainly hope Nativeboost gets included with both Squeak and Pharo. If its
> really stable and reliable as Igor is claiming then I most certainly would
> like to help documenting it in time when I get more experience with it.
>
> I did find great introduction to Nativeboost this presentation ->
> http://www.youtube.com/watch?v=Bd6mz6F167s which is what introduced me to
> nativeboost.
>
>
>


--
Best regards,
Igor Stasenko.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644627.html
To unsubscribe from Why FFI is not included with latest squeak ?, click here.
NAML




Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
In reply to this post by Chris Cunnington
On 20 August 2012 04:10, Chris Cunnington <[hidden email]> wrote:

> On 12-08-19 9:42 PM, Igor Stasenko wrote:
>>
>> On 20 August 2012 00:53, Chris Cunnington <[hidden email]>
>> wrote:
>>>
>>> On 12-08-19 6:26 PM, Igor Stasenko wrote:
>>>>
>>>> On 17 August 2012 22:21, Yanni Chiu <[hidden email]> wrote:
>>>>>
>>>>> On 17/08/12 2:46 PM, Lawson English wrote:
>>>>>>
>>>>>>
>>>>>> Which is a huge downside to the current implementation of NativeBoost,
>>>>>> although, in theory, you could create a version that would compile to
>>>>>> C
>>>>>> via slang rather than using Igor's x86 assembler syntax.
>>>>>
>>>>>
>>>>> But it's called *Native*Boost. Are you suggesting non-native boost?
>>>>> Wouldn't
>>>>> that be Cog/JIT?
>>>>>
>>>> Right. It is native. You can talk directly to metal. No layers on
>>>> top.. you are the in total control.
>>>> This is the main motivation behind a project.
>>>> You can build abstractions on top of it, of course. And of course you
>>>> can make it portable across
>>>> as many platforms as you need.. It may be hard but it is doable.
>>>> But conceptually one thing are not gonna change: you have direct
>>>> access to machine code,
>>>> which means no compiler standing in your way, which generating
>>>> suboptimal code :)
>>>> And for some cases it is simply impossible to implement things in C
>>>> without heavy sacrifices in speed..
>>>> consider arithmetic overflow - in CPU's you have a flag which indicates
>>>> that..
>>>> but in C there is no way how you can access it.. so you cannot just
>>>> write:
>>>>
>>>> int a, b;
>>>> if ( (result = a +b) > maxInt )
>>>> {
>>>>    .. switch to big integer arithmetic ..
>>>> }
>>>>
>>>> and i guess you can find many other cases where direct machine code is
>>>> more preferable than produced by compiler(s).
>>>>
>>>>
>>> In the last few posts you just wrote as many words arguing for
>>> NativeBoost
>>> as David did explaining how to get started writing a plugin. Except when
>>> he
>>> was done a person could actually start to write a plugin. If you and
>>> Lawson
>>> spent as much time providing examples for NativeBoost as you do extolling
>>> its virtues, I could actually try it for myself.
>>>
>> Chris, its unfair.
>
> Thank you. Thank you very much. :)
>
>> First, David only gave instructions how to set things up,
>> but not how to actually start writing a plugin.. if he would do that,
>> his post will be extended to dozens of pages :)
>
> Yea, but it's a start. I mean he's got to start talking about subclassing
> from InterpreterPlugin? He covers a lot of ground for a beginning.
>
>> And second, if i remember, you were present at my presentation i
>> giving about NB,
>> so i really surprised to hear that from you.
>
> Hmmmm... this one http://osrcon.ca/AboutFFI.pdf ?
>
> Yea, OK, you have a point. But in my defense DeepIntoSmalltalk was ... let's
> just say there was a lot of material.
>
>> But you right, i am not good at writing docs, because i am way too
>> lazy, and there's always more important things to do (well you know
>> ;). But i am working on fixing that. :)
>
> I seem to recall Lawson makes movies.
>
>>
>> And for getting starting with NB you can just follow installation
>> instructions from here:
>> http://code.google.com/p/nativeboost/wiki/Installation
>>
>> and if you need some examples of use, just recently i found this project:
>> http://www.squeaksource.com/ICU
>
> That looks interesting.
>
>> which interesting in respect that it using two different FFI
>> implementations,
>> so you can load both and browse code and compare the way how things done.
>> I am not sure in what state this project are, but since you don't need
>> to actually "run" things, you can just
>> browse the code to see how it done.
>>
> But "I would like to know more" about NativeBoost. (As long as I don't have
> to work too hard to know it. :p)

Just today i spent couple of hours to make the NB-Help package work
out of the box.
You can find the NativeBoost-Help package in NativeBoost repository..
i wrote some stuff there but it is not that much..(and some stuff is
already outdated.. things moving fast) however i will keep pumping
into it. :)

All you need to do is to load this package , and then open the system
help browser (from world menu) and look for
NativeBoost bookmark.

>
> http://www.youtube.com/watch?feature=endscreen&v=l_5UZfwX0ss&NR=1
>
> (That's an inside joke to people who were at DeepIntoSmalltalk. Igor's
> slides showed him to be a big fan of Starship Troopers and Firefly.)
>>>
>>> Chris
>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Chris Cunnington
On 12-08-20 1:52 PM, Igor Stasenko wrote:

> On 20 August 2012 04:10, Chris Cunnington <[hidden email]> wrote:
>> On 12-08-19 9:42 PM, Igor Stasenko wrote:
>>> On 20 August 2012 00:53, Chris Cunnington <[hidden email]>
>>> wrote:
>>>> On 12-08-19 6:26 PM, Igor Stasenko wrote:
>>>>> On 17 August 2012 22:21, Yanni Chiu <[hidden email]> wrote:
>>>>>> On 17/08/12 2:46 PM, Lawson English wrote:
>>>>>>>
>>>>>>> Which is a huge downside to the current implementation of NativeBoost,
>>>>>>> although, in theory, you could create a version that would compile to
>>>>>>> C
>>>>>>> via slang rather than using Igor's x86 assembler syntax.
>>>>>>
>>>>>> But it's called *Native*Boost. Are you suggesting non-native boost?
>>>>>> Wouldn't
>>>>>> that be Cog/JIT?
>>>>>>
>>>>> Right. It is native. You can talk directly to metal. No layers on
>>>>> top.. you are the in total control.
>>>>> This is the main motivation behind a project.
>>>>> You can build abstractions on top of it, of course. And of course you
>>>>> can make it portable across
>>>>> as many platforms as you need.. It may be hard but it is doable.
>>>>> But conceptually one thing are not gonna change: you have direct
>>>>> access to machine code,
>>>>> which means no compiler standing in your way, which generating
>>>>> suboptimal code :)
>>>>> And for some cases it is simply impossible to implement things in C
>>>>> without heavy sacrifices in speed..
>>>>> consider arithmetic overflow - in CPU's you have a flag which indicates
>>>>> that..
>>>>> but in C there is no way how you can access it.. so you cannot just
>>>>> write:
>>>>>
>>>>> int a, b;
>>>>> if ( (result = a +b) > maxInt )
>>>>> {
>>>>>     .. switch to big integer arithmetic ..
>>>>> }
>>>>>
>>>>> and i guess you can find many other cases where direct machine code is
>>>>> more preferable than produced by compiler(s).
>>>>>
>>>>>
>>>> In the last few posts you just wrote as many words arguing for
>>>> NativeBoost
>>>> as David did explaining how to get started writing a plugin. Except when
>>>> he
>>>> was done a person could actually start to write a plugin. If you and
>>>> Lawson
>>>> spent as much time providing examples for NativeBoost as you do extolling
>>>> its virtues, I could actually try it for myself.
>>>>
>>> Chris, its unfair.
>> Thank you. Thank you very much. :)
>>
>>> First, David only gave instructions how to set things up,
>>> but not how to actually start writing a plugin.. if he would do that,
>>> his post will be extended to dozens of pages :)
>> Yea, but it's a start. I mean he's got to start talking about subclassing
>> from InterpreterPlugin? He covers a lot of ground for a beginning.
>>
>>> And second, if i remember, you were present at my presentation i
>>> giving about NB,
>>> so i really surprised to hear that from you.
>> Hmmmm... this one http://osrcon.ca/AboutFFI.pdf ?
>>
>> Yea, OK, you have a point. But in my defense DeepIntoSmalltalk was ... let's
>> just say there was a lot of material.
>>
>>> But you right, i am not good at writing docs, because i am way too
>>> lazy, and there's always more important things to do (well you know
>>> ;). But i am working on fixing that. :)
>> I seem to recall Lawson makes movies.
>>
>>> And for getting starting with NB you can just follow installation
>>> instructions from here:
>>> http://code.google.com/p/nativeboost/wiki/Installation
>>>
>>> and if you need some examples of use, just recently i found this project:
>>> http://www.squeaksource.com/ICU
>> That looks interesting.
>>
>>> which interesting in respect that it using two different FFI
>>> implementations,
>>> so you can load both and browse code and compare the way how things done.
>>> I am not sure in what state this project are, but since you don't need
>>> to actually "run" things, you can just
>>> browse the code to see how it done.
>>>
>> But "I would like to know more" about NativeBoost. (As long as I don't have
>> to work too hard to know it. :p)
> Just today i spent couple of hours to make the NB-Help package work
> out of the box.
> You can find the NativeBoost-Help package in NativeBoost repository..
> i wrote some stuff there but it is not that much..(and some stuff is
> already outdated.. things moving fast) however i will keep pumping
> into it. :)
>
> All you need to do is to load this package , and then open the system
> help browser (from world menu) and look for
> NativeBoost bookmark.
Thanks. This stuff looks great. I'll watch for updates to the Help
package. The Help Browser is a nice way to learn things, as it's bite
sized, right there in the image, etc. I've got a NativeBoost.app on my
desktop now and will poke around with it. I do see there is some stuff
at the http://code.gogoel.com/p/nativeboost location. The Help Browser
is a more fun place for it to be, I think.

Chris

http://www.youtube.com/watch?v=aFj8eFZx-TA&feature=related

>
>> http://www.youtube.com/watch?feature=endscreen&v=l_5UZfwX0ss&NR=1
>>
>> (That's an inside joke to people who were at DeepIntoSmalltalk. Igor's
>> slides showed him to be a big fan of Starship Troopers and Firefly.)
>>>> Chris
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
On 20 August 2012 20:42, Chris Cunnington <[hidden email]> wrote:

> On 12-08-20 1:52 PM, Igor Stasenko wrote:
>>
>> On 20 August 2012 04:10, Chris Cunnington <[hidden email]>
>> wrote:
>>>
>>> On 12-08-19 9:42 PM, Igor Stasenko wrote:
>>>>
>>>> On 20 August 2012 00:53, Chris Cunnington
>>>> <[hidden email]>
>>>> wrote:
>>>>>
>>>>> On 12-08-19 6:26 PM, Igor Stasenko wrote:
>>>>>>
>>>>>> On 17 August 2012 22:21, Yanni Chiu <[hidden email]> wrote:
>>>>>>>
>>>>>>> On 17/08/12 2:46 PM, Lawson English wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Which is a huge downside to the current implementation of
>>>>>>>> NativeBoost,
>>>>>>>> although, in theory, you could create a version that would compile
>>>>>>>> to
>>>>>>>> C
>>>>>>>> via slang rather than using Igor's x86 assembler syntax.
>>>>>>>
>>>>>>>
>>>>>>> But it's called *Native*Boost. Are you suggesting non-native boost?
>>>>>>> Wouldn't
>>>>>>> that be Cog/JIT?
>>>>>>>
>>>>>> Right. It is native. You can talk directly to metal. No layers on
>>>>>> top.. you are the in total control.
>>>>>> This is the main motivation behind a project.
>>>>>> You can build abstractions on top of it, of course. And of course you
>>>>>> can make it portable across
>>>>>> as many platforms as you need.. It may be hard but it is doable.
>>>>>> But conceptually one thing are not gonna change: you have direct
>>>>>> access to machine code,
>>>>>> which means no compiler standing in your way, which generating
>>>>>> suboptimal code :)
>>>>>> And for some cases it is simply impossible to implement things in C
>>>>>> without heavy sacrifices in speed..
>>>>>> consider arithmetic overflow - in CPU's you have a flag which
>>>>>> indicates
>>>>>> that..
>>>>>> but in C there is no way how you can access it.. so you cannot just
>>>>>> write:
>>>>>>
>>>>>> int a, b;
>>>>>> if ( (result = a +b) > maxInt )
>>>>>> {
>>>>>>     .. switch to big integer arithmetic ..
>>>>>> }
>>>>>>
>>>>>> and i guess you can find many other cases where direct machine code is
>>>>>> more preferable than produced by compiler(s).
>>>>>>
>>>>>>
>>>>> In the last few posts you just wrote as many words arguing for
>>>>> NativeBoost
>>>>> as David did explaining how to get started writing a plugin. Except
>>>>> when
>>>>> he
>>>>> was done a person could actually start to write a plugin. If you and
>>>>> Lawson
>>>>> spent as much time providing examples for NativeBoost as you do
>>>>> extolling
>>>>> its virtues, I could actually try it for myself.
>>>>>
>>>> Chris, its unfair.
>>>
>>> Thank you. Thank you very much. :)
>>>
>>>> First, David only gave instructions how to set things up,
>>>> but not how to actually start writing a plugin.. if he would do that,
>>>> his post will be extended to dozens of pages :)
>>>
>>> Yea, but it's a start. I mean he's got to start talking about subclassing
>>> from InterpreterPlugin? He covers a lot of ground for a beginning.
>>>
>>>> And second, if i remember, you were present at my presentation i
>>>> giving about NB,
>>>> so i really surprised to hear that from you.
>>>
>>> Hmmmm... this one http://osrcon.ca/AboutFFI.pdf ?
>>>
>>> Yea, OK, you have a point. But in my defense DeepIntoSmalltalk was ...
>>> let's
>>> just say there was a lot of material.
>>>
>>>> But you right, i am not good at writing docs, because i am way too
>>>> lazy, and there's always more important things to do (well you know
>>>> ;). But i am working on fixing that. :)
>>>
>>> I seem to recall Lawson makes movies.
>>>
>>>> And for getting starting with NB you can just follow installation
>>>> instructions from here:
>>>> http://code.google.com/p/nativeboost/wiki/Installation
>>>>
>>>> and if you need some examples of use, just recently i found this
>>>> project:
>>>> http://www.squeaksource.com/ICU
>>>
>>> That looks interesting.
>>>
>>>> which interesting in respect that it using two different FFI
>>>> implementations,
>>>> so you can load both and browse code and compare the way how things
>>>> done.
>>>> I am not sure in what state this project are, but since you don't need
>>>> to actually "run" things, you can just
>>>> browse the code to see how it done.
>>>>
>>> But "I would like to know more" about NativeBoost. (As long as I don't
>>> have
>>> to work too hard to know it. :p)
>>
>> Just today i spent couple of hours to make the NB-Help package work
>> out of the box.
>> You can find the NativeBoost-Help package in NativeBoost repository..
>> i wrote some stuff there but it is not that much..(and some stuff is
>> already outdated.. things moving fast) however i will keep pumping
>> into it. :)
>>
>> All you need to do is to load this package , and then open the system
>> help browser (from world menu) and look for
>> NativeBoost bookmark.
>
> Thanks. This stuff looks great. I'll watch for updates to the Help package.
> The Help Browser is a nice way to learn things, as it's bite sized, right
> there in the image, etc. I've got a NativeBoost.app on my desktop now and
> will poke around with it. I do see there is some stuff at the
> http://code.gogoel.com/p/nativeboost location. The Help Browser is a more
> fun place for it to be, I think.
>
Yeah, we spent some effort to make markdown syntax & styler working, so now
NB Help if one of those who using that..
i like the links to classes/methods, which ia clickable, so it is not
a dry text but actually
can point to real places in code which people can see 1 click away :)


> Chris
>
> http://www.youtube.com/watch?v=aFj8eFZx-TA&feature=related
>
>>
>>> http://www.youtube.com/watch?feature=endscreen&v=l_5UZfwX0ss&NR=1
>>>
>>> (That's an inside joke to people who were at DeepIntoSmalltalk. Igor's
>>> slides showed him to be a big fan of Starship Troopers and Firefly.)
>>>>>
>>>>> Chris
>>>
>>>
>>>
>>
>>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

kilon
Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4 image and it complains that it cannot find PPMarkDown . Any idea where i can find such class ?  It makes a call to it in NBHelperStyler  >> markdownText: string
Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

kilon


Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4 image and it complains that it cannot find PPMarkDown . Any idea where i can find such class ?  It makes a call to it in NBHelperStyler  >> markdownText: string




Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
In reply to this post by kilon
On 21 August 2012 10:15, kilon <[hidden email]> wrote:
> Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4 image
> and it complains that it cannot find PPMarkDown . Any idea where i can find
> such class ?  It makes a call to it in NBHelperStyler  >> markdownText:
> string
>
Hmm, what version are you loaded?
If you load version .2 it should load missing dependencies automatically.

> ________________________________
> View this message in context: Re: Why FFI is not included with latest squeak
> ?
>
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

kilon
I think its the latest but I am not sure, how I find the version ?


From: Igor Stasenko [via Smalltalk] <[hidden email]>
To: kilon <[hidden email]>
Sent: Tuesday, 21 August 2012, 15:44
Subject: Re: Why FFI is not included with latest squeak ?

On 21 August 2012 10:15, kilon <[hidden email]> wrote:
> Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4 image
> and it complains that it cannot find PPMarkDown . Any idea where i can find
> such class ?  It makes a call to it in NBHelperStyler  >> markdownText:
> string
>
Hmm, what version are you loaded?
If you load version .2 it should load missing dependencies automatically.

> ________________________________
> View this message in context: Re: Why FFI is not included with latest squeak
> ?
>
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>



--
Best regards,
Igor Stasenko.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644809.html
To unsubscribe from Why FFI is not included with latest squeak ?, click here.
NAML




Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
On 21 August 2012 22:12, dimitris chloupis <[hidden email]> wrote:
> I think its the latest but I am not sure, how I find the version ?
>
i just uploaded version .4 try it.

> ________________________________
> From: Igor Stasenko [via Smalltalk]
> <[hidden email]>
> To: kilon <[hidden email]>
> Sent: Tuesday, 21 August 2012, 15:44
> Subject: Re: Why FFI is not included with latest squeak ?
>
> On 21 August 2012 10:15, kilon <[hidden email]> wrote:
>> Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4 image
>> and it complains that it cannot find PPMarkDown . Any idea where i can
>> find
>> such class ?  It makes a call to it in NBHelperStyler  >> markdownText:
>> string
>>
> Hmm, what version are you loaded?
> If you load version .2 it should load missing dependencies automatically.
>
>> ________________________________
>> View this message in context: Re: Why FFI is not included with latest
>> squeak
>> ?
>>
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644809.html
> To unsubscribe from Why FFI is not included with latest squeak ?, click
> here.
> NAML
>
>
>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
On 21 August 2012 22:24, Igor Stasenko <[hidden email]> wrote:
> On 21 August 2012 22:12, dimitris chloupis <[hidden email]> wrote:
>> I think its the latest but I am not sure, how I find the version ?
>>
in monticello browser , if you open a repository you can see a list of packages
and their versions:

NativeBoost-Help-IgorStasenko.4
is latest as of today.

> i just uploaded version .4 try it.
>
>> ________________________________
>> From: Igor Stasenko [via Smalltalk]
>> <[hidden email]>
>> To: kilon <[hidden email]>
>> Sent: Tuesday, 21 August 2012, 15:44
>> Subject: Re: Why FFI is not included with latest squeak ?
>>
>> On 21 August 2012 10:15, kilon <[hidden email]> wrote:
>>> Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4 image
>>> and it complains that it cannot find PPMarkDown . Any idea where i can
>>> find
>>> such class ?  It makes a call to it in NBHelperStyler  >> markdownText:
>>> string
>>>
>> Hmm, what version are you loaded?
>> If you load version .2 it should load missing dependencies automatically.
>>
>>> ________________________________
>>> View this message in context: Re: Why FFI is not included with latest
>>> squeak
>>> ?
>>>
>>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644809.html
>> To unsubscribe from Why FFI is not included with latest squeak ?, click
>> here.
>> NAML
>>
>>
>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

kilon
Ah thank you , I had version 1 and now version 4 is installed together with all dependencies. Any idea how I use NB-help ?


From: Igor Stasenko [via Smalltalk] <[hidden email]>
To: kilon <[hidden email]>
Sent: Tuesday, 21 August 2012, 23:54
Subject: Re: Why FFI is not included with latest squeak ?

On 21 August 2012 22:24, Igor Stasenko <[hidden email]> wrote:
> On 21 August 2012 22:12, dimitris chloupis <[hidden email]> wrote:
>> I think its the latest but I am not sure, how I find the version ?
>>
in monticello browser , if you open a repository you can see a list of packages
and their versions:

NativeBoost-Help-IgorStasenko.4
is latest as of today.

> i just uploaded version .4 try it.
>
>> ________________________________
>> From: Igor Stasenko [via Smalltalk]
>> <[hidden email]>
>> To: kilon <[hidden email]>
>> Sent: Tuesday, 21 August 2012, 15:44
>> Subject: Re: Why FFI is not included with latest squeak ?
>>
>> On 21 August 2012 10:15, kilon <[hidden email]> wrote:
>>> Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4 image
>>> and it complains that it cannot find PPMarkDown . Any idea where i can
>>> find
>>> such class ?  It makes a call to it in NBHelperStyler  >> markdownText:
>>> string
>>>
>> Hmm, what version are you loaded?
>> If you load version .2 it should load missing dependencies automatically.
>>
>>> ________________________________
>>> View this message in context: Re: Why FFI is not included with latest
>>> squeak
>>> ?
>>>
>>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644809.html
>> To unsubscribe from Why FFI is not included with latest squeak ?, click
>> here.
>> NAML
>>
>>
>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.


--
Best regards,
Igor Stasenko.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644882.html
To unsubscribe from Why FFI is not included with latest squeak ?, click here.
NAML




Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Igor Stasenko
On 21 August 2012 23:20, dimitris chloupis <[hidden email]> wrote:
> Ah thank you , I had version 1 and now version 4 is installed together with
> all dependencies. Any idea how I use NB-help ?
>

i don't know how you can do it in squeak image, in pharo image just
open help browser
from world menu and then look for 'NativeBoost' bookmark there.

> ________________________________
> From: Igor Stasenko [via Smalltalk]
> <[hidden email]>
>
> To: kilon <[hidden email]>
> Sent: Tuesday, 21 August 2012, 23:54
> Subject: Re: Why FFI is not included with latest squeak ?
>
> On 21 August 2012 22:24, Igor Stasenko <[hidden email]> wrote:
>> On 21 August 2012 22:12, dimitris chloupis <[hidden email]> wrote:
>>> I think its the latest but I am not sure, how I find the version ?
>>>
> in monticello browser , if you open a repository you can see a list of
> packages
> and their versions:
>
> NativeBoost-Help-IgorStasenko.4
> is latest as of today.
>
>> i just uploaded version .4 try it.
>>
>>> ________________________________
>>> From: Igor Stasenko [via Smalltalk]
>>> <[hidden email]>
>>> To: kilon <[hidden email]>
>>> Sent: Tuesday, 21 August 2012, 15:44
>>> Subject: Re: Why FFI is not included with latest squeak ?
>>>
>>> On 21 August 2012 10:15, kilon <[hidden email]> wrote:
>>>> Igor hi, I downloaded and installed Nativeboost-help to my pharo 1.4
>>>> image
>>>> and it complains that it cannot find PPMarkDown . Any idea where i can
>>>> find
>>>> such class ?  It makes a call to it in NBHelperStyler  >> markdownText:
>>>> string
>>>>
>>> Hmm, what version are you loaded?
>>> If you load version .2 it should load missing dependencies automatically.
>>>
>>>> ________________________________
>>>> View this message in context: Re: Why FFI is not included with latest
>>>> squeak
>>>> ?
>>>>
>>>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>>>
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>> http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644809.html
>>> To unsubscribe from Why FFI is not included with latest squeak ?, click
>>> here.
>>> NAML
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>
>
>
> --
> Best regards,
> Igor Stasenko.
>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Why-FFI-is-not-included-with-latest-squeak-tp4644264p4644882.html
> To unsubscribe from Why FFI is not included with latest squeak ?, click
> here.
> NAML
>
>
>
>
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

kilon
Thank you Igor, I can see the help now, looks very nice indeed. By the way I am using a pharo 1.4 image and the CogVM with native boost plugin. I keep also a squeak image around so I can move anything I need to my pharo image. 


Reply | Threaded
Open this post in threaded view
|

Re: Why FFI is not included with latest squeak ?

Hannes Hirzel
In reply to this post by Igor Stasenko
The markdown parser is not loaded for some reason I do not know.  So
the class NBHelpStyler does not work.

A workaround is to replace the method

NBHelpStyler>>styleText:

styleText: aString

        ^ self new markdownText: aString



WITH

styleText: aString

        ^ aString



Then you can open a workspace and evaluate

NBHelp open

This allows you to read the help text as plain text.

HTH
--Hannes

On 8/21/12, Igor Stasenko <[hidden email]> wrote:

> On 21 August 2012 23:20, dimitris chloupis <[hidden email]> wrote:
>> Ah thank you , I had version 1 and now version 4 is installed together
>> with
>> all dependencies. Any idea how I use NB-help ?
>>
>
> i don't know how you can do it in squeak image, in pharo image just
> open help browser
> from world menu and then look for 'NativeBoost' bookmark there.
>
>> ________________________________
>> From: Igor Stasenko [via Smalltalk]
>> <[hidden email]>



NBHelpInSqueak4.3FullyUpd.png (94K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?)

Levente Uzonyi-2
In reply to this post by Igor Stasenko
On Tue, 21 Aug 2012, Igor Stasenko wrote:

> On 21 August 2012 23:20, dimitris chloupis <[hidden email]> wrote:
>> Ah thank you , I had version 1 and now version 4 is installed together with
>> all dependencies. Any idea how I use NB-help ?
>>
>
> i don't know how you can do it in squeak image, in pharo image just
> open help browser

It uses too many "pharoisms", so it won't work in Squeak out of the box:
- Gofer
- LogicalFont
- StandardFonts
- pragma-based "registration" for HelpSystem

The first can be loaded, the lines containing the next two can be replaced
with "TextStyle defaultFont" and then you can open the HelpBrowser with:
HelpBrowser openOn: NBHelp asHelpTopic.

Btw, green text for source code doesn't look very nice and it would be
better to use the Metacello API to load PP.


Levente

123