Re: [julia-users] Re: Plotting (Greek letter label, high resolution...)

2016-02-03 Thread digxx
That it what I try to emphasize with the 3 examples (with blanks) above... I did write \gamma and then this http://www.informationq.com/wp-content/uploads/2013/10/Tab-Key.jpg both in " ... " but it still doesnt work :-( Working with cygwin on windows shouldnt be an issue or? Am Mittwoch, 3.

[julia-users] BinDeps, Windows, and libraries with unclear licenses (NAIF SPICE)

2016-02-03 Thread Helge Eichhorn
Hi, I am developing a wrapper for the NAIF SPICE toolkit ( http://naif.jpl.nasa.gov/naif/) and I have run into some problems with BinDeps.jl along the way. My build.jl file is attached. *1. How can I provide OS-specific sources?* I tried the lines below but BinDeps downloads the OSX file

Re: [julia-users] Assigment inside a comprehension

2016-02-03 Thread Ján Dolinský
Hi guys, Thanks for the both answers. It clarifies the topic. Best Regards, Jan Dňa streda, 3. februára 2016 3:35:47 UTC+1 Cedric St-Jean napísal(-a): > > If you're looking for a one-liner, this works: > > for i in 1:10 tmp[1:i,i] = rand(i) end > > It looks gross at first, but eventually the

[julia-users] Abusing parametric types with pointers for overloading setfield!

2016-02-03 Thread Bart Janssens
Hi, Before getting to the main topic, let me give some context to avoid the XY problem: I am trying to implement a package for wrapping C++ classes, and now hit the stage where I want to do, on the Julia side: wrapped_cpp_object.somefield = newvalue In doing so, appropriate methods should be

[julia-users] Strangely formatted HTTP response (Pkg.publish())

2016-02-03 Thread andrew cooke
anyone else seeing this? INFO: Validating METADATA INFO: Pushing ParserCombinator permanent tags: v1.7.5, v1.7.6 INFO: Submitting METADATA changes INFO: Forking JuliaLang/METADATA.jl to andrewcooke ERROR: strangely formatted HTTP response in curl at pkg/github.jl:53 in req at pkg/github.jl:99

Re: [julia-users] are tasks threads in 0.4?

2016-02-03 Thread andrew cooke
this turned out to be two problems, one the "real" bug, and the other, causing the thread lock, was a "debugging" print within code called by print. which i think has bitten me before... On Saturday, 30 January 2016 14:11:29 UTC-3, andrew cooke wrote: > > > i guess that makes sense. thanks.

[julia-users] Read from a PipeEndpoint in a non-blocking way?

2016-02-03 Thread STAR0SS
I want to read data from a PipeEndpoint, there's readavailable for that but it's blocking when there's nothing to read. Is it possible to read in a non-blocking way, i.e. returns nothing if there's nothing to read ? I haven't found much about this in the docs. Thanks!

[julia-users] Re: Julia vs Matlab: interpolation and looping

2016-02-03 Thread pokerhontas2k8
Thanks for the research. I also did some testing with the original code and to me it seems like the problem has nothing to do with the interpolation method but with the memory allocation. Matlab is just faster because it doesn't reallocate memory in every iteration, as you said. It also

Re: [julia-users] @everywhere using Images gives error

2016-02-03 Thread Tim Holy
Try something like for p in workers() remotecall_wait(p, eval, :(using Images)) remotecall_wait(p, eval, :(using ImageMagick)) end and see if that helps. If that works and what you tried earlier doesn't, please file an issue. --Tim On Tuesday, February 02, 2016 08:21:56 PM Abhinanda

[julia-users] Re: Elapsed CPU time in Julia?

2016-02-03 Thread Christopher Alexander
Try doing something like: tic() # my code toc() On Wednesday, February 3, 2016 at 3:28:28 PM UTC-5, Lytu wrote: > > Hello Julia users, > > Can someone tell me what's the equivalent of matlab elapsed cputime in > Julia > > For example i Matlab, we can do this: > >t = cputime; >x=4; > >

Re: [julia-users] Re: Elapsed CPU time in Julia?

2016-02-03 Thread Milan Bouchet-Valat
Le mercredi 03 février 2016 à 12:55 -0800, Christopher Alexander a écrit : > Try doing something like: > > tic() > # my code > toc() Be careful with tic() and toc() in Julia. In most cases, when benchmarking, you should wrap your code in a function to make sure it gets specialized on the argument

Re: [julia-users] Elapsed CPU time in Julia?

2016-02-03 Thread Tim Holy
I'm not sure there's currently a way to get CPU time directly, although it's just a couple ccalls so it wouldn't be hard to implement. Out of curiosity, why do you want it? CPU time is often quite misleading; for a multithreaded operation, it sums all the time used by all the cores.

[julia-users] Elapsed CPU time in Julia?

2016-02-03 Thread Lytu
Hello Julia users, Can someone tell me what's the equivalent of matlab elapsed cputime in Julia For example i Matlab, we can do this: t = cputime; x=4; iter = 1; z = ones(1,4); y=x*2*z; e = cputime-t But in Julia i don't seem to find how to do this. I thought i can use

Re: [julia-users] Re: Elapsed CPU time in Julia?

2016-02-03 Thread Stefan Karpinski
You may want to check out Benchmarks.jl , which goes to significant lengths to do benchmarking correctly. On Wed, Feb 3, 2016 at 4:05 PM, Milan Bouchet-Valat wrote: > Le mercredi 03 février 2016 à 12:55 -0800, Christopher

[julia-users] Re: PyPlot and art3D

2016-02-03 Thread Steven G. Johnson
On Tuesday, February 2, 2016 at 5:49:48 PM UTC-5, Alex Dowling wrote: > > Hello, > > I'm having trouble finding examples for using art3D through the PyPlot > module in Julia. Ultimately I'd like to reproduce this example: >

Re: [julia-users] Calling your own C Function

2016-02-03 Thread Stefan Karpinski
I.e. you need a .so file (or .dylib on OS X or .dll on Windows) not a .o file. On Tue, Feb 2, 2016 at 11:40 PM, Yichao Yu wrote: > On Tue, Feb 2, 2016 at 11:29 PM, Chris Rackauckas > wrote: > > Hey, sorry if this is a really noob question, but how does

Re: [julia-users] Read from a PipeEndpoint in a non-blocking way?

2016-02-03 Thread Stefan Karpinski
One doesn't generally do non-blocking I/O in Julia. Instead, you spawn multiple Tasks, which are automatically scheduled when there's work to do. What are you trying to accomplish? On Wed, Feb 3, 2016 at 6:39 AM, STAR0SS wrote: > I want to read data from a PipeEndpoint,

Re: [julia-users] Re: recommended graphics packages for multiple curves on a single canvas

2016-02-03 Thread j verzani
You can likely use the `@manipulate` macro of `Interact` with the `plotly` backend of `Plots` to achieve this with just a bit of coding. On Wednesday, February 3, 2016 at 9:30:10 AM UTC-5, Michael Landis wrote: > > I would appreciate suggestions on which back-end might best facilitate >

Re: [julia-users] Re: Plotting (Greek letter label, high resolution...)

2016-02-03 Thread Tom Breloff
You are doing this from the Julia REPL, or something else? It should work inside the Julia REPL, if not maybe you should file an issue? https://github.com/JuliaLang/julia/issues On Wed, Feb 3, 2016 at 4:22 AM, digxx wrote: > That it what I try to emphasize with the 3

Re: [julia-users] Re: recommended graphics packages for multiple curves on a single canvas

2016-02-03 Thread Michael Landis
I would appreciate suggestions on which back-end might best facilitate visualizing and manipulating a six dimensional model, maybe using three dimensional projections where the user can select (via check box?) any three dimensions and subsequently rotate/zoom the resulting 3D projection. On

[julia-users] BinDeps, Windows, and libraries with unclear licenses (NAIF SPICE)

2016-02-03 Thread Tony Kelman
Windows users are very rarely going to have a working build toolchain installed that will be compatible with julia. Providing dll's is the only sane path forward. If redistribution isn't allowed, try to pursue getting upstream to provide a shared library dll alternative for binaries?

Re: [julia-users] load a Julia dataframe from Microsoft SQL Server table

2016-02-03 Thread Stefan Karpinski
I've been working through encoding issues with this as well. To connect to Microsoft SQL Server, this patch made things work: diff --git a/src/backend.jl b/src/backend.jl index b5f24af..bf4ee11 100644 --- a/src/backend.jl +++ b/src/backend.jl @@ -40,7 +40,7 @@ end # Send query to DMBS function

Re: [julia-users] load a Julia dataframe from Microsoft SQL Server table

2016-02-03 Thread Tony Kelman
Try to avoid posting snippets of GPL-licensed code if at all possible. That license is viral and it's best not to run any risk of using code with that license in more-permissively-licensed Julia projects. Links are fine, as long as the license status of what you're linking to is clear. On

[julia-users] "WARNING: Forcibly interrupting busy workers" when trying parallel computing in script mode on server

2016-02-03 Thread Lutfullah Tomak
Hi. I'm not an expert of parallel stuff (Also, I cannot try it by myself) but my guess is you can fetch result so that main process does not close until it has the result. Namely, add this at the end of main.jl fetch(r)

Re: [julia-users] Read from a PipeEndpoint in a non-blocking way?

2016-02-03 Thread Stefan Karpinski
You're essentially using the IOBuffer to force sequentiality. Using a lock does this more directly. On Wed, Feb 3, 2016 at 7:11 PM, Miguel Bazdresch wrote: > > What I did is that I have a Task that reads from the Pipe and puts the > data in an IOBuffer, then read from that

[julia-users] Re: Elapsed CPU time in Julia?

2016-02-03 Thread Lytu
Thank you for your replies, but i can not use tic() #my code toc() because all i want is a CPU time, and i can't use @time myFunction because it's in the middle of the function, see the matlab code below. I do t0=cputime; on the first line of my function and t = [t cputime-t0]; on the sixth

Re: [julia-users] Issue with running external programs in Julia 0.3.8.

2016-02-03 Thread Yichao Yu
On Wed, Feb 3, 2016 at 6:01 PM, Michael Wojnowicz wrote: > Hi Julia Users, > > > I'm running Julia 0.3.8, commit 507821*. I want to search through a csv to > find line numbers of rows which match an expression, in this case "=", and > then save the resulting row indices to a

Re: [julia-users] Issue with running external programs in Julia 0.3.8.

2016-02-03 Thread Michael Wojnowicz
Dear Yichao, Ah. That makes sense now. Thank you. -Mike On Wednesday, February 3, 2016 at 3:33:11 PM UTC-8, Yichao Yu wrote: > > On Wed, Feb 3, 2016 at 6:01 PM, Michael Wojnowicz > wrote: > > Hi Julia Users, > > > > > > I'm running Julia 0.3.8, commit 507821*. I want

[julia-users] Re: Plotting with Plot

2016-02-03 Thread digxx
The error its giving me is: WARNING: Keyword argument axis not supported with Plots.GadflyPackage(). Choose from:

Re: [julia-users] Read from a PipeEndpoint in a non-blocking way?

2016-02-03 Thread Miguel Bazdresch
> What I did is that I have a Task that reads from the Pipe and puts the data in an IOBuffer, then read from that in the loop instead, it seems to work. That is what I do, with strings instead of IOBuffers. It does seem to work. -- mb On Wed, Feb 3, 2016 at 11:04 AM, STAR0SS

Re: [julia-users] Plotting with Plot

2016-02-03 Thread Tom Breloff
Hmm... I figured that error message would be self-explanatory. Gadfly doesn't support right axes (that I know of)... Try PyPlot, GR, or Qwt? On Wednesday, February 3, 2016, digxx wrote: > The error its giving me is: > WARNING: Keyword argument axis not supported with

Re: [julia-users] AVL Trees - SortedSet?

2016-02-03 Thread Kevin Squire
Not in a place where I can look at that link, but yes, SortedSet and SortedDict are base on AVL trees. Cheers, Kevin On Wednesday, February 3, 2016, Ben Ward wrote: > Hi, > > I'm looking to implement a C library in Julia which makes use of another > library which

[julia-users] Issue with running external programs in Julia 0.3.8.

2016-02-03 Thread Michael Wojnowicz
Hi Julia Users, I'm running Julia 0.3.8, commit 507821*. I want to search through a csv to find line numbers of rows which match an expression, in this case "=", and then save the resulting row indices to a file. In terminal, I can do this: grep -n -v "="

Re: [julia-users] Elapsed CPU time in Julia?

2016-02-03 Thread Kevin Squire
Benchmarks is great! JMW, any chance you can register it as an official package (and deprecate Benchmark.jl). (I guess I could file an issue.) Cheers, Kevin On Wednesday, February 3, 2016, Stefan Karpinski wrote: > You may want to check out Benchmarks.jl >

Re: [julia-users] Cannot pull with rebase...?

2016-02-03 Thread Joshua Duncan
If anyone is interested, just deleting your v0.4 library folder and then running Pkg.update() will fix this problem. On Friday, January 29, 2016 at 7:45:26 PM UTC-6, Joshua Duncan wrote: > > Have you resolved this problem? I have the same errors as you. Just > installed v0.4.3 on Windows 10.

[julia-users] Solve ode with initial conditions

2016-02-03 Thread jmarcellopereira
I want to solve an ode with initial conditions. For example using SymPy f = SymFunction("f") x,y = Sym("x,y") edo1 = SymPy.diff(f(x),x) + x SymPy.dsolve(edo1) f(x) == C1 - x^2/2 How to solve C1?

[julia-users] Re: Announcing "Persist": Evaluating Julia expressions in the background

2016-02-03 Thread William Patterson
Hi Eric, I think this package is great. It increases code readability and provides functionality otherwise unavailable in Julia and other languages. I do have one question though: How do I set slurm parameters such as --mem-per-cpu, --cpus-per-task, etc? Forgive me if this has already been

Re: [julia-users] Read from a PipeEndpoint in a non-blocking way?

2016-02-03 Thread STAR0SS
I have something of the sort: #some loop ... s = get_data_from_pipe() do_something_with(s) I need do_something_with to happen synchronously within the loop, so I cannot run that in a Task, and if get_data_from_pipe blocks then it kills my loop. What I did is that I have a Task

Re: [julia-users] Read from a PipeEndpoint in a non-blocking way?

2016-02-03 Thread Stefan Karpinski
Do you mean that you can't have multiple instances of do_something_with running at the same time on different inputs? One approach would be to put a lock around that call, e.g. something like this: julia> @time @sync for i = 1:20 @async begin t = 3*rand()

Re: [julia-users] Re: Plotting (Greek letter label, high resolution...)

2016-02-03 Thread digxx
not quite sure what I belong to: I am using the REPL Julia interface only for include("") to read/run my files i wrote in notepad. Does this still belong to REPL or what does it differ to IJulia for example (which I have never used yet)

[julia-users] Plotting with Plot

2016-02-03 Thread digxx
Using Gadfly backend https://github.com/tbreloff/Plots.jl gave one example of axis=:auto but apparently this example is somewhat different from what I want. I have the date x=linspace(0,2pi,50) y=sin(x) plot(x,y,axis=:left) works fine but I want plot(x,y,axis=:right) which doesnt work. Even

[julia-users] AVL Trees - SortedSet?

2016-02-03 Thread Ben Ward
Hi, I'm looking to implement a C library in Julia which makes use of another library which contains a sorted dictionary called a AVL table. I don't know much about the technical internals of ALV table, and the C looks complicated to get into, if Julia already has something that does the job.

[julia-users] Re: Elapsed CPU time in Julia?

2016-02-03 Thread Lutfullah Tomak
Hi You may look what @time/@elapsed uses for timings macroexpand(:(@time begin; 2+2; end)) or macroexpand(:(@elapsed begin; 2+2; end)) >From these, It looks like you can use time_ns()

[julia-users] PyCall Seaborn error

2016-02-03 Thread St Elmo Wilken
Hi all, I'm trying to load the Python package Seaborn using Julia. I''m attempting: using PyCall @pyimport seaborn as sb This generates the following warning in a new window: "Runtime Error! Program: C:\Users\St. Elmo\AppData\Local\Julia-0.4.2\bin\julia.exe R6034 An application has made an

Re: [julia-users] load a Julia dataframe from Microsoft SQL Server table

2016-02-03 Thread Scott Jones
On Wednesday, February 3, 2016 at 9:48:24 AM UTC-5, Stefan Karpinski wrote: > > I've been working through encoding issues with this as well. To connect to > Microsoft SQL Server, this patch made things work: > > diff --git a/src/backend.jl b/src/backend.jl > index b5f24af..bf4ee11 100644 > ---

[julia-users] Mutual reference between scripts

2016-02-03 Thread Cristian Garcia
Hi, I a new Julia user. I am having trouble understanding how to create a structured project. I'd like to split my code into separate files (as you'd expect). I am using "include" to create references between scripts but I run into a "stackoverflow" because of mutual references. I have two

