Re: [julia-users] Failing to update variable in while loop (Newbie)

2016-05-09 Thread Yichao Yu
On Mon, May 9, 2016 at 9:33 PM, David Enocksson wrote: > I have an issue in my program and I think it has to do with a nested while > loop, related to the following situation: > > a = 1:1:10 > iter1 = 0 > iter2 = 0 > > while iter1 < 10 > >iter1 = iter1 + 1 > >

[julia-users] Re: Newbie Question: Command Line Woes

2016-05-09 Thread Cedric St-Jean
hello.jl defines the hello() function, but you need to call it to get some output. For instance, function hello() println("Hello World") return end hello() hello() will print "Hello World" twice. On Monday, May 9, 2016 at 10:59:05 PM UTC-4, rich2...@gmail.com wrote: > > Newbie

[julia-users] Newbie Question: Command Line Woes

2016-05-09 Thread rich2 . 7182
Newbie question: Why don't I get any output from the following programs when I run them from the command line on my Macbook pro (OS 10.11.4) or two different versions of Linux. Everything works as expected when the programs are run in the REPL. On the Mac I use the following in my PATH.

[julia-users] Failing to update variable in while loop (Newbie)

2016-05-09 Thread David Enocksson
I have an issue in my program and I think it has to do with a nested while loop, related to the following situation: a = 1:1:10 iter1 = 0 iter2 = 0 while iter1 < 10 iter1 = iter1 + 1 while iter2 < 1 iter2 = iter2 + 1

[julia-users] Re: IJulia- Failed to precompile IJulia to C:\Users\....\.julia\lib\v0.4\IJulia.ji in error at error.jl:21

2016-05-09 Thread Steven G. Johnson
Were you editing the src/IJulia.jl file for debugging purposes or something? What does `Pkg.status()` say?

[julia-users] IJulia- Failed to precompile IJulia to C:\Users\....\.julia\lib\v0.4\IJulia.ji in error at error.jl:21

2016-05-09 Thread ÜÖ
IJulia does not start at Julia. It gives the following error. I am using 0.4.3 on Windows 10, x86_64-w64-mingw32. Thank you for your kind help. julia> using IJulia INFO: Precompiling module IJulia... ERROR: LoadError: syntax: extra token "set_verbose" after end of expression in

[julia-users] Slicing arrays with slicedim

