Commodore on Intel Project

You need an actual VIC.

Moderator: Moderators

IsaacKuo
Vic 20 Hobbyist
Posts: 147
Joined: Tue Aug 04, 2009 5:45 am

Post by IsaacKuo »

I think Python is a good place for kids to start; that's why I called it a good "starter" language. Give it a try--download it and type in "python" at a command prompt. You can then type in commands interactively just like that.

Python isn't just a good "starter" language, it's a pretty good "only" language also. Like I said, you can develop commercial quality 3d apps in Python using Panda3d.

I'm a rusty old programmer also; I started off with Fortran on an old IBM mainframe. That didn't stop me from trying out Pascal and C, and eventually even newer computer languages.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Isn't Python extremely strict about indentation? While it may be a good feature for someone who is dedicated to learn programming, I think many people would have gotten pissed off (sorry!) if Basic had a very rigid form and shout ERROR everytime you omitted spaces between statements and variable names. I know some Basics do though, but that's their problem. Or for that matter if the interpreter forced you to space your lines by 10 to start with, and you were not allowed to add lines 11-19 until you had used up line 20. I'm sure people would call it utter crap.
Anders Carlsson

Image Image Image Image Image
IsaacKuo
Vic 20 Hobbyist
Posts: 147
Joined: Tue Aug 04, 2009 5:45 am

Post by IsaacKuo »

Python uses indentation to indicate blocks of code, instead of "begin...end" or "{...}" or "(...)". A block of code has shared indentation.

You can use any indentation you want, keeping in mind the rule that changing indentation changes the code block.

I find Python's indentation method much less frustrating than hunting down mismatched curly brackets. Of course, if I'm using an IDE or a "smart" text editor that automagically matches brackets, then it's not too bad.
Ian Colquhoun
Vic 20 Hobbyist
Posts: 147
Joined: Fri Dec 29, 2006 7:38 am
Location: Toronto, Canada

Post by Ian Colquhoun »

I agree with IsaacKuo. The forced indentation of blocks is not only easy to get used to, but it also produces code that is more easily read, and is less error prone. I don't know how many times I've had to hunt down a missing brace bug in PERL because of some misleading error the interpreter generated. Annoying indeed.

I also think that if you're programming in 2009 on anything that is half way modern, not leaving spaces between commands and variable names and the like is just nuts. Why on Earth wouldn't you? Reading Commodore BASIC code that is written all jammed together is challenging and unpleasant at best. Granted, it once was necessary, but not anymore.
Realms of Mystery BBS
bbs.pipesup.ca 6400
(currently offline)
adric22
Vic 20 Hobbyist
Posts: 143
Joined: Fri Mar 11, 2005 6:54 pm

Post by adric22 »

Ian Colquhoun wrote: I also think that if you're programming in 2009 on anything that is half way modern, not leaving spaces between commands and variable names and the like is just nuts. Why on Earth wouldn't you? Reading Commodore BASIC code that is written all jammed together is challenging and unpleasant at best. Granted, it once was necessary, but not anymore.
Yeah.. and I've been having difficulty reproducing that effect. So far my interpreter requires a space after a line number or a command statement or it can't identify what you want to do and will give you a syntax error. I can deal with extra spaces, but not lack of spaces.
User avatar
Mike
Herr VC
Posts: 4856
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Your implementation will need to tokenize the input line in the same way as the CBM BASIC interpreter does. Then, all remaining alphanumeric strings outside quotes, starting with a letter, are candidates for variable identifiers. ST, TI, and TI$ are not tokenized, but are handled within the routine that does the variable look up.
xlar54
Vic 20 Newbie
Posts: 15
Joined: Tue Sep 27, 2005 11:41 pm

Post by xlar54 »

One thing I did recently for the heck of it was:

1 - Install MS-DOS 6.22 on an older machine
2 - Install dosVICE on the machine
3 - tweak the autoexec.bat so that x64 would run at startup
4 - modify the configuration so that drive 8 points to an empty folder (I called it CBM), and drive 9 points to A:\

viola. A Commodore PC. Perfect for letting kids play and learn BASIC without giving them the real thing (ahem collectors items). Plenty of harddrive space for them to write their own programs, access to the floppy drive so you can load and store programs for them as well.

And of course for the VIC fans, you could always replace step 3 with xVIC instead :)
Post Reply