[julia-users] Compose.jl Tutorials for working on Gadfly.jl

2014-11-22 Thread ccsv . 1056915
Are there any tutorials for Compose.jl other than the documentation page? I want to try to make pie charts and venn diagrams.

[julia-users] Re: Compose.jl Tutorials for working on Gadfly.jl

2014-11-22 Thread Valentin Churavy
There is also https://github.com/dcjones/Compose.jl/tree/master/examples On Saturday, 22 November 2014 10:08:41 UTC+1, ccsv.1...@gmail.com wrote: Are there any tutorials for Compose.jl other than the documentation page? I want to try to make pie charts and venn diagrams.

Re: [julia-users] Memory mapping composite type + fixed length strings

2014-11-22 Thread Joshua Adelman
For testing/evaluation purposes, it's actually the case that I don't need to actually use any of the fixed length string fields. They are in the data, but I have numerical encodings for most of the important ones in other fields. So in playing around I found that I could just create a bitstype

[julia-users] Efficiency of julia compiler on a simple program (from a julia newbie)

2014-11-22 Thread Ronald L. Rivest
I'm a julia newbie trying to get a sense of how efficient the Julia compiler is, for a very simple little program. I attach copies of foo.py and foo.jl, which compute the same thing. I then ran them (for the python version with both pypy and with python). The results: pypy: 2

[julia-users] Re: Efficiency of julia compiler on a simple program (from a julia newbie)

2014-11-22 Thread Viral Shah
Try putting everything in a function. http://julia.readthedocs.org/en/latest/manual/performance-tips/ -viral On Saturday, November 22, 2014 6:16:39 PM UTC+5:30, Ronald L. Rivest wrote: I'm a julia newbie trying to get a sense of how efficient the Julia compiler is, for a very simple little

[julia-users] Efficiency of julia compiler on a simple program (from a julia newbie)

2014-11-22 Thread Daniel Høegh
By wrapping it in a function as: function test() tic() n = 1 x = 0.234 for i = 1:n x = max(x*x, 1.0-x*x) end println(x) print(Done.) toc() end test() #jit compilation occurs test() # timing 0.284217675 s On my machine the original took 26.96566

[julia-users] Macros with multiple expressions - attempting to inject variable as each's first argument

2014-11-22 Thread cormullion
I hadn't thought of using macros —good idea. My approach to using Cairo was to create a module that calls Cairo functions but maintaining a current context, so I can write: using EasyCairo, Color newpng(1600, 1000) background(color(black)) setopacity(0.7) setcolor(0, 1, 0)

[julia-users] Re: Oddness in Graphs.jl

2014-11-22 Thread Ed Scheinerman
Hi all, I have found the Graphs.jl package difficult to work with, so I've been (slowly) putting together a SimpleGraphs.jl package available here: https://github.com/scheinerman/SimpleGraphs.jl It's probably not as full featured as the Graphs.jl package, but it's easier (at least for me) to

[julia-users] PyPlot error when using Stan

2014-11-22 Thread Christopher Fisher
Hi- I am experiencing difficulty generating plots of MCMC chains with PyPlot. It was working fine and just stopped working. I even reverted to the latest working version of the code in Dropbox, but to no avail. Here is the code and the error message: p = plot(sim, [:trace, :mean, :density,

[julia-users] Re: Oddness in Graphs.jl

2014-11-22 Thread Dahua Lin
I guess we really need some examples on Graphs.jl to make the learning curve less steep. Dahua On Saturday, November 22, 2014 9:20:10 PM UTC+8, Ed Scheinerman wrote: Hi all, I have found the Graphs.jl package difficult to work with, so I've been (slowly) putting together a

Re: [julia-users] PyPlot error when using Stan

2014-11-22 Thread Rob J. Goedman
Chris, That plot statement is aimed at Gadfly, not at PyPlot. I expect somehow PyPlot got imported. If you’re in REPL, a restart should remove PyPlot.jl. You will need Gadfly, Stan Mamba. I haven’t used PyPlot a lot, but if a restart doesn’t fix the problem, just send me the full code.

Re: [julia-users] PyPlot error when using Stan

2014-11-22 Thread Christopher Fisher
Thanks once again, Rob. It turns out that was, in fact, the problem. According to my file history, the code was always calling PyPlot. Strangely enough, this did not produce an error on my home computer until yesterday . Perhaps something changed when I updated my packages. Anyways, problem

Re: [julia-users] Memory mapping composite type + fixed length strings

2014-11-22 Thread Isaiah Norton
Have you looked at StrPack.jl? It may have a packed option. Julia uses the platform ABI padding rules for easy interop with C. On Nov 22, 2014 7:17 AM, Joshua Adelman joshua.adel...@gmail.com wrote: For testing/evaluation purposes, it's actually the case that I don't need to actually use any of

[julia-users] Fitting a weighted multiple linear regression with Julia

2014-11-22 Thread Ryan Kyle
Greetings, I just started using Julia yesterday, and I'm currently trying to translate a bit of my existing R code. I hope the answer isn't too obvious, but I'm not sure how to fit a weighted linear regression in Julia -- in R, I would try something like weighted_lm - lm(Y ~ X1 + X2, weights

[julia-users] Re: Oddness in Graphs.jl

2014-11-22 Thread Ed Scheinerman
That'd be great. And what I think I'd like to do is to write some converters that will take one of my SimpleGraph objects and return something that Graphs.jl provides. On Saturday, November 22, 2014 9:34:47 AM UTC-5, Dahua Lin wrote: I guess we really need some examples on Graphs.jl to make

Re: [julia-users] Memory mapping composite type + fixed length strings

2014-11-22 Thread Isaiah Norton
See also Base.fieldoffsets On Sat, Nov 22, 2014 at 10:57 AM, Isaiah Norton isaiah.nor...@gmail.com wrote: Have you looked at StrPack.jl? It may have a packed option. Julia uses the platform ABI padding rules for easy interop with C. On Nov 22, 2014 7:17 AM, Joshua Adelman

[julia-users] direct access to CPU specialized instructions

2014-11-22 Thread eric l
Is there a plan for some sort of intrinsics in Julia? The most recent iterations of the x86 ISA have things like pext that extract specific bits in a dw, or qw and pack them together. Currently to use an instruction like that I define a C function create a shared lib and make a ccall. This is

Re: [julia-users] direct access to CPU specialized instructions

2014-11-22 Thread Isaiah Norton
If it is exposed in some form by LLVM, you might be able to use llvmcall. See https://github.com/JuliaLang/julia/pull/5046 (and possibly also https://github.com/JuliaLang/julia/pull/8740) Eventually I believe we will have a similar `asmcall` feature. On Sat, Nov 22, 2014 at 2:58 PM, eric l

Re: [julia-users] direct access to CPU specialized instructions

2014-11-22 Thread Stefan Karpinski
You can already inline assembly into llvm so it's not super clean but it can be done. On Sat, Nov 22, 2014 at 3:15 PM, Isaiah Norton isaiah.nor...@gmail.com wrote: If it is exposed in some form by LLVM, you might be able to use llvmcall. See https://github.com/JuliaLang/julia/pull/5046 (and

Re: [julia-users] direct access to CPU specialized instructions

2014-11-22 Thread Erik Schnetter
You may also be able to use https://github.com/Keno/Cxx.jl to write your C code, which should ensure that it is inlined. Also -- are you sure that LLVM's vectorizer can't be convinced to generate these instructions automatically? I know this is not possible in all cases (I wish!), but there's

Re: [julia-users] direct access to CPU specialized instructions

2014-11-22 Thread Stefan Karpinski
Yes, LLVM codegen improvements are the best way to accomplish this since then everyone everywhere benefits. On Sat, Nov 22, 2014 at 3:38 PM, Erik Schnetter schnet...@cct.lsu.edu wrote: You may also be able to use https://github.com/Keno/Cxx.jl to write your C code, which should ensure that it

[julia-users] how do I effectively initialize a fairly large matrix?

2014-11-22 Thread Jacek Hoła
Hi guys, I tried to find some advice here and on google but with no luck. I'm trying to initialize a matrix of Float64. Since I have the values I just did my_matrix = Float64[3.5 6.7 2 0 lots of numbers...; 3 0 6.4 3.4 and so on...] the matrix was around 800 x 1800. I've

Re: [julia-users] how do I effectively initialize a fairly large matrix?

2014-11-22 Thread Milan Bouchet-Valat
Le samedi 22 novembre 2014 à 13:15 -0800, Jacek Hoła a écrit : Hi guys, I tried to find some advice here and on google but with no luck. I'm trying to initialize a matrix of Float64. Since I have the values I just did my_matrix = Float64[3.5 6.7 2 0 lots of numbers...;

Re: [julia-users] how do I effectively initialize a fairly large matrix?

2014-11-22 Thread Jacek Hoła
It seemed pretty handy to have one test in just one file. I used readdlm and it works great, but now I have 4 files (3 matrices and one jl with readdlms and call to module). Guess I can live with that. Thanks W dniu sobota, 22 listopada 2014 23:38:10 UTC+1 użytkownik Milan Bouchet-Valat

Re: [julia-users] how do I effectively initialize a fairly large matrix?

2014-11-22 Thread Jacek Hoła
how do I effectively also, I meant efficiently ;)

Re: [julia-users] Memory mapping composite type + fixed length strings

2014-11-22 Thread Patrick O'Leary
On Saturday, November 22, 2014 9:57:51 AM UTC-6, Isaiah wrote: Have you looked at StrPack.jl? It may have a packed option. Julia uses the platform ABI padding rules for easy interop with C. Yes, you can used the align_packed strategy.

Re: [julia-users] keys of nested dictionary?

2014-11-22 Thread Kristian Holsheimer
Ah I see.. thanks!! I guess old (pythony) habits die hard... On Thursday, November 20, 2014 11:37:42 AM UTC+1, John Myles White wrote: my_dict.keys isn't giving you the keys of your dictionary. It's giving you the internal structure of a data structure. Try keys(my_dict). As we sometimes

Re: [julia-users] Efficiency of julia compiler on a simple program (from a julia newbie)

2014-11-22 Thread John Myles White
Yes, this is one of the most surprising things about Julia. Perhaps the time has come to put a warning about this right at the start of a REPL session. — John On Nov 22, 2014, at 4:50 AM, Viral Shah vi...@mayin.org wrote: Try putting everything in a function.

[julia-users] Re: Sublime-IJulia help installation for Sublime text 3

2014-11-22 Thread ccsv . 1056915
I did that and it still gives me the same error [WinError 2] The system cannot find the file specified [cmd: ['julia', 'C:\\Users\\NN\\Desktop\\Julia\\Test.jl']] [dir: C:\Users\NN\Desktop\Julia] [path: C:\Users\NN\AppData\Roaming\Sublime Text 3\Packages\IJulia/windeps/;C:\Program

Re: [julia-users] Broadcasting variables

2014-11-22 Thread Madeleine Udell
The code block I posted before works, but throws an error when embedded in a function: ERROR: X not defined (in first line of @parallel). Why am I getting this error when I'm *assigning to* X? function doparallelstuff(m = 10, n = 20) # initialize variables localX = Base.shmem_rand(m)

Re: [julia-users] Efficiency of julia compiler on a simple program (from a julia newbie)

2014-11-22 Thread Steven G. Johnson
On Saturday, November 22, 2014 7:42:21 PM UTC-5, John Myles White wrote: Yes, this is one of the most surprising things about Julia. Perhaps the time has come to put a warning about this right at the start of a REPL session. How about a warning if you run toc() in the REPL, since that is

Re: [julia-users] Memory mapping composite type + fixed length strings

2014-11-22 Thread Joshua Adelman
On Saturday, November 22, 2014 6:31:27 PM UTC-5, Patrick O'Leary wrote: On Saturday, November 22, 2014 9:57:51 AM UTC-6, Isaiah wrote: Have you looked at StrPack.jl? It may have a packed option. Julia uses the platform ABI padding rules for easy interop with C. Yes, you can used the

[julia-users] Re: Fitting a weighted multiple linear regression with Julia

2014-11-22 Thread Steven G. Johnson
You can always use JuMP or one of the other generic optimization packages to do multi-dimensional fitting; although it may be suboptimal efficiency due to not taking advantage of the special structure of the problem, the problem is convex and any local optimizer should converge to the solution

[julia-users] impressions and questions from a Matlab user

2014-11-22 Thread Christian Peel
Hi all, I'm excited about Julia because of the speed and open nature of the language. I have a couple of suggestions from the past couple of days of my time with the language: (1) decrease the JIT time to allow faster code changes, (2) automatically detect changed files and reload them,

[julia-users] Neuro-Dynamic Programming in Julia

2014-11-22 Thread Pileas
Some problems have the so-called curse of dimensionality and curse of modeling. For this reason Bersekas and Tsimtsiklis (at MIT) introduced the so-called Neuro-Dynamic Programing. Does Julia offer support for the aforementioned and if not, how about the future?

[julia-users] Unexpected behaviour with workspace()

2014-11-22 Thread colintbowers
Hi all, I'm observing the following behaviour with workspace() on julia v0.3.0+6 on Ubuntu 14.04 julia eval(parse(1+1)) 2 julia workspace() julia eval(parse(1+1)) ERROR: eval not defined Is this a bug or do I actually have no understanding of what workspace() is supposed to do? I searched

Re: [julia-users] Broadcasting variables

2014-11-22 Thread Amit Murthy
This works: function doparallelstuff(m = 10, n = 20) # initialize variables localX = Base.shmem_rand(m; pids=procs()) localY = Base.shmem_rand(n; pids=procs()) localf = [x-i+sum(x) for i=1:m] localg = [x-i+sum(x) for i=1:n] # broadcast variables to all worker processes

[julia-users] Environment variables on Windows

2014-11-22 Thread Rob J. Goedman
Hi, In Stan.jl and Jags.jl I look for environment variables. On unix ``` ccall( (:getenv, libc), Ptr{Uint8}, (Ptr{Uint8},), bytestring(var)) ``` works fine. But not on Windows. I've seen ENV(STAN_HOME) mentioned (on http://rosettacode.org/wiki/Environment_variables#Julia , can't try that

Re: [julia-users] Environment variables on Windows

2014-11-22 Thread Isaiah Norton
It acts like a dictionary, so you need square brackets: ENV[STAN_HOME] (this works cross-platform, modulo platform conventions) On Sun, Nov 23, 2014 at 12:11 AM, Rob J. Goedman goed...@icloud.com wrote: Hi, In Stan.jl and Jags.jl I look for environment variables. On unix ``` ccall(

Re: [julia-users] Environment variables on Windows

2014-11-22 Thread Robert J Goedman
Thanks Isaiah! Sent from my iPhone On Nov 22, 2014, at 9:44 PM, Isaiah Norton isaiah.nor...@gmail.com wrote: It acts like a dictionary, so you need square brackets: ENV[STAN_HOME] (this works cross-platform, modulo platform conventions) On Sun, Nov 23, 2014 at 12:11 AM, Rob J.

Re: [julia-users] Broadcasting variables

2014-11-22 Thread Amit Murthy
https://github.com/JuliaLang/julia/issues/9118 On Sun, Nov 23, 2014 at 10:41 AM, Amit Murthy amit.mur...@gmail.com wrote: This works: function doparallelstuff(m = 10, n = 20) # initialize variables localX = Base.shmem_rand(m; pids=procs()) localY = Base.shmem_rand(n;

[julia-users] Re: Environment variables on Windows

2014-11-22 Thread elextr
On Sunday, November 23, 2014 3:11:29 PM UTC+10, Rob J Goedman wrote: Hi, In Stan.jl and Jags.jl I look for environment variables. On unix ``` ccall( (:getenv, libc), Ptr{Uint8}, (Ptr{Uint8},), bytestring(var)) ``` works fine. But not on Windows. I've seen ENV(STAN_HOME)

Re: [julia-users] Unexpected behaviour with workspace()

2014-11-22 Thread Stefan Karpinski
That seems like a bug – if you would file an issue, that would be great. On Sat, Nov 22, 2014 at 11:37 PM, colintbow...@gmail.com wrote: Hi all, I'm observing the following behaviour with workspace() on julia v0.3.0+6 on Ubuntu 14.04 julia eval(parse(1+1)) 2 julia workspace() julia

Re: [julia-users] Unexpected behaviour with workspace()

2014-11-22 Thread colintbowers
Done. Issue #9119. Cheers, Colin On Sunday, November 23, 2014 5:08:50 PM UTC+11, Stefan Karpinski wrote: That seems like a bug – if you would file an issue, that would be great. On Sat, Nov 22, 2014 at 11:37 PM, colint...@gmail.com javascript: wrote: Hi all, I'm observing the

Re: [julia-users] impressions and questions from a Matlab user

2014-11-22 Thread Isaiah Norton
Thanks for the comments. Many of these things are on the radar, and contributions are very much welcome and encouraged. As is often the case in open source projects at a relatively early stage, such issues are not technically blocked so much as rate-limited by concerns like graduation, tenure, and

Re: [julia-users] Broadcasting variables

2014-11-22 Thread Madeleine Udell
Thanks! This is extremely helpful. Can you tell me more about what localize_vars does? On Sat, Nov 22, 2014 at 9:11 PM, Amit Murthy amit.mur...@gmail.com wrote: This works: function doparallelstuff(m = 10, n = 20) # initialize variables localX = Base.shmem_rand(m; pids=procs())

Re: [julia-users] Broadcasting variables

2014-11-22 Thread Amit Murthy
From the description of Base.localize_vars - 'wrap an expression in let a=a,b=b,... for each var it references' Though that does not seem to the only(?) issue here On Sun, Nov 23, 2014 at 11:52 AM, Madeleine Udell madeleine.ud...@gmail.com wrote: Thanks! This is extremely helpful. Can

Re: [julia-users] Broadcasting variables

2014-11-22 Thread Madeleine Udell
Yes, I read the code, but I'm not sure I understand what the let statement is doing. It's trying to redefine the scope of the variable, or create a new variable with the same value but over a different scope? How does the let statement interact with the namespaces of the various processes? On

Re: [julia-users] direct access to CPU specialized instructions

2014-11-22 Thread eric l
First off, Thanks for the quick replies. As I need to stay in 3.0 for now if i understand correctly I will need to go the llvm assembly route. Any pointers or example you recommend as my llvm knowledge is on the low side... Again thanks, -ETL

[julia-users] Mocha cuda backend loading

2014-11-22 Thread Arshak Navruzyan
I am able to compile and execute all CUDA samples on my machines and successfully built kernels.ptx but when I try to startup the backend I get the following error: 22-Nov 13:55:25:INFO:root:Initializing CuDNN backend... error compiling init: could not load module libcuda: dlopen(libcuda.dylib,

Re: [julia-users] Unexpected behaviour with workspace()

2014-11-22 Thread Ivar Nesje
The issue was likely fixed September 7th, and you will need to update Julia to get the fix. Please comment here or on the issue if you still have problems.