Comments (9)
Almost all proposed excisions are Base => package, not Base => nowhere. We definitely don't expect or want users to roll their own trig implementations.
This case could go either way, but I lean toward putting them in a library.
from julia.
A separate package just for two functions seems absurd. When prioritizing removal of items from Base
, start with the largest items.
Moreover, code which resides in Base
can be construed to be core functionality of a language. Unsurprisingly, Rust includes equivalents: f64::to_degrees, f64::to_radians.
Or, another way to take on it:
If we apply the proposed logic, then abs2
, abs
, nor
, nand
, etc. -- a whole world of "easy" functions disappear from Base
. For such a radical change, serious motivation must be found.
from julia.
@aplavin where else can that go in a package?
Not sure, what exactly are you asking about?
As for dropping anything that Base doesn't need itself: yeah, would be nice, but with consistency. I don't see a fundamental difference between deg2rad, sin, sind, sincos in this regard. And also stuff like LogRange (it's going to be included into Base soon). And many more stuff, potentially.
from julia.
I agree, but why single those out? What about sin, cos, floating-point in general... Array (as opposed to Memory), OpenBLAS... so why single those out? They are small and the least of our problems?
from julia.
sin/cos -> yes. They should be removed from Base, though it's a harder sell because more people use them.
floating-point in general -> no. No plausible, nontrivial program doesn't depend on floating point addition/multiplication. It's probably not worth the effort to excise it. If floating point math becomes less pervasive or approaches to basic floating point arithmetic become more diverse then maybe reconsider.
Array -> yes, though that does require changing the default return type of collect, list comprehensions, etc to Memory.
OpenBLAS -> absolutely!
so why single those out?
I single these two out because they are easy.
from julia.
I don't think we can drop them, annoying people (until 2.0), breaking change but neither should we expand it. @aplavin where else can that go in a package? I though/still think those are trivial functions on just Float64 (and smaller, and BigFloat...?! that I want to get rid of anyway). They are hopefully not costly in the sysimage, I might want them out o if it, just not Base. {Floats were just an impossible example, just not needed by Base itself, except possibly few divisions? Unlike rad2deg and deg2rad, sin/cos are actually non-trivial, unless done with assembly instructions, but I believe not done that way because of accuracy; also neither on matrices, I want LinearAlgebra out too, NOT needed for Julia itself... I just think we should start with the big stuff.]
I'm all for getting this all out and the small stuff with ENV var (not yet by default), but my suggestion was closed:
#50807
from julia.
Is the proposal to move rad2deg
/deg2rad
from Base to another package (like it happened with, e.g., the functions that are now in SpecialFunctions.jl, or the whole DelimitedFiles.jl), or to remove them without providing an alternative implementation elsewhere?
I would be fine implementing rad2deg
/deg2rad
myself (after all, Base provides an obvious implementation). On the contrary, trigonometric functions are non-trivial, and IMHO should be provided from "official" sources (if not from Base, then from a package under JuliaMath).
from julia.
A separate package just for two functions seems absurd
Agreed. This would live with sin
, cos
, etc in e.g. Math
"easy" functions
These functions are surprisingly nontrivial (e.g. #45947)
from julia.
"easy" was from:
I single these two out because they are easy.
from julia.
Related Issues (20)
- pivoted cholesky(I(2)) not implemented
- Bounds check inconsistency in `keepat!`/`deleteat!`
- Unreachable reached and Illegal Instruction in v1.10+ HOT 3
- `in(::Missing, ::Any)` inconsistency
- Overallocation of arrays now seems to persist through precompile serialization on 1.11+ HOT 7
- type application doesn't infer as consistent HOT 1
- Can't compute eigenvalues of Hermitian Diagonal matrix for generic types
- Heap snapshot does not seem to work anymore on 1.11 (in chrome profile loader) HOT 3
- `@inbounds` overrides `val` variable in macros. Wrong usage of `local` HOT 4
- Unwrapped Union Alls can't be added more than two times to a vector with [] syntax. Reproducible crash when using these vectors.
- Basic use of StaticArrays and `begin ... end` leads to GC error (probable corruption) HOT 6
- New `copystring` function HOT 5
- make `Base.@assume_effects :nothrow` mark throwing expressions as `unreachable` HOT 4
- Some uses of `@__DIR__` should be relocatable. HOT 4
- asr versus lsr HOT 1
- With the memory changes the UB surface of String(Vector{UInt8}) is larger
- Views on arrays should become views on a slice of the Memory that was accssible at view construction HOT 1
- a compiler flag to ignore all uses of `@assume_effects`?
- Race Condition: `Test.collect_test_logs()` is not thread safe.
- Installation of DiffEqBase fails when not connected to power HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from julia.