Skip to content

Instantly share code, notes, and snippets.

View miguelraz's full-sized avatar
:shipit:

Miguel Raz Guzmán Macedo miguelraz

:shipit:
  • UNAM
  • UNAM, Mexico
View GitHub Profile
@bicycle1885
bicycle1885 / channel-mt.jl
Last active January 4, 2021 22:38
Multithreaded channel demonstration
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

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.

  1. Go to shell mode with ;

    shell

  2. Clear your screen with CTRL-L (or type ;clear)

clear

@jeremyroman
jeremyroman / Makefile
Created December 12, 2012 17:35
llvm-brainfuck: Simple operations, with the shim
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)