Re: [Pharo-users] [Bulk] Looking for Magritte example: MAAddress, MAPerson...

2015-04-20 Thread stepharo

Thanks yanni!



Le 19/4/15 20:34, Yanni Chiu a écrit :

On Apr 19, 2015, at 6:59 AM, p...@highoctane.be wrote:


Good CRUD ability is what most people are looking for in web frameworks and we 
are a bit lagging here.


I extracted out an example store, from the work I’ve been doing, to put 
together a presentation for our local Smalltalk user group 
(http://www.smalltalk.ca/meeting-notes.html). My plan was to put it out as a 
starter CRUD framework. It’s far from a full CRUD framework, but it does have 
single sign-on via (Zinc-SSO), a model with two classes and a one-many 
relationship. The Mustache framework allows it to be skinned easily with 
TwitterBootstrap.

I’ll try to make it happen sooner, but I’ve only got a time budget of 8 hours a 
week for Pharo work.








[Pharo-users] fluid dynamics fully in Pharo :)

2015-04-20 Thread stepharo
HoneyGinger is a fluid dynamics and visualization library which can 
simulate moves of liquid caused by obstacles and visualize refraction by 
estimating angles of water surface from distribution of pressure.


https://www.youtube.com/watch?v=jl6OSWUXh14

Thanks Oda for this great demo.




Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread stepharo

Alex
Just to make sure we are clear on this:
pay attention NOBODY should directly use SDL.
OSWindow is the API, SDL is a BACKEND.

Athens is the API, CAIRO a BACKEND

Stef

Le 20/4/15 02:57, Alexandre Bergel a écrit :

Hi Matthieu,

This is important: Binding SDL with Pharo will help Roassal to get better.
Please, let us know how it goes

Alexandre



On Apr 9, 2015, at 12:54 PM, Matthieu Lacaton  
wrote:

Hello everyone,

I tried to use the SDL2 binding to Pharo to create a very basic 2D application 
(just some sprites and events) and it worked great.
The issue I have is that when I start my application, as long as I have an 
active SDL window, I can't use my Pharo image anymore (it freezes).
To solve this problem I tried opening my application in another thread by doing 
so :
[ (MyApplication new) start. ] forkAt: Processor lowestPriority. (If I don't 
chose a low priority it changes nothing)

The problem is that even if it kind of works, it is really slow and it slows my 
whole operating system as well (I use windows XP)

How can I fork more efficiently or open a SDL window without losing control of 
my image ?

Thanks,

Matthieu





Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Nicolai Hess
2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :

> Hello,
> ...
> Could it be that I compiled it for 64bits (my ubuntu is 64 bits) and Pharo
> does not support it so I should recompile it for 32 bits ?
>

Yes.



>
> Thanks you all !
>
> Matthieu
>
>
> 2015-04-20 1:57 GMT+02:00 Alexandre Bergel :
>
>> Hi Matthieu,
>>
>> This is important: Binding SDL with Pharo will help Roassal to get better.
>> Please, let us know how it goes
>>
>> Alexandre
>>
>>
>> > On Apr 9, 2015, at 12:54 PM, Matthieu Lacaton <
>> matthieu.laca...@gmail.com> wrote:
>> >
>> > Hello everyone,
>> >
>> > I tried to use the SDL2 binding to Pharo to create a very basic 2D
>> application (just some sprites and events) and it worked great.
>> > The issue I have is that when I start my application, as long as I have
>> an active SDL window, I can't use my Pharo image anymore (it freezes).
>> > To solve this problem I tried opening my application in another thread
>> by doing so :
>> > [ (MyApplication new) start. ] forkAt: Processor lowestPriority. (If I
>> don't chose a low priority it changes nothing)
>> >
>> > The problem is that even if it kind of works, it is really slow and it
>> slows my whole operating system as well (I use windows XP)
>> >
>> > How can I fork more efficiently or open a SDL window without losing
>> control of my image ?
>> >
>> > Thanks,
>> >
>> > Matthieu
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>


Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Nicolai Hess
2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :

> Hello,
>
> Thanks for your answers ! I have multiple remarks here :
>
> 1) I know that SDL2 should not be used "as is" in Pharo and I should use
> OSWindow instead, that's why I won't use SDL2 directly anymore.
>

On windows there is currently an issue if you use OSWindow instead of
directly use SDL.
If you create a window with OSWindow, (like in the SDL2Example>>osWindow)
you will loose all "keystroke" events in the main pharo window.
I don't know yet why this happens.

nicolai


Re: [Pharo-users] Polygons + Skybox in woden?

2015-04-20 Thread Yuriy Tymchuk
Thanks Ronie! Cool stuff.


> On 20 Apr 2015, at 07:56, Ronie Salgado  wrote:
> 
> I have just added a simple skybox support. Check the modified 
> WDFPSSimpleExample6 as for how to use it.
> 
> 
> 
> 
> 
> To embed the images, I am using the following utility in the playground:
> 
> WDExamplesData storeCubeImageFromFile: 'quickMountain' extension: '.png' 
> dataMethodName:  #quickMountainSkyData imageMethodName: #quickMountainSky
> 
> Which embeds quickMountain_px.png, quickMountain_nx.png, 
> quickMountain_py.png, quickMountain_ny.png, quickMountain_pz.png and 
> quickMountain_nz.png . The generated WDExamples >> #quickMountainSky method 
> returns an array with 6 forms in the same order, which is used to construct a 
> WDTextureCube
> 
> Best regards,
> Ronie
> 
> 2015-04-18 17:39 GMT-03:00 Yuriy Tymchuk  >:
> 
>> On 16 Apr 2015, at 22:51, stepharo > > wrote:
>> 
>> 
>>> Uhh..
>>> 
>>> I Woden still developed? Because I thought that Object Profile was working 
>>> on it. Otherwise maybe we should switch to the CodeCity engine… it seems to 
>>> have more “support”.
>> 
>> what is the codeCity engine?
>> you want to reinvent all the effort ronie put in woden?
> 
> No, our aim is not to create a 3D graphics framework. But we meed to draw 3d 
> boxes and few more entities somehow.
> 
> I’ve mentioned Codecity because it’s usually easy to get a response from 
> Ricky and at the moment of written, I was really perplexed with the answer.
> 
> I’m not expecting code owners to do someone else’s job. For example Ronie’s 
> answer was really cool. But if someone would tell that Ronie ran away and no 
> one knows how Woden works - it’s ok too, as different things happen.
> 
> But imagine that you ask:
> “Does QualityAssistant fix critics automatically?”
> and Michele answers:
> “No idea, but you should check and let us know”
> 
> Maybe I am expecting too much responsibility, in this case please forgive me.
> Uko
> 
> 
>> 
>> Stef
>> 
>>> 
>>> Uko
>>> 
 On 16 Apr 2015, at 15:11, Alexandre Bergel >>> > wrote:
 
 No idea, but let us know!
 
 Alexandre
 -- 
 _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
 Alexandre Bergel  http://www.bergel.eu 
 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
 
 
 
> On Apr 16, 2015, at 4:41 AM, Lusa Nicolas  > wrote:
> 
> Hello,
> 
> I am Nicolas Lusa from university of Lugano and I am working on my master 
> thesis with the supervision of Yuriy Tymchuk.
> Right now I am working with woden and I am trying to build polygons. 
> Question1: Is it possible somehow to build polygons in woden?
> 
> If not:
> I know woden is based on OpenGL and I also know that in OpenGL is 
> possible to draw polygons with GL_POLYGON and a given array of points. 
> Question2: How could I use GL_POLYGON through woden for my purpose?
> 
> Moreover, I would like to put some sort of skybox in my scene. Apparently 
> it's not possible yet, so my question is how could I do that?
> 
> Thanks in advance.
> Cheers.
> Nicolas 
 
>>> 
>> 
> 
> 



Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Nicolai Hess
2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :

> Hello,
>
> Thanks for your answers ! I have multiple remarks here :
>
> On my computer (which is probably not the fastest I must admit) running it
> with a fork slows the whole operating system.
>


