Small Basic? Slow Basic!

msb There is such a thing. Really. It’s part of the Microsoft DevLab Projects and it’s intended to corrupt the youngsters: Microsoft Small Basic.

Surprisingly, it’s not popular in the media. For once, Microsoft has been quiet on this “new, simplified reimplementation of Basic” that runs on .NET. I’ve found about it by chance, from the French magazine Micro Hebdo nº 585.

De 7 à 77 ans... La maladie d'amour version Microsoft?

De 7 à 77 ans... La maladie d'amour version Microsoft?



They even have a Small Basic Blog, which lets you find of a reimplementation of GORILLA.BAS!

Unfortunately, Small Basic is terribly slow. I mean sloooooooow! I don’t know what they smoke there, but GORILLA.BAS was running on a 80386 at 16 MHz something like 100x faster than its reimplementation runs on a P4 at 3 GHz!

sb_gorilla

The bloody program is unable to read the keyboard properly. It can take seconds to read the digits you enter for speed. It can miss them. Or it reads them twice, you can never know. In the above case, I wanted to enter 70, not 700, and I wanted the speed of 90, not 0.

Otherwise, the IDE is “ribbonized”, and with smart IntelliSense. Here’s one of their own samples, took from the introductory document (they don’t ship actual sample files):

turtle_code
And the running turtle, also extremely slow to draw, but finally it gets there:

turtle_output

Could Miguel reimplement Small Basic for Mono? Maybe it’s not patented… yet. And it’s interesting, as it might boost the sales of quad processors.


Printer-friendly version Printer-friendly version

 
 

18 Responses to “Small Basic? Slow Basic!”

  1. Gravatar of ASan 1. ASan
    Jul 23, 2009 at 14:26

    let's make de icaza know about this latest state of art technology, we absolutely need it on linux

  2. Gravatar of chris 2. chris
    Jul 25, 2009 at 11:14

    If "Small Basic" is not your thing then perhaps you might like to try the original "SmallBASIC" over at smallbasic.sourceforge.net - Cheers Chris

  3. Gravatar of Z 3. Z
    Jul 27, 2009 at 14:01

    Almost all the new programming languages created after 1990 are slowass piece of shit.

    I can't believe anything but the language designer getting money from hardware makers. Why the most efficient languages (and yet productive) such as D, a safer replacement for C++ fail to market themselves while shit like Java, .net, Python, Ruby take over the world.

    This small basic shit is insane. BASIC was a slow language even in its successful days but they turned it so slow even modern computers gets a frame per second at most.

    I often find myself wishing to go back to the times of DOS assembly and C programming. Lots of common tasks were actually faster, such as booting, shutdown, doing simple stuff in your word processor and so on.
    That and the fun of knowing how the hardware works instead of being totally abstracted away in some obtuse API.

    No one can design software nowadays without writing a bookful of specs, UML diagrams and XML configuration files.

  4. Gravatar of Béranger 4. Béranger
    Jul 27, 2009 at 14:04

    Wrong… you can do without XML configuration files. (XML is yet another religion, you know.)

  5. Gravatar of z 5. z
    Jul 27, 2009 at 16:09

    I was talking of the industry as a whole, I didn’t say you personally need XML but almost in all cases you will HAVE to deal with it if you work with other people. (Hell is other people you know.)

    Try to work on a project that make use of something like Spring. Welcome to XML Hell. You will be found writing more XML than CODE.

  6. Gravatar of Béranger 6. Béranger
    Jul 27, 2009 at 16:14

    But who said that J2EE or .NET are rational and reasonable paths of progress in the IT field? Who said the current way of developing over-complex projects is not plain, sheer insanity?

  7. Gravatar of Roi des Cons 7. Roi des Cons
    Jul 27, 2009 at 16:35

    "shit like Java, .net, Python, Ruby take over the world.
    "
    I suppose they are slow because they are interpreted. But :
    * C (and fortran 90, as far as I remember: it remained very marginal) can be interpreted … for pedagogical purposes (it is/seems easier to learn an interpreted language than a compiled one : it is a way to "take over the world"). This is an implementation choice.
    * if one has very repetitive tasks, it is not impossible to recode them in C (C++, Fortran that is another "language" war)
    and to dynamically link them with Python (Ruby too, I suppose); for R (they chose an interpreted language for pedagogical purposes and in the purpose of dynamically deriving a function f -> df/dx, in a formal way and use df/dx comfortably), I do it currently….

    * Basic can be compiled and then gets fast…

    This is rather the way they are implemented|projects are managed than the fact that they are languages which makes them slow…
    For the starting times of PCs (slower than CPM), the number of services (checking the disk, the internet connection….) is very huge, and I do not know whether it is well coded (but it starts, anyway?).
    This has nothing to do with the choice of a language….

  8. Gravatar of z 8. z
    Jul 28, 2009 at 15:45

    @Béranger
    Well we have to make do with what we have. It's like operating systems, all of them sucks nowadays we can only pick the lesser evil.
    Java sucks but it's the most common language in the business.

    @Roi des cons
    Talks about programming languages should be left to those who actually know what they are talking about.
    Yes, compiled languages can be interpreted and some interpreted languages can be compiled. Research on that matter can be of interest to the academic type but certainly not to those who are well grounded in reality.

    And reality's a bitch. The semantics, as defined in the language specs (or, in the case of crappy open source born languages, as defined by their reference implementation) will shift the side toward which the language will lean, whether on the compiled or the interpreted side. Requirements such as dynamically creating classes and methods on the fly will dictate the presence of a runtime and trade offs will have to be made.

    Only a SUBSET of those languages can be "compiled". If you are restricting yourself to that subset it's like programming in a wholly different language. Programs that use fairly dynamic frameworks like Ruby on Rails will NEVER be compiled down, that's a fact of life and no amount of hand waiving will do away with the harsh realities of computing.

    Basic dialects have been compiled but that's hardly "proof" of the ability of "interpreted"-side languages to be compiled down to bare assembly because BASIC is more a syntax than an actual language. "Basic" has seen unstructured programming, imperative, object oriented, functional, embedded and compiled implementations over the time and has been stretched so much it's hardly a "language" as much as a syntax that forms the basis of very different dialects on their own islands.
    So you should be more precise when you say that "basic" has been compiled you are talking of fine tuned dialects that have been CREATED FOR THAT PURPOSE. As opposed to creating a compiler for an existing language without changing anything to the language itself. No one took an interpreted basic and created a compiler for it. They created a new, different basic and then compiled that down. NOT the same thing as taking an unchanged Python program written for its interpreter and expecting it to run under a new compiler.

    AS for starting times of PCs I never implied it was the fault of programming languages, I lambasted ALL the modern software design mindset (languages but also software design and practice), of which newer programming languages are also at fault.
    Still, if programming languages are not to blame in the case of Windows boot times (Vista's a dog because of the quantity of processes), they are partly at fault for Linux slowass boot times. The boot process for Linux involves running a metric ton of SHELL SCRIPTS, for fuck sake. On the speed scale shells script are pretty low. Windows XP boots MUCH faster than most Linux distributions with a comparable set of services at boot time. Even with lots of programs ran at boot time Windows XP is still pretty lean and fast and linux distros like Fedora are pure dog.

  9. Gravatar of Béranger 9. Béranger
    Jul 28, 2009 at 15:58

    "Java sucks but it's the most common language in the business."

    Right, but do I have to remind you how *expensive* is the development of enterprise portals & other enterprise software?

    Not to mention the Java-based SAP applications. SAP is worse than the pest: it will eat millions of bucks and many years, just to result in an infinitely dumb and dinosaurian software!

  10. Gravatar of Roi des Cons 10. Roi des Cons
    Jul 28, 2009 at 16:43

    @z la con-currence est rude.

    " if programming languages are not to blame in the case of Windows boot times (Vista's a dog because of the quantity of processes), they are partly at fault for Linux slowass boot times. The boot process for Linux involves running a metric ton of SHELL SCRIPTS, for fuck sake. On the speed scale shells script are pretty low. Windows XP boots MUCH faster than most Linux distributions with a comparable set of services at boot time., for fuck sake. On the speed scale shells script are pretty low. Windows XP boots MUCH faster than most Linux distributions with a comparable set of services at boot time.

    Well, I have an XP installed -same HW- and a live USB (which is likely to have greater boot times) Linux (and I tried with many linuxen)…. and in the case (without pun) of my computer, XP is the slowest, though there are "a metric ton of SHELL SCRIPTS" under linux (and, if it were relevant, CPU occupation would be very high as interpreting bash is CPU consuming…..: it would fastly get hot, qemu could detect it -before it is installed, I test- I suppose (but you can have convincing proofs of the contrary) most of the times are spent … **waiting** for HW/IT lines to be detected).

    "Talks about programming languages should be left to those who actually know what they are talking about.
    "

    Answers to ill-proven generalities do not need to be fully argumented….

    "If you are restricting yourself to that subset it's like programming in a wholly different language.
    "

    A subset cannot be "wholly" different from the whole…. and is likely to be more portable.

    "Research on that matter can be of interest to the academic type but certainly not to those who are well grounded in reality.
    "

    If such an opposition exists… in the real world (and good programmers have sometimes a look at the academic world : else, they quickly grow into narrow-minded whiners -FYI : I am not at all specialized in programming, rather in vegetation growth -).

    If you are interested in the optimisation for an interpreted language, you can have a look at " http://wiki.r-project.org/rwiki/doku.php?id=tips:programming:code_optim2&s=time" : a ratio of 3000 was achieved, for the same result, with the same interpreted longuage, on the same machine, with rational units….. Telling that a language sucks, on execution time bases (measured in metric tons?) , in the *real* world, can show some lacks of skills….. I can agree the way projects are managed today are leading to new bugs (thereforefore : more programmers to "fix" it, in a "positive" feedback) but it is not a language fault.

  11. Gravatar of z 11. z
    Jul 28, 2009 at 16:55

    That’s what you get in a society that is profit-driven. There is no incentive to make software development and deployment fast and pain-free. Service companies thrive on support contract.

    The best enterprise software I’ve ever had to deal was DOS based applications. Seriously.
    They were the most intuitive by any means for example, apps written for shop clerks to manage their inventories. Any of the features packed inside were features the customer actually needed, there was not a single line of useless code written, it was fast and had no bling, ran on slow hardware fine.

    I wish we’d go back to DOS for most custom software development.

    Web apps are the worst offenders in my opinion. Even with slowass but concise frameworks like Ruby on Rails it’s still very much a clusterfuck of unrelated technologies brought together by a chaotic evolution with no actual amount of design involved. HTML support for quirky documents doesn’t allow the creation of smart tooling that would alleviate the pain of authoring, CSS can’t do any decent three columns layout without relying on ton of hacks, javascript is a cobbled together crappy language by someone who had no actual experience in language design in the past (Brendan Eich), ajax is an ACCIDENT in history (XMLHttpRequest was created by Microsoft for their own non standard need) I could go on and on.
    You spend more time learning about the bugs and design quirks than actually do shit when you deal with web development. Even simple functions like Javascript parseInt do not get it right. If the string begins with 0 it will parse it as an octal number. What the fuck ? I’ve never seen a language with so many amount of wrong. Brendan Eich should be killed on sight for having created his own pet language and “standard” for Netscape instead of implementing an already tried and true programming language designed by people who know better.

  12. Gravatar of Béranger 12. Béranger
    Jul 28, 2009 at 16:59

    I agree with you on the DOS-based applications. No bling-bling, just software that does what needs to be done.

  13. Gravatar of z 13. z
    Jul 28, 2009 at 17:09

    @ Roi

    R is not a general purpose language. That should end it in one line, I am following your advice of not needing to argue with bullshit. R being optimized and getting faster for its purpose has no incidence on the ability of highly dynamic, general purpose languages like Ruby and Python to truly get faster (and not just a little bit).

    AS for the subset thing, restricting yourself to a static subset in a highly dynamic language is like using a wholly different language, I persist. If you write code in Python that doesn't use ANY of the dynamic feature AND is written in such a way that you could STATICALLY INFER the types you are not in the same game.
    Shedskin is a python implementation that exactly does this, compiles any piece of python code written in a very static way to C++. But then you are writing C++ code with a python syntax, you are NOT writing in "Python" the language. You can't use stuff like Django with Shedskin.

    Also you are confusing "interpreted" in general as a word for implementations, and "interpreted" as in dynamic languages. Some "interpreted" languages are effectively the same as a compiled language implemented by a lazy programmer but the common definition for a language to be itself called interpreted (and not just the implementation) is to be dynamic.

  14. Gravatar of Roi des Cons 14. Roi des Cons
    Jul 28, 2009 at 17:57

    "R is not a general purpose language. "

    I agree (and it has dynamic typing -I recommand my colleagues *not* to use, in order to be able to convert slow parts to C/C+++++++++++++/Fortran- ) , but:

    a) it can load any library (making the mere idea of general purpose irrelevant -
    do longuages have a purpose????
    -) it is a classical way of having slow parts getting much faster, after finding them (it is often a small amount of lines which eats too much CPU) , rewriting them in C/Fortran and linking them …. I am sure it works with Python, too (FYI for the same simple task R and Python are about as fast)… and I am not such a longuage hopper….

    b) it can call any command ("system(paste('gimp', filename))" will launch … the gimp ) as an expensive (in view of RAM consumption) substitute for command interpreter : I used it under W$ this way before having cygwin's bash….). as can do any C/g95 executable if one wants to….

    Removing dynamic typing whenever possible seems rather safe (at least to me)..

    Nota : I might agree whith you that the way internet longuages are done (and it is a very minor part of the way Internet is getting : the "legal" aspects are likely to be major troubles) is not optimal : my choice (from a guess 5 years ago) was not to program for the internet (rather for trees growth).

  15. Gravatar of z 15. z
    Jul 28, 2009 at 21:19

    You are falling into the trap of the "turing tarpit". Just because it (can theoretically) does not mean you (should). Yes, languages do have a purpose as created by their designer, you are not going to tell me that you outsmart those who designed the language you are using right now ? some languages are much more suited for a purpose than others, while some try to stay neutral and be as useful as possible to anyone.
    R is not used by people outside its niche, it's not general purpose.
    Being able to call any library is irrelevant, if almost 90% of the code of your app is written in C then why you'd use the (insert other language) anyway ?

    Python is general purpose, both in the goals set by its creator and its actual, real world usage. People wrote web servers, GUI apps, games (including commercial games such as Eve Online), numerical calculation toolkits, a competitor to Microsoft Outlook, hell the OLPC project wrote a whole desktop system, Sugar, based on Python.
    Python is slow and people are abusing it, though. Sugar was one of the worst idea ever, if you've ever seen a OLPC running you'd see how dogslow the GUI was even though it was very simple and uncluttered. The hardware was cheap, yes, but it doesn't explain how hellish the experience was considering its GUI wasn't technically more advanced than something like Windows 95. Real world usage of most Python apps outside of server apps that are nothing more than calls to C++ databases such as MySQL shows how painful the experience is.
    Years ago I've tried one of those pure python RSS reader app written for GTK, named "Straw". It was excruciatingly slow and unbearable. For a fucking RSS reader. No matter how naïve the algorithms used were, no matter how crappy the programmer behind it was, I can't believe a RSS reader was so slow even with just one feed subscribed to. Crappy RSS readers written by dumb programmers usually crash on malformed RSS or corrupt their data but I've never seen run SO slow other than that Python app.

    Talking of slow. One of the most ambitious GUI application written in Python happens to be way too slow for real world usage too. Chandler, the outlook competitor.
    Just try it, it's still "alive" as a project.
    http://chandlerproject.org/
    Not even the fattest, most framework abusing Java app is as slow as that piece of crap. Chandler, the PIM written in Python and WxWidgets GUI.

    People love to point at theories and possibilities and whatnot. The real world laugh at them, though. Ton of naïve programmers have been sucked by the marketing driven by dynamic language proponents and build ambitious projects in them only to see them fail in the long run. There are two way out for those, either they come to hate the languages or they suffer from the stockholm syndrom and instead of using a language more suited to their purpose they'll change their purpose and start writing yet another database-driven app where all of the code that matters is actually SQL calls to a fast database and hop on the "We hate rich client apps" bandwagons, preaching to the world the wonders of web apps.

  16. Gravatar of Roi des Cons 16. Roi des Cons
    Jul 29, 2009 at 09:51

    "numerical calculation toolkits" written in Python : the inner parts of numpy/pynum are dynamic links to shared objects/dlls originally written in C, C++, Fortran , the parts users see being dedicated to interfaces and to verifying one doesnot send too wrong input values, the arguments are in the right order, etc… where a concise , easy to debug, user friendly language is useful (with nice user interfaces), no matter whether it is slow or not.

    "R is not used by people outside its niche, it's not general purpose.
    "
    Telling something is a niche (the causality link you give is soo funny, BTW) has two drawbacks :

    a) it might show that one is not interested (time/ skills/ tastes) in that thing.

    b) in the case of R, it has had a great success under Windows… Maybe there are more R installed under Windows than all sorts of linuxen put together (sorry, I do not make a referendum before deciding in what I'll get interested into and therefore have no figures : but the niche argument is so ironic in the GNUlinux world -leads to annoying questions like :is linux general purpose ? has it a purpose? is its purpose fulfilled in the real world?- ).

    "Being able to call any library is irrelevant, if almost 90% of the code of your app is written in C then why you'd use the (insert other language) anyway ?
    "
    Because the other language is more easy to use/modify/debug (the proportion is/should be rather 10% than 90%, BTW, and I prefer Fortran to C -and both are able to call libraries! ) What needs to be fast being (re)coded in C/F(does not wait for keyboard strokes, nor for mice movements ; thus , if one disagrees with ergonomy/drawings, it is easy to change (make better??) : numerical libraries change very slowly, GUI change everytime as nobody found anything fully satisfying -you have convincing examples - so one must be ready to frequently recode the human interfaces| drawings).

  17. Gravatar of z 17. z
    Jul 29, 2009 at 13:13

    @Roi
    Butt hurt over being told you are working in a niche ? There are far more linux boxes in the world than R installations if only because it's the most popular server OS and a very popular embedded OS for stuff like routers and now, mobile phones (Android, Palm WebOS).

    Nice try by the way but trying to downplay the usefulness of linux is not the right approach to troll someone like me who is OS-agnostic. I use windows on my desktop and I have no use for OS flamewars.
    R has only found a use in its own niche, that's a fact whether you like it or not. And trying to say otherwise is trying to contradict the people who CREATED that language anyway because those guys didn't try to make it general purpose and it shows.
    It's fine that you use that language for your statistical needs but trying to downplay the realities of programming languages because you don't like the idea of being told you use a niche platform is beyond stupid. I have had experience in lots of very different PL, be it Common Lisp, Smalltalk, Java, C++, Python and Ruby and I can say that while all of those can be defined as general purpose I have never seen something like R get out of its scientific niche and I think you should read the "Masterminds of Programming" book to get an insight on what goes behind language design. Languages HAVE a purpose, like it or not. Those that I have mentioned are general purpose but have had different goals and approaches to software engineering, scratching a different itch its designer had to face.

    This is going to be my last reply to you on this blog for I am not going to bother to read the drivel that will follow. Extremely bad writing and English skills, wrong quoting style, clinging to dumb arguments : you are a waste of my time. More often than not forms follows function, something that looks dumb is unlikely to be enlightening.

  18. Gravatar of Roi des Cons 18. Roi des Cons
    Jul 29, 2009 at 15:39

    "that's a fact" which is not sustained by figures…. (and adding cell phones, coffee machines, routers and closed functionality stuff with a linux kernel is most unconvincing).

    "whether you like it or not." En fait, je m'en contre fous….

    " I have had experience in lots of very different PL"

    I carefully select languages I use, to shun lots of pitiful experiences -like YOURS- … ,and waste of MY time (see your first post as you complained about longuages making yourself wasting YOUR time).

    "Languages HAVE a purpose" which one ? there are differences betw. affirmations (even some skill in Omericon canot convince me) and rational proofs…..

    "More often than not forms follows function, something that looks dumb is unlikely to be enlightening.
    "
    If someone claims himself he is a loanguage expert -I never did, quite the other way- after whining he cannot manage to have fast programs to day -which gave an interesting idea of todays programmes, OS agnostic or not- , one might be very ironical…