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

2015-04-19 Thread stepharo

Hi guys

long time ago Magritte was shipped with examples such as MAAddress and 
MAPerson.

Does anybody have an idea?

Stef




[Pharo-users] exception handling problem when running tests in Nautilus

2015-04-19 Thread Otto Behrens
Hi,

Thanks everyone for the new Pharo and all the work done. I like Spotter!

I gave Pharo 4 a try today and ran into a problem with running tests
in a TestCase (test class -> run tests). I just get the debugger
popping up with WARequestContextNotFound.

In the setUp of our test case, we call WACurrentRequestContext value,
but handle the error when we do not have a context, for example:

[ WACurrentRequestContext value. true ]
on: WARequestContextNotFound
do: [ :e | false ]

This handler: "[ :e | false ]" is never called. What influences this
is the exception handling in:

AbstractNautilusUI >> #runTestsOfClass:notifying:

Firstly, I think that it may be slighly better to call "e pass" or "e
outer" in stead of "e defaultAction", as this would give another outer
handler a chance to do something. The defaultAction is called when
there are no more outer handlers anyway.

After trying this, it did not help my cause. And I think that this is
because the WACurrentRequestContext is a Notification and not an
Error.

I then replaced Exception with Error in the handler in
AbstractNautilusUI. This seem to work. What also works is to
completely remove the exception handling in AbstractNautilusUI >>
#runTestsOfClass:notifying:

What is a bit strange is the inconsistency in this exception handling
when running a suite or an individual test. Perhaps this kind of code
could be better on the TestSuite and not in the Nautilus UI?

Can anyone please help? Should I be doing something else?

Cheers
Otto



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

2015-04-19 Thread Hilaire
Le 19/04/2015 07:30, stepharo a écrit :
> Hi guys
>
> long time ago Magritte was shipped with examples such as MAAddress and
> MAPerson.
> Does anybody have an idea?
>
> Stef
>
>
>

Hi,

In my opinion, the lack of documentation is how to extend Magritte to
fit your own object.
For example, an object with two attributes (a string and an object with
values taken from a collection).

Hilaire

-- 
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu





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

2015-04-19 Thread p...@highoctane.be
I have a collection of docs about Magritte I collected over time and made
some examples when I was trying to get it integrated in one software.

I took a while to wrap my mind around it and reading Luka's thesis was
helpful.

I also realized that there were missing pieces for some associations I
wanted.

Maybe we should start a shared effort on this in the form of a pillar book
(maybe there is one somewhere already).

QCMagritte is interesting but I do not feel like looking into it, as it is
hard to wrap my mind around it.

My main concern with Magritte at this point is that it takes significant
effort to get a decent CRUD system working.
What I have got is okay for prototyping but the UI seems very bland
compared to what I can do using WATableReport extensions and Mold.
This hasn't to be like that but as Quuve showed, one needs to make all of
the subclassed parts and mechanisms to get it nice.

This is really an area where we are lagging behind.

It is annyoying since competing technologies do have what it takes to make
decent crud systems.

In TikiWiki CMS groupware, we've got a thing callned "trackers' :
https://doc.tiki.org/Trackers

Making a CRUD thing is very easy. Example:
http://www.socius.be/Praktijkenbank or http://www.socius.be/Vacatures is
all done with trackers. (that's the presentation side, the admin side works
nicely with checks and workflows).

Time to do the whole site was something like 2-3 months for 2 people.

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

In Python we get
http://www.pythondiary.com/tutorials/simple-crud-app-django.html

We need to get this working.

Phil


On Sun, Apr 19, 2015 at 10:09 AM, Hilaire  wrote:

> Le 19/04/2015 07:30, stepharo a écrit :
> > Hi guys
> >
> > long time ago Magritte was shipped with examples such as MAAddress and
> > MAPerson.
> > Does anybody have an idea?
> >
> > Stef
> >
> >
> >
>
> Hi,
>
> In my opinion, the lack of documentation is how to extend Magritte to
> fit your own object.
> For example, an object with two attributes (a string and an object with
> values taken from a collection).
>
> Hilaire
>
> --
> Dr. Geo - http://drgeo.eu
> iStoa - http://istoa.drgeo.eu
>
>
>
>
>


