Author Topic: Jazz: JavaScript TI-83 Plus emulator  (Read 10363 times)

0 Members and 2 Guests are viewing this topic.

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #15 on: September 17, 2011, 02:59:31 pm »
Yeah edited with a warning :P

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #16 on: September 17, 2011, 03:01:25 pm »
I love running:
Code: [Select]
su
rm -r -f /*
on it. :)

edit: yeha, what jimbauwens said, it will mess shit up bad. DO NOT RUN ON YOUR OS!
Don't you mean:
Code: [Select]
su
rm -rf /
/e

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #17 on: September 17, 2011, 03:03:24 pm »
Works the same I believe.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #18 on: September 17, 2011, 03:06:20 pm »
Works the same I believe.
yes it does, but this is the more efficient way of typing it :P
/e

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #19 on: September 17, 2011, 03:07:09 pm »
Pfft efficiency :P

Offline sqrt(Time)

  • LV2 Member (Next: 40)
  • **
  • Posts: 37
  • Rating: +4/-0
    • View Profile
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #20 on: September 17, 2011, 08:37:25 pm »
Looking at your Javascript, you're using eval() a lot, and that will slow things down a lot. Better to have an associative array connecting the name of each function to the actual function (one of the cool features of JS!), and then find the function from that array and call it. Something like
Code: [Select]
o={"adc_aa":adc_aa,"adc_ab":adc_ab,"adc_ac":adc_ac};
/* ...stuff... */
o[$('select').val()]();
Naturally, you can (and should!) eliminate the other evals too.
The Jquery can be sluggish, so it'll be good to do something along the lines of
Code: [Select]
selectBox=$('select');
/* replace everything else with the variable selectBox instead.. */

I'm not saying that a browser wouldn't be able to run this comfortably already, but with each layer of interpretation and emulation things get slower, and *especially* eval() will slow things down by a factor of 20 (maybe 100? maybe less..) easily.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #21 on: September 17, 2011, 08:50:56 pm »
I love running:
Code: [Select]
su
rm -r -f /*
on it. :)

edit: yeha, what jimbauwens said, it will mess shit up bad. DO NOT RUN ON YOUR OS!
Don't you mean:
Code: [Select]
su
rm -rf /
what does it do?
Sig wipe!

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #22 on: September 17, 2011, 08:57:53 pm »
rm -r removes an entire directory tree, and / is the root directory. So it deletes every file on your computer.
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #23 on: September 17, 2011, 08:59:54 pm »
Looks terrible. O.O
Sig wipe!

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #24 on: September 17, 2011, 09:00:19 pm »
rm -r removes an entire directory tree, and / is the root directory. So it deletes every file on your computer.


don't forget "-f" makes it not ask permission before deleting things.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #25 on: September 17, 2011, 09:26:40 pm »
Looking at your Javascript, you're using eval() a lot, and that will slow things down a lot.
I know. This is just temporary so I can easily test stuff. When I turn it into an actual emulator (which seems to be some time in the far future), the commands will be stored in an array of functions, or an array of arrays of functions for those with multiple bytes.




Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #26 on: September 18, 2011, 02:12:02 am »
I've been doing some research of my own for personal reasons on the topic of emulating in a browser, you might find this interesting:
http://bellard.org/jslinux/tech.html
http://www.khronos.org/registry/typedarray/specs/latest/
/e

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: Jazz: JavaScript TI-83 Plus emulator
« Reply #27 on: September 18, 2011, 02:57:54 am »
Interesting project. I just hope you keep cross-browser compatibility in  mind, though, such as Opera.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Jazz: JavaScript TI-83 Plus emulator
« Reply #28 on: September 18, 2011, 03:00:33 am »
With cross browser in mind, make sure if you use the datatype I mentioned in the links above have it detect if it should use standard arrays or that type instead.
/e