What you could do, add a wait time in your event proccessing loop

stop := false.
[ stop ] whileFalse: [


20 milliSeconds wait.
].


So, it does not constantly checks for new events.
The better, cleaner way of course is, don't use your own sdl event
processing loop, but use OSWindow (as soon as this is working :) )


best
nicolai



Matthieu
>
>
> 2015-04-20 1:57 GMT+02:00 Alexandre Bergel :
>
>> Hi Matthieu,
>>
>> This is important: Binding SDL with Pharo will help Roassal to get better.
>> Please, let us know how it goes
>>
>> Alexandre
>>
>>
>> > On Apr 9, 2015, at 12:54 PM, Matthieu Lacaton <
>> matthieu.laca...@gmail.com> wrote:
>> >
>> > Hello everyone,
>> >
>> > I tried to use the SDL2 binding to Pharo to create a very basic 2D
>> application (just some sprites and events) and it worked great.
>> > The issue I have is that when I start my application, as long as I have
>> an active SDL window, I can't use my Pharo image anymore (it freezes).
>> > To solve this problem I tried opening my application in another thread
>> by doing so :
>> > [ (MyApplication new) start. ] forkAt: Processor lowestPriority. (If I
>> don't chose a low priority it changes nothing)
>> >
>> > The problem is that even if it kind of works, it is really slow and it
>> slows my whole operating system as well (I use windows XP)
>> >
>> > How can I fork more efficiently or open a SDL window without losing
>> control of my image ?
>> >
>> > Thanks,
>> >
>> > Matthieu
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>


Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread merwanouddane
Hello,


We don’t lose all keystroke events, but they are replaced by keydown events.


Merwan




De : Nicolai Hess
Envoyé : ‎lundi‎ ‎20‎ ‎avril‎ ‎2015 ‎09‎:‎36
À : Any question about pharo is welcome; Esteban Lorenzano






2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :













Hello, 



Thanks for your answers ! I have multiple remarks here : 


1) I know that SDL2 should not be used "as is" in Pharo and I should use 
OSWindow instead, that's why I won't use SDL2 directly anymore.




On windows there is currently an issue if you use OSWindow instead of directly 
use SDL.


If you create a window with OSWindow, (like in the SDL2Example>>osWindow) you 
will loose all "keystroke" events in the main pharo window.


I don't know yet why this happens.



nicolai

Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Nicolai Hess
2015-04-20 13:13 GMT+02:00 :

> Hello,
>
> We don’t lose all keystroke events, but they are replaced by keydown
> events.
>

Yes, KeyDown/KeyUp are working and instead of a keystroke event another
keydown is sent.
This is strange, I don't know exactly how the SDL event processing can
influence the main window events.
Maybe this has something to do how we look for new events in the
SDL2DisplayPlugin.
For me the call to SDL_PumpEvents looks unnecessary, maybe this is the
cause?


nicolai



>
> Merwan
>
>
> *De :* Nicolai Hess
> *Envoyé :* ‎lundi‎ ‎20‎ ‎avril‎ ‎2015 ‎09‎:‎36
> *À :* Any question about pharo is welcome; Esteban Lorenzano
>
>
>
> 2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :
>
>> Hello,
>>
>> Thanks for your answers ! I have multiple remarks here :
>>
>> 1) I know that SDL2 should not be used "as is" in Pharo and I should use
>> OSWindow instead, that's why I won't use SDL2 directly anymore.
>>
>
> On windows there is currently an issue if you use OSWindow instead of
> directly use SDL.
> If you create a window with OSWindow, (like in the SDL2Example>>osWindow)
> you will loose all "keystroke" events in the main pharo window.
> I don't know yet why this happens.
>
> nicolai
>


Re: [Pharo-users] Pillar used directly from Pharo

2015-04-20 Thread Damien Cassou

Hi Jan,

the following complements Cyril's answers. You can have a look at all
the unit-tests, they do a lot of things like what you want.

Jan Valášek  writes:
> header := pillarHeaderObject new.  //creating pillar objects directly

header := PRHeader new level: 2; add: (PRText content: 'foo'); yourself.


> aPillarDocument add: header.   //adding them to the whole document


document := PRDocument new.
document add: header.

> aPillarDocument exportToLatex. //export the document


to only export the body of the document:

PRLaTeXWriter write: document


> or I can just write the text in the pillar notation to "myTextObject"
> and then call something like->
> ---
> pillarParseAndExportToLatex: myTextObject.


document := PRDocumentParser parse: '!!foo'.
PRLaTeXWriter write: document.


-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Esteban Lorenzano
Hi, 

I just committed my prototype/experiment for windows with OSWindow, SDL2 and 
Athens. 
to check them: 

Gofer it 
smalltalkhubUser: 'Pharo' project: 'OSWindow';
package: 'OSWindow-Core';
package: 'OSWindow-SDL2';   
package: 'OSWindow-SDL2-Canvases';
load.

and check the examples at: 

OSSDLAthensWindow
OSSDLMorphWindow

cheers, 
Esteban

> On 20 Apr 2015, at 13:55, Nicolai Hess  wrote:
> 
> 
> 
> 2015-04-20 13:13 GMT+02:00  >:
> Hello,
>  
> We don’t lose all keystroke events, but they are replaced by keydown events.
> 
> Yes, KeyDown/KeyUp are working and instead of a keystroke event another 
> keydown is sent.
> This is strange, I don't know exactly how the SDL event processing can 
> influence the main window events.
> Maybe this has something to do how we look for new events in the 
> SDL2DisplayPlugin.
> For me the call to SDL_PumpEvents looks unnecessary, maybe this is the cause?
> 
> 
> nicolai
> 
>  
>  
> Merwan
>  
>  
> De : Nicolai Hess
> Envoyé : ‎lundi‎ ‎20‎ ‎avril‎ ‎2015 ‎09‎:‎36
> À : Any question about pharo is welcome; Esteban Lorenzano
>  
> 
> 
> 2015-04-20 8:38 GMT+02:00 Matthieu Lacaton  >:
> Hello, 
> 
> Thanks for your answers ! I have multiple remarks here : 
> 
> 1) I know that SDL2 should not be used "as is" in Pharo and I should use 
> OSWindow instead, that's why I won't use SDL2 directly anymore.
> 
> On windows there is currently an issue if you use OSWindow instead of 
> directly use SDL.
> If you create a window with OSWindow, (like in the SDL2Example>>osWindow) you 
> will loose all "keystroke" events in the main pharo window.
> I don't know yet why this happens.
> 
> nicolai
> 



Re: [Pharo-users] [ANN] ArchLinux pharo-vm / pharo-launcher packages

2015-04-20 Thread Markus Schlager

Hi Laurent,

There's again a 404 file not found with 
PharoLauncher-user-stable-2015.04.18.zip.


Markus



==> Erstelle Paket: pharo-launcher 4.0-1 (Mo 20. Apr 14:19:39 CEST 2015)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> Lade icon-lighthouse-128x128.png herunter...
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100  8219  100  82190 0  32276  0 --:--:-- --:--:-- --:--:-- 
32231

  -> Lade PharoLauncher-user-stable-2015.04.18.zip herunter...
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 
0curl: (22) The requested URL returned error: 404 Not Found

==> FEHLER: Fehler beim Download von PharoLauncher-user-stable-2015.04.18.zip
Breche ab...



Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Alexandre Bergel
I see the point, but SDL seems to be pretty stable isn’t it? 
Only two versions are reported on their website (1.2 and 2.0). Maybe it would 
be better to directly talk to SDL. Just wondering...

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On Apr 20, 2015, at 4:18 AM, stepharo  wrote:
> 
> Alex
> Just to make sure we are clear on this:
>pay attention NOBODY should directly use SDL.
>OSWindow is the API, SDL is a BACKEND.
> 
>Athens is the API, CAIRO a BACKEND
> 
> Stef
> 
> Le 20/4/15 02:57, Alexandre Bergel a écrit :
>> Hi Matthieu,
>> 
>> This is important: Binding SDL with Pharo will help Roassal to get better.
>> Please, let us know how it goes
>> 
>> Alexandre
>> 
>> 
>>> On Apr 9, 2015, at 12:54 PM, Matthieu Lacaton  
>>> wrote:
>>> 
>>> Hello everyone,
>>> 
>>> I tried to use the SDL2 binding to Pharo to create a very basic 2D 
>>> application (just some sprites and events) and it worked great.
>>> The issue I have is that when I start my application, as long as I have an 
>>> active SDL window, I can't use my Pharo image anymore (it freezes).
>>> To solve this problem I tried opening my application in another thread by 
>>> doing so :
>>> [ (MyApplication new) start. ] forkAt: Processor lowestPriority. (If I 
>>> don't chose a low priority it changes nothing)
>>> 
>>> The problem is that even if it kind of works, it is really slow and it 
>>> slows my whole operating system as well (I use windows XP)
>>> 
>>> How can I fork more efficiently or open a SDL window without losing control 
>>> of my image ?
>>> 
>>> Thanks,
>>> 
>>> Matthieu
> 
> 



Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Nicolai Hess
2015-04-20 13:55 GMT+02:00 Nicolai Hess :

>
>
> 2015-04-20 13:13 GMT+02:00 :
>
>> Hello,
>>
>> We don’t lose all keystroke events, but they are replaced by keydown
>> events.
>>
>
> Yes, KeyDown/KeyUp are working and instead of a keystroke event another
> keydown is sent.
> This is strange, I don't know exactly how the SDL event processing can
> influence the main window events.
> Maybe this has something to do how we look for new events in the
> SDL2DisplayPlugin.
> For me the call to SDL_PumpEvents looks unnecessary, maybe this is the
> cause?
>
>
So, I removed the call to SDL_PumpEvents, and now keystroke events are
still working in
the main window after opening an OSWindow.

@Esteban
Can you check if this is working on other platforms too.






>
> nicolai
>
>
>
>>
>> Merwan
>>
>>
>> *De :* Nicolai Hess
>> *Envoyé :* ‎lundi‎ ‎20‎ ‎avril‎ ‎2015 ‎09‎:‎36
>> *À :* Any question about pharo is welcome; Esteban Lorenzano
>>
>>
>>
>> 2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :
>>
>>> Hello,
>>>
>>> Thanks for your answers ! I have multiple remarks here :
>>>
>>> 1) I know that SDL2 should not be used "as is" in Pharo and I should use
>>> OSWindow instead, that's why I won't use SDL2 directly anymore.
>>>
>>
>> On windows there is currently an issue if you use OSWindow instead of
>> directly use SDL.
>> If you create a window with OSWindow, (like in the SDL2Example>>osWindow)
>> you will loose all "keystroke" events in the main pharo window.
>> I don't know yet why this happens.
>>
>> nicolai
>>
>
>


Re: [Pharo-users] [ANN] ArchLinux pharo-vm / pharo-launcher packages

2015-04-20 Thread Laurent

Fixed.

Laurent

Le lun. 20 avril 2015 à 14:25, Markus Schlager  a écrit 
:

Hi Laurent,

There's again a 404 file not found with 
PharoLauncher-user-stable-2015.04.18.zip.


Markus



==> Erstelle Paket: pharo-launcher 4.0-1 (Mo 20. Apr 14:19:39 CEST 
2015)

==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> Lade icon-lighthouse-128x128.png herunter...
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed
100  8219  100  82190 0  32276  0 --:--:-- --:--:-- 
--:--:-- 32231

  -> Lade PharoLauncher-user-stable-2015.04.18.zip herunter...
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0curl: (22) The requested URL returned error: 404 Not Found
==> FEHLER: Fehler beim Download von 
PharoLauncher-user-stable-2015.04.18.zip

Breche ab...


Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Nicolai Hess
2015-04-20 16:56 GMT+02:00 Alexandre Bergel :

> I see the point, but SDL seems to be pretty stable isn’t it?
> Only two versions are reported on their website (1.2 and 2.0). Maybe it
> would be better to directly talk to SDL. Just wondering...
>
> Alexandre
>

