Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: ASHBAD_ALVIN on November 06, 2010, 09:37:39 pm

Title: Suave
Post by: ASHBAD_ALVIN on November 06, 2010, 09:37:39 pm
for those of you who saw it on UTI, don't think it's dead yet.  I'll just say I may have gotten a new partner for this, by the name of builderboy.  If we can work some ideas out, this may turn into something real ;)
Title: Re: 'DE
Post by: yunhua98 on November 06, 2010, 09:38:18 pm
sounds cool!  btw, is Deep Thought on the team?
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 06, 2010, 09:38:54 pm
I tried to get him earlier on UTI, and he said maybe.  I'll have to ask him again.
Title: Re: 'DE
Post by: Hot_Dog on November 06, 2010, 10:41:39 pm
So, I didn't see this on UTI.  What exactly is it?
Title: Re: 'DE
Post by: nemo on November 06, 2010, 11:33:51 pm
anyone found a link?
Title: Re: 'DE
Post by: yunhua98 on November 06, 2010, 11:37:30 pm
right here:  http://www.unitedti.org/forum/index.php?showtopic=9492
sounds pretty cool, maybe this could be integrated into KOS along with some of Axe?  just a thought.  ;)
Title: Re: 'DE
Post by: AngelFish on November 06, 2010, 11:46:11 pm
Quote
...it includes inheritance, polymorphism...

Wait, it includes full support for polymorphic code? Awesome. I'm going to have to use this for virii if it ever comes out ;D
Title: Re: 'DE
Post by: nemo on November 07, 2010, 12:10:00 am
i noticed a small problem concerning memory. you said that variables have a shaddow variable that has 27+ status reads available, which i think is really cool. but that makes each variable 27+ bytes large. i dont mean to be offensive, but after each operation with the variable, wouldn't each of the 27 status' have to be updated, creating a big slowdown? also, what operator is the "." operator? i saw the line "deout.X.Y."Hello, World!": k.wait" is deout a reference to a system object? i do recognize the similarity to cout in C though. also, is k a reference to another system object, telling the program to pause? i can't wait to see progress on this
Title: Re: 'DE
Post by: DJ Omnimaga on November 07, 2010, 03:58:46 am
That seems interesting, I hope this works out well. Keep in mind that new language projects are very huge, so try to start with the basics first then gradually add some more stuff, like Quigibo did with Axe. Btw you can also contact Deep Thought and Builderboy on Omni if they don't respond on UTI, as they are more active here :P
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 08:43:31 am
i noticed a small problem concerning memory. you said that variables have a shaddow variable that has 27+ status reads available, which i think is really cool. but that makes each variable 27+ bytes large. i dont mean to be offensive, but after each operation with the variable, wouldn't each of the 27 status' have to be updated, creating a big slowdown? also, what operator is the "." operator? i saw the line "deout.X.Y."Hello, World!": k.wait" is deout a reference to a system object? i do recognize the similarity to cout in C though. also, is k a reference to another system object, telling the program to pause? i can't wait to see progress on this

The status reads are only 2 bytes large.  but, there are 27 different functions to attain these statuses.  Like, let's say you want the status 'Pointer'.  It would return the pointer in the 2 byte status.  Or if you wanted size, or length, or amount of occurences of a number starting at the variable, it would return those in the status.

I was also thinking that KOS would be a great platform for this ;) but so far sircmpwn isn't showing any interest in having it on KOS :(

@Nemo: That was the old syntax, I was starting to change it before I stopped working on it on UTI.
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 10:17:20 am
I'd love to have it in KOS, but you'd have to wait a bit before you start working on it.
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 10:43:12 am
well, I guess we can work out some details until then ;)
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:00:09 am
Yep, sounds good!
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 11:02:29 am
Well, sir, one question:

It looks like KOS handles multitasking and such, which is cool, could definately be implemented in threads on 'DE.  But how much memory is available to programmers?
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:03:11 am
All of RAM, save around 1000 bytes the OS uses.
If a program requests exclusive control, it can have 100% of RAM.
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 11:04:47 am
Holy s***...

now, that is a good OS right there!
'DE would be much better on KOS it sounds from this (cuz objects take up tons of space), but I'll still have to talk to builderboy about it.
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:08:21 am
That's around 15K of space when not in exclusive mode.  However, this is shared with other programs.  I'm still playing with the idea of running programs on different pages, but keep in mind that you are sharing RAM with everyone else, and if your program takes up too much, the user will be able to do less with other programs at the same time.
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 11:10:18 am
oh, I see.  I thought it was going to be more than that.  Oh well :P

Is there going to be easy ways of working from archive (like with TIos flash apps)?
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:12:09 am
You mean running programs from the archive?  Probably not, due to how KOS works.  Also, keep in mind that when your program has exclusive control, it has access to all of the RAM.
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 11:12:45 am
by all of the ram, is that one page, or is that 65 K?
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:15:40 am
All of it.  You can only access one page if you are not in exclusive mode.
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 11:17:15 am
Hmm, that would probably work for what I'm thinking of.  Well, before I start planning it for KOS, I'll wait to see what I can work with on it ;)

