From: Arthur N. <ac...@ca...> - 2023-06-28 16:56:27
|
I probably say "ha ha" as a hollow laugh. So this email is a bit of explanation and things may not be as convenient as would be ideal! Reduce is an algebra engine and at a sufficiently low level it is built on a kernel that acts as a Lisp system. The algebra code can be built on top of a range of different "lisps". Probably the most visible ones are "psl" and "csl", and redpsl and redcsl invoke the Reduce built atop each. Both are provided because around the edges those two Lisps have enough differences that some people may prefer one and some the other. Here is not the place to get entangled in fine details. But also there is the web-reduce which us build via javascript/wasm etc and is separate, there has been a Reduce that hosts on to of emacs using the Lisp embedded within emacs, it is possible to host Reduce on a Common Lisp and there are or have been a number of other options. For the projects as a whole this offers a degree of resilience in case support for one of the options fails! And eg web-reduce may be slightly slower but the way of accessing it may be especially valuable to some... etc etc etc. The command-line arguments belong at the level of the lisp kernel rather than as part of Reduce itself. For PSL that means that in the full Reduce tree fetched perhaps using subversion or as a tar file of all sources one can find .../psl/pc-oper.pdf or .../psl/unix-oper.pdf in the subdirectory of the full system sources that is to do with PSL and hence redpsl. For CSL there are two options. The first is that if one invokes the CSL variant of Reduce at a suitably low level with "--help" it reports options. And the source file .../csl/cslbase/csl.cpp contains all the text used there. HOWEVER when I checked that just now if you go "redcsl --help" the help text appears in a window that instantly vanishes. It was supposed to have a pause to give people a chance to read it but it looks as if somehow that had got lost. I may look into that. HOWEVER (again) for redcsl the "-w" option asks the system to run as a console-mode app so "redcsl -w --help" (from a terminal) is more helpful. For redpsl I tend to go redpsl < input.red | tee output.log or in my input file I use 'out "outfile.log";' For redcsl I can go redcsl -w input.red -L output.log (for match mode I will generally be working from a console) where "-L" sends a copy of what goes to the screen to that file, or redcsl -w input.red -- output.file in which case the output does not appear on the terminal - it JUST goes to the file. The key command-line argument you may wish to override for redpsl is the one that sets how much memory it uses (-td) but in reality you only need worry about that if your calculations are HUGE and the default setting ends up failing saying it had run out of memory. The web-reduce, emacs, common-lisp etc versions - well I leave you to investigate further! I hope this lets you move forward a bit. Arthur On Wed, 28 Jun 2023, Martin Vahi wrote: > > After extensive surfing at REDUCE home page, > "googling" and trying the > > C:\Program Files\Reduce\bin\redpsl.bat > > with strings like > > -? > --help > -help > -h > > I still struggle to figure out, where to get > a list of command line arguments that I can > give to REDUCE from a bat/Bash/whatever_shell > The documentation seems to be all about interactive > use of REDUCE, but I want to do > > start_reduce ./my_reducefile.txt > some_program_written_by_me < calculation_results_by_my_reducefile_txt_code.txt > > and all of that NON-interactively. A lot like > > ruby my_program.rb > python my_program.py > bash this_is_a_bash.script > reduce_or_some_wrapper_to_it ./my_reduce_code.txt > > Thank You. > > Yours sincerely, > Mar...@so... > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > |