• Features Wishlist 5 1
Currently:  

Author Topic: Features Wishlist  (Read 496491 times)

0 Members and 1 Guest are viewing this topic.

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2430 on: July 13, 2011, 10:55:04 am »
Here is one major request I would like to ask for: Data Structures.

I'm talking about structs somewhat like that which can be seen in C, but possibly simpler, where the size of each element within is somewhat constant to only 8 bit or 16 bit ints with possibility of random data to be included as well, such as pre-terminated Strings.

Here is my idea -- struct declaration would be similar to an ALGOL-based block.  Each element inside doesn't have a name, but simply a number, and the expression on each line, depending on it's form, will be added as an element to the struct.  To specify size before the value, simply one would put th size as a number the line before, and just add a colon for prettiness:

Code: [Select]
StructDef Kitty
  1:15 .add element 0 to be 8 bit char with value of $0F
  2:6000 .el. 1 is a 16 bit int with value of 6000
  8:"Hellolol" .el 2 is pointer to a string with an actual value
End

Or even easier, just allow for size to be determined at declaration, and all values upon struct declaration are undefined:

Code: [Select]
StructDef Kitty
  1
  2
  8
End

(I actually would rather the second option)

Creation would be simple, in fact, really simple.  You could use any 16 bit pointer as a pointer to a struct, and simply just do something like:

Code: [Select]
Disp Struct(A,Kitty,2) .disp string stored in element two of structure A
With this in mind, all pointers would have to actually allocate space and fill the space with data by their own means, but the pointer would be treated in accordance with the design of the access struct, Kitty.

This method would be the easiest way to implement this sort of struct data type, and would be very useful to many people, even if it is just syntactic sugar for manual indirection.

If you choose not to implement it into the language standard, I understand, I can find a way to make it in Axiom form :)

Offline defmenge

  • LV3 Member (Next: 100)
  • ***
  • Posts: 40
  • Rating: +5/-0
    • View Profile
Re: Features Wishlist
« Reply #2431 on: July 13, 2011, 10:55:29 am »
Thanx!

Where to find a list of the hexadecimal character codes?

List of character codes for the monospace font:
http://tibasicdev.wikidot.com/83lgfont

The character codes of the variable width font are slightly different for the additional characters:
http://tibasicdev.wikidot.com/83smfont
Spoiler For DROD8x:
Status: Pre-Alpha "ROACHIE" - Progress: 20%
[=====] Graphics: 100% (full greyscale tileset)
[==== ] Tilemapping: 80% (maps load successfully, additional tile data not implemented yet)
[=    ] Storage formats: 20% (planned: segmentable holds, composed of levels, made of up to [presumably] 8x8 rooms)
[==   ] Monsters: 40% (roaches and roach queen AI working; planned: eyes, wubbas, golems and possibly more)
[     ] Gameplay Elements: 0% (walls and floors only)
[     ] GUI: 0% (very bare in-game GUI)
[=    ] Editor: 20% (integrated basic editor)
Project is currently on hold due to lots of homework and tests.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #2432 on: July 13, 2011, 10:56:06 am »
Here's a table/list of them: http://tibasicdev.wikidot.com/83lgfont

Edit: Ninja'd.  Twice.  ^-^
« Last Edit: July 13, 2011, 10:57:13 am by ztrumpet »

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2433 on: July 14, 2011, 10:10:52 am »
In addition to structs, another nice feature would be expression continuation over multiple lines.  Take this for example:

Code: [Select]
lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) -> A
It would be nice if when a line ends with a colon, the expression isn't closed at the end of the line, but rather continued on the next one:

Code: [Select]
lambda(Pt-on(r1,r2,r3):
Pt-on(r1,r2+8,r3+8)) ->A

I'm finding myself writing long lambdas ATM for TaN (don't yell at me for making it Axe based again, I only did it because the new functional features make life so much easier considering enemies), some of which take dozens of lines.  This addition would be very helpful :)

SirCmpwn

  • Guest
Re: Features Wishlist
« Reply #2434 on: July 14, 2011, 10:36:05 am »
Really well done on the new version!  I haven't upgraded yet, but I'm pretty sure you can't nest includes, which would be a nice feature.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #2435 on: July 14, 2011, 11:23:33 am »
Since we now have single-byte variables, can we get 8-bit math, too? :)
« Last Edit: July 14, 2011, 11:23:48 am by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2436 on: July 14, 2011, 01:58:08 pm »
Can we get 32-bit math, please?
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2906
  • Rating: +469/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #2437 on: July 14, 2011, 05:30:23 pm »
