Julia: Difference between revisions

From 太極
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
* https://julialang.org/
* https://julialang.org/
* [https://en.wikipedia.org/wiki/Julia_(programming_language) Julia (programming language)]
* [https://en.wikipedia.org/wiki/Julia_(programming_language) Julia (programming language)]
* [https://hpc.nih.gov/training/handouts/julia4sc.pdf Julia for Scientific Computing] from NIH
** [https://hpc.nih.gov/training/handouts/julia4sc.pdf#page=57 Just-in-time compiler] in Julia.


= First test =
= First test =
Line 45: Line 47:
julia> exit()  # or Ctrl+d to quit
julia> exit()  # or Ctrl+d to quit
</syntaxhighlight>
</syntaxhighlight>
= IDE =
[http://junolab.org/ Juno]. It includes a step-by-step debugging function.


= Packages =
= Packages =

Latest revision as of 10:37, 7 April 2021

Websites

First test

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.1.0 (2019-01-21)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> x=100
100

julia> y=10
10

julia> x+y
110

julia> z^y
ERROR: UndefVarError: z not defined
Stacktrace:
 [1] top-level scope at none:0

julia> x^y
7766279631452241920

julia> x^12
2003764205206896640

julia> x^20
-5047021154770878464

julia> x^15
5076944270305263616

julia> x^16
-8814407033341083648

julia> exit()  # or Ctrl+d to quit

IDE

Juno. It includes a step-by-step debugging function.

Packages

GLMNet

Julia wrapper for fitting Lasso/ElasticNet GLM models using glmnet

julia> using Pkg
julia> Pkg.add("GLMNet")