Author Topic: Undo  (Read 22807 times)

0 Members and 1 Guest are viewing this topic.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Undo
« Reply #15 on: February 25, 2011, 04:15:14 pm »
How long would it take to redraw the whole picture? That actually sounds like a fairly efficient solution, given that it's not difficult to "call READ." Why is it a pain?

Also I think HxD is a hex editor.
« Last Edit: February 25, 2011, 04:15:30 pm by squidgetx »

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Undo
« Reply #16 on: February 25, 2011, 04:16:50 pm »

DJ, yeah. The only program I've ever seen advertise "unlimited undos" was HxD, which has a much easier task of it than most programs because of how densely you can store hex.
What does this program do and how does it undo?

It's a hex editor, so it probably stores what you write in a buffer that's kind of like a .txt file. You could do the same with Input, although TI-Strings are much less efficient than ASCII.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

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: Undo
« Reply #17 on: February 25, 2011, 04:18:54 pm »
Read is a Basic program. Macro drawings run hundreds of commands long (not helped by the fact that three of the commands use up two list elements). It takes about half a minute (I've never timed it) to Fully draw a list, and 30 seconds per undo is unacceptable.
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 AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Undo
« Reply #18 on: February 25, 2011, 04:19:42 pm »
 :o

Mind posting a screenie or some example code?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Undo
« Reply #19 on: February 25, 2011, 04:20:20 pm »
how about a compromise, you can have a single pic var for a quick undo of a single step, and from then on, you can redraw the screen for any further undos?

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: Undo
« Reply #20 on: February 25, 2011, 04:36:09 pm »
The problem is that the list can easily run thousands of bytes, and a compromise, while a great idea, would be a nightmare to implement. Add to that I'm already using Pic1....
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 Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Undo
« Reply #21 on: February 25, 2011, 04:38:04 pm »
There is always Pic2 :D

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: Undo
« Reply #22 on: February 25, 2011, 04:43:49 pm »

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: Undo
« Reply #23 on: February 25, 2011, 05:13:41 pm »
*User sees all memory has gone from calc*"So that's where I downloaded the Internet!"
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 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: Undo
« Reply #24 on: February 25, 2011, 08:34:25 pm »
That many pics would require a lot of archiving/unarchiving or writing to Flash. The best way to undo, memory-wise, is if each undoes were like 1 digit of 1 byte each. But that's impossible in BASIC. In BASIC one list element is 9 bytes large. So basically 999 undoes creates a list close to over 9000 bytes large.
« Last Edit: February 25, 2011, 08:36:10 pm by DJ_O »

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: Undo
« Reply #25 on: February 25, 2011, 09:18:39 pm »
OVER9000! I leave no possibility uncodedfor in my nonmath programs. The unlikeliest bugs are the ones found the first, and generally are the worst *start programming rap here*
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 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: Undo
« Reply #26 on: February 25, 2011, 09:53:41 pm »
Hmm I am confused what you mean (besides the >9000), sorry. Could you rephrase? ???

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Undo
« Reply #27 on: February 25, 2011, 10:51:05 pm »
You could actually optimize it, and kinda cheat it a little bit.  If you have to go back one step, you have the picture, because you stored it right before the new step.  But if you have to go back any farther, or hit any other redraws, you have the last element be run right after you store the picture.

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: Undo
« Reply #28 on: February 26, 2011, 01:05:42 am »
I thought of that, but it could erase pixels that were drawn by multiple commamds. (Think Line(X1,Y1,X2,Y2,0))
@DJ_O I'm defensive in the extreme when it comes to programming (one of my programs only gives the user 4 tries to give valid input. There's  a cap on the number of tries not to insult the user, but to avoid my error message being displayed wrong.)
« Last Edit: February 26, 2011, 01:16:36 am by Freyaday »
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 JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Undo
« Reply #29 on: February 26, 2011, 02:42:27 am »
In BASIC one list element is 9 bytes large. So basically 999 undoes creates a list close to over 9000 bytes large.
Actually, a 999-element list is 9003 bytes large. I lol'd the first time I noticed it was OVER 9000