[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: mathlib
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 6 Apr 2014 08:35:23 +0200
2014-04-03 22:35 GMT+02:00 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
> We are considering removing some functions from the standard math lib,
> either because we think few people use them or because they are trivially
> implemented without the library. The current list is this:
>
> - sinh, cosh, tanh: (They are quite specialized, on par with several
> other functions offered by external libraries, such as lhf's mathlibx.)
>
> - deg, rad, pow: trivially done without the library.
>
> Comments?
>
> -- Roberto
The discussion has started to digress a little (recent contributions deal mainly
wth math.rand) and the deg, rad, pow question is not as close to my heart as
the sinh, cosh, tanh question.
So this may be a good time to summarize the positions taken on that, and
classify them into yes, no and don't mind. I have omitted secondary comments
(i.e. criticism of someone else's reasons) and kept for each poster an actual
quote that seemed to be most pertinent. The count is 8 for removing, 12 for
retaining, 2 neutral. Of course, reasons are more important than mere votes,
which is why my summary is attached as a text file.
In one or two cases, although someone made useful contributions to the
discussion, I was not able to discern a position taken, and have therefore
omitted the poster from the classification.
Dirk
A. Yes, remove them
-------------------
1. Coda Highland chighland@gmail.com
I can get behind this; hyperbolic geometry isn't particularly common.
2. Ryan Pusztai rpusztai@gmail.com
Probably can be removed.
3. Hao Wu wuhao.wise@gmail.com
+1.
4. Michel Martens soveran@gmail.com
All of them can go, in my opinion. By the way, I love this mindset.
5. Craig Barnes <craigbarnes85@gmail.com>
Given the Lua development model, it seems fair to shift some of that
burden to external libraries, especially for mostly redundant or
specialized functions.
6. Milind Gupta <milind.gupta@gmail.com>
Removing them I think makes sense and works with the Lua policy of
providing the tools to do things not directing the way you do them
or not giving you the tools which you may not need most of the time
like classes etc.
7. Jay Carlson <nop@nop.com>
these functions should be included in Penlight
8. Michael Richter <ttmrichter@gmail.com>
It's refreshing to see Roberto talking about what to REMOVE from
the next version of Lua instead of the feeping creaturism that
dominates most language development.
B. No, don't remove them
------------------------
1. Gabriel Duarte confusosk8@gmail.com
should remain, even if they're easy to implement.
2. Ross Bencina <rossb-lists@audiomulch.com>
They are useful for signal processing (computing coefficients for
filters, or non-linear clipping curves). This has utility when using
Lua for control applications and possibly for dynamic simulations in
games too. ... My take on it is that math should support all the
special functions provided by ANSI/ISO C.
3. Tim Channon tc@gpsl.net
I use all of them.
4. Coroutines <coroutines@gmail.com>
the argument is some of these math functions are trivial (if not
rarely used), and my counter-argument is that the ones that build
on others should remain if their triviality isn't known off the top
of the common persons' head.
5. Sven Olsen <sven2718@gmail.com>
These come up frequently enough in animation and graphics contexts
that I'd vote to keep them around. Analytic solutions to
differential equations are useful when simulating motion; and they
often involve hyperbolic trig functions. (Tanh, for example, is the
right behavior for the speed of an object falling in the presence of
air resistance. It's also a relatively nice sigmoidal function, and
those are handy in all sorts of data smoothing tricks.)
6. Dirk Laurie <dirk.laurie@gmail.com>
Few people, maybe, but the sort of people that I hope you wish to
retain as Lua users. If you remove them, you may as well say:
If you thought of using Lua for serious scientific work, forget it.
7. Victor Bombi <sonoro@telefonica.net>
I use them all and they are already there so: Which is the gain
removing them?
8. steve donovan <steve.j.donovan@gmail.com>
Very little will be saved, which makes me think that these chaps may
stay, since they are no burden.
9. Paul Baker paulbaker8@gmail.com
Even if only a few people use these functions, it seems that they
could be seriously inconvenienced if the functions were removed. On
the other hand, those of us who do not use the functions are not
really inconvenienced by their presence
10. Peter Colberg <peter@colberg.org>
The scientists among the Lua users would be grateful to you for
keeping at least the existing mathematical functions in the Lua
standard library, even if (for them) they are trivial to implement.
11. Jeremy Ong <jeremycong@gmail.com>
The hyperbolic trig functions are easily implementable in terms of
the exponential but I think they are still useful.
12. Ralph Hempel <rhempel@bmts.com>
I feel strongly that the standard math functions that already exist
in mathlib should stay there. ... I even checked back to make sure
Roberto's original email was not dated April 1 :-) So my vote is
leave it alone.
C. Neutral
----------
1. Joseph Manning <manning@cs.ucc.ie>
I have never had a need for 'sinh', 'cosh', 'tanh', so although
I would not miss them from the 'math' library, perhaps others might.
2. Andrew Starks <andrew.starks@trms.com>
I wouldn't miss it, but I don't feel any pain from them existing,
either.