Here is a curated list of various Julia tips and tricks to use with Julia's REPL interface. The nice colors (and some of the tricks) use OhMyREPL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Base.Threads: @spawn, nthreads, threadid | |
N = 100 | |
chan = Channel(nthreads()) do chan | |
for val in 1:N | |
put!(chan, val) | |
println("T$(threadid()) => put $(val)") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM := llvm-brainfuck | |
OBJECTS := main.o | |
SHIM := shim.a | |
SHIM_OBJECTS := shim.o | |
CC := clang | |
CXX := clang++ | |
CXXFLAGS := $(shell llvm-config --cppflags) -Wall -Werror -pedantic | |
LDFLAGS := $(shell llvm-config --ldflags --libs core) |