Skip to content

Instantly share code, notes, and snippets.

Jeff Bezanson JeffBezanson

View GitHub Profile
View infedges.jl
const CC = Core.Compiler
using Base: IdSet
# count total number of nodes reachable from a given point
function edgecount(G, from, counts = IdDict{Any,Int}())
if haskey(counts, from)
return 0
if !CC.haskey(G, from)
return 0
View Artifacts.jl
function do_artifact_str(name, sfile, __module__)
local artifacts_toml = find_artifacts_toml(sfile)
if artifacts_toml === nothing
"Cannot locate '(Julia)Artifacts.toml' file when attempting to use artifact '",
"' in '",
View pfib.jl
# run in commit c35d1d7f7c9d90e0a00ded1980d6fcd5d06f5433
# fixed by commit f81d4d21862c99e1c0452bdf2613ab9e20da9935
macro par(expr)
thunk = esc(:(()->($expr)))
local task = Task($thunk)
task.sticky = false
View badmod.llvm
; ModuleID = 'convert'
source_filename = "convert"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12"
target triple = "x86_64-unknown-linux-gnu"
%jl_value_t = type opaque
@llvm.compiler.used = appending global [2 x i8*] [i8* bitcast (%jl_value_t addrspace(10)* (i8*, i32, i32)* @jl_gc_pool_alloc to i8*), i8* bitcast (%jl_value_t addrspace(10)* (i8*, i64)* @jl_gc_big_alloc to i8*)], section "llvm.metadata"
; Function Attrs: sspstrong
View flatten.patch
diff --git a/base/iterators.jl b/base/iterators.jl
index 1c2ab13..4e5d1b5 100644
--- a/base/iterators.jl
+++ b/base/iterators.jl
@@ -694,28 +694,30 @@ function start(f::Flatten)
d = done(, s)
# this is a simple way to make this function type stable
d && throw(ArgumentError("argument to Flatten must contain at least one iterator"))
+ done_inner = false
while !d
View dispatch_timings.jl
immutable Myo{C}
function (::Type{Myo{C}}){C}(c)
if 2 == 2 # expansion of @assert 2==2
throw(Base.AssertionError("2 == 2"))
return new{C}(c)
View 21514failure
Worker information
version: v2.6.2
instance: a349cd59-a02e-46c9-8c28-ece0f707dfc7:travis-ci-osx10.11-xcode8-1479248015
startup: 1m54.291250744s
Build system information
View gcerror-32bit
INFO: Installing Example v0.4.0
INFO: Package database updated
INFO: METADATA is out-of-date — you may not have the latest version of Example
INFO: Use `Pkg.update()` to get the latest versions of your packages
INFO: Initializing package repository /tmp/o8xgwvMS/v0.6
INFO: Cloning METADATA from
INFO: No packages to install, update or remove
INFO: Cloning cache of Example from
INFO: Installing Example v0.4.1
INFO: Package database updated
View Str.jl
import Base: endof, sizeof, pointer, next
using Base: UTF_ERR_INVALID_INDEX, is_valid_continuation, utf8_trailing, utf8_offset
type Str <: AbstractString
function Str(p::Union{Ptr{Int8},Ptr{UInt8}}, n::Integer)
s = ccall(:jl_gc_allocobj, Any, (Csize_t,), n+sizeof(Int))
ps = pointer_from_objref(s)
unsafe_store!(convert(Ptr{Ptr{Void}}, ps), pointer_from_objref(Str), 0)
unsafe_store!(convert(Ptr{Int}, ps), n)

An array is a structure mapping indices to data values, where the indices have a particular structure.

An array can be thought of as a pair of an index set and a data set.

Two arrays are equal if they map the same indices to the same values.

The data

An array is iterable, and when iterated generates exactly the values of

You can’t perform that action at this time.