[julia-users] row of a matrix

2016-10-17 Thread Chang Kwon
It seems that the way Julia handles A[1,:] changed in v0.5. *julia> **A = [1 2 3; 4 5 6]* *2×3 Array{Int64,2}:* * 1 2 3* * 4 5 6* *julia> **A[1,:]* *3-element Array{Int64,1}:* * 1* * 2* * 3* *julia> **size(A[1,:])* *(3,)* A[1,:] used to be a row-vector in v0.4 same as in

[julia-users] gensym() in a macro calling another macro

2016-08-26 Thread Chang Kwon
module MyModule importall JuMP export @generate_nonnegative_variable macro generate_nonnegative_variable(m) v = gensym() v_expr = Expr(:call, esc(:>=), esc(v), 0) return Expr(:macrocall, Symbol("@variable"), esc(m), v_expr) end end using JuMP

[julia-users] precompiling all packages

2016-08-08 Thread Chang Kwon
Is there a way to precompile all packages at once? Each time that I run Pkg.update(), I would also like to precompile all packages so that when I actually use packages I don't need to precompile. Chang

[julia-users] ANN: Book --- Julia Programming for Operations Research

2016-06-02 Thread Chang Kwon
I wrote a book on julia programming, focusing on optimization problems from operations research and management science. http://www.chkwon.net/julia/ I think this book will be useful for first-year graduate students and advanced undergraduate students in

[julia-users] Re: REQUIRE specification for allowing installation in OS X only

2016-04-26 Thread Chang Kwon
How shall I flag an error in deps/build.jl? Can I do something like if os != :Darwin @error("...") end On Tuesday, April 26, 2016 at 11:10:42 PM UTC-4, Tony Kelman wrote: > > This doesn't exist right now. You can't prevent users on unsupported OSes > from installing your package,

[julia-users] Re: changing the package name

2016-04-26 Thread Chang Kwon
"VariationalInequality.jl" is a new name. When I did Pkg.publish(), I obtained this error: This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push. error: failed to push some

[julia-users] REQUIRE specification for allowing installation in OS X only

2016-04-26 Thread Chang Kwon
My working package currently works only in OS X. Can I specify this in the REQUIRE file? @osx seems only provide an "if" condition.

[julia-users] changing the package name

2016-04-26 Thread Chang Kwon
I was wondering what is the proper way to change the package name under development. This is often the case when I submit a package and then was recommended to revise the package name. Well, without much knowledge of git, I always mess up... When I'm ready to develop a package, I generate a

[julia-users] Re: scope of variables when using include

2015-02-09 Thread Chang Kwon
Thanks, Jameson. That means, I have to actually write bar(y) within the function foo(value), right? I have foo(), foo1(), foo2(), foo3(), all of which use the same bar(y). Should I repeatedly write the code for bar(y) for all foo functions? Is there any other way? I can make the bar()

[julia-users] scope of variables when using include

2015-02-08 Thread Chang Kwon
In foo.jl function foo(value) x = value include(bar.jl) println(bar(10)) end In bar.jl function bar(y) return x + y end When I run the following code, I receive an x not defined error. julia include(foo.jl) julia foo(10) What is wrong here? If I define function bar(y) inside the