Cuis Smalltalk Port

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

Cuis Smalltalk Port

bobcalco
I am highly interested in any port to Cuis. 

I've had a chance to play with it and would prefer to work in it with Aida over Pharo or Squeak. Simpler, smaller, more pleasurable all the way around.

What are prerequisites that need to be added to Cuis to make it feasible to port Aida for real-world applications?

Sport? Swazoo? Zinc?

- Bob

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

garduino
Hi Robert:

Yes, I'm en the final steps of Sport and Swazoo ports (I've still some details to polish and double test the resulting work) but when finished, we agreed with Janko that he will try to port Aida.

I will announce in Cuis list when the port of Sport and Swazoo be finished.


--
Sincerely,
Germán Arduino
about.me/garduino


2013/1/15 Robert Calco <[hidden email]>
I am highly interested in any port to Cuis. 

I've had a chance to play with it and would prefer to work in it with Aida over Pharo or Squeak. Simpler, smaller, more pleasurable all the way around.

What are prerequisites that need to be added to Cuis to make it feasible to port Aida for real-world applications?

Sport? Swazoo? Zinc?

- Bob

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida





_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

Janko Mivšek
Hi Germán,

Dne 16. 01. 2013 11:36, piše Germán Arduino:
> Hi Robert:
>
> Yes, I'm en the final steps of Sport and Swazoo ports (I've still some
> details to polish and double test the resulting work) but when finished,
> we agreed with Janko that he will try to port Aida.
>
> I will announce in Cuis list when the port of Sport and Swazoo be finished.

Perfect, hardly waiting on that :) Can you do a preliminary port of Aida
too (at least filein the code) , then send me a Cuis image to continue?

Also, if you have some non-important issues yet to solve on Swazoo and
Sport, just skip them for now. We can solve them later and in parallel
with porting Aida.

Best regards
Janko

>
>
> --
> Sincerely,
> Germán Arduino
> about.me/garduino <http://about.me/garduino>
>
> 2013/1/15 Robert Calco <[hidden email] <mailto:[hidden email]>>
>
>     I am highly interested in any port to Cuis.
>
>     I've had a chance to play with it and would prefer to work in it
>     with Aida over Pharo or Squeak. Simpler, smaller, more pleasurable
>     all the way around.
>
>     What are prerequisites that need to be added to Cuis to make it
>     feasible to port Aida for real-world applications?
>
>     Sport? Swazoo? Zinc?
>
>     - Bob
>
>     _______________________________________________
>     Aida mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
> <http://about.me/garduino>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida
>

--
Janko Mivšek
Svetovalec za informatiko
Eranova d.o.o.
Ljubljana, Slovenija
www.eranova.si
tel:  01 514 22 55
faks: 01 514 22 56
gsm: 031 674 565
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

garduino
HI Janko:

2013/1/16 Janko Mivšek <[hidden email]>
Hi Germán,

Dne 16. 01. 2013 11:36, piše Germán Arduino:
> Hi Robert:
>
> Yes, I'm en the final steps of Sport and Swazoo ports (I've still some
> details to polish and double test the resulting work) but when finished,
> we agreed with Janko that he will try to port Aida.
>
> I will announce in Cuis list when the port of Sport and Swazoo be finished.

Perfect, hardly waiting on that :) Can you do a preliminary port of Aida
too (at least filein the code) , then send me a Cuis image to continue?


Yes, sure, only tell me the exact version and packages that I should filein.

 
Also, if you have some non-important issues yet to solve on Swazoo and
Sport, just skip them for now. We can solve them later and in parallel
with porting Aida.


I think that one or two are really not important, related with the port of TimeStamp that don't exist in Cuis.

But I'm rewriting some Swazoo methods that use #fork and #forkAt: because in Cuis these methods do not return the process.

Juan explained me that is a thing discussed in Squeak list in a moment of a non trivial bug that was finally founded and solved by Andreas Raab (RIP). Seems that the recommendation is not use #fork and #forkAt:, instead use #newProcess, save it in a variable and then use #resume. In Cuis, #fork and #forkAt: return nil.

And the other problem is that I'm having some freezes in the image sometimes, after saved. I must try with a new, fresh image, installing all again, and debugging a bit.

I think that is not ready still, let me some more time to have the things working and repeteable between images.
 
Germán.


Best regards
Janko

