Article View: comp.lang.java
Article #253Re: Advice to Java proponents (was Re: Will Java kill C++?)
From: Jan Steinman
Date: Sat, 13 Apr 1996 00:45
Date: Sat, 13 Apr 1996 00:45
65 lines
3402 bytes
3402 bytes
In article <316E2AD0.17C3@concentric.net>, alovejoy@concentric.net wrote:
> Gord Wait wrote:
> >
> > Rick DeNatale wrote:
> > >
> > > It doesn't bode well for the ultimate fate of a language when important
> > > things that people want to do with the language aren't provided in
> > > standard ways in the language...
...
> > One thing nice in the language is the easy TCP/IP hooks already there!
> > Since the base library set already includes "easy" TCP/IP support, java
> > just might live up to the title of king of the "networking" languages..
...
> Proud of the networking functions in the Java library, are we?
>
> VisualWorks Smalltalk has had such for quite a while now. Consider
> one of the example class methods of the class SocketAccessor...
[code deleted...]
Consider also that the code Alan posted (not blaming you, Alan -- I know
it wasn't yours) is extremely special-purpose, because the SocketAccessor
class tries to look as much like the C interface as possible. With a
little bit of effort, one can implement a nice abstract TCP framework in a
few days or so. My time server looks more like this:
ByTcpServer
defaultService: [:request |
request stream nextLongPut: TimeStamp now seconds]
forPort: 37.
(ByTcpServer forPort: 37) resume.
How about telnet?
ByTcpServer
defaultService: [:request | | stream |
(stream := request stream)
next: 6; "Discard garbage characters. They must be part of the
telnet protocol, but I'll ignore them for now."
nextPutAll: 'Smalltalk evaluation service -- '; nextPutAll:
request version; cr;
nextPutAll: 'WARNING: backspace is not handled!!'; cr;
nextPutAll: 'Type "self close" to end session'; cr;
nextPutAll: 'Smalltalk> '.
[stream
print: (Compiler silentEvaluate: stream nextLine for: stream); cr;
nextPutAll: 'Smalltalk> '] repeat]
forPort: 23.
(ByTcpServer forPort: 23) resume.
We also have an object service that we use for blasting ComposedTextViews
between images (among other thing) -- better than email!
We also have an ftpd that files out code on the fly, and an httpd that
allows browsing Smalltalk over the web. All of these servers run at the
same time in a single image.
Much of the code for this general-purpose server will be in the July issue
of The Smalltalk Report, and we hope to have it live on the web for people
to play with.
: Jan Steinman <mailto:Jan@Bytesmiths.com>
: Bytesmiths, the Smalltalk specialists <http://www.bytesmiths.com>
: "This is witty signature 1 of 47,288."
Technical Details
Message-ID:
<Jan-1204961943190001@news.magmacom.com>Path:
arc1-ca.pugleaf.net!news.magmacom.com!JanReferences:
<315BFB16.B74@isg.de> <4jgv6t$hon@kadath.zeitgeist.net> <4k3cdo$np5@taurus.adnc.com> <DpG1s1.GC9@research.att.com> <4k71f5$ot5@news2.ios.com> <31684F33.2528@ibm.net> <denatale-0804960926250001@grail1213.nando.net> <316DA213.767B@vdc.smos.com> <316E2AD0.17C3@concentric.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.magmacom.com!Jan From: Jan@Bytesmiths.com (Jan Steinman) Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk Subject: Re: Advice to Java proponents (was Re: Will Java kill C++?) Date: 13 Apr 1996 00:45:18 GMT Organization: Bytesmiths, the Smalltalk start-up specialists Message-ID: <Jan-1204961943190001@news.magmacom.com> References: <315BFB16.B74@isg.de> <4jgv6t$hon@kadath.zeitgeist.net> <4k3cdo$np5@taurus.adnc.com> <DpG1s1.GC9@research.att.com> <4k71f5$ot5@news2.ios.com> <31684F33.2528@ibm.net> <denatale-0804960926250001@grail1213.nando.net> <316DA213.767B@vdc.smos.com> <316E2AD0.17C3@concentric.net> Reply-To: Jan@Bytesmiths.com NNTP-Posting-Host: 206.116.214.1 X-Newsreader: Yet Another NewsWatcher 2.2.0b6