6 ms·
Action was the best 8-bit programming language
- NetMageSCW 1y agoWhen I started college my computer was an Atari 400 I had purchased with money from my after-school job programming commercial software. I had replaced the membrane keyboard with a third party “real” keyboard and had the Action! cartridge. I used the editor primarily to write papers for class printed on my dot-matrix electric arc printer (it produced the dots by scorching the paper with a tiny carbon electrode thus needing no ink, though the print was brown and lower contrast). Sadly I sold the 400 to someone I knew for their child and loaned the Action! cartridge to a co-worker who moved across the country and we lost touch. I’ve been searching eBay for years for a copy of the manual as well - at one time I had an ambition to create a version for iPad or Windows.
- brianpaul 1y agoI loved programming in Action! The editor was great and both compilation and runtime were really fast. I used it for several years from high school into college until I got an Amiga. I wrote a paint program, 3D modeler and 3D renderer with Action! No floating point. Fixed-point math with lookup tables for sin/cos/etc.
- kragen 1y agoDuplicate discussion a couple of days later: https://news.ycombinator.com/item?id=45120381 https://news.ycombinator.com/item?id=45120381
- veltas 1y agoAny relation to ActionScript?
- hn_acc1 1y agoActionScript came ~10-15 years later. I would be very surprised if there was any relation.
- cosmotic 1y agoActionScript is based on ECMA/JavaScript
- fourthark 1y agoOriginally it was based on HyperTalk, then it switched to ECMA later on.
- jjtheblunt 1y agonot historically, but merged back into implementing ECMA/Javascript later. it predates javascript by years in earlier revisions.
- veltas 1y agoThat's why I asked, fishing for surprising but interesting information.
- wduquette 1y agoThe OP says that 8-bit CPUs couldn't handle Pascal well, and that Action! (release in 1983) was the first IDE for 8-bit machines. But Apple Pascal was released for the Apple II in 1979. Based on UCSD Pascal, the Apple Pascal system was basically an OS that simply was an IDE; and it worked perfectly well on 8-bit hardware. I had quite a lot of fun with it back in the day.
- forinti 1y agoI learnt Pascal on a Beeb. It had a compiler, an editor, and a runtime in two 16KB ROMS.
- cmrdporcupine 1y agoIf I'm not mistaken Apple Pascal ran a virtual machine which executed "p-Code" and the compiler emitted that. Because, yeah, the 6502 is a difficult target for high level languages.
- ajross 1y agoApple Pascal was a UCSD Pascal descendant, which means it was a P-Code interpreter. The article is broadly correct. The 6502 had what amounts to a mixed-performance address space. All indirect addressing had to be done via pairs of registers in the zero page at addresses 0-255. Essentially all the "pointers" in your application wanted naturally to live as one of these 128 "pointer registers". But that's not the way natural code generation wants to work, where the pointers get stored in the data memory along with everything else. So compiled languages need to have some kind of trampoline for every pointer to copy it into the memory where it needed to live, which was a really tall order for the optimizers of 1983. Or they could just cheat and compile to a virtualized instruction set and feed that to an interpreter. Apple chose this, twice: once with Woz's sweet16 in which Integer BASIC was written, and again with the port of the P-Code interpreter for Pascal.
- sema4hacker 1y agoAround 1979 or 1980 I was working for an 8080-based CRT terminal manufacturer and ported UCSD Pascal to our 8080 system, which worked flawlessly. I don't remember the details, but I believe all I had to do was implement a few BIOS-style routines. I got hung up for a few days because I had inited the heap pointer to a byte boundary instead of a word boundary, but after that everything booted and ran as advertised.
- cmrdporcupine 1y ago"I found it endearing that to end an IF block you used FI (IF spelled backwards) and to end a DO block you used OD. That is some interesting symmetry although I’m not really sure it helps readability." This comes straight from Algol if I'm not mistaken. It seems weird to us now (tho bourne shell / bash kinda has this in spots) but it was in the air in the 60s/70s. When I've looked at it in the past I definitely got the sense that Action was very much inspired by Algol-68, but with some accomodations for the niche of 6502. 6502 is a terrible target for C (and even Pascal) compilation, I have often wondered if it made sense for someone to try and revive Action for the 21st century as a general purpose 6502 high level PL.
- rootbear 1y agoThat was from Algol 68. Algol 60 used BEGIN/END blocks when the body of a do loop (or a then or else block, etc.) had more than one statement. Bash was influenced by Algol 68.
- hmmokidk 1y agoI like it because I definitely spend brain cycles trying to figure out what is being closed! It’s like HTML hah.
- Zeetah 1y agoAn excellent interview with the creator of Action! - Clinton Parker. https://ataripodcast.libsyn.com/antic-interview-111-clinton-parker-action https://ataripodcast.libsyn.com/antic-interview-111-clinton-...
- charcircuit 1y agoThis article doesn't really prove why it's the best. I feel like if it's the best it would have been ported to more systems.
- wk_end 1y agoI think it hinges on: The Action! language may not have been as advanced as C or Pascal, but because it was designed with the 6502 CPU in mind, compiling the language was astonishingly fast. The original Atari Pascal system from APX needed multiple disk drives and could take several minutes to compile a small program. The only C package available in 1983 (Deep Blue C) was at least as limited as Action!, but also not an integrated package and compiled slowly. Draper Pascal only compiled to pseudo-code. Action! compiled your program to machine code in memory and in seconds. Typing C (to compile) and then R (to run) was hardly slower than just typing RUN in BASIC. So less about the language itself (unless it had some particular properties that facilitated compiling it quickly) and more about the tooling.
- buescher 1y agoMicro-SPL was cut down from the HP SPL systems programming language to run on the Xerox Alto, in microcode, and was ported pretty directly to the 6502 as Action! The Action! folks were pretty coy about this back in the eighties.
- kragen 1y agohttps://en.wikipedia.org/wiki/Systems_Programming_Language https://en.wikipedia.org/wiki/Systems_Programming_Language? BEGIN INTEGER A:=0, B, C:=1; PROCEDURE N(X,Y,Z); INTEGER X,Y,Z; X:=X*(Y+Z); FOR B:=1 UNTIL 20 DO N(A,B,C); END. The "Action!" code samples don't look like a dialect of this, but of a different branch of the Algol tree: PROC hello() ; This is a comment. DO PrintE("Goto 10") OD RETURN PROC timestwo() CARD i=[0],j DO ;start of DO - OD loop i==+1 ;add 1 to j=i*2 ;set 'j' equal to i*2 PrintC(i) ;**** See the following Print(" times 2 equals ") ;PROGRAMMING NOTE for PrintCE(j) ;an explanation OD ;end of DO - OD loop RETURN PROC hithere() BYTE ctr ;counter used in FOR loop FOR ctr=1 TO S ;this FOR loop has no 'STEP', so DO ;an increment of 1 is assumed. PrintE("Hi there") OD RETURN The divergences I see that gave me this idea: 1. SPL used PROCEDURE to define procedures, and "Action!" uses PROC. 2. SPL used semicolon to separate statements, and "Action!" evidently used newlines or some kind of Lua-like rule, instead using semicolon for comments. 3. SPL used := for assignment statements (and FOR loops), and "Action!" used =. 4. In SPL, as in Algol 60 or Pascal, the body of a FOR loop was evidently a statement, using DO as a keyword to separate the loop setup from the body, so if you wanted a multi-statement loop you would presumably use a BEGIN END block, while "Action!" used Algol-68-style DO-OD (and IF-THEN-ELSEIF-ELSE-FI). 5. SPL used the UNTIL keyword to introduce upward-counting loop limits, while "Action!" used TO. 6. "Action!" seems to have used =[0] to initialize a variable to zero, while SPL used =0; in "Action!", =0 would have put the variable at address 0. Most versions of Algol, annoyingly including Pascal, had no way to initialize variables at their declaration. Presumably, if "Action!" were derived from SPL, it would have used the SPL syntax to initialize variables, and some other syntax to specify their location, like =@0 or =^0 or =[0] or something. 7. Also, not seen here, "Action!" evidently spelled INTEGER as INT. There are a number of other differences on view here, such as the use of BYTE and CARD (unsigned) variables, the absence of the program-terminating period character, the presence of an augmented assignment operator ==+, and having the top-level syntactic construct be a procedure rather than a block, but those seem to me like the kinds of things you might change because you were building an IDE or because you were running on a tiny microcomputer. By contrast, these purely syntactic choices seem to me to be freely chosen on the basis of aesthetics or tradition, with almost no technical advantages or disadvantages accruing to any possible choice. However, the Micro-SPL manual is at http://www.bitsavers.org/pdf/xerox/alto/micro-spl/Micro-SPL_Sep79.pdf http://www.bitsavers.org/pdf/xerox/alto/micro-spl/Micro-SPL_.... On points of difference 1, 2, 4, and 7, it is similar to "Action!" rather than SPL, though it does follow SPL on point 3. As for points 5 and 6, Micro-SPL didn't have FOR loops or variable initialization, explaining the syntactic divergence. Also the Micro-SPL manual is by Henry Baker and "Action!"'s author Clinton Parker, who apparently confirmed the identity on a podcast in 02015: https://ataripodcast.libsyn.com/antic-interview-111-clinton-parker-action https://ataripodcast.libsyn.com/antic-interview-111-clinton-... So I guess you're right that "Action!" is indeed Micro-SPL in a trenchcoat. Sure fooled me! As for compilation speed, I don't think there's anything particularly special about "Action!"'s syntax or semantics that would make it especially fast to compile. Not using a textual preprocessor like C, maybe. And it's probably an advantage that most statements are introduced by a keyword so that simple recursive-descent parsing (with a separate tokenizer) is all you need, but that's more about the ease of writing the compiler than about its performance. This was the same time Baker was working on COMFY-65, a more interesting language that got less adoption because it was not released for decades.
- SeenNotHeard 1y agoOne limitation not mentioned is that Action! didn't support recursion. This had to do with how local variables were stored. Whether it was the best language for 8-bit programming, it certainly was a great fit for the 6502, as the language targeted the peculiarities of that chip. Accessing hardware-specific features of the 8-bit Atari's was a snap, which was necessary in order to do anything more interesting than sieves or print loops. Action! probably could've been ported to the Apple line, but 8-bits were winding down by the time it was released. Porting to 16-bit machines like the IBM PC or Mac (or even the Atari ST) would have been a tougher sell, since Pascal and C were better established by that point, and worked well on those machines. Two bad things about Action!: Charging a license fee to distribute the runtime, and that dumb bang in the name.
- keyle 1y agoWasn't recursion a problem for early C and Pascal in those days anyway? They didn't have tail call optimisations. As in after X recursion, you'd get in trouble as the memory kept allocating new stack frames for every recurse...
- vincent-manis 1y agoNo, recursion still works well without TCO (though as a Schemer, I love TCO). I was programming in BCPL in the early 1970s, and it handled recursive procedures with aplomb. The big revolution was realizing that, if you don't allow access to automatic variables declared in outer scopes, you could store all the variables in the stack frame, and access them with a small offset from the stack or frame pointer. That made automatic variables just about as fast as static ones (which, on System/360, had to be accessed via a base register), with small overheads at call and return sites. Again on System/360, I benchmarked BCPL procedure call costs against subroutine call costs in Fortran G (the non-optimizing compiler). BCPL was about 3 times faster. That said, as soon as you added multi-tasking (what we'd now call threads), it all went to hell. It's not an accident that one IBM PL/I manual of the 1960s said “Do not use procedures, they are expensive.” As mentioned by others, it was the tiny stack in the 6502 that killed this approach. I appreciate all those who pine for the 6502, but it made implementing modern (even for the 1970s) languages almost impossible.
- jasperry 1y agoAnother 8-bit "better than BASIC" language was COMAL. Similar to the language in the article, it also had structured programming constructs, and the C64 version had built-in turtle graphics, sprite, and sound commands. I remember picking a version up at a mall kiosk that sold PD disks and it expanded my horizons!
- jjwiseman 1y agoSame here. I knew BASIC very well and had done some 6502 assembly, but the COMAL disk I picked up somewhere for the C64 was my first exposure to structured programming, and it definitely expanded my young mind.
- pikeangler 1y agoThere was the fantastic COMAL 80 cardtrige for the Commodore 64 with high level commands for sound and graphics, and a full screen editor. It bank-switched so you could use the full 64K RAM on the C64.
- rtpg 1y agoI have this theory that Go tickles people because like Basic or something like Action it has all of these sort of abstraction ceilings that lead to "straight down the middle" procedural code. Definitely leads to a feeling of velocity. I don't like the language that much but I do get the fun from that feeling!
- jdndnfbdn 1y agoI personally do not get the feeling of velocity since I need to struggle with language and tooling to get the most basic things done However I love the ease of cross compiling and distributing cross compiled binaries that much that Go is still the best tool for some jobs
- greggman65 1y agoMy best friend in high school, John Alvarado, and I, loved the game BoulderDash. John reproduced the algorithm for it in Action! https://github.com/greggman/rockfall/blob/main/ROCK4.ACT https://github.com/greggman/rockfall/blob/main/ROCK4.ACT I've since ported that code multiple times. Once to Gameboy (unshipped, it was just for learning when I was hired to make a gameboy game). Once to C. Once to Java for a feature phone software interview. A couple of years ago to JavaScript https://greggman.github.io/rockfall/ https://greggman.github.io/rockfall/
- jhallenworld 1y agoI never had Action!, but I did try Deep Blue C for the Atari 800. One issue was lack of brackets in the character set.. I think it used $( and $) instead. https://www.atariarchives.org/APX/showdocs.php?cat=20166 https://www.atariarchives.org/APX/showdocs.php?cat=20166 There were some other weird 8-bit programming languages: PLM and MPL. These are PL/I clones for 8080 and 6800. I used MPL long ago and wrote an article about it: https://github.com/jhallen/exorsim/tree/master/mpl https://github.com/jhallen/exorsim/tree/master/mpl PLM was much more popular and better: https://en.wikipedia.org/wiki/PL/M https://en.wikipedia.org/wiki/PL/M
- smackeyacky 1y agoYou could argue that the “best” programming environment available for DOS machines was dBase. dBase III in particular. For storing rows of data and building text interfaces it was very impressive. Not for games, but for information systems that ran a lot of small business back then.
- Zardoz84 1y agoClipper
- jnaina 1y agoBlast from the past. Still have my Action cartridge.