[julia-users] Re: Images imwrite PNG with Alpha transparency

2014-06-23 Thread Yakir Gagnon
Right, this isn't ideal because the transparency is discretely expressed as either white or nothing. I'd rather have a gradient of opacity (just like any other color, 256 levels?). On Tuesday, June 24, 2014 3:14:29 PM UTC+10, Yakir Gagnon wrote: > > Just as an alternative, one cold post process

[julia-users] Re: Images imwrite PNG with Alpha transparency

2014-06-23 Thread Yakir Gagnon
Just as an alternative, one cold post process the imae with imagemagick. The trick is to code the image with the colormap so that the transparent part will be white and: run(`convert name.png -transparent white name.png`) On Tuesday, June 24, 2014 3:00:44 PM UTC+10, Yakir Gagnon wrote: > > Ho

[julia-users] Images imwrite PNG with Alpha transparency

2014-06-23 Thread Yakir Gagnon
How, if possible, can I imwrite a PNG image that has transparency in it? I'm assuming something like: using Images imwrite( I,"name.png",alpha=A) Thanks!

[julia-users] Terminate batch job crashes REPL

2014-06-23 Thread Arrigo Benedetti
I am running the 0.2.1 binary distribution under Windows 8.1. When I hit CTRL-C at the console to stop a running program I get the prompt: Terminate batch job (Y/N)? No matter of what I type the console crashes. Is there any fix for this? Thanks -Arrigo

Re: [julia-users] VM installation problem

2014-06-23 Thread robtsiegfried
Thanks. Somewhat embarrassed. That requirement was on the website. On Sunday, June 22, 2014 5:03:58 PM UTC-7, Keno Fischer wrote: > > You need to install the `patch` command. > > > On Sun, Jun 22, 2014 at 8:02 PM, > > wrote: > >> Installation in OpenSuSE 13.1 running in VMware Workstation fails w

[julia-users] Re: 100 Julia exercises

2014-06-23 Thread Aerlinger
Very cool! Would be interesting to see some examples that utilize the functional aspects of the Julia language. On Sunday, June 22, 2014 10:43:32 AM UTC-4, Michiaki Ariga wrote: > > Hi all, > > I'm a Julia newbee, and I'm trying to learn Julia and wrote Julia version > of rougier's 100 numpy exe

[julia-users] Re: Multiple layers with Gadfly