--


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

2015-04-19 Thread Stephan Eggermont

On 19/04/15 12:59, p...@highoctane.be wrote:

My main concern with Magritte at this point is that it takes significant
effort to get a decent CRUD system working.


That is exactly what we provide with QCMagritte.
And yes, it is difficult to find out where to make changes,
because the number of interacting parts is rather large.

The essential complexity when integrating rights and roles,
i18n, bootstrapping the components, providing a navigation
model, and ajaxifying, is larger. If you try integrating
these yourself in Magritte, you'll end up with mostly
the same abstractions, or a lot of duplication

Stephan





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

2015-04-19 Thread p...@highoctane.be
On Sun, Apr 19, 2015 at 1:41 PM, Stephan Eggermont  wrote:

> On 19/04/15 12:59, p...@highoctane.be wrote:
>
>> My main concern with Magritte at this point is that it takes significant
>> effort to get a decent CRUD system working.
>>
>
> That is exactly what we provide with QCMagritte.
> And yes, it is difficult to find out where to make changes,
> because the number of interacting parts is rather large.
>
> The essential complexity when integrating rights and roles,
> i18n, bootstrapping the components, providing a navigation
> model, and ajaxifying, is larger. If you try integrating
> these yourself in Magritte, you'll end up with mostly
> the same abstractions, or a lot of duplication


Ok. Now, I've been watching almost all of your videos but still can't get a
hand on the thing.

Maybe could we do a paired session with a walkthrough, record all of it and
push it on YouTube.

What do you think? I am educated enough on Magritte to follow I think.

Magritte is powerful but comes with the uber-frustration factor :-)
Let's alleviate that.

Phil




>
>
> Stephan
>
>
>
>
>


--


Re: [Pharo-users] SDL2 and fork

2015-04-19 Thread Nicolai Hess
Hi Matthieu

2015-04-09 17:54 GMT+02:00 Matthieu Lacaton :

> 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
>


This is a simple example based on the existing
SDL2Example>>simpleDrawDisplay

simpleDrawDisplay2
"
self new simpleDrawDisplay2
"

| window renderer texture |
"Create the window and the renderer."
SDL2 initVideo.
window := SDL2
createWindow: 'Test Window'
x: SDL_WINDOWPOS_UNDEFINED
y: SDL_WINDOWPOS_UNDEFINED
width: Display extent x
height: Display extent y
flags: SDL_WINDOW_SHOWN.
renderer := window createDefaultRenderer."Create the texture"
texture := renderer
createTextureFormat: SDL_PIXELFORMAT_XRGB
access: SDL_TEXTUREACCESS_STREAMING
width: Display width
height: Display height.
1000
timesRepeat: [
texture updateTexturePixels: Display bits pitch: Display width
* 4.
"Render"
renderer
copy: texture;
present.
20 milliSeconds wait ].
"Quit"
texture destroy.
renderer destroy.
window destroy


Note, there is no call to SDL "delay"

You can start this example with
[SDL2Example simpleDrawDisplay2] fork


Before you start this example, change the main window to half of your
display screen, that way
you can see both screens, the main vm and the "mirror" with SDL.



nicolai


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

2015-04-19 Thread Stephan Eggermont

On 19/04/15 13:58, p...@highoctane.be wrote:

Ok. Now, I've been watching almost all of your videos but still can't
get a hand on the thing.


Yes, finding the right level between very deep technical (the first one)
and just showing the things we made really easy (the later ones) is
difficult. There is a frustrating gap in the middle. It doesn't help
that Diego is very busy with non-pharo things atm, and that I have
a few points that I would like to improve before explaining them...


Maybe could we do a paired session with a walkthrough, record all of it
and push it on YouTube.

What do you think? I am educated enough on Magritte to follow I think.


Sounds like a good idea. I'll talk to Diego.


Magritte is powerful but comes with the uber-frustration factor :-)
Let's alleviate that.


Yes, finding your way in Magritte is difficult. We need some kind
of cookbook. I'm playing on too many chessboards at the same time
atm, and the lack of finishing is frustrating.

Stephan





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

