Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] Seaside for Dolphin 2.9.0-alpha4 available

21 views
Skip to first unread message

GallegO

unread,
Sep 23, 2009, 10:10:03 PM9/23/09
to
Hi list!

I'm very happy to announce the availability for download of Seaside
port for Dolphin Smalltalk.

http://www.infoil.com.ar/seaside

Inside of the distribution file you will find the installation
instructions. The installation is very straightforward so I think
there is not need of distributions like "one click image" ones.

*You should consider this port as, currently is, an alpha version.*

As you will see in the installation-readme file I have planed a road-
map for future releases. If anyone else can/want collaborate with the
port effort, please, email me :)

One of the major issues that should be fixed is the continuations
support. Although currently Seaside don't rely on Continuations to run
is better support them.
The actual "state of the art" on Squeak/Pharo are the
PartialContinuations implemented using a "stack overwrite" technique.
In Squeak/Pharo/VW looks very easy but I'm not sure if in Dolphin can
be achieved with the same simplicity. Sure that not...
For now I'm investigating alternative ways of simulation but again, if
anyone can put some light on this subject will be great.

Cheers
Sebastian Calvo

Eno

unread,
Sep 23, 2009, 11:02:04 PM9/23/09
to

Great, it runs smoothly on my system, thanks for your endless effort.

Still lacks something, class browser etc, as the readme mentioned, but
it really works so far so good, waiting for further enhancement from
alpha to beta ...

I think maybe SW can give you some support about his experience in
implementing continuation or partial one on Dolphin in his old edition.

best regards,

rush

unread,
Sep 24, 2009, 2:46:05 AM9/24/09
to
On Sep 24, 4:10 am, GallegO <fxgall...@gmail.com> wrote:
> Hi list!
>
> I'm very happy to announce the availability for download of Seaside
> port for Dolphin Smalltalk.
>
> http://www.infoil.com.ar/seaside

great!

> One of the major issues that should be fixed is the continuations
> support. Although currently Seaside don't rely on Continuations to run
> is better support them.
> The actual "state of the art" on Squeak/Pharo are the
> PartialContinuations implemented using a "stack overwrite" technique.
> In Squeak/Pharo/VW looks very easy but I'm not sure if in Dolphin can
> be achieved with the same simplicity. Sure that not...
> For now I'm investigating alternative ways of simulation but again, if
> anyone can put some light on this subject will be great.

Hmm.. I think I remember Andy stating DXP6 supports Continuations, but
at the moment I can not find the post now.

rush
http://www.cloud208.com/

Udo Schneider

unread,
Sep 24, 2009, 7:36:49 AM9/24/09
to rush
Rush,

> Hmm.. I think I remember Andy stating DXP6 supports Continuations, but
> at the moment I can not find the post now.

Dolphin does support continuations, you're right. It's just that Dolphin
(at the moment) "only" provides full (first-class) continutaions. These
are basically complete copies of the process including the complete call
stack.

Partial Continuations do only store a part of the call stack and are
appended (stack-wise) to the continuation calling "stack" later on. All
the details are here:
http://blog.fitzell.ca/2009/01/seaside-partial-continuations.html

The only bad thing is that Dolphins Process/Contect/Stack model is
totally different from the one used in Squeak/Pharo.

I'm currently messing around with those things and had some "fun" - I've
never had images chrashing so often like now ... let's see whether any
of us can succeed getting something like partial continuations on
Dolphin to fly.

CU,

Udo

rush

unread,
Sep 24, 2009, 10:07:39 AM9/24/09
to
On Sep 24, 1:36 pm, Udo Schneider <Udo.Schnei...@homeaddress.de>
wrote:

> Rush,
>
> > Hmm.. I think I remember Andy stating DXP6 supports Continuations, but
> > at the moment I can not find the post now.
> I'm currently messing around with those things and had some "fun" - I've
> never had images chrashing so often like now ... let's see whether any
> of us can succeed getting something like partial continuations on
> Dolphin to fly.


