Slashdot Mirror


Why Can't We Put a BASIC On the Phone?

theodp writes "In the Sixties, we could put a man on the moon. Nowadays, laments jocastette, America's tech giants can't even put a BASIC on the phone. Woz managed to crank out a BASIC interpreter for the 6502 in the '70s. As did Bill Gates and Paul Allen. So, why — at a time when development has never been easier — can't Google, Apple, and Microsoft manage to support a free BASIC or other programming-for-the-masses development environment on desktops, laptops, tablets and phones?" My limited experience with Android development showed using Java to be obtuse and downright obnoxious to do anything (at least without Eclipse, and even with it doing anything non-standard required digging through horrendous ant buildfiles). And, of course, without a REPL things were even more obnoxious. There is the android-scripting project, but it doesn't provide particularly exhaustive access to the platform.

31 of 783 comments (clear)

  1. We do, it's called JavaScript. by Anonymous Coward · · Score: 5, Insightful

    We do, it's called JavaScript. With its shortcomings, it's still a better language than BASIC. There are BASIC interpreters written in JavaScript if you really want that.

  2. Codify for iPad by SuperKendall · · Score: 4, Informative

    We are starting to see some programming environments where you code on the device itself - one really cool one is Codify for the iPad. They have really thought through how to make entry of code easier using the on-screen keyboard, and you could learn quite a lot of programming concepts developing using this tool.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  3. Re:BASIC is an awful language by Anonymous Coward · · Score: 5, Insightful

    BASIC is an awful language

    You obviously never used BBC BASIC, which had procedures, functions, repeat until, do while, case, local variables, recursion, inline assembler... Hey, it still exists.

  4. Attention Old People by realinvalidname · · Score: 5, Funny

    Today's BASIC is JavaScript. And it's already on all the mobile devices. Even evil control-freak Apple's stuff. Young people already know this and do not need your Commodore/Apple/Atari nostalgia trips.

    Also, parachute pants are no longer a thing.

    Please update your expectations and wardrobe appropriately.

  5. Re:BASIC is an awful language by InterestingFella · · Score: 5, Insightful

    Yes, thanks for calling almost any programmer who started with BASIC a retard. When I was 7 years old I obviously should had went with ASM instead of something that was easily understandable and gave instant results, and hence motivated me to keep programming all the way to the current day.

  6. It Is Available by Paul+Slocum · · Score: 4, Informative

    I typed in "basic interpreter" into the app store and got several results. What are they talking about?

  7. Why BASIC? What for? by impaledsunset · · Score: 5, Insightful

    You can't get BASIC for your phone for the same reason you can't get a reasonable BASIC for your average GNU/Linux distro. It's just not that good and it only teaches you bad habits, and in the end - it's just not useful. It's not that good language for the masses as it is advertised, and you can't do much in it.

    Why not Python? It's a very easy language in which you can write something significant with the least effort and it has a very steep learning curve. It's easy, it's powerful, and if you ever plan to become a real programmer - it teaches you good programming habits.

    That said, I've added CHDK to my Canon camera, and it allows you to extend it with UBASIC scripts. It's one case where a BASIC variant is actually useful, because it's rather easy to implement, and it's used mainly for tasks that are quite suitable for it in their extreme simplicity. Can you give an example - what do you like to script in BASIC on your phone? Maybe you can support BASIC in your app in a way similar to CHDK!

    1. Re:Why BASIC? What for? by Lumpy · · Score: 4, Insightful

      "You can't get BASIC for your phone for the same reason you can't get a reasonable BASIC for your average GNU/Linux distro. It's just not that good and it only teaches you bad habits, and in the end - it's just not useful. It's not that good language for the masses as it is advertised, and you can't do much in it."

      This is the exact same mantra the computer geeks had about Microsoft BASIC when it came out for the altair. they were wrong then and you are wrong now.

      Microsoft got RICH off of that useless language, and it was pirated like crazy. BASIC is very useful for the average joe as they can do simple things with it. It's why Office scripting is done with BASIC and not C#

      That said, the reason we don't have a nice "visual basic" for phones is because Apple and Google does not WANT that on the platform. They do not want people writing their own apps easily. It's not profitable to allow everyone to write their own custom apps.

      --
      Do not look at laser with remaining good eye.
    2. Re:Why BASIC? What for? by narcc · · Score: 5, Insightful

      it only teaches you bad habits

      Bullshit. What bad habits are you imagining? I'm willing to bet that you're just parroting nonsense, and that you don't actually know.

      Even old unstructured BASIC taught you the skills and techniques necessary to structure and organize your code when you moved on to an assembly language. Moden structured BASIC is a nearly perfect introductory language. (That is, the language stays out of your way, letting let learner focus on the task, not niggling details.)

      . It's not that good language for the masses as it is advertised, and you can't do much in it.

      Bullshit. It WAS the language for the masses for decades. Millions of programmers got their start with BASIC -- Either via teletype or their home micro. From the early 1970's all the way into the mid/late 1990's

      Oh, and WHAT exactly can't you do with BASIC? I seriously doubt that you can answer that question, or have even put a moments thought into your ridiculous comment.

      Why not Python?

      Don't get me started. Python as a beginners language is a JOKE compared to BASIC. Of course, you Python zealots refuse to recognize the serious problems with your favorite toy.

    3. Re:Why BASIC? What for? by InterestingFella · · Score: 4, Insightful

      Using something like touchdevelop where you have no real access to anything doesn't teach kids shit. At least with the android scripting layer, you have access to many of the underlying api's and actual real apps can be written and distributed in the market.

      It teaches them the fun side of programming, which is even more important for beginners. If you're starting out and just want to try something, you shouldn't have to spend hours putting up your environment and do lots of googling and asking for help. It takes the fun out of it and kills your interest in programming completely.

      Everything else you can learn later anyway, but first impression counts hugely. You can either throw something fun together in a hour or go read tons of material about APIs, pros and cons of different programming languages, libraries you need to import and best coding practices. Guess which one gives better first impression to novices.

    4. Re:Why BASIC? What for? by caseih · · Score: 5, Interesting

      If you say so. Sounds like you haven't done too terribly much with python. I dislike a lot of things about a lot of languages, but I can't say that any of them (well maybe except PHP) are "horrible." I despise curly braces but I can't make the claim that Java is a "horrible" language. Some are more awkward than others sure. There are many things you can complain about in python but whitespace formatting falls pretty far down the list. Having a 1:1 correspondence between my psuedo-code on paper and python code is extremely nice and productive too. Broken web sites and e-mail clients do make cutting and pasting python code problematic, I'll grant you that. But my experience with python has been much the same as ESR's. (And he had the same initial reservation as you.)

      I am bitter that Epiphany chose to tear out python and replace it with Javascript of all things. Sort of makes sense given that Javascript is an integral part of browsers. But still makes me sad. Python is such a good language for writing extensions in.

    5. Re:Why BASIC? What for? by Anonymous Coward · · Score: 4, Insightful

      "you Python zealots refuse to recognize the serious problems with your favorite toy"

      Bullshit. What serious problems are you imagining? I'm willing to bet that you're just parroting nonsense, and that you don't actually know.

    6. Re:Why BASIC? What for? by viperidaenz · · Score: 5, Insightful

      You're both mammals, so what... 90% common DNA?

    7. Re:Why BASIC? What for? by symbolset · · Score: 5, Insightful

      The entire basis for this slashdot article is a Y-Combinator blog post from a poster with 3 Karma with 4 comments from 7 hours ago lamenting that there's no full package for developing for phones produced by the OS vendors. The "Boot to BASIC" thing is a retrocon issue more appropriately stated "and we wore onions on our belts" (a sin of which I am also guilty). While I applaud the /. rapid response on this critical issue the underlying assumption that these things don't exist is simply untrue. You'll find the Android SDK here. If you prefer an easier install - especially if developing for nVidia Tegra (but not exclusively) you will find that here. The equivalent iOS version is here. If you must have it, the Windows Phone SDK can be found here.

      And yes, all of these things are for developing the app on a PC and deploying and testing on a phone or tablet. Much like the designers of landing gear for the 787 don't machine their prototypes out on the tarmac at Boeing field like their progenitors did, mobile app designers now prefer sitting in a comfortable workstation with a comfortable chair with decent compile times, multiple monitors, a reasonable keyboard and mouse, printing and debugging support rather than developing software on the device itself.

      Booting to BASIC (or as was the case on the IBM 5100, APL) was very useful at that time because there were no apps - in some cases no media reader to store or load apps if you could get them on media. We got our apps by buying magazines or such, and manually typing the code in and debugging the typos. That day is long gone, and that's a good thing. Even Windows Phone has thousands of apps and a publicly available SDK - though for me the cyanogen and Android route would be more fun.

      Now how did this manage to hit the front page of /.? I smell a rat.

      --
      Help stamp out iliturcy.
    8. Re:Why BASIC? What for? by anubi · · Score: 5, Interesting

      Coming up with the clever algorithm to solve a problem is what is fun

      You nailed that one as far as I am concerned.

      This week's project for me... I have this old DOS based SPICE analyzer I really like. Its short, simple, and generates great plots - on an old EPSON dot matrix printer.

      Now, I really want to get rid of that printer. That old spice analyzer is the only thing I have that requires it. What I really want is a bitmap image file that will go into anything. So, its time to dust off the ole Borland Turbo Assembler.

      I plan to hook the printer interrupt and divert the printer data to my program just like a printer capture program, but instead of just capturing the data to a file, I will take it byte by byte and convert it to bitmap format. Lots of rotate-thru-carry instructions to rearrange the data intended for the printhead into bitmap format. Its a state machine, so there is a 6-way switch for the incoming byte to be tested for "esc", tested for "L", tested for "2", store hi-byte, store lo-byte, and append into bitmap. This is easily done in assembler with an index to an array of pointers to subroutines.

      ( easy in C++ too, but I was having trouble trying to insert the data, delivered to the printhead 8 bits at a time, in a vertical format, into the bitmap when the assembler would let me use the "carry" bit to transfer the incoming byte bit by bit into the most significant bit of eight bytes in the bitmap). There is a helluva lot of looped busywork to rearrange all the bits.)

      Being all the plots are generated by the same program, all have the same size and use the same control-code sequences so I do not have to reconstruct the entire esc sequence interpreter of the Epson printers.

      I haven't had this much fun since reading Jeremy Bentham's "TCP/IP Lean" where he implemented state machines in C++ to make TCP/IP stacks, and I wanted to modify it so I could get bidirectional file transfer through the "FORM=FILE" method.

      That's the fun of this. Doing things that are not on the menu.

      As far as Basic goes, I actually still use my GWBasic interpreter at times to verify some little math loop. Its like using a hand calculator in a way, its a short sweet way of running a snippet, but I would not want to develop "serious" code on it any more than I would want to design my bitmap generator in DEBUG.

      I do enjoy doing things the old way on my old machine, where I understand exactly what and why I am doing anything, and know exactly what every byte in the code does. Its something I do not know in the new machines, and I can easily end up using hundreds of kilobytes of code along with megabytes of required libraries to execute some little algorithm I could code in assembler for 4k bytes or so of code. Its almost like trying to buy a house, signing off on reams of legal documents I do not understand, just to say "I agree to buy this house and I will pay for it in monthly payments of whatever. If I do not pay, you have the right to take the house back".

      --
      "Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]

    9. Re:Why BASIC? What for? by A12m0v · · Score: 5, Insightful

      White spaces

      --
      GENERATION 25: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
    10. Re:Why BASIC? What for? by OeLeWaPpErKe · · Score: 5, Interesting

      While I am very reluctant to mention this problem : speed. Now I am very, very tolerant of speed issues in scripting languages, as I know it doesn't really matter. But python ... python is an absolute disaster. Python claims execution speed doesn't matter because it's easy to use, then encases your legs in concrete. The argument justifying that one ? "It's very easy to move 0.01 cm".

      So here's the issue : you always get the impression python can be used to do calculations, python claims to be capable of them. And indeed it's syntax seems to allow for more. So let's compare:
      1) C, C++, hell even Java : c = a+b (1 assembly instruction)
      2) CPython: c = a + b ( > 2500 assembly instructions)

      This means that a C program running on an 8086 will actually calculate faster than a python program running on a current pc.

      The speed of CPython is so bad that it regularly becomes a problem, and requires all sorts of complex solutions from massively parallellizing using numpy to rewriting half the project in C/C++. That's my main gripe with python. And numpy may approach (from a large distance, but at least not a factor 200 anymore) the performance of normal C/C++ loops, but if you use a numpy like vector processing library in C/C++ (there's many) you're back to a factor 200 or more distance from numpy.

      Second is memory usage. I made the mistake of loading in a year's worth of monitoring data using the obvious method : a class representing a datapoint. Result : 12 GIGS (in C++ doing the same thing to the exact same data resulted in 120 megabytes) ... Yes, again numpy can solve this ... but only by greatly increasing complexity and destroying the utility of 90% of python's language features.

      Third is the fact that python is very much a typed language, but the only available variable type is a void*, and it actually allows changing the type of a variable, which is a horrible, horrible mistake (and why ? out of some sort of obligation to the idea of dynamic languages supporting this monstruosity). Same for adding members to class instances after creation time. Horrible.

      Fourth, the massive complexity and time-dependencies that result from actually using dynamic aspects of the language, introducing tons of non-obvious dependencies on the exact execution order of the program. If these features are used they directly lead to classes that only become valid useful objects after 3-4 method calls and dependant on all sorts of stuff succeeding. Our style guide outlaws actually using the features that make python dynamic, and I doubt we're the only ones.

      Fifght, the fact that the dynamic nature of python makes it very hard to document libraries that make use of it.

      Sixth, you can't use static analysis on python programs. So ipython just about the best possible autocomplete you can get (ie. autocomplete can only work by executing the program you're trying to develop)

      *sigh*

      Program a bit in haskell. Now, haskell's pedantic too, no question there, but you will find 10 places python could be improved before you even get through the tutorial.

    11. Re:Why BASIC? What for? by amRadioHed · · Score: 4, Interesting

      That said, the reason we don't have a nice "visual basic" for phones is because Apple and Google does not WANT that on the platform. They do not want people writing their own apps easily. It's not profitable to allow everyone to write their own custom apps.

      Whey did Google create this then? It sure looks like an attempt to enable app making for everyone.

      --
      We hope your rules and wisdom choke you / Now we are one in everlasting peace
    12. Re:Why BASIC? What for? by OeLeWaPpErKe · · Score: 4, Insightful

      Seven: each time you mention the speed issue, which obviously exists and thoroughly limits python, the only response consists of ad-hominems.

      I almost forgot about that one.

    13. Re:Why BASIC? What for? by rev0lt · · Score: 4, Insightful

      1) C, C++, hell even Java : c = a+b (1 assembly instruction)

      Actually, in most environments that would be compiled as at least 2 instructions, assuming the compiler was optimizing for register use. There are some marginal cases where you can actually combine the operation if calculating a offset address, but by your code I doubt that's the case. And that is, of course, assuming a and b are <=16-bit integers, so you can actually compare them on a 8086.

      This means that a C program running on an 8086 will actually calculate faster than a python program running on a current pc.

      Probably yes. But do not assume that a 8086 will execute 1 instruction per clock cycle (heck, a 8/16/32bit mul on a 486DX takes up to 11 clock cycles!), and most modern processors with out-of-order execution will execute up to 3 instructions per cycle. The cache and RAM timing is often the limiting factor of the processor, so you can say many modern processors idle very well while they wait for memory operations, when executing code not specifically optimized for their prefetch queue size and memory alignment requirements.

      I'm not a python user nor a python fan. I use other dynamic languages such as PHP that suffer from some of the problems you mention, but I think you are mixing apple and oranges. Just because you _can_ use python to prototype some calculations, it doesn't mean it's the right tool for the job. Sometime in my career I worked as a Cobol programmer, and I've used DirectX with Cobol just for kicks. It doesn't mean it's the right tool for the job (and believe me, Cobol is NEVER the right tool for the job :D). The problems you describe with memory consumption are what I consider "rookie mistakes" (maybe in your specific case aren't, but as a generic example they are) - classes aren't the answer for everything, and variable sized datasets should always be windowed, regardless of language.

      I should point out the pain that is to work with both basic datatypes (byte, int, long) and strings in languages as C and C++. If your compiling your simple example above on a 8086 and b happens to have the value 70000d, you'd need at least 4 or 5 instructions in a loop to complete the operation. You usually cannot make strong assumptions about the size of your datatypes, at the cost that the compiler will figure it out. Most often than not, it won't, and that's why an algorithm in plain C written on a 32 bit processor can fail on a 16 bit one.

      Regarding language learning, I am a strong supporter of both Pascal-styled languages and Assembly. People should learn how the machine actually works, because knowing the details of execution WILL make them better programmers. I somewhat understand the void left by "old basic", as you could access and change memory contents and device addresses directly, and it was simple enough to learn the basic structure of a program. Touting OO languages as a first language is a horrible horrible idea that will dumb down future programmers to "one-size fits all" solutions.

    14. Re:Why BASIC? What for? by shutdown+-p+now · · Score: 5, Informative

      WP7 has TouchDevelop.

      Android has several BASIC interpreters, JS, Lua , Ruby, and a couple of custom-designed languages in the Market.

      You were saying?

  8. Indeed, Microsoft has done exactly this by MAXOMENOS · · Score: 4, Informative

    It's available here. Of course, it's only for Windows Phone, and it's a compiled language instead of an interpreted one. I'm pretty sure that Mono is trying the same thing.

  9. For that matter by MAXOMENOS · · Score: 5, Informative

    There's also BASIC for Android. I can't imagine that it's that much better than other kinds of Android development (Android development is a bit of a PITA with lots of different aspects), but it's there.

  10. Re:Windows Phone 7 by elabs · · Score: 4, Interesting

    Yeah, you can write apps for WP7 in VB.Net or C#. It's actually pretty amazing how simple and intuititve the free tools are. You can download them and have an app running in the emulator in just minutes. Adding controls is drag-n-drop from the WYSIWYG editor. The contorl libraries are impressive, especially when you consider the freely downbloadable WP7 "Toolkit". The main thing that is different than BASIC is the powerful langauge capabilities like OOP, LINQ, properties, threading, concurrent collections, generics, closures,events, delegates, a LINQ-to-SQL embedded database, easy encryption libraries and the list goes on and on.

  11. Five seconds of googling later by SleepyHappyDoc · · Score: 4, Informative

    http://www.basic4ppc.com/ comes up with Basic4Android.

    --
    Stasis is death. Embrace change.
  12. Free Basic by Anonymous Coward · · Score: 5, Informative

    There is also Basic!, which is free as in a speech about beer.

  13. Re:you are the dumbest shit imaginable by Roachie · · Score: 5, Funny

    Damn, this thread went apeshit fast.

    --
    This sig is not paradoxical or ironic.
  14. Re:you are the dumbest shit imaginable by PyroMosh · · Score: 5, Insightful

    The vulgar one has a point though. There are classes of software that are aimed at audiences that wouldn't want them if they had the skills to write them on their own.

    Do you think that most children's games would exist if they had to be written by kids?

    BASIC is this kind of problem. I suspect that nobody who ever wrote a BASIC interpreter had a practical use for it themselves. Maybe during the Apple II / TRS80 days, but certainly not more recently than that. In recent times, it's a tool for less experienced programmers to learn with and solve very simple problems, not a tool someone who could write software would employ to solve a practical problem.

  15. Re:you are the dumbest shit imaginable by Grishnakh · · Score: 5, Insightful

    Exactly right. Anyone who has the skills to write a BASIC interpreter will also be someone who thinks BASIC is a POS, and won't have any interest at all in doing such a thing without a handsome paycheck to compensate them for that time lost. There's no shortage of free and open-source language compilers/interpreters: C, C++, Java, PHP, Perl, Python, Erlang, etc. Some of these have some corporate backing (probably the Java compilers), but many are totally free projects done by volunteers. But obviously, these volunteers are working on compilers for languages they actually like and would want to use themselves, not languages they would sneer at in derision.

    So if someone wants a BASIC interpreter for phones, the only way it's going to happen is if they do it themselves (not likely as pointed out above), or if they pay someone else to do it. As that effort is non-trivial, it would more realistically take a corporate project to do it, and that's only going to happen if some company or companies think they can profit off that effort somehow. I seriously doubt there's enough aspiring BASIC programmers out there demanding BASIC on their phones (with wallets open to pay for it) to justify this project for any company. Anyone who really wants to do some serious programming on their phone already has the tools available to them (i.e., Java on Eclipse), and won't want to be hamstrung by a crappy language (Java's crappy too, but relative to BASIC it's wonderful).

  16. Re:you are the dumbest shit imaginable by bistromath007 · · Score: 5, Insightful

    Alternately, the programming community could go back to its philosophical roots, from the time when it was programming rather than developing, and realize that an intelligent culture is fostered by the democratization of coding. "Normal" people cannot learn C without a teacher. These are the kids we always hear and talk about on /. who, despite not having the talent to ever become great mathematicians or comp-sci oracles, can still benefit from the practice of well-ordered thought that a basic (woah) understanding of coding provides.

    Today's programmers need to be less like the financial industry jackasses of today and more like the programmers of yesterday. You don't need to do everything for a paycheck. Sometimes when you do something, it's for the people, and for the future.

  17. Re:you are the dumbest shit imaginable by martin-boundary · · Score: 4, Interesting
    That's going a bit overboard, I think.

    BASIC was invented by a mathematician, John Kemeny, and a computer scientist Tom Kurtz. They did this as part of a revolutionary change in how students were taught mathematics, and suceeded admirably.

    Here's an online version of Kemeny's book Introduction to Finite Mathematics with Laurie Snell and Gerald Thompson. What you have to understand is that this book looked nothing like the books on applied math of the day. It was truly revolutionary, and a lot of modern books have copied its ideas.

    You'll also find that BASIC is very well suited to solving the kind of problems that are in that book. It's even arguable that BASIC's suitability for solving simple number crunching problems is what made the microcomputer revolution possible (remember, the killer app for the early PCs wasn't games, it was the spreadsheet - people bought micros so they could program compound interest...).

    It's of course not so well suited for programming consumer software, but then again the language was invented 15 years before consumer software took off.