Still day dreaming every day about BASIC.
I have a hunch that type in programs are a good idea.
What other types of languages have had a history of type in code culture?
Is there a better language for type in code than BASIC?
@vidak I think a number of factors combine to make BASIC unique in that respect. First, has an issue with multiple dialects that lack mutual intelligibility. This is also something of an opportunity in that it's a good way to learn debugging. It also had the good fortune to be part of computing culture when printing on paper was at its biggest ever and the bad fortune of lacking reliable means of persistence apart from print. As the only language on home computers it enjoyed an advantage not shared by languages like Pascal or Fortran that were otherwise similarly situated
@vidak That said, I like both Lua and TCL for typing code. They may have missed the desktop publishing boom, but either one could fill the role that BASIC did if there was a print revival. For either language, I frequently retype shorter segments rather than copy and paste
@vidak PILOT? It's much less fussy about syntax. But the versions of PILOT were too incompatible, even compared to BASIC.
Block structured langs suck to type in because there's no line numbers, you have to keep track of where you are and visual diff the programs.
8-bit magazines also had those checksum programs, which were super useful, hard to make one for anything else.
#basic
@50htz Ah, another Lua admirer!
I've been trying to encourage more of a culture of typing in or copy-pasting Lua programs into one's phone: https://akkartik.itch.io/carousel/devlog
@vidak I hate getting into religious wars and I also hate the feeling that I'm dissing something others care a lot about. So I'll only say this once and then stop: I don't think BASIC is a very good language. Particularly the line number BASICs before QuickBasic.
This doesn't mean I don't see value in them. Your use case in particular makes a lot of sense. You have a weak computer you care a lot about. Using preexisting software to drive it saves effort.
I also acknowledge the nostalgia inherent in BASIC. It was before my time (I spent the last weekend learning about it for the first time) and I don't share the nostalgia, but I don't deny your lived experience of it.
But outside of nostalgia and efficiency/reuse and maybe 1 or 2 more reasons I might be missing, I'd always prefer a language with structured programming and scoped variables to line-number BASIC.
@akkartik @vidak
Line number BASIC was part of the appeal when typing in programs from printouts. My hurdle with BASIC is the inconsistent IO primitives across implementations. You absolutely need documentation to do most things fun or useful, and paper rots fast unless extraordinary care is taken with it
I have fond memories of being a ten year old entering and modifying programs on a TS1000. Line numbers and simulated green bar backgrounds are in my RNA, but porting programs from more capable systems would still be frustrating
@akkartik @vidak
In 1980, "user friendly" was a new phrase. I coined "user antagonistic." This was a reaction to databases trimming my first name to ten or even six letters. (I'm still Christophe to Medicare.) There was a feeling that I was participating in the future, even stronger than when I built a radio receiver
The technology, itself, was often horrible. To capture that feeling of looking forward, however, we'd need to be doing something with AI or quantum computing... Though I'd have to admit that graphical games could be a sweet spot, too
But also, this is the passion project of a few anarchists, so there's a willingness to accept suboptimal decisions in order to allow workers full autonomy in their labor. I figure that I can always slap a tcl/tk shell, Scheme REPL, Lua interpreter or Kermit client on the finished hardware using whatever tool chain was used for BASIC
@50htz @akkartik okay we should have a discussion.
I am happy to move on from BASIC.
The main idea was to explore software printed on paper that had to be typed in, and that was a hard condition.
Perhaps the hard condition is not so much software written for type in.
We need a cheap computer platform that we can use for permacomputing purposes. My original selection was an Arduino or raspberry pi pico.
What are your thoughts?
@vidak @50htz @akkartik Lua's hard to use for type-ins because it's block-structured, not easy to keep focus in, AND it has fussy, awful syntax. Did you type : or ::? There's way too many ways to do similar things in it.
#Lua is what a C++ developer thinks is "easy enough for a level designer".
#BASIC has the virtues of being trivial to read, write, and only has two data types, plus arrays of those. No classes, no function pointers. If you add named labels or functions, it's "modern" enough.
@mdhughes @50htz @akkartik BASIC definitely makes sense to me--perhaps the standard of success for the project is "is it possible with reasonable effort", in which case I would definitely class the exploration the permacomputer project into BASIC a success.
Personally I do not understand the dislike of BASIC, but I want to work with others and take as many people along with me as possible.
@mdhughes I don't understand any of this and would appreciate elaboration. What makes block-structured bad for type-ins? Why is "more than one way to do it" bad for type-ins? What does "not easy to keep focus in" mean? What makes BASIC trivial to read and write?
Adding functions is precisely what I'm asking for. Real functions with scopes so you can have recursion.
@vidak Would love to hear from you as well. What do you love about BASIC?
@mdhughes '::' means nothing in Lua, so I don't understand what you mean there either. I don't see how BASIC is an improvement over Lua syntax. And the drive-by generalization about C++ feels gratuitously unkind to any C++ devs in the audience. This kind of stuff is why I try to avoid religious wars.
@vidak I want to reiterate that I don't particularly dislike BASIC. I've seldom used it, and I don't have a strong opinion about it. It just seems clear that functions and scopes are a good idea compared to GOSUB and global variables, and that if..then and for are good ideas compared to BASIC's IF..GOTO and FOR..NEXT.
BASIC's ideas were perfectly reasonable in the '60s. It also makes sense to me that the world tried these ideas and chose to move on. They're still workable if you have a good reason to stick with BASIC.
@akkartik @vidak
You can figure out how bad block type-ins are by reading old Dr Dobbs. Multi-page C listings were much more difficult than equal size BASIC listings, you can't tell where you are, that's what I mean by "focus". LITERALLY focusing on the text with no guideposts like line numbers. For a newbie, that's really difficult.
Do the exercise yourself. Go type in some long C program, and a BASIC program.
@akkartik Correction, the operator is . vs : , it's been a few years since I had to write thousand-line game mods in Lua, I barely touch it now for Luanti (where it exhibits all the C++-isms).
The point is that C++ is intractably hard, it's a language designed for maximum difficulty to use, so their perspective on newbies is warped. "Well of course they want a meta-object protocol!" No. No they do not.
It's not "religious" to note the language is excessively complex for the intended users!
@akkartik @vidak already in the 80's most Basic implementations were getting structured programming support. The only implementations that only had goto and gosub were the buily-in versions in 8-bit computers. But even said computers had extended Basic versions that impemented fully structured programming.
As a place to start learning programming Basic is a much better solution than most of the "modern" languages.
@mdhughes Do my programs at https://akkartik.itch.io/carousel/devlog really seem significantly harder to type in because they don't have line numbers?
I tend to be bemused by tales of people keying in hundreds of lines from magazines before finding out if they made any typos. Is that really still valuable? Sure, we had to do it then, but copy-paste is better now? Interactive walkthroughs that teach you to write a skeleton and then gradually flesh it out seem like improvements?
I've had some luck walking newbies through a sequence of lessons: https://akkartik.name/post/2024-10-26-devlog. This sequence is now part of the online help in Lua Carousel. Curious what you think of it. Very little focus on typing.
Going farther back, I used to teach programming using a line-oriented Assembly-like language: https://akkartik.name/post/mu. So I'm quite sympathetic to BASIC. I like the odd GOTO in my programs. I just don't want to program with _only_ GOTO.
For @vidak's permacomputer the user isn't necessarily a newbie. They may be someone experienced who's just using paper for archival.
First-class functions make many of my programs shorter. That means less typing!
@loke Certainly, any BASIC past QuickBasic seems pretty reasonable for learning with.
@vidak One issue with this thread is that we're conflating ideas of sustainable permacomputing with opinions about what's best to teach programming. Is making programming easier to learn critical to permacomputing? Or are they overlapping ideas that maybe we should debate separately?
@mdhughes Yes that's fair, C++ is hard on newbies. It's unclear that they're the intended audience here:
https://merveilles.town/@akkartik/115065071566723932
@akkartik @vidak Yes?
https://akkartik.itch.io/carousel/devlog/887940/new-version-after-41-days-and-stop-motion-animation
would be untypeable by someone not used to it, and my eyes glaze over pretty quick.
Some of permacomputing also aims to make the computers usable by novices, with minimal resources. Where would they copy-paste from? Dead tree zines/texts are more likely than a computer with network and multiple VMs.
@mdhughes One reason I dislike generalizations about programming languages is the wide variety of experiences different kinds of programmers can have. Someone writing thousand-line programs has a very different experience from someone writing an 80-line program. Newcomers should not be typing in hundreds of lines without any feedback! It's fine that many of us learned this way, but we have better ways now.
@akkartik @vidak In practice, I expect most people using a BASIC now are typing in very short programs at most. There's some of us lunatics making 10-line BASIC entries, or larger programs (I have some in progress on Atari 8-bit and SpecNext).
A lot of even primitive BASICs have named labels. On Atari you just set a variable to the line number, or use TurboBasicXL which supports PROC/CALL or # labels (as does NextBasic). But those don't introduce much complexity for the new user.
@mdhughes I guess we'll have to agree to disagree. "Eyes glaze over" is the sort of subjective opinion I've tried to avoid making in this debate.
It seems clear programmers have a wide variety of aesthetics. I'll stop there.
Absolutely, archivals on paper are a perfectly valid use case for typing in. I accepted that from the start. This thread is all over the place and doesn't seem productive.
@mdhughes @akkartik well i meant everyone in this discussion--is there anything we can agree on? i think there's a lot we share here anyway.
hard to explain, but there is an excitement i feel when i am programming BASIC. i can knock something half-decent for my own purposes together in an afternoon or two, and that satisfies the itch for "joyful programming" for me.
the scope of the exploration of the @permacomputer project was definitely programs around or just over 100 lines. definitely not more than 200.
for the application that it was targeted towards, i think the investigation the project did into BASIC was fruitful, and even quite surprising--the 70s/80s hobby computing scene was far richer and more creative than i imagined: i ended up unearthing MANY text editors written in BASIC!
@vidak
Sweet! Time for a new parts list?
@vidak @akkartik @permacomputer Yeah, BASIC being aimed at such an amateur audience, and then giving JUST ENOUGH tools to solve major problems, was a really powerful combination.
It's not that hard to write real systems software in it, but you do quickly run into performance problems and really large scope is hard to manage. But that just encourages you to stay focused, a line or screen editor, not WordPerfect. A dungeon wanderer, not open world MMO.
#basic
@50htz iirc, it's basically a drop-in replacement for the arduino or pico!
https://github.com/Stan6314/TinyBasRV
main issue is finding a model as beefy as the pico, but i think there's a nice model @ AUD15 that has ~64KB SRAM...
@mdhughes @akkartik @permacomputer yes that's really where the target audience for the project is, in my mind--
i am interested in on-boarding complete n00bs, and really attempting to foster a culture that avoids much of the toxic practices of the current computing industry.
i think it fits into my everyday activism as well, many people are only really waking up to what has been going on because of the undemocratic nature of our media and political systems...
@vidak Yeah, the Arduino IDE officially supports several RISC-V dev boards
The project you linked to uses a CH32V003 and already has project files for BASIC. There's not much work left to be done unless you want to write a Kermit client in BASIC
https://github.com/wuxx/nanoCH32V305 is a considerably beefier dev board that's about $6USD and has 2 USB ports as well as a pin out for an LCD. I'd like to find something similar with Micro SD card support
@50htz
nope. It's CH32 with sdcard/LCD/two usbs :)
@vidak do you find Lua appropriate for people unfamiliar with programming? Compared to Basic, its issues are that it doesn't like a line-based text editor, that you need to add array constructors and other convenient features, and that Lua needs a more complicated allocation model. Still, I believe it's the best fit.
- replies
- 0
- announces
- 0
- likes
- 1
@kapunta give me a few hours, I want to get around to answering this properly.
@kapunta i absolutely love lua, actually. I really like fennel, too, the functional programming language that either compiles or transpiles to lua code, I cannot remember.
I think ultimately it is an excellent language for education, depending on your purpose. I think I wrote a bit of lua while I was using the TIC 80 fantasy console.
The origin story of lua is also lovely! It's from the global south!