If it proves to be a plausible platform, then 'DE may be KOS exclusive :)
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:18:02 am
Great!  I'd love to see a KOS exclusive!  I'm thinking of making Mosiac KOS exclusive as well.
Title: Re: 'DE
Post by: Munchor on November 07, 2010, 11:18:34 am
Great!  I'd love to see a KOS exclusive!  I'm thinking of making Mosiac KOS exclusive as well.

KOS, when will it come BTW?
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 11:20:51 am
Also, I'm just wondering how programs are structured in KOS.  Is there a VAT with ~13 bytes of data on the program, and then the program in a separate spot, or is it completely different?
/me starts thinking of using KOS as mac and TIos as windows in a OS analogy :)
Title: Re: 'DE
Post by: Munchor on November 07, 2010, 11:21:34 am
/me starts thinking of using KOS as mac and TIos as windows in a OS analogy :)
Hahahah, that would be epic
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:25:18 am
Quote from: ASHBAD_ALVIN
Also, I'm just wondering how programs are structured in KOS.  Is there a VAT with ~13 bytes of data on the program, and then the program in a separate spot, or is it completely different?
/me starts thinking of using KOS as mac and TIos as windows in a OS analogy :)
First of all, KOS would never disgrace itself with the name of Mac.  Perhaps think of it as Linux (it actually is remarkably similar).
Programs are stored in ROM, within the Knight Filesystem, which is defined here (http://ourl.ca/7209).
If you are interested in using KnightOS, I would spend some time looking around the KnightOS subforum (http://www.omnimaga.org/index.php?board=112.0) and getting an idea of what it is and how it works.
Title: Re: 'DE
Post by: aeTIos on November 07, 2010, 11:26:07 am
ROM???
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 11:26:30 am
okay, I'll do that.  Sounds like this would be an interesting platform for 'DE.
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 11:27:06 am
ROM == Archive.  I don't know what made TI think of using RAM for long-term storage, it is extremely volatile.  KnightOS actually clears RAM on boot.
Title: Re: 'DE
Post by: Deep Toaster on November 07, 2010, 11:50:25 am
Great!  I'd love to see a KOS exclusive!  I'm thinking of making Mosiac KOS exclusive as well.

Aww, no TI-OS version of Mosaic, then? :(

Nice to see you're still working on this, ASHBAD. It sounds great for KOS.
Title: Re: 'DE
Post by: SirCmpwn on November 07, 2010, 12:12:44 pm
Deep Thought, probably not, but Miamas is a great IDE.
Title: Re: 'DE
Post by: DJ Omnimaga on November 07, 2010, 01:33:32 pm
It would be nice to have Mosaic for TI-OS, but again, you would be in direct competition with Mimas, which came out in surprise.
Title: Re: 'DE
Post by: Builderboy on November 07, 2010, 02:10:47 pm
Note that i think we need to finalize syntax as our first order of business.  That and we need to finalize data structure, data handling, stack handling, method handling, variable scope handling (compiler side), and variable types.  Its quite a task but we have many great programing languages to base ours off of, although the aim will hopefully make it simple and easy to use while also making it powerful and highly optimized.
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 02:15:14 pm
Very true.

I can start working on some syntax ideas in about 45 minutes, and I'll send them to you later today.
Title: Re: 'DE
Post by: AngelFish on November 07, 2010, 02:15:52 pm
I hope you guys can pull it off. :)
Title: Re: 'DE
Post by: Builderboy on November 07, 2010, 02:22:15 pm
Me too, i probably won't be able to help as much with the code writing it will definitely be a learning experience and i hope it gets somewhere at least :) We will make sure to start out small ^^
Title: Re: 'DE
Post by: DJ Omnimaga on November 07, 2010, 03:36:49 pm
It might be nice to ask the community feedback for some of the syntax, unless you are kinda porting a computer language and sticking to that syntax. Just in case some ppl might have some suggestions.
/me hopes this doesn't mean Portal X, Serenity, RandC and the other stuff won't be delayed considerably, though :/
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 03:38:20 pm
I think I'll come up with a basic syntax and then let community members critique it ;)

And on my part I know that RandC will stay in development. :)
Title: Re: 'DE
Post by: Builderboy on November 07, 2010, 03:41:16 pm
I hope not to be involved in too much of the coding aspect, since i really am not nearly any good with asm, more there for conceptual advice :) Not to worry i will still be working regularly on all my other projects ^^
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 07, 2010, 03:42:33 pm
I can do most (if not just about all) of the coding, I just need some design help ^.^
Title: Re: 'DE
Post by: DJ Omnimaga on November 07, 2010, 03:42:53 pm
Ah ok I see. That's good to hear :)
Title: Re: 'DE
Post by: calc84maniac on November 07, 2010, 03:51:29 pm
I don't really get the point of these 27 status reads. They seem kind of gimmicky to me (and they waste 2 bytes per variable at least). You want to return the pointer to a variable? Just have an operator that returns it (like the &var operator in C/C++). If I remember from the UTI thread, one of the status reads is whether the variable is even or odd. That should just be done as (var & 1). The list can go on as long as necessary :P
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 17, 2010, 01:49:37 pm
Code: [Select]
.BUILD -P
.INC 'string'
C Main  //class Main
{
 PUBLIC:
 M Main() //Constructor
 {
   .String = "Progress is being made on 'DE in secret!",0
 }
 PRIVATE:
 VS .String
}
CC Main
DEOUT << Main.String << 'nl
Return(ENDPROG)
Title: Re: 'DE
Post by: zzCoRRoDe on November 17, 2010, 01:50:26 pm
That's pretty cool.
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 17, 2010, 01:50:44 pm
Thanks Kostya zzCoRRoDe ;)
Title: Re: 'DE
Post by: Builderboy on November 17, 2010, 02:03:09 pm
Thats really neat!  Could you comment all the lines so we know what is going on?  Haha im a bit confused ;D
Title: Re: 'DE
Post by: zzCoRRoDe on November 17, 2010, 02:03:49 pm
LOL he is going to be doing that right now :P
Title: Re: 'DE
Post by: ASHBAD_ALVIN on November 17, 2010, 02:05:48 pm
nope, friend, I'll do that when I get home, school JUST let out
Title: Re: 'DE
Post by: Builderboy on November 17, 2010, 02:06:32 pm
Heh, sounds good ^^ Its looking really nice so far!
Title: Re: 'DE
Post by: DJ Omnimaga on November 17, 2010, 02:42:05 pm
Interesting. :)
Title: Re: 'DE
Post by: nemo on January 06, 2011, 10:42:34 pm
sorry to bring this back from the grave but, any progress on this?
Title: Re: 'DE
Post by: Ashbad on January 07, 2011, 01:21:30 pm
no
Title: Re: 'DE
Post by: DJ Omnimaga on January 08, 2011, 08:28:11 pm
This is the shortest update post ever. O.O

Sorry to hear there were no updates, though, although I can understand since you're focusing on Pyrix and Trio and Niko.
Title: Re: 'DE
Post by: nemo on January 08, 2011, 08:32:23 pm
no

is it dead? i was excited to see OOP on a calculator.
Title: Re: 'DE
Post by: DJ Omnimaga on January 09, 2011, 07:34:03 pm
I don't remember but I think he said before it was kinda on hiatus. I'm not sure, though. I personally think he's focusing on Trio and Niko: Falling and Pyrix, right now.
Title: Re: 'DE
Post by: Ashbad on January 09, 2011, 07:46:48 pm
yeah, plus if I did OOP I would really screw it up :/

well, if they do ever crack the prizm, I'll make DE for that, I'll promise ;)
Title: Re: 'DE
Post by: DJ Omnimaga on January 10, 2011, 02:56:43 pm
Ah ok, yeah maybe OOP might be a bit too much for z80, idk. It might be nice for the Prizm actually, though, or the Nspire.
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 07:42:33 pm
y'know what, I had the idea today that since TaNF progress is going smoothly again, I might as well take this up on a smaller scale.  Right now it's back in the conceptual phase, and I'm thinking of two ideas:

-An OOP language that compiles into Axe source, which then can be compiled into a program/flash app

-A slightly OOP language which compiles directly into assembly

And PS: keep in mind option 1 would be coded in Axe, and would have more OOP support because my axe skills are more developed in axe rather than pure assembly.

Please post your ideas/suggestions/comments.

EDIT: and one main component of the language is a very very very simple syntax which is condensed, yet extremely powerful.
Title: Re: 'DE
Post by: squidgetx on February 01, 2011, 07:43:47 pm
Compiles into Axe source? I guess I could see how that would work. I think that messing around with the tokens and everything will be a major hassle though, especially with numbers (ie parsing the characters 1,2,3 into the actualy number 123...) Regardless, good luck! I don't have much experience with oop languages though, so I can't really tell you what I think is best :x
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 07:45:16 pm
oh, actually that's not that hard, I have a routine in assembly about 75 bytes large that converts tokens (that correspond to 1-9) into actual 16 bit numbers :)

EDIT: and thanks for calc84maniac for giving it to me back when I was on UTI :)
Title: Re: 'DE
Post by: FinaleTI on February 01, 2011, 07:46:02 pm
Well, token reading isn't that bad.
I *think* I still have an Axe program on my calc that will read through a program in the RAM defined in the source just like the program editor does. It just displays it, but it recognizes 1-byte and most 2-byte tokens.
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 07:47:34 pm
Well, token reading isn't that bad.
I *think* I still have an Axe program on my calc that will read through a program in the RAM defined in the source just like the program editor does. It just displays it, but it recognizes 1-byte and most 2-byte tokens.

that sounds cool :)

yeah, I mean in assembly it would be easier (I mean, ti83plus.inc has the equates to all tokens) but I'm not planning on using that many as it is, so I can manage memorizing about 50 different token equates :)
Title: Re: 'DE
Post by: ztrumpet on February 01, 2011, 07:48:20 pm
Sounds neat.  Good luck with it.  I like the Axe idea. ;D
Title: Re: 'DE
Post by: Builderboy on February 01, 2011, 07:49:03 pm
I would recommend against compiling into Axe source, as OOP is already going to be inherently large, and running it through a *second* compiler is likely to create bugs, issues, as well as a probably very large file size :(
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 07:49:43 pm
yeah, I'm kinda basing it on a language (the name escapes me) that was around before C++ that compiled it's code into C source :)

That way, you could make MLL adjustments to it before final machine code compilation

EDIT: and builderboy does bring up a good point.  You see, the other option is also a consideration, so it's actually a good thing to see disagreement so I can make the best possible language :)
Title: Re: 'DE
Post by: FinaleTI on February 01, 2011, 07:50:05 pm
If you want, I could upload the source.

One thing I learned with token reading that you should keep in mind, when reading a two-byte token, don't use {Pointer}r, but instead use {Pointer}rr. It took me a while to figure that out, but once I did the rest of it was fairly easy.
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 07:52:02 pm
Yeah, if you could upload the source that would be most excellent :)

I've never heard of using {}rr, does it read words in big endian?
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 07:53:49 pm
At one point a couple years ago, I had an on-calc program that would compile something akin to C# into Pure TI-Basic code, and it worked quite well.  It saddens me to say it was lost in one of my parent's tyrades, but I'd love to write something similar again.
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 07:56:48 pm
so Sir you think it would be a good idea?  I thought it would be too, and to see that you've done something similar in the past shows that it is quite possible :)
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 07:59:58 pm
Outrageously difficult, but possible.  I ended up using one string and one list in every program, and two variables.
Title: Re: 'DE
Post by: FinaleTI on February 01, 2011, 08:00:19 pm
At one point a couple years ago, I had an on-calc program that would compile something akin to C# into Pure TI-Basic code, and it worked quite well.  It saddens me to say it was lost in one of my parent's tyrades, but I'd love to write something similar again.
That sounds pretty cool. Several times I've considered making a Java-esque language that compiles to something (Everytime I consider what it compiles to is different.), but never really got anywhere with it. Actually, my token reading thing came from my latest attempt.

Yeah, if you could upload the source that would be most excellent :)

I've never heard of using {}rr, does it read words in big endian?
I forget exactly what {}rr does, but it's necessary for token reading.

Source attached.
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:00:37 pm
I see, so the assembly version would actually be easier?
Title: Re: 'DE
Post by: Deep Toaster on February 01, 2011, 08:05:14 pm
Yeah, if you could upload the source that would be most excellent :)

I've never heard of using {}rr, does it read words in big endian?
I forget exactly what {}rr does, but it's necessary for token reading.

Source attached.

Yep, it's big endian.
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 08:12:27 pm
Tokens can be one or more bytes, and I would guess that {}rr would read the appropriate number of bytes.
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:12:30 pm
I have the urge to make this in asm like axe was... and I think I will.  Though I greatly intend for it to be completely different than Axe, a bit more general purpose like pure Asm rather than games and such; doing this would prompt me to make it based on more of a library system than built in routines.  So, all math commands would be in a math library, all 2D graphics would be in a grapics2D lib, all physics in a physics lib, etc.  Though I intend to make a library creating system easier by allowing the user to make libraries in both pure asm and 'DE (or Lo-C, which it was originally called, due to it's original basis on the C language)

Though, I have too many ideas on possible syntax to post here, and since my idea is to make it as condensed as possible (while not being Malbolge like), does anybody have any suggestions?  If so, could you paste an ideal "hello world" program?  Remember, if you choose to do so, keep in mind that while having a "Public Class Static Void Overwrite" in every sentence would be cool, it would be a pain to type into a calc.  Make it what you like, I'm willing to accept all ideas :D
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 08:14:27 pm
public = pub
static = sta
private = pri
protected = pro
overwrite = ovr
virtual = vir
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:15:52 pm
good idea!  and I can do it like quigibo when he overwrote the 'v' token to 'appv', etc. :D

that way they can be one token and condense the source more so
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 08:17:53 pm
Also,
class = cla
interface = ifc
struct = sct
abstract = abs
Title: Re: 'DE
Post by: AngelFish on February 01, 2011, 08:19:18 pm
The Ideal HLL-like Hello World:
Printf("Hello World
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:21:30 pm
these are all good ideas!  much better than:

DE.OUT << "Hello world" << L.N

:P
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 08:22:53 pm
pub cla Hello
{
pub sta void main()
{
sys.home.out("Hello World!")
}
}

This was the syntax for my compiler of old.
Title: Re: 'DE
Post by: Deep Toaster on February 01, 2011, 08:23:20 pm
these are all good ideas!  much better than:

DE.OUT << "Hello world" << L.N

:P

Yep, keep it simple ;) It's a calculator with only 24 KB of RAM. Plus more people would program in a simpler language.
Title: Re: 'DE
Post by: AngelFish on February 01, 2011, 08:24:38 pm
Please don't do OOP. For one thing, it's a pain to type all of those declarations. For another, the hardware isn't powerful enough for serious OOP.
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 08:25:29 pm
Having done it before, it is entirely possible, and with some help from hooks, the declarations are easy to type.
Title: Re: 'DE
Post by: AngelFish on February 01, 2011, 08:25:59 pm
OOP on-calc?

You are a god...  O.O
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:26:33 pm
pub cla Hello
{
pub sta void main()
{
sys.home.out("Hello World!")
}
}

This was the syntax for my compiler of old.

I actually like that syntax :)

though maybe for condensing the code a bit I can somehow allow for the shortening of sys.home.out

EDIT: and qwerty, if it's not OOP, it wouldn't compare to Axe.  This would be an alternative for people who want to use an OOP approach, there's no way I can catch up to axe now that it's so complete, unless it's completely different.
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 08:27:36 pm
Have you considered intellisense?  Not too hard, with a raw key hook.
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:28:27 pm
intelli-what?  Sorry if I sound like a noob :(
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 08:29:25 pm
Intellisense. (http://en.wikipedia.org/wiki/IntelliSense)
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:31:14 pm
hmm, thanks for the link :)

yeah, I could implement that, that's a really good idea!  it would shorten long code sequences quite a bit (typing-them-in-wise)
Title: Re: 'DE
Post by: Binder News on February 01, 2011, 08:47:49 pm
I think "cla" should be "clas"
Title: Re: 'DE
Post by: Ashbad on February 01, 2011, 08:48:22 pm
hmm, maybe even something simpler, like cl or cls
Title: Re: 'DE
Post by: Binder News on February 01, 2011, 09:02:56 pm
but when I see cls, I think CLearScreen
Title: Re: 'DE
Post by: SirCmpwn on February 01, 2011, 09:20:43 pm
It should be somewhat readable to beginners, don't forget.  What would you think, as a beginner, if you saw this:
Code: [Select]
pb cl Hello
{
pb st vd Main()
{
sys.h.out("hello world")
}
}
Title: Re: 'DE
Post by: Binder News on February 01, 2011, 09:23:13 pm
I would think someone was trying to mess with me.
Title: Re: 'DE
Post by: jnesselr on February 01, 2011, 10:22:36 pm
It should be somewhat readable to beginners, don't forget.  What would you think, as a beginner, if you saw this:
Code: [Select]
pb cl Hello
{
pb st vd Main()
{
sys.h.out("hello world")
}
}
I would think "oh hey, there's a public class called Hello, that has a public static function called Main Which gets the stdout and writes "hello world"."  But I am in no way a beginner. ;-)
Title: Re: 'DE
Post by: Binder News on February 01, 2011, 11:13:21 pm
^Same for me. I'm teaching my friend Java.
Title: Re: 'DE
Post by: nemo on February 01, 2011, 11:37:37 pm
hello world for me :

Code: [Select]
pub class Hello{
   pub stat void main(){
      sys.print("hello world")
   }
}
sys is a class consisting of static methods to interface with the screen. e.g. it would have methods print, paint, pxlon, pton, graph etc. there'd be a math class similarly, except maybe that could be broken up. like math.trig, math.geom, math.matr, math.gen(eral), math.stats
Title: Re: 'DE
Post by: DJ Omnimaga on February 02, 2011, 03:03:40 am
Please don't do OOP. For one thing, it's a pain to type all of those declarations. For another, the hardware isn't powerful enough for serious OOP.
He's trying to at least bring one OOP language to calcs. Otherwise it would kinda defeat the point of the project. Let's not get into anti-OOP language fanboyism here. However I think an OOP language should be on-computer programmable, or it will take ages to type code.

I'M glad to see this revived, by the way. I might unfortunately not use it, though, as  I don't use computer-style languages and am not coding a lot anymore anyway.
Title: Re: 'DE
Post by: Ashbad on February 02, 2011, 03:30:42 pm
DJ, so you think on comp would be better?  I can do that, I think.  Would actually make life slightly easier for me :P

One thing I'm thinking about it maybe getting rid of a few things like "Static" and other things like that.  I will also include simple inheritance into it, but due to some hardware restraints, going into that too far could be very painful.

Luckily, scout JUST PM'd me on his request to join the team, and since he's a good comp programmer, I could really use him :D

Of course, this will allow for better syntax:

Code: (DE) [Select]
// A sample program to show an ideal syntax

#include sys.del
#include graph.del
binary_form = PRGM
binary_name = "SAMPLE/0"

class Hello extends none
{
PUBLIC:

public method Main()
{
sys.out("Hello world!/n")
sys.outcoord(0,2,"I'm made in DE")
graph.clrbuf(Main,1)   //pretend that arg one means the normal
       //graph buffer and arg two means whether or not to update LCD
For(loop, loop = 0, loop = 3, loop++)
{
graph.sprite(Main, loop*8+8, 8, loop*8+8+Sprite)
graph.bufup()
sys.pause(2000)   //pretend it's milliseconds
}
}

PRIVATE:

private spritedata{8,8, row}   Sprite = [0011223344556677, _    // you can gues that _ allows you
1133224433554466, _     // to parse the next line as if it were
1234567812345678, _     // part of the first one
ADCF3E7CFF7F12345]
}

sys.popPC()



EDIT: this program will say 'hello world' then display sprites in a loop with a pause between each sprite's drawing time.
Title: Re: 'DE
Post by: DJ Omnimaga on February 02, 2011, 03:49:15 pm
Yeah I mean the language should be compiled to a calc language but I am not confident people will like typing such large code on-calc, especially that it will be large in size fast and they will barely be able to make a decent RPG. Most people would probably rather prefer ASM/Axe/BASIC on calc, although ASM is a bit borderline, since the code is also extremly large, but vertically. On the computer this would be perfect.

Btw does this display Hello World on the home screen or the graph screen?
Title: Re: DE
Post by: Ashbad on February 02, 2011, 03:50:16 pm
this one was intended to be on home screen, though right now all of that's purely conceptual :)

the only fun part of making a language :P
Title: Re: DE
Post by: Ashbad on February 02, 2011, 06:33:38 pm
I'm actually thinking of a new name for this language, any good ideas? :)

EDIT: some ideas I had WAY before DE were "Lo-C", "Braskell", "D++", and a few more lame ones :P
Title: Re: DE
Post by: Binder News on February 02, 2011, 10:01:10 pm
Suave
http://dictionary.reference.com/browse/suave (see synonyms)
Title: Re: DE
Post by: Ashbad on February 03, 2011, 05:33:52 pm
that's actually a cool idea for a name :D  I guess suave loosely means agreeable or the such, so I guess you can draw the string the string that it's agreeably the all around language for everybody :)
Title: Re: DE
Post by: yunhua98 on February 03, 2011, 05:35:55 pm
84++?
Title: Re: DE
Post by: Ashbad on February 03, 2011, 05:37:07 pm
lol that's a nice one too :)
Title: Re: DE
Post by: Deep Toaster on February 03, 2011, 07:10:27 pm
Z++?

And if you change the name of this project, I call dibs on making an RPG titled "Shadow Destination."
Title: Re: DE
Post by: Ashbad on February 03, 2011, 07:28:50 pm
Lol, nobody else make that game, I want DT to be the first to make an RPG with it ;D

yeah, maybe I can give you a version earlier on or something O.o

Right now the team is me, Scout, and Binder News.  The latter two will work more on file creation/coddling me through C++ code, and I'll be writing the assembly code to be compiled into.  Though, I'm still open for moar people :)
Title: Re: DE
Post by: Binder News on February 03, 2011, 08:02:50 pm
Yup, and I sent you a link to what I typed up via PM. :)
Questions? Comments? Concerns?
Title: Re: DE
Post by: Ashbad on February 03, 2011, 08:04:00 pm
Ahh, I guess I forgot to respond :'(

yeah I saw it!  and didn't understand most of it :P

I'll take your word for it that it DOES parse the file and makes an output, because I know you're an excellent comp programmer :)
Title: Re: DE
Post by: Binder News on February 03, 2011, 08:37:41 pm
Thanks!
Okay, here is my vision of the compiler:
The compiler generates a z80 assembly file, which is then run through an assembler automatically.
This would allow users to directly place their own code in. :)
It would also allow them to see the resulting asm code, and then modify it if necessary.
Title: Re: DE
Post by: Ashbad on February 03, 2011, 08:40:17 pm
that's what I was thinking too O.O

I agree, it's a great vision!  My other part of the vision is to make it simple enough so if you know C and the basics of OOP, then you're good.  But, enough advanced features (like inline assembly code and overwriting of certain code in the form of SMC with assembly)
Title: Re: DE
Post by: Binder News on February 03, 2011, 08:45:08 pm
I agree totally.
Also, will there be stuff like multiple inheritance (ex: Flip-Flops are shoes, and can be treated as summer-wear)
See the Java commands extends, and implements to better understand what I mean.
I'll start with the asm command.
Title: Re: Sauve
Post by: Ashbad on February 04, 2011, 06:53:17 pm
the project is officially renamed "Suave" at Binder New's suggestion, and me and him are full partners:  He does the C++ parts and I do the assembly parts.  Pretty great team actually, I bet we'll get far :)
Title: Re: Suave
Post by: Munchor on February 04, 2011, 07:01:36 pm
What will the C++ part be, though?
Title: Re: Suave
Post by: Ashbad on February 04, 2011, 07:39:13 pm
mostly the parsing and looking for certain characters.  So, he'll make something that checks for a certain word or so, and I put in the output assembly to be put into the .z80 file
Title: Re: Suave
Post by: Binder News on February 04, 2011, 09:34:06 pm
Yup. And so far, it's going pretty well. I have my own little system for parsing the files, and cutting them down to size. :)
Also working on a way to have "regular expressions" for parsing.
Scratch that, I'll just use a switch statement.
Title: Re: Suave
Post by: DJ Omnimaga on February 05, 2011, 04:11:34 am
Thanks!
Okay, here is my vision of the compiler:
The compiler generates a z80 assembly file, which is then run through an assembler automatically.
This would allow users to directly place their own code in. :)
It would also allow them to see the resulting asm code, and then modify it if necessary.
I like this. Otherwise maybe it would be good to allow inline ASM.

Keep up the good work on this guys. :D Who's working on the project besides you two, by the way?
Title: Re: Suave
Post by: Binder News on February 05, 2011, 09:54:29 am
After staying up till 3am doing bugfixes, moving to VC++, getting rid of freaking precompiled headers, and changing it back to just a single class, with a type enum, I am finally back to work on the actual breaking down of parsed data. Also added a way to test the output.

EDIT: for anyone worried, it will still be able to be compiled cross-platform.
Title: Re: Suave
Post by: Ashbad on February 05, 2011, 10:11:25 am
wow, nice work Binder! :D

@ DJ: just us two for now
Title: Re: Suave
Post by: Binder News on February 05, 2011, 11:11:12 am
OH MY GOD!!!! I cannot for the life of me fix the problem with the operator characters!!! It isn't breaking for them correctly! Ahhhhhhh!!!!!!!!! [/rant]
Anyways, I am having to do some serious debugging, but I'll fix it.

EDIT: oh. wow. fail. I just had to get a substring with a length of 1, instead of trying to dereference the character and then getting into char* problems.
Anyways, 1 small bug left, but it should be a lot easier to fix.

EDIT2: fixed! On to single-line comments

EDIT3: done! Unfortunately, it's kinda crude, so putting // ANYWHERE on a line (even in a string) will cause it to comment the rest of the line. I will fix this when I have added string support. :) But my dad just told me to take a break, so it'll be a little while.

EDIT4: added string recognition, and will soon add single-line comments.
Title: Re: Suave
Post by: Ashbad on February 05, 2011, 02:59:21 pm
wow, this is great!  I'm guessing you're working on a parsing thing that will check for certain things in a row, and then I add in the appropriate asm code?
Title: Re: Suave
Post by: Binder News on February 05, 2011, 03:02:53 pm
Hummm. That's a little difficult, as I would need to build a regular expression engine.
But yeah, you guessed right.  ;)

BTW, what is your sausage-dude avatar?

EDIT: added single-line comments
Title: Re: Suave
Post by: Ashbad on February 05, 2011, 03:03:48 pm
nice, and, here it what my avatar is about: http://cdn.anyhub.net/thebest404pageever/swf/would_you_like_some_sausages.swf
Title: Re: Suave
Post by: DJ Omnimaga on February 06, 2011, 12:22:25 am
Cross platform compatiblity would be nice, since a lot of us prefer to code under Linux.
Title: Re: Suave
Post by: Binder News on February 06, 2011, 09:01:11 am
You know, the English language is actually kinda weird. You code in/under Linux, you code on a Mac, but you don't code on Windows 'cause that just sound odd.
I know Spanish doesn't have that, and I don't think a lot of other languages do either.
Title: Re: Suave
Post by: Binder News on February 06, 2011, 07:51:08 pm
WOW! We went far down on the list! Anyways, I have been hard at work on the compiler, specifically the "regular command expressions" parser. This will make it a LOT easier to parser the file into different statements (like if statements, loops, classes, asm {}, etc.).

Attached are the latest build, and a test fie I put together. The resulting log.txt file shows all the tokens separated by lines.
Title: Re: Suave
Post by: Binder News on February 07, 2011, 06:21:16 pm
Even more updates, the syntax parser is coming together. If you give an invalid class name, it will show an error. Also with some other things. Working on finishing it.
Title: Re: Suave
Post by: Builderboy on February 07, 2011, 06:33:14 pm
I can't wait to see a working demo of this, even a small one :D How would you rank the current progress of this?
Title: Re: Suave
Post by: Binder News on February 07, 2011, 09:36:39 pm
Well, it only has file tokenizing and syntax parsing(mostly) done as of right now, so not too far. But I've only been at it 3 days (I didn't really get to work on it on Saturday).

EDIT: I am re-creating the java inheritance system. Ash, I know it might be a little hard to code (actually, I don't think it will be), but I am adding the functionality to the compiler. Classpath, imports, extends, implements, etc.
Title: Re: Suave
Post by: Ashbad on February 08, 2011, 05:07:43 pm
I can't wait to see a working demo of this, even a small one :D How would you rank the current progress of this?

Right now I'm gonna be busy until about friday, so unfortunately, binder is on his own for now :( but after friday this week I can really work on it a lot :)

I'd say it's less than 3% done. :P

And Binder: you are an awesome coder
Awesome Binder News is awesome ^-^ :D
Title: Re: Suave
Post by: Binder News on February 08, 2011, 05:33:13 pm
Thanks!  ;D
Title: Re: Suave
Post by: DJ Omnimaga on February 14, 2011, 12:16:51 am
On a side note it might be good to re-upload the attachment since all attachments from Feb 4th to 10th are gone.
Title: Re: Suave
Post by: Binder News on February 15, 2011, 08:07:42 pm
After a lot of work, I have re-done the compiler. It is now faster, and works better. The error reporting uses a constant system, and you could easily bee extended. I even have a way to copy files with wild chars (so you can type "classpath *.svl;").  ;D
And the best part: the wild chars uses a built-in OS command (copy for Windows, cp for Linux, need to find out for Mac) to do it! (saves the space so I don't have to use a library)
I'll upload a new version as soon as I get a few more things re-worked.
:)
Title: Re: Suave
Post by: DJ Omnimaga on February 16, 2011, 12:26:52 am
Cool to hear progress :D
Title: Re: Suave
Post by: Binder News on February 16, 2011, 05:47:51 pm
Yup, and there has been more :).
It now is starting to recognize the classpath command.
Also, once I'm done, it will make just 2 iterations over the code: once for the preprocessor, and once for the compiler.
This will save even more time compiling. :)
Title: Re: Suave
Post by: Binder News on February 18, 2011, 06:54:00 pm
Okay, I have done even more work on this. The #classpath directive works.
Soon I will be a adding the #include directive and #define.
Then the conditional compilation directives (if,ifdef,ifndef,else,elseif,endif,etc.)
After that, we'll see.

Also, does anyone know of a good cross-platform FileSystem library?
Title: Re: Suave
Post by: Ashbad on February 18, 2011, 09:00:17 pm
whoa, sounds awesome :D

anyways, any ideas on how to parse and store the comp's data on the classes?  maybe a vector table for the different classes, and another for each class for their architecture?
Title: Re: Suave
Post by: Binder News on February 18, 2011, 09:12:38 pm
I actually have a class that holds the data about classes. It has room for variables, methods, etc.
Title: Re: Suave
Post by: Ashbad on February 18, 2011, 09:14:12 pm
really?  O.O

now I just need to find a way to handle the data on calc.  Are you going to make the parsing changing easy enough so that I can add in the assembly equivalents with ease?  since there's a lot of asm code to be added O.o
Title: Re: Suave
Post by: Binder News on February 21, 2011, 01:48:42 am
:):):):)!!!!!!
Directory searching is done! Preprocessor commands are implemented! It even can be compiled with VC++ (which doesn't have dirent.h, so I use the WinAPI instead) and with the GCC (using dirent.h).
Also, the version compiled with VC++ is about 74k while the version compiled with the GCC is 541k.
Anyone know why?
Title: Re: Suave
Post by: Binder News on February 22, 2011, 04:41:25 pm
*bump*
Title: Re: Suave
Post by: DJ Omnimaga on February 23, 2011, 09:12:01 pm
That's weird ???. Could it be that the first has more dependencies, though?
Title: Re: Suave
Post by: Munchor on February 26, 2011, 02:24:59 am
:):):):)!!!!!!
Directory searching is done! Preprocessor commands are implemented! It even can be compiled with VC++ (which doesn't have dirent.h, so I use the WinAPI instead) and with the GCC (using dirent.h).
Also, the version compiled with VC++ is about 74k while the version compiled with the GCC is 541k.
Anyone know why?

I googled a bit and have no idea about it, but in that case I'd use VC++, what's to blame little size?
Title: Re: Suave
Post by: DJ Omnimaga on February 28, 2011, 03:39:33 pm
If you do that, make sure to state clearly in the readme about every depenencies the person needs to use this software, such as .NET framework or visual studio being installed. I have no clue what VC++ requires, though, but I remember some VB games required me to install .NET or other stuff.