Well I've been working on Spectacle for well over a month now and I thought it's about time I relased an alpha, as I'm quite proud of how the langage is progressing!
This is more of a sneaky-peak relase, as many parts of the language are incomplete (such as the debugger, and many command sets). I've introduced a new feature: Result Warping. I don't know about you, but I really get annoyed having to use Str(), Val() (etc) lots and lots of times. So, with specticle you can define a return type of a command, in the same way you'd define a variables type!
Here's some code exaples:
Comments
Code: Select all
Rem This is a comment
Command Arg1,Arg2 Rem this isn't a valid comment
RemStart
This is a comment
This is a comment
RemEnd
'This is a comment
Commadn Arg1,Arg2 'This is a valid comment
Code: Select all
;Bob.s
;Bob="bob"
;Jim.l=123+1
DEF.l Tim, Kim
Code: Select all
+
-
*
/
^
<>
<=
>=
And
Not
Or
XOr
Code: Select all
;%10101+7c8+0xDEADBEEF
Code: Select all
Len "bob is cool"
Val.l = Val "123"
Bob.s = Len.s "Test" 'Will return 4 as string
Code: Select all
&Test=x+1
;&Test=1
;x.l=1
;&Test=2
Here's the command set:
End
Val
ValF
Len
LCase
UCase
Right
Left
Asc
Chr
RTrim
LTrim
Trim
Space
Binary
Hex2Bin
Oct2Bin
Bin2Hex
Bin2Oct
hex2Dec
Oct2Dec
ElapsedMilliseconds
Wait
Rnd
RndF
Seed
I'd still like some help with the project, as well as ideas and comments! contray to what I've said before the source is avaliable as it's easier to see whats going on with it than the .exe.
To Spectacle code you must write your soure in a file called 'Code.txt' in the same directory as either the .exe or Main.pb (depending on how you want to run it).
The exe will probally look like it's doing nothing - that's why the source is included!
DOWNLOAD
Old News
Since the start of the summer I've been working on a project which has always been a dream since I started programming. I have been writing my own programming language using PureBasic. It's gone pretty well. The project has had two previous forms, 'Compound Basic' and 'Monocole'. The latter was a PureBasic clone and the former was an attempt at a scripting language. I've restarted the project with fresh idea's and I thought I'd share a few of them.
1. Run your program from an interpreted .exe, a virtual machine, another program (as a scripting language) or the stand alone interpreter.
2. Dynamic Expressions. You'll be able to define an expression as a variable, so the result of that expression is used instead of a variable with a specific value i.e.
Code: Select all
$Test=x+1
Debug $Test ;Test=1
x=1
Debug $Test ;Test=2
x=-1
Debug $Test ;Test=0
3. Extended BASIC Syntax. Standard BASIC keywords used (End, If/then) as well as some more advanced features, i.e.
Code: Select all
Bob.s="Jim"
Length.l = Bob.Len()
5. (Partially) Open Source. Anything I think that'll be useful (at the moment the commands and RPN functions) will be converted into a library for everyone to use. That way, even if none of you use this language, at least the community gets something out of the project. The actual interpreter code it's self will not be realsed - otherwise we'll be drowning in 'new' languages.
Well, I hop you like the feature list! I'm hoping to the the majority of the work myself, as quickly as possible however I'll need some help making it cross platform. If anybody would like to help in writing commands (which basically consist of procedures which copy the functionality of PB internal commands without actually using them) for Linux, OS X or Amiega OS (if there's much of a point) then that'd greatly be appreciated.
Anyway, comments, ideas and suggestions are very welcome!