2016-05-09 Thread Davide Lasagna
Hi, on v0.4.5, why is slicedim not dropping singleton dimensions as slice does? Example: julia> A = randn(3, 4) 3x4 Array{Float64,2}: 2.31181 -1.7222-0.654665 -0.836633 -0.236305 0.389242 0.613524 -0.0398548 0.670851 -0.53761 -1.608110.117274 julia> slice(A, 1,

Re: [julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-09 Thread Scott Jones
On Monday, May 9, 2016 at 11:09:27 AM UTC-4, Tom Breloff wrote: > > I haven't ever needed to plot > > > Wh---whaaat?? ;) > Yeah, seriously! Give me Emacs (or something with good Emacs bindings+extensibility), a C/C++ compiler (now Julia), and a debugger, and I'm a happy man. ;-) I think all

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Hakuna M.
Am Montag, 9. Mai 2016 19:03:18 UTC+2 schrieb Steven G. Johnson: > > > > No, I think sortperm(A, dim) would need to return an array of single-index > indices (i.e. to be used with A[i]). I posted a sample implementation for > 2d arrays in the issue linked above, which should suffice for your

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Steven G. Johnson
On Monday, May 9, 2016 at 9:53:29 AM UTC-4, Hakuna M. wrote: > > would be nearly the same as: > mapslices(sortperm, A, dim); > or? > No, I think sortperm(A, dim) would need to return an array of single-index indices (i.e. to be used with A[i]). I posted a sample implementation for 2d arrays

Re: [julia-users] Julia SQL

2016-05-09 Thread Alex Mellnik
To expand on what Jacob said, you can read a DataFrame into an in-memory SQLite table and then run SQL commands on that. However, unless you really need to use SQL there's probably a way to do the same operation faster (and with less code) using native DataFrame operations. If you can provide

[julia-users] Re: Macro as decorators

2016-05-09 Thread Andras Niedermayer
It's possible to have a macro in Julia that emulates Python decorators. But it's a separate question whether you really want to do it, there might be more efficient/elegant ways to achieve the same in Julia for a specific use case. Here's a macro that emulates Python decorators and an example

Re: [julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-09 Thread Tom Breloff
> > I haven't ever needed to plot Wh---whaaat?? ;) This is pretty straightforward: ​ ​ ​ Note: you might need to checkout master or dev of Plots (I'm on dev)... I can't ever remember when I implemented anything. On Mon, May 9, 2016 at 10:24 AM, Scott Jones wrote:

Re: [julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-09 Thread Miguel Bazdresch
> a line segment from the low_range to the high_range (with the top and bottom marked off with small horizontal lines), Gaston has support for plotting with error bars, which is exactly this type of plot. Current documentation is here:

[julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-09 Thread Scott Jones
My son Alex is building on what he did last year for his science project, where he used Julia to help do the calculations on the data he'd collected (basically, he's lazy [in a good way], he'd rather work with his dad to learn how to program something rather than do all all the basic arithmetic

Re: [julia-users] Macro as decorators

2016-05-09 Thread Kevin Squire
Possibly. Do you have a specific example in mind? That will probably get you a less ambivalent answer. :-) Cheers, Kevin On Monday, May 9, 2016, Ford Ox wrote: > Is it possible to write macro that will work as python decorator?

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Hakuna M.
Am Montag, 9. Mai 2016 15:26:48 UTC+2 schrieb Steven G. Johnson: > > Actually, see https://github.com/JuliaLang/julia/issues/16273 > Thanks for your answer. Sry, about my strange postings, there was an error, you have seen the other two postings below?. sortperm(A, dim) would be nearly the

[julia-users] Macro as decorators

2016-05-09 Thread Ford Ox
Is it possible to write macro that will work as python decorator?

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Steven G. Johnson
Actually, see https://github.com/JuliaLang/julia/issues/16273

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Steven G. Johnson
See https://github.com/JuliaLang/julia/issues/9258

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Hakuna M.
but I don't like the storage allocation of 'offset'. Is there a better way to do it? I would like to avoid for-loops. Is there a way to access the current index of mapslices (ciom) ? And do something like this: mapslices(x - > m[ x[:, ciom ], ciom], i, 1); or do i need to do a for? for

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Hakuna M.
currently I'm using: i = mapslices(sortperm, m, 1); offset=repmat( (0:(c-1))'.*r ,r, 1); #' v = m[offset+i];

[julia-users] Re: Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Hakuna M.
currently I'm using: i = mapslices(sortperm, m, 1); offset=repmat( (0:(c-1))'.*r ,r, 1); v = m[offset+i];

[julia-users] Best way to get indices and values at sorting (rows/columns of) a matrix?

2016-05-09 Thread Hakuna M.
Hi there, I'm new to Julia but have some experience with Matlab. To sort each column of a matrix M ( r rows, c columns) I can write in Matlab: test

Re: [julia-users] How to display the value of a variable in the title of a plot?

2016-05-09 Thread chobbes158
Steven - Sorry. I just saw your last reply. Thanks for the hints. `close("all")` works absolutely superbly. But Qt backend is far beyond my universe. Thanks again! On Friday, May 6, 2016 at 6:17:12 PM UTC+1, Steven G. Johnson wrote: > > > > On Friday, May 6, 2016 at 12:55:45 PM UTC-4,

[julia-users] Re: Set PATH in windows 10

2016-05-09 Thread Duane Wilson
Hi Tony, If you want to set a PATH environment variable in windows you need to do the following: 1) Go to Control Panel, System 2) Click advanced system settings 3) On the advanced tab click Environment Variables 4) Click edit on the PATH variable 5) Add a new folder path that points to the

[julia-users] Re: Pkg.publish problem

