Jump to content

Nostradamus - A Language to Introduce Programming


Updated: 10:53 on 1/27/16 (BUILD 2696 AVAILABLE!)

(Code now protected under the GNU General Public License Version 3)

 

GNU General Public License and Warranty Disclaimer: 

Nostradamus - A programming language ideal for beginners.
Copyright © 2016 Michael Warner
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
You can reach me through my email at [email protected]<script data-cfhash='f9e31' type="text/javascript"> /* */</script>, I cannot be 
reached through postal mail due to security reasons.
 
 
WARRANTY
--------
 
This programming language, as well as any software that comes with it come
with NO WARRANTY. Michael Warner does not assume responsibility for any harm, 
damages or injuries to any indivual, living thing, or inanimate object owned
privately or publicly by this programming language or any software written 
using it or software that includes the programming language with it. 
 
By using this programming language you are USING IT AT YOUR OWN RISK. All 
responsibilities fall onto the person or persons using this programming 
language or software written using this programming language or software 
that includes this programming language. 
            
The two words "programming" and "language" when used together in this 
disclaimer refer to the programming language and anything included with 
it such as software, files, or any media of any type, size, or quantity.
 
Any person or persons who are not Michael Warner and have modified versions 
of this programming language in any way shape or form whether are responsible 
for the modified version that they have in their possession and are also 
responsibile for all copies that they distribute. Changes that place 
responsibility on the person making changes include any changes to the code
the programming language is written in, any versions of the programming 
language written from scratch, any changes to filenames, any changes to any
files or software included with the programming language, and any other even 
remotely and/or theoretically possible changes to anything related to and/or 
included with the programming language.
            
Any person or Persons who make their own downloads, download pages, or websites 
for this programming language and/or any modified versions of the programming language 
are fully responsible for the content they include on the sites. Michael Warner assumes 
no responsibility for any false advertising shown on any unofficial websites, webpages, 
and/or downloads distributing the programming language in any way shape or form.
            
Any person or persons who distributes the programming language or a modified version
of the programming language in any way shape or form is responsible for all copies that
he or she distributes, and all responsibility for those copies are placed on the person 
or persons distributing.

 

 

PREVIEW THE CODE ONLINE HERE: https://ide.c9.io/clockworking/nostradamus

Sourceforge: https://sourceforge.net/projects/nostradamus-programming/

 

Introduction

After using the Spherical RPG Game Engine API I have realized I need something more powerful, yet simple enough for beginners and novices to learn to use while featuring some of the graphical capablities that the spherical game engine features. To achieve this I am writing my own programming language. I cannot garantee that GUI creation will be a feature but it is a goal I would like to achieve.

 

However, instead of writing my interpreter and compiler in C/C# or C++ Or some other language that natively supports creating programs with a graphical interface, I have decided that instead I am going to write my own language in a compilable python variant. I know some of you are asking why I'm not just using C or C# and that's because the language I am creating is only an experiment. I want it to be open-source and easy to modify, while also being simple to use as a learning tool to introduce graphical programming yet also providing some more advanced features such as multi-threading, file manipulation, and web access.

 

If you have read through this; thank you, I really apreciate it.

 

gplv3-127x51.png

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Hmm......I'm interested.

DAYTONA

PROCESSOR - AMD RYZEN 7 3700X
MOTHERBOARD - ASUS PRIME X370-PRO
RAM - 32GB (4x8GB) CORSAIR VENGEANCE LPX DDR4-2400
CPU COOLING - NOCTUA NH-D14
GRAPHICS CARD - EVGA NVIDIA GEFORCE GTX 980Ti SC+ ACX 2.0 w/ BACKPLATE
BOOT and PROGRAMS - CORSAIR MP600 1TB
GAMES and FILES - TOSHIBA 2TB
INTERNAL BACKUP - WESTERN DIGITAL GREEN 4TB
POWER SUPPLY - CORSAIR RM850i
CASE - CORSAIR OBSIDIAN 750D

Link to comment
Share on other sites

Link to post
Share on other sites

Could you put it on Git when you start working on it? I'd love to see the progress, and maybe we can help you out a little (if you don't mind of course) :)

Link to comment
Share on other sites

Link to post
Share on other sites

cool

wget github.com/nostradamus

OFF TOPIC: I suggest every poll from now on to have "**CK EA" option instead of "Other"

Link to comment
Share on other sites

Link to post
Share on other sites

Could you put it on Git when you start working on it? I'd love to see the progress, and maybe we can help you out a little (if you don't mind of course) :)

I'll see about it, but I am not familiar with Git. I also do not know when development will start as I have both school to maintain my grades in and an A+ cert to earn so I can start working in IT.

 

EDIT:

I threw together some rough Ideas during my studyhall.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

What @as96 said. :)

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

What @as96 said. :)