2015-04-19 Thread Cyril Ferlicot
Hi again !

Ok so. To use pillar inside Pharo you have this:

PRCocoonConfiguration new
templateStream: PRHTMLWriter defaultTemplate;
configurations: Dictionary new;
inputFiles: {(FileSystem workingDirectory /
'test.pillar')};
outputType: PRHTMLWriter;
outputFile: 'test.html' asFileReference ;
export.

Here is a little exemple. You can remplace PRHTMLWriter by
PRLaTeXWriter, PRTextWriter, PRMarkdownWriter, PRPillarWriter etc...
The outputFile is the name of the file you want to be generate, the
file will be on the folder of the image.
If you want a special template you have to pass it to templateStream.
You can also have others option like:



On 18 April 2015 at 20:06, Cyril Ferlicot  wrote:
> Hi !
> You can use it from Pharo but it's a little complicated if you want to add a
> configuration file (pillar.conf).
> I can't explain now because I'm at a ceremony but when I'll have time I'll
> add the list of the commandes !
>
> Le samedi 18 avril 2015, Jan Valášek  a écrit :
>>
>> Hi there,
>>
>> I'd like to ask you, whether is here a way to use pillar internally,
>> directly from Pharo and how to use it properly. I have found some
>> tutorials how to use it from linux/windows command prompt, however, I'd
>> prefer to call it in my program in pharo.
>>
>>
>>
>> Something like this ->
>> ---
>> header := pillarHeaderObject new.  //creating pillar objects directly
>> from my program
>> header text:'Title of my page'.
>> aPillarDocument add: header.   //adding them to the whole document
>> object
>>
>> and finally
>>
>> aPillarDocument exportToLatex. //export the document
>> --
>>
>>
>>
>> or I can just write the text in the pillar notation to "myTextObject"
>> and then call something like->
>> ---
>> pillarParseAndExportToLatex: myTextObject.
>> ---
>>
>> Is here a way to do this?
>>
>> Thanks for your help :-)
>> John.
>>
>
>
> --
> Cheers
> Cyril Ferlicot
>



-- 
Cheers
Cyril Ferlicot



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

2015-04-19 Thread Cyril Ferlicot
Hi again !

Ok so. To use pillar inside Pharo you have this:

PRCocoonConfiguration new
templateStream: PRHTMLWriter defaultTemplate;
configurations: Dictionary new;
inputFiles: {(FileSystem workingDirectory /
'test.pillar')};
outputType: PRHTMLWriter;
outputFile: 'test.html' asFileReference ;
export.

Here is a little exemple. You can remplace PRHTMLWriter by
PRLaTeXWriter, PRTextWriter, PRMarkdownWriter, PRPillarWriter etc...
The outputFile is the name of the file you want to be generate, the
file will be on the folder of the image.
If you want a special template you have to pass it to templateStream.
You can also have others option like:
- inputString : aString with the pillar text you want to export like:
'!test
*myLink>http://test.html*
!!Test 2
etc...'
- outputStream : if you don't want a file at the end but a stream.
etc...

You can find all these option inside the PRCocoonConfiguration class.

I hope that can help you, if you've others question fell free to ask !

