Math Base - Basic Free Mathematic Software for Puppy Linux

Mathematical tools, physics simulators, CAD, CNC, etc.
Message
Author
Minimatter
Posts: 33
Joined: Sun 08 Feb 2009, 21:50
Location: Massachusetts

about R

#16 Post by Minimatter »

disciple,

Since you ask where the name "R" came from, here is a little history. Starting in the mid 1970's, statisticians at Bell Laboratories developed a new language interpreter which they called "S" to tie together statistical calculation routines, mostly in Fortran. It is one of the earlier large programs written in "C", which the people down the hall were developing along with the UNIX operating system at the time. I understand "C" itself is so called because its predecessor was "B". By the mid 1990's, a commercial version called S-PLUS held a large market share for statistical software (rivalling SAS). It is still sold.

R was developed starting about 1997 (by two professors in New Zealand) as a free alternative, reimplementing the S language with new code. As for the name, it is clearly a takeoff on "S". Remember the computer HAL in Kubrick's 2001? Also, the first names of the two professors are Robert and Ross. True, it is not a good name for searching on. R is at this time arguably the dominant statistical calculation system in use; its maintainers are the top people in the statistical computing field. The best source of information on it is its home page www.r-project.org.

Emil, thank you for providing newer versions of R and Octave for the community. Another you might go after is the econometrics and time series program gretl. To date, I've been using precompiled versions (for Red Hat EL4) which the home sites for R and gretl provide.

Minimatter

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#17 Post by disciple »

Since you ask where the name "R" came from
You're putting words in my mouth ;) I was familiar with most of that :)
The best source of information on it is its home page www.r-project.org
Yes, I didn't think it was that great for finding tutorials and examples, particularly involving different extensions, but it's a while since I looked, and maybe I missed something... like maybe the R reference index :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

Re: MathBase - Octave, R, Maxima

#18 Post by Puppyt »

emil wrote:Hello math-lovers,

Over the last weeks I have spent some time to get Basic Mathematic Packages working in Puppy Linux 431...

GNU R - standard package for statistics...

the pet files also include gnuplot, GNU Lisp (glc) and GNU Fortran (gfortran)...
EMIL YOU BLOODY RIPPER !!!

That's my immediate response in my mother tongue that, when translated to everyday English means that you are to be celebrated and held in awe for your efforts and abilities beyond those of us mere mortals. I've been waiting ages for an update on the R package for Puppy, and you've picked up from where cb88 (and his "Mathpup") and debernadis (and his redoubtable "Rudypuppy") left off. THANK YOU!

Now I've confessed my linux-illiteracy I also confess my statistical ineptitude - do you have any tips on running Rcmdr (R Commander - a GUI for statistical and R newbies) from within Puppy? I was using R and Rcmdr under wine or trying the deb version under gposil's dpup477 (retro version), but it will be a few weeks before I can try your R pet and download Rcmdr under the CRAN repositories for myself - I wonder whether the installation of such R packages from within standard (non-dpup) Puppy might encounter problems.
Bugger it - downloading now into dpup, I'll give it a go myself...

Meantimes Dingo, many thanks indeed for your Aladdin's Cave of resources at Dokupuppy. Has been incredibly useful to me in the past - only place to find sketchman's original CUpup, for example - your mirror is most appreciated.
In R's case, I hope that it makes it into the official Puppy repositories.

Cheers!

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

Response and some notes on the compile process

#19 Post by emil »

Hello,

@Minimatter
I must hold myself back from doing gretl (actually I had already downloaded the source). There seem to be some dependencies and I have to refocus my time schedule.
@disciple
In my opinion it is highly remarkable, that for 2 letters out of 26 (C, R) the nr 1. find in google are programming languages (7.7 %) :D. - It has become a tower of Babel imho.
@ carolus
Thank you for this great http://rseek.org/ link !
@ Puppyt
I am happy about the enthusiastic response ;) BUT

actually my abbilities are not that impressive. Puppy Linux is my first real POSIX experience (a very pleasent one, that for sure). What really IS impressive is that I could build those programs and that I had fun doing it!
you've picked up from where cb88 (and his "Mathpup") ... left off.
I found the Mathpup - thread when I searched for a usable octave. pet. I must admit the negative aftertone of this threat was my sole inspiration to compile R and Maxima. This thread still comes up top when you google for Puppy Linux Mathematic. Just to defend Puppy Linux from a math-deficit repute.

In contrary: In the course of posting this I googled out that the SAGE Project (big comprehensive open source math project) used Puppy Linux as technology platform (for live CD and SAGE on Windows/Mac in a Virtual Box). They changed to a minimal Ubuntu though in the meantime.

