To get started you will need to install Yacas under the GPL (free of charge). Yacas is a bit complicated to set up on Windows, but it does work if you already have Cygwin installed. (Of course, these instructions should also allow you to install Yacas on Linux directly i.e. without Cygwin, because Cygwin is a Linux environment running under Windows.) If you are like me and often get stuck when trying to follow instuctions because something seems to not work properly, I hope the following will help you set up the latest version Yacas on Windows (it can be set up on other OS's too). I basically created this file for my own convenience while setting up Yacas with different options, and so if I find errors I will correct them quickly. It has been tested several times already, and I hope it will be of convenience to other users and developers of Yacas. (By the way don't type the $ signs below, they are the default prompt given by Cygwin to tell you to enter a command.)
  • First install cygwin, a virtually complete linux environment that runs under Windows.
  • puttycyg is a delightful little program that installs itself immediately and performs the function of PuTTY for Cygwin, and it gives a resizeable larger console window than cygwin itself, and is much nicer to use (e.g. scrolling with the mouse wheel is enabled and many other settings are possible).
  • Go to the website for Yacas and download yacas-1.0.58.tar.gz (if you already have a file with the same name in the \download directory, Windows might do something strange like apparently start downloading it very slowly and eventually stop prematurely).
  • Windows renames it to yacas-1.0.58.tar.tar so it must be renamed back to yacas-1.0.58.tar.gz
  • move it your personal subdirectory of cygwin/home with the mouse or e.g. $ mv yacas-1.0.58.tar.gz /home/<username>
  • $ gunzip yacas-1.0.58.tar.gz gives yacas-1.0.58.tar
  • $ tar -xf yacas-1.0.58.tar gives a subdirectory yacas-1.0.58 with the unpacked files.
  • $ cd yacas-1.0.58
  • Now that the files are extracted you can read more instructions about how to set up Yacas e.g. see the file INSTALL. I used essentially the commands below to build Yacas.
  • $ ./makemake(this takes a few minutes)
  • $ ./configure --enable-pdf-doc --enable-debug
    (if your home directory name has spaces it will give an error message) This also sets up make to convert all the documentation to .pdf files and allows extra information to be made available when debugging new Yacas scripts.
  • ($ ./configure --help gives more options)
  • $ make (This took 43 minutes on my laptop on one occasion. Many errors and warnings are generated. I think these are for the benefit of the developers. It's probably best to ignore them unless you count yourself among their select company in which case you might like to fix some of them!)
  • $ make install In the file (that should now exist) under the heading "The yacas build system" more information about setting up Yacas can be found.
  • $ cd /home/<your_user_name_not_containing_spaces>/yacas-1.0.58/bin where the executable file is.
  • $ ./yacas.exe runs yacas.(It may be convenient for you to put e.g. the line
    alias yacas='/home/UncleJohn/yacas-1.0.58/bin/yacas.exe' into your .bashrc file. Then you can run yacas from your subdirectory of /home with just $ yacas)
  • I have become fairly familiar with the use of cvs to keep track of changes I make to code, and I highly recommend it. With cvs you can recover any previous version of a file, see the differences between any pair of versions of a file including the current version that need not be checked in, any comments associated with a change, who checked it in, and when. There is also an algorithm that attempts to merge more than one change to a single file, and much more. cvs is part of Linux and comes with cygwin, and there is much documentation on it e.g. cederqvist. To get started with using cvs for your development you will need to put
    export CVSROOT

    in your .bashrc file to tell cvs where the repository is stored. Then do $ cvs init to tell cvs to initialise some directories. To import the yacas script library to cvs, cd to it eg $ cd <path to >/yacas-1.0.58/share/yacas
    then $ cvs import -m "Imported sources" yacas yoyo start. Rename the original yacas directory as say yacas_original then cd .. to the parent directory share and create your working copy of the sources with
    $ cvs checkout yacas. Finally the yacas_original directory can be deleted. (Easier from Windows) Now if a mistake is made in file say code.ys in any subdirectory of yacas the changes can be seen at once with $ cvs diff code.ys When you want to check in a new version do $ cvs commit <filename>. You will then be given the option of writing a comment that is also stored in the history.
    Note: yacas must be restarted for any changes to the script library files to take effect.

    My Yacas Development project

    For some time I have been interested in general procedures for algebraic elimination from polynomial equations amongst other things. I have been modifying the files multivar.rep/code.ys and multivar.rep/sparsenomial.ys to accomplish this. I think these versions are almost correct.

    Comments on the documentation

    This file will evolve as my understanding improves. Some issues will go away and others will hopefully be addressed in future versions of the documentation or Yacas itself. Please do comment on anything I have written here. The quoted sections are the subtitles from each documentation book. The rest is my comments.

    "Lisp is a very simple language, one suited for doing computer algebra. Almost all CAS systems today owe a lot to the ideas that came from Lisp. This is a book on the Lisp language, and its connection to Yacas. Yacas is built on top of a Lisp dialect."2003-11-15 Brief description of Lisp,Yacas modifications,and its implementation,--hard to read in places, it seems to have many deep ideas, but it is unfortunately rather too terse as yet with some gaps, and it seems the first language of the author(s) is not English. I would be fascinated to read a detailed account of this work and look forward to reading the finished version.

    "This document should get you started programming in Yacas. There are some basic explanations and hands-on tutorials." 2003-11-15 I have a lot of conceptual trouble with section 1.7, after being used to writing programs in C++ and Fortran. The basic concept is the notion of evaluation. It happens implicitly and sometimes must be delayed. If the example could be explained in more detail it may help. As you say there is a fundamental language design problem here, so I look forward to this being corrected and reading the up-to-date version of coding.pdf. It seems to me that the trouble is from the fact that the variable i is just a placemarker, it should not have to be passed to ForEach i.e. the example code for its use could be something like
    ForEach({1,2,3})[Write(DummyArg);NewLine;]; for a single loop, where DummyArg should be part of the syntax of Yacas. But for more than one loop nested, the different DummyArgs need to be distinguished, so this is no good. But perhaps something like this would work
    ForEach({4,5})[LocalLoopVariable(DummyArg2);Write(DummyArg1);Write(DummyArg2);];NewLine;]; where LocalLoopVariable() would declare a variable not visible outside the code block it is in and which takes each value of the list argument of ForEach in turn, maybe without an implicit Eval(). This would be similar to the way I like to code loops in c/c++:
    for(int i=1;i<4;i++){for(int j=4;j<5;j++){ some code involving i and j }} Page 10: the effect of x2:=x1 does not seem to make sense: if x2 now points to the same memory address as x1 the result should be Out> {a,b,c} not Out> {A,b,c}

    "This is a book of essays on Yacas. It covers various topics, from using the Yacas system for specific calculations to general issues related to the Yacas system development and maintenance." 2003-11-15 Summary of yacas development philosphy,language. I assume that at any stage in application of rules to an expression, the lowest precedence rules are tried first. However after a rule is applied to an expression of precedence say #20,the resulting expression may then need to be transformed by a rule of lower precedence eg #10 next. True, otherwise the ! function would not work.

    "This book is a detailed description of the algorithms used in the Yacas system for exact symbolic and arbitrary-precision numerical computations. Very few of these algorithms are new, and most are well-known. The goal of this book is to become a compendium of all relevant issues of design and implementation of these algorithms." 2003-11-15

    "This document gives a short introduction to Yacas. Included is a brief tutorial on the syntax and some commands to get you started using Yacas. There are also some examples." 2003-11-15 This is easy reading. Prog() needs an example (page 5) "Factorize" should be replaced by "Product" in page 5.

    "This book contains some design documents that are in progress, for new features or features or implementation details that need to be changed and improved." 2003-11-15

    "This is the first part of the Yacas function reference. This reference contains all functions that can be useful from the command line for ordinary tasks." 2003-11-15

    "This is the second part of the Yacas function reference. This reference contains functions that might be useful for programming in Yacas." 2003-11-15
  • Home