[6670] in Perl-Users-Digest
Perl-Users Digest, Issue: 295 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 13 23:07:35 1997
Date: Sun, 13 Apr 97 20:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 13 Apr 1997 Volume: 8 Number: 295
Today's topics:
AnyDBM_File examples? GDBM symbols? <zephyr@wesell.com>
Re: getting a single keystroke <rra@stanford.edu>
Re: getting a single keystroke (David Alan Black)
Re: How Do I... (A. Deckers)
Re: How to create a C extension with Win32 Perl? (Gurusamy Sarathy)
httpd server for win95 <goce@dcc.net.au>
Re: interpolate (Karl Glazebrook)
Interpolation of PRINTF strings (Matt Noel)
Re: lock file necessary? <andrew@erlenstar.demon.co.uk>
MIF File Generator (Kokopelli)
Re: Opening Files That Match *.TXT Wildcard - How? (Tad McClellan)
Re: Ousterhout and Tcl lost the plot with latest paper <Chris.Bitmead@alcatel.com.au>
Re: Reply to Ousterhout's reply (was Re: Ousterhout and (cosc19z5@bayou.uh.edu)
Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Rainer Joswig)
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <garrigue@safran.kurims.kyoto-u.ac.jp>
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <graham.matthews@maths.anu.edu.au>
Socket problem (Scott Luebking)
TK module <forster@hq.rnp.br>
Re: What cute software names are taken? (A. Deckers)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Apr 1997 01:24:48 GMT
From: "john z." <zephyr@wesell.com>
Subject: AnyDBM_File examples? GDBM symbols?
Message-Id: <01bc4868$860b08c0$03d4b7cc@pciii>
trying to use AnyDBM in the real world would have been easier if there
were any examples around: camel 2/ internet/ .. i am curious why the
following does not work:
@AnyDBM_File::ISA=qw(GDBM_File..);
use AnyDBM_File;
tie ($me,'GDBM_File','its.me',GDBM_WRCREAT);
the error comes in at run time because GDBM_WRCREAT is not defined. i could
get it to work only by using use GDBM_File; (which of course negates the
purpose
of AnyDBM_File) or forcing in the explicit value of WRCREAT (which is 2)
(but programs are not suppose to hardwire system constants).
so. how can one do a tie to a hash without having to know which DBMS is
available?
tks
------------------------------
Date: 13 Apr 1997 17:05:36 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: getting a single keystroke
Message-Id: <qum67xqjwof.fsf@cyclone.stanford.edu>
root [munged address] writes:
> David Black (dblack@icarus.shu.edu) gaves the solution I applied
> successfully to my own script:
>> use Term::ReadKey;
>> ReadMode 4; # go into raw mode
>> $key = ReadKey 0; #
>> ReadMode 0; # go back to normal
> This is less ugly and seems to work. But it's still bad -- four
> statements doing the work that should be done with a single getkey() and
> getting the user too involved in system issues that a high-level
> language should handle for him/her.
Note that you'd have to do the same work in C, for the same reasons.
Input under Unix is normally line-driven; you have to do work to get it
character-driven. Not very many languages will hide that work for you.
In your other post, you mentioned InKey$ in BASIC; I doubt that would work
as nicely under Unix either. And Perl comes from a Unix mentality.
The Perl code to do that is actually a lot shorter than most other
languages because of the Term::ReadKey library.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
------------------------------
Date: 14 Apr 1997 02:02:59 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: getting a single keystroke
Message-Id: <5is38j$4q1@pirate.shu.edu>
root@localhost.localdomain (root) writes:
>Thanks to all who responded to my question on getting a single character
>from the keyboard.
>David Black (dblack@icarus.shu.edu) gaves the solution I applied
>successfully to my own script:
>> use Term::ReadKey;
>> ReadMode 4; # go into raw mode
>> $key = ReadKey 0; #
>> ReadMode 0; # go back to normal
>This is less ugly and seems to work. But it's still bad -- four
>statements doing the work that should be done with a single getkey() and
>getting the user too involved in system issues that a high-level language
>should handle for him/her.
Well, you could do:
sub getakey {
ReadMode 4;
my $key = ReadKey 0;
ReadMode 0;
return $key;
}
$key = getakey();
(There are aspects of ReadMode 0's behavior I haven't mastered - in
particular, getting it restore to a raw state - but for most cases that
won't matter, so the above code should help you reduce the dreaded
multiple lines :-)
David Black
dblack@icarus.shu.edu
------------------------------
Date: 14 Apr 1997 00:47:11 GMT
From: Alain.Deckers@man.ac.uk (A. Deckers)
Subject: Re: How Do I...
Message-Id: <slrn5l2vkf.n59.Alain.Deckers@nessie.mcc.ac.uk>
In <01bc413f$bbb86420$adc32581@jkb>,
Jerry Bradenbaugh <bradenb@ibm.net> wrote:
>How do I access the user name and password fields from the dialog box
>prompted by restricting access to files or directories on a UNIX platform?
>
>I want to use the information as variables in another CGI Script.
Through the relevant environment variables, if they were defined, which
they're not (well, not both of them).
This question is not Perl-specific, and as such does not belong in
comp.lang.perl.*. Followups redirected accordingly.
HTH,
Alain
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl software: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<
------------------------------
Date: 14 Apr 1997 00:15:55 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: How to create a C extension with Win32 Perl?
Message-Id: <5irsvr$boh$1@news.eecs.umich.edu>
[ mailed and posted ]
In article <5ir29u$iv3@clarknet.clark.net>, McWilliams <len@clark.net> wrote:
>
>My configuration is as follows: NT 4.0 Server, Perl 5.003_7 build 303,
>Visual C++ 4.0, gnu-win32.
>
>Could someone tell me, or direct me to, an outline of steps I need to
>follow to build an extension.
I can't help with creating an extension using the Activeware perl
(since I don't use it).
However, you can do this now with the upcoming perl 5.004 (get the
beta if you are curious). The downside is that none of the Win32::*
extensions are ported back to MakeMaker friendly modules yet, so
you'll have to do without them. The upside is that you can build
and install most CPAN modules out of the box with nmake.
There may be some rough spots left still, but the steps with
5.003_97d(a beta of 5.004) and Visual C++4.0 on WindowsNT run
something like:
[e:\build]gzip -c -d perl5.003_97d.tar.gz | tar xmf -
[e:\build]cd perl5.003_97d\win32
[e:\build\perl5.003_97d\win32]nmake
<...wait while perl builds...>
[e:\build\perl5.003_97d\win32]nmake test
<...testsuite runs smoothly...>
All tests successful.
Files=152, Tests=3984, 124 secs ( 0.00 cusr 0.00 csys = 0.00 cpu)
cd ..\win32
[e:\build\perl5.003_97d\win32]nmake install
<...stuff gets put under C:\PERL...>
[e:\build\perl5.003_97d\win32]set PATH=C:\PERL\BIN;%PERL%
[e:\build\perl5.003_97d\win32]cd ..\..
[e:\build]h2xs -n MyModule
Writing MyModule/MyModule.pm
Writing MyModule/MyModule.xs
Writing MyModule/Makefile.PL
Writing MyModule/test.pl
Writing MyModule/Changes
Writing MyModule/MANIFEST
[e:\build]cd MyModule
[e:\build\mymodule]perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for MyModule
[e:\build\mymodule]nmake -nologo
mkdir blib
mkdir blib\lib
mkdir blib\arch
mkdir blib\arch\auto
mkdir blib\arch\auto\MyModule
mkdir blib\lib\auto
mkdir blib\lib\auto\MyModule
mkdir blib\man3
cp MyModule.pm blib\lib\MyModule.pm
AutoSplitting MyModule (blib\lib\auto/MyModule)
<...>
MyModule.C
"Running Mkbootstrap for MyModule ()"
<...>
link -out:blib\arch\auto\MyModule/MyModule.dll -dll ...
Creating library blib\arch\auto\MyModule/MyModule.lib and obj...
<...>
[e:\build\mymodule]nmake install
<...>
Good luck.
- Sarathy.
gsar@umich.edu
------------------------------
Date: Mon, 14 Apr 1997 11:25:55 +1000
From: Goce Dimitroski <goce@dcc.net.au>
Subject: httpd server for win95
Message-Id: <335187A3.203A@dcc.net.au>
where can i get a httpd server for win95 so that i can test out my cgi
stuff ?
------------------------------
Date: 14 Apr 1997 00:15:36 GMT
From: kgb@jach.hawaii.edu (Karl Glazebrook)
Subject: Re: interpolate
Message-Id: <5irsv8$t5g@news.Hawaii.Edu>
In article <5iggto$sf5@pirate.shu.edu>, dblack@icarus.shu.edu (David Alan Black) writes:
>
>>can't you put a place holder like: $orig = 'The file has <num> lines.';
>
>>then maybe something like so:
>
>>sub interpolate
>>{
>>return s/<([^>]+)>/${$1}/g;
>>}
>
>or just replace $vars with their values:
>
>sub interpolate {
> my $string = shift; # You do need something like this :-)
> $string =~ s/\$([\S]+)/$$1/g;
> $string;
>}
>
>except replace the regex with something which more intelligently
>distinguishes among different $ expressions which might be
>in your data.
>
>David Black
>dblack@icarus.shu.edu
>
Placeholders? Use sprintf! e.g.:
$new = sprintf 'The file has %s lines.',$num;
- Karl
------------------------------
Date: Mon, 14 Apr 1997 00:44:26 GMT
From: mgn00@eng.amdahl.com (Matt Noel)
Subject: Interpolation of PRINTF strings
Message-Id: <E8LrE2.H9I@ccc.amdahl.com>
I'm trying to read printf strings from a file to be printed out
later. I found that generally this works, but things like \n don't
work, they just print as \n.
Suggestions?
The code that reads the strings from a file looks like this:
if(open(MSG,"<$MsgFile")) {
while(<MSG>) { # Read message definitions
if(/^\s*\#define\s*(.*)\s+(0x[0-9a-fA-F]+)/ ||
/^\s*\#define\s*(.*)\s+([\d]+)/) {
$MsgString=$1;
$MsgCode=$2;
if($MsgCode=~/^0x/) {
$MsgCode=sprintf("%x",hex($MsgCode)); # Force into a hex string.
}
else {
$MsgCode=sprintf("%x",$MsgCode); # Not hex, make a hex string.
}
$Messages{$MsgCode}="$MsgString";
}
}
close(MSG);
$WhatMapOpened.="and '$MsgFile' for message strings.\n";
}
And I use the string like this:
if(defined($Messages{$PFid})) {
$MsgString=$Messages{$PFid};
}
else {
$MsgString="Msg Code '0x$PFid' unknown, parms: %x %x %x %x %x %x";
}
$PFrslt=sprintf("$MsgString\n",
$PFv1,$PFv2,$PFv3,$PFv4,$PFv5,$PFv6);
--
Matt Noel mgn00@eng.amdahl.com
Amdahl Corporation Phone (408) 746-6283
------------------------------
Date: 14 Apr 1997 00:42:00 +0100
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
Subject: Re: lock file necessary?
Message-Id: <87208eij7b.fsf@erlenstar.demon.co.uk>
>>>>> "Randal" == Randal Schwartz <merlyn@stonehenge.com> writes:
Randal> "According to some standard." That's what I like about standards,
Randal> there are *so* many of them to chose from. Thus, on some machines,
Randal> this standard is *not* followed. And therefore, to be safe, one must
Randal> seek() after locking, or you'll get bitten some day.
Any Unix-like system where lseek() has any effect at all on writes to files
opened with O_APPEND is broken. End of story.
--
Andrew.
comp.unix.programmer FAQ: see <URL: http://www.erlenstar.demon.co.uk/unix/>
------------------------------
Date: Mon, 14 Apr 1997 02:45:03 GMT
From: kokopelli@radix.net (Kokopelli)
Subject: MIF File Generator
Message-Id: <5is5nf$2oo_004@kokopelli.radix.net>
I am looking for an example script, perl program, or piece of C code that will
generate system information from a unix machine (Sun - Solaris) and put it
into a standard MIF file. Information would include machine name,
version, etc.
Anyone have an example or have a reference site? I know about www.dmtf.org,
but they don't specifically focus on Unix machines.
Thanks,
////
(o o) E-Mail: kokopelli@radix.net
--o0O--(_)--O0o--
| / / ___ | |__ ___ ___ ___ | || |<_>
| \ / . \| / // . \| . \/ ._>| || || |
|_\_\\___/|_\_\\___/| _/\___.|_||_||_|
|_|
------------------------------
Date: Sun, 13 Apr 1997 17:53:11 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Opening Files That Match *.TXT Wildcard - How?
Message-Id: <n4ori5.up3.ln@localhost>
Frank Fisher (frank@primemail.com) wrote:
: What can I use to read in all files that match *.txt and then perform
: operations on them in a perl script?
: $files = <>; reads in all of the files from the command line but it
: also reads the contents of each file too. I only want to read in all
: of the matching wildcard filenames so I can open each file and perform
: some edit operations on them.
: For example, if I have the following files
: 1.txt
: 2.txt
: 3.txt
: I'd like to start my script like this:
: unix prompt> perl modify.pl *.txt
: and inside the script:
: open 1.txt for read
: read into some variables
: edit some of those variables
: open 1.txt for write
: print variables out (update the file)
: close file
: loop to get next .txt file (2.txt and then 3.txt)
: and have the script exit after opening all three .txt files
: All I could see in my perl book was the $file = <>;
while ($fname = shift) { # or walk through the @ARGV array instead...
open(TXT, $fname) || die "could not open $!";
@whole_file = <TXT>; # read into some variables
# edit some of those variables
close(TXT);
open(TXT, ">$fname") || die "could not open $!";
print TXT @whole_file; # print variables out (update the file)
close(TXT);
}
: Thanks for any help...
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 14 Apr 1997 10:44:40 +1000
From: Chris Bitmead <Chris.Bitmead@alcatel.com.au>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <s6yafn25t6v.fsf@aalh02.alcatel.com.au>
Russ McManus <mcmanr@nytrdc058.eq.gs.com> writes:
> however, i think the situation looks more like this:
>
>
> g | .
> l |
> u | .
> e | * * <--stk, e.g.
> i | ^ .
> n | | c++
> g | | . |
> | tcl . |
> e | . v
> a | .
> s | . * .
> e |
> +-----------------------------
> language power ->
Don't know why you would say scheme is less powerful than c++. I would
graph it like this...
g |
l |
u |
e | * * <--stk, e.g.
i | ^
n | |
g | |
| tcl
e |
a | c++
s | *
e |
+-----------------------------
language power ->
------------------------------
Date: 14 Apr 1997 00:07:35 GMT
From: cosc19z5@Bayou.UH.EDU (cosc19z5@bayou.uh.edu)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <5irsg7$f7u@Masala.CC.UH.EDU>
John Ousterhout (ouster@tcl.eng.sun.com) wrote:
: In article <5imhdo$hvj@Masala.CC.UH.EDU>, cosc19z5@Bayou.UH.EDU (cosc19z5@bayou.uh.edu) writes:
[Snip]
: |> I find it very interesting that you ignored all these interesting
: |> posts, and when you chose to followup, you chose a followup where
: |> you cut everything except one passage that necessitated nothing
: |> more than a smug response on your behalf.
: |>
: |> You know, if I didn't know any better I'd say you were avoiding
: |> the other posts. I wonder why?
: I would be delighted to debate this topic in a moderated forum where we can
: keep the discussion on track, such as a conference panel discussion.
: Unfortunately, it isn't really possible to sustain a coherent debate on
: a hot topic via unmoderated newsgroups. The discussion very quickly fragments
: into dozens of sub-topics that drift off the main thread of discussion. I'm
: too swamped to respond to each of the hundreds of arguments that have been
: made (many of which do have merit), and if I did, each of those responses
: would generate 30 more counter-responses that would be even harder to
: respond to.
The problem however was not that you decided to avoid all the
posts, but rather chose a portion of one post to mock, an action
which in all frankness, tends to cast more than a little doubt
on the above claims. If anything this action will generate more friction
against you, because it honestly makes it look like you are not
capable of discussing these issues.
The fact that it was my post you mocked was not a problem. I made
a very stupid comment (possibly the dumbest on this thread thus far)
and I deserve all the mockery I could get. What bothered me was
how you just cavalierly ignored the postings of others and the rest
of my post as if they did not matter. They did.
: When the topic first arose I tried to collect the most common
: arguments, and I've posted a couple of articles that responded to them.
That was a good move, at least you addressed the problems, and to be
honest with you, I was actually on the fence at the time. I am not
a fan of Tcl, but at the same time I did have some respect for you and
seeing you make an attempt at addressing the problems delighted me.
At least you were willing to talk. At least it didn't look like you
were trying to avoid the issue.
: After
: that, things just got too fragmented for me to respond in a meaningful way.
: Witness your message, where you put forth a corporate conspiracy theory
: instead of a technical argument, and this message, where we're arguing about
: whether I've responded enough, rather than the technical issues. I am reading
: all the messages, though, and I'll try to respond to some of the arguments
: when I revise the white paper over the next couple of weeks.
Again a good move, and I applaud you for endeavoring to respond to the
good points made by others. However please pay attention to what I
was specifically saying. Your inability to respond to all the posts in
a detailed manner is natural, there were a lot and you are a busy man.
What was disturbing was the fact that the post you chose to respond to,
or the piece of the post you chose to respond to was probably among
the most ill-considered (if not _THE_ most ill-considered) things said
in this thread. It was so ill-considered that few took it seriously and
it was the kind of testament to paramount ignorance that others were
more than happy to exploit. Leaving it alone in favor of addressing
at least one more important point, rather than using it as an opportunity
to mock what was already a self-mocking post made you seem uncaring
and may have cost you support.
: Or, look at it this way: if I don't respond then you get the last word :-)
:). I don't know about others, but I'm honestly interested in seeing
a meaningful discussion addressing these issues. This isn't a win-loss
scenario for me. Scheme is not my favorite language, but I do feel
that there is serious merit in what is being said, and at least talking
about this with you, even if you don't budge (but at least truly consider
and talk about the problems in earnest), is something that I feel
will ease many tensions, and perhaps enrich us all. Ok, a corny line
but a true one IMHO :).
PS: Feel free to add this post to the list of "ignore" postings so that
you may at least have one less post to worry about. :)
Thank you very much.
--
Cya,
Ahmed
------------------------------
Date: Mon, 14 Apr 1997 02:53:45 +0200
From: joswig@lavielle.com (Rainer Joswig)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <joswig-ya023180001404970253450001@news.lavielle.com>
In article <5irm6s$ith@roar.cs.utexas.edu>, wilson@cs.utexas.edu (Paul
Wilson) wrote:
> >I think this is what was responsible for the diminishing influence
> >of Lisp... It's all-or-nothing, violating the principle "interoperate
> >or die."
What "Lisp" is he taking about? "Lisp" is a family of languages.
Some of the Lisp-dialects/implementations are extremely good as embedded
languages,
others can be used as tiny scripting languages, some work
good as application building languages, some have been
used as system programming languages, others use it for macro
assemblers, ...
It's like talking about Pascal - when it is Modula 2, Oberon, Ada 95, ISO
Pascal,
VAX Pascal, Algol 68, Simula, SAIL, ...
> For the purposes of embeddable scripting languages a la Tcl, Lisp
> is a tiny, elegant little language which is extremely powerful
> and extensible. (For example, take a look at AutoLisp.)
Which never has been modernized or got notable support from Autodesk.
Still people are using it.
> In defending Lisp, it's probably best in this context to focus on the
> fact that it can be tiny and very flexible, but also to point out that
> you can have a larger Lisp and a cool integrated environment _if_
> that's what you want.
Ultimatively if you want the integrated environment (and *I* *want* *it* -
and it better be based on objects and functions, not on text files
or string processing) Common Lisp scales and gives maximum reuse.
> (Sort of off the point, it's probably good point out that Lisp
> can have a "normal-looking" syntax, like Pop, and early Lisps often
> provided this.
Recent examples are Python, NewtonScript and Dylan (from their
semantics these are Lisp-like languages - who cares about the syntax?).
Even AppleScript owes a lot to Lisp.
> An earlier poster railed against Lisp hypesters who sell people a bill
> of goods, sticking them with huge bloated languages and environments
> that don't solve people's real problems. That was unfair. There
> was a lot of hype about Common Lisp in the 80's. Some of the hype
> was true, and Common Lisp did have many wonderful aspects, but Common
> Lisp failed partly for marketing reasons. Some of the hype really was
> just hype, and Common Lisp failed partly for technical reasons.
The largest problem I see, that for some reason some Lisp-based software
has died out. If Symbolics Genera were not bound to Lisp hardware ( 5-8 MIPS
Ivory in 1989 or emulation on 64 bit processors with 20 MIPS?, who are not
common even nowadays), we were using successors (without the bloat)
today on machines almost a hundred times faster (300 Mhz PPC for home
use real soon, 161 Mhz ARM in the Newton, 500 Mhz Alpha, ...) than the
original Lisp machines. Guess what you would get - an integrated killer
environment. We would have real command processors, real dynamic environments,
more productivity, more reuse, decent error handling, delivery
updateable with small patches (instead of multi MB alpha versions), ...
The Newton OS is a small scale example of this, with real end users
as its target - people who would not know how to use a computer.
Still at its heart it's (persistent) objects ("frames"), functions (even
closures),
tagged data, interactive development, command interpreter ("assist"),
error handling, generic networking, virtual machine,
late binding, ... running really fast with four AA batteries on a
161 MHz StrongARM chip.
> Lisp fans in this thread have sometimes been derided as "Lisp bigots"
> but I don't see a lot of that. Most of us are just pointing out that
> even if you find parentheses scary, or are afraid your customers
> will, there are some aspects of Lisp (and especially Scheme) that are
> very appealing for scripting languages as well as general purpose
> programming. Many of the things that motivate scripting languages
> motivated the design of Lisp and Scheme.
Scheme is surely a possibility for a scripting language in
a hostile environment (Unix as an example -> Guile, scsh). In an integrated
Common Lisp environment (Genera, MCL, LispWorks) CL does all what I want.
> You don't have to like Lisp, but any good language designer must
> learn from it, as the designers of many languages (e.g., Smalltalk,
> ML, Java) have done.
What a some people overlook is the root of Lisp: Lambda Calculus. The
foundation in an elegant mathematical formalism makes the difference
between a well designed language and an ad-hoc language.
> And even if you don't like Common Lisp in particular, you can still learn
> from it. For example, it appears that many scripting language advocates
> were surprised to learn that Common Lisp has keyword arguments, which
> lets you do terse scripting if you pick short identifiers---just like
> Tcl, "only better" (in most Lisper's views).
For the CL hacker, Common Lisp is already a solution to interactive
programming and "scripting".
For *end* users with programming needs (example -> multimedia programmers) one
may want to provide some very different syntax (example -> SK8Script,
sk8.research.apple.com). Still you don't need to represent everything
as a string.
(hey, my Mac hasn't crashed for three days!)
--
http://www.lavielle.com/~joswig/
------------------------------
Date: 14 Apr 1997 10:35:19 +0900
From: Jacques GARRIGUE <garrigue@safran.kurims.kyoto-u.ac.jp>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <l2n2r29yjs.fsf@safran.kurims.kyoto-u.ac.jp>
hbaker@netcom.com (Henry Baker) writes:
> There are far more ugly programs than ugly languages. Using a 'good'
> language does not guarantee pretty programs. In fact, since a 'good'
> language has immense power, it is possible to write uglier
> programs in a 'good' language, than it is to write ugly programs in
> a 'bad' language. This, of course, is one of the justifications I've
> seen for forcing people to write in 'bad' languages !!
A very interesting comment it is. I mean, the second part, since I
suppose there is no discussion on the first part.
My experience is that this is a little bit true: yes, "good" languages
(for me, ML) protect you against bugs, and as a result you become much
less careful about how to avoid them.
But that is mostly false:
* as long as you write in a "good" language, you are safe. Being able
to write ugly program just means that you can write prototypes much
faster. You may have to rewrite things once in a while, but this is
also very fast: in "good" languages, copy-paste works.
* if you go back to an "ugly" language, then you are quite bad for a
while. But then you are so much shocked than either you completely
stop using such languages, or you become extremely careful when using
them, commenting everything, like you would do in assembler.
* finally, having learnt an "ugly" language is, in my opinion, of no
use when using a "good" one. You keep on trying to use tricks needed
in low-level languages, whereas you could write it in a
straightforward way in a high-level one.
True, for many reasons there are times you have to write in an "ugly"
language. But I feel better when this is as rare as possible.
Jacques
---------------------------------------------------------------------------
Jacques Garrigue Kyoto University garrigue@kurims.kyoto-u.ac.jp
<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>
------------------------------
Date: Mon, 14 Apr 1997 12:04:48 +1000
From: Graham Matthews <graham.matthews@maths.anu.edu.au>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <335190C0.7613@maths.anu.edu.au>
Rainer Joswig wrote:
> [lotsa stuff on Lisp and lambda calculus]
> Still you don't need to represent everything
> as a string.
Surely you are not suggesting everything as a function :-) :-) [smileys
again for the humour impaired]
graham
--
This ain't no technological breakdown
Oh no, this is the road to hell
------------------------------
Date: Mon, 14 Apr 1997 00:54:28 GMT
From: phoenixl@netcom.com (Scott Luebking)
Subject: Socket problem
Message-Id: <phoenixlE8Lrus.GBr@netcom.com>
Hi,
I'm trying to set up a client for the web and am using the code below.
For some reason, the code just hangs in the connect and never returns.
Is there something I'm missing?
Thanks very much,
Scott
----------------------------------------------------------------------------
require 5.003;
use Socket;
package main;
$networkProtocolName = "tcp";
($dummy1, $dummy2, $networkProtocolId)
= getprotobyname($networkProtocolName);
$sockAddrTemplate = 'S n a4 x8';
$fileHost = "www.yahoo.com";
$filePort = 80;
# create socket
eval
{
($dummy1, $dummy2, $dummy3, $dummy4, $localHostAddress)
= gethostbyname('localhost');
(($dummy1, $dummy2, $dummy3, $dummy4, $fileHostAddress)
= gethostbyname($fileHost))
|| die "Get host error: $!";
socket(SERVER, &PF_INET, &SOCK_STREAM, $networkProtocolId)
|| die "Socket error: $!";
bind(SERVER, pack($sockAddrTemplate, &AF_INET, 0, $localHostAddress))
|| die "Bind error: $!";
print STDERR "HERE\n";
connect(SERVER, pack($sockAddrTemplate, &AF_INET, $filePort, $fileHostAddress))
|| die "Connect error: $!";
print STDERR "HERE2\n";
# set for unbuffered server socket
$oldFileHandle = select(SERVER);
$| = 1;
select($oldFileHandle);
};
if("$@" ne "")
{
print STDERR "$@\n";
}
--
Scott Luebking
phoenixl@netcom.com
------------------------------
Date: Sun, 13 Apr 1997 15:43:06 -0300
From: Antonio Paulo Salgado Forster <forster@hq.rnp.br>
Subject: TK module
Message-Id: <Pine.SOL.3.95.970413153336.20572A-100000@colibri.hq.rnp.br>
Hello!
Could someone point me to a very good tutorial about Tk Module? I've never
worked with Tk before.
TIA
Antonio Paulo Salgado Forster
Operacoes em Redes - RNP
------------------------------
Date: 14 Apr 1997 00:50:32 GMT
From: Alain.Deckers@man.ac.uk (A. Deckers)
Subject: Re: What cute software names are taken?
Message-Id: <slrn5l2vqo.n59.Alain.Deckers@nessie.mcc.ac.uk>
[followup set]
In <ken-0904971131460001@news.swarthmore.edu>,
Ken Williams <ken@forum.swarthmore.edu> wrote:
>Hi there-
>
>Let's say I've written some software, and I want to give it a cute name,
>but I don't want to give it a name that's already taken. Does anybody
>know of any on-line resources where I can check the availability of names
>(I guess it might be a list of names of programming languages, software,
>etc.)?
Unless you propose to implement a database of such names in Perl, I fail
to see how this question is relevant to the comp.lang.perl.misc group.
;-)
>Thanks.
>
>-Ken Williams, The Math Forum
> ken@forum.swarthmore.edu
Eh, I actually like that bit of software.
Cheers,
Alain
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl software: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 295
*************************************