It would be nice if you could optimize the inline-If-Else statement when one of the arguments is empty. If the first argument is empty, turn it into a !If containing the second argument. If the second argument is empty, leave off the Else clause (in other words don't write a JP $+3)

Edit: typo
« Last Edit: July 14, 2011, 05:36:59 pm by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #2438 on: July 14, 2011, 08:12:37 pm »
In addition to structs, another nice feature would be expression continuation over multiple lines.  Take this for example:

Code: [Select]
lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) -> A
It would be nice if when a line ends with a colon, the expression isn't closed at the end of the line, but rather continued on the next one:

Code: [Select]
lambda(Pt-on(r1,r2,r3):
Pt-on(r1,r2+8,r3+8)) ->A

I'm finding myself writing long lambdas ATM for TaN (don't yell at me for making it Axe based again, I only did it because the new functional features make life so much easier considering enemies), some of which take dozens of lines.  This addition would be very helpful :)

You could just write the function as a subroutine and then deference the pointer to the subroutine.

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2439 on: July 14, 2011, 09:26:26 pm »
In addition to structs, another nice feature would be expression continuation over multiple lines.  Take this for example:

Code: [Select]
lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) -> A
It would be nice if when a line ends with a colon, the expression isn't closed at the end of the line, but rather continued on the next one:

Code: [Select]
lambda(Pt-on(r1,r2,r3):
Pt-on(r1,r2+8,r3+8)) ->A

I'm finding myself writing long lambdas ATM for TaN (don't yell at me for making it Axe based again, I only did it because the new functional features make life so much easier considering enemies), some of which take dozens of lines.  This addition would be very helpful :)

You could just write the function as a subroutine and then deference the pointer to the subroutine.

Symbols are ugly to keep track of.  Plus, either way, even if I did it that way, I do have lambdas that I'm using that would look better and would be safer from Clear deletion with that implemented; organization is always nice, and that would definitely add that as an option towards keeping things clean.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #2440 on: July 14, 2011, 10:02:24 pm »
By the way, I should mention that lambda currently produce 3 extra bytes of code compared to using regular label names.  Label names are also neater and allow more flexibility with code.  Lambdas are meant to be used as expressions, that is, they take in arguments and return a value.  This could maybe optimize better in the future.  Also, using variables as single byte values is less optimized than if you had just used the 2 byte form, at least until I can optimize in some 8-bit math.
« Last Edit: July 14, 2011, 10:02:46 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Features Wishlist
« Reply #2441 on: July 15, 2011, 01:57:16 pm »
Can it be made so when the parser reaches an error and it's inside a subprogram, it displays which subprogram its in?

Not actually changing the errors, but something like...

[insert percent thing here]
ERR:INVALID HEX (or whatever happens)
prgmPHYSCSUB

...would be great.  Once it starts getting something like >5 subprograms it's great fun looking through them one at a time trying to find the error :P
Vy'o'us pleorsdti thl'e gjaemue

Offline defmenge

  • LV3 Member (Next: 100)
  • ***
  • Posts: 40
  • Rating: +5/-0
    • View Profile
Re: Features Wishlist
« Reply #2442 on: July 15, 2011, 02:42:16 pm »
If the subprograms are in RAM, you can press PRGM to open the faulty program and it'll scroll to the line the error occured at.
However, if you keep programs in the Archive (like I do), it'll just exit when you press PRGM, so it would indeed be nice if it displayed in which subprogram the error occured.
« Last Edit: July 15, 2011, 02:47:26 pm by defmenge »
Spoiler For DROD8x:
Status: Pre-Alpha "ROACHIE" - Progress: 20%
[=====] Graphics: 100% (full greyscale tileset)
[==== ] Tilemapping: 80% (maps load successfully, additional tile data not implemented yet)
[=    ] Storage formats: 20% (planned: segmentable holds, composed of levels, made of up to [presumably] 8x8 rooms)
[==   ] Monsters: 40% (roaches and roach queen AI working; planned: eyes, wubbas, golems and possibly more)
[     ] Gameplay Elements: 0% (walls and floors only)
[     ] GUI: 0% (very bare in-game GUI)
[=    ] Editor: 20% (integrated basic editor)
Project is currently on hold due to lots of homework and tests.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Features Wishlist
« Reply #2443 on: July 15, 2011, 05:26:36 pm »
Yeah, with about 5 subprograms, each from ~2kb to ~6kb, it's nice to keep them archived.
(esp as the executable gets in the 20000s, constant "ERR:OUT OF MEM" things :P)
« Last Edit: July 15, 2011, 05:27:03 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2444 on: July 16, 2011, 08:01:23 am »
By the way, I should mention that lambda currently produce 3 extra bytes of code compared to using regular label names.  Label names are also neater and allow more flexibility with code.  Lambdas are meant to be used as expressions, that is, they take in arguments and return a value.  This could maybe optimize better in the future.  Also, using variables as single byte values is less optimized than if you had just used the 2 byte form, at least until I can optimize in some 8-bit math.

So, I guess that's a no to the continuation of lines thing?  Even if I just did use them as expressions, expressions can get pretty damn long.  That's why I asked for it.