Groups 140 of 99+ julia-users › Can I somehow get Julia without standard library? 16 posts by 8 authors Dmitry Jun 6 I tried to remove ".jl" library files from Julia installation directory, but it did not help. Then I tried to remove "libjulia.dll" but it does not want to run without this file. Avik Sengupta Jun 6 Julia is pretty useless without its standard library. On Monday, 6 June 2016 14:42:02 UTC+1, Dmitry wrote: I tried to remove ".jl" library files from Julia installation directory, but it did not help. Then I tried to remove "libjulia.dll" but it does not want to run without this file. Stefan Karpinski Jun 6 Re: [julia-users] Re: Can I somehow get Julia without standard library? Really useless – it doesn't know about integers or how add them, for example. If you want to trim down the standard library, you can try editing out parts of base/sysimg.jl and rebuilding, but that's kind of a tricky process. - show quoted text - Nils Gudat Jun 7 Re: [julia-users] Re: Can I somehow get Julia without standard library? Don't know whether this is something you'd be interested in, but Scott Jones has worked on building a Julia "lite" version with fewer components: https://groups.google.com/forum/?fromgroups#!searchin/julia-users/raspberry$20pi/julia-users/WStpLtrKiFA/JhiAbc-vAwAJ Scott Jones Jun 7 Re: [julia-users] Re: Can I somehow get Julia without standard library? Thanks for mentioning it! There've been so many changes recently in master lately, that I've let it get a bit behind, I'll try to get it back to keeping pace with v0.5. I've tried to make it so that you can select which parts of Julia that you want in (like Sparse arrays, LinAlg, BigInt, BigFloat, Complex, Rational, with build flags in Make.user) One of the hardest parts has been that a lot of the documentation is still stored in docs/helpdb/Base.jl, and haven't yet been moved to the files where the functions actually are defined. The other problem is similar, there are a lot of unit tests where it would be much easier to deal with if the tests were in files corresponding to the source files in Base (last summer, some of the tests did get reorganized that way, which helped) On Tuesday, June 7, 2016 at 4:57:38 AM UTC-4, Nils Gudat wrote: Don't know whether this is something you'd be interested in, but Scott Jones has worked on building a Julia "lite" version with fewer components: https://groups.google.com/forum/?fromgroups#!searchin/julia-users/raspberry$20pi/julia-users/WStpLtrKiFA/JhiAbc-vAwAJ Páll Haraldsson Jun 8 Re: [julia-users] Re: Can I somehow get Julia without standard library? On Monday, June 6, 2016 at 5:17:16 PM UTC, Stefan Karpinski wrote: Really useless – it doesn't know about integers or how add them, for example. If you want to trim down the standard library, you can try editing out parts of base/sysimg.jl and rebuilding, but that's kind of a tricky process. Dmitry asked for "somehow", and while Karpinski is of course correct, I think Dmitry wanted to get rid of the files, not the "standard library" per se. I think the point of Intel's Julia2C (ParallelAccelerator.jl does similar things to C++, but not meant to translate all your code) was to generate C code so you do not have to distribute your source code. [Usually you would compile that C code and distribute the binary, not C source code. This would not be done to gain speed, unlike ParallelAccelerator.jl, that compiles to C++, but could do else later, it's just an implementation detail.] I also think the compilation to C applies to Julia's standard library, the part that is Julia source code (there might be other ways do do this already..). [Parts of Julia source code will be in C/C++ and will be in the binary libjulia.dll that I think you could never avoid. Some part of the code is a runtime, not a "standard library", while other parts of it are, such as That binary] See also the AOT Julia article for gory details and exceptions. Is Julia2C working? I've never tried it. I believe it wasn't fully functional/a demo, [and even got broken by later versions of Julia, maybe Julia2C has been kept in sync.] -- Palli. On Mon, Jun 6, 2016 at 12:43 PM, Avik Sengupta wrote: Julia is pretty useless without its standard library. On Monday, 6 June 2016 14:42:02 UTC+1, Dmitry wrote: I tried to remove ".jl" library files from Julia installation directory, but it did not help. Then I tried to remove "libjulia.dll" but it does not want to run without this file. Stefan Karpinski Jun 8 Re: [julia-users] Re: Can I somehow get Julia without standard library? You don't need .jl files to run Julia once it's built, you just need the julia binary and various dynamic libraries. - show quoted text - Dmitry Jun 14 Re: [julia-users] Re: Can I somehow get Julia without standard library? That's what I was afraid of. It comes that Julia is very strongly tied to its library. I was hoping that it would be like with most other languages, for example C++. I mean C++ know about basic types and how to work with them (and much more) even without the standard library. понедельник, 6 июня 2016 г., 21:17:16 UTC+4 пользователь Stefan Karpinski написал: - show quoted text - Tamas Papp Jun 14 Re: [julia-users] Re: Can I somehow get Julia without standard library? Look at it this way: Julia is so powerful that many language features can be implemented natively, instead of using primitives. On Tue, Jun 14 2016, Dmitry wrote: > That's what I was afraid of. It comes that Julia is very strongly tied to > its library. I was hoping that it would be like with most other languages, > for example C++. I mean C++ know about basic types and how to work with > them (and much more) even without the standard library. > > понедельник, 6 июня 2016 г., 21:17:16 UTC+4 пользователь Stefan Karpinski > написал: >> >> Really useless – it doesn't know about integers or how add them, for >> example. If you want to trim down the standard library, you can try editing >> out parts of base/sysimg.jl and rebuilding, but that's kind of a tricky >> process. >> >> On Mon, Jun 6, 2016 at 12:43 PM, Avik Sengupta in Make.user (where can be the following: BIGINT, BIGFLT, DSP, DATES, STATS, THREADS, PROFILER, MMAP, PKG, FLOAT16, LINALG, SPARSE, COMPLEX, RATIONAL The following I normally leave enabled, but can be turned off to make a Julia without a REPL, that's good for running scripts: PARALLEL, DOCS, HELP, REPL, TEST Enabling BUILD_FULL will enable everything by default (but then you can still explicitly disable them). What I haven't done, which I hope will be worked on for Julia v0.6, is to have these parts of the current standard library either moved out to packages, so they could be reloaded with using, or to be loaded more on a "as-needed" basis, from modules that are already compiled along with the base language, but left in separate .ji files. along with the sys library. - show quoted text - Chris Rackauckas Jun 14 Re: [julia-users] Re: Can I somehow get Julia without standard library? I agree that more should be backed out to packages. Even as a math person who would probably never Julia without linear algebra, I think that some of the linear algebra should move out to a JuliaMath package, and then part of the standard startup script should be to "using LinAlg". That way if someone is doing a lite install and doesn't need it, they don't have to have it. From what I know about the way that namespaces work in Julia, there would be no difference in the end: *, \, etc. would all work how I'd expect. So I think a few things like that (sparse matrices, parallelism?) should move out to packages which, in a normal build, are automatically installed and the setup script automatically imports them when Julia is started. At least from my understanding of how Julia works, that doesn't seem too difficult. But maybe someone could chime in on why it would be almost impossible, or if it's on the horizon? - show quoted text - Scott Jones Jun 14 Re: [julia-users] Re: Can I somehow get Julia without standard library? I think I've shown that it isn't too difficult (I started my Julia-lite branch originally just a couple months after learning Julia), it's mostly some tedious work, and most people are concentrating on other (very important) stuff. I pushed to make this because I was interested in having things work better without so much overhead on things like my Raspberry Pi 2 Model B, later my Raspberry Pi 3, and now my Jetson TX1. Also, I wanted a faster loading Julia for scripts (as now I prefer to write my scripts in Julia, instead of having to use Python or bash). - show quoted text - Dmitry Jun 14 Re: [julia-users] Re: Can I somehow get Julia without standard library? I want to change the behaviour and implementation of some language features. In other words, I need my own little standard library that most accurately meets my needs. Of course I can use high level wrappers around the existing library functions, but this will cause a significant negative impact on the performance, that is why I want to implement this functionality on top of the lowest level. Generally speaking, to do this I do not need to remove the standard library, but I think it might be the most convenient way to "feel" that lowest level. If you say that Julia is so flexible that even primitive types and operations are implemented in the standard library then I want to take advantage of this and implement my own primitives. вторник, 14 июня 2016 г., 17:01:44 UTC+3 пользователь Stefan Karpinski написал: Tamas is dead on – see the intro of https://www.youtube.com/watch?v=dK3zRXhrFZY for an explanation. Being able to define even the most basis types in Julia itself is one of the most powerful features of the language. Let's back up a little here. What are you trying to accomplish? Stefan Karpinski Jun 14 Re: [julia-users] Re: Can I somehow get Julia without standard library? Of course I can use high level wrappers around the existing library functions, but this will cause a significant negative impact on the performance, that is why I want to implement this functionality on top of the lowest level. Why would having the standard library present make what you want to implement slower? "High level wrappers" are not necessarily any slower. There's nothing preventing you from making your own high-performance primitives without ditching Julia's standard library. There are tons of examples out there of user-defined types in Julia code that are just as efficient as the built-in ones: https://github.com/JeffBezanson/FixedPointNumbers.jl https://github.com/JuliaGraphics/ColorTypes.jl https://github.com/JuliaDiff/DualNumbers.jl https://github.com/dpsanders/ValidatedNumerics.jl For a simple, self-contained example, see examples/modint.jl. - show quoted text -