Flaming Thunder
Symbolic. Numeric. Dynamic. Intuitive. 
Moving helix, by David Parker
 
         
Golden rotating 3D cube on a
tiled floor 
Windows users, click here to run or download this small sample program written in Flaming Thunder. Controls: Esc to exit, W, A, S, D, or arrow keys to move, mouse to look. Click here to see the source code. 
  

Flaming Thunder is one of the coolest computer programming languages in the world. It is designed for scientists, mathematicians and engineers, yet it is easy enough for elementary school students.

Flaming Thunder supports realtime fullscreen 3D graphics, numeric computation, arbitrary precision numbers, interval arithmetic, symbolic computation, CGI scripting and cross compilation. Flaming Thunder also comes with a free subscription to DPGraph. DPGraph is the world's most powerful software for dynamic 2D to 8D math and physics visualization. It produced many of the images on this site and we are integrating it into Flaming Thunder.

 
Windows users, click here to start programming in seconds using the free version of Flaming Thunder Notepad. Just click on "Run" or "Yes" or "Save File" or "Open" or "OK" in response to the prompts. Free versions for Mac, Linux and FreeBSD.
  

Flaming Thunder supports 32- and 64-bit FreeBSD, Linux, Mac OS X (Intel) and Windows. The Flaming Thunder compiler is a single-asset 8-by-8 shotgun cross compiler, written entirely in assembly language.

The Language

Flaming Thunder's goal is to make programming as easy as possible by leveraging English and math fluency. In Flaming Thunder, the program to write "hello world" is:

Write "hello world".

Flaming Thunder statements can be written in paragraph form:

Write "Please enter a color: ".  Read
color.  Write "My favorite color is ",
color.

Flaming Thunder is not case sensitive. The following program rereads color if an error occured:

Read color.
If color is an error then read color.

In math, the negative of a negative is a positive so Flaming Thunder does not redefine "--" to mean predecrement. The following Flaming Thunder program will write "true":

Set x to 5.
If x = --x then write "true".

Flaming Thunder uses set statements for assignment:

Set x to "concrete".

Set statements make it possible to manipulate symbolic equations without the confusion of multiple equals signs:

Set QuadraticEquation to a*x^2 + b*x + c = 0.

Flaming Thunder does not abbreviate or cojoin common English words. For example, go and to are separate words:

Read commmand.  If command = "quit" then go to end.

Control statements (such as for) are designed so that a person who is not fluent in math does not have to use math symbols such as "=":

Write "Fa".  For i from 1 to 8 do write "-la".

The size of integers is limited only by the amount of memory. The following program writes the answer 260643089511722744715208320:

Write 2001*2002*2003*2004*2005*2006*2007*2008.

If all of the intermediate results are integers or rationals, then Flaming Thunder uses exact rational arithmetic. The following program writes the answer 5/6:

Write 1/2 + 1/3.

Calculations involving real numbers can be set to as many digits of precision as desired. A program to compute the golden ratio φ = (1 + √5)/2 to a precision of 1,000 decimal digits is:

Set realdecimaldigits to 1000.
Write (1+squareroot(5))/2.

For readability, Flaming Thunder allows superfluous underscores in words and numbers:

Set Twenty_Trillion to 20_000_000_000_000.

To aid in numeric error analysis, Flaming Thunder supports interval arithmetic:

Set x to interval( 6.95, 7.05 ).
Set y to interval( 1.225, 1.235 ).
Write x^2 - 32*y^2.

Flaming Thunder supports recursive functions:

Factorial is a function(n) doing
  if n = 0 then return 1 else return n*factorial(n-1).

Flaming Thunder allows functions to be defined in any order in a program. For example, the definitions can all be at the end of the program in alphabetical order, like a glossary. Function names are the first words in their definitions, making them as easy to look up as the definitions in an English dictionary.

Writeline L2Norm( 12.3, 11.2 ).
Writeline L1Norm( -5.2, 4.6 ).

Abs    is a function(x) doing return absolutevalue(x).
L1Norm is a function(x,y) doing return abs(x)+abs(y).
L2Norm is a function(x,y) doing return squareroot(x^2+y^2).

Flaming Thunder allows functions to be nested:

Distance is a function(x1,x2,x3,y1,y2,y3) doing
  (
  Square is a function(x) doing return x*x.
  Return squareroot(square(y1-x1)+square(y2-x2)+square(y3-x3)).
  ).

Flaming Thunder supports reading and writing entire files all at once, which combines high performance with simplicity. This program reads two input files, then writes them to a single output file:

Remove "output.txt".
Read x from "input1.txt".
Read y from "input2.txt".
Write x, y to "output.txt".

Flaming Thunder has extensive support for CGI scripting. Here is a simple CGI script to save IP addresses in a log file:

Writeline GetEnvironmentVariableValue("REMOTE_ADDR")
          to "IPAddress.log".

Here is a CGI script to upload a file from a user's computer to the server, from an HTML form containing an input tag with type=file name=file:

Write GetDecodedCGIVariableFileData("file",1)
      to GetDecodedCGIVariableFileName("file",1).

The Compiler

Flaming Thunder is implemented as a single-asset 8-by-8 shotgun cross compiler, written entirely in assembly language.

The Flaming Thunder cross compiler is 8-by-8 because there is a version for each of 8 major platforms — FreeBSD 32, FreeBSD 64, Linux 32, Linux 64, Mac OS X (Intel 32), Mac OS X (Intel 64), Windows 32 and Windows 64 — and each of the 8 versions can generate executables for all 8 platforms. For example, on a Windows or Mac machine Flaming Thunder can generate Linux executables, and vice-versa.

Flaming Thunder is a single-asset compiler because all of the tools and libraries (assets) that Flaming Thunder needs are internal to the compiler. Flaming Thunder compiles directly from source code to stand-alone statically-linked executables without using any external tools or libraries.

Flaming Thunder is a shotgun cross compiler because it can hit all of its targets from its single executable; most cross compilers require separate host tools or libraries for each target. For example, the following command line (ft is the name of the compiler):

ft file myprogram.ft target all

will produce 8 target executable files: myprogram-f32, myprogram-f64, myprogram-l32, myprogram-l64, myprogram-m32, myprogram-m64, myprogram-w32.exe and myprogram-w64.exe.

Flaming Thunder leads to immediate benefits for programmers and internet users alike. Programmers can write CGI scripts on any platform, cross compile their CGI scripts for 32-bit Linux, then ftp them up to an inexpensive Linux webhosting account. For example, the command to compile mycgi.ft into a 32-bit Linux executable is:

ft file mycgi.ft output mycgi.cgi target linux32

The benefit for internet users is that websites with statically-linked compiled CGI scripts are more agile than those with interpreted web pages.


 
     
Home
Free version
Full version
Subscribe
List of site
subscribers
Specs
Docs
Contact
News
13 Sep 2010
 
Graph credits: volume of integration by Rod Rodrigues, moving helix by David Parker.
 
AMD, CodeWeavers, CrossOver, FreeBSD, Intel, Linux, Mac, Microsoft, OS X, Windows, Wine and WineHQ are trademarks or registered trademarks of their respective owners. Flaming Thunder is a trademark of Flaming Thunder.
 
©2002-2010 Flaming Thunder