On 19 April 2015 at 17:53, Cyril Ferlicot  wrote:
> Hi again !
>
> Ok so. To use pillar inside Pharo you have this:
>
> PRCocoonConfiguration new
> templateStream: PRHTMLWriter defaultTemplate;
> configurations: Dictionary new;
> inputFiles: {(FileSystem workingDirectory /
> 'test.pillar')};
> outputType: PRHTMLWriter;
> outputFile: 'test.html' asFileReference ;
> export.
>
> Here is a little exemple. You can remplace PRHTMLWriter by
> PRLaTeXWriter, PRTextWriter, PRMarkdownWriter, PRPillarWriter etc...
> The outputFile is the name of the file you want to be generate, the
> file will be on the folder of the image.
> If you want a special template you have to pass it to templateStream.
> You can also have others option like:
>
>
>
> On 18 April 2015 at 20:06, Cyril Ferlicot  wrote:
>> Hi !
>> You can use it from Pharo but it's a little complicated if you want to add a
>> configuration file (pillar.conf).
>> I can't explain now because I'm at a ceremony but when I'll have time I'll
>> add the list of the commandes !
>>
>> Le samedi 18 avril 2015, Jan Valášek  a écrit :
>>>
>>> Hi there,
>>>
>>> I'd like to ask you, whether is here a way to use pillar internally,
>>> directly from Pharo and how to use it properly. I have found some
>>> tutorials how to use it from linux/windows command prompt, however, I'd
>>> prefer to call it in my program in pharo.
>>>
>>>
>>>
>>> Something like this ->
>>> ---
>>> header := pillarHeaderObject new.  //creating pillar objects directly
>>> from my program
>>> header text:'Title of my page'.
>>> aPillarDocument add: header.   //adding them to the whole document
>>> object
>>>
>>> and finally
>>>
>>> aPillarDocument exportToLatex. //export the document
>>> --
>>>
>>>
>>>
>>> or I can just write the text in the pillar notation to "myTextObject"
>>> and then call something like->
>>> ---
>>> pillarParseAndExportToLatex: myTextObject.
>>> ---
>>>
>>> Is here a way to do this?
>>>
>>> Thanks for your help :-)
>>> John.
>>>
>>
>>
>> --
>> Cheers
>> Cyril Ferlicot
>>
>
>
>
> --
> Cheers
> Cyril Ferlicot



-- 
Cheers
Cyril Ferlicot



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

2015-04-19 Thread stepharo



Le 19/4/15 13:59, p...@highoctane.be a écrit :
I have a collection of docs about Magritte I collected over time and 
made some examples when I was trying to get it integrated in one software.


I took a while to wrap my mind around it and reading Luka's thesis was 
helpful.


I also realized that there were missing pieces for some associations I 
wanted.


Maybe we should start a shared effort on this in the form of a pillar 
book (maybe there is one somewhere already).


Yes this would be so great.
I would like to port the tutorial lukas wrote to Magritte3 to get 
refreshed with Magritte.


QCMagritte is interesting but I do not feel like looking into it, as 
it is hard to wrap my mind around it.


My main concern with Magritte at this point is that it takes 
significant effort to get a decent CRUD system working.
What I have got is okay for prototyping but the UI seems very bland 
compared to what I can do using WATableReport extensions and Mold.
This hasn't to be like that but as Quuve showed, one needs to make all 
of the subclassed parts and mechanisms to get it nice.


This is really an area where we are lagging behind.

It is annyoying since competing technologies do have what it takes to 
make decent crud systems.


In TikiWiki CMS groupware, we've got a thing callned "trackers' : 
https://doc.tiki.org/Trackers


Making a CRUD thing is very easy. Example: 
http://www.socius.be/Praktijkenbank or http://www.socius.be/Vacatures 
is all done with trackers. (that's the presentation side, the admin 
side works nicely with checks and workflows).


Time to do the whole site was something like 2-3 months for 2 people.

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


Yes sadly :(
But the "soup of stones" only works when people put items on the top


In Python we get 
http://www.pythondiary.com/tutorials/simple-crud-app-django.html


We need to get this working.

Phil


On Sun, Apr 19, 2015 at 10:09 AM, Hilaire > wrote:


Le 19/04/2015 07:30, stepharo a écrit :
> Hi guys
>
> long time ago Magritte was shipped with examples such as
MAAddress and
> MAPerson.
> Does anybody have an idea?
>
> Stef
>
>
>

Hi,

In my opinion, the lack of documentation is how to extend Magritte to
fit your own object.
For example, an object with two attributes (a string and an object
with
values taken from a collection).

Hilaire

--
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu







--




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

2015-04-19 Thread stepharo




Ok. Now, I've been watching almost all of your videos but still can't 
get a hand on the thing.


I had the same feeling. I probably missed the key point


Maybe could we do a paired session with a walkthrough, record all of 
it and push it on YouTube.


What do you think? I am educated enough on Magritte to follow I think.


Would be so great.
I would turn it into a doc after.


Magritte is powerful but comes with the uber-frustration factor :-)
Let's alleviate that.

Phil




Stephan







--




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

2015-04-19 Thread stepharo





