Monday, May 19, 2008
Rewrite BASIC language today?
Clearly there is a wide range of opinions in the responses. Some opted for being retro and simple. Some advocated adding commands for dealing with various things. It's good to have a discussion about these sorts of things, and this one went well. There are a lot of experienced BASIC programmers in that forum and it didn't turn into a flame war.
In my own response I wrote "BASIC needs to be simple. Adding C or Java features is a mistake for the most part. There is value in keeping things out of the language."
There needs to be a balance. Sometimes it makes good sense to add new things to a language. But as I just said... sometimes. ;-)
Tuesday, March 25, 2008
Commodore 64 Twenty-fifth Anniversary
Go check this out for a fun romp into the past. The presentation touches on much more than just the C64. http://video.google.com/videoplay?docid=3754836267385299753
Saturday, March 01, 2008
Think programming is too hard, or boring? Think again!
When it came to what sort of work we do, I shared about my business selling programming tools. I moved over to the fellow with the black Macbook and told him I wanted to show him my website so he could understand my business. When I showed him the Learn tab on the Run BASIC site and began to walk him through the examples the other people at the table came over to watch. As we went from simple "hello world!" to some easy graphics examples the reaction from onlookers was amazement! They clearly were not aware that programming could be so simple and cool. To them this was something way above them, and very dry.
What I took away from this is that people don't know that programming can be fun. They can do it, and years ago the average computer user did his own programming, in BASIC. Nowadays what gets promoted as programming is too hard, and it's no surprise that people don't want to do that. This is a misapplication of technology that makes things harder, and not easier.
We need to turn back the clock in this important area of programming.
Tuesday, February 26, 2008
iPhone SDK delayed?
We haven't talked much about our plans for iPhone support in Run BASIC. We should have more to say in the next month or so.
Thursday, February 21, 2008
BASIC is bad because it's too easy?
I won't be the first person to say that BASIC is perfect. There is no perfect language. However, to recommend that a first language should not "pamper" the beginning programmer seems to me misses the mark completely.
I'm guessing that this means that languages should force the beginner to be aware of low level details such as the type of numeric value (int, float, byte, etc.) or that the beginner should made to manage the allocation and deallocation of memory. What do these sorts of things have to do with the essense of programming? Since there are many languages which do not have these kinds of features, I can only submit that they aren't essential to programming. Therefore they are not necessary ideas to teach the beginner.
The nitty gritty details of how a computer works ARE important. These things should be taught to any serious student of computers, but they do not need to be the first thing taught. People who do not fancy themselves experts do not need to be bothered to learn them.
Easy is the quality that BASIC has, especially in the quickness of its learnability. This is almost to a fault I agree in the sense that a slightly more general and abstract language might be a little harder to warm up to but better in the long haul. However for the person who programs for fun, or who needs a light language for writing utilities or small personal applications, I think BASIC hits the mark pretty well.
Thursday, February 07, 2008
Taking the Arc Challenge
Here's the Arc program:
(defop said req
(aform [w/link (pr "you said: " (arg _ "foo"))
(pr "click here")]
(input "foo")
(submit)))
Follow this link to see other submissions in different languages. Scroll down to to bottom to see the Run BASIC example. http://arclanguage.org/item?id=722
Now tell me which language you'd rather develop web apps in. BASIC is the one. ;-)Wednesday, February 06, 2008
Web programming in... Java?
People who trash BASIC haven't tried modern versions. Even the old DOS QBasic has everything the beginner needs.
Monday, February 04, 2008
Knocked on the head with BASIC
I know there are a lot of modern BASIC implementations that force you to declare all your variables and give them types and sizes. Some of them keep the core keywords but add Pascal syntax, and some make BASIC look more like Java. I know there are some benefits to the way these other languages work, but BASIC is really meant to be very light and simple. In my humble opinion any language claiming to be BASIC which forces the programmer to dot too many i's and cross too many t's is not BASIC, but an imposter.
BASIC is a small language without too many rules.
Thursday, January 31, 2008
Debugging Run BASIC Web Apps
One of our users suggested that it would be good to create an inspector panel in Run BASIC itself and that we should add some reflection via an EVAL$() function that would allow arbitrary execution of BASIC code at runtime. We would probably also need to at least metaprogramming features like the ability to get information from the runtime like:
- The name of the current context (ie. function or subroutine)
- The names of all the variables and arrays in scope
- The source code for the current context
- A collection of objects that models the stack
- Probably more stuff
While this sort of thing is possible I think that we probably will initially provide a high level runtime inspection panel that the programmer can show and hide as needed. This is BASIC after all, and it should be as easy as possible to use. The metaprogramming stuff is cool though. ;-)
Monday, January 28, 2008
Web Programming for Fun
We need a culture of simplicity. The computer should do that hard stuff for you. For example web application servers manage user sessions and processes, and these are things that require special administration by an expert in most web systems. With Run BASIC, except for a couple of fields in the Preferences tab that let you configure how long the timeouts are for sessions and processes, you don't really need to know anything about these. It's all done for you automatically.
Or for example let's say you want to draw graphics? There are no add-ons that you have to locate, download, and install with Run BASIC. It's all built right in, and just a few lines of code can draw some meaningful graphics into your web apps.
It's easy, and it's fun.
Sunday, January 27, 2008
Run BASIC - Zero Configuration Web Application Server
- A web server (usually Apache)
- A language interpreter for PHP or Ruby
- And usually a database server
And this is a simplification. The user needs to install and configure these things which requires knowing about a lot of esoteric stuff. If you've never done this before, you can lose some of your hair. Unless you like pain, why put yourself through this?
If you want to create your own web applications, Run BASIC will install everything ready to run in one shot. http://www.runbasic.com/
Why do people put up with complex programming systems? Because for more than a decade they had much harder tools, so now they think PHP and RoR are easy.
Tuesday, January 22, 2008
Java and BASIC - Simplicity and backwards compatibility?
http://www.infoq.com/news/2008/01/java-evolution
I especially like this quote about Java and web development:
Web application development - this is difficult, and developing web applications with complex and underpowered technologies like JSP and JSF "is like eating soup with a fork"
I've been a Java programmer for 7 years. I've never liked the language. It always seemed to me to be much too verbose and controlling. It's amazing to me that it has been so popular, but that is more of a marketing accomplishment than anything else.
Run BASIC is a web programming system in development, and a really important part of what Scott McLaughlin and I are trying to do is to manage how the language grows. One important question to ask is how much emphasis to place on backwards compatibility as we more forward. Our goal is to create the best BASIC for the web, and it should still be simple and fun to use even as it becomes more powerful.
I invite your comments. :-)
Monday, January 14, 2008
Ajax and BASIC
Run BASIC already provides an exceptionally easy web programming system, but it does so with minimal special effects. There is a tiny bit of Javascript being used but almost everything is done with XHTML on the browser, and a very smart web application server.
In release v1.0 of Run BASIC the widgets (and indeed the page itself) are all objects. They are created by very simple statements. Any sort of Ajax inspired widgets for a future release of Run BASIC must not be any more complicated to use than the simple to use widgets that are already there.
Additionally, one of the most important aspects of Ajax is partial page reloading. This is important and we are eagerly planning to add this. What this will allow you the Run BASIC program to do is to reload a small part of your web app in the browser so that each user action does cause the whole page to be refreshed from the browser. This provides for smoother feeling user experience, and it also can improve performance.
So, Ajax must not complicate Run BASIC. Our design philosophy is to respect the simplicity of BASIC as much as possible. There are too many complicated programming systems out there, and the world doesn't need another one.
Tuesday, October 23, 2007
Perspective is Worth 80 IQ Points
http://rbblog.billdubya.net/2007/10/mindset-problem.html
Thursday, September 27, 2007
Parsing XML in Run BASIC
One of the important feature that a Web 2.0 language needs is an XML parser. Run BASIC now has one built in. The XMLPARSER statement parses an XML string and returns an XML accessor object with a bunch of handy built-in methods for making your way through an XML document.
Here is a simple example of what that sort of code looks like:
a$ = "<program name=""myprog"" author=""Carl Gundel""/>"
xmlparser #parser, a$
print #parser key$()
for x = 1 to #parser attribCount()
key$ = #parser attribKey$(x)
print key$; ", ";
print #parser attribValue$(x)
next x
This short program produces:
program
name, myprog
author, Carl Gundel
And here is a short program which will display the tag names and contents of an artibrarily nested XML document:
xmlparser #doc, s$
print #doc key$()
call displayElements #doc
end
sub displayElements #xmlDoc
count = #xmlDoc elementCount()
for x = 1 to count
#elem = #xmlDoc #element(x)
print "Key: "; #elem key$();
value$ = #elem value$()
if value$ <> "" then
print " Value: "; value$
end if
print
call displayElements #elem
next x
end sub
Monday, September 24, 2007
Do-it-yourself programming
A friend of mine pointed me at this article "Do-It-Yourself Software" in the Wall Street Journal.
http://online.wsj.com/public/article/SB119023041951932741.html
Run BASIC and Liberty BASIC are both aimed at this market, and in fact this is the traditional niche of BASIC language products.Wednesday, June 27, 2007
Adding SQLite to Run BASIC
sqliteconnect #users, "test.db"
call execAndPrint "select * from users"
call execAndPrint "select count(*) from users"
#users disconnect()
end
sub execAndPrint query$
#users execute(query$)
while #users hasanswer()
result$ = #users nextrow$(",")
print result$
wend
end sub
SQLite is a popular database engine provided as a library and is supported for Windows, Mac and Linux. The source code is available and is in the public domain so it is completely free. We will support the parts of Run BASIC that integrate with SQLite, but as for the specific level of conformance to the SQL standard and other technical details, see http://www.sqlite.org/
The SQLITECONNECT #obj, "databasefile.db" statement connects to a database and sets the #obj variable to be a connection object. The connection object understands EXECUTE(), HASANSWER(), NEXTROW$() and DISCONNECT(). I'm sure there will be more commands.
Notice the NEXTROW$() method. It returns each query result row as a string, with each item delimited by the specified string ("," in the example but it could be CHR$(9) or something else). It is trivial then to use the WORD$() function to extract the information. We will certainly also add the ability to get items by name.
Wednesday, June 20, 2007
Run BASIC and the iPhone
I have a Treo 650 myself, and I can use it to access the Run BASIC site, but it is awkward because the web browser it includes is slow and the Treo has a tiny little screen. I am eager to see how this all works on the iPhone, and if it is compelling I may even buy one just so I can demonstrate Run BASIC wherever I am. ;-)
Thursday, June 14, 2007
Support for CSS class tags
One new addition to Run BASIC is the ability to add a CSS class tag to an object on a web page, so that it can be manipulated.
For example the following would create a link and set a class to "button".
link #doMyBidding, "GO", [go]
#doMyBidding cssclass("button")
And the following statement would add the CSS needed to style the link (or any object that has the class tag "button"):
cssclass ".button", "{ put some css styling in here }"
Here is a link to a video demonstrating how this all works.
http://www.youtube.com/watch?v=1qomg67VdF0
Wednesday, May 30, 2007
Modules and Run/Liberty BASIC
The RUN statement has a new form. If I want to use mymodule.bas as a module in a program I am writing I would code it like this:
run "mymodule.bas", #myModule
This causes mymodule.bas to be compiled into memory. It will execute code up to the first wait statement. This is how values will be initialized. The program then becomes an object assigned to the #myModule handle.
Then you can call any function on that program from within the calling program, like so:
#myModule myFunction(myParameter)
or even use the invokation in a more complex expression:
print "digits: "; len(#myModule myFunction(myParameter))
You may recognize this syntax as being the same as for controlling widgets. It relies on the same underlying mechanisms to do its work.
When we're done with this, modular programs loaded this way will be cached in memory and will only recompile when the source file changes.