If you use SDL directly -> you will have to create your own event loop (and
other stuff)
If you use the OSWindow layer -> you will get a nice API that is already
integrated with the main window / main window eventloop.


Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Nicolai Hess
2015-04-20 14:20 GMT+02:00 Esteban Lorenzano :

> Hi,
>
> I just committed my prototype/experiment for windows with OSWindow, SDL2
> and Athens.
> to check them:
>
> Gofer it
> smalltalkhubUser: 'Pharo' project: 'OSWindow';
> package: 'OSWindow-Core';
> package: 'OSWindow-SDL2';
> package: 'OSWindow-SDL2-Canvases';
> load.
>
> and check the examples at:
>
> OSSDLAthensWindow
> OSSDLMorphWindow
>

Great!

Although the VM crashes sometimes (after closing the SDL-Window)

And I know found out why the window is partly out of the screen (on
Windows7, don't think this happens on linux/mac):
If you open a SDL window with

SDL createWindow: title x: 0 y: 0 
The window opens at 0@0 but this is the upper left corner of the window
rectangle *without* window decoration.

If you open the window with
SDL createWindow: title x: SDL_WINDOWPOS_UNDEFINED 
-> the full window is visible


nicolai






>
> cheers,
> Esteban
>
> On 20 Apr 2015, at 13:55, Nicolai Hess  wrote:
>
>
>
> 2015-04-20 13:13 GMT+02:00 :
>
>> Hello,
>>
>> We don’t lose all keystroke events, but they are replaced by keydown
>> events.
>>
>
> Yes, KeyDown/KeyUp are working and instead of a keystroke event another
> keydown is sent.
> This is strange, I don't know exactly how the SDL event processing can
> influence the main window events.
> Maybe this has something to do how we look for new events in the
> SDL2DisplayPlugin.
> For me the call to SDL_PumpEvents looks unnecessary, maybe this is the
> cause?
>
>
> nicolai
>
>
>
>>
>> Merwan
>>
>>
>> *De :* Nicolai Hess
>> *Envoyé :* ‎lundi‎ ‎20‎ ‎avril‎ ‎2015 ‎09‎:‎36
>> *À :* Any question about pharo is welcome; Esteban Lorenzano
>>
>>
>>
>> 2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :
>>
>>> Hello,
>>>
>>> Thanks for your answers ! I have multiple remarks here :
>>>
>>> 1) I know that SDL2 should not be used "as is" in Pharo and I should use
>>> OSWindow instead, that's why I won't use SDL2 directly anymore.
>>>
>>
>> On windows there is currently an issue if you use OSWindow instead of
>> directly use SDL.
>> If you create a window with OSWindow, (like in the SDL2Example>>osWindow)
>> you will loose all "keystroke" events in the main pharo window.
>> I don't know yet why this happens.
>>
>> nicolai
>>
>
>
>


Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Sean P. DeNigris
EstebanLM wrote
> I just committed my prototype/experiment for windows with OSWindow, SDL2
> and Athens. 

I got an error because my VM (via Launcher 0.2.4 - I can't upgrade due to a
previously-reported error) doesn't have SDL2. I guess Launcher is using
stable from 9/2014. How stable is VM latest? If I inject it into my current
Launcher, will it be okay for general use?



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/SDL2-and-fork-tp4818623p4820732.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Sean P. DeNigris
Sean P. DeNigris wrote
> VM latest

That's odd... I opened the image with the latest VM and still got "Error:
Failed to find SDL2 library" even though I can see libSDL2-2.0.0.dylib in
the Plugins folder



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/SDL2-and-fork-tp4818623p4820733.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Matthieu Lacaton
Hello,

Okay for me the problem was indeed that I had 64bits librairies. After
recompiling them for 32bits it worked fine.

Also when I use any of Esteban's examples even after I close the window I
still have a SDL2 event loop processs active in the process browser. And
sometimes (but i have not been able to reproduce it everytime) I have an
Oswindow renderer loop staying active too.

