Re: Macro code
From: John Santos (john_at_egh.com)
Date: 09/02/05
- Next message: JF Mezei: "Re: Hp Technology forum (New Orleans sept 12-15)"
- Previous message: Alan Winston - SSRL Central Computing: "Re: Macro code"
- In reply to: Neil Rieck: "Re: Macro code"
- Next in thread: Dave Froble: "Re: Macro code"
- Reply: Dave Froble: "Re: Macro code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 02 Sep 2005 00:19:48 GMT
Neil Rieck wrote:
> "Dave Froble" <davef@tsoft-inc.com> wrote in message
> news:11her0angaj8k57@corp.supernews.com...
>
>> gleason@encompasserve.org wrote:
>>
>>> In article <11he7rps3tb7mfb@corp.supernews.com>, Dave Froble
>>> <davef@tsoft-inc.com> writes:
>>>
>>>
>>>> Neil Rieck wrote:
>>>>
>>>>
>>>>
>>>>> Getting back to your question, if you are doing any low-level
>>>>> stuff like writing a device driver, then languages like C or
>>>>> BLISS are the only way to go. You would never use HP-BASIC to
>>>>> produce something like an Apache web-server. :-)
>>>>
>>>> 'Never' is a bit too strong of a word to use in the above.
>>>>
>>>> Basic could be used to implement a web server. There is
>>>> nothing like that now since most such software originates on
>>>> non-VMS systems.
>>>>
>>>
>>>
>>> HP Basic, with its excellent dynamic string handling
>>> capabilities, and easy and flexible interface to RMS files, seems
>>> like a natural for writing a web server...I'd pick it over C any
>>> day.
>>
>> All a web server is, is a program that accepts incoming connection
>> requests, grants a connection, and satisfy's requests. The
>> implementation should be rather easy. It's the specification of
>> what it should be set up to do that's the hard part. Uh.. make
>> that very hard part.
>>
>> I've done some services and clients that use sockets for
>> communication. Written in Basic and uses the system service
>> routines for socket communications. It's the sissy C programmers
>> that have to have a socket library. :-)
>>
>
>
> I've used BASIC to do quite a bit of work with TCPware (both Telnet
> and FTP) but realize that C does seem to have its place in
> Open-Source projects like Apache.
Much as I prefer BASIC over C, I think that HP BASIC is not thread-safe,
and threads seem to be a natural and efficient way to implement a web
server (though maybe you can do much the same thing just as efficiently
using ASTs.)
Also BASIC is not very good at creating dynamic objects. You have to
do tricks like allocate a string of the right size in one routine, then
pass the string to a function or subroutine that expects its arg to
be a record of the appropriate type. Or you have to pre-allocate all
your objects in enormous arrays (that might never be needed) and use
the array index to designate which thread should use it. (Or more
complex schemes where you create a smaller pool of objects as array
elements and set of routines to allocate and deallocate them, and then
worry about what happens when you run out...)
There is something to be said for object-oriented languages, or for
languages so primitive (like Macro-32 or C) that you can emulate OOL's
in them. :-)
> Neil Rieck Kitchener/Waterloo/Cambridge, Ontario, Canada.
> http://www3.sympatico.ca/n.rieck/
-- John Santos Evans Griffiths & Hart, Inc. 781-861-0670 ext 539
- Next message: JF Mezei: "Re: Hp Technology forum (New Orleans sept 12-15)"
- Previous message: Alan Winston - SSRL Central Computing: "Re: Macro code"
- In reply to: Neil Rieck: "Re: Macro code"
- Next in thread: Dave Froble: "Re: Macro code"
- Reply: Dave Froble: "Re: Macro code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|