Announcing Basic Language With Graphics (Beta)
I've been working on a classic BASIC language inspired by Microsoft Atari Basic. It comes with a 50x50 display by default and makes it really easy to draw things and make games. The language is still in Beta and I'll be improving it over the coming weeks. For now here is the documentation and a sample snake game that I found on the internet and modified to make it work here. Please let me know what you think.
If you're curious you can find the source code for the interpreter here (https://repl.it/@amasad/pg-basic). Feel free to fix bugs and send patches.
[update] Docs moved here: https://docs.repl.it/misc/basic
[update 2] Changelog:
- You can now use variables with multiple letters
LETis optional. You can define variables like so
10 X = 1
TEXTlets you draw text on the screen (refer to docs)
- Display is now automatically focused after the program is run
GETCHARhandles long-presses better
[update 3] Changelog:
- You can now create multidimensional arrays
ARRAY a, 2
- You can now draw an entire grid with one call
- Refer back to docs
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration - Edsger W. Dijkstra
Hi, I don't know how else to contact repl.it. I'm new and trying to buy into repl.it if it supports Dart+Flutter for desktop apps (& other platforms later). I need that info and related main help resources.
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use. The original version was designed by John G. Kemeny and Thomas E. Kurtz and released at Dartmouth College in 1964. They wanted to enable students in fields other than science and mathematics to use computers. At the time, nearly all use of computers required writing custom software, which was something only scientists and mathematicians tended to learn.
In addition to the language itself, Kemeny and Kurtz developed the Dartmouth Time Sharing System (DTSS), which allowed multiple users to edit and run BASIC programs at the same time. This general model became very popular on minicomputer systems like the PDP-11 and Data General Nova in the late 1960s and early 1970s. Hewlett-Packard produced an entire computer line for this method of operation, introducing the HP2000 series in the late 1960s and continuing sales into the 1980s. Many early video games trace their history to one of these versions of BASIC.
The emergence of early microcomputers in the mid-1970s led to the development of the original Microsoft BASIC in 1975. Due to the tiny main memory available on these machines, often 4 kB, a variety of Tiny BASIC dialects was also created. BASIC was available for almost any system of the era, and naturally became the de facto programming language for the home computer systems that emerged in the late 1970s. These machines almost always had a BASIC interpreter installed by default, often in the machine's firmware or sometimes on a ROM cartridge.
BASIC fell from use during the later 1980s as newer machines with far greater capabilities came to market and other programming languages (such as Pascal and C) became tenable. In 1991, Microsoft released Visual Basic, combining a greatly updated version of BASIC with a visual forms builder. This reignited use of the language and "VB" remains a major programming language in the form of VB.NET.
You say it comes in a 50x50 display "by default". Does this mean we can change the size of the display?
Although many may not fully agree with me, it has always seemed redundant to put parenthesis when calling a parameter-less function, so, since your making the language, can you change this, or are you trying to properly emulate BASIC? The only language I've seen do this is PineCone.
Also... do you support user-defined functions yet?
Came back and re-looked through the language tutorial you made, then I noticed the following:
CLS clears the console and the display.
CLC clears the console and the display.
Should CLC clear the display?
Also, this is an interpreted language, not a compiled language, right?
I'm talking about the repl.it package manager. Node and npm can be confusing for beginners so repl.it provides a gui package manager. click on my profile and see my posts, you'll find a introduction to the repl.it editor post. Thay will give a quick overview of the repl.it editor. @StudentFires
- It'll obviously be better if node is updated by default but we always have workarounds until they actually do it. Me and a few other members of the replit discord have constantly been bugging the replit team about this but they do have other more important issues to fix and features to add.
- That is weird, repl.it normally installs all dependencies before running so it should not fail. You can try creating a file named exactly
.replitwith the contents: -
language = "nodejs" run = "npm i && node index.js"
If it still doesn't, then there is an error in your code.
@TheDrone7 Uhh, update: My repl was bugged, it didn't save anything past a certain point, it happens to me every once in a while. I'll realize it's not running my current code, but an outdated version, once I spot it, I try to copy my current code because Repl isn't saving an acknowledging my updates. This has resulted in severe data loss before. Also, the Repl crashed.
npm iis short for npm install which basically reads all packages from your package.json file and installs them.
&&basically indicates the part after it should be executed after the command before it has finished executing.
.replitare special replit files for custom commands and stuff.
- [email protected]
Really cool, I feel like your example for the ATAN is wrong (typo), it says:
10 PRINT TAN(1)
Should it say?:
10 PRINT ATAN(1)
Also, I'm confused about the ASC one, if you write:
10 PRINT "s"
It gives out 115. Why doesn't it just print: s ?
Also, it says in the lowercase section
10 PRINT UPPERCASE("BASIC")
will print "basic", is this a typo? should it be
Anyway, this looks really cool Well done!
Reactions in order of occurrence:
Announcing Basic Language With Graphics (Beta)
A NEW LANG!!! :D YAY!
Feel free to fix bugs and send patches.
Holy crap that’s so cool we can help!! woah!