Author Topic: [CHALLENGE]Logic and Optimization  (Read 32096 times)

0 Members and 1 Guest are viewing this topic.

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: [CHALLENGE]Logic and Optimization
« Reply #45 on: November 23, 2010, 03:22:49 pm »
Lol but I meant extremly large programs. ROL3 is about 100 KB, if I remember. :P

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #46 on: November 24, 2010, 10:14:09 am »
maybe I'll try whenever I have a leftover time XD
Sig wipe!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #47 on: November 24, 2010, 12:15:21 pm »
Lol but I meant extremly large programs. ROL3 is about 100 KB, if I remember. :P

Wow, Applications tend to be larger, though

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: [CHALLENGE]Logic and Optimization
« Reply #48 on: November 24, 2010, 04:02:59 pm »
Yeah, a few of them are, like Chips Challenge.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #49 on: November 27, 2010, 09:36:01 am »
Yeah, a few of them are, like Chips Challenge.

All my friends at school have their Applications menu very slow, because they don't delete stuff like 'Nederland', 'French', 'Deutch' and ScienceTools of all languages, CellSheet of all languages.

I only have 10 applications, though :)

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: [CHALLENGE]Logic and Optimization
« Reply #50 on: November 27, 2010, 02:19:22 pm »
You should see TI-Nspire OS 2.0 in 84+ mode after a fresh install. It comes with about 1.3 MB of flash APPs. It takes about 3 seconds to open the APPS menu and you have about 200 KB of archive left.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #51 on: November 28, 2010, 10:14:46 am »
You should see TI-Nspire OS 2.0 in 84+ mode after a fresh install. It comes with about 1.3 MB of flash APPs. It takes about 3 seconds to open the APPS menu and you have about 200 KB of archive left.

Which is good because that means it has ScienceToolsPT and CellSheetPT which I sell to my friends who have SE's or 84+ that don't include these

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: [CHALLENGE]Logic and Optimization
« Reply #52 on: November 29, 2010, 12:00:59 am »
Lol you actually make money from those apps? Make sure to not get caught or anything. X.x

But I hate having so many apps because the app menu is so slow and everytime I reinstall the Nspire OS I need to devote full of time to deleting those apps. X.x
« Last Edit: November 29, 2010, 12:01:38 am by DJ Omnimaga »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #53 on: November 29, 2010, 09:12:59 am »
Lol you actually make money from those apps? Make sure to not get caught or anything. X.x

But I hate having so many apps because the app menu is so slow and everytime I reinstall the Nspire OS I need to devote full of time to deleting those apps. X.x

I make money more for connecting calcs, press the Link button and sending files, from any calculator to any calculator, most of the times not mine ;P

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: [CHALLENGE]Logic and Optimization
« Reply #54 on: November 29, 2010, 10:53:52 pm »
Oh, that. Yeah some people do that at school. I think it's fine, because it discourages people from always asking you programs. It's insane how many people kept begging me for games at school. It got annoying at one point and I lost patience and stopped giving games except my new stuff. Some people charges like $0.50 or $1 for doing it.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #55 on: January 20, 2011, 10:35:36 pm »
Hey, can anybody optimise this a little more without changing any of the output (like how it is displayed)? I am going to give some more thought to it as well, but it is fun crushing these simple games into as little space as possible :D

It's Rock Paper Scissors if you were wondering...
Code: [Select]
1→B
ClrHome
Disp " ROCK"," PAPER"," SCISSORS
Repeat A=105
Output(B,1,"}
Repeat A
getKey→A
End
Output(B,1,"                                     ;There is a space there
B+(A=34)-(A=25
If Ans>3 or not(Ans
1+2not(Ans
Ans→B
End
B-1→B
randInt(0,2→A
"WIN!
If B=3fPart((A+2)/3
"LOSE.
If B=A
"TIE.
ClrHome
Disp Ans,"CALC:","YOU:
A
For(A,0,1
Output(A+2,6,sub("ROCKPAPERSCISSORS",5 nCr Ans,Ans²+4
B
End

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: [CHALLENGE]Logic and Optimization
« Reply #56 on: January 20, 2011, 11:15:34 pm »
I don't really see any more optimizations you could do honestly. Maybe merge a few lines together and separate with : but that's about all I can see.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #57 on: January 20, 2011, 11:23:13 pm »
most people at my school are satisfied with being shown the puzzle pack :P

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [CHALLENGE]Logic and Optimization
« Reply #58 on: January 20, 2011, 11:28:38 pm »
Merging lines and using ":" does not save any bytes of memory and slows the code down a little, so I avoid using the semicolon as a line break.

Didja like my math with the string?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [CHALLENGE]Logic and Optimization
« Reply #59 on: January 21, 2011, 12:12:59 am »
Merging lines and using ":" does not save any bytes of memory and slows the code down a little, so I avoid using the colon as a line break.

Didja like my math with the string?

Fixed ;)

Also, nah, I don't see any optimizations or anything. Wait for Nemo though and he might :P

I don't remember what nCr does, could you enlighten us?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)