2014-06-23 Thread Tomas Lycken
You could create a function which, given a symbol, generates the layer for you: ``` getlayer(s) = layer(x=:x, y=s, Geom.line) ``` Next, you can use this function to get the layers you need: ``` plot(df, getlayer(:y1), getlayer(:y2), Guide.xlabel("k")) # equivalently: plot(df, layer(x=:x, y=:y1,

[julia-users] Re: 100 Julia exercises

2014-06-23 Thread Alireza Nejati
Actually, a slight modification. The way I wrote it, it will compute the product of all matrices with all vectors (pxp mults), which is not what you want. You just want each matrix to multiply its respective vector (p mults). The solution to that is: p = length(matlist) reduce(+, [matlist[i]*ve

Re: [julia-users] Re: 100 Julia exercises

2014-06-23 Thread Jacob Quinn
Feel free to check out (and contribute!) to https://github.com/quinnj/Rosetta-Julia. I started it when I first got involved with julia and it's got a fair number of examples and exercises. -Jacob On Jun 23, 2014 5:52 PM, "Alireza Nejati" wrote: > Actually that's not a bad idea; someone should st

[julia-users] Re: 100 Julia exercises

2014-06-23 Thread Alireza Nejati
Actually that's not a bad idea; someone should start a Julia-specific exercise repo. About Expert.4, I'm not sure how you're running it, but matlist and veclist should obviously be lists of matrices and vectors, respectively. matlist = Matrix[rand(4,4), rand(4,4)] veclist = Vector[rand(4), rand

[julia-users] Multiple layers with Gadfly

2014-06-23 Thread Leandro Seixas
Hello, I am trying to do graphs with multiple layers with Gadfly. I have a dataframe with many columns, one "x" and a lot of "y"s, and I want to plot this in a single graph. For two layers, I have the following: plot(df, layer(x="x", y=df[2], Geom.line), layer(x="x", y=df[3], Geom.line), Guid

Re: [julia-users] Will print/info/etc. block a coroutine?

2014-06-23 Thread Spencer Russell
OK, thanks. The coroutine should get rescheduled when the print is complete, right? I was having an issue where I was spawning the coroutine, then it was blocking on the info() and never being rescheduled. I haven't been able to reproduce it in a minimal example, so it's possible something else w

[julia-users] Julia talk at NAIS Workshop on code generation (Edinburgh, July 1)

2014-06-23 Thread Steven G. Johnson
I'll be giving a talk next week in Edinburg on code generation for high-performance computing in high-level languages, starting with FFTW and ending up with some Julia examples. This is at a larger NAIS workshop on code generation that might be of interest to Julians in the area: http://icms.

Re: [julia-users] Will print/info/etc. block a coroutine?

2014-06-23 Thread Jameson Nash
Yes. Any use of I/O may block a coroutine and allow other tasks to run. On Monday, June 23, 2014, Spencer Russell wrote: > I'm debugging some coroutine concurrency stuff and using info() to spit > out debugging info during execution. > > I'm getting some confusing results (My coroutine is blocki

Re: [julia-users] Will print/info/etc. block a coroutine?

2014-06-23 Thread Keno Fischer
Printing will block until the print succeeds (the definition of this is slightly fuzzy I'm afraid - the most accurate answer is probably until it's in the kernel buffer ready to be printed), yes. On Mon, Jun 23, 2014 at 4:10 PM, Spencer Russell wrote: > I'm debugging some coroutine concurrency

[julia-users] Will print/info/etc. block a coroutine?

2014-06-23 Thread Spencer Russell
I'm debugging some coroutine concurrency stuff and using info() to spit out debugging info during execution. I'm getting some confusing results (My coroutine is blocking when I don't expect it to), so I wanted to check if printing to stdout ever causes a coroutine to block. peace, s

[julia-users] Re: Assign one array to another, and they stick to each other forever ?

2014-06-23 Thread Mikayla Thompson
An array is a reference type. Somewhere in memory, this array is created, but the actual value of the variable A is just the address to this array. When you say A0 = A, you're giving that same address to A0. So you can use either A or A0 to look at/modify/whatever the numbers in that array.

Re: [julia-users] Assign one array to another, and they stick to each other forever ?

2014-06-23 Thread John Myles White
The fast answer is that you want a copy of A, produced using copy(A). Somebody else will probably fill in more details of the why. -- John On Jun 23, 2014, at 9:42 AM, JuliaLover wrote: > Hi, > I have a problem that when I assign value of one array to another they stick > to each other whene

[julia-users] Assign one array to another, and they stick to each other forever ?

2014-06-23 Thread JuliaLover
Hi, I have a problem that when I assign value of one array to another they stick to each other whenever I change either array. For example, A = [1,2,4,6] A0 = A then now I just want to change last value of A. A[4] =0 A change to [1,2,4,0] But now "A0" also automatically updates its values, A0

Re: [julia-users] writable root directory?

2014-06-23 Thread Davide Lasagna
For future reference, the Github issue is here . Davide On Monday, June 23, 2014 6:35:32 PM UTC+1, Davide Lasagna wrote: > > Ok, > > I will open an issue > > Davide > > On Monday, June 23, 2014 3:49:12 PM UTC+1, Isaiah wrote: >> >> The problem her

Re: [julia-users] Test for a warning

2014-06-23 Thread Laszlo Hars
We could summarize our finding so far about the Julia console output ~ For Windows, with the latest nightly 0.3.0 Julia version - Warnings are written to STDERR, they can easily be redirected, captured to a variable - Error messages might or might not get written to STDERR, but they cannot be ca

Re: [julia-users] writable root directory?

2014-06-23 Thread Davide Lasagna
Ok, I will open an issue Davide On Monday, June 23, 2014 3:49:12 PM UTC+1, Isaiah wrote: > > The problem here is that the underlying ios implementation is only valid > for files. Please open an issue. > > julia> iswritable("/foo") > false > > > On Mon, Jun 23, 2014 at 10:46 AM, Tomas Lycken >

Re: [julia-users] Can I use Int32 as default int type on x86-64 system?

2014-06-23 Thread Ivar Nesje
There is also Cint kl. 17:52:37 UTC+2 mandag 23. juni 2014 skrev Jacob Quinn følgende: > > You could grab one of the 32-bit binaries to download and use. Would that > work? Otherwise, if you're developing a library, if you do a ccall that > expects an Int32, you just have to make sure you specif

[julia-users] Re: Incoming Gadfly changes

2014-06-23 Thread Daniel Jones
Sorry to break Jewel support. I did a little digging in MDN. Here it says that the text field is a concatenation of contents of all the child text nodes. Now, text elements have a field wholeText

[julia-users] Re: Incoming Gadfly changes

2014-06-23 Thread Mike Innes
Turns out that I can't eval the Gadfly scripts because they are now inside SVGScriptElement blocks (as opposed to HTMLScriptElement), which don't have a .text property. Any javascript wizards around who know of a way around this? On Monday, 23 June 2014 09:45:43 UTC+1, Mike Innes wrote: > > Thi

Re: [julia-users] Can I use Int32 as default int type on x86-64 system?

2014-06-23 Thread Jacob Quinn
You could grab one of the 32-bit binaries to download and use. Would that work? Otherwise, if you're developing a library, if you do a ccall that expects an Int32, you just have to make sure you specify the argument types correctly adn the right calls to convert will be called automatically. ccall

[julia-users] Winston installation on Windows x64 (Cairo, LibCURL and Tk had build errors)

2014-06-23 Thread De Prins Maxime
Hello my problem is this : _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "help()" to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version

[julia-users] Can I use Int32 as default int type on x86-64 system?

2014-06-23 Thread Tchew Quain
Hi every body In julia, all the integer value are Int64 as default. But it is not convenient when calling C/Fortran which the defualt int is Int32. I tried use --int-literals=32 to launch julia. But this option only make the literal integer value as int32. And even most intrinsic functions do

[julia-users] Winston installation on windows (Cairo, LibCURL and Tk had build errors)

2014-06-23 Thread De Prins Maxime
_ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "help()" to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.2.1 (2014-02-11 06:30 UTC)

[julia-users] Re: 100 Julia exercises

2014-06-23 Thread Michiaki Ariga
Thank you for your kind replies. I noticed that I'm not familiar with array comprehension style in Julia. I added your solutions to my repos. (If you have any problem to do it, please tell me) As Alireza said, this is just a translation from numpy, but I believe there are good questions suitable

Re: [julia-users] writable root directory?

2014-06-23 Thread Isaiah Norton
The problem here is that the underlying ios implementation is only valid for files. Please open an issue. julia> iswritable("/foo") false On Mon, Jun 23, 2014 at 10:46 AM, Tomas Lycken wrote: > No, only that the *owner* has write permissions. The owner is `root`, but > the current user is `tly

Re: [julia-users] writable root directory?

2014-06-23 Thread Tomas Lycken
No, only that the *owner* has write permissions. The owner is `root`, but the current user is `tlycken`, who *doesn't* have write permissions. // T On Monday, June 23, 2014 4:19:05 PM UTC+2, John Myles White wrote: > > What’s dubious about it? Doesn’t the permission sequence shown demonstrate >

[julia-users] Re: How to improve performance in cumsum

2014-06-23 Thread Dahua Lin
Hi, Charles, Looks like you are doing sampling based on given/computed probabilities. You might want to checkout the sampling facilities provided in StatsBase (see http://statsbasejl.readthedocs.org/en/latest/sampling.html for details). That package provides a series of optimized sampling algo

[julia-users] more questions about sorted associative array

2014-06-23 Thread vavasis
Dear Julia colleagues, As mentioned in earlier posts, I'm working on a 2-3 tree implementation of sorted associative arrays (analogous to map and multimap in C++). This is like Dict in Julia, except that the key/value pairs can be retrieved in sort-order on the keys. For my preliminary imple

Re: [julia-users] writable root directory?

2014-06-23 Thread Davide Lasagna
Julia returns a writable root folder when it is run as normal user. Probably just a bug? julia> iswritable("/") true shell> touch /pippo touch: cannot touch '/pippo': Permission denied shell> ls -l / No supported Python (2.4 / 2.6 / 2.7) version available. total 52 lrwxrwxrwx 1 root root

Re: [julia-users] writable root directory?

2014-06-23 Thread John Myles White
What’s dubious about it? Doesn’t the permission sequence shown demonstrate that the user has write permissions? — John On Jun 23, 2014, at 7:17 AM, Tomas Lycken wrote: > Seems dubious to me: > > julia> iswritable("/") > true > > shell> ls -la / > total 142 > drwxr-xr-x 24 root root 4096 j

[julia-users] installation behind a few walls

2014-06-23 Thread Andreas Lobinger
Hello colleagues, initially this was: https://groups.google.com/forum/?fromgroups#!topic/julia-dev/BHAfR0PxEHo I have managed to set my/our http proxy for the git. So this works: D:\addprogram\Julia 0.3.0-prerelease>julia.lnk _ _ _ _(_)_ | A fresh approach to technic

Re: [julia-users] writable root directory?

2014-06-23 Thread Tomas Lycken
Seems dubious to me: julia> iswritable("/") true shell> ls -la / total 142 drwxr-xr-x 24 root root 4096 jun 11 09:16 . shell> whoami tlycken `tlycken` is a sudoer, but if I start the REPL as `sudo julia`, `;whoami` returns `root`, so I don't think that's the problem. // T On Monday, June

Re: [julia-users] writable root directory?

2014-06-23 Thread Davide Lasagna
davide@arcturus - ~$: ls -l / total 52 lrwxrwxrwx 1 root root 7 Jun 4 15:39 bin -> usr/bin drwxr-xr-x 3 root root 4096 Jun 13 11:06 boot drwxr-xr-x 18 root root 3260 Jun 20 11:34 dev drwxr-xr-x 89 root root 4096 Jun 18 16:36 etc drwxr-xr-x 7 root root 4096 May 27 10:11 home lrwxrwx

Re: [julia-users] writable root directory?

2014-06-23 Thread John Myles White
Even with -l? — John On Jun 23, 2014, at 7:14 AM, Davide Lasagna wrote: > The output is my linux root folder: /bin, /boot, > > On Monday, June 23, 2014 3:07:12 PM UTC+1, John Myles White wrote: > This seems hard to know without also seeing the output of `ls -l /` > > — John > > On Jun

Re: [julia-users] writable root directory?

2014-06-23 Thread Davide Lasagna
The output is my linux root folder: /bin, /boot, On Monday, June 23, 2014 3:07:12 PM UTC+1, John Myles White wrote: > > This seems hard to know without also seeing the output of `ls -l /` > > — John > > On Jun 23, 2014, at 7:06 AM, Davide Lasagna > wrote: > > Hi, > > Is this a bug? > > jul

Re: [julia-users] writable root directory?

2014-06-23 Thread John Myles White
This seems hard to know without also seeing the output of `ls -l /` — John On Jun 23, 2014, at 7:06 AM, Davide Lasagna wrote: > Hi, > > Is this a bug? > > julia> iswritable("/") > true > > (running from repl as normal user) > > Davide

[julia-users] writable root directory?

2014-06-23 Thread Davide Lasagna
Hi, Is this a bug? julia> iswritable("/") true (running from repl as normal user) Davide

[julia-users] Specifying package testing dependencies

2014-06-23 Thread Tomas Lycken
A while a go there was some discussion and a pull request to handle test-specific dependencies of packages, so that packages can say that “to run, I need this and that package, but if you want to run the tests I also need those two”. From reading

Re: [julia-users] Re: package proposal

2014-06-23 Thread Andrei Berceanu
By the way I recently stumbled upon NLSolve.jl, and asked them if they would be interested in PHCpack https://github.com/EconForge/NLsolve.jl/issues/12 Still no reply on their part yet though. On Monday, June 23, 2014 1:06:03 PM UTC+2, Andrei Berceanu wrote: > > Free binary versions for Mac and

[julia-users] Re: Julia advice/idioms for interacting with a REST api?

2014-06-23 Thread Avik Sengupta
There were a few HTTP clients in Julia. Requests is written mostly in pure julia, and is probably the easiest to use. However, as you saw, it doesnt seem to support gzipped responses yet. If you wanted to unzip the responses yourself, take a look at https://github.com/kmsquire/GZip.jl . One of

Re: [julia-users] Re: package proposal

2014-06-23 Thread Andrei Berceanu
Free binary versions for Mac and Windows of the gnu-ada compiler are available at http://libre.adacore.com/ and are very easy to install. As for HOMPACK, the main difference is that PHCpack is specifically targeted for polynomial systems. HOMPACK provides continuation methods for general nonline

Re: [julia-users] Macros versus expression objects

2014-06-23 Thread Ivar Nesje
> > Also note that since a macro is only an AST manipulation, it can't do > anything that couldn't be done by typing that same AST into your function > in the first place > This is almost true, but note that there are some cases where a macro might generate Expression object that does not have

Re: [julia-users] how to programmatically access/change fields of a type

2014-06-23 Thread Ivar Nesje
In case you REALLY need the eval, you should consider abandoning parse(str::String) for a quoted expression with :() eval(:(x.$nm = newval[$nm])) Ivar kl. 21:50:09 UTC+2 lørdag 21. juni 2014 skrev Florian Oswald følgende: > > beautiful! thanks. > > > On 21 June 2014 20:41, Mauro > wrote: > >>

[julia-users] Re: 100 Julia exercises

2014-06-23 Thread Billou Bielour
I'm not sure and array of tuple is what you want in the meshgrid case, I mean can you use it to compute say cos(X*Y) (which is usually what you want to use meshgrid for) ? It's also linked to the problem of evaluating a Gaussian, the solution given here use meshgrid: X, Y = meshgrid(linspace(-1

[julia-users] Re: Incoming Gadfly changes

2014-06-23 Thread Mike Innes
This looks great. Unfortunately it did break the interactivity on Light Table as predicted, but hopefully that'll be easy to fix. But the plots now display properly even without JS, which is nice. One issue is that plots don't show up well against dark backgrounds – you might want to consider a