Kind-OT: cs books, lisp, threads and stuff (was Re: [OT] - REALBasic Claims 100K Users)
Andre Garzia
soapdog at mac.com
Wed Oct 4 18:04:02 EDT 2006
Dan,
yes, that much is true, anyone can simulate nested arrays. I've seen
solutions for that poping on the list every now and then.
As for threads. Yes we need them, and hard if we want to build
networked servers and fastcgi like daemons. I decided to use some of
my time every week to learn more about computer sciences, as many on
this list know, I have no formal education on this area except for
two years of engineering which gave me only 60 hours of computer
studies. Most of my coding is done in Rev, but I tend to think and
design things in terms of scheme which is a "dialect" of lisp. I
think in terms of lists and recursion and I really love scheme as
much as I love Rev.
I picked a couple books to read that teach me more about programming,
my first book which I am reading is Structure and Interpretation of
Computer Programs (everybody seems to call it SICP) which is a
wonderful book and then I'll move to some other scheme books. Why I
am doing that when I code almost full time in Rev and almost zero
time in Scheme? Because scheme is a very nice language to learn
concepts that I can apply later using some other language, and
because many of the book authors I like write books about CS using
lisp/scheme as the language for the examples.
What I am missing in Rev is continuations, I've tried to build them
but I can't. I know Dar Scott experiemented with some lambda-like
constructs but I could not even reach that point. If I had
continuations, I could save the state of a stack and its environment
and be able to re-use that state case I need. One might ask where
that is useful, and the answer is dead simple: Web Sessions. If we
could save a stack state, like a debugger snapshot, then we could re-
use it later, so we could save states for each web user and that
would provide a very easy way to manage the sessions, because it
would virtually need no management, just save the state when
answering the request and restore it when receiving it. With
something like that, we might even be able to do more useful web apps
before we get thread support. Heck, we can even fake threads using
such feature, save state, run one "thread", restore state, run "other
thread". Using this snapshots we can implement co-routines which are
always useful!!!
One way we could create a snapshot of the environment is by reading
"the variableNames" and saving everybody. Just by that we would get a
very easy session support. If we go further and examinate the
pendingMessages, the stacksInUse, the OpenStacks, the backscripts and
the frontscripts. Well, then we can have a wonderful session support.
The problem is that there's no way to probe the variableNames by
building a library, the thing must be hard-coded inside the handler
it is used. We can't access the variables in memory at a given time.
What I wanted to build is something that would make a code like this
possible...
on someHandler
...
put sessionStore() into gUniqueID
...
end someHandler
on otherHandler
...
sessionRestore gUniqueID
...
## do stuff...
end otherhandler
And sessionStore would be able to get the variables running from
someHandler. This is impossible, I don't know how the debugger does
it but I can't code it, I've tried it. I have my own session library
but it does not work like this in a way that would enable me to
implement the things I want.
Right now, I keep building my own solutions to problems all web
developers face. We can't take Ruby on Rails right now because we
don't have threads. We can't take seaside because we don't have
continuations (or futures or related technologies). We can build
plain CGIs which is cool and very powerful, but if we want to move
further we simply need some new things in the core revolution bag of
tricks. I still dream of a Rev version where I can use the construct
- send thisHandler to me in a new thread - but right now, we can't.
My dream is to create something like Userland Frontier, but without
threads or some other way to code around them, I simply can't
we also need more books... I learn code from books... I like them...
specially Dans! :-D
Cheers
andre
PS: ... and now, I am coding scheduling functions on fastcgi so that
I don't run into DDoS...
On Oct 4, 2006, at 6:39 PM, Dan Shafer wrote:
> Andre.....
>
> Threads we need. Nested arrays we can simulate.
>
> :-)
>
> Dan
>
>
> On 10/4/06, Andre Garzia <soapdog at mac.com> wrote:
>>
>> Now my only wish for Rev is NESTED ARRAYS AND THREADS!!!!! Sorry for
>> the all caps, I get emotional over this topics... :-)
>>
>> Andre
>>
>>
>>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dan Shafer, Information Product Consultant and Author
> http://www.shafermedia.com
> Get my book, "Revolution: Software at the Speed of Thought"
>> From http://www.shafermediastore.com/tech_main.html
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list