forked from Mathics3/mathics-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES.rst
1457 lines (1131 loc) · 56.3 KB
/
CHANGES.rst
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
.. contents::
CHANGES
=======
New Builtins
++++++++++++
* ``Elements``
* ``ConjugateTranspose``
* ``LeviCivitaTensor``
* ``RealAbs`` and ``RealSign``
* ``RealValuedNumberQ``
Compatibility
-------------
* ``*Plot`` does not show messages during the evaluation.
Internals
---
* ``eval_abs`` and ``eval_sign`` extracted from ``Abs`` and ``Sign`` and added to ``mathics.eval.arithmetic``.
* Maximum number of digits allowed in a string set to 7000 and can be adjusted using environment variable
``MATHICS_MAX_STR_DIGITS`` on Python versions that don't adjust automatically (like pyston).
* Real number comparisons implemented is based now in the internal implementation of `RealSign`.
Bugs
----
* Improved support for ``DirectedInfinity`` and ``Indeterminate``.
* ``Definitions`` is compatible with ``pickle``.
* Inproved support for `Quantity` expressions, including conversions, formatting and arithmetic operations.
Package updates
+++++++++++++++
#. Python 3.11 is now supported
6.0.1
-----
Release to get Pillow 9.2 dependency added for Python 3.7+
Some Pattern-matching code gone over to add type annotations and to start
documenting its behavior and characteristics. Function
attributes are now examined and stored at the time of Pattern-object creation
rather than at evaluation time. This better matches WMA behavior which pulls
out attribute this even earlier than this. These changes speed up
doctest running time by about 7% under Pyston.
Combinatorica version upgraded from 0.9 (circa 1992) to 0.91 (circa 1995) which closer matches the published book.
Random builtin documentation gone over to conform to current documentation style.
6.0.0
-----
A fair bit of code refactoring has gone on so that we might be able to
scale the code, get it to be more performant, and more in line with
other interpreters. There is Greater use of Symbols as opposed to strings.
The builtin Functions have been organized into grouping akin to what is found in WMA.
This is not just for documentation purposes, but it better modularizes the code and keep
the modules smaller while suggesting where functions below as we scale.
Image Routines have been gone over and fixed. Basically we use Pillow
imaging routines and as opposed to home-grown image code.
A number of Built-in functions that were implemented were not accessible for various reasons.
Mathics3 Modules are better integrated into the documentation.
Existing Mathics3 modules ``pymathics.graph`` and ``pymathics.natlang`` have
had a major overhaul, although more is needed. And will continue after the 6.0.0 release
We have gradually been rolling in more Python type annotations and
current Python practices such as using ``isort``, ``black`` and ``flake8``.
Evaluation methods of built-in functions start ``eval_`` not ``apply_``.
API
+++
#. New function ``mathics.system_info.python_implementation()`` shows the Python Implementation, e.g. CPython, PyPy, Pyston that is running Python. This is included in the information ``mathics.system_info.mathics_system__system_info()`` returns and is used in ``$PythonImplementation``
#. A list of optional software can be found in ``mathics.optional_software``. Versions of that software are included in ``mathics.version_info``.
Package update
..............
#. SymPy 1.11.1 accepted
#. Numpy 1.24.0 accepted
New Builtins
+++++++++++
#. ``$BoxForms``
#. ``$OutputForms``
#. ``$PrintForms``
#. ``$PythonImplementation``
#. ``Accuracy``
#. ``ClebschGordan``
#. ``ComplexExpand`` (@yzrun)
#. ``Curl`` (2-D and 3-D vector forms only)
#. ``DiscretePlot``
#. ``Kurtosis``
#. ``ListLogPlot``
#. ``LogPlot``
#. ``$MaxMachineNumber``
#. ``$MinMachineNumber``
#. ``NumberLinePlot``
#. ``PauliMatrix``
#. ``Remove``
#. ``SetOptions``
#. ``SixJSymbol``
#. ``Skewness``
#. ``ThreeJSymbol``
Documentation
+++++++++++++
#. All Builtins have links to WMA pages.
#. "Accuracy and Precision" section added to the Tutorial portion.
#. "Attribute Definitions" section reinstated.
#. "Expression Structure" split out as a guide section (was "Structure of Expressions").
#. "Exponential Functional" split out from "Trigonometry Functions"
#. "Functional Programming" section split out.
#. "Image Manipulation" has been split off from Graphics and Drawing and turned into a guide section.
#. Image examples now appear in the LaTeX and therfore the PDF doc
#. "Logic and Boolean Algebra" section reinstated.
#. "Forms of Input and Output" is its own guide section.
#. More URL links to Wiki pages added; more internal cross links added.
#. "Units and Quantities" section reinstated.
#. The Mathics3 Modules are now included in LaTeX and therefore the PDF doc.
Internals
+++++++++
#. ``boxes_to_`` methods are now optional for ``BoxElement`` subclasses. Most of the code is now moved to the ``mathics.format`` submodule, and implemented in a more scalable way.
#. ``from_mpmath`` conversion supports a new parameter ``acc`` to set the accuracy of the number.
#. ``mathics.builtin.inout`` was split in several modules (``inout``, ``messages``, ``layout``, ``makeboxes``) in order to improve the documentation.
#. ``mathics.eval`` was create to have code that might be put in an instruction interpreter. The opcodes-like functions start ``eval_``, other functions are helper functions for those.
#. Operator name to Unicode or ASCII comes from Mathics scanner character tables.
#. Builtin instance methods that start ``eval`` are considered rule matching and function application; the use of the name ``apply``is deprecated, when ``eval`` is intended.
#. Modularize and improve the way in which ``Builtin`` classes are selected to have an associated ``Definition``.
#. ``_SetOperator.assign_elementary`` was renamed as ``_SetOperator.assign``. All the special cases are not handled by the ``_SetOperator.special_cases`` dict.
#. ``isort`` run over all Python files. More type annotations and docstrings on functions added.
#. caching on immutable atoms like, ``String``, ``Integer``, ``Real``, etc. was improved; the ``__hash__()`` function was sped up. There is a small speedup overall from this at the expense of increased memory.
#. more type annotations added to functions, especially builtin functions
#. Numerical constants used along the code was renamed using caps, according to the Python's convention.
Bugs
++++
# ``0`` with a given precision (like in ```0`3```) is now parsed as ``0``, an integer number.
# Reading certain GIFs now work again
#. ``Random[]`` works now.
#. ``RandomSample`` with one list argument now returns a random ordering of the list items. Previously it would return just one item.
#. Origin placement corrected on ``ListPlot`` and ``LinePlot``.
#. Fix long-standing bugs in Image handling
#. Some scikit image routines line ``EdgeDetect`` were getting omitted due to overly stringent PyPI requirements
#. Units and Quantities were sometimes failing. Also they were omitted from documentation.
#. Better handling of ``Infinite`` quantities.
#. Improved ``Precision`` and ``Accuracy``compatibility with WMA. In particular, ``Precision[0.]`` and ``Accuracy[0.]``
#. Accuracy in numbers using the notation ``` n.nnn``acc ``` now is properly handled.
#. numeric precision in mpmath was not reset after operations that changed these. This cause huges slowdowns after an operation that set the mpmath precison high. This was the source of several-minute slowdowns in testing.
#. GIF87a (```MadTeaParty.gif`` or ExampleData) image loading fixed
#. Replace non-free Leena image with a a freely distributable image. Issue #728
PyPI Package requirements
+++++++++++++++++++++++++
Mathics3 aims at a more richer set of functionality.
Therefore NumPy and Pillow (9.10 or later) are required Python
packages where they had been optional before. In truth, probably
running Mathics without one or both probably did not work well if it
worked at all; we had not been testing setups that did not have NumPy.
Enhancements
++++++++++++
#. Vector restriction on ``Norm[]`` removed. "Frobinius" p-form allowed.
#. Better handling of comparisons with finite precision numbers.
#. Improved implementation for ``Precision``.
#. Infix operators, like ``->`` render with their Unicode symbol when ``$CharacterEncoding`` is not "ASCII".
#. ``Grid`` compatibility with WMA was improved. Now it supports non-uniform list of lists and lists with general elements.
#. Support for BigEndian Big TIFF
5.0.2
-----
Get in `requirements-cython.txt`` into tarball. Issue #483
New Symbols
+++++++++++
#. ``Undefined``
5.0.1
-----
Mostly a release to fix a Python packaging problem.
Internals
+++++++++
#. ``format`` and ``do_format`` methods were removed from the interface of
``BaseElement``, becoming non-member functions.
#. The class ``BoxElement`` was introduced as a base for boxing elements.
New Builtin
+++++++++++
#. 'Inverse Gudermannian'.
Documentation
+++++++++++++
Hyperbolic functions were split off form trigonometry and exponential functions. More URL links were added.
Bugs
++++
#. Creating a complex number from Infinity no longer crashes and returns 'I * Infinity'
5.0.0
------
This release starts to address some of the performance problems and terminology confusion that goes back to the very beginning.
As a result, this release is not API compatible with prior releases.
In conjunction with the performance improvement in this release, we start refactoring some of the core classes and modules to start to get this to look and act more like other interpreters, and to follow more current Python practice.
More work will continue in subsequent releases.
New Builtins
++++++++++++
#. Euler's ``Beta`` function.
#. ``Bernoulli``.
#. ``CatalanNumber`` (Integer arguments only).
#. ``CompositeQ``.
#. ``Diagonal``. Issue #115.
#. ``Divisible``.
#. ``EllipticE``
#. ``EllipticF``
#. ``EllipticK``
#. ``EllipticPi``
#. ``EulerPhi``
#. ``$Echo``. Issue #42.
#. ``FindRoot`` was improved for supporting numerical derivatives Issue #67, as well as the use of scipy libraries when are available.
#. ``FindRoot`` (for the ``newton`` method) partially supports ``EvaluationMonitor`` and ``StepMonitor`` options.
#. ``FindMinimum`` and ``FindMaximum`` now have a minimal implementation for 1D problems and the use of scipy libraries when are available.
#. ``LogGamma``.
#. ``ModularInverse``.
#. ``NumericFunction``.
#. ``Projection``.
#. Partial support for Graphics option ``Opacity``.
#. ``SeriesData`` operations was improved.
#. ``TraceEvaluation[]`` shows expression name calls and return values of it argument.
- Pass option ``ShowTimeBySteps``, to show accumulated time before each step
- The variable ``$TraceEvalution`` when set True will show all expression evaluations.
#. ``TraditionalForm``
Enhancements
++++++++++++
#. ``D`` acts over ``Integrate`` and ``NIntegrate``. Issue #130.
#. ``SameQ`` (``===``) handles chaining, e.g. ``a == b == c`` or ``SameQ[a, b, c]``.
#. ``Simplify`` handles expressions of the form ``Simplify[0^a]`` Issue #167.
#. ``Simplify`` and ``FullSimplify`` support optional parameters ``Assumptions`` and ``ComplexityFunction``.
#. ``UnsameQ`` (``=!=``) handles chaining, e.g. ``a =!= b =!= c`` or ``UnsameQ[a, b, c]``.
#. Assignments to usage messages associated with ``Symbols`` is allowed as it is in WMA. With this and other changes, Combinatorica 2.0 works as written.
#. ``Share[]`` performs an explicit call to the Python garbage collection and returns the amount of memory free.
#. Improve the compatibility of ``TeXForm`` and ``MathMLForm`` outputs with WMA. MathML tags around numbers appear as "<mn>" tags instead of "<mtext>", except in the case of ``InputForm`` expressions. In TeXForm some quotes around strings have been removed to conform to WMA. It is not clear whether this is the correct behavior.
#. Allow ``scipy`` and ``skimage`` to be optional. In particular: revise ``Nintegrate[]`` to use ``Method="Internal"`` when scipy isn't available.
#. Pyston up to versions from 2.2 to 2.3.4 are supported as are PyPy versions from 3.7-7.3.9.0 up 3.9-7.3.9. However those Python interpreters may have limitations and limitations on packages that they support.
#. Improved support for ``Series`` Issue #46.
#. ``Cylinder`` rendering is implemented in Asymptote.
Documentation
+++++++++++++
#. "Testing Expressions" section added.
#. "Representation of Numbers" section added.
#. "Descriptive Statistics" section added and "Moments" folded into that.
#. Many More URL references. ``<url>`` now supports link text.
#. Reference Chapter and Sections are now in alphabetical order
#. Two-column mode was removed in most sections so the printed PDF looks nicer.
#. Printed Error message output in test examples is in typewriter font and doesn't drop inter-word spaces.
Internals
+++++++++
#. Inexplicably, what the rest of the world calls a "nodes" in a tree or or in WMA "elements" in a tree had been called a "leaves". We now use the proper term "element".
#. Lots of predefined ``Symbol``s have been added. Many appear in the module ``mathics.core.systemsymbols``.
#. Attributes are now stored in a bitset instead of a tuple of string. This speeds up attributes read, and RAM usage, .
#. ``Symbol.is_numeric`` and ``Expression.is_numeric`` now uses the attribute ``Definition.is_numeric`` to determine the returned value.
#. ``NIntegrate`` internal algorithms and interfaces to ``scipy`` were moved to ``mathics.algorithm.integrators`` and ``mathics.builtin.scipy_utils.integrators`` respectively.
#. ``N[Integrate[...]]`` now is evaluated as ``NIntegrate[...]``
#. Definitions for symbols ``CurrentContext`` and ``ContextPath[]`` are mirrored in the ``mathics.core.definitions.Definitions`` object for faster access.
#. ``FullForm[List[...]]`` is shown as ``{...}`` according to the WL standard.
#. ``Expression.is_numeric()`` accepts an ``Evaluation`` object as a parameter; the definitions attribute of that is used.
#. ``SameQ`` first checks the type, then the ``id``, and then names in symbols.
#. In ``mathics.builtin.patterns.PatternTest``, if the condition is one of the most used tests (``NumberQ``, ``NumericQ``, ``StringQ``, etc) the ``match`` method is overwritten to specialized versions that avoid function calls.
#. ``mathics.core.patterns.AtomPattern`` specializes the comparison depending of the ``Atom`` type.
#. To speed up development, you can set ``NO_CYTHON`` to skip Cythonizing Python modules. If you are using Pyston or PyPy, Cythonization slows things down.
#. ``any`` and``all`` calls were unrolled as loops in Cythonized modules: this avoids the overhead of a function call replacing it by a (C) for loop, which is faster.
#. A bug was fixed relating to the order in which ``mathics.core.definitions`` stores the rules
#. ``InstanceableBuiltin`` -> ``BuiltinElement``
#. ``BoxConstruction`` -> ``BoxExpression``
#. the method ``Element.is_true()`` was removed in favor of ``is SymbolTrue``
#. ``N[_,_,Method->method]`` was reworked. Issue #137.
#. The methods ``boxes_to_*`` were moved to ``BoxExpression``.
#. remove ``flatten_*`` from the ``Atom`` interface.
#. ``Definition`` has a new property ``is_numeric``.
Speed improvements:
...................
#. Creating two ``Symbol`` objects with the same name will give the same object. This avoids unnecessary string comparisons, and calls to ``ensure_context``.
#. Attributes are now stored in a bitset instead of a tuple of strings.
#. The ``Definitions`` object has two properties: ``current_contex`` and ``context_path``. This speeds up the lookup of symbols names. These properties store their values into the corresponding symbols in the ``builtin`` definitions.
#. ``eval_N`` was add to speed up the then often-used built-in function ``N``.
#. ``Expression`` evaluation was gone over and improved. properties on the collection which can speed up evaluation, such as whether an expression is fully evaluated, is ordered, or is flat are collected.
#. ``List`` evaluation is customized. There is a new ``ListExpression`` class which has a more streamlined ``evaluate()`` method. More of this kind of thing will follow
#. ``BaseExpression.get_head`` avoids building a symbol saving two function calls.
Package update
..............
#. SymPy 1.10.1
Compatibility
+++++++++++++
#. ``ScriptCommandLine`` now returns, as the first element, the name of the script file (when available), for compatibility with WMA. Issue #132.
#. ``Expression.numerify`` improved in a way to obtain a behavior closer to WMA.
#. ``NumericQ`` lhs expressions are now handled as a special case in assignment. For example ``NumericQ[a]=True`` tells the interpreter that ``a`` must be considered
a numeric quantity, so ``NumericQ[Sin[a]]`` evaluates to ``True``.
Bugs
++++
#. ``First``, ``Rest`` and ``Last`` now handle invalid arguments.
#. ``Set*``: fixed issue #128.
#. ``SameQ``: comparison with MachinePrecision only needs to be exact within the last bit Issue #148.
#. Fix a bug in ``Simplify`` that produced expressions of the form ``ConditionalExpression[_,{True}]``.
#. Fix bug in ``Clear`` and ``ClearAll`` (#194).
#. Fix base 10 formatting for infix ``Times``. Issue #266.
#. Partial fix of ``FillSimplify``
#. Streams used in MathicsOpen are now freed and their file descriptors now released. Issue #326.
#. Some temporary files that were created are now removed from the filesystem. Issue #309.
#. There were a number of small changes/fixes involving ``NIntegrate`` and its Method options. ``Nintegrate`` tests have been expanded.
#. Fix a bug in handling arguments of pythonized expressions, that are produced by ``Compile`` when the llvmlite compiler fails.
#. ``N`` now handles arbitrary precision numbers when the number of digits is not specified.
#. `N[Indeterminate]` now produces `Indeterminate` instead a `PrecisionReal(nan)`.
#. Fix crash in ``NestWhile`` when supplying ``All`` as the fourth argument.
#. Fix the comparison between ``Image`` and other expressions.
#. Fix an issue that prevented that `Collect` handles properly polynomials on expressions (issue #285).
#. Fix a bug in formatting expressions of the form ``(-1)^a`` without the parenthesis (issue #332).
#. Fix a but in failure in the order in which ``mathics.core.definitions`` stores the rules.
#. Numeric overflows now do not affect the full evaluation, but instead just the element which produce it.
#. Compatibility with the way expressions are ordered more closely follows WMA: Now expressions with fewer elements come first (issue #458).
#. The order of the context name resolution (and ``$ContextPath``) was switched; ``"System`` comes before ``"Global``.
Incompatible changes
+++++++++++++++++++++
The following changes were motivated by a need to speed up the interpreter.
#. ``Expression`` arguments differ. The first parameter has to be a ``Symbol`` while the remaining arguments have to be some sort of ``BaseElement`` rather than something that can be converted to an element.
Properties for the collection of elements can be specified when they are known. To get the old behavior, use ``to_expression``
#. Expressions which are lists are a new kind of class, ``ListExpression``. As with expressions, the constructor requires valid elements, not something convertible to an element. Use ``to_mathics_list``
-----------------
4.0.1
-----
New builtins
++++++++++++
#. ``Guidermannian``
#. ``Cone``
#. ``Tube``
#. ``Normal`` now have a basic support for ``SeriesData``
Tensor functions:
#. ``RotationTransform``
#. ``ScalingTransform``
#. ``ShearingTransform``
#. ``TransformationFunction``
#. ``TranslationTransform``
Spherical Bessel functions:
#. ``SphericalBesselJ``
#. ``SphericalBesselY``
#. ``SphericalHankelH1``
#. ``SphericalHankelH2``
Gamma functions:
#. ``PolyGamma``
#. ``Stieltjes``
Uniform Polyhedron
#. ``Dodecahedron``
#. ``Icosahedron``
#. ``Octahedron``
#. ``TetraHedron``
#. ``UniformPolyedron``
Mathics-specific
#. ``TraceBuiltin[]``, ``$TraceBuiltins``, ``ClearTrace[]``, ``PrintTrace[]``
These collect builtin-function call counts and elapsed time in the routines.
``TraceBuiltin[expr]`` collects information for just *expr*. Whereas
setting ``$TraceBuiltins`` to True will accumulate results of evaluations
``PrintTrace[]`` dumps the statistics and ``ClearTrace[]`` clears the statistics data.
``mathics -T/--trace-builtin`` is about the same as setting
``$TraceBuiltins = True`` on entry and runs ``PrintTrace[]`` on exit.
Bugs
++++
#. Fix and document better behavior of ``Quantile``
#. Improve Asymptote ``BezierCurve``implementation
#. ``Rationalize`` gives symmetric results for +/- like MMA does. If
the result is an integer, it stays that way.
#. stream processing was redone. ``InputStream``, ``OutputStream`` and
``StringToStream`` should all open, close, and assign stream numbers now
4.0.0
#.----
The main thrust behind this API-breaking release is to be able to
support a protocol for Graphics3D.
It new Graphics3D protocol is currently expressed in JSON. There is an
independent `threejs-based module
<https://www.npmjs.com/package/@mathicsorg/mathics-threejs-backend>`_
to implement this. Tiago Cavalcante Trindade is responsible for this
code.
The other main API-breaking change is more decentralization of the
Mathics Documentation. A lot more work needs to go on here, and so
there will be one or two more API breaking releases. After this
release, the documentation code will be split off into its own git
repository.
Enhancements
++++++++++++
#. a Graphics3D protocol, mentioned above, has been started
#. ``mathics.setting`` have been gone over to simplify.
#. A rudimentary and crude SVG Density Plot was added. The prior method
relied on mysterious secret handshakes in JSON between Mathics Core
and Mathics Django. While the density plot output was nicer in
Mathics Django, from an overall API perspective this was untenable. A
future version may improve SVG handling of Density plots using
elliptic density gratings in SVG. And/or we may define this in the
JSON API.
#. SVG and Asymptote drawing now includes inline comments indicating
which Box Structures are being implemented in code
Documentation
.............
#. Document data used in producing PDFs and HTML-rendered documents is now stored
in both the user space, where it can be extended, and in the package install
space -- which is useful when there is no user-space data.
#. The documentation pipeline has been gone over. Turning the internal data
into a LaTeX file is now a separate own program. See ``mathics/doc/test/README.rst``
for an overview of the dataflow needed to create a PDF.
#. Summary text for various built-in functions has been started. These
summaries are visible in Mathics Django when lists links are given
in Chapters, Guide Sections, or Sections.
#. A Sections for Lists has been started and grouping for these
have been added. So code and sections have moved around here.
#. Regexp detection of tests versus document text has been improved.
#. Documentation improved
#. The flakiness around showing sine graphs with filling on the axes or below has
been addressed. We now warn when a version of Asymptote or Ghostscript is used
that is likely to give a problem.
Bugs
++++
#. A small SVGTransform bug was fixed. Thanks to axelclk for spotting.
#. Elliptic arcs are now supported in Asymptote. There still is a bug however
in calculating the bounding box when this happens.
#. A bug in image decoding introduced in 3.1.0 or so was fixed.
#. A bug SVG LineBoxes was fixed
Regressions
+++++++++++
#. Some of the test output for builtins inside a guide sections is not automatically rendered
#. Density plot rendered in Mathics Django do not render as nice since we no longer
use the secret protocol handshake hack. We may fix this in a future release
#. Some of the Asymptote graphs look different. Graphic3D mesh lines are not as
prominent or don't appear. This is due to using a newer version of Asymptote, and
we will address this in a future release.
-----------------
3.1.0
----
New variables and builtins
++++++++++++++++++++++++++
#. ``Arrow`` for Graphics3D (preliminary)
#. ``Cylinder`` (preliminary)
#. ``Factorial2`` PR #1459 Issue #682.
Enhancements
++++++++++++
Large sections like the "Strings and Characters", "Integer Functions" and "Lists" sections
have been broken up into subsections. These more closely match
online WL "Guide" sections. This is beneficial not just in the
documentation, but also for code organization. See PRs #1464, #1473.
A lot more work is needed here.
The Introduction section of the manual has been revised. Licensing and Copyright/left sections
have been reformatted for non-fixed-width displays. #1474
PolarPlot documentation was improved. #1475.
A getter/setter method for Mathics settings was added #1472.
Bugs
++++
#. Add ``requirements-*.txt``to distribution files. ``pip install Mathics3[dev]`` should work now. PR #1461
#. Some ``PointBox`` bugs were fixed
#. Some ``Arrow3DBox`` and ``Point3DBox`` bugs were fixed PR #1463
#. Fix bug in ``mathics`` CLI when ``-script`` and ``-e`` were combined PR #1455
-----------------
3.0.0
----
Overall there is a major refactoring underway of how formatting works
and its interaction with graphics. More work will come in later releases.
Some of the improvements are visible not here but in the front-ends
mathicsscript and mathics-django. In mathicsscript, we can now show
SVG images (via matplotlib). In Mathics Django, images and threejs
graphs are no longer embedded in MathML.
A lot of the improvements in this release were done or made possible with the help of
Tiago Cavalcante Trindade.
Enhancements
++++++++++++
It is now possible to get back SVG, and graphics that are not embedded in MathML.
The code is now Pyston 2.2 compatible. However ``scipy`` ``lxml`` are
not currently available on Pyston so there is a slight loss of
functionality. The code runs about 30% faster under Pyston 2.2. Note
that the code also works under PyPy 3.7.
Bugs
++++
#. Tick marks and the placement of numbers on charts have been corrected. PR #1437
#. Asymptote now respects the ``PointSize`` setting.
#. In graphs rendered in SVG, the ``PointSize`` has been made more closely match Mathematica.
#. Polygons rendered in Asymptote now respects the even/odd rule for filling areas.
Density Plots rendered in SVG broke with this release. They will be reinstated in the future.
Documentation
+++++++++++++
Go over settings file to ensure usage names are full sentences.
We have started to put more builtins in the sections or subsections
following the organization in Mathematics 5 or as found in the online
Wolfram Language Reference. As a result, long lists in previous topics
are a bit shorter and there are now more sections. This work was
started in 2.2.0.
More work is needed on formatting and showing this information, with
the additional breakout we now have subsections. More reorganization
and sectioning is needed.
These cleanups will happen in a future version.
Chapters without introductory text like ``Structural Operations``, or ``Tensors`` have had descriptions added.
Sections that were empty have either been expanded or removed because
the underlying name was never a user-level built in, e.g. the various
internal Boxing functions like ``DiskBox``, or ``CompiledCodeBox``
Documentation specific builtins like ``PolarPlot`` or
``BernsteinBasis`` have been added improved, and document examples
have been revised such as for ``PieChart``, ``Pi`` and others.
The Mathics Gallery examples have been updated.
Some slight improvements were made to producing the PDF and more kinds
of non-ASCII symbols are tolerated. Expect more work on this in the
future via tables from the `Mathics Scanner <https://pypi.org/project/Mathics-Scanner/1.2.1/>`_ project.
Chapters are no longer in Roman Numerals.
Internal changes
++++++++++++++++
#. ``docpipline.py`` accepts the option ``--chapters`` or ``-c`` to narrow tests to a particular chapter
#. Format routines have been isolated into its own module. Currently we have format routines for SVG, JSON and
Asymptote. Expect more reorganization in the future.
#. Boxing routines have been isolated to its own module.
#. The entire code base has been run through the Python formatter `black <https://black.readthedocs.io/en/stable/>`_.
#. More Python3 types to function signatures have been added.
#. More document tests that were not user-visible have been moved to
unit tests which run faster. More work is needed here.
-----------------
2.2.0
----
Package update
++++++++++++++
#. SymPy 1.8
New variables and builtins
++++++++++++++++++++++++++
#. ``Arg``
#. ``CoefficientArrays`` and ``Collect`` (#1174, #1194)
#. ``Dispatch``
#. ``FullSimplify``
#. ``LetterNumber`` #1298. The ``alphabet`` parameter supports only a minimal number of languages.
#. ``MemoryAvailable``
#. ``MemoryInUse``
#. ``Nand`` and ``Nor`` logical functions.
#. ``Series``, ``O`` and ``SeriesData``
#. ``StringReverse``
#. ``$SystemMemory``
#. Add all of the named colors, e.g. ``Brown`` or ``LighterMagenta``.
Enhancements
++++++++++++
#. a function `evaluate_predicate` allows for a basic predicate evaluation using `$Assumptions`.
#. ``Attributes`` accepts a string parameter.
#. ``Cases`` accepts Heads option. Issue #1302.
#. ``ColorNegate`` for colors is supported.
#. ``D`` and ``Derivative`` improvements.
#. ``Expand`` and ``ExpandAll`` now support a second parameter ``patt`` Issue #1301.
#. ``Expand`` and ``ExpandAll`` works with hyperbolic functions (`Sinh`, `Cosh`, `Tanh`, `Coth`).
#. ``FileNames`` returns a sorted list. Issue #1250.
#. ``FindRoot`` now accepts several optional parameters like ``Method`` and ``MaxIterations``. See Issue #1235.
#. ``FixedPoint`` now supports the ``SameTest`` option.
#. ``mathics`` CLI now uses its own Mathics ``settings.m`` file
#. ``Prepend`` works with ``DownValues`` Issue #1251
#. ``Prime`` and ``PrimePi`` now accept a list parameter and have the ``NumericFunction`` attribute.
#. ``Read`` with ``Hold[Expression]`` now supported. (#1242)
#. ``ReplaceRepeated`` and ``FixedPoint`` now supports the ``MaxIteration`` option. See Issue #1260.
#. ``Simplify`` performs a more sophisticated set of simplifications.
#. ``Simplify`` accepts a second parameter that temporarily overwrites ``$Assumptions``.
#. ``StringTake`` now accepts form containing a list of strings and specification. See Issue #1297.
#. ``Table`` [*expr*, *n*] is supported.
#. ``ToExpression`` handles multi-line string input.
#. ``ToString`` accepts an optional *form* parameter.
#. ``ToExpression`` handles multi-line string input.
#. ``$VersionNumber`` now set to 10.0 (was 6.0).
#. The implementation of Streams was redone.
#. Function ``mathics.core.definitions.autoload_files`` was added and
exposed to allow front-ends to provide their own custom Mathics.
settings.
#. String output in the ``mathics`` terminal has surrounding quotes to make it more visually distinct from unexpanded and symbol output.
To disable this behavior use ``--strict-wl-output``.
Bug fixes
+++++++++
#. ``SetTagDelayed`` now does not evaluate the RHS before assignment.
#. ``$InstallationDirectory`` starts out ``Unprotected``.
#. ``FindRoot`` now handles equations.
#. Malformed Patterns are detected and an error message is given for them.
#. Functions gone over to ensure the ``Listable`` and ``NumericFunction`` properties are correct.
Incompatible changes
#.-------------------
#. ``System`$UseSansSerif`` moved from core and is sent front-ends using ``Settings`$UseSansSerif``.
Internal changes
#.---------------
#. ``docpipeline.py`` accepts the option ``-d`` to show how long it takes to parse, evaluate and compare each individual test.
``-x`` option (akin to ``pytests -x`` is a short-hand for stop on first error
#. Some builtin functions have been grouped together in a module
underneath the top-level builtin directory. As a result, in the
documents you will list some builtins listed under an overarching
category like ``Specific Functions`` or ``Graphics, Drawing, and
Images``. More work is expected in the future to improve document sectioning.
#. ``System`$Notebooks`` is removed from settings. It is in all of the front-ends now.
------
2.1.0
----
New builtins
++++++++++++
#. ``ArcTanh``
#. ``ByteArray``
#. ``CreateFile``
#. ``CreateTemporary``
#. ``FileNames``
#. ``NIntegrate``
#. ``PartitionsP``
#. ``$Notebooks``
#. ``SparseArray``
Enhancements
++++++++++++
#. The Mathics version is checked for builtin modules at load time. A message is given when a builtin doesn't load.
#. Automatic detection for the best strategy to numeric evaluation of constants.
#. ``FileNameJoin`` now implements ``OperatingSystem`` option
#. Mathics functions are accepted by ``Compile[]``. The return value or
type will be ``Compile[] and CompiledFunction[]``. Every Mathics
Expression can have a compiled form, which may be implemented as a
Python function.
#. ``Equal[]`` now compares complex against other numbers properly.
#. Improvements in handling products with infinite factors: ``0 Infinity``-> ``Indeterminate``, and ``expr Infinity``-> ``DirectedInfinite[expr]``
#. ``$Path`` is now ``Unprotected`` by default
#. ``Read[]`` handles expressions better.
#. ``StringSplit[]`` now accepts a list in the first argument.
#. ``SetDelayed[]`` now accepts several conditions imposed both at LHS as well as RHS.
#. Axes for 2D Plots are now rendered for SVGs
#. ``InsertBox`` accepts an opaque parameter
Bug fixes
+++++++++
``TeXForm[]`` for integrals are now properly formatted.
Pymathics Modules
+++++++++++++++++
#. Pymathics modules now can run initialization code when are loaded.
#. The ``builtins`` list is not hard-linked to the library anymore. This simplifies
the loading and reloading of pymathics modules.
#. Decoupling of BoxConstructors from the library. Now are defined at the
level of the definition objects. This is useful for customizing the
Graphics output if it is available.
Miscellanea
+++++++++++
#. A pass was made to improve Microsoft Windows compatibility and testing Windows under MSYS.
#. Include numpy version in version string. Show in CLI
#. Small CLI tweaks ``--colors=None`` added to match mathicsscript.
#. In the ``BaseExpression`` and derived classes, the method ``boxes_to_xml`` now are called ``boxes_to_mathml``.
#. In the ``format`` method of the class ``Evaluation``, the builtin ``ToString`` is called instead of ``boxes_to_text``
#. In order to control the final form of boxes from the user space in specific symbols and contexts.
#. ``GraphicsBox`` now have two methods: ``to_svg`` and ``to_mathml``. The first produces SVG plain text while the second produces ``<mglyph ...>`` tags with base64 encoded SVGs.
What's to expect in a Future Release
++++++++++++++++++++++++++++++++++++
#. Improved ``Equal`` See `PR #1209 <https://github.com/mathics/Mathics/pull/1209/>`_
#. Better Unicode support, especially for Mathics operators
#. Improved ``D[]`` and ``Derivative[]`` See `PR #1220 <https://github.com/mathics/Mathics/pull/1209/>`_.
#. Improved performance
#. ``Collect[]`` See `Issue #1194 <https://github.com/mathics/Mathics/issues/1194>`_.
#. ``Series[]`` See `Issue #1193 <https://github.com/mathics/Mathics/issues/1194>`_.
-----
2.0.0
----
To accommodate growth and increased use of pieces of Mathics inside other packages, parts of Mathics have been split off and moved to separate packages. In particular:
#. The Django front-end is now a PyPI installable package called `Mathics-Django <https://pypi.org/project/Mathics-Django/>`_.
#. Scanner routines, character translation tables to/from Unicode, and character properties are now `mathics-scanner https://github.com/Mathics3/mathics-scanner`_.
#. Specific builtins involving heavy, non-standard routines were moved to pymathics modules `pymathics-graph https://github.com/Mathics3/pymathics-graph`_, `pymathics-natlang https://github.com/Mathics3/pymathics-natlang`_.
Incompatible changes:
+++++++++++++++++++++
#. ``-e`` ``--execute`` is better suited for embedded use. It shows just evaluation output as text.
#. Docker scripts ``dmathics``, ``dmathicsscript`` and ``dmathicsserver`` have been removed. They are part of the ``docker-mathics`` a separate PyPI package.
The bump in the major version number reflects major changes in this release. Another major release is planned soon, with more major changes.
See below for future work planned.
New builtins
++++++++++++
#. ``AnglePath``, ``AnglePathFold``, ``AngleVector``
#. ``BoxData``, ``TextData``, ``InterpretationBox``, ``StyleBox``, ``TagBox``, ``TemplateBox``, ``ButtonBox``, ``InterpretationBox``
#. ``ContinuedFraction``
#. ``ConvertCommonDumpRemoveLinearSyntax`` and ``System`ConvertersDump`` context variables
#. ``FirstCase``, ``Lookup``, ``Key``, ``Lookup`` and ``Failure``
#. ``Haversine``, ``InverseHaversine``
#. ``Insert`` and ``Delete``
#. ``LerchPhi``
#. ``MathicsVersion`` (this is not in WL)
#. ``NumberQ``
#. ``PossibleZeroQ`` PR #1100
#. ``Run``
#. ``Show``
#. ``SympyObject``
#. ``TimeRemaining`` and ``TimeConstrained``
#. ``\[RadicalBox]``
#. Improving support for options in the Plot module: ``Axes``, ``Filling``, ``ImageSize``, ``Joined``
New constants
+++++++++++++
Mathematical Constants is now its own module/section. Constants have been filled out. These constants have been added:
#. ``Catalan``
#. ``Degree``
#. ``Glaisher``
#. ``GoldenRatio``
#. ``Khinchin``
Many of these and the existing constants are computable via mpmath, NumPy, or Sympy.
Settings through WL variables
+++++++++++++++++++++++++++++
Certain aspects of the kernel configuration are now controlled by variables, defined in ``/autoload/settings.m``.
#. ``$GetTrace`` (``False`` by default). Defines if when a WL module is load through ``Get``, definitions will be traced (for debug).
#. ``$PreferredBackendMethod`` Set this do whether to use mpmath, NumPy or SymPy for numeric and symbolic constants and methods when there is a choice (``"sympy"`` by default) (see #1124)
Enhancements
++++++++++++
#. Add ``Method`` option "mpmath" to compute ``Eigenvalues`` using mpmath (#1115).
#. Improve support for ``OptionValue`` and ``OptionsPattern`` (#1113)
Bug fixes
+++++++++
Numerous bugs were fixed while working on Combinatorica V0.9 and CellsToTeX.
#. ``Sum`` involving numeric integer bounds involving Mathics functions fixed.
#. ``Equal`` ``UnEqual`` testing on Strings (#1128).
Document updates
++++++++++++++++
#. Start a readthedocs `Developer Guide <https://mathics-development-guide.reandthedocs.io/en/latest/>`_
Enhancements and bug fixes:
+++++++++++++++++++++++++++
#. Fix evaluation timeouts
#. ``Sum``'s lower and upper bounds can now be Mathics expressions
Miscellanea
+++++++++++
#. Enlarge the set of ``gries_schneider`` tests
#. Improve the way builtins modules are loaded at initialization time (#1138).
Future
++++++
#. We are in the process of splitting out graphics renderers, notably for matplotlib. See `pymathics-matplotlib <https://github.com/Mathics3/pymathics-matplotlib>`_.
#. Work is also being done on asymptote. See `PR #1145 <https://github.com/mathics/Mathics/pull/1145>`_.
#. Makeboxes is being decoupled from a renderer. See `PR #1140 <https://github.com/mathics/Mathics/pull/1140>`_.
#. Inline SVG will be supported (right now SVG is binary).
#. Better support integrating Unicode in output (such as for Rule arrows) is in the works. These properties will be in the scanner package.
#. A method option ("mpmath", "sympy", or "numpy") will be added to the ``N[]``. See `PR #1144 <https://github.com/mathics/Mathics/pull/1144>`_.
----
1.1.1
----
This may be the last update before some major refactoring and interface changing occurs.
In a future 2.0.0 release, Django will no longer be bundled here. See `mathics-django <https://github.com/Mathics3/mathics-django>` for the unbundled replacement.
Some changes were made to support `Pymathics Graph <https://github.com/Mathics3/pymathics-graph>`_, a new graph package bundled separately, and to support the ability for front-ends to handle rendering on their own. Note that currently this doesn't integrate well into the Django interface, although it works well in ``mathicsscript``.
Package updates
+++++++++++++++
#. SymPy 1.7.1
Mathics Packages added:
#. ``DiscreteMath`CombinatoricaV0.9`` (preferred) and
``DiscreteMath`CombinatoricaV0.6``.
Both of these correspond to Steven Skiena's *older* book: *Implementing Discrete Mathematics: Combinatorics and Graph Theory*.
If you have a package that you would like included in the distribution, and it works with Mathics, please contact us.
Rubi may appear in a future release, possibly in a year or so. Any help to make this happen sooner is appreciated.
New builtins
++++++++++++
#. ``StirlingS1``, ``StirlingS2`` (not all WL variations handled)
#. ``MapAt`` (not all WL variations handled)
#. ``PythonForm``, ``SympyForm``: not in WL.
Will show a crude translation to SymPy or Python.
Expect more and better translation later
#. ``Throw`` and ``Catch``
#. ``With``
#. ``FileNameTake``
Enhancements and bug fixes
++++++++++++++++++++++++++
#. Workaround for ``Compile`` so it accepts functions ##1026
#. Add ``Trace`` option to ``Get``. ``Get["fn", Trace->True]`` will show lines as they are read
#. Convert to/from Boolean types properly in ``from_python``, ``to_python``. Previously they were 0 and 1
#. Extend ``DeleteCases`` to accept a levelspec parameter
#. Set ``Evaluation#exc_result`` to capture ``Aborted``, ``Timeout``, ``Overflow1``, etc.
#. ``ImageData`` changed to get bits {0,1}, not booleans as previously
#. Add tokenizer symbols for ``<->`` and ``->`` and the Unicode versions of those
#. Small corrections to ``Needs``, e.g check if already loaded, correct a typo, etc.
#. ``System`$InputFileName`` is now set inside ``Needs`` and ``Get``
#. Install shell scripts ``dmathicserver``, ``dmathicsscript``, and ``dmathics`` to simplify running docker
#. Adjust ``$InputFileName`` inside ``Get`` and ``Needs``
#. Support for ``All`` as a ``Part`` specification
#. Fix ``BeginPackage``
#. Improving support for ``OptionValue``. Now it supports list of Options
#. Adding support in ``from_python()`` to convert dictionaries in list of rules
#. Fix ``OptionsPattern`` associated symbols
----
1.1.0
----
So we can get onto PyPI, the PyPI install name has changed from Mathics to Mathics3.
Enhancements and bug fixes
++++++++++++++++++++++++++
#. Add Symbolic Comparisons. PR #1000
#. Support for externally PyPI-packagable builtin modules - PyMathics
#. ``SetDirectory`` fixes. PR #994
#. Catch ```PatternError`` Exceptions
#. Fix formatting of ``..`` and ``...`` (``RepeatAll``)
#. Tokenization of ``\.`` without a following space (``ReplaceAll``). Issue #992.