Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ddragon
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
121.
▲
by
ddragon
7y ago
Just complementing the other reply, there is a small article about how you can implement a source to source AD in Julia [1]. Basically Julia has a special type of macro called generated function [2] which instead of executing during the AST
122.
▲
by
ddragon
7y ago
It does have a ton of numerical/data science/general science libraries to be differentiated and to add value to the differentiable code though.
123.
▲
by
ddragon
7y ago
Macros are really powerful constructs that allows you to even change the syntax of the language, which means when they are used you can't trust your previous knowledge of how the language should behave. If you do it correctly you can m
124.
▲
by
ddragon
7y ago
Hygienic Macros usually have ways to violate the hygiene, so that property doesn't change how expressive they can be, just that the default behavior is safer because you won't accidentally overwrite anything on the scope the macro
125.
▲
by
ddragon
7y ago
It might be a question of avoiding implicit interfaces in your code (or documenting and testing it extensively in case you need them). They are great for creating really generic libraries (like Tables.jl interface), but for business logic p
126.
▲
by
ddragon
7y ago
Julia should work fine in production (outside of having less mature tools to integrate with other services compared to popular languages that get direct support from the providers). That and like other said, it's not optimal for some d
127.
▲
by
ddragon
7y ago
Actually, it will choose the right function to dispatch at compile time. In fact if it will in certain occasions even erase all function call and replace with the final output and even remove unaccessible branches from the generated code.
128.
▲
by
ddragon
7y ago
There are some packages: https://github.com/davidavdav/NamedArrays.jl In Julia, as long as any custom type implements the base methods (through overloading) it will work with anything and with no performance cost (sinc
129.
▲
by
ddragon
7y ago
I did generalize above, but when I said "simple website" I really meant the usual simple website one the web, not firmware/embedded stuff. I kinda said that because I already wrote one in C including a basic CGI library, as w
130.
▲
by
ddragon
7y ago
There are multiple benchmarks, but it's hard to trust anything because of varying level of skill with each language (and also there is no point in creating unmaintainable code just for speed as you say, the ideal comparison would be wi
131.
▲
by
ddragon
7y ago
While it doesn't justify by itself, it means that this area will be constantly profiled and optimized tricks will be implemented to handle it better, like auto-simd, using multiple dispatch to detect optimal BLAS method for every matri
132.
▲
by
ddragon
7y ago
Julia should be faster than CL for long running numerical computation at least (reaching C/Fortran speed for type-stable code) as it was designed for that purpose (plus the good GPU support and use of libraries like BLAS). But there is
133.
▲
by
ddragon
7y ago
You start counting with 1 because 0 is the term created later to indicate an absence of stuff to count. If I have one kid, I start counting by the number one, if I have 0 kids I don't have anything to count. But then I agree that there
134.
▲
by
ddragon
7y ago
It's not about right or wrong, it's just that they work for different things but programming languages unlike math or human languages have to pick only one as default. 1-index is good for counting, if I want the first element up t
135.
▲
by
ddragon
7y ago
The "two language problem" in the high performance numerical computation domain, in which you have a high level language that is easy to use as a glue (such as Python) and a low level language for anything that requires performanc
136.
▲
by
ddragon
7y ago
Thanks, I'll look into it. Julia for example does have an array library that does compile-time shape inference (StaticArrays), but it cannot scale for large arrays (over 100 elements) exactly because it gets too hard for the compiler t
137.
▲
by
ddragon
7y ago
That would be great if Julia can break into this area. I would really love to be able to easily write a Julia program that reads realtime input from Kafka (possibly a more mature RDKafka.jl, with multithreaded consumers), merges with data f
138.
▲
by
ddragon
7y ago
>sometimes you don't know if some missing type annotation is slowing your program The lack of type annotations won't slow down your Julia program, since the compiler will infer them anyway (types are for multiple dispatch, docu
139.
▲
by
ddragon
7y ago
Julia is intended to be (and already is) a general purpose programming language. What it does not try to be is a language that tries to be good for every purpose. Python for example is a general purpose programming language but you wouldn&#
140.
▲
by
ddragon
7y ago
Julia is suited for long running processes, be it a simulation/calculation that will run millions of times for hours or a long interactive session for example exploring multiple variants of an algorithm (such as using the REPL, Jupyter
141.
▲
by
ddragon
7y ago
To be fair, there were debuggers pre-1.0, but the changes in the language syntax and compiler broke them. That one was just the first one to work with the new architecture that was released on the second half of last year (and since the lan
142.
▲
by
ddragon
7y ago
You understood it correctly. Named dimensions is certainly a good idea even in dynamic languages as a way of documentation and runtime errors that actually make sense (instead of stuff like "expected shape (24, 128, 32) but got (32, 12
143.
▲
by
ddragon
7y ago
Like other people, the startup isn't much of a problem to me since I can easily adapt (and even prefer) a REPL based development and for the stuff I use Julia that one time cost is more than worth it, but the problem of the initial JIT
144.
▲
by
ddragon
7y ago
Do you have an example of a tensor library that keep track of shapes and detect mismatches at compile time? I had the impression that even in static languages having tensors with the exact shape as a parameter would stress the compiler, for
145.
▲
by
ddragon
7y ago
Definitely, since Julia has the same approach as Python of allowing quick and dirty solutions for data analysis/modelling, but with a much larger scope even when you don't have complete library support. In a few hours you can make
146.
▲
by
ddragon
7y ago
That's exactly how Elixir and Julia do it (with quote and unquote operators), for example in Julia: clause = :(3 > 0) expr = :($(clause) ? 0 : 1 + 3) eval(expr) # 0 Though Julia goes further than Elixir, and not only the quoted elem
147.
▲
by
ddragon
7y ago
It depends on what you mean by application, self-evolving/learning programs is basically impossible at this point because of the extremely large search space of possible code within the syntax (how many possible programs exist within s
148.
▲
by
ddragon
7y ago
The greatest feature of Elixir in my opinion (and it's a beautiful language with a lot of great features in the first place, including the advantages of the Erlang VM and Library) is the care it got in being approachable and easy to us
149.
▲
by
ddragon
7y ago
I'm very far from an expert as well, but as I see you could have automatic currying in the same way I can write in Julia x -> f(x, 10) (manual currying using anonymous function) but automatically for every function. But the language
150.
▲
by
ddragon
7y ago
In Julia, the math part is mostly functional. Structs/Data are immutable by default (which cover most basic numeric types) and while arrays are mutable it's very common to write operations in the form of broadcasting (vectorized m
More ›