forked from daly/axiom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
faq
1896 lines (1380 loc) · 65.8 KB
/
faq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FAQ 0: How do I use Axiom?
FAQ 1: X11 libraries not found
FAQ 2: axiom.sty is not found
FAQ 3: make hangs
FAQ 4: noweb needs to be rebuilt
FAQ 5: lisp needs to be rebuilt
FAQ 6: The interpreter is badly broken
FAQ 7: The wrong version of GCL was used
FAQ 8: Parallel make (i.e. make -j) fails
FAQ 9: GCL does not build on my system: libbfd.a and bfd.a are missing
FAQ 10: The axiom.input file is ignored
FAQ 11: How do I add a new pamphlet file
FAQ 12: The axiom command fails.
FAQ 13: How can I create and access Lisp functions from Axiom?
FAQ 14: It still doesn't work
FAQ 15: How can I see what the interpreter is trying to do?
FAQ 16: How can I record console output?
FAQ 17: Graphics don't work or sman fails to start ?
FAQ 18: How can the user use the batch mode?
FAQ 19: How can I get equations written on one line?
FAQ 20: Axiom hangs when graphics should be displayed.
FAQ 21: How should I get my AXIOM shell variable and why?
FAQ 22: How do I check out the latest sources?
FAQ 23: How do I patch a file?
FAQ 24: What is the purpose of the domain HACKPI?
FAQ 25: Can I create or edit hypertex pages?
FAQ 26: How can I compile spad files on windows?
FAQ 27: Why can't I input text into the hypertex browser boxes?
FAQ 28: Graphics does not work inside TeXmacs?
FAQ 29: Where can I get help online?
FAQ 30: How can I file a bug report?
FAQ 31: How can I find out if this is a known bug
FAQ 32: How can I input an equation as a string?
FAQ 33: How can I run hypertex standalone?
FAQ 34: How can I find out about a domain?
FAQ 35: Why do .axiom.input defined functions fail in axiom?
FAQ 36: Axiom won't build on FC3
FAQ 37: Axiom won't build on FC4 or FC5
FAQ 38: How can I debug algebra code?
FAQ 39: How can I access lisp code from the Axiom command line?
FAQ 40: Text entry fails in the hypertex browser window
FAQ 41: How can I work in lisp from Axiom?
FAQ 42: How can I output equations as lisp s-expressions?
FAQ 43: Is Axiom's License compatible with the GPL?
FAQ 44: I don't have the math fonts
FAQ 45: Axiom copyright information
FAQ 46: Axiom trademark information
FAQ 47: Axiom won't build on Fedora 9 (SELinux)
FAQ 48: Getting Axiom sources from git
FAQ 49: How do I get the lastest GCL?
FAQ 50: Cannot find libXpm.a
FAQ 51: How can I do unicode in xterm?
FAQ 52: Who was User?
FAQ 53: Axiom won't build on Fedora
===================================================================
FAQ 0: How do I use Axiom?
===================================================================
Look at the online book. It is automatically built during the 'make'.
However, you can also do
make book
Either way, it will show up in
(yourpath)/axiom/mnt/linux/doc/book.dvi
===================================================================
FAQ 1: X11 libraries not found
===================================================================
You need to have Xlib.h to build the graphics. If you are building
on a RedHat 8 system you need to install the following RPM:
rpm -i XFree86-devel-4.2.0-72.i386.rpm
On Debian GNU/Linux, the package 'xlibs-dev' is needed.
On Fedora 9:
yum install xorg-x11-proto-devel
rpm -i --nodeps libXt-devel-1.0.4-5.fc9.i386.rpm (for Intrinsics.h)
===================================================================
FAQ 2: axiom.sty is not found
===================================================================
The build of noweb creates 3 files in the mnt/linux/bin directory:
notangle, noweave, and tex/axiom.sty. The build of the src/scripts
directory copies the document command to the mnt/linux/bin
directory. These four files are necessary to rebuild a Makefile.
These can be recreated in a clean system by typing:
make start
===================================================================
FAQ 3: make hangs
===================================================================
A pamphlet file was modified and has a syntax error. The document
command has its output redirected to a file called
obj/linux/tmp/trace. Latex has found the syntax error and put up a
prompt which stops the make. Look in this file for the error. You can
also see the error by rerunning make thus:
make NOISE=
which will override the redirection and allow the latex output to go
to the console.
If the make hangs during the test cases check to see if it occurs
while trying to run graphics. If Axiom does not have permission
from the X server to open a window then it will hang. Try
'xhost +'
===================================================================
FAQ 4: noweb needs to be rebuilt
===================================================================
The first time noweb is built a dummy file called noweb
is written into the top level directory. If this file is
removed noweb will be rebuilt. The following sequence should work:
rm noweb
make noweb
===================================================================
FAQ 5: lisp needs to be rebuilt
===================================================================
The first time lisp is built a dummy file called gcldir
is written into the top level directory. If this file is
removed lisp will be rebuilt. The following sequence should work:
rm lsp/gcldir
make
===================================================================
FAQ 6: The interpreter is badly broken
===================================================================
If you look in src/interp/Makefile.pamphlet you'll see a stanza that
is marked debugsys. You can add ${DEBUGSYS} to the "all" stanza, make
the system and run debugsys. This is a copy of the interpsys image
except that all of the files are interpreted. Note that you will have
to edit src/interp/debugsys.lisp.pamphlet. Read the comments
there. At this point you are able to do deep system internal debugging
(which pretty much assumes you know how to navigate the underground
caves in the dark without fear of dragons. If you can play the game at
this level send [email protected] a note and we'll inscribe
your name on a log and throw it on the fire.)
The basic steps, which assumes that your axiom sources live under tmp/axiom
0) cd /tmp/axiom
1) modify the line in src/interp/Makefile.pamphlet that reads:
all: ${SAVESYS} ${DOCFILES} # ${DEBUGSYS}
to read:
all: ${SAVESYS} ${DOCFILES} ${DEBUGSYS}
2) set up the standard AXIOM shell variable
export AXIOM=/tmp/axiom/src/interp
3) set up the standard PATH variable
export PATH=$AXIOM/bin:$PATH
4) build the system, including debugsys.lisp
make
5) tell debugsys where to find the databases
export DAASE=$AXIOM
6) tell debugsys which platform you are on
export SYS=linux
7) start a clean lisp image
obj/linux/bin/lisp
8) load the debugsys code which loads the axiom system interpreted
(load "/tmp/axiom/int/interp/debugsys.lisp")
9) switch to the package the interpreter uses
(in-package "BOOT")
10) start the system
(restart)
and you now have a running Axiom that uses interpreted rather than
compiled code. This makes finding errors easier.
===================================================================
FAQ 7: The wrong version of GCL was used
===================================================================
If you are building a version of Axiom on GCL there are several tested
versions. The first is GCL-2.4.1 which is an version 1 Common Lisp.
GCL-2.5 is a version 2 Common Lisp. There is a shell variable called
GCLVERSION that must be changed to choose the version. Be sure it is
set to either gcl-2.4.1, gcl-2.5 gcl-2.5.2, or gcl-2.6.1 as these are
the only known-good versions of GCL for Axiom.
===================================================================
FAQ 8: Parallel make (i.e. make -j) fails
===================================================================
This is a complex issue. In theory, in order to build the algebra
files we have a whole graph of constraints between the algebra files.
In order to bootstrap the algebra the whole graph of algebra files
need to be built in a particular order to ensure that the required
files exist. This would argue for including the constraint as part of
the makefile stanzas.
However, once the algebra is bootstrapped these constraints are
checked at compile and runtime so it is possible to recompile an
algebra file without compiling the files it depends upon.
If we decided to include the constraints on each stanza then we
gain the benefit that "make -j" works. However, if we later change
a single algebra file it may trigger a rebuild of the entire algebra
library unnecessarily. Since bootstrap happens only once but algebra
compiles happen often it was decided to elide the constraints. This
will cause "make -j" to fail on initial build but vastly improve
later builds.
===================================================================
FAQ 9: GCL does not build on my system: libbfd.a and bfd.a are missing
===================================================================
We are using the option \texttt{--enable-statsysbfd} when building GCL (see
lsp/Makefile) so libbfd.a and bfd.h files are necessary on your system.
On Debian GNU/Linux, the needed package is 'binutils-dev'.
===================================================================
FAQ 10: The axiom.input file is ignored
===================================================================
The standard startup file, "axiom.input", has been renamed to
".axiom.input" to follow convention. This is an incompatible change.
On unix-style systems a filename that begins with a period is not
normally printed in a directory listing. This keeps the user's home
directory from being cluttered up by initialization files.
===================================================================
FAQ 11: How do I add a new pamphlet file
===================================================================
Pamphlet files are the only file format used by Axiom at the source
level. There are several steps to adding a new file to ensure that
Axiom will build it properly.
First, you have to decide where it should reside. Almost all files
reside under the src subdirectory. Never put anything into lsp, int,
obj, or mnt as these will be destroyed by "make clean".
Assume you add a file that extends the interpreter and will
go into the src/interp] subdirectory. You must modify the
src/interp/Makefile.pamphlet to correctly build the file.
You must also modify src/doc/axiom.bib.pamphlet to include
the file. Axiom uses bibtex to cross-reference the various
pamphlet files. The normal method of citing a file involves
just using the name, for example \cite{asq.c} will build
a citation to the ./src/etc/asq.c.pamphlet file.
You must include the following two lines in your pamphlet file:
\bibliographystyle{plain}
\bibliography{axiom}
===================================================================
FAQ 12: The axiom command fails.
===================================================================
This is likely one of two problems. Axiom uses clef as its command
line editor. This has functionality similar to GNU Readline but
was written independently. The axiom command uses:
clef -e $AXIOM/bin/AXIOMsys
Clef attempts to create new terminals and this might fail.
The first thing to check is the permission bits on /dev/pty.
Next it is possible to run the axiom image, called AXIOMsys, directly.
Just type AXIOMsys. It won't have command recall or command line
editing but everything else is there.
===================================================================
FAQ 13: How can I create and access Lisp functions from Axiom?
===================================================================
SExpression is the domain that handles raw lisp objects.
It is possible to create SExpression elements directly contruction:
m:=[1::SEX, 2::SEX]
[1,2]
Type: List SExpression
n:=m::SEX
(1 2)
Type: SExpression
car(n)
1
Type: SExpression
You can access lisp functions directly with:
GENSYM()$Lisp
Lisp is the domain, known to the interpreter and compiler, that contains
lisp functions and symbols.
Notice that Axiom is case-sensitive and that generally lisp symbols
are upper case.
You can also create and call lisp functions. For instance:
)lisp (defun foo () (print "it works"))
Value = FOO
FOO()$Lisp
"it works"
it works
Type: SExpression
While accessing and writing functions in Lisp is possible it is
generally not recommended as Axiom contains a programming language
that should be able to achieve almost everything you need.
===================================================================
FAQ 14: It still doesn't work
===================================================================
Send email to:
===================================================================
FAQ 15: How can I see what the interpreter is trying to do?
===================================================================
)set message bottomup on
will tell you the signatures that the interpreter is trying to use.
Another method is to do
)lisp (setq |$monitorNewWorld| t)
and you can view database calls with
)lisp (setq *miss* t)
===================================================================
FAQ 16: How can I record console output?
===================================================================
)spool filename
starts sending output to the file called filename
)spool )off
stops sending output to the file
===================================================================
FAQ 17: Graphics don't work or sman fails to start ?
===================================================================
First try running sman as :
sman -debug -noclef -nonag -noht
Try this as root also.
If graphics still don't work or sman fails to start then
look at the error messages . Does it show something like :
ptyopen: Failed to grant access to slave device: No such file or directory
ptyopen: Failed to get name of slave device: No such file or directory
ptyopen: Failed to open slave: Bad address
If so you may need to do a few things
1) Make sure that devpts support is enabled in you kernel
( CONFIG_DEVPTS_FS=y )
2) Make sure the directory /dev/pts exists
3) Mount devpts as in :
"mount -t devpts devpts /dev/pts"
You may also want to add the following line to your /etc/fstab file
devpts /dev/pts devpts gid=5,mode=602 0 0
This will ensure that next time you reboot devpts is automatically
mounted.
On debian systems, it is common to run the stable distribution, and
then reserve a specific area of disk for the unstable distribution,
which one can use as if it were the entire installed OS via 'dchroot
unstable'. To make this work, certain directories have to be
accessible to both systems, and bind mounting is the usual solution.
Thus in this situation you need to do
mount -o bind /dev/pts /unstable_chroot/dev/pts
===================================================================
FAQ 18: How can the user use the batch mode?
===================================================================
1) create an input file:
echo '2+2' >tst.input
echo '3+3' >>tst.input
2) make sure the AXIOM variable is set
export AXIOM=/path/axiom/mnt/linux
export PATH=$AXIOM/bin:$PATH
3) pipe a )read command to AXIOMsys and capture the output
echo ')read tst.input' | AXIOMsys >tst.output
===================================================================
FAQ 19: How can I get equations written on one line?
===================================================================
> Dear Axiom supporters,
> 2. I would also like to have the output of kind
>
> " - (s-1) * (s+1) * (p^4 +(2*e^3 + (24*s^2 - 4)*e)*p^3 * ...) * ...
> "
>
> For example, my DoCon program can read this format ...
>
> 2.1 It prints these polynomials like for (Z[e])[p]:
> " (e^2 + 2e)*p "
> How to print it like for Z[p,e]:
> " 2*p*e + e^2 "
You may wish to use the InputForm domain, where you can find some
bizarre functions. In your case, "unparse" may help you, as follows.
(1) -> p:=(a+b+y)^2*y+1-(x+y+z)^4
(1)
4 3 2 2 2
- z + (- 4y - 4x)z + (- 6y - 12x y - 6x )z
+
3 2 2 3 4 3 2 2
(- 4y - 12x y - 12x y - 4x )z - y + (- 4x + 1)y + (- 6x + 2b + 2a)y
+
3 2 2 4
(- 4x + b + 2a b + a )y - x + 1
Type: Polynomial Integer
(2) -> pi:=p::InputForm
(2)
(+
(+
(+ (+ (* - 1 (** z 4)) (* (+ (* - 4 y) (* - 4 x)) (** z 3)))
(* (+ (+ (* - 6 (** y 2)) (* (* - 12 x) y)) (* - 6 (** x 2))) (** z 2)))
(*
(+
(+ (+ (* - 4 (** y 3)) (* (* - 12 x) (** y 2)))
(* (* - 12 (** x 2)) y))
(* - 4 (** x 3)))
z)
)
(+
(+
(+ (+ (* - 1 (** y 4)) (* (+ (* - 4 x) 1) (** y 3)))
(* (+ (* - 6 (** x 2)) (+ (* 2 b) (* 2 a))) (** y 2)))
(* (+ (* - 4 (** x 3)) (+ (+ (** b 2) (* (* 2 a) b)) (** a 2))) y))
(+ (* - 1 (** x 4)) 1))
)
Type: InputForm
(3) -> unparse(pi)
(3)
"(-z**4)+((-4*y)+(-4*x))*z**3+((-6*y*y)+(-12*x*y)+(-6*x*x))*z*z+((-4*y**3)+(-
12*x*y*y)+(-12*x*x*y)+(-4*x**3))*z+(-y**4)+((-4*x)+1)*y**3+((-6*x*x)+2*b+2*a)
*y*y+((-4*x**3)+b*b+2*a*b+a*a)*y+(-x**4)+1"
Type: String
Aternatively you can get the LaTex output string:
(4) -> )lisp (|parseAndInterpret| "integrate(sin(x),x)::TexFormat::OutputForm")
(4) ["$$","-{\cos ","\left(","{x} ","\right)}","$$"]
Type: OutputForm
Value = ((|OutputForm|) WRAPPED BRACKET (AGGLST "\"$$\"" "\"-{\\cos \""
"\"\\left(\"" "\"{x} \"" "\"\\right)}\"" "\"$$\""))
or the text form:
(5) -> )lisp (|parseAndInterpret| "integrate(sin(x),x)::OutputForm")
(5) - cos(x)
Type: OutputForm
Value = ((|OutputForm|) WRAPPED "-" (|cos| |x|))
or the actual string output:
Axiom's algebra gets output to a stream called |$algebraOutputStream|
Thus you can get the output you want by:
)set message autoload off
)lisp (progn
; we need a new output stream that is backed by a string
(setq tmpout (make-string-output-stream))
; we hold on to the regular algebra output stream
(setq save |$algebraOutputStream|)
; we capture the algebra output into the string stream
(setq |$algebraOutputStream| tmpout)
; we generate output from string input
(|parseAndInterpret| "(x+1)^9")
; we save the output into the result variable
(setq result (get-output-stream-string |$algebraOutputStream|))
; we restore the regular algebra output stream
(setq |$algebraOutputStream| save)
; and we return the string as our value
result)
)lisp result
result contains the output from axiom that you want.
Alternatively you can see the internal representation using |pf2Sex|
(parsed function to s-expression) by doing:
if you start axiom and type
)trace (|pf2Sex|)
and then type some expression
1
you'll see the input and output of this function. This function
(parsed function to s-expression) is internal to the axiom interpreter.
it takes the parsed input line and converts it to a lisp s-expression.
so the above '1' input yields
1> (|pf2Sex| ((|Integer| (|posn (0 "1" 1 1 "strings") . 0)) . "1"))
1< (|pf2Sex| 1)
the "1>" line tells you the function input.
the "1<" line tells you the function output.
notice that even a simple input line generates type information.
this function is not part of the exposed user interface because
there is nothing at the user level that needs this information.
===================================================================
FAQ 20: Axiom hangs when graphics should be displayed.
===================================================================
Be sure that your X server will allow you to display windows. try:
'xhost +'
===================================================================
FAQ 21: How should I get my AXIOM shell variable and why?
===================================================================
The AXIOM variable is used at 2 different times, during make and
during execution.
First, lets look at the make case:
The build process needs to know 2 things. It needs to know where
the axiom sources are. It needs to know what kind of system to build.
Both of these pieces of information are in the AXIOM shell variable.
Suppose you download axiom into /tmp/axiom and
you want to build a linux system.
The AXIOM shell variable would be set to:
export AXIOM=/tmp/axiom/mnt/linux
^^^^^^^^^^
where ^^^^^
what
when the make starts it looks for where it will find the sources and
gets /tmp/axiom. It next looks for what kind of system to build and
gets linux.
In the top level makefile we see:
SPD=$(shell pwd)
which means that SPD will be the current working directory.
It got set to:
SPD=/tmp/axiom
which is correct.
Next in the Makefile we see:
SYS=$(notdir $(AXIOM))
which got set to:
SYS=linux
so we can see from this information that the AXIOM shell variable
was set to:
AXIOM=/tmp/axiom/mnt/linux
Second, the AXIOM variable is used at runtime to tell axiom where
it lives. When you build an axiom system everything that is important
and worth keeping lives under the mnt subdirectory. So to "install"
an Axiom system into /usr/local/axiom, for example, you need only
copy the mnt subdirectory thus:
mkdir /usr/local/axiom
cd /tmp/axiom
cp -pr mnt /usr/local/axiom
Now that we've done that we can remove the whole axiom directory
from /tmp because it is no longer needed.
However, in order to run Axiom we need 2 pieces of information.
First, we have to tell Axiom where it now lives and second, we
have to put the commands on our path so they can be found. So,
since we installed axiom into /usr/local/axiom we need:
export AXIOM=/usr/local/axiom/mnt/linux
export PATH=$AXIOM/bin:$PATH
The AXIOM shell variable tells axiom where to find itself.
The PATH shell variable tells linux where to find executables.
===================================================================
FAQ 22: How do I check out the latest sources?
===================================================================
git clone git://github.com/daly/axiom.git
===================================================================
FAQ 23: How do I patch a file?
===================================================================
This is an example of changing floats.spad.pamphlet and
incorporating a test case in the src/input directory:
1) Applied the negative float rounding/truncation patch from
Savannah to the floats.spad.pamphlet file.
2) Created a simple input file called
negfloats.input.pamphlet
in the src/input directory that executes some Axiom
commands illustrating the bugs
3) Modified the file src/input/Makefile.pamphlet to
include the following new subsection and stanzas
\subsection{negfloats}
\begin{chunk}{negfloats}
${OUT}/negfloats.input: ${MID}/negfloats.input
@ echo 426 making ${OUT}/negfloats.input from ${MID}/negfloats.input
@ cp ${MID}/negfloats.input ${OUT}/ngefloats.input
${MID}/negfloats.input: ${IN}/negfloats.input.pamphlet
@ echo 427 making ${MID}/negfloats.input from
${IN}/negfloats.input.pamphlet
@(cd ${MID} ; \
${BOOKS}/tangle ${IN}/negfloats.input.pamphlet >negfloats.input )
4) Made a new entry for negfloats in
FILES= ${OUT}/algaggr.input ${OUT}/algbrbf.input ${OUT}/algfacob.input \
...
${OUT}/ndftip.input ${OUT}/newlodo.input \
${OUT}/negfloats.input \
...
5) Added a reference to chunk negfloats in the default chunk *
\begin{chunk}{*}
...
\getchunk{NDFtip}
\getchunk{negfloats}
...
6) Did axiom 'make' to compile the revised floats domain and
(hopefully) run the negfloats.input test file.
(set AXIOM and PATH manually ...)
make
===================================================================
FAQ 24: What is the purpose of the domain HACKPI?
===================================================================
HACKPI is a hack provided for the benefit of the axiom interpreter.
As a mathematical type, it is the simple transcendental extension
Q(\pi) of the rational numbers. This type allows interactive users to
use the name '%pi' without a type both where a numerical value is
expected [ as in draw(sin x,x=-%pi..%pi) ] or when the exact symbolic
value is meant. The interpreter defaults a typeless %pi to HACKPI and
then uses the various conversions to cast it further as required by
the context.
One could argue that it is unfair to single %pi out from other
constants, but it occurs frequently enough in school examples
(specially for graphs) so it was worth a special hack. In a
non-interactive environment (library), HACKPI would not exist.
===================================================================
FAQ 25: Can I create or edit hypertex pages?
===================================================================
The hypertex is intended to be edited by users. We are looking to
build special purpose pages around courses such as linear algebra.
Assume HERE=$AXIOM/doc/hypertex/pages
The text can be found in $HERE/foo.ht or $HERE/foo.pht
The macros are tex-like and live in $HERE/util.ht
To change a page you need to:
cd $HERE
edit the page
rm *~ (to delete backup copies)
htadd *
hypertex
the htadd command takes arguments:
htadd [-s|-l|-f db-directory] [-d|-n] filenames
but, i'm sorry to say, these have not been fully documented.
The htadd function will maintain the file called $HERE/ht.db
which is a database of absolute byte indexes into files.
Forgetting to run htadd will still work, sort-of, until you
hit a bad byte index and then it will fail.
Hypertex can also be directed elsewhere by using the HTPATH
shell variable.
===================================================================
FAQ 26: How can I compile spad files on windows?
===================================================================
Something that probably should have been obvious caught me
by surprize today.
I have been working Axiom developer system configurations
for so long now that I had forgotten to make a distinction
between the types of users and the software that they need
to install. This is especially obvious on Windows because,
unlike linux, Windows is very often configured without
any development tools whatever. Only end-users application
programs might installed and even then these can often be
restricted to support an even more limited set of functions
for certain users. That is really what this message is
about. But first let me tell you the story...
*[This is Microsoft's World and while working intensively
with open source and linux we might sometimes forget what
it is like for the other 90% of the world ... :]*
Users, Programmers and Developers
Anyway, this afternoon I installed Axiom for Windows
http://page.axiom-developer.org/axiom-windows-0.1.3.exe
on an entirely new machine with *no* other software installed
except the basic operating system (Windows 2000). Now that
we know about the problem of paths with spaces, I also opted
to override the default and install Axiom into the directory::
c:\axiom
instead of::
c:\Program Files\axiom
which is the default.
Then I proceeded to test Axiom in the usual way by running
a few selected input files. Everything seemed fine.
Finally since we have been talking about compiling spad
files today, I also tried to compile a src/algebra file.
I was very surprized when Axiom when all the way through
the spad compile and then told me (well GCL told me, really)
that it could not find `gcc'!
Then after I thought about it for a while I realized that
GCL really does depend on gcc and that gcc is *not* included
in the version of GCL that is installed with the Axiom
build. Well, of course not, right? <embarrassment> For
over more than a month now, a total of nearly 1,000 users
have downloaded the pre-release versions of axiom-windows
and it did not occur to me that they would not be able to
compile a spad file! sheesh. That seemed so odd to me since
I have been doing exactly that several times a day over
that same time, experimenting and testing new versions.
But then, I *do* have the full developer environment
installed.
So, who are all these people who are apparently quite
satisfied playing with and using this version of Axiom
that only includes about 1/2 of what Axiom can do?
Well, *Axiom Users* I guess. But certainly not Axiom
Programmers in the natural sense of the word because
they (probably) don't even have the pieces installed
that they would need to compile a program. An Axiom
end User then is someone who is satisfied with just
the contents of the mnt directory. They can do all
the calculations that Axiom is pre-programmed to do
and they can even define long calculations including
function definitions and the kind of program control
that can be written in input files, but then can *not*
compile new library files.
What besides the contents of the mnt directory is
required before one can compile library files? Well,
just the C compiler, of course. On windows the
minimum additional software that has to be installed
is called MinGW ( http://www.mingw.org/ ) and consists
of the "mingw-runtime, w32api, binutils and gcc tarball
packages" from ( http://www.mingw.org/download.shtml ):
http://prdownloads.sf.net/mingw/mingw-runtime-3.5.tar.gz?download
http://prdownloads.sf.net/mingw/w32api-3.2.tar.gz?download
http://prdownloads.sf.net/mingw/binutils-2.15.91-20040904-1.tar.gz?download
http://prdownloads.sf.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download
You need to download each of these files and unzip them
(using a Windows shareware (evaluation version) program
like WinZip http://www.winzip.com/ http://www.7-zip.org/
or other free equivalent will do) directly into the::
mnt/windows
directory, the root of your Axiom installation. This is
the most convenient place because the Axiom installation
has already added this location to the path that allows
your system to find and execute this programs.
FINALLY, there is one more thing that you need add. One of
the unix compatibility programs called rm.exe is missing
from::
mnt/windows/bin
Click on
http://page.axiom-developer.org/rm.exe
and choose "Save As". Locate the `mnt\windows\bin'
directory and click Save.
Now at last you have a Windows Axiom Programmer's system
configuration. You will be able to create, modify and
compile spad files to create your own customized mathematical
library.
When you create .spad files, be sure to save them in
path that does not include spaces. This means that you
can not use `My Documents' which is (more or less) the
Windows default location. If you like, you can create
a directory called `local' within your Axiom base
installation directory. For example::
c:\test\local
Save your files there. In Axiom you should change the
default directory to `local' so that you can easily
compile files like this::
)cd ../..
)cd local
)co yourfile.spad
and::
)library yourfile.spad
to load a file compiled during a previous session.
**Enjoy!**
In the next pre-release of Axiom for Windows I think it
would be a good idea if we provided at least the above
end User's and the larger Programmer's configurations in
two complete downloads and self-install files. I have
checked the licenses for MinGW and I am quite sure that
including the run-time and minimal compiler programs in
the Axiom install is allowed by the developers. It is
however very clearly a GPL license.
In fact, you should expect that over the next few months
many aspects of the Axiom installation will become easier
and more complete. Stay tuned to the MathAction website:
http://page.axiom-developer.org
or this email list for more up to date information!
---------
Lastly, I will define Axiom Developers as those masochists
who are willing to spend their time configuring and testing
new complete releases of Axiom for others. The development
environment of this on Windows is everything the Programmers
have plus the MSYS developer's tools. See
( http://www.mingw.org/msys.shtml ) for the following files:
http://prdownloads.sf.net/mingw/MSYS-1.0.8.exe?download
http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download
Download these self-install files and then run them to
create a programming environment under windows that is
in many ways like linux (however, more minimal :). When
you install these programs, make sure to specify that you
also have MingGW installed.
And one last thing. Before you can run::
.\configure
make
You should also have the tla arch program installed so
that you can download the Axiom source files and you will
be able to upload your patches and new features. To get
tla click
http://download.sipsolutions.de/tla-setup.exe
Download and run this program to install tla. Once this is
installed, you will be able to run tla from inside MSYS or
from tla's own special command line shell. The rest of
the instructions for developers is as
http://arch.axiom-developer.org
Axiom Programmers should (optional for Axiom Users and
mandatory for Axiom Developers) also install support for
LaTeX. Of course it is essential that developers, programmers
and even Axiom users devote as much effort as possible to
preparing accurate and easy to read documentation, otherwise
a great deal of effort and intellectual investment in can
be quickly lost.
Axiom Users can also optionally use TeXmacs
http://www.texmacs.org
to interact with Axiom and to prepare high quality mathematical
documents.
The standard form for all Axiom programs and documentation is
the noweb extension of LaTeX (called "pamphlet files" in Axiom
terminology). Pamphlet files contain both documentation and the
program code itself. This format is used for all internal Axiom
coding and the entire Algebra library. It is expected that new
Algebra that is intended by it's author to be shared with other
Axiom users will also be prepared in pamphlet format.
Unfortunately pamphlet format is not (yet) fully supported by
TeXmacs.
There are several Windows compatible versions of LaTeX to choose
from. The one that I have used very successfully is MikTeX
( http://www.miktex.org/ ). To install MikTeX click
http://www.miktex.org/setup.html
and follow the instructions. If your computer is connected to
the Internet then the "small" version (small-miktex-2.4.1705.exe)
will be sufficient for use with Axiom.
For Windows users who have no previous experience with LaTeX
(and even if you do) I would also recommend that you install
a good LaTeX-aware text editor. See
http://www.miktex.org/links.html
One of the easiest to use and completely open source is
TeXnicCenter
http://www.toolscenter.org/front_content.php?idcat=26
Click 'download' and select "TeXnicCenter Setup, Version 1
beta ...". This is a self-installing file. If you install
TeXnicCenter after MikTeX, it will be automatically configured
to support MikTeX.
TeXnicCenter is very easy to use for LaTeX beginners and
it is will supported by it's developers and the users group.
It is also quite easily configured to support LaTeX extensions
such as noweb.
===================================================================
FAQ 27: Why can't I input text into the hypertex browser boxes?