UpsilonNumworks / Upsilon

Upsilon, an OS forked from Omega for your Numworks calculator
https://getupsilon.web.app/
Other
201 stars 57 forks source link

Casio Graph90/FXCG50 and TI Nspire ports #327

Open parisseb opened 1 year ago

parisseb commented 1 year ago

I have working ports of Upsilon with persistence (apps and calc history) and support for file exchanges with the host calculator for the Casio Graph 90/FXCG50 and for all TI Nspire (b&w, cx, cx2). They are based on the ports of Kerry Shen for the TI and Heath on the Casio. I believe it's now good enough for my own students usage, I don't plan to make changes in the short term except for bug fixes.

Binaries: Casio https://www-fourier.univ-grenoble-alpes.fr/~parisse/casio/upsilon.g3a TI Nspire https://www-fourier.univ-grenoble-alpes.fr/~parisse/ti/upsilonbw.tns (for Nspire CX and CX2, next link is optimized for flash storage https://www-fourier.univ-grenoble-alpes.fr/~parisse/ti/upsilon.tns)

Source modifications: get this file https://www-fourier.univ-grenoble-alpes.fr/~parisse/ti/upsilon_changes.tgz and run from Upsilon source root directory tar xvfz upsilon_changes.tgz (I apologize but I never could familiarize enough with git, it's so much easier for me to make tar archive. Maybe someone more familiar with git will include my changes here).

In the long term, I may add a link to Giac for improved CAS support inside Upsilon for the Casio, as an addin overlay.

BloomyInDev commented 1 year ago

Did u know Github Desktop ? It make easier to make things with Github without having to append multiples commands to make a simple commit

Lisra-git commented 1 year ago

Pourriez vous fournir le dossier cloné complet avec le dossier .git Cela permettra de créer une vraie pull request facilement afin d'établir les changements

parisseb commented 1 year ago

https://www-fourier.univ-grenoble-alpes.fr/~parisse/casio/upsilon.tar.bz2 Changes are in already existing files and in the additional directory ion/src/simulator/nspire

BloomyInDev commented 1 year ago

https://www-fourier.univ-grenoble-alpes.fr/~parisse/casio/upsilon.tar.bz2 Changes are in already existing files and in the additional directory ion/src/simulator/nspire

Yeah but that not practical because when upsilon gonna get updated, it can break ur code

parisseb commented 1 year ago

That's precisely the reason why I have a much smaller archive with only the files I have modified. I guess it's fairly easy for someone who has write access to the main repository to untar my changes in his copy of Upsilon and make the update available to all (it should be much easier than writing the additional code I wrote...). You may prefer to wait a couple of weeks: I'm beginning to make changes in order to link the Calculation app to a binary overlay file containing a light version of giac, in order to have true symbolic capabilities inside Upsilon on the Casio (it should also be possible to do the same on unlocked Numworks, and perhaps on the Nspire CX too, but that's not a priority for my own use because we propose loans of Casio to our students)

BloomyInDev commented 1 year ago

That why Github exists ! It isn't for having everyone download archives of others and track where things have changed (and no just pushing ur archive isn't a solution in the state of things imo). My argument of

Yeah but that not practical because when upsilon gonna get updated, it can break ur code

doesn't change. And if you change the archive we can't know that you changed something (or we need to know the sha256 or other to see that there is a modification somewhere and dig for what have been changed to know exactly (Hassle if u compare with Github)) and we can't be sure of breaking changes in your code or in Upsilon. I think a little knowledge of Github (or Git) is a requirement in coding now and whether you like it or not I want to clarify that i'm not angry about your port or even KhiCAS, i'm just angry that people that code things don't take 5 minutes to see a short vid about git and how to use it ! (Even GUI's exists to make Github even easier to use so it isn't a excuse).

parisseb commented 1 year ago

It does not take 5 minutes to be comfortable with git (just imagine if I said the same about many math tools like linear algebra). You think it's easy because you are used to it (perhaps you started coding with git) and you have probably a dev environment that makes git easy. My dev environment did not change since 30 years: emacs, tar and Unix commandline and I'm productive that way. I tried git for a project, and I resigned because it's already more complicated than using svn and it's much more complicated than doing a combination of a shell command to archive the files I work on and then a scp to my website (type twice (3 times uparrow, 1 time enter)). You are of course not forced to accept my contributions the way I give them (which however seems compatible with the rate of changes in Upsilon). If you don't, then I'll publish my own version of Upsilon like I do for Khi and other projects and that's all.

BloomyInDev commented 1 year ago

This is a response to your message and theirs arguments

It does not take 5 minutes to be comfortable with git.

So your saying that typing

git add .
git commit
git push origin master

is hard ?

You think it's easy because you are used to it (perhaps you started coding with git) and you have probably a dev environment that makes git easy.

Maybe, nope and maybe. I'm still learning it (thanks documentation), if u see my account, you will notice that i use github since 5 month (i don't count when i didn't use the account)

(just imagine if I said the same about many math tools like linear algebra)

I don't see the link, they aren't the same level of dificulties and it's your job if i'm not mistaken

My dev environment did not change since 30 years: emacs, tar and Unix commandline and I'm productive that way.

Maybe that how you code that need to change, not everyone that not like you. Did u know that is called the evolution of the technology ?

it's much more complicated than doing a combination of a shell command to archive the files I work on and then a scp to my website (type twice (3 times uparrow, 1 time enter)).

"much more complicated" = typing 3 command or making a sh file with the same 3 commands ?

If you don't, then I'll publish my own version of Upsilon like I do for Khi and other projects and that's all.

Making another place for another fork ? Again ?

Thanks for reading.

parisseb commented 1 year ago

What's important in the end is the features that are implemented, not the process. Processes are subject to changes, git may be replaced by a more popular tool in the future, like cvs, svn, mercurial in the past... If I'm more comfortable using the same tools as 30 years ago and I'm productive, why change? If other people here find my contributions interesting, I'm confident they will integrate my changes with their preferred tool. Otherwise, it's not really a problem, I'll merge changes I made in Upsilon with Khi. Now I will stop commenting on this, it's not productive.

I got today an encouraging first test with a call from Upsilon to a light version of giac in an overlay on the Casio: one factorization and an antiderivative called from the Upsilon addin. If there is no memory problem for more complex tasks, then it should be possible to run giac CAS commands from the calculation app. I'll post when I'll know.

Yaya-Cout commented 1 year ago

I am changing some part of the code to match the code style before merging.

parisseb commented 1 year ago

What do you mean by changing the code style?

parisseb commented 1 year ago

Also, you should probably wait a few days before synchronizing, maybe I can provide a working prototype of Calculation linked with giac.

parisseb commented 1 year ago

I made a new version of updates available. The main additions are: 1/ The calc and Python apps may now link to an external binary containing Xcas if Upsilon is compiled with -DXCAS. This implies some changes in menus. 2/ The following ports will compile with -DXCAS: FXCG, NSPIRE_NEWLIB and EMSCRIPTEN (web simulator) 3/ I also implemented persistence in the web simulator, as well as file exchanges with the PC. Note that the Upsilon binary and Xcas binary do not have the same licenses. I added an exception to the GPL3 allowing calls from Upsilon (or software with the same license) on calculators or emulators for non commercial personal use only. You can try all this in the web simulator here: https://www-fourier.univ-grenoble-alpes.fr/~parisse/numworks/simulator.html There is French documentation here https://www-fourier.univ-grenoble-alpes.fr/~parisse/numworks/casworks.html Like before the source changes are in https://www-fourier.univ-grenoble-alpes.fr/~parisse/numworks/upsilon_changes.tgz (or https://www-fourier.univ-grenoble-alpes.fr/~parisse/numworks/upsilon.tar.bz2 for the full directory). I believe it's beta quality, I will probably have to fix a few bugs in the coming days/weeks.

An improvement that might really be interesting would be to have fake support for the limit command in Poincare in order to have a nice layout in the calc app. I don't plan to do it myself, Numworks code is really too different from my own coding habits.

BTW, I don't know how you are doing devel on Upsilon (or other projects). I use gdb inside emacs on linux myself, and I noticed that it crashes with the DEBUG=1 version of the epsilon binary. I found a workaround that might be helpful for others (since debuggers UI are often based on gdb): build in release mode and copy the nlr* object files of Python from the release subdirectory to the debug subdirectory. Build all other object files in debug mode, then gdb works nicely.

dolmen commented 11 months ago

@parisseb Bernard, en 2023, il faudrait quand même faire l'effort d'apprendre les bases de Git. Parce que là vous embêtez tout le monde avec vos tarballs. Ca fait 15 ans que GitHub existe et des milliers de tutoriels sur Git existent.

Commencez par faire un fork de ce dépôt via l'interface de GitHub.

Ensuite voici les commandes à utiliser :

git config user.email "bernard.parisse@univ-grenoble-alpes.fr"
git config user.name "Bernard Parisse"

git clone --orign=upstream https://github.com/UpsilonNumworks/Upsilon.git
cd Upsilon
git remote add parisseb https://github.com/parisseb/Upsilon.git
git checkout -b upsilon-parrisseb
git push -u parisseb upsilon-parisseb
curl -o upsilon_changes.tgz 'https://www-fourier.univ-grenoble-alpes.fr/~parisse/numworks/upsilon_changes.tgz'
tar xvzf upsilon_changes.tgz
rm upsilon_changes.tgz

Un peu de nettoyage :

# Clean dirty backup files
find . -name '*~' | xargs rm -f
# Clean trailing spaces
sed -i= 's/  *$//' $(git diff --name-only) apps/home/controller.cpp

A partir de là vous pouvez faire des commits de changements cohérents :

git add $file
git add $file
git add -p $file # Choose interactively which parts of the file you want to take
git commit
git push

Et vous pourrez plus facilement maintenir votre branche. Lorsque des nouveautés apparaîtront sur le dépôt Upsilon, il vous suffira de faire :

git remote update upstream
git rebase upstream/master
git push -f
BloomyInDev commented 11 months ago

@parisseb Bernard, en 2023, il faudrait quand même faire l'effort d'apprendre les bases de Git. Parce que là vous embêtez tout le monde avec vos tarballs. Ca fait 15 ans que GitHub existe et des milliers de tutoriels sur Git existent.

Commencez par faire un fork de ce dépôt via l'interface de GitHub.

Ensuite voici les commandes à utiliser :

git config user.email "bernard.parisse@univ-grenoble-alpes.fr"
git config user.name "Bernard Parisse"

git clone --orign=upstream https://github.com/UpsilonNumworks/Upsilon.git
cd Upsilon
git remote add parisseb https://github.com/parisseb/Upsilon.git
git checkout -b upsilon-parrisseb
git push -u parisseb upsilon-parisseb
curl -o upsilon_changes.tgz 'https://www-fourier.univ-grenoble-alpes.fr/~parisse/numworks/upsilon_changes.tgz'
tar xvzf upsilon_changes.tgz
rm upsilon_changes.tgz

Un peu de nettoyage :

# Clean dirty backup files
find . -name '*~' | xargs rm -f
# Clean trailing spaces
sed -i= 's/  *$//' $(git diff --name-only) apps/home/controller.cpp

A partir de là vous pouvez faire des commits de changements cohérents :

git add $file
git add $file
git add -p $file # Choose interactively which parts of the file you want to take
git commit
git push

Et vous pourrez plus facilement maintenir votre branche. Lorsque des nouveautés apparaîtront sur le dépôt Upsilon, il vous suffira de faire :

git remote update upstream
git rebase upstream/master
git push -f

Et si sa vous embête de tapper ces commandes, faites des scripts et modernisez vous ! Comme tout, le monde avance/évolue donc évoluez avec !

parisseb commented 11 months ago

Je me suis déjà expliqué, je ne vais pas revenir là-dessus parce que la meute aboie. Mes derniers changements datent d'il y a 3 mois, si ça intéresse Upsilon, au lieu de me faire la leçon, soyez pragmatiques et productifs, insérez-les vous-même, comme cela ce sera fait sans risque d'erreur (au passage, j'apprécierai que l'on respecte la façon dont je les ai faits). Sinon, ce n'est pas bien grave, je diffuse ma propre version d'Upsilon modifié pour Casio 90 et TI Nspire pour les gens intéressés.

BloomyInDev commented 11 months ago

Je me suis déjà expliqué, je ne vais pas revenir là-dessus parce que la meute aboie. Mes derniers changements datent d'il y a 3 mois, si ça intéresse Upsilon, au lieu de me faire la leçon, soyez pragmatiques et productifs, insérez-les vous-même, comme cela ce sera fait sans risque d'erreur (au passage, j'apprécierai que l'on respecte la façon dont je les ai faits). Sinon, ce n'est pas bien grave, je diffuse ma propre version d'Upsilon modifié pour Casio 90 et TI Nspire pour les gens intéressés.

Je ne fais que mentionner ce qui a été dit sur le discord d'Omega Soi disant passant, je trouve cela bizarre que vous ne vouliez pas poster vos modifications, même si vous ne le faites que rarement/une seule fois, cela serait un compromis acceptable ? Je trouve dommage que tout doit être étalé sur plusieurs sites pour avoir les sources d'un projet qui, au final, peut être très pratique/puissant

Yaya-Cout commented 11 months ago

Même si je trouve dommage que vous n'utilisiez pas git pour partager votre code, ce qui faciliterait la relecture, l'historique et la communication (encore que j'hésite à partir de GitHub et vers une autre platforme, peut-être self-hostée, car GitHub devient de plus en plus du "bullshit" autour de l'IA), je n'approuve pas le fait de rejeter le travail des autres simplement car il n'est pas sur la même plateforme. Concernant le port NSpire, je tenais à vous informer qu'un patch a été publié pour via la pull request #340 pour réparer l'affichage sur certains modèles de NSpire qui n'ont pas le même framebuffer (pour que vous puissiez l'intégrer dans votre version).

parisseb commented 11 months ago

Alors en fait j'utilisais lcd_blit au début (c'est en effet plus efficace), mais ça empêche os_draw_string et os_sync_screen de fonctionner correctement. Le problème des appels à guigc* est connu dans le monde nspire, et à priori la solution c'est de compiler avec un flag différent pour les nspire cx hw-w (--uses-lcd-blit true pour les CX2), en tout cas c'est ce que je fais pour les versions de khicas pour Nspire (qui existent en fait en 3 versions si on compte la version pour Nspire monochrome). Il faudrait donc que je compile deux versions d'Upsilon une pour chaque modèle, en remplaçant l'upsilon.tns actuel dans la version nspire cx HW-W de khicas. Concernant l'extinction, il faudrait que je reteste, mais ça m'étonnerait que ça fonctionne correctement sans code spécifique, donc ça va vider la batterie en mode idle. Alors malheureusement sur les cx 2 l'astuce qui consiste à baisser la luminosité de l'écran à 0 ne fonctionne pas très bien (il y a un scintillement de l'écran pendant plusieurs dizaines de seconde si ma mémoire est bonne), par contre sur les cx ça marche bien. Bref, pas de solution miracle. Si d'autres personnes souhaitent en discuter, je trouve github peu adapté, je refuse d'utiliser discord pour des raisons à la fois idéologiques (plateforme privée/business) et pratiques (je n'aime pas l'interaction synchrone), le mieux à mon avis c'est le forum de tiplanet (en mode asynchrone) Je signale au passage que ma distribution de khicas pour TI Nspire CX et CX2 permet maintenant d'utiliser Upsilon en mode examen. J'espère qu'on aura un jour une nouvelle version de ndless qui permette de toucher plus de nouveaux utilisateurs, pour le moment ça parait mort sur les N0120, sur les N0115 je ne sais pas mais de toutes façons il ne sera pas possible d'utiliser le calcul formel directement depuis Calculs sur la N0115 (pas assez de mémoire) comme c'est le cas sur la TI Nspire ou la Casio Graph 90 (où le menu de Calculs contient 2 sous-menus avec les commandes factor, simplify, l'intégration formelle, etc.)