maxima load lisp module

Vous lisez 11 fils de discussion
  • Auteur
    Messages
    • #4051
      jm.evers
      Participant
      Up
      0
      Down
      ::

      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

    • #4052
      jm.evers
      Participant
      Up
      0
      Down
      ::

      Well, I do agree there is no easy solution.
      I’ve proposed a
      feature request for mac. package loading in a chroot environment.

      Joke

    • #4053
      bernadette
      Maître des clés
      Up
      0
      Down
      ::

      What sort of questions do you want to ask ?

      Bernadette

    • #4054
      jm.evers
      Participant
      Up
      0
      Down
      ::

      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 7 années et 1 mois par jm.evers.
    • #4056
      bernadette
      Maître des clés
      Up
      0
      Down
      ::

      load is also not permitted in octave.
      in octave.c

      
      char *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 ?

    • #4057
      bernadette
      Maître des clés
      Up
      0
      Down
      ::

      I was wondering if yacas will do the job for logic ?

      Bernadette

    • #4058
      jm.evers
      Participant
      Up
      0
      Down
      ::

      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)

    • #4059
      bernadette
      Maître des clés
      Up
      0
      Down
      ::

      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

    • #4060
      jm.evers
      Participant
      Up
      0
      Down
      ::

      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

      • Cette réponse a été modifiée le il y a 7 années et 1 mois par jm.evers.
      • Cette réponse a été modifiée le il y a 7 années et 1 mois par jm.evers.
      • Cette réponse a été modifiée le il y a 7 années et 1 mois par jm.evers.
    • #4064
      bernadette
      Maître des clés
      Up
      0
      Down
      ::

      I know, so what I meant was that it is a different case from maxima.
      Benradette

    • #4065
      jm.evers
      Participant
      Up
      0
      Down
      ::

      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 7 années et 1 mois par jm.evers.
    • #4067
      bernadette
      Maître des clés
      Up
      0
      Down
      ::

      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

      http://wimsauto.di.u-psud.fr/wims/wims.cgi?search_keywords= »surfaces, »&search_category=A&search_lang=fr

      Bernadette

Vous lisez 11 fils de discussion
  • Vous devez être connecté pour répondre à ce sujet.