>
>
> --
> Sincerely,
> Germán Arduino
> about.me/garduino <http://about.me/garduino>
>
> 2013/1/15 Robert Calco <[hidden email] <mailto:[hidden email]>>
>
>     I am highly interested in any port to Cuis.
>
>     I've had a chance to play with it and would prefer to work in it
>     with Aida over Pharo or Squeak. Simpler, smaller, more pleasurable
>     all the way around.
>
>     What are prerequisites that need to be added to Cuis to make it
>     feasible to port Aida for real-world applications?
>
>     Sport? Swazoo? Zinc?
>
>     - Bob
>
>     _______________________________________________
>     Aida mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
> <http://about.me/garduino>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida
>

--
Janko Mivšek
Svetovalec za informatiko
Eranova d.o.o.
Ljubljana, Slovenija
www.eranova.si
tel:  01 514 22 55
faks: 01 514 22 56
gsm: 031 674 565
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida




_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

Janko Mivšek


Dne 16. 01. 2013 12:10, piše Germán Arduino:

>     Perfect, hardly waiting on that :) Can you do a preliminary port of Aida
>     too (at least filein the code) , then send me a Cuis image to continue?
>
>
> Yes, sure, only tell me the exact version and packages that I should filein.

This Squeak script can help you to reconstruct exact packages and their
locations:

           i := Installer monticello http: 'http://smalltalkhub.com'.
           i     project: 'mc/Sport/Sport/main';
                 install: 'Sport-2.031'.
           i     project: 'mc/Swazoo/Swazoo/main';
                 install: 'Swazoo-2.3beta3.1'.
           i     project: 'mc/Aida/Aida/main';
                 install: 'Aida6.5-interim.2'.

>     Also, if you have some non-important issues yet to solve on Swazoo and
>     Sport, just skip them for now. We can solve them later and in parallel
>     with porting Aida.
>
>
> I think that one or two are really not important, related with the port
> of TimeStamp that don't exist in Cuis.
>
> But I'm rewriting some Swazoo methods that use #fork and #forkAt:
> because in Cuis these methods do not return the process.
>
> Juan explained me that is a thing discussed in Squeak list in a moment
> of a non trivial bug that was finally founded and solved by Andreas Raab
> (RIP). Seems that the recommendation is not use #fork and #forkAt:,
> instead use #newProcess, save it in a variable and then use #resume. In
> Cuis, #fork and #forkAt: return nil.

But on Squeak fork returns a process? Because there are no problems with
it running Swazoo on Squeak.

> And the other problem is that I'm having some freezes in the image
> sometimes, after saved. I must try with a new, fresh image, installing
> all again, and debugging a bit.

This could be the same bug as Pharo once had. Some semaphore related
(not enough VM semaphores available or something). Aha, I found the
original thread:

http://forum.world.st/Too-many-semaphores-image-blocked-tt3871970.html

Janko

>
> I think that is not ready still, let me some more time to have the
> things working and repeteable between images.
>  
> Germán.
>
>
>     Best regards
>     Janko
>
>     >
>     >
>     > --
>     > Sincerely,
>     > Germán Arduino
>     > about.me/garduino <http://about.me/garduino>
>     <http://about.me/garduino>
>     >
>     > 2013/1/15 Robert Calco <[hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>>
>     >
>     >     I am highly interested in any port to Cuis.
>     >
>     >     I've had a chance to play with it and would prefer to work in it
>     >     with Aida over Pharo or Squeak. Simpler, smaller, more pleasurable
>     >     all the way around.
>     >
>     >     What are prerequisites that need to be added to Cuis to make it
>     >     feasible to port Aida for real-world applications?
>     >
>     >     Sport? Swazoo? Zinc?
>     >
>     >     - Bob
>     >
>     >     _______________________________________________
>     >     Aida mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     http://lists.aidaweb.si/mailman/listinfo/aida
>     >
>     >
>     >
>     >
>     > <http://about.me/garduino>
>     >
>     >
>     > _______________________________________________
>     > Aida mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.aidaweb.si/mailman/listinfo/aida
>     >
>
>     --
>     Janko Mivšek
>     Svetovalec za informatiko
>     Eranova d.o.o.
>     Ljubljana, Slovenija
>     www.eranova.si <http://www.eranova.si>
>     tel:  01 514 22 55
>     faks: 01 514 22 56
>     gsm: 031 674 565
>     _______________________________________________
>     Aida mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida
>

--
Janko Mivšek
Svetovalec za informatiko
Eranova d.o.o.
Ljubljana, Slovenija
www.eranova.si
tel:  01 514 22 55
faks: 01 514 22 56
gsm: 031 674 565
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

garduino
Hi Janko:

2013/1/16 Janko Mivšek <[hidden email]>


Dne 16. 01. 2013 12:10, piše Germán Arduino:

>     Perfect, hardly waiting on that :) Can you do a preliminary port of Aida
>     too (at least filein the code) , then send me a Cuis image to continue?
>
>
> Yes, sure, only tell me the exact version and packages that I should filein.

This Squeak script can help you to reconstruct exact packages and their
locations:

           i := Installer monticello http: 'http://smalltalkhub.com'.
           i     project: 'mc/Sport/Sport/main';
                 install: 'Sport-2.031'.
           i     project: 'mc/Swazoo/Swazoo/main';
                 install: 'Swazoo-2.3beta3.1'.
           i     project: 'mc/Aida/Aida/main';
                 install: 'Aida6.5-interim.2'.


Yes, I need only the name of the Aida package (and localization) but now I know that is in SmalltalkHub.

 
>     Also, if you have some non-important issues yet to solve on Swazoo and
>     Sport, just skip them for now. We can solve them later and in parallel
>     with porting Aida.
>
>
> I think that one or two are really not important, related with the port
> of TimeStamp that don't exist in Cuis.
>
> But I'm rewriting some Swazoo methods that use #fork and #forkAt:
> because in Cuis these methods do not return the process.
>
> Juan explained me that is a thing discussed in Squeak list in a moment
> of a non trivial bug that was finally founded and solved by Andreas Raab
> (RIP). Seems that the recommendation is not use #fork and #forkAt:,
> instead use #newProcess, save it in a variable and then use #resume. In
> Cuis, #fork and #forkAt: return nil.

But on Squeak fork returns a process? Because there are no problems with
it running Swazoo on Squeak.


As Juan explained me is not that always will appear the bug, but when a process finish before to return it from fork, weird and not obvious things could happen.

This is the BlockClosure >>fork method in Cuis:

fork
    "Create and schedule a Process running the code in the receiver."
   
    "jmv - Do NOT answer the new process.
   
    See http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-February/124960.html
   
    Most times, this methods returns before resuming the new process (if priority of new process is less
    or equal than current). But it might return afterwards.
   
    This means it is very dangerous to use the returned process in code that stores it in some variable
    and checks for nil to start a new one. If this methods happens to return after the new process is forked,
    chances are the code that starts all this runs again, that variable is nil, and a second process is forked,
    perhaps breaking some shared state. This kind of bug is hard to spot and debug.
   
    Callers wanting the new process object, should call #newProcess, store the answer, and then #resume.
   
    A way to ensure this bug will not ever happen again is just to answer nil"

    self newProcess resume.
    ^nil


 
> And the other problem is that I'm having some freezes in the image
> sometimes, after saved. I must try with a new, fresh image, installing
> all again, and debugging a bit.

This could be the same bug as Pharo once had. Some semaphore related
(not enough VM semaphores available or something). Aha, I found the
original thread:

http://forum.world.st/Too-many-semaphores-image-blocked-tt3871970.html



mmm, seems that is not the same case.

