Hi, i adopted a Ruby implementation (taken from Exploring Everyday Things with R and Ruby by Sau Sheong Chang) of Craig Raynolds Boids Simulation in Pharo Smalltalk using Athens Canvas. Have a look: http://smalltalkhub.com/#!/~MartinWalk/Boids <http://forum.world.st/file/n4664291/PharoBoids.png> -- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I would love to have a set of chapters following the idea of this book. Stef On Jan 20, 2013, at 3:44 PM, MartinW wrote:
Hi, i adopted a Ruby implementation (taken from Exploring Everyday Things with R and Ruby by Sau Sheong Chang) of Craig Raynolds Boids Simulation in Pharo Smalltalk using Athens Canvas. Have a look: http://smalltalkhub.com/#!/~MartinWalk/Boids
<http://forum.world.st/file/n4664291/PharoBoids.png>
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I could not run it because I cannot download athens, so I look at your code and it is nice :) Some feedback for 2.0 installToolbar self window addMorph: self toolbar fullFrame: ( LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@ self toolbar minExtent y)) use the accessors instead of fractions:offsets: On Jan 20, 2013, at 3:56 PM, Stéphane Ducasse wrote:
I would love to have a set of chapters following the idea of this book.
Stef
On Jan 20, 2013, at 3:44 PM, MartinW wrote:
Hi, i adopted a Ruby implementation (taken from Exploring Everyday Things with R and Ruby by Sau Sheong Chang) of Craig Raynolds Boids Simulation in Pharo Smalltalk using Athens Canvas. Have a look: http://smalltalkhub.com/#!/~MartinWalk/Boids
<http://forum.world.st/file/n4664291/PharoBoids.png>
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Stéphane Ducasse wrote
use the accessors instead of fractions:offsets:
ok, much nicer indeed (if that's what you were hinting at?): + fullFrame: (LayoutFrame identity topOffset: self toolbar minExtent y). - fullFrame: ( - LayoutFrame - fractions: (0@0 corner: 1@1) - offsets: (0@(self toolbar minExtent y) corner: 0@0)). If there was a possibility to get write access to the Pharo collaborActive book i could update the example, because that's where i got it from in the first place. Or should there be a different version of the book for every Pharo release? Martin. -- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291p4664849.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Wed, Jan 23, 2013 at 10:38 AM, MartinW <wm@fastmail.fm> wrote:
Stéphane Ducasse wrote
use the accessors instead of fractions:offsets:
ok, much nicer indeed (if that's what you were hinting at?):
+ fullFrame: (LayoutFrame identity topOffset: self toolbar minExtent y).
- fullFrame: ( - LayoutFrame - fractions: (0@0 corner: 1@1) - offsets: (0@(self toolbar minExtent y) corner: 0@0)).
If there was a possibility to get write access to the Pharo collaborActive book i could update the example, because that's where i got it from in the first place. Or should there be a different version of the book for every Pharo release?
I think there aren't enough resources so I would try to keep the book as much updated as possible. So, you can write. I will send you a user/pass
Martin.
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291p4664849.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
On Jan 23, 2013, at 10:38 AM, MartinW wrote:
Stéphane Ducasse wrote
use the accessors instead of fractions:offsets:
ok, much nicer indeed (if that's what you were hinting at?):
+ fullFrame: (LayoutFrame identity topOffset: self toolbar minExtent y).
Yes but I was running :)
- fullFrame: ( - LayoutFrame - fractions: (0@0 corner: 1@1) - offsets: (0@(self toolbar minExtent y) corner: 0@0)).
If there was a possibility to get write access to the Pharo collaborActive book i could update the example, because that's where i got it from in the first place. Or should there be a different version of the book for every Pharo release?
Martin.
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291p4664849.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Funny :)) 2013/1/20 MartinW <wm@fastmail.fm>
Hi, i adopted a Ruby implementation (taken from Exploring Everyday Things with R and Ruby by Sau Sheong Chang) of Craig Raynolds Boids Simulation in Pharo Smalltalk using Athens Canvas. Have a look: http://smalltalkhub.com/#!/~MartinWalk/Boids
<http://forum.world.st/file/n4664291/PharoBoids.png>
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I install Athens 1.6 on Pharo-20480.image. run with $ ./NBCog -version 3.9-7 #1 Tue Nov 27 16:08:39 CET 2012 gcc 4.1.2 NBCoInterpreter NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 NBCogit NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 https://git.gitorious.org/cogvm/blessed.git Commit: 40ac7e7bdec6fef0e934d2c019b86db996053912 Date: 2012-11-19 18:54:49 +0100 By: Mariano Martinez Peck <marianopeck@gmail.com> Jenkins build #146 Linux pharo-build.lille.inria.fr 2.6.18-194.26.1.el5xen #1 SMP Tue Nov 9 14:13:46 EST 2010 i686 i686 i386 GNU/Linux plugin path: /home/phm/Downloads/coglinux-nb/ [default: /home/phm/Downloads/coglinux-nb/] Ubuntu 11.10 . $ sudo apt-get install libcairo2 Reading package lists... Done Building dependency tree Reading state information... Done libcairo2 is already the newest version. Try to run PharoBoids and get: Error: failed to get a symbol address cairo_image_surface_create NativeBoostLinux32(Object)>>error: NativeBoostLinux32>>getGlobalSymbolPointer: NativeBoostLinux32>>loadSymbol:fromModule: NativeBoost class>>loadSymbol:fromModule: Metaclass(Object)>>nbGetSymbolAddress:module: NBFFICallout>>generateCall:module: NBFFICalloutAPI>>function:module: in Block: [:gen | gen callType: conv;... NBFFICallout class(NBNativeCodeGen class)>>generateCode:andRetry: in Block: [bytes := aBlock... BlockClosure>>on:do: NBRecursionDetect class>>in:during: NBFFICallout class(NBNativeCodeGen class)>>generateCode:andRetry: NBFFICallout class(NBNativeCodeGen class)>>handleFailureIn:nativeCode: NBFFICalloutAPI>>function:module: AthensCairoSurface class(Object)>>nbCall: AthensCairoSurface class>>primImage:width:height: AthensCairoSurface class>>extent:format: AthensCairoSurface class>>extent: SkyMorph>>initialize SkyMorph class(Behavior)>>new PharoBoids>>sky PharoBoids>>toolbar PharoBoids>>installToolbar PharoBoids>>initialize PharoBoids class(Behavior)>>new PharoBoids class>>DoIt Compiler>>evaluate:in:to:notifying:ifFail:logged: SmalltalkEditor>>evaluateSelectionAndDo: in Block: [rcvr class evaluatorClass new... BlockClosure>>on:do: SmalltalkEditor>>evaluateSelectionAndDo: SmalltalkEditor>>evaluateSelection What am I doing wrong? On 20 January 2013 18:21, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Funny :))
2013/1/20 MartinW <wm@fastmail.fm>
Hi, i adopted a Ruby implementation (taken from Exploring Everyday Things with R and Ruby by Sau Sheong Chang) of Craig Raynolds Boids Simulation in Pharo Smalltalk using Athens Canvas. Have a look: http://smalltalkhub.com/#!/~MartinWalk/Boids
<http://forum.world.st/file/n4664291/PharoBoids.png>
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I also work with a 20480 image and Athens 1.6 and it seems a similar VM - only on MacOSX. I have no Linux availible to try at the moment. My Smalltalk vm version: NBCoInterpreter NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 NBCogit NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 https://git.gitorious.org/cogvm/blessed.git Commit: 40ac7e7bdec6fef0e934d2c019b86db996053912 Date: 2012-11-19 18:54:49 +0100 By: Mariano Martinez Peck <marianopeck@gmail.com> Jenkins build #146 Peter H. Meadows wrote
I install Athens 1.6 on Pharo-20480.image. run with $ ./NBCog -version 3.9-7 #1 Tue Nov 27 16:08:39 CET 2012 gcc 4.1.2 NBCoInterpreter NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 NBCogit NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 https://git.gitorious.org/cogvm/blessed.git Commit: 40ac7e7bdec6fef0e934d2c019b86db996053912 Date: 2012-11-19 18:54:49 +0100 By: Mariano Martinez Peck <
marianopeck@
> Jenkins build #146 Linux pharo-build.lille.inria.fr 2.6.18-194.26.1.el5xen #1 SMP Tue Nov 9 14:13:46 EST 2010 i686 i686 i386 GNU/Linux plugin path: /home/phm/Downloads/coglinux-nb/ [default: /home/phm/Downloads/coglinux-nb/]
Ubuntu 11.10 . $ sudo apt-get install libcairo2 Reading package lists... Done Building dependency tree Reading state information... Done libcairo2 is already the newest version.
Try to run PharoBoids and get: Error: failed to get a symbol address cairo_image_surface_create
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291p4664353.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 21 January 2013 07:20, Peter H. Meadows <peter.h.meadows@googlemail.com> wrote:
I install Athens 1.6 on Pharo-20480.image. run with $ ./NBCog -version
What am I doing wrong?
most often it is because it tries to link with 64bit library or library is not found. the path for library is hardcoded in CairoLibraryLoader class. Try changing it to see if it will work for you. -- Best regards, Igor Stasenko.
I changed CairoLibraryLoader class getLibraryPath to ^ '/usr/lib/i386-linux-gnu/libcairo.so' and it works now :) v.cool. On 21 January 2013 06:20, Peter H. Meadows <peter.h.meadows@googlemail.com>wrote:
I install Athens 1.6 on Pharo-20480.image. run with $ ./NBCog -version 3.9-7 #1 Tue Nov 27 16:08:39 CET 2012 gcc 4.1.2 NBCoInterpreter NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 NBCogit NativeBoost-CogPlugin-IgorStasenko.15 uuid: 44b6b681-38f1-4a9e-b6ee-8769b499576a Nov 27 2012 https://git.gitorious.org/cogvm/blessed.git Commit: 40ac7e7bdec6fef0e934d2c019b86db996053912 Date: 2012-11-19 18:54:49 +0100 By: Mariano Martinez Peck <marianopeck@gmail.com> Jenkins build #146 Linux pharo-build.lille.inria.fr 2.6.18-194.26.1.el5xen #1 SMP Tue Nov 9 14:13:46 EST 2010 i686 i686 i386 GNU/Linux plugin path: /home/phm/Downloads/coglinux-nb/ [default: /home/phm/Downloads/coglinux-nb/]
Ubuntu 11.10 . $ sudo apt-get install libcairo2 Reading package lists... Done Building dependency tree Reading state information... Done libcairo2 is already the newest version.
Try to run PharoBoids and get: Error: failed to get a symbol address cairo_image_surface_create
NativeBoostLinux32(Object)>>error: NativeBoostLinux32>>getGlobalSymbolPointer: NativeBoostLinux32>>loadSymbol:fromModule: NativeBoost class>>loadSymbol:fromModule: Metaclass(Object)>>nbGetSymbolAddress:module: NBFFICallout>>generateCall:module: NBFFICalloutAPI>>function:module: in Block: [:gen | gen callType: conv;... NBFFICallout class(NBNativeCodeGen class)>>generateCode:andRetry: in Block: [bytes := aBlock... BlockClosure>>on:do: NBRecursionDetect class>>in:during: NBFFICallout class(NBNativeCodeGen class)>>generateCode:andRetry: NBFFICallout class(NBNativeCodeGen class)>>handleFailureIn:nativeCode: NBFFICalloutAPI>>function:module: AthensCairoSurface class(Object)>>nbCall: AthensCairoSurface class>>primImage:width:height: AthensCairoSurface class>>extent:format: AthensCairoSurface class>>extent: SkyMorph>>initialize SkyMorph class(Behavior)>>new PharoBoids>>sky PharoBoids>>toolbar PharoBoids>>installToolbar PharoBoids>>initialize PharoBoids class(Behavior)>>new PharoBoids class>>DoIt Compiler>>evaluate:in:to:notifying:ifFail:logged: SmalltalkEditor>>evaluateSelectionAndDo: in Block: [rcvr class evaluatorClass new... BlockClosure>>on:do: SmalltalkEditor>>evaluateSelectionAndDo: SmalltalkEditor>>evaluateSelection
What am I doing wrong?
On 20 January 2013 18:21, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Funny :))
2013/1/20 MartinW <wm@fastmail.fm>
Hi, i adopted a Ruby implementation (taken from Exploring Everyday Things with R and Ruby by Sau Sheong Chang) of Craig Raynolds Boids Simulation in Pharo Smalltalk using Athens Canvas. Have a look: http://smalltalkhub.com/#!/~MartinWalk/Boids
<http://forum.world.st/file/n4664291/PharoBoids.png>
-- View this message in context: http://forum.world.st/Try-PharoBoids-tp4664291.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 21 January 2013 19:37, Peter H. Meadows <peter.h.meadows@googlemail.com> wrote:
I changed CairoLibraryLoader class getLibraryPath to ^ '/usr/lib/i386-linux-gnu/libcairo.so' and it works now :)
v.cool.
yeah.. one day we should think how to write a library search mechanism, so it will take a OS-specificness into account.. i'm not happy with hardcoding paths.. -- Best regards, Igor Stasenko.
participants (6)
-
Denis Kudriashov -
Igor Stasenko -
Mariano Martinez Peck -
MartinW -
Peter H. Meadows -
Stéphane Ducasse