Two recent additions to the FreeDOS stable of development languages are FAST (Fast PC Compiler) and SOFA (Super Optimised Fast Assembler), inventions of one Peter Campbell of New Zealand. Peter developed FAST and SOFA in the mid 1980s and they were used as the main development languages for the Fastbase accounting system. In 2000, Peter rewrote the entire system in Tcl. All use and development of FAST and SOFA stopped at that point.
SOFA is an 8088 (and semi-80386) assembler. The syntax has some similarities to two other shareware assemblers, A86 and CHASM. SOFA can assemble its own source-code. Its features include quick assembly time (thousands of lines per second), conditional compilation and include files.
FAST was written in SOFA. The language syntax was influenced by Basic, Pascal, C and Assembler. The binaries produced are small and fast[1].
Peter Campbell died in tragic circumstances at Easter 2007, leaving the Fastbase business to his brother, Russell Bell.
The adding of FAST and SOFA to FreeDOS took a little too long: I had heard of the language during the 1990s and had rediscovered it in the Vetusware abandonware collection. From there I found out about FastBase and made contact with Russell. This was 2009 and it was at that time that I suggested to Russell that SOFA/FAST could be re-released as Open Source software, thus preserving in some way Peter's legacy. Russell promptly gave permission and provided me with the sources. Embarassingly, it has taken me eight years to finalise the process.
SOFA and FAST will appear eventually on HOPL (The Online Historical Encyclopaedia of Programming Languages). In the meantime, postings regarding the languages can be found on HOPL's Facebook front-end at SOFA and FAST respectively.
[1] Already some FreeDOS utilities have been rewritten in FAST.
© Copyright Bruce M. Axtens, 2017
Past (20 years or so) and present code. A variety of languages and platforms. Some gems. More gravel. Some useful stuff and some examples of how not to do it.
Showing posts with label Tcl. Show all posts
Showing posts with label Tcl. Show all posts
Thursday, July 20, 2017
Saturday, March 08, 2014
[TCL] Love that Tool Command Language
TCL is just so cool and concise …
I really like the conciseness of Tcl:
© Copyright Bruce M. Axtens, 2014
cd CSV
set target "snap-[clock format [clock add [clock seconds] -1 hours] -format %Y-%m-%d-%H -gmt 1]"
if {![file exists $target.rar]} then {
set cmd [list c:/program\ files/winrar/rar.exe m -m5 -s ${target}.rar ${target}-utc.csv]
exec -- {*}$cmd
}
That goes to the log (called CSV) folder and compresses the previous hour’s worth of log. I run that from a scheduler.I really like the conciseness of Tcl:
clock add [clock seconds] -1 hours, which subtracts an hour from the current time and clock format which takes that and renders it as GMT. © Copyright Bruce M. Axtens, 2014
Labels:
clock add,
clock format,
clock seconds,
compression,
Tcl,
tclsh
Friday, October 07, 2005
[MetaCard and Tcl] Blogs.mc
I got asked to describe the stack a little better. Here goes:
My blogs.mc stack has two text fields (fSource and fGenerated) and some buttons at the bottom (create_card, first, prev, next, last, render, preview, delete).About the same time I posted this to the MetaCard list:
With some marked-up text in the fSource field, I click 'render' and the output of the Tcl script (HTML) is put into the fGenerated field (line 6 of the 'Render' script).
Then when I click on 'preview' the HTML in the fGenerated field gets dumped to a file and passed to Safari. The fGenerated field is modifiable so I can play with things to get what I want and then tweak the Tcl script appropriately afterwards.
On my blog, codeaholic.blogspot.com, I've posted an item about MetaCard (on OS X) using Tcl to more-or-less bypass the script size limit of the unregistered version of MetaCard.Richard Gaskin wrote back, saying (in part):
since there is no MetaCard anymore anyway, and since Rev only offers a 30-day trial for the engine, I'm not sure how helpful the article will be.Also Alejandro Tejada wrote
At $99 for the low-end Rev license, is the pricing really so prohibitive?
i do not see how this could get around the 10 lines limit, but Geoff Canyon wrote an extensive tutorial to manage longer scripts within the 10 lines limits.I answered with
This tutorial is still useful for developers that want to run longer scripts in their standalone applications.
I get it from Ken Ray's website within the RR v 1.1 docs (saved as a pdf file). i'm not sure if this tutorial is still available in any website.
You could ask directly to Geoff Canyon. Look for his website: inspiredlogic.com
> i do not see how this could get around the
> 10 lines limit,
bad choice of words on my part. It doesn't so much get around it as it does acquiesce to the fact and try to use other tools to do what can't otherwise be done. Instead of using MetaCard's HTML mechanism or writin8g something in MetaTalk, I've farmed out the functionality to a Tcl script.
> but Geoff Canyon wrote an
> extensive tutorial to manage longer scripts
> within the 10 lines limits.
of this I was unaware. I have thought about doing something similar. What I usually end up doing however, when I need to hang more closely to MetaCard is to use AppleScript and 'do script' or 'evaluate' the things I need. I will nevertheless make enquiries now that I know better.
Wednesday, September 28, 2005
[MetaCard and Tcl] Broggle's cousin at home on the iBook
MetaCard's great but I can't afford to buy it (not that you can anyway, now that it's been subsumed into Runtime Revolution). But using the demo version means I keep bumping up against an inbuilt limit for scripts. So I hit upon the idea of bypassing the issue by calling external scripts.
The tool I use to write blogs at home (as opposed to the HTA I use elsewhere) is written in MetaCard and does the render and preview passes using Tcl.
[Aside: Not that there's anything about Tcl that lends itself to the job. I could have used Perl, Lua, Python, sed (maybe), awk, or any number of other languages from Algol68 (there's an implementation for Mac OS X believe it or not) right through to Zen BASIC. It's just that Tcl is familiar ground.]
Right, where was I. Oh yes ...
First the script in my "Render" button ...... which creates a file in the temporary folder (I'm on Mac OS X here ... might work on Linux ... have to do something drastic for Windows), and puts my marked-up text from field fSource into it. Then it shells out to render.tcl and captures its output into the fGenerated field. The temporary file is deleted.
Render.tcl looks like this (in its current incarnation):This script inhales the file specified on the command line, splits it on newline and works its way through the lines, outputting HTML according to the rules of the markup: @ in column 1 identifies markup and there are currently four types: text, code, quot and end. Very simple, but it does me fine ... for now.
So after this runs, there's HTML in the fGenerated field. If I want to see how it's going to turn out in a browser, then I click on the Preview button. Okay, so it won't have all the CSS definitions that blogspot/blogger would apply but I get a useful approximation.
The script for the Preview button ...... is similar to that of the Render button except this time I create an .html file in /tmp and and write the contents of the fGenerated field to it. I ignore the output of the shell() command.
I haven't quite figured out how to delete the temporary file because, if I uncomment the "delete file", by the time Safari is ready to load the file it's gone. There might be some way of making the shell synchronous, the way that /WAIT does on Win2k's START command, but then that'd probably mean waiting until Safari quits before I can use my blog writer again ... definitely sub-optimal. Then again, it'd be waiting for "open" to close, which happens as soon as it's launched Safari. And it's 10:48 pm and ...
Well, that's it. I really enjoyed this short break away from the long run of VBScript posts. I've got more stuff cooking here at home including a short foray into Javascript (a language I should have learned ages ago). Till then ...
The tool I use to write blogs at home (as opposed to the HTA I use elsewhere) is written in MetaCard and does the render and preview passes using Tcl.
[Aside: Not that there's anything about Tcl that lends itself to the job. I could have used Perl, Lua, Python, sed (maybe), awk, or any number of other languages from Algol68 (there's an implementation for Mac OS X believe it or not) right through to Zen BASIC. It's just that Tcl is familiar ground.]
Right, where was I. Oh yes ...
First the script in my "Render" button ...... which creates a file in the temporary folder (I'm on Mac OS X here ... might work on Linux ... have to do something drastic for Windows), and puts my marked-up text from field fSource into it. Then it shells out to render.tcl and captures its output into the fGenerated field. The temporary file is deleted.
Render.tcl looks like this (in its current incarnation):This script inhales the file specified on the command line, splits it on newline and works its way through the lines, outputting HTML according to the rules of the markup: @ in column 1 identifies markup and there are currently four types: text, code, quot and end. Very simple, but it does me fine ... for now.
So after this runs, there's HTML in the fGenerated field. If I want to see how it's going to turn out in a browser, then I click on the Preview button. Okay, so it won't have all the CSS definitions that blogspot/blogger would apply but I get a useful approximation.
The script for the Preview button ...... is similar to that of the Render button except this time I create an .html file in /tmp and and write the contents of the fGenerated field to it. I ignore the output of the shell() command.
I haven't quite figured out how to delete the temporary file because, if I uncomment the "delete file", by the time Safari is ready to load the file it's gone. There might be some way of making the shell synchronous, the way that /WAIT does on Win2k's START command, but then that'd probably mean waiting until Safari quits before I can use my blog writer again ... definitely sub-optimal. Then again, it'd be waiting for "open" to close, which happens as soon as it's launched Safari. And it's 10:48 pm and ...
Well, that's it. I really enjoyed this short break away from the long run of VBScript posts. I've got more stuff cooking here at home including a short foray into Javascript (a language I should have learned ages ago). Till then ...
Thursday, August 25, 2005
[VBScript/HTA] Broggle on Steroids
Big changes to Broggle.hta. No more #code/#endcode etc. Just #text, #code, #quot and #end. Now the HTA is more in line with the MetaCard and Tcl version at home on the iBook. I've also put in a preview button (which should probably be somewhere other than where it is right now) which puts the conversion results into a <DIV> at the bottom (thus the scrollbar at the side.)
Enjoy
Enjoy
[VBScript] Arrays within arrays and debugging them
Array() can contain Array(). I do it lots. But there's the issue of debugging things and of knowing what's in an array full of embedded arrays.
So I wrote PArray(). Tcl has a function of the same name which does the same thing. And the output looks very like an Euphoria sequence (now there's a nice language) but you can change that if you want to.
I suppose the next thing to do is to write a compiler of PArray() decompilations that would allow me to write nested arrays out to a text file and then read them back in. One day.
So I wrote PArray(). Tcl has a function of the same name which does the same thing. And the output looks very like an Euphoria sequence (now there's a nice language) but you can change that if you want to.
I suppose the next thing to do is to write a compiler of PArray() decompilations that would allow me to write nested arrays out to a text file and then read them back in. One day.
Labels:
Array,
Parray,
ShowStructure,
Tcl,
VBScript
Subscribe to:
Posts (Atom)