Questions tagged [julia]

The Julia programming language is fast, expressive and dynamic. By aggressively targeting technical computing it has become a robust general purpose language. It addresses the two-language problem by combining the ease of use of high-level languages such as R and Python with the performance of C and Fortran.

Julia is a high-level, high-performance dynamic programming language for technical computing. It addresses the two-language problem by combining the ease of use of languages such as R and Python with the performance of C and Fortran. Julia provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. Environments such as Juno and Jupyter provide a rich development environment with interactive graphics.

Community-contributed libraries continue to be added at a rapid pace. Programs written in Julia are organized around multiple dispatch - by defining and overloading functions with different combinations of argument types. Part of what makes Julia so expressive is that argument types are user-defined.

The Julia compiler includes a parser written in Scheme (FemtoLisp), some compiler passes and the runtime in C, code generation through LLVM using C++, and other compiler passes (type inference, inlining, etc.) as well as much of the Base library in Julia itself. For just-in-time generation of 64-bit or 32-bit optimized machine code the LLVM compiler framework is used.

Julia has foreign function interfaces for C, C++, Python, R, and Java, to name a few. Julia can also be embedded in any other software through its C API. Many of these interfaces are high performance and avoid copying data to the extent possible.

Resources for Julia:

Books

Publications

8749 questions
153
votes
2 answers

What is a "symbol" in Julia?

Specifically: I am trying to use Julia's DataFrames package, specifically the readtable() function with the names option, but that requires a vector of symbols. what is a symbol? why would they choose that over a vector of strings? So far I have…
Mageek
  • 3,911
  • 3
  • 22
  • 37
147
votes
8 answers

Linking R and Julia?

Julia looks very promising for fast and syntax-sane computation (e.g. here), but I suspect it will not be anywhere near R in terms of overall statistics workflow for some time yet. So I'd like to use it where C++ is mainly used in R programs: to…
Ari B. Friedman
  • 66,857
  • 33
  • 169
  • 226
95
votes
2 answers

How to make user defined function descriptions ("docstrings") available to julia REPL?

How can user defined functions (say f) have meaningful printouts when inspected via the REPL using ?for help(f) For example imagine I write the following funciton function f(x::Float64, y::Float64) return 2x - y^2 end If I load this into a…
spencerlyon2
  • 8,255
  • 1
  • 26
  • 36
81
votes
3 answers

Is Julia dynamically typed?

A lot of blogs, and the manual itself, say that Julia is dynamically typed. But from my reading of the manual, it sounds to me more like it is statically typed with type inference, like F#. Is Julia statically typed with type inference? Is it…
Lyndon White
  • 24,284
  • 15
  • 77
  • 126
79
votes
2 answers

Speeding up Julia's poorly written R examples

The Julia examples to compare performance against R seem particularly convoluted. https://github.com/JuliaLang/julia/blob/master/test/perf/perf.R What is the fastest performance you can eke out of the two algorithms below (preferably with an…
Ari B. Friedman
  • 66,857
  • 33
  • 169
  • 226
74
votes
5 answers

Running Julia .jl files

I'm new to julia and just finished my first program. I wrote the code in julia-studio and have been testing it within that program. It gives me all of the correct output, but the shell separates the output as if it is two different executions. I'm…
user1748681
  • 907
  • 1
  • 7
  • 9
69
votes
2 answers

In Julia, why is @printf a macro instead of a function?

In Julia, the syntax to print a formatted string is as follows: @printf("Hello %d\n", 5) Why is @printf a macro instead of a function? Is it so that it can accept a varying number of arguments?
Ben Hamner
  • 4,065
  • 4
  • 24
  • 44
63
votes
5 answers

How do I reload a module in an active Julia session after an edit?

2018 Update: Be sure to check all the responses, as the answer to this question has changed multiple times over the years. At the time of this update, the Revise.jl answer is probably the best solution. I have a file…
Colin T Bowers
  • 16,244
  • 7
  • 52
  • 81
61
votes
2 answers

Julia compiles the script every time?

Julia language compiles the script every time, can't we compile binaries with julia instead? I tried a small helloworld script with println function it took like 2,3 seconds for julia to show the output! It would be better if we can make binaries…
pahnin
  • 4,631
  • 11
  • 34
  • 56
60
votes
5 answers

Get a list of current variables in Julia Lang

I am new to Julia Lang. I am coming from the background of Matlab. In Matlab, when pressing whos command I will get all variables in the current scope; and also, I can store them in another variable like x=whos; Is there such commands exists in…
vinu k n
  • 731
  • 1
  • 5
  • 14
58
votes
1 answer

Parallelism in Julia. Features and Limitations

In their arXiv paper, the original authors of Julia mention the following: 2.14 Parallelism. Parallel execution is provided by a message-based multi-processing system implemented in Julia in the standard library. The language design supports…
Amelio Vazquez-Reina
  • 74,000
  • 116
  • 321
  • 514
56
votes
6 answers

Julia: OOP or not

I'm working on Juno with Julia. I don't know if Julia supports OOP or not. For example, is there something like class or struct of c++? How to declare it with members such as a data or a function?
Yves
  • 8,474
  • 7
  • 59
  • 114
52
votes
1 answer

In what sense are languages like Elixir and Julia homoiconic?

Homoiconicity in Lisp is easy to see: (+ 1 2) is both the function call to + with 1, 2 as arguments, as well as being a list containing +, 1, and 2. It is simultaneously both code and data. In a language like Julia, though: 1 + 2 I know we can…
user2666425
  • 1,571
  • 1
  • 13
  • 20
50
votes
3 answers

What is the recommended way to iterate a matrix over rows?

Given a matrix m = [10i+j for i=1:3, j=1:4], I can iterate over its rows by slicing the matrix: for i=1:size(m,1) print(m[i,:]) end Is this the only possibility? Is it the recommended way? And what about comprehensions? Is slicing the only…
Nico
  • 1,000
  • 1
  • 9
  • 14
48
votes
6 answers

How to upgrade Julia to a new release?

Question 1 - upgrade I'm using v"0.3.8" on Windows. I found from http://julialang.org/downloads/ Current Release (v0.3.9) I know I could download the prebuild version and install again. Is there a way to upgrade (from current installed version) to…
Nick
  • 6,673
  • 8
  • 43
  • 90
1
2 3
99 100