4 ms·
I dunno about anybody else, but I still read $ in my head as 'string'. Anyway, this is nice, not sure I can quite work out saving and loading, but there's enoug
by thom 5y ago
I dunno about anybody else, but I still read $ in my head as 'string'. Anyway, this is nice, not sure I can quite work out saving and loading, but there's enough here to be nostalgia- and kid-friendly.
I've been very impressed with Gambas if anyone's looking for a more mature BASIC environment on Linux or elsewhere:
http://gambas.sourceforge.net/en/main.html http://gambas.sourceforge.net/en/main.html
Bindings and UIs enough that it'd be a while before you really needed to break out into another language.
- zozbot234 5y agoInterestingly, the basic CLOAD and CSAVE instructions (load and save to tape) could perhaps be implemented most easily. You don't need anything other than the simple file handling you get in all browsers, via "open" and "save" dialogs.
- tyingq 5y agoI imagine people would like a jsfiddle style way of saving things with a url that you could share with others though...
- James-Livesey 5y agoHence of course the reason why I implemented `share` to share a link to your code!
- tyingq 5y agoAh, that's nice, though a "share" button would make it clear that exists. It's also not mentioned in the guide, so there's not an easy way to know it exists.
- James-Livesey 5y agoIt's all there! Try the `import` and `export` commands. Ctrl+O and Ctrl+S work as well, provided that the files end with .atto (unless you set your file open dialog to search for all files). `share` also lets you distribute your code via a copyable link, too! I was thinking it would be quite fun to hook up a USB floppy disk reader to my computer and save/load atto programs the oldscool way... Possibly could use one of those backup tape drives, too!
- James-Livesey 5y agoTry using Ctrl+S and Ctrl+O for file save/load. There's `import` and `export` commands as well to do this, and there's even a `share` command to share your code via a URL! eg. https://jamesl.me/atto/?code=10%20print%20%22Hello%2C%20Hacker%20News!%20%3A)%22%0A20%20goto%2010 https://jamesl.me/atto/?code=10%20print%20%22Hello%2C%20Hack... Edit: Funny to hear that you still read $ as string! Still kept that tradition in atto, though the use of $ on the end of variables is optional (variables with $ on the end will be casted to string, but sigil-less variables can be any type. % is used to cast to a number).
- thom 5y agoAwesome stuff, just stumbled on your Twitter bot too (apologies if that was premature!)
- James-Livesey 5y agoYeah, hopefully am going to get it working again today, so fingers crossed there'll be more fun along the way!
- zozbot234 5y agoGambas is a good visual/RAD environment, but for more general development you might want to try FreeBASIC, which has very good compatibility with well-known basic's, combined with modern extensions and good interoperability with C-like languages.
- beagle3 5y agoYou'll feel right at home in Nim, then, where "$" is the "convert to string" operator - "$x" means "a string formatted version of x" regardless of x's type.
- thom 5y agoHa, that had never occurred to me but I actually do enjoy Nim. Feels sort of joyful in a way some of the other recent systems languages aren’t, perhaps it’s my nostalgia.
- chkas 5y ago> I still read $ in my head as 'string' In my language it is a string, too. But otherwise it is only widely related to BASIC. It is also child-friendly and runs in the browser. https://easylang.online/ide/ https://easylang.online/ide/
- James-Livesey 5y agoNice language! Love the syntax too; quite similar to atto, but with a few unique features which really does make it easy to use!