Author Topic: The Necrotorium  (Read 5403 times)

0 Members and 1 Guest are viewing this topic.

Offline NecroBumpist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 130
  • Rating: +14/-5
  • Master of Lua
    • View Profile
The Necrotorium
« on: October 11, 2011, 11:58:21 pm »
This my 100th post here on Omnimaga, so I might as well make it significant. Not much to show for it except goals, but I want to be able to post again already.

The Necrotorium will be a repository of all of my calculator related projects, jumbled up into one thread.
Because I like the version control integration my IDE has with Github, I will distribute all of my files from there, instead of attaching them to new posts like the Axe Parser project. However, I will make a new posts for worthy updates listing important information to keep everyone informed.

So, what will the Necrotorium include ?
Well I'll quote the README from the Github located here

Quote from: Github README
Projects In The Works:
- nGfx (NSpire Graphics)
    I hope to create a whole new level of abstraction for creating games on the TI-Nspire.
    This will be facilitated by designing a simple language that compiles to Lua, hopefully
    taking away all of the complexities of getting a good UI in order.
- Lua IDE
    I'm working on a simple IDE that will allow you to code in Lua on calc, easily run it,
    save / load code, and remap the keypad to allow easy access to some symbols.
    I might attempt syntax highlighting in the future, though I am without a CX, so this is
    not an immediate priority.
- Bitmap2Img
    A script that when completed, will convert uncompressed bitmap images to the
    ti.image format.

These are the main projects I've taken interest to recently.
Particularly nGfx. I have the sudden urge to take another stab at writing a compiler, so I'd like to try that here.

Now that I've gotten this out of the way, I will begin writing portions of nGfx, and will soon have code examples (which will be open to drastic changes).

I would love to see collaboration in the future when I've outlined a much more solid direction for these projects to head towards.

Spoiler For Title:
The title is derived from my name "NecroBumpist" and the word "Repositorium"
Developing Lua scripts for the NSpire ?
Check out the Necrotorium
Need a few routines to run faster ? Checkout the MODS Lua Assembly Toolkit.
Need to save space for your scripts ? Checkout LuaSrcDiet

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: The Necrotorium
« Reply #1 on: October 12, 2011, 08:15:31 am »
Nice projects !

nGfx will certainly be really useful !
But I think that Lua IDE won't be a revolution. OCLua is great... Maybe that keywords highlighting would be useful.
And there are already several bitmap->ti.image converters. An on-calc one would not be useful... (And I even don't think that it is possible, because where would you store bitmaps ?)

Anyway, I'll check this topic quite often.
« Last Edit: October 12, 2011, 08:16:43 am by Chockosta »

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: The Necrotorium
« Reply #2 on: October 12, 2011, 08:19:38 am »
These look like they'd be pretty nifty!

Try not to get in over your head, though.
Omnimaga Admin

Offline NecroBumpist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 130
  • Rating: +14/-5
  • Master of Lua
    • View Profile
Re: The Necrotorium
« Reply #3 on: October 14, 2011, 07:30:32 pm »
I'm sorry that this has seemed kind of dead, I've had a busy few days with school projects and tests.

However, now I can continue!
Note: I'm going to start the Tokenizer/Lexer now. This will be pretty general, but once I start the next phase I will need to have most of the language finalized, so if you have a suggestion make it now please!

I am basing nGfx off some ideas I had for a language I tried to make for another platform, but I believe the same abstraction concepts should work on the NSpire. This predecessor was originally planned to be interpreted, but that will be simply be too costly on the NSpire, so instead I will be compiling this directly to Lua, and maybe at one point in the future, to Lua Assembly.

Anyway, now I will outline the language, all of this is open to suggestions. I will try to be very open, as I want to begin with the best language possible, not try to fit in new features mid-way through development!

Code: (Without comments) [Select]
[Window]:
Title = "MainWindow"
Size = scale(100, 100)
Position = offset(0, 0)

[Rectangle]:
Name = "Example 1"
Size = scale(50, 50)
Position = scale(25, 25)
Color = rgb(64, 128, 192)

[Text]:
Name, Value = "Text", "Omnimaga!"
Position = type(center)
Font = font(15, bold)
Color = rgb(32, 64, 192)

OnEnterKey{}
Code: (With comments) [Select]
// A Comment that ignores the rest of the line
/* A multiple line, or variable lenght, comment */

// It should be noted that like in Python, tabs are an important part of the language.

[Window]: // Creates a new Window Object

/*
One thing I think will be critical to games is having several different view modes
such as a title screen, a main menu, a game play area, and an in-game menu
There might even be more windows within that.

You can think of these as different contexts, and will come more into play
later as the language develops.
*/

Title = "MainWindow" // Gives the Window a Name so it can be accessed later.
Size = scale(100, 100) // Make the Window cover the entire screen.
Position = offset(0, 0) // This will be default. Places window at top left corner.

[Rectangle]: // Creates a new Rectangle Object

/*
This Rectangle is parented to the Window, which means that its position
is relative to its parent.
*/

Name = "Example 1"
Size = scale(50, 50) // 50% of the max X and Y values.
Position = scale(25, 25) // Centers the object in the middle of the screen.
Color = rgb(64, 128, 192) // Gives our box a nice blue color.

// Now, let's put the words "Omnimaga!" In the center of this Rectangle

[Text]:
Name, Value = "Text", "Omnimaga!" // Oh, see what I did there ?
Position = type(center) // I plan to add abstractions like this to make it
// easy to center stuff. I want to add vertical,
// horizontal, and a combination, for centering.
Font = font(15, bold) // Gives our text nicely sized.
Color = rgb(32, 64, 192) // A darker shade of blue.

OnEnterKey{
// A scripting language for manipulating objects and stuff
// Will likely create my own language in the future
// For now, will have a simple Lua API
}

Developing Lua scripts for the NSpire ?
Check out the Necrotorium
Need a few routines to run faster ? Checkout the MODS Lua Assembly Toolkit.
Need to save space for your scripts ? Checkout LuaSrcDiet

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: The Necrotorium
« Reply #4 on: October 15, 2011, 08:24:17 am »
Really nice!
I like the syntax.

It would be really great if you managed to create a procedural language. Maybe that it's  possible with a correct speed...

Offline NecroBumpist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 130
  • Rating: +14/-5
  • Master of Lua
    • View Profile
Re: The Necrotorium
« Reply #5 on: October 17, 2011, 07:42:06 pm »
Thanks Chockosta.

I'm putting what little work I have done on nGfx aside for a little while so that I can work on reading through "Let's Build a Compiler" by Jack Crenshaw. I've always been interested in writing my own Lua -> Lua Assembly compiler. Mainly because there's a few syntactic changes I'd like to make (goto and inline keywords, var += var/constant, etc) I'd also like to try out peephole optimization as well.

It should be a good, fun learning experience. And as always, I will share the spoils of my effort with everyone.
I'll be keeping my progress on this compiler in the Necrotorium under /cLua.

Off to go read more Pascal code examples.
Developing Lua scripts for the NSpire ?
Check out the Necrotorium
Need a few routines to run faster ? Checkout the MODS Lua Assembly Toolkit.
Need to save space for your scripts ? Checkout LuaSrcDiet

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: The Necrotorium
« Reply #6 on: December 30, 2011, 02:46:19 pm »
Some of those projects seemed interesting. Has anyone seen NecroBumpist lately? I noticed he logged in but he hasn't been posting much. D:

Also the thread name made me think it was some sort of game that involved dead corpses or some zombie name. :P
« Last Edit: December 30, 2011, 02:47:03 pm by DJ_O »