Author Topic: PCspire, run Nspire lua programs nativly on your pc  (Read 28338 times)

0 Members and 1 Guest are viewing this topic.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #30 on: March 17, 2012, 11:43:47 pm »
Ironically, I already have Löve for some reason :P

Are programs run with this faster than on calc? If so, is there a way to toggle the speed to that of an Nspire?

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 Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #31 on: March 18, 2012, 03:04:24 am »
Quote
Are programs run with this faster than on calc?
IIUC, they shouldn't - it's one of the points of PCspire :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #32 on: March 18, 2012, 06:45:12 am »
Yup, that is correct.
Since Nspire lua is event based, scripts use the timer to trigger updates in a specified interval.
And the timer in PCspire works the same, so the script should seem to run at the same speed.

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #33 on: March 18, 2012, 10:55:38 am »
This has gotten me interested in the Love framework. It's interesting and I might use it.

For the TI-Image, what are the parts with "alalalalalalala" about?

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #34 on: March 18, 2012, 10:59:10 am »
"al" represent a color, and in this case the color red, with a alpha bit so that it's invisible.
I replaced the white in his image with it to make it transparent .

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #35 on: March 18, 2012, 11:02:38 am »
Is there a TI-Image optimizing tool of some sort? Or is there a list of optimizing rules?

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #36 on: March 18, 2012, 11:05:41 am »
I use my online sprite editor (bwns.be/jim/sprite.html) for that, and/or do some stuff manually :)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #37 on: March 18, 2012, 02:33:23 pm »
looks very nice! :D
Sig wipe!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #38 on: March 19, 2012, 03:49:57 am »
How's the speed by the way? Is it dependent on the computer or will it run at the same speed on every computer? It would be nice if it was the latter, for those who wants to make animated screenshots.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #39 on: March 19, 2012, 05:37:32 am »
afaik its same on each computer. (same speed as the nspire)
I'm not a nerd but I pretend:

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #40 on: March 20, 2012, 12:10:47 pm »
People can already check out the code on https://github.com/jimbauwens/PCspire.
However, it's not yet noob proof :P
But it will :)

Currently these things need to be fixed:
- Drawing arcs (draws a full circle now)
- When invalidating specific screen parts, it can skip a couple of pixels. Shouldn't be a problem for most programs, but it needs to be fixed anyway.
- Text offsets need to be improved
- Images need better alpha support

These things need to be added:
- Tool palette (menu system that hardly anybody uses :P)
- Cursor changing. This is more hard because love2d doesn't support this directly

Stuff that I might never implement because they are very hard:
- math.eval (requires CAS engine and TI-Basic interpreter)
- D2Editor (requires rtf interpreter)
- Physics (love2d has physics, but it would be too hard to make it compatible with the chipmunk one on the nspire)


Programs I tested that work fine:
- Updated version of Cubefield
- LogoMagic
- Klondike Lua
- Some programs that use the EEPro widgets (I forgot the names, or maybe I didn't name them yet :P)
- Color Tetris
- BlockBreaker Lua
- Bloxorz
- some other tiny stuff I made :P
« Last Edit: March 21, 2012, 06:57:13 am by jimbauwens »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #41 on: March 20, 2012, 12:18:30 pm »
Jim, love actually does support changing cursors, check out the wiki :)
I'm not a nerd but I pretend:

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #42 on: March 20, 2012, 12:22:08 pm »
Hmm, I don't find it. Mind linking to the page with info?

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #43 on: March 21, 2012, 08:11:25 am »
Alright, fixed the text offset and the invalidating bug.

DiagramNZ works properly with one little change:
It replaces the Lua function named "type" with a number value, causing some Lua parts of love not to function properly.
So, I just replaced "type" with "Type" (in the DiagramNZ source) and it worked fine :)
Screenshot: http://bwns.be/jim/DiagramNZ.png

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: PCspire, run Nspire lua programs nativly on your pc
« Reply #44 on: March 21, 2012, 04:29:03 pm »
nice :)

and for that cursor change: here it says to make the real mouse invisible and place your own sprite on the trackable coordinates of the mouse...