I already commented about that :P

 

I'm gonna see about getting it on Git, but I am not making any promises. I'll most likely host it on sourceforge with a link to the download somewhere around.

 

I'm thinking of using Pypy or cpython and pyinstaller for this, hopefully I'll be able to compile the interpreter and custom compiler to an executable file. I'll be doing some revisons of the first bulletin's notes later today.

 

EDIT: After reviewing and checking for the features I want, I'll be writing the language in Python and then use Pyinstaller to package the language interpreter into an executable format. 

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

What paradigms does it follow ? Functional? Object-oriented? Imperative?

 

Also , what counts as "graphical capabilities" ? Rendering UI elements (windows pretty much ) ? Rendering pixels/textures, etc? Does it also have 2D and/or 3D basic concepts , like points , vectors , etc?

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
Share on other sites

Link to post
Share on other sites

>> - Greater than.

<< - Less than.

I would highly suggest you not to do that, those two are usually used as a binary shift it could be confusing for people trying out your language since you kept the C style for every other operator.

Link to comment
Share on other sites

Link to post
Share on other sites

What paradigms does it follow ? Functional? Object-oriented? Imperative?

 

Also , what counts as "graphical capabilities" ? Rendering UI elements (windows pretty much ) ? Rendering pixels/textures, etc? Does it also have 2D and/or 3D basic concepts , like points , vectors , etc?

It's an imperative language.

 

It will be rable to render UI elements, as for rendering on a canvas I only plan to implement features associated with 2 dimensional graphics.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I would highly suggest you not to do that, those two are usually used as a binary shift it could be confusing for people trying out your language since you kept the C style for every other operator.

I'll fix this.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

Sorry I haven't done any updates. I decided to ditch most standard coding conventions and just write something that resembles english to make it easier to learn. loops and if/else statements will still retain their indentation for easier reading.

 

Also, I did some coding for an interpreter, for some reason my code to detect whether a script is compatible is missing... I can't figure out why it's gone and none of my previous revisions have it. Agh, Cloud9 is a finicky thing.

 

Anyway, here is the interpreter code, pulled directly from the source!

 

For now i'm limiting my variables to what is specified in a list just to work out variable functionality. i'll be rewriting the code to let users create their own variables later on.

 

Sorry for the lack of comments. I kinda got ahead of myself writing this originally...

import txtimport timevaris = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']varisRef = 'abcdefghijklmnopqrstuvwxyz'def Load (file):    try:        with open(file) as f:            lines = f.read().splitlines()    except IOError:            print ('This script does not exist!')            return lines        def RunFile(data):    global varis    global varisRef        i = 0    run = True    while i < len(data) and run is True:        if ('say ' in data [i]):            if ('$' in data [i]):                varId = data[i].index('$')                # say $a                if (data[i][5] in varisRef):                    print ( varis[5])            else:                print ( txt.substring (data [i], 4, len (data[i])))                     elif ('say' in data [i]):            print ('')                elif ('wait ' in data [i]):            time.sleep (int (txt.substring (data [i], 5, len (data[i]))))                elif ('wait' in data [i]):            raw_input('[PRESS ENTER TO CONTINUE]')                else:            print ('')            print ('')            print ('Command is invalid:')            print (data[i])            print ('terminating script...')            run = False                            i += 1def exe(script, file):    if ( '.mas' in file ):        RunFile(script)    elif (script[0] == '# Nostradamus Script'):        RunFile(script)    else:        print ('ERROR:')        print ('File not acceptable!')                

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Hmm......I'm interested.

 

 

Could you put it on Git when you start working on it? I'd love to see the progress, and maybe we can help you out a little (if you don't mind of course) :)

 

 

What @as96 said. :)

 

 

Code is now published and should be publicly viewable, It's on the main post but i'll link it here too:

https://ide.c9.io/clockworking/nostradamus

 

I believe it does live updates when I'm coding so you may see the code magically changing if you decide to view it.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

UPDATE:

 

All code pertaining to the parsing of commands is being re-written. This is due to the old system of guessing and checking being inefective when dealing with variables of different lengths. Code will now be split into a list and put into buffer where the code will be interpreted in a more accurate manner and word-by-word. This not only allows me to write the code necesary for creating variables on-the-fly but also allows me to create a more accurate interpreter.

 

Do know that some bugs are being seen with variables not being assigned properly. I do not know why it is happening but I suspect it is due to a bug in Python itself. as trying to manualy assign a variable does not work and the code is accurately grabbing the location and content of variables.

 

Extra info:

 

Say <Content> - functions like the print command of python, can currently print single variables by replacing the string with $<Variable Name>. If no content is provided the command simply writes a blank line to the console

 

Set <var> to <content> - Assigns variables, while it does not work the say command is not interpeting variable updates properly and will return 'None' if something lke this is run:

say Hello, World!say say $aset a to Bye!say $a

The final line will print "None", this is a bug that I need to fix

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

say Hello, World!say say $aset a to Bye!say $a

I like the syntax, for some reason it reminds me of ASM (I'm not sure why) but I think it's really beginner friendly.

Link to comment
Share on other sites

Link to post
Share on other sites

I like the syntax, for some reason it reminds me of ASM (I'm not sure why) but I think it's really beginner friendly.

Yeah, this is what i'm aiming for. I'm glad you like it!

 

Now to figure out why this pesky bug I'm seeing is so persistant...

 

EDIT: Something's wrong with the grab function, it's returning 'None' when it shouldn't be... Hrmmmm

EDIT: Fixed, not sure what was wrong though... It wasn't the grab function or the assign function acting up. For some reason python isn't properly detecting lists as inputs on defined functions.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Build 2696 is now available. Please refer to the Nostradamus Website or the Sourceforge page to download it.

To view the changes made and other notes about the project please read this:

With this new Pre-Alpha release of Nostradamus, variable processing has been added. This means that now you may concatenate multiple variables with the say command.

This has been added in order to prepare for a switch from the current variable system that only allows the 26 letters of the English alphabet to be used in variables, to a new system that will let you define your own variables. An error handling system will be implemented and a new command speficiation index is planned for the next update.

You may set a variable's value by using the command set <variable> to <value>
Outside of this function it is required that you add the prefix '$' to your variable name in order for the interpeter to identify it. This may be replaced with 'variable' in the future.

Currently to specify a variable you would type this; say $<variable>

for example:

set a to Hello,set b to Worldsay $a $bwait

Notice I used a command called wait, this command by itself will prompt the user to press enter. if an integer value is added after it such a 5 the interpeter will take that value and wait the specified time in seconds

wait 1

This waits 1 second

wait 2

This will wait for 2 seconds.

The wait function also works with variables that have an integer value.

 

The original post is available here on sourcefoge:

https://sourceforge.net/p/nostradamus-programming/discussion/releases/thread/c582d974/

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

A poll has been put up, regarding how language translation will be handled or even officially supported. Please submit your opinions.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

A poll has been put up, regarding how language translation will be handled or even officially supported. Please submit your opinions.

I'm not sure what do you mean with language translation?

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not sure what do you mean with language translation?

The language is currently designed to strongly reflect the english language, and while it may be fine with some users, people who do not speak english may have difficulty learning it.

so I feel that it may be a good idea to allow users to easily translate the language into their own languages. Nostradamus would become a 'multilingual' language so-to-speak if this were inplemented.

 

The idea of this is practical to implement with variable interpretation currently using an index to prevent variables from conflicting with Notradamus syntax.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

The language is currently designed to strongly reflect the english language, and while it may be fine with some users, people who do not speak english may have difficulty learning it.

so I feel that it may be a good idea to allow users to easily translate the language into their own languages. Nostradamus would become a 'multilingual' language so-to-speak if this were inplemented.

 

The idea of this is practical to implement with variable interpretation currently using an index to prevent variables from conflicting with Notradamus syntax.

 

This my be relevant.

Link to comment
Share on other sites

Link to post
Share on other sites

The language is currently designed to strongly reflect the english language, and while it may be fine with some users, people who do not speak english may have difficulty learning it.

so I feel that it may be a good idea to allow users to easily translate the language into their own languages. Nostradamus would become a 'multilingual' language so-to-speak if this were inplemented.

 

The idea of this is practical to implement with variable interpretation currently using an index to prevent variables from conflicting with Notradamus syntax.

Oh I see, I would not go that way but here's a possible approach:

 

 

Translate every script into a common language for example let's say you have

say Hello

you could have a table where you associate each function to a unique identifier, let's assume "say" is gonna have the code of "#FFFF" it will be translated into

#FFFF Hello

that would make it completely independent from the english localization of the language.

Link to comment
Share on other sites

Link to post
Share on other sites

Oh I see, I would not go that way but here's a possible approach:

 

 

Translate every script into a common language for example let's say you have

say Hello

you could have a table where you associate each function to a unique identifier, let's assume "say" is gonna have the code of "#FFFF" it will be translated into

#FFFF Hello

that would make it completely independent from the english localization of the language.

 

This is kind of what I was thinking, actually. And then use unique universal error codes or even allow users to have any files matching the Nostradamus file format automatically translated into raw data on a command level so that other users trying to help debug or modify the code can view it in their native language provided they use the proper editor/viewer. (Or just run a command in the NPL console to convert it to their native language)

 

 

By the way, the Cloud 9 workspace is down, i'm going to be a hermit and migrate my workspace to a localized version of Python on my chromebook if that is even possible...

(School owned, can't actually install linux or another OS, I will be working from a flashdrive.)

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×