all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* as for Calc and the math library
@ 2024-08-10 22:48 Emanuel Berg
  2024-08-11  4:58 ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Emanuel Berg @ 2024-08-10 22:48 UTC (permalink / raw)
  To: emacs-devel

;; __________________________________________________________
;; ``````````````````````````````````````````````````````````
;; |                         
;; 3                        CCUG-ML                        60
;;                                                          |
;; __________________________________________________________
;; `-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-`-

I have now been using the Calc library a bit!

Not a lot. Very little.

But I can already say about Calc that it is very good.
The code is good as well and as for math it is at a very
high level.

But it it is too complicated and the entry level is too high.
It is advanced math but also an advanced program.

We still need a math library that covers like up to the
introductory courses at the university. This should be
accessible with the familiar Elisp syntax.

Every function in math from school and again, maybe including
the introductory courses at the university, should be
available with Emacs notation.

So now, we don't have

(** 4 1)
( ^ 4 1)

(We do have `expt' but notation is important and should be,
for a math library, using "their" symbols and conventions,
not ours, as much as possible.)

We don't have

(defun distance-point (min max)
  (+ min (/ (- max min) 2.0)) )

Or from Logic, we don't have `nand' i.e. (not (and a b)). [last]

All that we don't have, or we do, as Calc can do it - easily.

Okay, so we don't need a new generic library. We need
a generic library which is a complement to all the basic
stuff, we don't have readily available as for now.

Out of respect for Calc there is no need to move it, now need
for that and no practical reason to.

However the new stuff must be totally transparent. When some
dude comes home from school/university and wants to try some
half-basic stuff, this should work instantly using the Elisp
he is used to. It should be "Oh, cool, Emacs has it!" And for
a long time, it should be like that for him.

If at some much later point, he (or she) moves on to "real
Calc", then he is so good we don't have to worry about
him anymore.

So we should have a CCUG-ML project: the Generic Complementary
Math Library Using Calc.

Yes, it would be to some small extent *using* Calc but to
a huge extent it would just be an interface. But 100%
transparent, so one can use Elisp and the common math
notation people know from school.

No long prefixes, no special notation, nothing, as I now know
there is _a lot_ of in Calc. People should be allowed to use
the basics of Calc without knowing it!

It should just be just like when I looked for `**' and `nand',
only this time, they should exist, thru the interface,
using Calc.

IMO!

Here is nand BTW:

(defun nand (&rest conditions)
  (when (member nil conditions)
    t) )

;; (nand)           ; nil
;; (nand 1 2 3)     ; nil
;; (nand nil)       ; t
;; (nand 1 2 nil 3) ; t

;; (not (and))           ; nil
;; (not (and 1 2 3))     ; nil
;; (not (and nil))       ; t
;; (not (and 1 2 nil 3)) ; t

And here is some Calc:

(require 'calc-ext)
(require 'cl-lib)

;; (infx "0 < 10")

(defun infx (str)
  (let* ((exp (math-read-expr str))
         (fun (car exp))
         (new (cons (intern (caar (cl-member fun math-expr-opers :key #'cadr :test #'equal)))
                    (cdr exp))))
    (apply (car new) (cdr new))))

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2024-08-18 19:05 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 22:48 as for Calc and the math library Emanuel Berg
2024-08-11  4:58 ` Eli Zaretskii
2024-08-11 16:45   ` Ihor Radchenko
2024-08-11 16:55     ` Christopher Dimech
2024-08-11 17:05     ` Emanuel Berg
2024-08-11 17:59     ` Eli Zaretskii
2024-08-11 18:17       ` Christopher Dimech
2024-08-11 18:32         ` Eli Zaretskii
2024-08-11 19:53           ` Christopher Dimech
2024-08-11 18:27       ` Ihor Radchenko
2024-08-11 18:38         ` Emanuel Berg
2024-08-12  6:28           ` New Emacs features via Google Summer of Code (or other similar stipend schemes) (was: as for Calc and the math library) Ihor Radchenko
2024-08-12 11:09             ` Eli Zaretskii
2024-08-12 12:10               ` New Emacs features via Google Summer of Code (or other similar stipend schemes) Joel Reicher
2024-08-12 18:59                 ` Ihor Radchenko
2024-08-12 22:28                   ` Pedro
2024-08-14 10:07                     ` Ihor Radchenko
2024-08-15 11:44                     ` Ihor Radchenko
2024-08-12 19:17               ` New Emacs features via Google Summer of Code (or other similar stipend schemes) (was: as for Calc and the math library) Ihor Radchenko
2024-08-13  8:12                 ` New Emacs features via Google Summer of Code (or other similar stipend schemes) Andrea Corallo
2024-08-18 11:48                   ` Ihor Radchenko
2024-08-18 12:35                     ` Eli Zaretskii
2024-08-18 12:52                       ` Ihor Radchenko
2024-08-18 13:39                         ` Eli Zaretskii
2024-08-18 13:56                           ` RTF import/export emacs (was: New Emacs features via Google Summer of Code (or other similar stipend schemes)) Ihor Radchenko
2024-08-18 14:14                             ` Eli Zaretskii
2024-08-18 14:35                               ` Ihor Radchenko
2024-08-18 14:38                                 ` Eli Zaretskii
2024-08-18 17:37                                 ` Jim Porter
2024-08-18 18:16                                   ` Eli Zaretskii
2024-08-18 18:38                                     ` Jim Porter
2024-08-18 19:05                                       ` tomas
2024-08-13 11:02                 ` New Emacs features via Google Summer of Code (or other similar stipend schemes) (was: as for Calc and the math library) Eli Zaretskii
2024-08-18 11:09                   ` Ihor Radchenko
2024-08-18 11:25                     ` Eli Zaretskii
2024-08-18 11:33                     ` Stefan Kangas
2024-08-18 12:47                       ` Ihor Radchenko
2024-08-11 18:52         ` as for Calc and the math library Eli Zaretskii
2024-08-11 19:13           ` Ihor Radchenko
2024-08-12  2:24             ` Eli Zaretskii
2024-08-11 21:50           ` Christopher Dimech

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.