Join us on Discord!
You can help CodeWalrus stay online by donating here.

Duktape - A JavaScript interpreter for the Nspire [ti-nspire]

Started by Legimet, February 04, 2015, 03:01:18 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Legimet

Duktape 1.3.0 was released last month: https://github.com/svaarala/duktape/blob/master/RELEASES.rst. There are some performance improvements, so hopefully I will get time to test it soon. :)

Also, there's a pull request from fgalliat that I am planning to merge.

Dream of Omnimaga

That is good. I was wondering if this was still alive but I'm glad you are still into the calculator scene. :)


I wonder how fast would DukeTape would be on the TI-84 Plus CE, if that calc had enough memory for one... (it has 150 KB of user RAM and 3 MB of Flash)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Adriweb

It would theoretically run on the CE, but getting it to compile in the first place would probably be a nice challenge (ZDS has a bad C89 implementation)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Legimet

Quote from: Adriweb on October 13, 2015, 02:42:30 AM
It would theoretically run on the CE, but getting it to compile in the first place would probably be a nice challenge (ZDS has a bad C89 implementation)

We also don't know how fast it would be. Anyway, I'm planning to do some benchmarking tomorrow to see how much things have improved :)

Dream of Omnimaga

I guess as long as it's faster than hybrid TI-BASIC then I would be fine. But if the speed gain isn't enough then it wouldn't be worth it.

Anyway Legimet Please post your benchmarks to compare :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Legimet

There wasn't any noticeable difference, but the call handling will be improved in Duktape 1.4.

Dream of Omnimaga

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Legimet

After updating to Duktape 1.3.1, I've merged fgalliat's contribution, which added some graphics functions to draw basic shapes such as lines, circles, polygons, etc. :)

An example can be seen here.


Dream of Omnimaga

That is colorful :O

I like the polygon addition. It reminds me of HP PPL :P

Also I'm glad to see this updated :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

Pretty sweet :) How does the speed compare to other languages? (im not really familiar with NSpire calculators)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Legimet

@Adriweb and I did a recursive Fibonacci benchmark (the "dumb" method of computing the Fibonacci numbers) and Duktape was pretty slow due to its slow call handling. This is supposed to be optimized in Duktape 1.4. I haven't done any other benchmarks.


Dream of Omnimaga

It doesn't seem that bad at least, but I guess it might not be as convincing for people who wants to switch from Lua for speed reasons. I'm glad this took is now available on the CX, though. More language options for Nspire coders. :D
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Legimet

I was working on this a bit during the summer and was going to post about it but then stuff happened and I stopped working on it.

Anyway, I updated it to work with Duktape 2, which greatly improves the speed. I also added support for HW-W. I'll try to find the benchmarks that I did a few months ago and post a graph of it.

EDIT: Also Duktape 2.2.0 is out, so I guess I'll update it and do a new benchmark.

Yuki

  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

Quote from: Legimet on October 04, 2017, 10:11:34 PM
I was working on this a bit during the summer and was going to post about it but then stuff happened and I stopped working on it.

Anyway, I updated it to work with Duktape 2, which greatly improves the speed. I also added support for HW-W. I'll try to find the benchmarks that I did a few months ago and post a graph of it.

EDIT: Also Duktape 2.2.0 is out, so I guess I'll update it and do a new benchmark.
Glad to hear this is getting updated again. :) HW-W support addition was a must ^^
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal