-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is a Julia standard library? #27197
Comments
Note that not including packages in the |
I've largely been thinking along the same lines, @fredrikekre. Nice writeup. I was imagining that we would ship a stdlib of the "standard versions of standard libraries" but that would only serve as a depot that's always available if you want it and otherwise not be special at all. The biggest technical challenges are about overcoming load time issues and dependencies from |
Much of what used to be available by default, like |
The plan all along (at least in my mind) has been for stdlibs to be as much like normal packages as possible. Past discussions have mentioned how, to a large extent, Even if the stdlibs are all moved to separate repos (which I agree has many advantages), there is still value in identifying a certain set of "recommended" or "default" packages. Installing a package is easy, but knowing which packages to install is not. And clearly, when you first build or install julia, you should not have to manually do 20
Agreed, but (as I constantly feel the need to point out) I'm not particularly against "type piracy" in any case. |
I agree stdlib packages should be installed by default, even if they are regular packages. Also, having the docs included in the Julia manual is useful. Even if it may not be very practical when you know exactly the name of the module/package you're looking for, it's good for users who don't know the details of where a feature lives. It allows the Julia manual to cover features that everybody expects to find in a modern language. |
I should point out that what is an stdlib package is a bit arbitrary and mostly by historical accident. One can easily imagine removing a few things and perhaps even adding some things. |
@martinholters I think the fact that |
I agree with Viral --- while I think there should be some set of default packages, that doesn't mean the exact set of things in |
Would be great to have a customizable image based on optional combinations from a curated registry. |
Nothing stops you from building your own image today. People often do it with |
Nice! Might wait for a blog post on how to do it though, but it is a great feature to have... Building the images for R at work was a hassle (i.e., and curated packages for Docker containers). |
The desire for a smaller sysimage came up for embedded devices, see discourse thread. Not primarily because of the required storage, but because of the long load times (to read the sysimage from disk). |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
What is a Julia standard library?
I have been thinking on this quite a lot recently, and wanted to gather some thoughts. I also feel like this is a question we have sidestepped a bit, and I think it would be nice to collect some ideas about the way forward for Julia's
stdlib
. In particular I think we should have a good definition of what astdlib
is, and what it means to be astdlib
. What follows are my thoughts on the situation, and I hope you all have some input, and hopefully we can formalize this a bit more.Should
stdlib
s be regular packages?While thinking about this I have come to the following conclusion;
stdlib
s would benefit a lot by trying to behave more like "regular" packages as much as possible. Why? It is a huge freedom to be a regular package. Packages in Julia work extremely well, and most of the modules inJuliaLang/julia/stdlib
would be perfectly fine as packages. Here are some advantages of being a package (over the currentJuliaLang/julia/stdlib
style):JuliaLang/julia
. It is also easier to get an overview of the package source code, since it is well contained.stdlib
docs are hidden deep within the Julia base manual (and TBH impossible to find).With
Pkg3
you will also have complete control over your environment, which IMO solves almost all problems with being a package.Why do we need
stdlib
s?So, then you may ask, why do we need something called a
stdlib
if packages are so great? Here are some reasons:stdlib
s should be packages that are officially endorsed, supported and promoted by the JuliaLang organization. This gives credibility to the package and you should be able to trust that the package contains high quality code that is well tested and well documented.Actually, that is the only reason I came up with, but it is an important one. What does it then mean to be officially supported by the organization?
stdlib
s are promoted, and linked to, from the base manual. We also list them on e.g. the homepage as the goto implementations and/or starting points for the different domains.stdlib
s are given extra consideration when changing things in the base language. I don't think we should necessarily runstdlib
tests as part of base Julia CI, but perhaps keep an extra eye on the nightly builds. As with regular packages, I don't think you should expectstdlib
s to work on Julia master at all times.stdlib
s have at least one active official maintainer.Where should a
stdlib
live?I think that
JuliaLang/julia/stdlib
is just a stopover for the modules that are there now. Eventually we need to move them out of the Julia repo in order to develop them more freely, and to simplify making new releases. We are already pushing the CI limit on the Julia repo, and moving them out would cut CI times by a lot (looking at youLinearAlgebra
). In their own repos thestdlib
s are better contained, and it will be easier to get an overview of the source. Developing astdlib
will also be much more pleasant when you don't have to build all of julia, and when you don't have to wait for 2 hours to hear back from CI.Should we have a
JuliaStdlib
GitHub organization to gather thestdlib
s? I don't think so. For example, there have been talks about makingHTTP.jl
astdlib
(whatever that means, trying to answer that in this post...). Should we then pull outHTTP.jl
from the JuliaWeb organization? I think that would be a shame;HTTP.jl
fits well in aJuliaWeb
organization, and there is no reason to break that up. Likewise it would be a shame to break outStatsBase
fromJuliaStats
.There are some
stdlib
s that perhaps don't fit well in any organization (for exampleTest
,Profile
,DelimitedFiles
etc.), and for those we can have a misc JuliaStdlib organization to host them.After all, for end users, it does not really matter where the source is hosted and thus I don't think we have to gather them all. Users will read the manual, see that there is a
stdlib
calledTest
and thenpkg> add Test
without a worry in the world about where the source code lives.How do you install a
stdlib
?I don't think a
stdlib
needs to be installed by default -- it is very simple topkg> add Package
when you need it.Pkg3
makes installation much more pleasant, andpkg> add Package
no longer grants you a coffee break, so having to add thestdlib
s should not be an annoyance. One thing that is nice right now is that thestdlib
s are included in the sysimg, which results in faster load times. At the moment this is needed for some of them, in particular LinearAlgebra andPkg3
are pretty slow otherwise, but who cares if you can load theTest
module instantly or not?Hopefully we can work on decreasing the load times of packages in the future. We can also have a convenient way to add packages to the sysimg, and regenerate it. I initially thought that this option should only be for
stdlib
s, since they might not update as regularly as regular packages, but then, why shouldn't you be able to do that for any package?The way forward
For Julia
v0.7
/v1.0
I think we should just leave thestdlib
s inJuliaLang/julia/stdlib
where they are, and state that they might not be included by default inv1.1
, but they will still be supported and installable etc in future Julia versions. Then whenv1.0
is out the window we simply move them all out to their own repos and reap the benefits.Addendum
Furthermore, I think
stdlib
s should be allowed to be pirates.TL;DR
stdlibs
would benefit a lot from being more like regular packages and should live in their own repos.The text was updated successfully, but these errors were encountered: