* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: ICE Compiler  (Read 28483 times)

0 Members and 3 Guests are viewing this topic.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18539
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: ICE Compiler
« Reply #345 on: April 21, 2017, 11:18:13 pm »
I'm happy to see SourceCoder support ICE. I liked SourceCoder since it seemed easier with it to work with the Minus symbol (as in, the smaller -, not the substraction one)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 259
  • Post Rating Ratio: +11/-0
Re: ICE Compiler
« Reply #346 on: May 01, 2017, 09:24:59 pm »
So well, yeah, time for some updates, or whatever you call it. As you might already know, I'm recreating ICE in C to make development faster, and easy add new features. This is coming along very well, I need to say. Currently numbers, variables, operators and parenthesis are supported (still need code for every operator), and more are coming soon. However, I'm running into a huge problem, and that are C functions. They are not like 'normal functions', such as not( and remainder( and so on. For the last type of tokens, I just add code for every possible argument type(s), rather than using the stack, like C functions need. However, this method simply doesn't apply to C functions, as they are supposed to take the input (arguments) from the stack, not registers etc. Thus, with the Shunting Yard Algorithm I'm doing, it is VERY hard to add C functions, and I'm not sure yet how to solve this. Let's take a look at some example:
Code: [Select]
det(2,det(15,X+2->X                 2 15 X 2 + det( det( X ->

det(2,det(15,X)+2->X                2 15 X det( 2 + det( X ->

det(2,det(15),X+2->X                2 15 det( X 2 + det( X ->

det(2,X+det(15),2->X             2 X 15 det( + 2 det( X ->

det(2,X,2*det(15))+3->X             2 X 2 15 det( * det( 3 + X ->

2*det(15,X)+3->X             2 15 X det( * 3 + X ->

det(2,X+2,1,2,3     2 X 2 + 1 2 3 det(
Left is the input, right is the input in infix notation.

Now let's take my last example. If I just parse them as normal, first the "+" is parsed, so X+2, but since the output isn't used in the next 2 elements (as an operator or function), the output is pushed to the stack, and that is where problems arise, it should not even parse the +. First 3, then 2, then 1 should be pushed, afterwards X+2 parsed and pushed, then the det( function will be called.

Again, I've no idea how to solve this, and I'm open for any ideas! :)


Progress: I've added icon and description support:
« Last Edit: May 01, 2017, 09:27:57 pm by PT_ »

Offline E37

  • Full User
  • Join Date: Jul 2016
  • Location: Lihilzard Empire
  • Posts: 224
  • Post Rating Ratio: +10/-0
  • I own 2 game consoles, a ti-83 and a ti-84!
    • E37
Re: ICE Compiler
« Reply #347 on: May 07, 2017, 09:32:51 pm »
Very fancy!
What does the det( command do? (in ICE)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Offline xMarminq_

  • Full User
  • Join Date: Sep 2016
  • Location: Generic Location
  • Posts: 401
  • Post Rating Ratio: +3/-0
  • Generic Personal Text
    • @UCUWQR30oIW2fRqCNI2IDGIA
  • Gender: Male
Re: ICE Compiler
« Reply #348 on: May 07, 2017, 11:44:46 pm »
Detect? IDK
  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 259
  • Post Rating Ratio: +11/-0
Re: ICE Compiler
« Reply #349 on: May 08, 2017, 09:35:30 am »
det( is the start of a C function, for example det(0 is "Begin", det(5 is "FillScreen" etc.

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 259
  • Post Rating Ratio: +11/-0
Re: ICE Compiler
« Reply #350 on: May 08, 2017, 04:03:47 pm »
I've added SetBASICVar( which... sets a BASIC variable! :D

Download: https://tiplanet.org/forum/archives_voir.php?id=587211

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18539
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: ICE Compiler
« Reply #351 on: May 08, 2017, 06:40:33 pm »
OMG does this mean external saves are now supported? O.O Also does it set to real vars?
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 259
  • Post Rating Ratio: +11/-0
Re: ICE Compiler
« Reply #352 on: May 08, 2017, 06:41:46 pm »
OMG does this mean external saves are now supported? O.O Also does it set to real vars?
You can now store integers to the real BASIC variables A-theta :)


Offline _iPhoenix_

  • Full User
  • Join Date: Mar 2017
  • Location: Encoded in Binary.
  • Posts: 372
  • Post Rating Ratio: +8/-1
  • █████ ▼ ♪ Best music ♫
    • @dj_iPhoenix
    • @UCytgMNPxAMDsxjimvxHf01w
    • @the-legend-of-iphoenix
  • Gender: Male
Re: ICE Compiler
« Reply #353 on: May 08, 2017, 07:43:57 pm »
That's great, but is the progress bar through the "Successfully compiled" a gif glitch?

EDIT: Perhaps add the ability to edit/read BASIC programs or AppVars (i.e. files), token by token.
EX: editFile(*file*, *token number, from start*, *token to change to*)
EX: readFile(*file*, *token number, from start*)
EX: checkFile(*file*, *token number, from start*, *token to check for*
The last one would return 1 if the token indicated in the specified file was the same as the token to check for.

Perhaps make 'token' byte, even, that would be easier to handle, I'd think (but take what I think with a grain of salt)


« Last Edit: May 08, 2017, 07:50:19 pm by _iPhoenix_ »
  • Calculators owned: A sentient TI-84+ CE, TI-85
  • Consoles, mobile devices and vintage computers owned: TI-99/4a home computer
Help me with a project by voting here! Thanks!

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 259
  • Post Rating Ratio: +11/-0
Re: ICE Compiler
« Reply #354 on: May 08, 2017, 11:24:36 pm »
I'm SUUUUUPPEERRRRR excited to announce this very great news:

https://ice.cemetech.net

It redirects you to a page at Cemetech Learn, where I will put all the needed information, and Tips and Tricks! :D
« Last Edit: May 08, 2017, 11:29:52 pm by PT_ »

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18539
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: ICE Compiler
« Reply #355 on: May 09, 2017, 05:07:26 am »
Nice :D. Also I'm happy to see real vars supported. Are their content preserved when entering or exiting an ICE program, though (unlike Pic4)? :P
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 259
  • Post Rating Ratio: +11/-0
Re: ICE Compiler
« Reply #356 on: May 09, 2017, 10:54:18 am »
As long as other BASIC programs don't overwrite them ;) I'm working on GetBASICVar( as well, to eventually get the highscore :D

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18539
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: ICE Compiler
« Reply #357 on: May 09, 2017, 09:33:36 pm »
Yeah I was mainly wondering, so that using BASIC code, people can do things like this:

{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->L1
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline _iPhoenix_

  • Full User
  • Join Date: Mar 2017
  • Location: Encoded in Binary.
  • Posts: 372
  • Post Rating Ratio: +8/-1
  • █████ ▼ ♪ Best music ♫
    • @dj_iPhoenix
    • @UCytgMNPxAMDsxjimvxHf01w
    • @the-legend-of-iphoenix
  • Gender: Male
Re: ICE Compiler
« Reply #358 on: May 09, 2017, 09:36:47 pm »
I saw that the program you used had the "getBasicVar()" as a token. Is that due to the fact that you are programming it in C?
  • Calculators owned: A sentient TI-84+ CE, TI-85
  • Consoles, mobile devices and vintage computers owned: TI-99/4a home computer
Help me with a project by voting here! Thanks!

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 259
  • Post Rating Ratio: +11/-0
Re: ICE Compiler
« Reply #359 on: May 13, 2017, 03:34:55 pm »
No, that is because ICE didn't had the possibility to interact with BASIC programs, but now you can.

Time for some quick updates about my C version: I've implemented all the operators, and added code for functions, which work fine, I only need to add them :P Chaining things also work, so the only thing I need to do is doing weird stuff with C functions and get that working :)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games