Julia: Difference between revisions

From David's Wiki
No edit summary
No edit summary
Line 16: Line 16:
cd project_folder
cd project_folder
julia
julia
] activate .
using Pkg;
instantiate
Pkg.activate("./");
\b
Pkg.instantiate();
</syntaxhighlight>
</syntaxhighlight>
===String Interpolation===
===String Interpolation===

Revision as of 15:29, 9 September 2019


Basic Usage

Package Management

Guide Initializing a new project

cd project_folder
julia
] activate ./
# Add your packages

Loading an existing project

cd project_folder
julia
using Pkg;
Pkg.activate("./");
Pkg.instantiate();

String Interpolation

"Variable x is $x, y is $y, and x+y is $(x+y)"

Animation Loop

You can use Timer(callback, delay, interval). This is similar to SetInterval in JavaScript.

animate = Timer(function(t)
    println("Animating")
end, 0; interval=1/60)


Useful Packages

MeshCat.jl

Link
A wrapper for graphics visualizations around three.js. This opens in a web browser but can be used for making helium apps.