I guess there is much less difference between not having partial
continuations (but using full ones), and not having continuations at
all. So if we could have only full continuations support with not too
much effort, that would be a great thing.

rush
http://www.cloud208.com/

Dmitry Zamotkin

unread,
Oct 19, 2009, 4:07:58 PM10/19/09
to

There is a continuations fix for alpha4 port.

http://jump.fm/CYFLR

| package |
package := Package name: 'Seaside2.9-alpha4-patch'.
package paxVersion: 1;
basicComment: ''.

package basicPackageVersion: '0.001'.


package methodNames
add: #Process -> #continueWith:;
add: #WACallback -> #valueForField:;
add: #WARequestContext -> #destroy;
add: #WARequestContext -> #push:while:;
yourself.

package binaryGlobalNames: (Set new
yourself).

package globalAliases: (Set new
yourself).

package setPrerequisites: (IdentitySet new
add: '..\Object Arts\Dolphin\Base\Dolphin';
add: '..\003-Seaside2.9.0-a4\Seaside\Seaside-Core';
yourself).

package!

"Class Definitions"!


"Global Aliases"!


"Loose Methods"!

!Process methodsFor!

continueWith: anObject
"Private - Escape to the receiver with anObject as the continuation
value. Note that if the sender is being debugged, then we
must take over that debugger to continue the debugging session.

Reverted to original."

Processor activeProcess debugger
ifNil:
[self interruptWith:
[Processor returnValue: anObject toFrame: (self indexOfSP: self
basicSuspendedFrame)]]
ifNotNil: [:activeDebugger | activeDebugger continue: self with:
anObject].
Processor terminateActive! !
!Process categoriesFor: #continueWith:!helpers!public! !

!WACallback methodsFor!

valueForField: anObject
^anObject isNil
ifTrue: [String new]
ifFalse:
[anObject isString
ifTrue: [anObject asString "We need to decode string from Unicode
in Dolphin"]
ifFalse: [anObject isEmpty ifTrue: [String new] ifFalse: [self
valueForField: anObject first]] ]! !
!WACallback categoriesFor: #valueForField:!converting!public! !

!WARequestContext methodsFor!

destroy
"Release the memory referenced by the receiver. This is used to avoid
having tangling references hanging around and thus saving memory.

WARequestContext is destroyed in a bad moment now. We need it later
in continuations."

" self request destroy.
self response destroy.
handlers := request := response := codec := properties := nil"!

push: aRequestHandler while: aBlock
"Push the request handler aRequestHandler on the handler stack while
evaluating aBlock.

Wrong moment to remove handlers. They are still in use later."

handlers addFirst: aRequestHandler.
^aBlock ensure:
["handlers removeFirst"
]! !
!WARequestContext categoriesFor: #destroy!actions!public! !
!WARequestContext categoriesFor: #push:while:!actions!public! !

"End of package definition"!

"Source Globals"!

"Classes"!

"Binary Globals"!

--
Dmintry Zamotkin

GallegO

unread,
Oct 19, 2009, 6:07:29 PM10/19/09
to
Dmintry:

Continuations are not working yet.
I'm not sure about your patch but seems to be dangerous.
Please , do not consider this PATCH as a real solution.

Cheers
Sebastian

Dmitry Zamotkin

unread,
Oct 20, 2009, 5:51:07 AM10/20/09
to
> > Dmintry Zamotkin- Hide quoted text -
>
> - Show quoted text -

Hi, Sebastian,

Continuations ARE working after my patch.
Where do you see dangers? In reverting continunations to original
code? Or in two methods with premature unitialization?

GallegO

unread,
Oct 20, 2009, 9:44:17 AM10/20/09
to
Hi

> Hi, Sebastian,
>
> Continuations ARE working after my patch.

Well I have to say that I have not enough time to test the patch.

> Where do you see dangers? In reverting continunations to original
> code? Or in two methods with premature unitialization?

You are patching the framework code too, so you need to be careful.
After the patch, where you are freeing the resources?
Do you have check that there is no dangling processes or sockets?

Reverting #continueWith: to the Dolphin's original can add some extra
weird behavior.
Please find this group about this issue, related to 2.8 too.
The Seaside Continuations expected behavior is not run terminations
blocks for processes left when calling #continueWith: but, this is no
Seaside 2.8 so maybe your patch and reverting #continueWith: does well
the job :)

