Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
markkitti
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
91.
▲
by
markkitti
4y ago
Julia 1.9, now in beta, implements native code caching. Precompiling a Julia package now creates a native shared library, a ".so", ".dylib", or ".dll" file. For some packages, this lowers load time considerabl
92.
▲
by
markkitti
4y ago
This becomes an important part of optimizing Julia code. There is some tooling for this. Below, identity is a type stable function because we know that an Int64 argument results in a Int64 output. The macro code_warntype reveals the type an
93.
▲
by
markkitti
4y ago
Multiple dispatch is not unique to Julia, but it is a large part of the language. It helps 3rd parties extend rather than duplicate interfaces. There a few recordings of the "Unreasonable effectiveness of multiple dispatch" talk t
94.
▲
by
markkitti
4y ago
Octave is nice, but I never found it very compelling as an open source but lesser version of MATLAB. In part, this is because I have been privileged to have someone else cover the costs for me. Numpy and Julia are alternative open source pr
95.
▲
by
markkitti
4y ago
We bring up these posts every time Julia is mentioned on HN. I've become reticent to respond to these comments. It seems like any response that does not sound like it came from a customer service representative, e.g. "Thank you fo
96.
▲
by
markkitti
4y ago
What is the HN type audience? HN is a news feed run by Ycombinator, a "startup accelerator". While many people around here have deep technical expertise, given the name "Hacker News", I always thought the main purpose wa
97.
▲
by
markkitti
4y ago
I appreciate that the Julia base install and standard library includes dependency management and that compilation happens on the fly. The entire experience involves Julia itself modifying a few TOML files. It really helps when almost everyo
98.
▲
by
markkitti
4y ago
> My example of this is the Colors.jl package. Images, rather than being 3D arrays of floats/ints, instead become 2D arrays of RGB/HSV. But you can't do any arithmetic on RGB/HSV values, you need ColorVectorSpace.jl f
99.
▲
by
markkitti
4y ago
Try `println(1)`
100.
▲
by
markkitti
4y ago
It's amazing how adaptive Julia is to incorporating new technologies.
101.
▲
by
markkitti
4y ago
You could use Julia in an interpreted mode (or a compiler with low optimization) and then statically compile it for production. The JIT involved is really a static compiler that has been adapted for use as a JIT compiler: https://
102.
▲
by
markkitti
4y ago
If you really wanted to, you could run PackageCompiler.jl as part of an edit-compile loop: https://julialang.github.io/PackageCompiler.jl/stable/exampl...
103.
▲
by
markkitti
4y ago
If the function signature said `Array` rather than `AbstractArray`, then this code would have been fine. `Array` indexing starts at `1`. ``` julia> function f(A::Array) println(A[1:length(A)]) end f (generic function wi
104.
▲
by
markkitti
4y ago
> And Julia provides no way of specifying the behaviour of abstract types. I'm not sure if "no way" is accurate. There are interfaces and one could use traits. As cited above, we could use `eachindex` or `CartesianIndices`
105.
▲
by
markkitti
4y ago
For some of these polynomials such as Fourier polynomials, it is natural to think about negative subscripts from a pure mathematical perspective. While these can mapped into non-negative integers, it is often intuitive to use the "nega
106.
▲
by
markkitti
4y ago
The question here is are these merely just bugs or is there something about the language that makes Julia error prone? There is potential in using Julia's type inference engine to check for correctness. For example see JET.jl. "JE
107.
▲
by
markkitti
4y ago
Yes, and it is a perfectly fine feature when applied correctly. It would be incorrect to assume that an `AbstractArray` starts at `1` or `0` which is why the updated example now correctly uses `eachindex`: https://docs.julialang.
108.
▲
by
markkitti
4y ago
Julia has some excellent interactive front ends. For example, take a look at the reactive Julia notebook, Pluto.jl: https://plutojl.org/plutocon2021
109.
▲
by
markkitti
5y ago
$ julia --lisp ; _ ; |_ _ _ |_ _ | . _ _ ; | (-||||_(_)|__|_)|_) ;-------------------|------------------------------------ ---------------------- > (+ 1 2) 3 > (exit) https://github.com/
110.
▲
by
markkitti
6y ago
The last time I talked to him he was trying to write his own discrete Fourier transform so he could avoid shifting around his matrix. https://github.com/JuliaOptics/Fourier.jl
111.
▲
by
markkitti
6y ago
If by "metal language" you mean a language that produces machine assembly, then Julia is also a metal language. Both Rust and Julia use the LLVM compiler infrastructure.