Perl 1.0? 92
James A. A. Joyce writes "The title says it all. There's a tiny blurb over at dev.perl.org.
Download Perl 1.0 here, for all of those nostalgics in the Slashdot audience! It's only 263KB, so why not give this piece of 1980s computing history a try?"
Quote in the bottom of my slashdot main page (Score:1, Interesting)
Re:Quote in the bottom of my slashdot main page (Score:2, Insightful)
Re: Aside from historical value, what's the point? (Score:4, Funny)
Because I can't actually do anything with it?
Re:There's one good thing about it. (Score:2)
great for when yuo do
Re:There's one good thing about it. (Score:5, Insightful)
Having Python choose that style for you is a terrific readability benefit compared to something like Perl. It makes decyphering other people's Python code very very easy. It may not be exactly what you like - but I think it's a big win in the long run.
What will you complain about next? Having to use squiggly brackets in C? Having to press enter on the command line?
Re:There's one good thing about it. (Score:2, Interesting)
true.
Enforced readability through the language is good.
false.
I often find myself writing some C or Perl piece that if I follow general rules of indentation and generally obey the standard, I'll made that thing unreadable. Like, I have a 3-line-long boolean statement in if() (not even very complex but using lonv variable names) or add some "inline" error exception code like "...or die()" that's unrelated to the logical structure and shouldn't be indented.
Stickin
Re:There's one good thing about it. (Score:5, Informative)
Re:There's one good thing about it. (Score:3, Insightful)
No matter how much Python advocates try to convince me that it'll all somehow be better, I already spend too much time having to clean up irregularly-formatted Java and Objective-C code, and that's just for my own benefit when I have time spare. I don't w
Re:There's one good thing about it. (Score:3, Interesting)
Anyway, I used to think that the division between programmers produced by Python's indentation requirement was a problem. After all, it makes us argue about a stupid sounding issu
Re:There's one good thing about it. (Score:2)
Re:There's one good thing about it. (Score:2)
Oh, so now I need a special text editor to use Python. Are there any editors which automatically adjust their tab width to match the apparent value used in the file being edited? Or are you talking about some hypothetical editor?
On the contrary, I think the chances of my persuading the open source developers who
Re:There's one good thing about it. (Score:2)
Re:There's one good thing about it. (Score:1)
Re:There's one good thing about it. (Score:2)
Re:There's one good thing about it. (Score:1)
Personally I find the use of spaces for indentation to be an abomination. Because what invariably happens is somewhere someone uses 3 spaces instead of 4 or something like that. Then one editor will mix spaces and tabs.
Re:There's one good thing about it. (Score:2)
Well, there you go! You found a way to work with the team. That's the whole point as far as I'm concerned.
Because what invariably happens is somewhere someone uses 3 spaces instead of 4 or something like that.
That would be my fear too. If you and I were on a project together and some greenhorn did that, suffice it to say that they would feel the sting from the reprimand for a while.
As far as what you
Re:There's one good thing about it. (Score:1)
Spoken like someone who's never actually tried it. Look, until you've tried it, you don't know what you're talking about, and you're just blowing smoke (like most people on slashdot). So shut up already.
Re:There's one good thing about it. (Score:2)
Maybe there *is* something remarkable about Python that makes it not subject to the formatting problems encountered in every other programming language, but convincing me of such a remarkable claim will require more than telling me to shut up.
Re:There's one good thing about it. (Score:1)
Saying that indentation is going to bring python projects to a halt is like trying to argue that unpaired parens will stop a perl project (or LISP!). In practice, it just doesn't work like that. Why ? Is it because it's easy to remember to close all parens ? Or is it perhaps because the interpreter catches these errors very quic
Re:There's one good thing about it. (Score:1)
COBOL has similar maintainability benefits to Python.
Re:There's one good thing about it. (Score:1)
how could you complain about squiggly brackets in C and languages with significant whitespace at the same time?
seriously, a lot of people (including me) think languages that use braces are more readable than those that use significant whitespace such as VB. Perhaps we are just used to it, or perhaps the squiggly is the visual key to unlock our latent modularity..
Re:There's one good thing about it. (Score:2)
I suspect the initial popularity of Perl was due largely to it having been much better than the alternatives available in the late 1980s. And it's still better than the alternatives that were available in the late 1980s. The continued popularity is driven by an established userbase of guru Perl coders who aren't willing to budge and new users wh
Re:There's one good thing about it. (Score:1)
Perl's not that bad a language, once you've added the pragma use strict;. I love using perl for most quick and easy to automate tasks. If I had to run back to C every time I needed to look for "Foo" in a database or "Bar" in a logfile to replace it with its lowercase equivalent I wouldn't get any work done.
I'm all for strictly typed languages, with tons and tons of possibilities that perl doesn't have, but those languages don't save me time on small things. Perl is ideal for "quick shell scripts and CGI",
Re:There's one good thing about it. (Score:2)
Um, what have you got against whatever flavor of interactive SQL your DB supports?
or "Bar" in a logfile to replace it with its lowercase equivalent
Um, vi? or awk? or sed? or even ed?
Maybe the reason Perl programmers like it so much is that they're too lazy to learn any other tool. Just as if the only tool you have is a hammer, every problem looks like a nail, then if you're a Perl hacker, every problem looks like it needs a
Re:There's one good thing about it. (Score:2)
Re:There's one good thing about it. (Score:2)
Fair enough. But while I use my swiss army knife a lot, I'd still rather use the right tool for the job if it's available.
Re:There's one good thing about it. (Score:2)
Most people that use perl (nowadays) will tend to agree with me on this. If it has to be done quick and dirty, use perl and make good friends with CPAN. If you have the time and the project is bound to grow, use a different language.
I mostly disagree. A lot of advances in the abstraction of data (text templates, DBI abstraction, xml parsers, etc.) and modules from CPAN make a very compelling case for using Perl as a very good language for large projects too. Just that someone can write crappy code, does
Re:There's one good thing about it. (Score:2)
Don't base your choice of language on any arbitrary criteria such as file size. A language should be chosen based on the specific requirements of the application under development.
If your application needs to be able to parse many different kinds of documents, or you need to parse documents for many different types of data, the perl would probably be a nice fit. If you just want to enter and display data in a database, perhaps some other language might work better.
I have a
Re:There's one good thing about it. (Score:1, Insightful)
Instead, code the Perl, and let the magic do the work for you.
Perl is very expressive. It does what you say, and very little that you say has zero effect, compared with Java, where -- perhaps -- half of the code only exists because it must exist. Computo ergo Sum.
As for the sigils, perhaps you are treating programs as English. This is a mistake. A few cha
eh (Score:4, Funny)
Or yould do as the C programmers do and still be left in the 70's.
Re:eh (Score:1, Troll)
Re:eh (Score:1, Offtopic)
Re:eh (Score:2, Informative)
We don't use K&R style function parameters. I'm rather certain various keywords are new [and deprecated like "auto"]. The language is actually a standard now, not just a "works on my compiler".
I can't really see a valid argument for most newer languages. For example, often people argue "with Java you don't need to recompile to run it elsewhere". But that isn't actually a feature of the Java language. It's a feature of the Java runtime e
Re:eh (Score:1)
Re:eh (Score:1)
I need you! Give me your soul!
Re:eh (Score:1)
Some things to point out. (Score:4, Informative)
Before I continue, I'd just like to point out that on the offchance that something goes wrong with regard to dev.perl.org, I uploaded a copy before the article was posted [lycos.co.uk] in case of Slashdotting or if you just want to use a mirror.
With that out of the way, there's a few limitations of the language which I found quite interesting:
Oh, and when you download the package and untar it all into a directory, it won't work out of the box. Here's some instructions on how to make it work on Red Hat Linux system. First, untar it all into one big folder. Then, run ./Configure and just press Enter. When 'make depend' has run, you need to edit the Makefile. Open the Makefile up in your text editor and get rid of all the lines containing either '<built-in>' or '<command line>'. Then you should be able to just do 'make' and you now have a copy of Perl 1.0 as ./perl in the current directory.
Re:Some things to point out. (Score:3, Informative)
Re:Some things to point out. (Score:5, Informative)
(oh, 5.8 has "use Switch;", but that's cheating)
Re:Some things to point out. (Score:2, Interesting)
bah, switch is for people who are scared of using if... Incidentally, perl does have a nice alternative. Prepare a hash with all the possible values used as keys, and then use references to functions to do what you want to do.
For instance:
Re:Some things to point out. (Score:1, Flamebait)
And thats different from 99% of perl code out there how?
Re:Some things to point out. (Score:2)
Re:Some things to point out. (Score:2)
print "Would you use a hash as a switch statement? (y/n) ";
my $answer = <STDIN>;
if ($answer !~
print "You've reached the default\n";
} else {
chomp $answer;
{
'y' => sub {print "You code too much perl!\n";},
'n' => sub {print "You don't use enough perl!\n";}
}->{lc $answer}->();
}
Re:Some things to point out. (Score:2)
print "Would you use a hash as a switch statement? (y/n) ";
my $answer =
if ($answer !~
print "You've reached the default\n";
} else {
chomp $answer;
print {
'y' => "You code too much perl!\n",
'n' => "You don't use enough perl!\n"
}->{lc $answer};
}
You've lost one of the benefits of using a hash, by the way: your check for $answer against 'y' or 'n' isn't tied to the possible values
Re:Some things to point out. (Score:1)
> You don't have permission to access
Could you fix please?
Sorry about that. (Score:1)
Re:Some things to point out. (Score:2)
Re:Some things to point out. (Score:4, Informative)
There are certainly hashes in Perl 1. See hash.[ch], for example.
Did you file a bug report [perl.org] for your Makefile issue? Richard Clamp is maintaining this version.
wtf? (Score:5, Funny)
I think I know the problem (Score:2)
Normally, you would think that with that much lead time, the
Re:I think I know the problem (Score:3, Interesting)
The Language To End All Languages (Score:5, Funny)
All the power of QBasic, the readability of assembly, and the flexibility of DOS batch scripting...
(Apol. to all the offended nostalgics :)
Q.
Re:The Language To End All Languages (Score:5, Funny)
Dupe Post (Score:3, Funny)
Oh, how about this:
I know slashdot is behind the news, but this is ridiculous.
Re:Dupe Post (Score:1)
"Bah, I saw this on fark.com three weeks ago."
Re:The title must not say it all (Score:2)
birthday? (Score:1)
Did I miss something?
Ack!!! (Score:5, Funny)
As someone who uses perl quite a bit, using this 1.0 gave me a line I've seen before only in my nightmares:
Aaaaaggghh! Must ... have ... warnings ...
Re:Why not try it out indeed? (Score:1, Troll)
Re:Why not try it out indeed? (Score:1)
I'll use it however I want. I think Perl is crap!
Re:Why not try it out indeed? (Score:2)
Secondly you contradict yourself. First you say: I mean crap, as in the stuff that comes out of everyones ass.. This cleary coincides with the first definition of crap:
However, then you say: Perl is crap!. Needless to say this usage corresponds to the second definition:
You appear to be confused, I suggest you r
Re:Why not try it out indeed? (Score:1)
No way I'm going to bother with anything at
It is crap!
Re:Why not try it out indeed? (Score:2)
Perl 1.0 (Score:3, Informative)
Because I remember it?
I didn't consider Perl usable until Perl 5, because that's when it *finally* got lexically scoped local variables... Pretty horrifying that it took four major revisions to get that far.
I'm crushed. (Score:2)
Run make depend now? [y]
echo arg.c array.c cmd.c dump.c form.c hash.c search.c stab.c str.c util.c version.c | tr ' ' '\012' >.clist
Finding dependencies for arg.o.
Finding dependencies for array.o.
Finding dependencies for cmd.o.
Finding dependencies for dump.o.
Finding dependencies for form.o.
Finding dependencies for hash.o.
Finding dependencies for search.o.
Finding dependencies for stab.o.
Finding dependencies for str.o.
Finding dependencies for util.o.
Finding dependencies for version.o.
echo