Sorry, I'have no time (by now) to ensure that all is working OK. Maybe
others can help.

Cheers
Sebastian

rush

unread,
Nov 12, 2009, 3:16:52 PM11/12/09
to
On Oct 19, 9:07 pm, Dmitry Zamotkin <zamot...@gmail.com> wrote:
> There is a continuations fix for alpha4 port.
>
> http://jump.fm/CYFLR
> Dmintry Zamotkin

Dmintry,

I have tried your patch, but WAFlowFunctionalTest fails (also anything
that calls inform: )

Though, I was not able to download the patch from the link you have
provided, so maybe there is something missing in the message?

thanks,

Davorin Rusevljan
http://www.cloud208.com/

rush

unread,
Nov 15, 2009, 3:37:36 PM11/15/09
to
Andy,

any chance you could look up how to correctly port continuations for
Seaside to Dolphin?

rush
http://www.cloud208.com/

rush

unread,
Nov 18, 2009, 6:10:20 PM11/18/09
to
> As far as I understood Sebastian the current port does support Unicode.
> The "only" thing missing is continutations based stuff (like #call: and
> #answer:). This is due to Dolphins missing /partial/ continuation support.

Ok, I was wrong to put unicode on wish list. What is not working is
call/answer stuff. Now I was under impression that call/answer stuff
can work when you have continuations, and that partial ones were
introduced only in 2.9 as an optimization, but if partial ones are not
available, the full ones would do, just like they did in older
versions of seaside. I might be wrong on all accounts :) but if I am
not, I would vote for call/answer with full continuations (which I
guess are, or could be supported by dolphin), instead of dropping call/
answer all together.

Other stuff that seems missing to me are various add ons, but ones
that make heads turn, like halos, beeing able to open class browser or
inspector in web browser, and change the code on the fly. It is
possible that this is also present in the current port but I have
missed them.

> However we are currently working on that issue. This involves a bit of
> stack-rewrite magic. We are currently in the process of trying to
> understand Dolphins Stack very thoroughly (which already provided a
> Debugger with a graphical stack viewer as a sideeffect ...). Currently
> it at least seems possible ... it's just that there is so little time.
> We'll keep you updated.

Udo, that are a great news, and I am very thankfull for your efforts.

rush
http://www.cloud208.com/

Udo Schneider

unread,
Nov 18, 2009, 6:48:29 PM11/18/09
to
rush,

> Ok, I was wrong to put unicode on wish list. What is not working is
> call/answer stuff. Now I was under impression that call/answer stuff
> can work when you have continuations, and that partial ones were
> introduced only in 2.9 as an optimization, but if partial ones are not
> available, the full ones would do, just like they did in older
> versions of seaside. I might be wrong on all accounts :) but if I am
> not, I would vote for call/answer with full continuations (which I
> guess are, or could be supported by dolphin), instead of dropping call/
> answer all together.

To make a long story short: Seaside 2.9/3.0 is designed to work with
partial continuations - full continuations are not used/supported anymore.

The bad news is that "full" continuations do not include partial
continuations - both are called continuations but their implementation
is a totally different beast.

A regular (full/first-class) continuation is basically a copied process.
If you create one what basically happens is that the current process is
copied and returned (wrapped as a Continuation). Thus if you activate
the continuation you got the calling process is terminated and the
copied suspended process is resumed.

This however created some problems with "external" entities. Let's
assume Seaside gets a new connection. Within that connection a
previously generated continuation is activated. What happens is that the
calling process is terminated and the copied one is resumed - however
the newly resumed process references the old socket it was created upon ....
So what Seaside 2.8 basically does is it uses a multitude of processes -
the process taking care of the socket is a different one than the one
doing the rendering ... and this zoo of processes is synchronized using
Semaphores, Mutexes and alike.

So you end up with a whole lot of processes and as each copied process
(continuation) is still carrying around the complete call stack (which
is not needed - only the frames up/down to the jump back in the socket
process are needed!) this also consumes a whole lot of memory as well.


So what are partial continuations? Partial continuations are basically a
copy of the stack frames making up the context. However not all stack
frames are copied - only those beginning at a specific marker are
copied. This marker is the connection point between the socket stuff and
"the rest".

So if you activate a partial continuation there is some stack-magic
involved rewriting the /current process' stack frames/. You are
basically attaching the partial continuation stack frames to the ones of
the process activating the continuations. So you end up with ONE AND THE
SAME (rewritten) Process, a whole lot less synchronization work and
lower memory consumption.

BTW: All the details are here:
http://blog.fitzell.ca/2009/01/seaside-partial-continuations.html

So what we are currently doing is find ways to rewrite the Dolphin stack
frames of a process to attach the partial continuation thingie. The
Pharo/Squeak guys had a "easy" job as Squeak models the activation
records/contexts as first-class objects. Dolphin's StackFrame is not a
first-class object ... it's a nice wrapper for Dolphins Process Stack
which is basically an ordered collection of "primitive" objects forming
the activation records.

It took us some time to understand the concepts (and BTW there are still
stack entries where we have no idea what they are all about!) of
Dolphins Stack Layout - but now (with some rough idea forming in our
head) it seems doable - if not for the time constraint :-)

> Other stuff that seems missing to me are various add ons, but ones
> that make heads turn, like halos, beeing able to open class browser or
> inspector in web browser, and change the code on the fly. It is
> possible that this is also present in the current port but I have
> missed them.

Most of these things require Seaside to be able to (temporarily)
exchange/wrap one component with another - unfortunately in most cases
this is realized by #call:/#answer: :-(

CU,

Udo

GallegO

unread,
Nov 18, 2009, 8:51:48 PM11/18/09
to
Rush:

On 18 nov, 20:10, rush <davorin.rusevl...@gmail.com> wrote:
> call/answer stuff. Now I was under impression that call/answer stuff
> can work when you have continuations, and that partial ones were
> introduced only in 2.9 as an optimization, but if partial ones are not
> available, the full ones would do, just like they did in older
> versions of seaside. I might be wrong on all accounts :) but if I am
> not, I would vote for call/answer with full continuations (which I
> guess are, or could be supported by dolphin), instead of dropping call/
> answer all together.

You are right. You can implement call/answer using full continuations
but currently the call/answer code rely on partial and, if you want to
change it, you should implement all the "answer continuation" stuff
that is really a weird thing. I don't want dig on that 2.8 code. Is
not spaghetti but really confusing to implement, you need a lot of
time and... for what...?

In Seaside 3 continuations are rarely used, at least in the core
packages, and you should expect to be replaced using ajax.

> Other stuff that seems missing to me are various add ons, but ones
> that make heads turn, like halos, beeing able to open class browser or
> inspector in web browser, and change the code on the fly.

Maybe you have disabled the halos. You should know that in Seaside 3
halos and walckbacks are disabled from the factory :)
Browsers and inspectors are working but not fully tested. You can
report errors to me or this list.

And for Magritte and Pier... I have ported Magritte a lot of time ago
as a "scratch edition" for an internal framework. Now is totally
modified and can generate Seaside and Dolphin MVP views dinamically
with, not the best look, but with 0 effort. If you don't need Pier
maybe an extension to the Dolphin's Aspect class is a better and a
fast choice than Magritte :)

You really need Pier in Dolphin?

Best Regards
Sebastian

rush

unread,
Nov 19, 2009, 10:35:30 AM11/19/09
to
On Nov 19, 12:48 am, Udo Schneider <Udo.Schnei...@homeaddress.de>
wrote:

> To make a long story short: Seaside 2.9/3.0 is designed to work with
> partial continuations - full continuations are not used/supported anymore.

darn, I am afraid that there is no relatively easy solution I was
hoping for :(

> It took us some time to understand the concepts (and BTW there are still
> stack entries where we have no idea what they are all about!) of
> Dolphins Stack Layout - but now (with some rough idea forming in our
> head) it seems doable - if not for the time constraint :-)

this point of figuring out the stack and manipulating it is where I
thought some help from OA might be a great enabler. But if you are
already at it, please do not let this stop you :)

> Most of these things require Seaside to be able to (temporarily)
> exchange/wrap one component with another - unfortunately in most cases
> this is realized by #call:/#answer: :-(

Yes, it also seems that way to me. While I often hear that Seaside
works just fine without continuations, I tend to disagree. Yes, it is
possible to write Seaside apps that do not use them, but even
significant number of seaside utils and demos do not work without
them. Not to mention examples from the Seaside book. Therefore I see
the statement "Seaside works without continuations" missleading, and
even to some extent a marketing gimmick, so that a list of supported
platforms gets longer, although on number of those platforms Seaside
is severely restricted. Though I agree that even such restricted
Seaside can, and does have its uses.

To make my point short, I am afraid if Dolphin is about to become
serious platform for Seaside development and/or deployment, it needs
continuations support.

Please do not take this as a critique of all work and effort that has
gone into Seaside port already, for which I am very thankfull!

rush
http://www.cloud208.com/

rush

unread,
Nov 19, 2009, 10:36:00 AM11/19/09
to
On Nov 19, 2:51 am, GallegO <fxgall...@gmail.com> wrote:
> Rush:

> In Seaside 3 continuations are rarely used, at least in the core
> packages, and you should expect to be replaced using ajax.

While I agree that continations are used much less, and probably even
less in the future, I do not agree that they are not cruical for full
Seaside port. Just clicking around the startup page with various
examples, reveals number of things that just do not work.

Heck, even if one takes Ajax example from the Seaside book and types
it in verbatim, it does not work since it relies on continuation in
save method (although it does not really need to do so). And while
here one can work around easily, there are places where there is no
easy replacement for #call: / #answer:

So without continuations, only a significantly restricted set of the
Seaside capabilities are available.

> with, not the best look, but with 0 effort. If you don't need Pier
> maybe an extension to the Dolphin's Aspect class is a better and a
> fast choice than Magritte :)

Yes connection between Aspects and Magritte is striking. But I am
interested in Magritte, as a piece of infrastructure that other
software (like Pier) builds upon.

> You really need Pier in Dolphin?

I think that loosely speaking one can look at Pier as unformal part of
the Seaside stack. It could be used either as a component within ones
Seaside App, or as a delivery platform and shell that can use ones
components and form a framework for the app. Both usages can be real
time savers in a number of situations.

So I do not think it is a must, but I think that it would be a very
good thing to have. And if we would have continuations, and Magritte,
it would probably be reasonably simple to port Pier.

rush
http://www.cloud208.com/

Udo Schneider

unread,
Nov 19, 2009, 10:49:12 AM11/19/09
to
Rush,

> this point of figuring out the stack and manipulating it is where I
> thought some help from OA might be a great enabler. But if you are
> already at it, please do not let this stop you :)

Let me put it that way - OA already helped a lot (the comments where
great) ... the limiting factor was/is my brain processing capacity :-)

[snip]


> the statement "Seaside works without continuations" missleading, and
> even to some extent a marketing gimmick, so that a list of supported
> platforms gets longer, although on number of those platforms Seaside
> is severely restricted. Though I agree that even such restricted
> Seaside can, and does have its uses.

IMHO you're absolutely right. I think Seaside w/o continuations is just
"regular" Web Development with Smalltalk syntax. The ability to control
the flow w/o having to think about page/session state is the one thing
which makes (IMHO) Seaside real Smalltalk-"Like". W/o this it' "just"
another framework.

> To make my point short, I am afraid if Dolphin is about to become
> serious platform for Seaside development and/or deployment, it needs
> continuations support.

Full ACK.

> Please do not take this as a critique of all work and effort that has
> gone into Seaside port already, for which I am very thankfull!

Fully understood and feeback is always appreciated.

CU,

Udo

0 new messages