About documentation and learning
Those packages are mighty tools, not solutions. The software-technical-aspect is in most cases the easier side of problems (sorry, no 'kings way' to the math). Best approach is learning by doing, i.e. use the software for actual problem-solving. Above the average level of tinkering and googling and a steep learning curve is to be expected. That said, if anyone finds a particular helpful tutorial for beginners post a link here. Everything advanced should go to the specialist forums or mailing lists.

About compiling:
I really encourage everyone to compile from source. it is not that big a problem, most of the time. I found that in many cases it is even faster than googling lots for existing packages. To often you will end up with old packages which are not working. Finding the right mix between compiling and googling is the key. After installing the devx.svs it is basically 3 steps:
  • download and unzip source
    read readme/install files
    follow the instructions
In most cases it will be as simple as ./configure, make, new2dir make install to get a pet. With the exception of Octave all those packages were easy to build. Most important are the GNU compilers of the languages, great work those guys are doing! Math packages use similar stuff (fortran, Blas, gnuplot, Lisp), so step by step adding additional packages becomes easier because you already have those installed.

Octave: The configure process gave lots of warnings. The only package I added was glpk. All other warnings I ignored (in the end, because after much tinkering I couldnt get rid of them).
Warning: I tried to use optimized BLAS, but it was a big waste of time, because Atlas-package is machine dependent and a real time eater (it compiles the library over and over with different compiler settings, benchmarks them and then chooses the best settings).
Possible improvements: I couldnt get gotoblas, which is machine independent. I also failed to link FFTW (fourier transform) and Metis (sparse matrix) packages, but those are needed for cutting edge speed. For the graphics I sticked to gnuplot, there are other alternatives but what I learned from the octave forums gnuplot is a good choice.

Maxima: get Lisp (glc) first, then ./configure, make, install - and then add disciples wxmaxima pets.
R: was just ./configure, make, install on my full install (I was stunned - but on the other hand: this is really a well tended plant in the garden of free code!). On my frugal test install I had to add the libiconv.lib, but that was all.

So it should be no problem to recompile if new versions appear.

Future projects
As mentioned I have to cut back on this math stuff but If I find time I would be interested to see GEOGEBRA work (Excellent tool for classroom maths, but in Java). It should work out of the box with installing Java in your puppy but more interesting would be to compile the package with GJC ...
I had already a go on YACAS, this is really small (puppy size) and - just an idea - replace some of the numerous calculators with this tiny CAS in future puppy releases?

It would be a privilege to but those packages in the official repositories, but I think somebody more experienced should have a closer look (to trim the fat and maybe put those into a .sfs file alternativly)

all the best
emil
Last edited by emil on Wed 20 Jan 2010, 10:11, edited 1 time in total.

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

YACAS

#20 Post by emil »

Hello,

I tried Yacas, which sounds very interesting beeing such small size.
But this thread is rather dated and the pet doesn't work in my puppy 431.

So I recompiled and its working, even below 1MB.

Download it at:
download link

I have an issue that del-key is not working as expected. Do you also get this?

regards
emil

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

gretl

#21 Post by emil »

Hello!
Image

As you have suspected I couldn't resist to compile gretl ( :wink: @ Minimatter).
It comes as a tar - package (21 MB) which consists of

fftw-3.3.3.pet (Fast Fourier transform)
gfortran-4.2.2pet (fortran compiler - same as in octave package)
gnuplot-4.2.5-i486.pet (gnuplot - same as in octave package)
gsl-1.13-i486.pet - (GNU scientific library - some functions are needed)
lapack-3.2.1-i686.pet -(Linear Algebra Package)
libxml2-2.7.2-i486.pet - (XML Library)

please try it, hope it works for you
I will also edit the original post.

emil

Comments on the build:
Lapack is machine specific, just run make. Two static Libraries are created in the directory Lapack_LINUX.a and BLAS_Linux.a. Those have to go to /usr/lib and must be renamed to liblapack.a and libblas.a to be found by gretl.
(I had put them in a pet with the correct directories).

gretl:
Although I had lapack and blas installed and the configure ran without error gretl complained at missing dependencies while linking (something about the blas c interface). I googled and then I added the GNU Scientific Library.
Then it worked.

other packages were ./configure make make install type.

Minimatter
Posts: 33
Joined: Sun 08 Feb 2009, 21:50
Location: Massachusetts

#22 Post by Minimatter »

emil,

Thank you again!

I hope these will all be available in the usual pet repositories soon.

Everyone should be aware that with:

R and Octave as high-powered numerical interpreters,
gnuplot for graphics (used by Octave and gretl; R has its own graphics),
gretl as a good regression/time series system in its own right, and also useful as a front-end preparing data for R (even from the gnumeric spreadsheet),
maxima and/or yacas symbolic manipulation programs

we now have a good selection of the most important available mathematical software.

Minimatter

ps. Yes indeed emil, yacas misuses the del-key showing me 3 followed by a raised ~ ; similar behavior for page-up, page-down, insert, and keys on the numeric keypad. Seems to be in their own mini-readline.

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

Sage

#23 Post by emil »

Hello,
Image

Sage is the most comprehensive open source math suite, really huge.
It is based on numerous existing packages (e.g. Maxima and R are contained inside) and it uses python. The webbrouser can be used to create a notebook (Mathematica style).
It seems there are tutorials and good dokumentation available at http://www.sagemath.org

I have made an sfs file, it is big (390 MB) but if you want to do serious maths this should be the ultimate open source package.

download
405022d49a388969fb65276261ff4e63 sage-4.3.1.sfs

Frugal install:
copy it to your /mnt/home/ directory and add it to the list in your Bootmanager (Menu/System/Bootmanager configure bootup) then reboot.

Full install (from puppy homepage):
1. Click on the sage-4.3.1.sfs in a ROX-Filer window to mount it.
2. Open a terminal in the mounted directory.
3. # cp -a --remove-destination ./* /mnt/hda2/
4. # sync
5. Close the terminal.
6. Click on the sage-4.3.1.sfs file to unmount it
Note, the '--remove-destination' option is essential. If you only use '-f' to force overwrite, it will follow (dereference) a symlink, that can cause unexpected overwrites.


open terminal and start it with sage

As the other packages this is not tested much, basics seemed OK. I had troubles with command plot3d, obviously this uses the webbrouser and a package which needs Java. I had java installed and enabled in Seamonkey - I dont know whats wrong.

Sage is huge and heavy, not really puppy Linux like, but there is definitly power in it. I am a bit ashamed about the size but I didn't dare to remove anything.

comment on the build:
In the sage mission statement the goal of an easy build is expressed. Although by far the biggest of those math packages it was the easiest to build, perfect scripts and foolproof readme! It needed 2 hours to compile though on my box.
This was compiled on a Intel Pentium III, since sage uses the opimizing Atlas packages for building BLAS it may be worth to recompile from source on other machines - it is easy.
Edit: This package is compiled without Latex, if you have Latex installed and want to recompile Sage: it is looking for "Latex" ("latex" wont work) so put a Symlink if necessary.

This will be the last one about math for some time,
Goodbye
emil
Last edited by emil on Fri 22 Jan 2010, 14:35, edited 2 times in total.

aarf

#24 Post by aarf »

thanks for your efforts here emil but do you really need to use that webhost? i would prefer not to make more email address to give out to collect spam. host for large files

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

webhost

#25 Post by emil »

Sorry for the inconvenience with the download. I was not aware of that possibility. Thank you for the information aarf.
For sage there is a mirror at http://boxen.math.washington.edu/home/wstein/binaries/
and also at at official Sage mirrors (choose your mirror, Linux binaries, 32 bit) now!
405022d49a388969fb65276261ff4e63 sage-4.3.1.sfs

I will do better in future
Last edited by emil on Sat 23 Jan 2010, 09:54, edited 1 time in total.

aarf

Re: webhost

#26 Post by aarf »

emil wrote: For sage there is a mirror at http://boxen.math.washington.edu/home/wstein/binaries/
thank you

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

Rcmdr

#27 Post by emil »

I just want to add a link, how it is possible to get Rcmdr and PMG, GUI's for R in Puppy Linux.
R - thread
Last edited by emil on Tue 26 Jan 2010, 09:33, edited 1 time in total.

brad_chuck
Posts: 286
Joined: Tue 16 Aug 2005, 03:47
Location: Appalachian Mountains

#28 Post by brad_chuck »

Don't count out Python for math. With SciPy / NumPy it is an extremely robust mathematical application.

http://www.scipy.org/

You also have Matplotlib for graphics / charts. Even embed in GUI's...

http://matplotlib.sourceforge.net/

and pyGTK for GUI

http://www.pygtk.org/

And if you need symbolics theres a module for that too but I have found Yacas to be a nice program. Quick, Dirty and Light...

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

Math Python Modules

#29 Post by emil »

Hello,

brad_chuck thanks for your comment and hint. I have packaged

Download: Math_Python.tar
Filelist:

gfortran-4.2.2.pet - gfortran compiler and library
gnuplot-4.2.5-i486.pet - gnuplot for graphics
gnuplot-py-1.8-i686.pet - Python / gnuplot interface
ipython-0.1.0-i686.pet - ipython (improved python shell)
numpy-1.4.0-i686.pet - NumPy python numeric module
python-2.6.4-i386.pet - python interpreter
scipy-0.7.1-i686.pet - SciPy python scientific module
sympy-0.6.6-i686.pet - SymPy python Symbolic math module

installing those pets should give you a working Python Math environment.

Together with Python 2.6.4 I included also the complete gfortran.pet, probably you would only need the dynamic library (gfortran.so or similar). For plotting graphs I have included the gnuplot-py Library and gnuplot.- this works reasonable well.

How to start:
There is an entry in the menu/utilities for ipython. Or type ipython or python2.6 in terminal window. For convenience it is possible to
symlink python2.6 with python in the usr/bin directory.

How to work:
start ipython (Menu/utilities), then import the libraries e.g. like this (there are different possibilites to import them - it influences your python namespace):

Code: Select all

In [1]: import numpy
In [2]: import scipy
In [3]: import sympy
In [4]: import Gnuplot
For scripting Geany offers a very good and lightweight "IDE"
recomended settings:
Menu Edit -> preferences ->Tools->
Terminal: xterm -e bash -c
Menu Build ->Set Includes and arguments
Compile: ipython -c "import py_compile; py_compile.compile('%f')"
Execute: ipython "%f"

First help and documentation:
The homepages of the projects offer pretty good starting points (just google). Exception is Gnuplot-py. You find very little usefull information - best is to study the demo.py in the
/usr/lib/python2.6/site-packages/Gnuplot directory.

Maybe it is noteworthy that SAGE contains and uses all of those python packages.

This was made on Puppy 431, probably it works on all 4xx versions. I had no time on extensive tests though, please report any problems.

cheers
emil

PS:

About Gtk & matplotlib
I couldnt include the gtk Libraries and matplotlib as you suggested. I had some conflicts with different Libraries header files (compiled ok, but gave errors at runtime). I also tried these existing pets but somhow it didn't work for me. So if anybody get gtk and matplotlib going please share it.

About installing
NumPy, SciPy and Sympy are easy to install from source. They use
a python install script. After download it can be done with: installwatch -o logfile.txt python setup.py install
do install the package. If there are more than 1 python environemts present, the packages will be installed in every python version (E.g. Sage uses Python 2.5). For each package a subdirectory in the
/usr/lib/python2.x/site-packages/ is created. For the creation of the pets I basically used those subdirectories.

aarf

#30 Post by aarf »

after 15 hours over my wget gprs connection in puppy421 i have it down and md5sum is correct 8)

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

SageLivePup

#31 Post by emil »

I made a puplet which includes sage. Link to Post in the Puppy Derivative section.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#32 Post by jamesbond »

Emil,

Thank you. This is excellent effort.

cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

Scilab

#33 Post by emil »

Scilab is a mostly nummerical package which can be used in science and engineering as an alternative to Matlab (and the free Octave). It has a similar, but not compatibel syntax and it is developed in france.

Forum member Q5sys has posted on the SageLive thread and offers a sfs of the package:
got something you might want to test to see if it works with your puplet.

I made it originally for LightHousePup, but it seems to fit right in with what you are doing.
The SciLab suite
I already packaged it as an SFS.
http://lhpup.org/team/Q5sys/scilab-5.2.2.sfs
http://lhpup.org/team/Q5sys/scilab-5.2.2.sfs-md5.txt

Might duplicate the functionatlity you already have, but it also might offer a bit more. I made it a SFS because its 118MB, and figured I could load and unload that whenever I needed.
If it works for you, feel free to bundle it with your setup.
I cannot test at the moment due to limited time and bandwith, but maybe somebody can and send short feedback.

kind regards
emil

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

Re: Math Python Modules

#34 Post by neurino »

emil wrote:About installing
NumPy, SciPy and Sympy are easy to install from source. They use
a python install script
emil I had no problems compiling numpy (also can be done simply by pypi easy_install) but scipy needs lapack and(or) blas.

I see you already compiled lapack but filehosting.org has a very bad policy asking email addresses I don't want to accept, any alternatives?
And since you already did it: isn't lapack machine dependant? Will it work on any computer running puppy?

I made myself a (not shrinked tho) python sfs with python2.6, wxpython2.8, reportlab, numpy, PIL, lxml, matplotlib I use for work but since I encounter errors sometime I don't feel about sharing an imperfect solution.

Could you please make available your packages for example on drop.io like jemimah used to distribute puppeee?

Thank you very much

edit: don't bother, I found this mirror on my forum search: http://dokupuppylinux.co.cc/programs:ma ... :math_apps

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

Some packages

#35 Post by emil »

Hi neurino,
Various people disliked the filhosting.org server. Also many links in this thread are not working any more. Thanks to dingo we have dokupuppy
http://puppylover.netsons.org/dokupuppy ... :math_apps
Myself I have moved some packages for download to
http://boxen.math.washington.edu/home/emil

I will gradually try to complete/extend them.
emil

Post Reply