Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 23:25:27 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2   Go Down
  Print  
Author Topic: A New Programming Language -  (Read 1199 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Ki1o
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 30 May, 2013, 03:51:02
Date Registered: 30 January, 2012, 22:19:11
Location: Behind my computer
Posts: 95

Topic starter
Total Post Ratings: +2

View Profile
« on: 24 February, 2012, 23:49:33 »
0

Many of you may not have noticed (or even cared for) my absence but I have been busy for the last couple of weeks.  I recently got accepted to a computer science research academy at my local college (I'm in high school) so thats what I have been doing.  I am creating an interpreted programming language in C++ using either BYACC, YACC or ANTLR for the parser and LEX or FLEX for the lexical analyzer.  If you have any ideas or suggestions or tips feel free to help out. Thanks.  Cheesy
Logged

Co-developer of Quasar (formerly M4trix)
Axe programmer - lvl 2
Spoiler for Projects:
Rebirth: The Soul of Icarus (R:TSoI): (5%): Planning Stages
Vulcan's Labyrinth: (0%): Backstory Only
Matrefeytontias
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Today at 12:26:45
Date Registered: 14 October, 2011, 18:48:49
Location: Alone in the Park
Posts: 898


Total Post Ratings: +185

View Profile
« Reply #1 on: 25 February, 2012, 00:54:06 »
0

Can we have a Hello world in this fabulous new langage Grin ?
Logged

/\   ><   [-   |_|   _\~   [-   /?

Spoiler for Nerdiness:



Spoiler for Shameful self-advertising:
/image/37571.png[/img]
If at a certain moment you think that I'm awesome, give an internet (>^_^)>
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 07:29:20
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2391


Total Post Ratings: +49

View Profile
« Reply #2 on: 25 February, 2012, 01:06:56 »
0

I'd like to see some basic syntax for this, and if I learn what/how to use the things you talked about I'd be glad to help. I'm kind of a noob in C++ so I might not be able to do much. I'm much better with python though I am learning C++
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #3 on: 25 February, 2012, 02:06:56 »
0

I'm with ruler in saying I'd like to see some syntax, but it sounds cool! I'm actually looking into compiler design myself, but not for direct machine code- I'm trying to use the .NET Framework as a base, but I'm going to create a parser, lexer, etc. all from scratch. I'm decent with C++, so if you need any help or anything feel free to ask.

Good luck!
Logged
Jonius7
aka jhgenius
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 14 June, 2013, 11:39:51
Date Registered: 03 September, 2010, 02:50:11
Location: Gold Coast, Australia
Posts: 1749


Total Post Ratings: +50

View Profile WWW
« Reply #4 on: 25 February, 2012, 12:24:42 »
0

Wow, sounds very promising, creating a programming language with C++. I personally tried to learn C++, but didn't get much further than half the SAMS Teach Yourself C++, and also looked at C++ for Dummies. That's pretty much it for me. I mainly used Codeblocks when typing C++, a great GUI type program that can bundle in all the complier and code editing in a great looking program (you have to install the compiler separately, but some installers come bundled with mingw)

Good luck with your project!
Logged



Userbars.com is down?
+9001
Intermediate TI-nspire Basic Programmer
Programmed some CASIO Basic in the past
DJ_O Music Discographist Wink
Userbars for these coming... in the process

My Released and Announced Projects (Updated 2013/01/29)
TI-nspire BASIC
TI-nspire Hold 'em | Health Bar | Scissors Paper Rock | Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled)

TI-nspire Lua
Numstrat | TI-nspire Hold 'em Lua | Terraria (coming soon)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Spoiler for Other Stuff:
Spoiler for Want your own HonestDownloads userbar?:
Hello! Do you want to show your affection for my website, HonestDownloads? Then here is a userbar I specially created earlier just for HonestDownloads users!

To add it to your signature just copy and paste the code below into your sig and you'll become an instant supporter of my website!

1
[URL=http://www.jhgenius01.webs.com][IMG]http://s1.bild.me/bilder/060112/3684792HDuserbaruser.png[/IMG][/URL]
Spoiler for My TI-nspire Basic Programs (Updated 2012/04/15):
***List of Programs in the TI-nspire Stadium***
Group Release 2012/04/07 on omnimaga.org

Games
   Noteable Release    ticalc.org Release Development/Not Publicly Released
2010/05/08 TI-nspire Hold 'em
   2012/04/07 v1.1.2   2012/04/10 v1.1.3  2012/04/14 v1.2.1
2010/08/03 Cosmic Legions
   2012/04/07 v0.2.2.2 (1st Release)
2010/08/12 Battle of 16s
   2012/04/07 v0.2.7
2010/09/10 Health Bar
   2012/04/07 v1.2     2012/04/02 v1.0   
2010/12/04 sTIck RPG
   2012/04/07 v0.1.5.2
2011/01/09 Monopoly
   2012/04/07 v0.16    (1st Release)
2012/04/09 Scissors Paper Rock
   2012/04/14 v0.8.1

Miscellaneous
2010/11/07 中文 (Chinese) Demonstration
   2012/04/07 v1.3     (1st Release)

Potential/Minor Programs
2010/09/26 Shanghai Metro
   2012/04/07 v0.2     (1st Release)
2010/12/22 TI-nspire Programming Tutorials
   2012/04/07 v0.1     (1st Release)
2010/12/28 Casino Games
   Was not released.
2011/04/22 Interlink
   2012/04/07 v0.0.4   (1st Release)
2012/03/22 Hierarchy
   2012/04/07 v0.01

Demo Programs (some may become Potential Programs)
2010/06/23 Monopoly (Board)
   2012/04/07 Prototype
2010/07/14 Strategy Battle
   2012/04/07 v0.12
2010/10/05 JRPG
   2012/04/07 v0.2
2010/11/02 PlotGrid
   2012/04/07 v0.2
2010/11/24 civilizaTIon™
   2012/04/07 v0.11

Purely Informational
2011/01/05 TI-nspire Stadium Changelog
   2012/04/07 v2
   Created to list significant releases of my programs. A page similar to this List of Programs in the TI-nspire Stadium was included in the documentation of most of my programs until sometime in Late 2011/Early 2012.

All games and programs coded in TI-nspire Basic.
© 2010-2012 Jason Ho.
Last Updated 14 April 2012

jhgenius01.webs.com
Will be moving! Stay tuned for updates.
Spoiler for Progress of Doodle God Axe:
2011/12/21 4% - Progress Suspended, ideas of graphical sprites still uncertain
Spoiler for Other Other You Know What Other Stuff I'm Talking About Stuff Stuff (Updated 2012/01/17):
Ki1o
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 30 May, 2013, 03:51:02
Date Registered: 30 January, 2012, 22:19:11
Location: Behind my computer
Posts: 95

Topic starter
Total Post Ratings: +2

View Profile
« Reply #5 on: 25 February, 2012, 14:58:32 »
0

Right now we are working on learning C++ a little more.  We are also working on learning BYACC, ANTLR, and LEX/FLEX.  Afterwards we can define the grammar and incorporate basic arithmetic as well as variables, loops, and control flow.
Right now we have named it M4Trix.
Logged

Co-developer of Quasar (formerly M4trix)
Axe programmer - lvl 2
Spoiler for Projects:
Rebirth: The Soul of Icarus (R:TSoI): (5%): Planning Stages
Vulcan's Labyrinth: (0%): Backstory Only
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 22:29:06
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50643


Total Post Ratings: +2640

View Profile WWW
« Reply #6 on: 25 February, 2012, 16:41:18 »
0

Seems interesting. Make sure, however, to start with the basics first, though, then work your way into the language depths, like with Axe Parser. This is to make sure you don't start too huge and won't get overwhelmed by the size and complexity of such project. An example of what I mean: Download Axe Parser v0.0.1 then a few other versions and see what was present in it at that time, then the author Quigibo added more and more.

It's also good to not make the syntax too complicated but still quite readable and short.
« Last Edit: 25 February, 2012, 16:41:58 by DJ_O » Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Ki1o
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 30 May, 2013, 03:51:02
Date Registered: 30 January, 2012, 22:19:11
Location: Behind my computer
Posts: 95

Topic starter
Total Post Ratings: +2

View Profile
« Reply #7 on: 25 February, 2012, 18:23:53 »
0

Yeah we have taken it in another direction trying to see if we can create a hand written parser.  We also have a basic syntax defined.
Example :
<<< is input
>>> is output
We have basic arithmetic tokens as well as comments.
Example program would be:

>>> "Hello World!"
Logged

Co-developer of Quasar (formerly M4trix)
Axe programmer - lvl 2
Spoiler for Projects:
Rebirth: The Soul of Icarus (R:TSoI): (5%): Planning Stages
Vulcan's Labyrinth: (0%): Backstory Only
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #8 on: 25 February, 2012, 18:36:23 »
0

Do you compile to some byte-code then interpret that, or do you interpret the source directly?

...I am creating an interpreted programming language in C++...
Logged
Ki1o
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 30 May, 2013, 03:51:02
Date Registered: 30 January, 2012, 22:19:11
Location: Behind my computer
Posts: 95

Topic starter
Total Post Ratings: +2

View Profile
« Reply #9 on: 25 February, 2012, 18:49:01 »
0

The source will be interpreted directly for difficulty purposes (Creating a virtual machine etc.). Tongue
EDIT: Meaning creating bytecode would be too hard.
« Last Edit: 25 February, 2012, 18:49:55 by Ki1o » Logged

Co-developer of Quasar (formerly M4trix)
Axe programmer - lvl 2
Spoiler for Projects:
Rebirth: The Soul of Icarus (R:TSoI): (5%): Planning Stages
Vulcan's Labyrinth: (0%): Backstory Only
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #10 on: 25 February, 2012, 18:56:59 »
0

I know what you meant Tongue lol. Do you store the information to some kind of buffer? I think that would be easier if you plan on doing loops, but then again I'm not the one taking the course lol.
Logged
AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 22:06:22
Date Registered: 15 August, 2010, 09:18:54
Posts: 3192


Total Post Ratings: +222

View Profile
« Reply #11 on: 25 February, 2012, 19:18:57 »
0

The source will be interpreted directly for difficulty purposes (Creating a virtual machine etc.). Tongue
EDIT: Meaning creating bytecode would be too hard.

Creating bytecode is largely the same process as interpretation at the simplest level... If you want to apply optimizations to the bytecode, that's different and can be much more complicated, but just mapping language to bytecode should be relatively simple with a solid language/bytecode design. I've found it's a good sanity check for a language that it is easy to generate a bytecode based on code in that language. If it's not easy, then the language is too complex. Let's take a while loop as an example:


1
2
3
4
While(A>0){
B=B+1;
C=C+2;
};

Let's try parsing this to bytecode:


1
2
3
4
5
6
7
TEST_GREATER(A,0); // Tests if arg1 is greater than arg2 and returns 1 if it is, 0 otherwise.
IF_NOT_GOTO(ANS,+6); // If Not(ANS) is true, then GOTO the opcode 10 commands after this one (code after the while loop)
INC(B,1); // Increment B and store result in ANS
SETVAR(B,ANS); // Store the incremented value of B to the variable B, overwriting the old value
INC(C,2);
SETVAR(C,ANS);
GOTO(-6); // GOTO the opcode 6 opcodes before this one (The condition test)

As you can see, generating a bytecode is basically equivalent to making the interpreter understand the code at all. One reason why bytecodes are so often used is that it's a lot faster to parse the one or two bytes that make up a typical opcode than it is to parse a potentially multi-lined script over and over again, when the work really only needs to be done once.

If the above bytecode looks like Assembly, that's because that's exactly what you're generating! Assembly code for a virtual machine.
« Last Edit: 25 February, 2012, 19:20:59 by Qwerty.55 » Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
Ki1o
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 30 May, 2013, 03:51:02
Date Registered: 30 January, 2012, 22:19:11
Location: Behind my computer
Posts: 95

Topic starter
Total Post Ratings: +2

View Profile
« Reply #12 on: 25 February, 2012, 19:53:56 »
0

Sorta off topic: would that be for a stack based VM or register based? I've seen tutrorials on generating bytecode for a VM but we have a limited amount of time in which to get this done which is why we favored just directly interpreting it.
Logged

Co-developer of Quasar (formerly M4trix)
Axe programmer - lvl 2
Spoiler for Projects:
Rebirth: The Soul of Icarus (R:TSoI): (5%): Planning Stages
Vulcan's Labyrinth: (0%): Backstory Only
AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 22:06:22
Date Registered: 15 August, 2010, 09:18:54
Posts: 3192


Total Post Ratings: +222

View Profile
« Reply #13 on: 25 February, 2012, 20:02:31 »
0

That bytecode would be more suitable for a register based VM, which is what I highly recommend unless you have a specific reason for choosing stack based (like portability to very memory limited systems).
Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
Ki1o
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 30 May, 2013, 03:51:02
Date Registered: 30 January, 2012, 22:19:11
Location: Behind my computer
Posts: 95

Topic starter
Total Post Ratings: +2

View Profile
« Reply #14 on: 07 March, 2012, 02:56:43 »
0

Ok so after some discussion we've decided chage some of the syntax.  Input and output will be marked with only one < and > respectively.  We've also decided to use Java for the lexical analyser and the parser which will interpret the source code into Java bytecode. The interpreter will be written in C++ fro speed purposes.  Essentially our language will be quite portable.
EDIT: Also we're thinking about changing the name. Any suggestions?
EDIT2: OK my bad.... the whole thing will be implemented in Java and will be compiled to Java bytecode  Grin
That's correct now
« Last Edit: 07 March, 2012, 03:05:05 by Ki1o » Logged

Co-developer of Quasar (formerly M4trix)
Axe programmer - lvl 2
Spoiler for Projects:
Rebirth: The Soul of Icarus (R:TSoI): (5%): Planning Stages
Vulcan's Labyrinth: (0%): Backstory Only
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.748 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.