Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Foobar
Topic Started: Sep 12 2012, 09:20 PM (92 Views)
roflcopterz
Member Avatar
Forever Lisp'n
[ *  *  *  * ]
Hi. So I thought that I would create my own programming language. Maybe not for practical reasons, more for fun. My language is called Foobar, and its generic, object-oriented, stack-based, dynamically and statically typed, compiled, meta and reflective. Its main data types are numbers, bools, characters, strings, identifiers, lists and code. Like Lisp, in can actually store code as a variable and return code as functions, allowing for very powerful macros and other feats. It is stack oriented like most assembly languages, simply because I like that structure. Here is a trivial code example:

Code:
 
'context1 () var
'context2 () var
'qux () #10 var

{
'foo ('const) #0 var `foo is an identifier, the list denoted by (...) is a list of properties, #0 is the integer 0 used for initialization and var is an operator
'bar ('ubyte) #1 var `Data types can be specified to allow for static typing
'baz ('global) #2 var
} 'context1 put `code being stored as a variable

{
'oof () 'baz get #10 add var `get operator pushes the value of the variable named by the identifier at the top of the stack onto the stack
'rab () 'qux get var
'zab () <'context1 'foo get> var `Context, pretty much means scope.
} 'context2 put


Obviously there is loads more but I cant describe it here. I am currently writing a prototype compiler in Common Lisp, as well as writing a specification document outlining every aspect of the language in full detail. What do you think of it anyway?
The three virtues of a programmer:
- Laziness
- Impatience
- Hubris

Offline Profile Quote Post Goto Top
 
« Previous Topic · Off-topic · Next Topic »
Add Reply