2016-05-09 Thread Robert DJ
It works -- and so is publish. Thanks! On Monday, May 9, 2016 at 9:45:52 AM UTC+2, Kristoffer Carlsson wrote: > > You can delete the tag and recreate it or force push to update the tag. > This thread seems to have a lot of good information: >

Re: [julia-users] Set PATH in windows 10

2016-05-09 Thread Michele Zaffalon
When Julia installs, it creates a link in the Start menu. If you right click on the Julia icon, you should be able to figure out the path to the Julia executable, julia.exe. That path should be ending with ...\bin\julia.exe. On Fri, May 6, 2016 at 6:56 AM, Yu Tony wrote: >

Re: [julia-users] Oracle ODBC

2016-05-09 Thread Stefan Karpinski
You have to install ODBC drivers yourself – the Julia package just provides an interface to them. On Mon, May 9, 2016 at 5:27 AM, John Kim wrote: > Hello > > I'm new to Julia and would like to start using it for various projects. > One such project requires me to access an

[julia-users] Oracle ODBC

2016-05-09 Thread John Kim
Hello I'm new to Julia and would like to start using it for various projects. One such project requires me to access an Oracle database. when using the ODBC package, the listdrivers() command only shows PostgreSQL and MySQL drivers installed by default. Are Oracle drivers available for

[julia-users] Displaying lambdas, zetas, and the rest of the unicode staff in the formulas

2016-05-09 Thread Андрей Логунов
When testing some of the functionality involving lambdas I encountered a problem with displaying a math symbol for lambda, like in A*V[:,1] - λ[1]*V[:,1], and later on discovered a disheartening news that the whole thing doesn't work for me, including s = "\u2200 x \u2203 y" . What I get is

[julia-users] Displaying lambdas, zetas, and the rest of the unicode staff in the formulas

2016-05-09 Thread Андрей Логунов
When testing some of the functionality involving lambdas I encountered a problem with displaying a math symbol for lambda, like in A*V[:,1] - λ[1]*V[:,1], and later on discovered a disheartening news that the whole thing doesn't work for me, including s = "\u2200 x \u2203 y" . What I get is

[julia-users] Pkg.publish problem

2016-05-09 Thread Kristoffer Carlsson
You can delete the tag and recreate it or force push to update the tag. This thread seems to have a lot of good information: http://stackoverflow.com/questions/19298600/tag-already-exists-in-the-remote-error-after-recreating-the-git-tag

[julia-users] Pkg.publish problem

2016-05-09 Thread Robert DJ
I'm having a weird problem iwth Pkg.publish. I've successfully tagged a new package version Pkg.tag("Deldir") INFO: Tagging Deldir v0.0.3 INFO: Committing METADATA for Deldir But when running `Pkg.publish()` (in Julia v0.4): INFO: Validating METADATA INFO: Pushing Deldir permanent tags:

Re: [julia-users] switch superior

2016-05-09 Thread Tamas Papp
Was there more recent discussion about switch? I think I missed it, last thing I am aware of is #5410. And of course see Switch.jl. In any case, I find the proposed syntax a bit obscure and complicated. I would prefer using the result of findfirst(x->input % x == 0,[2,3,5,7]) or if that does

Re: [julia-users] Re: why's my julia code running slower than matlab, despite performance tips

2016-05-09 Thread Yichao Yu
On Mon, May 9, 2016 at 2:04 AM, Yichao Yu wrote: > On Mon, May 9, 2016 at 1:15 AM, Ford Ox wrote: >> I have checked the link and read the article. Am I right that the parallel >> accelerator basically uses C code instead of julia to do the computation? >>

Re: [julia-users] Re: why's my julia code running slower than matlab, despite performance tips

2016-05-09 Thread Yichao Yu
On Mon, May 9, 2016 at 1:15 AM, Ford Ox wrote: > I have checked the link and read the article. Am I right that the parallel > accelerator basically uses C code instead of julia to do the computation? > That would be kinda shame dont you think? No I don't think so. IIUC it