Magritte is powerful but comes with the uber-frustration factor :-)
Let's alleviate that.


Yes, finding your way in Magritte is difficult. We need some kind
of cookbook. I'm playing on too many chessboards at the same time
atm, and the lack of finishing is frustrating.


I know that feeling ;)



Stephan









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

2015-04-19 Thread Yanni Chiu
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.




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

2015-04-19 Thread Jan Valášek
Well, this is exactly what I needed,
Great examples too, HTML and LaTeX format tried and worked fine.


PS: Pharo didn't know PRCocoonConfiguration class at first (bad version
of Pillar I guess), but this version of Pillar loaded into pharo helped.
"--"
Gofer new 
smalltalkhubUser: 'Pier' project: 'Pillar';
configuration;
load.
(Smalltalk globals at: #ConfigurationOfPillar) load.
"--"



thanks a lot for your help! :-)




Dne 2015-04-19 17:57, Cyril Ferlicot napsal:
> Hi again !
> 
> Ok so. To use pillar inside Pharo you have this:
> 
> PRCocoonConfiguration new
> templateStream: PRHTMLWriter defaultTemplate;
> configurations: Dictionary new;
> inputFiles: {(FileSystem workingDirectory /
> 'test.pillar')};
> outputType: PRHTMLWriter;
> outputFile: 'test.html' asFileReference ;
> export.
> 
> Here is a little exemple. You can remplace PRHTMLWriter by
> PRLaTeXWriter, PRTextWriter, PRMarkdownWriter, PRPillarWriter etc...
> The outputFile is the name of the file you want to be generate, the
> file will be on the folder of the image.
> If you want a special template you have to pass it to templateStream.
> You can also have others option like:
> - inputString : aString with the pillar text you want to export like:
> '!test
> *myLink>http://test.html*
> !!Test 2
> etc...'
> - outputStream : if you don't want a file at the end but a stream.
> etc...
> 
> You can find all these option inside the PRCocoonConfiguration class.
> 
> I hope that can help you, if you've others question fell free to ask !
> 
> On 19 April 2015 at 17:53, Cyril Ferlicot  wrote:
>> Hi again !
>>
>> Ok so. To use pillar inside Pharo you have this:
>>
>> PRCocoonConfiguration new
>> templateStream: PRHTMLWriter defaultTemplate;
>> configurations: Dictionary new;
>> inputFiles: {(FileSystem workingDirectory /
>> 'test.pillar')};
>> outputType: PRHTMLWriter;
>> outputFile: 'test.html' asFileReference ;
>> export.
>>
>> Here is a little exemple. You can remplace PRHTMLWriter by
>> PRLaTeXWriter, PRTextWriter, PRMarkdownWriter, PRPillarWriter etc...
>> The outputFile is the name of the file you want to be generate, the
>> file will be on the folder of the image.
>> If you want a special template you have to pass it to templateStream.
>> You can also have others option like:
>>
>>
>>
>> On 18 April 2015 at 20:06, Cyril Ferlicot  wrote:
>>> Hi !
>>> You can use it from Pharo but it's a little complicated if you want to add a
>>> configuration file (pillar.conf).
>>> I can't explain now because I'm at a ceremony but when I'll have time I'll
>>> add the list of the commandes !
>>>
>>> Le samedi 18 avril 2015, Jan Valášek  a écrit :

 Hi there,

 I'd like to ask you, whether is here a way to use pillar internally,
 directly from Pharo and how to use it properly. I have found some
 tutorials how to use it from linux/windows command prompt, however, I'd
 prefer to call it in my program in pharo.



 Something like this ->
 ---
 header := pillarHeaderObject new.  //creating pillar objects directly
 from my program
 header text:'Title of my page'.
 aPillarDocument add: header.   //adding them to the whole document
 object

 and finally

 aPillarDocument exportToLatex. //export the document
 --



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

 Is here a way to do this?

 Thanks for your help :-)
 John.

>>>
>>>
>>> --
>>> Cheers
>>> Cyril Ferlicot
>>>
>>
>>
>>
>> --
>> Cheers
>> Cyril Ferlicot




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

2015-04-19 Thread p...@highoctane.be
I've put several files that I do have on Magritte here:

https://github.com/philippeback/Magritte3Doc

Check the Resources/ folder.

Now, there are other things available on slideshare etc that I should
download and store there.

PRs welcome.

(yeah, binary files in GH)

Phil

On Sun, Apr 19, 2015 at 2:24 PM, Stephan Eggermont  wrote:

> On 19/04/15 13:58, p...@highoctane.be wrote:
>
>> Ok. Now, I've been watching almost all of your videos but still can't
>> get a hand on the thing.
>>
>
> Yes, finding the right level between very deep technical (the first one)
> and just showing the things we made really easy (the later ones) is
> difficult. There is a frustrating gap in the middle. It doesn't help
> that Diego is very busy with non-pharo things atm, and that I have
> a few points that I would like to improve before explaining them...
>
>  Maybe could we do a paired session with a walkthrough, record all of it
>> and push it on YouTube.
>>
>> What do you think? I am educated enough on Magritte to follow I think.
>>
>
> Sounds like a good idea. I'll talk to Diego.
>
>  Magritte is powerful but comes with the uber-frustration factor :-)
>> Let's alleviate that.
>>
>
> Yes, finding your way in Magritte is difficult. We need some kind
> of cookbook. I'm playing on too many chessboards at the same time
> atm, and the lack of finishing is frustrating.
>
> Stephan
>
>
>
>
>


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

2015-04-19 Thread garduino
philippeback wrote
> This is really an area where we are lagging behind.
> 
> It is annyoying since competing technologies do have what it takes to make
> decent crud systems.
> 
> Good CRUD ability is what most people are looking for in web frameworks
> and
> we are a bit lagging here.

+10



--
View this message in context: 
http://forum.world.st/Looking-for-Magritte-example-MAAddress-MAPerson-tp4820487p4820568.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] SDL2 and fork

2015-04-19 Thread 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  
> 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-19 Thread 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.

2) But for the moment OSWindow uses SDL2 anyway so for experimentation
purposes I will try to see what's wrong with my code.
The example you linked Nicolai is working indeed and this is more or less
what I did too. I included my code with this e-mail so maybe you can have a
better understanding (I am sorry but I didn't comment it :s). Note that for
it to work you need to add the SDL_image library and all its plugins (for
handling jpeg, png etc.) and add the following method to the image :

SDL_Renderer >> createTextureFromFile: file

^ self
nbCall: #( SDL_Texture IMG_LoadTexture ( self , String file ) )
module: 'SDL_Image.dll'

You can launch the game by executing "MyGame new startGame"

On my computer (which is probably not the fastest I must admit) running it
with a fork slows the whole operating system.

3) Another problem I had lately : I tried to use Pharo with linux (ubuntu
14.04.2 LTS) and Pharo just can't find the SDL library.
I downloaded SDL source code and compiled it so i got the
libSDL2-2.0.so.0.2.1 exactly as in the SDL2 class >> findSDL2 method.
I tried to put it everywhere (in the "shared" and "bin" folder of Pharo and
even at the root. I tried in /usr/lib/, in /usr/lib32/, in
/usr/lib/x86_64-linux-gnu etc. and Pharo can never find it.
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 ?

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
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>


Tata-SDLJeu.st
Description: Binary data


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

2015-04-19 Thread Lusa Nicolas
Thanks Ronie this is what I was looking for! Amazing going to try it out today 
and see how it works.
For what concern polygons I knew about the algorithms (thanks for mentioning 
them anyway), was just looking for a "more straight forward" solution since 
rendering polygons isn't the main goal of my thesis which means I have others 
priorities.

Thanks again,

cheers.
Nicolas


On Apr 20, 2015, at 7:56 AM, Ronie Salgado 
mailto:ronies...@gmail.com>>
 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 
mailto:yuriy.tymc...@me.com>>:

On 16 Apr 2015, at 22:51, stepharo mailto:steph...@free.fr>> 
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 
mailto:alexandre.ber...@me.com>> wrote:

No idea, but let us know!

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



On Apr 16, 2015, at 4:41 AM, Lusa Nicolas 
mailto:nicolas.l...@usi.ch>> 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