Here the image is running normal, with or without Swazoo started (I've not loaded Aida yet) and lot of times happens that when I re-start the image (the next day) it load freezed.

Must investigate....

Germán.


 
Janko

>
> I think that is not ready still, let me some more time to have the
> things working and repeteable between images.
>
> Germán.
>
>
>     Best regards
>     Janko
>
>     >
>     >
>     > --
>     > Sincerely,
>     > Germán Arduino
>     > about.me/garduino <http://about.me/garduino>
>     <http://about.me/garduino>
>     >
>     > 2013/1/15 Robert Calco <[hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>>
>     >
>     >     I am highly interested in any port to Cuis.
>     >
>     >     I've had a chance to play with it and would prefer to work in it
>     >     with Aida over Pharo or Squeak. Simpler, smaller, more pleasurable
>     >     all the way around.
>     >
>     >     What are prerequisites that need to be added to Cuis to make it
>     >     feasible to port Aida for real-world applications?
>     >
>     >     Sport? Swazoo? Zinc?
>     >
>     >     - Bob
>     >
>     >     _______________________________________________
>     >     Aida mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     http://lists.aidaweb.si/mailman/listinfo/aida
>     >
>     >
>     >
>     >
>     > <http://about.me/garduino>
>     >
>     >
>     > _______________________________________________
>     > Aida mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.aidaweb.si/mailman/listinfo/aida
>     >
>
>     --
>     Janko Mivšek
>     Svetovalec za informatiko
>     Eranova d.o.o.
>     Ljubljana, Slovenija
>     www.eranova.si <http://www.eranova.si>
>     tel:  01 514 22 55
>     faks: 01 514 22 56
>     gsm: 031 674 565
>     _______________________________________________
>     Aida mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida
>

--
Janko Mivšek
Svetovalec za informatiko
Eranova d.o.o.
Ljubljana, Slovenija
www.eranova.si
tel:  01 514 22 55
faks: 01 514 22 56
gsm: 031 674 565
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida




_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

Janko Mivšek
Dne 17. 01. 2013 13:27, piše Germán Arduino:

>     This means it is very dangerous to use the returned process in code
> that stores it in some variable
>     and checks for nil to start a new one. If this methods happens to
> return after the new process is forked,
>     chances are the code that starts all this runs again, that variable
> is nil, and a second process is forked,
>     perhaps breaking some shared state. This kind of bug is hard to spot
> and debug.
>    
>     Callers wanting the new process object, should call #newProcess,
> store the answer, and then #resume.
>    
>     A way to ensure this bug will not ever happen again is just to
> answer nil"
>
>     self newProcess resume.
>     ^nil

So there is a portable workaround to create a process like p := Process
new, then put some executing block to it and lastly p resume? If so, we
can rewrite all Swazoo accordingly.

> Here the image is running normal, with or without Swazoo started (I've
> not loaded Aida yet) and lot of times happens that when I re-start the
> image (the next day) it load freezed.
>
> Must investigate....

Swazoo must be stopped before image shutdown and restarted after image
start and this is done by Sport's SpEnvironment
addImageShutdownTask:for: and addImageStartupTask:for:. Thoes Cuis
support this shutdown/startup functionality? Does SpEnvironment works
corretly here?




_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

garduino


2013/1/17 Janko Mivšek <[hidden email]>
Dne 17. 01. 2013 13:27, piše Germán Arduino:

>     This means it is very dangerous to use the returned process in code
> that stores it in some variable
>     and checks for nil to start a new one. If this methods happens to
> return after the new process is forked,
>     chances are the code that starts all this runs again, that variable
> is nil, and a second process is forked,
>     perhaps breaking some shared state. This kind of bug is hard to spot
> and debug.
>
>     Callers wanting the new process object, should call #newProcess,
> store the answer, and then #resume.
>
>     A way to ensure this bug will not ever happen again is just to
> answer nil"
>
>     self newProcess resume.
>     ^nil

So there is a portable workaround to create a process like p := Process
new, then put some executing block to it and lastly p resume? If so, we
can rewrite all Swazoo accordingly.



Yes, this is the recommendation of Juan and I agree with it. As soon as I can look into it again
(err, free time needed) I wll try to develop some bunch of compatible code and then I will comment
to your evaluation.


 
> Here the image is running normal, with or without Swazoo started (I've
> not loaded Aida yet) and lot of times happens that when I re-start the
> image (the next day) it load freezed.
>
> Must investigate....

Swazoo must be stopped before image shutdown and restarted after image
start and this is done by Sport's SpEnvironment
addImageShutdownTask:for: and addImageStartupTask:for:. Thoes Cuis
support this shutdown/startup functionality? Does SpEnvironment works
corretly here?




Good point, I will look into it asap.

Germán.

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Cuis Smalltalk Port

garduino
>>
>> So there is a portable workaround to create a process like p := Process
>> new, then put some executing block to it and lastly p resume? If so, we
>> can rewrite all Swazoo accordingly.
>>
>
>
> Yes, this is the recommendation of Juan and I agree with it. As soon as I
> can look into it again
> (err, free time needed) I wll try to develop some bunch of compatible code
> and then I will comment
> to your evaluation.
>

I published the announce of the first version, with detailed
explanation of the methods that I modified.

Any suggestion will be more than welcomed.


>
>
>>
>> > Here the image is running normal, with or without Swazoo started (I've
>> > not loaded Aida yet) and lot of times happens that when I re-start the
>> > image (the next day) it load freezed.
>> >
>> > Must investigate....
>>
>> Swazoo must be stopped before image shutdown and restarted after image
>> start and this is done by Sport's SpEnvironment
>> addImageShutdownTask:for: and addImageStartupTask:for:. Thoes Cuis
>> support this shutdown/startup functionality? Does SpEnvironment works
>> corretly here?
>>
>>
>
>
> Good point, I will look into it asap.
>

Shudtown/Startup functionality seems to work ok with SpEnvironment.

With all the tests green I failed to reproduce the freezing behavior
again, I will try more combinations.




--
Sincerely,
Germán Arduino
about.me/garduino
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida