Iliad: a stupid question about "stateful"

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

Iliad: a stupid question about "stateful"

Bèrto ëd Sèra
Hi!

Stateful means (among other things) that each Iliad.Widget has an
instance per session, right? So if my localization stays in an
instance variable I'm safe to think that it will reach one and only
one remote user.

It kinda looks self-evident, but I thought I'd better double-check.

Berto

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Stefan Schmiedl
On Wed, 29 Jul 2009 20:34:39 +0300
Bèrto ëd Sèra <[hidden email]> wrote:

> Hi!
>
> Stateful means (among other things) that each Iliad.Widget has an
> instance per session, right?

I'm working from the premise that every session instance holds on to
it's own application instance, which in turn can reference as many
Widget instances, each with individual state, as necessary. For example,
in my OnlineTester app, a single test widget holds several exercise widgets,
each of which has several answer widget.

> So if my localization stays in an
> instance variable I'm safe to think that it will reach one and only
> one remote user.

yes. If you're keeping localization per widget, you can show LTR, RTL,
top-down and round-the-circle in one view belonging to one application
running in the one session associated with the one and only remote user
you'll have.... wait, that didn't come out right :-)

> It kinda looks self-evident, but I thought I'd better double-check.

write a test for it. It's good practice.

s.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Bèrto ëd Sèra
Hi!

> write a test for it. It's good practice.

I actually started to build the localization/layout prototype and then
suddenly got hit by this doubt. It's taking me a bit of time to bring
back the syntax (14 years of "pause" surprisingly did not delete any
of the basics, but they did swallow most of the things fingers "do by
themselves"), plus the fact that now I'm getting used to grep for
things instead of using a browser... and the syntax differences we
have here.

I actually like them all, but if you put them on top of an already
confused memory they can sometimes consume quite a bit of time. No big
trouble, in a couple of weeks I'll take the rust off my fingers. At
least I hope so :)

Berto

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Bèrto ëd Sèra
In reply to this post by Stefan Schmiedl
Hi!

> For example,
> in my OnlineTester app, a single test widget holds several exercise widgets,
> each of which has several answer widget.

In this app I am required to use widgets pretty much like Drupal
blocks, so that we can compose a "page" as a wall, by simply deciding
which brick goes where (no big deal, just a 3 column table with divs
in it). Some of the widgets will have to exchange data/commands (like
the search block showing it's result in another area and registering
the search in the search history, as translators often want/need to
double check things and it's easier if you have something quicker than
a back button).

Anyway, this is several weeks away from now. For the time being I need
to make sure I can register/login a user, change the GUI language and
the implied LTR/RTL rendering. When this root material works the rest
should come in quicker.

Berto

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Stefan Schmiedl
In reply to this post by Bèrto ëd Sèra
On Wed, 29 Jul 2009 23:17:10 +0300
Bèrto ëd Sèra <[hidden email]> wrote:

> I actually started to build the localization/layout prototype and then
> suddenly got hit by this doubt. It's taking me a bit of time to bring
> back the syntax (14 years of "pause" surprisingly did not delete any
> of the basics, but they did swallow most of the things fingers "do by
> themselves"), plus the fact that now I'm getting used to grep for
> things instead of using a browser... and the syntax differences we
> have here.

If you're running gst from git, head of master branch, you should
also be able to run visualGST, which could replace some of that grepping
with working implementors and sender tools ;-)

> I actually like them all, but if you put them on top of an already
> confused memory they can sometimes consume quite a bit of time. No big
> trouble, in a couple of weeks I'll take the rust off my fingers. At
> least I hope so :)

heh ... do I know what you're talking about ... happens to me all the
time, when old applications written in whatever I did that year
suddenly need to be updated.

s.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Bèrto ëd Sèra
Hi!

> If you're running gst from git, head of master branch, you should
> also be able to run visualGST, which could replace some of that grepping
> with working implementors and sender tools ;-)
No, I'm currently limited to blox, and that means I'm writing code on
kate and use blox just to inspect stuff at times, unless I want --eval
on gst-remote... I kinda use it to force myself to write code in text
files, istead of starting to "make images". I guess I'll leave it like
that for a while, at least until I haven't started to figure out at
least the basic details and got used to the new syntax.

Berto

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Stefan Schmiedl
In reply to this post by Bèrto ëd Sèra
On Wed, 29 Jul 2009 23:26:25 +0300
Bèrto ëd Sèra <[hidden email]> wrote:

> Some of the widgets will have to exchange data/commands (like
> the search block showing it's result in another area and registering
> the search in the search history, as translators often want/need to
> double check things and it's easier if you have something quicker than
> a back button).

shooting from the hip, here's what I'd do:

  user enters text in search box, submits

  request handling
    widget transmits search term to application (?)
    widget marks dependent widgets (result area, history) as dirty
    widget tells app to conduct search
      app stores term and results in history

  response handling: dirty widgets get rebuilt
    search widget keeps entered text
    result widget asks app for search result to display
    history widget asks app for last 20 searches
      uses search terms for link text
      uses callbacks to notify app of chosen search

SCNR,
s.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Bèrto ëd Sèra
In reply to this post by Bèrto ëd Sèra
Hi!

> does Kate highlight Smalltalk syntax?

AFAIK, no. But since when it does highlight stuff (like with SQL) it's
quite aprox in the result, I'm not sure I'd want to have it on .st's.
The one thing I *love* with kate is that I can save sessions of
hudreds of files and basically have everything at hand with no need to
open things each every 30 secs. But I'm afraid that's as far as her
charme goes :)

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Bèrto ëd Sèra
In reply to this post by Stefan Schmiedl
Hi!

> shooting from the hip, here's what I'd do:

Just pasted it into a Tomboy note... it's not really important that I
understand it all right now. It's important that there is a road to
get there. If there's a road, all it takes is time and will to get to
the result.

One more silly question, but not totally silly, after all. One of the
things that put off visitors of a site is that sometimes they *can*
have the GUI in their language, but in order to do so they have to
register in English. So, I was thinking that one of the things I could
translate was... the application path. English speakers (and spiders)
would find /index, while French speakers would find a /accueil etc...
It would look like lotsa sites, when in practice is just one, and it
would really cut away the language barrier most English-based sites
have on going abroad.

Now, if this was a large CMS, you'd probably not want to press too
much stuff in it for performance reasons, yet most small languages
could be grouped into one common mid-sized site like this. I say so
because I have loads of drupal installs to manage small language
communities and I really hate to work that much for so little traffic,
if I could have but a single admin place I'd feel *much* better. I
guess this would also help small languages in gaining web-space, since
most of the time people avoid implementing them because it's too much
work for the result.

Berto

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad: a stupid question about "stateful"

Stefan Schmiedl
On Thu, 30 Jul 2009 12:43:27 +0300
Bèrto ëd Sèra <[hidden email]> wrote:

> Hi!
>
> > This will work out of the box only as long as you have an ASCII based
> > transliteration of the link, I just tried defining a view method 'äöüß'
> > and it was not well received...
>
> This is a serious problem, because it also means that the dictionary
> cannot produce a sitemap with the words it contains.

How would the sitemap be organized? I don't see the reason why
it should fail. What I said above is that the built-in Iliad way
of mapping the part of the URL following the application base path
to a view method will not work immediately.

As far as I can tell, you need a non-empty base path for Swazoo, since
it registers your application for handling urls starting with that path.
So you'd have to live with a base url like

        http://example.com/dict

anyways. Take a look at Core/Dispatching/Dispatcher.st to find out
how you can get around this. It _might_ work to define an application
for each UI language, so that you can take advantage of the string
comparison used in applicationClassFor:.

> Among the first
> languages we have Arabic, Persian, Thao, Lao, Khmer, Japanese and
> Chinese... definitely no ASCII there. Even most western languages
> would be in trouble.

I don't think that it will be an insurmountable problem. You just
have to do it. It will be a nice addition to Iliad, when we found
something that works :-)

>
> > Come to think of it, I think there is a better way to do it.
> > IIRC, Joachim posted something about "show:onAnswer: ... there
> > http://smalltalk.gnu.org/blog/joe/iliad-show-onanswer
> > I need to check this out later.
>
> Hopefully it can solve the problem :) I cannot think of any easy way
> out, as AFAIK there is no apache rewrite rule that can manage to
> translit Chinese to Pinyin (chinese latin version), so that I could
> have a link in Chinese processed as an ASCII thing. Moreover, there is
> an ongoing process to allow non-ASCII domains, so if we think of using
> this code for a web-sites we will be confronted with the fact that
> full links will not be processable.

"Full" links aren't processed by Iliad, IIRC only the upper case parts
of the following pattern are:

        http://domain/APP/VIEW/rest/of/the/url

The dispatcher uses the APP part to discover the Iliad application
to handle the request, then uses VIEW to determine the method that
is to be called, I don't know what happens to the rest of the path.

Maybe Nico has a few insights for us.

s.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Fwd: Iliad: a stupid question about "stateful"

Bèrto ëd Sèra
one more case of wrong button... gotta drink more coffee...


---------- Forwarded message ----------
From: Bèrto ëd Sèra <[hidden email]>
Date: 2009/7/30
Subject: Re: [Help-smalltalk] Iliad: a stupid question about "stateful"
To: Stefan Schmiedl <[hidden email]>


Hi!

> How would the sitemap be organized?
Our "links" (actually paths, in Iliad terms) are the word itself, in
its original script (well, when it's a standard unicode script, we
won't export private codepoints, as per American Sign Language).
Pretty much like a wikipedia link. This is important, because engines
give a bonus to pages that have the term directly in the address. In
the end it will be something like "Iliad-sitemap". There is a good
sitemapping module in Drupal, I pretty much plan to do the basic
things it does. In the app specific side I'll have the added
possibility of deciding what to add in the meta info, like tags etc.,
but that's absolutely app-specific and cannot be included in a generic
high-level.

> the application base path
> to a view method will not work immediately.
Wait... so that means that maybe a REWRITE rule WOULD do the trick,
after all. What if the link www.example.org/словарь/земля rewrites to
www.example.org/interpret?перевод/земля? This would mean looking up
the first part of the command (перевод = translation), and at that
point you are done. You simply search the thing in the db an pull it
out.

Much in the same way you'd find that
www.example.org/заглавная_страница, www.example.org/intrada,
www.example.org/accueil all need to be understood as /index. You are
left with the problem of deciding which is which if and when two
languages use the same label to indentify 'index', but you can well
include in your localization software something that will signal to
people that their label is already assigned, so they can choose
another.

Would that do?

> I don't think that it will be an insurmountable problem. You just
> have to do it. It will be a nice addition to Iliad, when we found
> something that works :-)

Well, we are trying, aren't we? :)

Berto

--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.



--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement
viole les droits du peuple, l'insurrection est, pour le peuple et pour
chaque portion du peuple, le plus sacré des droits et le plus
indispensable des devoirs.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk