none
Language design concerns RRS feed

  • Question

  • Hi,

    Thanks for developing Small Basic.  When completed, it will surely fill a void for those
    of us who wish to learn a bit of modern programming technique.

    I want to report a couple of problems I've had with Small Basic, and offer a suggestion or two.

    1. Flickr.GetRandomPicture(tag) not only gets a picture, but also writes it as a temporary file to a temp folder.  These picture do not get deleted unless one deletes them manually.  Even the 'Clean Up Disk' function did not remove them, once I discovered they were there.  This happens on my computer running Vista as well as my computer running XP.  If this function is not changed to include an auto file delete, disks will be overflowing with pictures in schools across the globe. 

    Pending that, can someone give me the Small Basic code for automatically detecting the picture's file name and deleting each picture after it has been displayed?

    2. Flickr.GetRandomPicture(tag) will crash Small Basic if the internet connection fails.  A more graceful outcome would seem appropriate.

    3.Play=Text.GetSubText(Play,0,1) will crash Small Basic if Play is a null string.  Again, a more graceful outcome would seem appropriate.

    4.  I know this has been discussed before, but the Small Basic name is particularly unfortunate since there is a pre-existing SmallBasic language.  May I suggest renaming Small Basic to
    JR-VB.NET?

    Thanks for taking the time to look at this!

    Wednesday, March 11, 2009 1:23 AM

Answers

  • The leaking of compiled binaries is a bug, Husker41.  In v0.4, this bug will be fixed - the generated temporary  binaries will be deleted after the program run.

    • Marked as answer by Husker41 Monday, March 16, 2009 6:59 AM
    Sunday, March 15, 2009 7:30 AM
    Moderator

All replies

  • Thanks for reporting these issues Husker41.  I've created bugs for #1,2 & 3. 

    Wednesday, March 11, 2009 2:01 AM
    Moderator
  • More on item 1. above.

    Under certain conditions, Small Basic leaves various junk files in a TEMP folder.  As these files do not get deleted automatically, they tend to build up quickly when one is actively fiddling with Small Basic.  To easily delete these files, I wrote a very simple DOS batch program, put it in the affected temp directory, and put a shortcut to it in the desktop folder that contains my Small Basic apps.  I run it when I'm done with Small Basic for a while, and it gets rid of the junk files without affecting anything else.  Here's CLEANUP.BAT

    @echo off
    DEL TMP?.TMP
    DEL TMP??.TMP
    DEL TMP???.TMP
    DEL TMP????.TMP
    DEL *TMP.PDB
    DEL *.TMP.EXE


    I would have preferred to build this function into each of my Small Basic programs and have it execute when the program is told to close, but Small Basic does not seem to support wild cards in the 
    File.DeleteFile("path") command.  It works great for individual files, but doesn't accept * or ? as wildcards in file names.  If there is a way to delete multiple files using wildcard characters in this command, I'd certainly appreciate hearing about it.  Can anyone help?  Thanks in advance.
    Wednesday, March 11, 2009 3:59 PM
  • The leaking of compiled binaries is a bug, Husker41.  In v0.4, this bug will be fixed - the generated temporary  binaries will be deleted after the program run.

    • Marked as answer by Husker41 Monday, March 16, 2009 6:59 AM
    Sunday, March 15, 2009 7:30 AM
    Moderator
  • Thank you very much.  I won't worry about it, then.
    Monday, March 16, 2009 6:58 AM
  • >learn a bit of modern programming technique.
    LOL! Smallbasic is programming circa 1963, what next, punchcards? Small Plankalkül?
    Thursday, April 16, 2009 12:28 PM