[julia-users] Re: Solve ode with initial conditions

2016-02-03 Thread j verzani
There may be a better way, but here is one that works: * extract the RHS of the output: eqn = rhs(out) * find the symbol for C1 from the output of free_symbols(eqn) * if (x0,y0) are your initial conditions, then: solve(eqn(x=>x0) - y0, C1) On Wednesday, February 3, 2016 at 10:43:30 PM UTC-5,

Re: [julia-users] Calling your own C Function

2016-02-03 Thread Chris Rackauckas
Thanks for the link. That explained what's going on. I thought I could just double check by calling from the command line, but that was wrong. When I called main from Julia, it worked and I got back 0 (since that's what main returns. I guess it doesn't get the stdout as well? I can find that

Re: [julia-users] Calling your own C Function

2016-02-03 Thread Chris Rackauckas
Thanks for the replies. I mixed the compile commands from here with the information on the libraries to link

Re: [julia-users] Calling your own C Function

2016-02-03 Thread Tero Frondelius
You haven't figured out the basic concept. Start reading here: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html Basically all those -lsomethings are libgsl.so, libm.so etc. Now you will need to make your main program and link it against your libEx.so with -lEx in the linking

[julia-users] Re: array size

2016-02-03 Thread Davide Lasagna
Cool. Thanks. On Wednesday, February 3, 2016 at 2:26:12 AM UTC, Cedric St-Jean wrote: > > I think it's related to some old Matlab convention that Julia inherited, > where there is an implicit infinity of singleton dimensions: > > rand(5,5)[2,2,1,1] # this is valid > rand(5,5)[1,:] # Returns a