Le 21 avr. 2015 05:26, "S Krish"  a
écrit :
>
>
> Cool work...!..
>
> * The x: 50 y: 50 initial point, on windows enables display of the title
bar, otherwise hidden
>
> * The VM crashes on exampleTiger demo with Athens, resize and click
close... sometimes in other scenario's.
>
>
>
> On Mon, Apr 20, 2015 at 5:50 PM, Esteban Lorenzano 
wrote:
>>
>> Hi,
>>
>> I just committed my prototype/experiment for windows with OSWindow, SDL2
and Athens.
>> to check them:
>>
>> Gofer it
>> smalltalkhubUser: 'Pharo' project: 'OSWindow';
>> package: 'OSWindow-Core';
>> package: 'OSWindow-SDL2';
>> package: 'OSWindow-SDL2-Canvases';
>> load.
>>
>> and check the examples at:
>>
>> OSSDLAthensWindow
>> OSSDLMorphWindow
>>
>> cheers,
>> Esteban
>>
>>> On 20 Apr 2015, at 13:55, Nicolai Hess  wrote:
>>>
>>>
>>>
>>> 2015-04-20 13:13 GMT+02:00 :

 Hello,

 We don’t lose all keystroke events, but they are replaced by keydown
events.
>>>
>>>
>>> Yes, KeyDown/KeyUp are working and instead of a keystroke event another
keydown is sent.
>>> This is strange, I don't know exactly how the SDL event processing can
influence the main window events.
>>> Maybe this has something to do how we look for new events in the
SDL2DisplayPlugin.
>>> For me the call to SDL_PumpEvents looks unnecessary, maybe this is the
cause?
>>>
>>>
>>> nicolai
>>>
>>>


 Merwan


 De : Nicolai Hess
 Envoyé : ‎lundi‎ ‎20‎ ‎avril‎ ‎2015 ‎09‎:‎36
 À : Any question about pharo is welcome; Esteban Lorenzano



 2015-04-20 8:38 GMT+02:00 Matthieu Lacaton :
>
> Hello,
>
> Thanks for your answers ! I have multiple remarks here :
>
> 1) I know that SDL2 should not be used "as is" in Pharo and I should
use OSWindow instead, that's why I won't use SDL2 directly anymore.


 On windows there is currently an issue if you use OSWindow instead of
directly use SDL.
 If you create a window with OSWindow, (like in the
SDL2Example>>osWindow) you will loose all "keystroke" events in the main
pharo window.
 I don't know yet why this happens.

 nicolai
>>>
>>>
>>
>


Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread stepharo



Le 20/4/15 17:56, Alexandre Bergel a écrit :

I see the point, but SDL seems to be pretty stable isn’t it?


This has nothing to do with stability of SDL.
It has to do with layering software.

Only two versions are reported on their website (1.2 and 2.0). Maybe 
it would be better to directly talk to SDL. Just wondering...


Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 20, 2015, at 4:18 AM, stepharo > wrote:


Alex
Just to make sure we are clear on this:
   pay attention NOBODY should directly use SDL.
   OSWindow is the API, SDL is a BACKEND.

   Athens is the API, CAIRO a BACKEND

Stef

Le 20/4/15 02:57, Alexandre Bergel a écrit :

Hi Matthieu,

This is important: Binding SDL with Pharo will help Roassal to get 
better.

Please, let us know how it goes

Alexandre


On Apr 9, 2015, at 12:54 PM, Matthieu Lacaton 
mailto:matthieu.laca...@gmail.com>> wrote:


Hello everyone,

I tried to use the SDL2 binding to Pharo to create a very basic 2D 
application (just some sprites and events) and it worked great.
The issue I have is that when I start my application, as long as I 
have an active SDL window, I can't use my Pharo image anymore (it 
freezes).
To solve this problem I tried opening my application in another 
thread by doing so :
[ (MyApplication new) start. ] forkAt: Processor lowestPriority. 
(If I don't chose a low priority it changes nothing)


The problem is that even if it kind of works, it is really slow and 
it slows my whole operating system as well (I use windows XP)


How can I fork more efficiently or open a SDL window without losing 
control of my image ?


Thanks,

Matthieu