Skip to content

Instantly share code, notes, and snippets.

View JeffBezanson's full-sized avatar

Jeff Bezanson JeffBezanson

View GitHub Profile
index b2b032c..ce89fb3 100644
--- a/extras/tk.jl
+++ b/extras/tk.jl
@@ -92,11 +92,10 @@ type TkWidget
global Window
function Window(title, w, h)
wpath = ".jl_win$ID"; ID += 1
- tcl_eval("frame $wpath -width $w -height $h")
- tcl_eval("wm manage $wpath")
+ tcl_eval("toplevel $wpath -width $w -height $h")
@JeffBezanson
JeffBezanson / gist:4212658
Created December 5, 2012 05:38
add ProcessEachLine
diff --git a/base/process.jl b/base/process.jl
index e8fadae..74a8914 100644
--- a/base/process.jl
+++ b/base/process.jl
@@ -677,11 +677,27 @@ end
readall(ports::Ports) = _readall(ports, cmds(ports))
readall(cmds::Cmds) = _readall(stdout(cmds), cmds)
+type ProcessEachLine
+ stream::IO
@JeffBezanson
JeffBezanson / gist:5325156
Created April 6, 2013 06:45
emacs input method for unicode technical symbol input
(quail-define-package
"symbol-input" "unicode" "unicode-sym" t
"Easier input for unicode technical symbols"
nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
("\\alpha" ?α)
("\\beta" ?β)
("\\gamma" ?γ)
("\\delta" ?δ)
@JeffBezanson
JeffBezanson / symbol-input.el
Created January 17, 2014 20:26
emacs symbol input mode
(quail-define-package
"symbol-input" "unicode" "unicode-sym" t
"Easier input for unicode technical symbols"
nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
("\\alpha" ?α)
("\\beta" ?β)
("\\gamma" ?γ)
("\\delta" ?δ)
function dispatchratio(D, M::Module, expor, recur)
nspec = 0
nGFspec = 0
for name in names(M,!expor)
if isdefined(M, name)
F = eval(M, name)
if isa(F,Union(Function,DataType))
if isgeneric(F)
if !haskey(D,F)
positions = IntSet()
argtail(x, rest...) = rest
tail(x::Tuple) = argtail(x...)
# x >= y ? t : f
_cmp_ge(x::(), y::(), t, f) = t
_cmp_ge(x::(), y::Tuple, t, f) = f
_cmp_ge(x::Tuple, y::(), t, f) = t
_cmp_ge(x::Tuple, y::Tuple, t, f) = _cmp_ge(tail(x), tail(y), t, f)
# as a string
"function check_new_version(existing::Vector{VersionNumber}, ver::VersionNumber)
@assert issorted(existing)
for v in [v\"0\", v\"0.0.1\", v\"0.1\", v\"1\"]
lowerbound(v) <= ver <= v && return
end
error(\"$ver is not a valid initial version (try 0.0.0, 0.0.1, 0.1 or 1.0)\")
end"
@JeffBezanson
JeffBezanson / escaped-symbols
Last active August 29, 2015 14:03
escaped symbols patch
diff --git a/src/julia-parser.scm b/src/julia-parser.scm
index 549b02f..8949495 100644
--- a/src/julia-parser.scm
+++ b/src/julia-parser.scm
@@ -1677,9 +1677,14 @@
;; symbol/expression quote
((eq? t ':)
(take-token s)
- (if (closing-token? (peek-token s))
- ':
(define (string.rpad s n c) (string s (string.rep c (- n (string.count s)))))
(define (string.rep s k)
(cond ((< k 4)
(cond ((<= k 0) "")
((= k 1) (string s))
((= k 2) (string s s))
(else (string s s s))))
((odd? k) (string s (string.rep s (- k 1))))
(else (string.rep (string s s) (/ k 2)))))
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by arpack-ng configure 3.2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/home/bezanson/src/julia/usr --build=x86_64-linux-gnu --libdir=/home/bezanson/src/julia/usr/lib F77=gfortran -m64 CC=gcc -m64 CXX=g++ -m64 --with-blas=-L/home/bezanson/src/julia/usr/lib -lopenblas --with-lapack=-L/home/bezanson/src/julia/usr/lib -lopenblas --disable-mpi --enable-shared FFLAGS= -fdefault-integer-8 -cpp -ffixed-line-length-none -Dsaxpy=saxpy_64 -Ddaxpy=daxpy_64 -Dscopy=scopy_64 -Ddcopy=dcopy_64 -Dsgemv=sgemv_64 -Ddgemv=dgemv_64 -Dsgeqr2=sgeqr2_64 -Ddgeqr2=dgeqr2_64 -Dslacpy=slacpy_64 -Ddlacpy=dlacpy_64 -Dslahqr=slahqr_64 -Ddlahqr=dlahqr_64 -Dslanhs=slanhs_64 -Ddlanhs=dlanhs_64 -Dslarnv=slarnv_64 -Ddlarnv=dlarnv_64 -Dslartg=slartg_64 -Ddlartg=dlartg_64 -Dslascl=slascl_64 -Ddlascl=dlascl_64 -Dslaset=slaset_64 -Ddlaset=dla