Search the web
Sign In
New User? Sign Up
self-interest · Self Programming Language
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Webserver in Self   Message List  
Reply | Forward Message #1990 of 2146 |
Re: Webserver in Self

Hi everyone,

Thanks for your help.

I hacked up a small and extremely simple webserver based on the socketServer
code. The
transporter code goes in applications/. I'm not sure if I can attach it to an
email so I've put
it up on the web at:
http://russell-allen.com/self/downloads/files/webserver.self

File in with: bootstrap read: 'webserver' From: 'applications'
Setup default with: webserver registerServlet: (webserver exampleServlets
fileServlet copy)
At: ''.
Start with: webserver start
Go to: http://localhost:8080/

I'd appreciate it if anyone has a change to try to file it in and possibly
comment on how
'selfish' it is in style.

Some notes and comments I made while writing it:

- although I worked out how to write out a module from the materials, I had more
trouble
reading it in again. I eventually found a note on Jecel's site with the magic
incantation
(bootstrap read: 'webserver' From: 'applications'); I couldn't find a suitable
way to do it
from morphic.
- I was pleasantly suprised how nice Self morphic was for *writing* code (the
word isn't
quite right - it felt more like construction than writing)
- On the other hand, the inspectors were hard to *read* code with. My continual
question
was "What methods does a string understand anyway?" and "How do I open a file?";
it was
hard to answer this without opening millions of inspectors all over my nice
nebraskan
plain (plane?).
- I kept on writing stuff like "method: a = (|| a print )" and getting an error
because I
needed a space between the bars.
- syntax differences from Smalltalk I haven't yet internalised: the use of
capital letters in
message names, block notation; I kept writing: "[:k | k print]", slots between
the bars; I
kept writing "| var1 var2 | code"
- it was most frustrating that the inspectors for arrays/lists/dictionaries
showed the
normal slots and not a more useful view of what was actually in the collection

Cheers,

Russell

PS: I've just noticed that the Transporter has declared my code to be (c) Sun
and Stanford,
which it obviously isn't. Is there a way to change this?




Sun May 18, 2008 8:55 am

russell.allen23
Offline Offline
Send Email Send Email

Forward
Message #1990 of 2146 |
Expand Messages Author Sort by Date

Hi anyone who is listening :) I have been a lurker on this list for a very long time (under another email address) and I vaguely remember some mention of a web...
russell.allen23
Offline Send Email
May 13, 2008
3:10 pm

Russell, ... I don't remember any web server code. Squeak has several and it would be easy to borrow one, but depending on your needs it is probably not worth ...
Jecel Assumpcao Jr
jeceljr
Offline Send Email
May 14, 2008
10:34 pm

Hi Jecel, ... I guess that means that Self has all the necessary socket primitives etc? Could you share your web server code to give me some help in where to...
russell.allen23
Offline Send Email
May 15, 2008
12:39 am

Russell, ... Sorry, but it was trivial enough that I didn't bother saving it. I was exploring the various socket APIs in Self (I had never looked at them ...
Jecel Assumpcao Jr
jeceljr
Offline Send Email
May 16, 2008
11:28 pm

... I've just made 4.3, 4.2, and 4.1 available for download from (what I suppose is now) Self's new home on SourceForge: http://self.sourceforge.net (Thanks to...
Adam Spitz
adspitz
Offline Send Email
May 17, 2008
3:18 am

... It just occurred to me that perhaps you were thinking of the web *browser* that Dave wrote. I don't recall if it was part of a release....
mwolczko2
Offline Send Email
May 17, 2008
7:03 pm

Hi everyone, Thanks for your help. I hacked up a small and extremely simple webserver based on the socketServer code. The transporter code goes in...
russell.allen23
Offline Send Email
May 18, 2008
8:55 am

Russell, ... I don't think an attachment would have been a problem, but Yahoo probably wouldn't have saved it in the archives (at least not for very long) and...
Jecel Assumpcao Jr
jeceljr
Offline Send Email
May 19, 2008
11:33 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help