Polar Rose in Julia

Background I’m doing exercise 4.9 of Think Julia, which asks for a function for a polar rose using Luxor’s turtle graphics. Difficulties Work out the geometric structure of the family of polar roses. The key is to construct some auxiliary isoceles triangles and work out the angles between them. One sees that they are parametrized by two varaibles n and k. n: number of petals k: petal increment constraint: k ≠ n ÷ 2 Handle the case when gcd(n, k) > 1, i. [Read More]

Package Versioning for Julia Projects

Resolved GLM installation error

Update: Thanks to JuliaRegistries/General#647, the version cap of the package Distributions has now been removed, so that one can directly install the package GLM along with Distributions v0.19.2. Background I’m reading the book Statistics with Julia, which makes use of GLM. Problem I encountered the following error, which I posted in the issue GLM.jl#311. (v1.1) pkg> add GLM Resolving package versions... ERROR: Unsatisfiable requirements detected for package GLM [38e38edf]: GLM [38e38edf] log: ├─possible versions are: [0. [Read More]
Julia  GLM 

Juno Installation 2019

Log of system-wide config

Goal To install Juno for convenient development in Julia. Problem After Juno installation, I received the following error. Analysis From the error message, the system had tried to find an executable file julia, which would then be executed by the shell /bin/sh. Nonetheless, it’s absent from the system’s environment $PATH, so Juno couldn’t find it. I’ve only changed my $PATH in ZSHRC, which is user-specific. Solution This Stack Overflow question about $PATH setting on *nix has provided various solution. [Read More]
Juno  Atom  Julia 

Julia Rcall Installation

Rcall.jl build failure due to missing dependencies

Problem During the installation of RCall.jl, the package wasn’t successfully built due to a missing variable $R_HOME. $ julia -q julia> Pkg.add("RCall") Resolving package versions... Installed WinReg ─ v0.3.1 Installed RCall ── v0.13.2 Updating `~/.julia/environments/v1.0/Project.toml` [6f49c342] + RCall v0.13.2 Updating `~/.julia/environments/v1.0/Manifest.toml` [6f49c342] + RCall v0.13.2 [1b915085] + WinReg v0.3.1 Building RCall → `~/.julia/packages/RCall/ffM0W/deps/build.log` ┌ Error: Error building `RCall`: │ ERROR: LoadError: R_HOME is not a directory. │ Stacktrace: │ [1] error(::String) at . [Read More]
Julia  RCall  R 

Install Julia From Source

Custom built Julia from GitHub

Goal To get Julia installed as a normal user on RHEL 6. Motivation “Julia talks like Python but walks like C.” To do statistics more efficiently. The compiled binaries often contain install scripts which put files to shared folders under /usr. Consequently, they have to be run as sudo privileges. That drove me to start this lengthy Julia compilation. Installation Without sudo privileges, I’ve chosen to compile Julia from source. I was too lazy to get the dependencies fixed. [Read More]
Linux  Julia