Accueil › Forums › Programmation WIMS › Programmation dans le langage wims › maxima load lisp module
- Ce sujet contient 11 réponses, 2 participants et a été mis à jour pour la dernière fois par
bernadette, le il y a 5 années et 10 mois.
-
AuteurMessages
-
-
4 novembre 2017 à 12:08 #4051
jm.evers
Participant::Hi,
I wonder if someone knows a trick to load a maxima lisp module ?I know the syntax « load » is forbidden.
(and I would not like to mess with Interfaces/maxima.c)For example for some exercise to load « logic.lisp » or « logic.mac » for evaluating some student answers like
(A or B ) and C
Joke Evers
-
6 novembre 2017 à 10:39 #4052
jm.evers
Participant::Well, I do agree there is no easy solution.
I’ve proposed a
feature request for mac. package loading in a chroot environment.Joke
-
6 novembre 2017 à 17:51 #4053
bernadette
Maître des clés -
6 novembre 2017 à 21:43 #4054
jm.evers
Participant::Well, in general I was wondering why we can use all kinds of octave packages and not those from maxima. Sure the load command in maxima is powerful, but if used in a chroot environment, it should be no real problem.
More specific, I’m working on a module about logic…
where I would like to make use package « logic.mac »
checking the freestyle answers from pupils (using or,and,not in the answers)load("logic.mac"); test1:(A and B) or C; test2:(A or C) and (B or C); test3:A and (B or C); logic_equiv(test2, test1 ); logic_equiv(test3, test1 );
And there are probably more interesting /useful packages available in « /usr/local/share/maxima/ »
Joke
-
Cette réponse a été modifiée le il y a 5 années et 10 mois par
jm.evers.
-
Cette réponse a été modifiée le il y a 5 années et 10 mois par
-
6 novembre 2017 à 21:58 #4056
bernadette
Maître des clés::load is also not permitted in octave.
in octave.cchar *illegal[]={ "system","fopen","fclose","readdir","popen","mkdir","rmdir", "dir","ls","cd","chdir","more","save","load","diary", "fork","putenv","graw","eval", "scanf","exec","unlink","umask","lstat","stat","rename", "glob","tilde_expand","pclose","popen2","waitpid", }; /* name parts which are not allowed */ char *illpart[]={ "file", "debug", "plot" };
in maxima
char *illegal[]={ "system","describe","example", "save","fassave","stringout","batcon", "batcount","cursordisp", "direc","readonly","with_stdout","pscom", "demo","ttyintfun","bug" }; char *illpart[]={ "file", "debug", "plot", "load", "store", "batch" };
The question is also if you permit something in chroot and not when no chroot, the module using load should not work.
Is there something as workspace that exists in gap ?
-
6 novembre 2017 à 22:00 #4057
bernadette
Maître des clés -
6 novembre 2017 à 22:45 #4058
jm.evers
Participant::thanks , yacas logic seems a good idea ! (never knew…)
I will give it a try and maybe it’s enough for high_school_level freestyle answer checking.
Using some software not available on all platforms can not always be avoided. (like Scilab , M2 to name a few)
-
7 novembre 2017 à 09:16 #4059
bernadette
Maître des clés::In case of scilab, every module using scilab has an error msg. For maxima, it would depend on the module using maxima. More difficult (and it is not done for the moment) to have a selective message. And I think there is no public modules using scilab ! the same for M2 (but I don’t think there is a restriction for all M2 ?)
Bernadette
-
7 novembre 2017 à 12:34 #4060
jm.evers
Participant::scilab requires a chroot and a sysmask kernel (…)
So in real life you don’t need to install scilab on a wims system (and in a chroot).from scilab.c
setenv("chroot","must",1); setenv("sysmask","must",1); must_chroot=1
For M2 , I’ve never been able to cleanly compile from source (I hope it’s my fault).
So I can’t include it besides, M2 is not being used in published modules.Joke
-
7 novembre 2017 à 13:59 #4064
bernadette
Maître des clés -
7 novembre 2017 à 16:40 #4065
jm.evers
Participant::well, only if you enable debugging, you will see a warning:
ERROR from m2: m2: execution error or time out.
In a chroot enabled maxima it is very easy -on module level- to check the maxima package loading:
!if ljad isin $maxima_response some_action=this module requires a chrooted wims server... !exit !endif
-
Cette réponse a été modifiée le il y a 5 années et 10 mois par
jm.evers.
-
Cette réponse a été modifiée le il y a 5 années et 10 mois par
-
7 novembre 2017 à 20:43 #4067
bernadette
Maître des clés::Cela n’a plus rien à voir avec le sujet mais macaulay est utilisé dans les outils rapides (je suis d’accord qu’il est très peu utilisé !).
http://127.0.0.1/wims/wims.cgi?search_keywords= »surface »&search_category=A&search_lang=fr
Bernadette
-
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.