Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

RE: What was your first program?

by turnstep (Parson)
on Nov 13, 2000 at 20:46 UTC ( [id://41344]=note: print w/replies, xml ) Need Help??


in reply to What was your first program?

The earliest I can recall for sure was a simple drawing program on an early Apple in BASIC. You used the arrow keys to move, the space bar to toggle from "draw" to "move", and the number keys to change the color.

I had some sort of earlier computer too, I think it was a Sinclair something (??) and I know I wrote some programs on that, but the only thing I can remember is that you actually stored your files on a regular audio tape, with a normal tape player, by audio and microphone extension jacks. You could actually listen to your programs (resembled the well-known "modem connect" noise, but had a distinct difference).

After a while, I managed to write one of those adventure games as well. I don't know how I managed to do all that string parsing ("DROP THE BOX", "KILL TROLL", "LIGHT THE LANTERN") and everything else involved in a language other than Perl. Where was Larry? :) So much spaghetti produced for so little output.

Replies are listed 'Best First'.
(Ovid) RE(2): What was your first program?
by Ovid (Cardinal) on Nov 13, 2000 at 21:18 UTC
    I remember writing one of those adventure games, too! The only problem was that I didn't want to be stuck with a simple two-word command. I wanted full "Zork sentence" capability. My program would scan through the input and take the first three letters of every word (limited memory) and match those up with the words in DATA statements. My test sentence (my dog, I remember it after 15 years!) was "hit the skeleton with the sword, take his ring and then walk north and touch the altar." It took 8 seconds for the BASIC program to parse that into numbers. Then, the program would branch to various parts of the program when it had a "verb" number and apply the action (if possible) to the "noun" number.

    Since 8 seconds was too long for the program to parse the input string, I tought myself a little 8088 assembler and rewrote the routine in about a week. My goal was to get the program to start recognizing adjectives and compound-complex sentences, but then my roommate moved and took his computer with him. I didn't touch a computer again for another 9 years.

    It's good to be back :)

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just go the the link and check out our stats.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://41344]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-24 01:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found