Re: [julia-users] readall() from osascript process (MacOS X)?

2016-02-03 Thread Josef Sachs
> On Wed, 3 Feb 2016 11:03:07 -0800 (PST), said: > I'd like to get some information from running the `osascript` command on > MacOS X, For example: > julia> run(`osascript -e "display dialog \"Character\" default answer > \"#\""`) > button returned:OK, text

Re: [julia-users] load a Julia dataframe from Microsoft SQL Server table

2016-02-03 Thread Terry Seaward
>From R, it seems like the encoding is based on the connection (as opposed to being hard coded). See `enc <- attr(channel, "encoding")` below: ``` > RODBC::odbcQuery function (channel, query, rows_at_time = attr(channel, "rows_at_time")) { if (!odbcValidChannel(channel))

Re: [julia-users] Re: Plotting (Greek letter label, high resolution...)

2016-02-03 Thread digxx
Ok now im home and see the problem. I never use repl for plotting. I just use notepad++ and run it. \gamma turns into the actual letter when pressing tab, but not in the notepad obviously ;) So is there a way to still do it?

Re: [julia-users] Re: Plotting (Greek letter label, high resolution...)

2016-02-03 Thread digxx
apart from using repl...

[julia-users] readall() from osascript process (MacOS X)?

2016-02-03 Thread cormullion
I'd like to get some information from running the `osascript` command on MacOS X, For example: julia> run(`osascript -e "display dialog \"Character\" default answer \"#\""`) button returned:OK, text returned:# julia> typeof(ans) Void I tried to use `readall` to read the result

Re: [julia-users] Re: Plotting (Greek letter label, high resolution...)

2016-02-03 Thread Stefan Karpinski
You can enter Unicode characters using Unicode escapes, e.g. julia> "\u03b3" "γ" Windows has various ways of inputting Unicode characters like γ: http://www.johndcook.com/blog/2008/08/17/three-ways-to-enter-unicode-characters-in-windows/ You may also want to try an editor that has support

[julia-users] "WARNING: Forcibly interrupting busy workers" when trying parallel computing in script mode on server

2016-02-03 Thread Wenjie
I am trying a test parallel computation with # main.jl require("step.jl") x=5 r=@spawn f(x) f(x) is a function I define in step.jl, when computing locally, it could take one minute or more. I run this on a server, in script mode, with julia -p 2 main.jl However, I always get "WARNING:

[julia-users] Re: Simultaneous audio playback / recording.

2016-02-03 Thread Sebastian Kraft
Hi, in the last weeks I started a PortAudio.jl package (based on parts of the AudioIO.jl package). It is still under development and far from perfect, but should already work well for basic audio IO. https://github.com/seebk/PortAudio.jl Sebastian

[julia-users] ReverseDiffSource on a nonlinear function with three plus variables

2016-02-03 Thread Eliot Abrams
Hello, I'm trying to use ReverseDiffSource to produce the exact Jacobian for a pretty simple nonlinear function below. Testfunction works fine, but testfunction2 produces the error reprinted. Could someone explain what might be going wrong? Thanks! Eliot using ReverseDiffSource

[julia-users] Re: Juno IDE

2016-02-03 Thread David Blake
Thanks for your reply Archie, I've been playing around with it a bit more and sort of get it now. For instance, I just increased the font size in the editor. Normally I'd do this via an Edit->Preferences dialog box or something but with LT it seems its done via a command which opens a file

Re: [julia-users] Signature for function accepting array of parameterised types

2016-02-03 Thread Samuel Powell
Thank you for the pointers: I had not seen these issues. S. On Tuesday, 2 February 2016 09:11:32 UTC, Mauro wrote: > > > For the purposes of readability, is there any syntax by which I can > avoid > > explicit parameterisation of the function? I am thinking of something > like > > this: > >

Re: [julia-users] Juno IDE

2016-02-03 Thread David Blake
Hi Mike and others, I didn't make it very clear with my original post but I do think it's really great you guys put these programs together and release them for free for all to use. I've been using Juno all day today and I'm getting pretty used to it now. Installed it on my laptop so I can

[julia-users] Re: Julia vs Matlab: interpolation and looping

2016-02-03 Thread nuffe
1) Your Matlab code is not doing exactly the same as the Julia code 2) The answer to your question about the difference between timings and looped timings can be seen from these two lines 0.000565 seconds (13 allocations: 1.603 MB) > > 3.205262 seconds (118.99 k allocations: 15.651 GB, 14.08%

Re: [julia-users] load a Julia dataframe from Microsoft SQL Server table

2016-02-03 Thread Terry Seaward
PS, thanks for the patch.