Marius Posted January 29 Share Posted January 29 Hi all, If one would like to learn Python and one comes from Atari 8bit it would be handy if there was a list of the Atari Basic commands and their python equivalents. Does such a list exist? And if yes, can someone point me in the right direction? Thanks! Marius Quote Link to comment Share on other sites More sharing options...
danwinslow Posted January 29 Share Posted January 29 I don't think you'll find one as such. The two languages are very different. It might be better to take it on a functionality basis and google for things like: How to open and read a file in python: https://www.freecodecamp.org/news/how-to-read-files-in-python/ How to create an array in python: https://www.geeksforgeeks.org/python-arrays/ etc. There really isn't a one to one mapping as far as individual keywords go. A good place to start would maybe be https://www.python.org/about/gettingstarted/ 2 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 29 Share Posted January 29 Python 👎🏾 1 Quote Link to comment Share on other sites More sharing options...
Marius Posted January 29 Author Share Posted January 29 (edited) 7 minutes ago, TGB1718 said: Python 👎🏾 Why is that? Do you have a better advice for me? I have (quite some) experience with Atari Basic, Turbo Basic and Assembler (6502). So what is a logical step to do some coding on Mac/PC? Edited January 29 by Marius Quote Link to comment Share on other sites More sharing options...
Marius Posted January 29 Author Share Posted January 29 50 minutes ago, danwinslow said: I don't think you'll find one as such. The two languages are very different. It might be better to take it on a functionality basis and google for things like: How to open and read a file in python: https://www.freecodecamp.org/news/how-to-read-files-in-python/ How to create an array in python: https://www.geeksforgeeks.org/python-arrays/ etc. There really isn't a one to one mapping as far as individual keywords go. A good place to start would maybe be https://www.python.org/about/gettingstarted/ Thank you so much! I thought it would make sense for people who know basic, to have some documentation where you can see how the commands you are so used to, are described in Python. I think I should study some simple Python programs. That is more my way of learning. The links you send look very useful. Thanks. If you have other good suggestions for me, please let me know. I am all ear! Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 29 Share Posted January 29 29 minutes ago, Marius said: Why is that? Do you have a better advice for me? Sorry, that's just me, I really never got into Python, I always looked at it as a "beginners" language. I always use Assembler and "C" as my preferred languages 1 Quote Link to comment Share on other sites More sharing options...
danwinslow Posted January 29 Share Posted January 29 Python is ok, but it depends on what you want to do. It's really good at manipulating large arrays of data, and it's a great 'glue' language to script infrastructure bits together. It has a really large ecosystem of libraries, and is used for a lot of scientific and AI/ML work. That said, I don't like it much from a formal language perspective, it is at heart a script language and suffers from the usual oddities. A good next language for you might be pascal or C, both are available on the Atari. If you want employment as a developer then C++, Java, or javascript would be a way forward. If you use Windows then C#/.Net is a nice environment. 2 Quote Link to comment Share on other sites More sharing options...
stepho Posted January 30 Share Posted January 30 https://theswissbay.ch/pdf/Gentoomen Library/Programming/Python/Thinking in Python (Bruce Eckel%2C Rev 0.1.2) - 2001.pdfhttps://github.com/BruceEckel/ThinkingInPython You do need to think in new patterns. Eg, the FOR loop is usually the wrong way to do it in python. Basic is a very old style language and simplistic. We have made vast improvements in newer languages. Far from being a beginner's language, I've see it used as a substitute for MatLab (ie maths heavy stuff), as a string processor (eg generating C/C++ code from small config files), an application download manager and real-time management of vehicles on mining sites. Comparing equivalent algorithms in C/C++ code and python code, the Python code is far simpler, far more natural and far easier to understand/modify. Admittedly, speed is not its forte - but same issue for Basic. And it is memory hungry - ruling out most 8-bit systems. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted January 30 Share Posted January 30 Well, I don't know about 'more natural'...depends on what you are used to. To me, some of the syntax in python is extremely unnatural. But all modern languages suffer from what I call 'complexity poisoning' - they've had so many things added over the years to be 'more powerful' that now they are just unwieldy. Plus, devs seem to feel that if a language has a feature, then by god they are going to use it, needed or not. Development used to be viewed as an engineering discipline...write simply, write clearly, do only what is needed. If you add complexity, have a good reason that you can explain to a user of your product. 1 Quote Link to comment Share on other sites More sharing options...
Marius Posted January 30 Author Share Posted January 30 19 hours ago, danwinslow said: Python is ok, but it depends on what you want to do. It's really good at manipulating large arrays of data, and it's a great 'glue' language to script infrastructure bits together. It has a really large ecosystem of libraries, and is used for a lot of scientific and AI/ML work. That said, I don't like it much from a formal language perspective, it is at heart a script language and suffers from the usual oddities. A good next language for you might be pascal or C, both are available on the Atari. If you want employment as a developer then C++, Java, or javascript would be a way forward. If you use Windows then C#/.Net is a nice environment. Well... I would lie if I said that I am just wanting to do some hobby coding. I am a professional musician and educator, and yes I would like to develop an app, or perhaps a web-app where students can learn music stuff, and perhaps in the far future I hope to create something to make a little money with (next to my paid job). But that is only in the far future. If you think that Python is most definitely not suitable to create an app (for a smartphone, or for a website) then I should pick a different coding language. If it might be possible with python, it might be a good choice for me. Can you see what language is used to create this: www.playxylo.com That is pretty cool, and one can even download it as an app for offline use. I would love to create such things. I am very grateful for all the support and help I get here on the AtariAge forum. It is always a pleasure to read all the comments. People are really sharing their points of view, which are very educational for me. Quote Link to comment Share on other sites More sharing options...
ivop Posted January 30 Share Posted January 30 (edited) 2 hours ago, Marius said: Well... I would lie if I said that I am just wanting to do some hobby coding. I am a professional musician and educator, and yes I would like to develop an app, or perhaps a web-app where students can learn music stuff, and perhaps in the far future I hope to create something to make a little money with (next to my paid job). But that is only in the far future. If you think that Python is most definitely not suitable to create an app (for a smartphone, or for a website) then I should pick a different coding language. If it might be possible with python, it might be a good choice for me. Can you see what language is used to create this: www.playxylo.com That is pretty cool, and one can even download it as an app for offline use. I would love to create such things. I am very grateful for all the support and help I get here on the AtariAge forum. It is always a pleasure to read all the comments. People are really sharing their points of view, which are very educational for me. For something like the linked to site you need to master HTML5, CSS and JavaScript. As for Python, it indeed garnered way too many features. And indentation is part of the syntax (!) which is why I severely dislike it. It's pretty easy though to get a basic understanding and it has a lot of bindings to C/C++ libraries for speed and UI development. If you want to create an Android app, learn Java and the Android SDK. If you want to create a cross-platform application, I'd recommend C++ and a cross-platform GUI toolkit like Qt5/6, but there are a ton of others. qtcreator can also cross-compile for a lot of architectures, including Windows, macOS, Linux and Android. Better not lock yourself to Windows only Edited January 30 by ivop Quote Link to comment Share on other sites More sharing options...
zzip Posted January 30 Share Posted January 30 Coming from BASIC there will be a few "culture shocks" going into Python: 1) obviously there's no line numbers, but Python is extremely sensitive to indentation, it one line is indented with spaces and another is indented with tabs it may look correct to the programmer but fail. This catches me up all the time because editors will sometimes insert tabs where I didn't intend them. I also come from languages like C/Pascal where loops and code blocks are marked with curly brackets or BEGIN / END . Indentation is recommended but not enforced. if I put two statements on one line, or indentations don't 100% line up, the code still runs. So I find this aspect of Python takes a bit getting used to. 2) Python is very library-oriented. So you will find there are multiple ways of doing what you want to do depending on which libraries you include. Even simple stuff like reading files. 1 hour ago, Marius said: If you think that Python is most definitely not suitable to create an app (for a smartphone, or for a website) then I should pick a different coding language. If it might be possible with python, it might be a good choice for me. Web sites are coded in HTML + Javascript, Android apps are usually coded in Java and iPhone apps are coded in Swift or Objective-C. So Python isn't necessarily the top choice here. However there are a lot of app frameworks that will help you generate apps for the above and maybe use python in the process. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted January 30 Share Posted January 30 Yeah, the indentation thing is one of the nits I have with the language. But, I mean, python is perfectly fine for writing most non-web applications as long as you don't want super performance. playxlo.com looks like a typical javascript web site, as was mentioned. Modern dev, especially web stuff, is way more complicated than good old basic on an 8 bit. Anywhere you go you will have to get past a lot of complications, one of the biggest being the user interface. Since you like the playxlo example, try some web development with javascript, css, and HTML. All that is really doing is drawing some pictures to the web page and handling click events by playing an mp3. Get a book or take a course and have fun. If you want a desktop app, then python is fine, you'll just have to deal with picking a suitable UI library. QT, as mentioned, is a good start but there are others. Quote Link to comment Share on other sites More sharing options...
baktra Posted January 30 Share Posted January 30 On 1/29/2023 at 5:04 PM, Marius said: Why is that? Do you have a better advice for me? I have (quite some) experience with Atari Basic, Turbo Basic and Assembler (6502). So what is a logical step to do some coding on Mac/PC? Python is one of the more logical steps, given your background. Python, like BASIC is meant for beginners and doesn't have a steep learning curve. There are similarities with BASIC. However, I would simply learn Python from scratch. While doing so, you will find familiar concepts as you go. 1 Quote Link to comment Share on other sites More sharing options...
zzip Posted January 30 Share Posted January 30 6 minutes ago, baktra said: Python is one of the more logical steps, given your background. Python, like BASIC is meant for beginners and doesn't have a steep learning curve. There are similarities with BASIC. However, I would simply learn Python from scratch. While doing so, you will find familiar concepts as you go. I believe Python is also the most popular programming language in the world these days, so that makes learning it a little easier.. there are plenty of examples online to do anything you might think of. 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 30 Share Posted January 30 I think my issue with Python other than the indent thing 🙃 is that there seems to be a big push to get people new to programming and younger people into it almost to the exclusion of all other languages. As an example, I have several Raspberry Pi's and their magazine almost exclusively has all programming examples and projects in Python, occasionally they give a little C and some RP2040 machine code but it's not a fair balance especially as it's Linux based and C is pretty much built in and native to Linux/Unix. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 30 Share Posted January 30 (edited) Python strangles the medulla oblongata and mindless zombies result. Twisted which way books of bloated code ensue. It is a pile of moving coils with snake like and circuitous iterative babbling forked brooks of runaway spawn. Remember when everyone was forced to program in BASIC? Python is worse, it just sounds cooler. A bazzillion bullshit libraries full of security holes, you have to know the libraries better than the damn language. F*ck Python. But hey what do I know, I know I won't be using Python, That I know. So popular, just like zombie movies, it eats brains. Edited January 30 by _The Doctor__ 4 Quote Link to comment Share on other sites More sharing options...
DjayBee Posted January 30 Share Posted January 30 1 hour ago, TGB1718 said: I have several Raspberry Pi's and their magazine almost exclusively has all programming examples and projects in Python Wasn't the "Pi" in its name a pun on Python? Being Python the favoured language for it back then. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted January 31 Share Posted January 31 (edited) Python is handy, interpreted so no linking mysteries (although there can be DLL hell involved), and it's available on smaller platforms and architectures. That's part of the reason it's around so much. Nobody is writing really serious back-end applications or high performance games in it, though. It's fine for what you need. There's really nothing one way or the other that's special about it, it's just a tool, does some things better than others. The syntax is kinda funky but not overly weird. You can learn some object oriented programming with it too, although that's not it's strong point. Just start! Edited January 31 by danwinslow Quote Link to comment Share on other sites More sharing options...
+slx Posted February 4 Share Posted February 4 I found the ability to try out commands and their results in a shell rather than having to compile everything and look at results or a debugger quite nice (as my programming habits were formed with BASIC). I need to learn a bit more Python to do some data analysis on the job. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.