3 ms·
With MATLAB/Octave in particular I think the value isn't familiar syntax or "how people write math" (because even that is quite varied). It's more that the REPL
by unlinked_dll 7y ago
With MATLAB/Octave in particular I think the value isn't familiar syntax or "how people write math" (because even that is quite varied). It's more that the REPL and language are fast enough to make it a CLI calculator that allow for rapid prototyping and development/exploration of mathematical ideas.
It's one thing that Julia currently does "ok" with, the syntax is fine (albeit slightly more verbose and often more abstract), but the iteration speed gets fairly nasty when you're not doing big computations or need to rapidly iterate, in which the JIT can take awhile to warm up. There are things you can do, but it's still a lot slower for day to day work for a lot of MATLAB users.
At least in my opinion. I tried to switch to Julia from GNU Octave (from which I moved from MATLAB proper) for a lot of hobby controls/DSP work and it was just a pain to iterate and explore ideas with. Same with Python imo as well.
- cageface 7y agoJust about every innovative idea in Lisp has been adopted by other languages now. Except for s-expr syntax. Draw your own conclusions.
- hawkice 7y agoThe conclusion to draw is that, if a language has s-expression syntax, it is considered a lisp.
- cageface 7y agoAnd people will do all the hard work of building a new language from scratch but conspicuously leave that feature out instead of using one of the many very good existing lisp or scheme implementations. Because the reality is that most programmers don’t want to code in s-exprs despite some significant benefits. This is a very hard truth for the more aspbergery wing of lisp users to accept.
- lispm 7y agoClojure was a new language from scratch and uses s-expression-like syntax. Generally, s-expressions is not a particular popular or needed tool. We've seen similar systems for code data&representations though - for example XML was used to represent code, too.
- bovine3dom 7y agoThe trick to avoiding this problem is to keep Julia "warm" with a long running process. There are a few ways to do this - Jupyter, the Juno IDE, and vim/neovim with a terminal pane are all popular - but the most straightforward is to switch from `julia file.jl` to ``` julia julia> include("file.jl") # when you want to reload, ctrl-c then arrow-up and enter to include again ``` This isn't so dissimilar to MATLAB in some respects: you don't restart MATLAB every time you want to re-run your code.
- Oreb 7y agoBetter yet, use Revise.jl and do julia> includet("file.jl") # Notice the final 't' in 'includet' This will cause file.jl to get automatically reloaded whenever it is changed.
- bovine3dom 7y agoI've been using Julia for 4 years and had never heard of includet. Thanks!
- Oreb 7y agoYou're welcome! Please note the "use Revise.jl" part. The includet function is not included in the base language, you need the Revise.jl package.