Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Jan Drugowitsch
My aim is to write a Hamiltonian MCMC sampler that samples bound and drift parameter posteriors for bounded diffusion models while assuming some parametric form for how these bounds and the drift change over time. This requires the first and second derivative of the first-passage densities that

[julia-users] Re: Possible ways to avoid confusability issues with using superscripts in variable names

2015-07-02 Thread Kristoffer Carlsson
In my eyes this is a non issue. Symbols are symbols, 'x' is a symbol, '³' is a symbol, '∛' is a symbol. They all work the same. When you allow unicode it is always possible to write confusing code. On Friday, July 3, 2015 at 5:25:00 AM UTC+2, Scott Jones wrote: > > Starting in > https://githu

[julia-users] Possible ways to avoid confusability issues with using superscripts in variable names

2015-07-02 Thread Scott Jones
Starting in https://github.com/JuliaLang/julia/pull/11927#issuecomment-117374003 and continuing on in https://github.com/JuliaLang/julia/issues/11966#issuecomment-118212265, I had raised an issue that can cause confusion to newcomers to Julia, and potentially lead to programming errors if one i

Re: [julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Tony Kelman
pause is responsible for the "press any key to continue" message. I'm having a hard time figuring out what you're asking, and what behavior you want versus what you're getting here. On Thursday, July 2, 2015 at 3:00:47 PM UTC-4, paul analyst wrote: > > I have: > > bin\julia.exe -L test.jl > w

[julia-users] Re: Loop comprehensions unable to do type inferences (in local scope)

2015-07-02 Thread colintbowers
I didn't know you could do that. That is a very satisfactory solution, thank you. -Colin On Friday, 3 July 2015 00:39:53 UTC+10, Tom Breloff wrote: > > I can't comment on exactly why the return argument isn't inferred, but I'm > pretty sure that's a feature that is still actively being worked o

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Stefan Karpinski
Can you elaborate on why that kind of code needs this unusual evaluation? It looks pretty reasonable as is to me. On Thu, Jul 2, 2015 at 5:20 PM, Jan Drugowitsch wrote: > Is this a toy reduction of a concept that you want to apply in a much more >> complex way? >> > > Yes, it was just meant to i

[julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Steven G. Johnson
On Wednesday, July 1, 2015 at 5:52:02 PM UTC-4, datnamer wrote: > > Bokeh is working on some abstract rendering (downsampling) and webgl > stuff. There is a Julia exposure...if someone can bring that up to speed > with those features, it could work for this usecase. > > https://github.com/bokeh

Re: [julia-users] Re: How from dimensional array cut out no more than the first 15 characters of each line, without loop. is posible it ?

2015-07-02 Thread Paul Analyst
Thx Tom, nice !!! Paul W dniu 2015-07-02 o 21:13, Tom Breloff pisze: | map(x->x[1:min(length(x),15)],A) |

[julia-users] Re: How from dimensional array cut out no more than the first 15 characters of each line, without loop. is posible it ?

2015-07-02 Thread Tom Breloff
Try: map(x->x[1:min(length(x),15)], A) On Thursday, July 2, 2015 at 3:06:33 PM UTC-4, paul analyst wrote: > > How from dimensional array cut out no more than the first 15 characters of > each line, without loop. is posible it ? > > I have : > julia> A > 3-element Array{Any,1}: > "Lorem ipsum d

[julia-users] How from dimensional array cut out no more than the first 15 characters of each line, without loop. is posible it ?

2015-07-02 Thread paul analyst
How from dimensional array cut out no more than the first 15 characters of each line, without loop. is posible it ? I have : julia> A 3-element Array{Any,1}: "Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magn a aliqua. " "Ut enim a

Re: [julia-users] sort and indexes

2015-07-02 Thread Pulkit Bhuwalka
Hi Vincent, You can use sortperm . So, a = [ 20; 10; 30] sorted_inds = sortperm(a) # a = [2; 1; 3] sorted_arr = a[sorted_inds] # or simply sorted_arr = sort(a) Hope that helps. Best, Pulkit On Thu, Jul 2, 2015 at 9:25 AM, v

Re: [julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Paul Analyst
I have: bin\julia.exe -L test.jl without "," Paul W dniu 2015-07-02 o 18:34, Paul Analyst pisze: Thanks test.jl a=rand(10) writecsv("a.txt", a) script run !!! But console sey: "press any kay to continue..." after press cloused :/ my.bat : bin\julia.exe test.jl pause Paul W dniu 2015-07-0

[julia-users] sort and indexes

2015-07-02 Thread vincent leclere
Hello, I couldn't find an easy way to sort an array and have the corresponding indexes of the original array. An example of what I want : [array_sorted, Indexes] = sort ( [20 10 30]) giving array_sorted = [10 20 30] Indexes = [2 1 3] any help welcomed

Re: [julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Isaiah Norton
> > is this something that could be incorporated into a Qt GUI using QGLWidget > Sure, many independent graphics systems integrate this way -- for example, VTK. Ultimately any GL-driving library just needs a context to draw into, and Qt can provide that. On Thu, Jul 2, 2015 at 1:56 PM, Tom Brelof

[julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Tom Breloff
Also regarding OpenGL in Julia... I know that there is a GLPlot.jl package that will depend on the GLVisualize.jl package that Simon is working on... is this something that could be incorporated into a Qt GUI using QGLWidget, or will it have to be run independently? If that's not natively suppo

[julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Jack Minardi
You could also look into calling out to Mayavi with PyCall. On Wednesday, July 1, 2015 at 1:56:06 PM UTC-4, Tom Breloff wrote: > > Has anyone used Escher/Compose/Gadfly for interactive > visualization/plotting with lots of data (million's of updates)? Is there > support for 3D visualization as

Re: [julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Paul Analyst
Thanks test.jl a=rand(10) writecsv("a.txt", a) script run !!! But console sey: "press any kay to continue..." after press cloused :/ my.bat : bin\julia.exe test.jl pause Paul W dniu 2015-07-02 o 17:48, Tony Kelman pisze: Does the test script do anything? You could add "pause" at the end of t

Re: [julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Tony Kelman
Does the test script do anything? You could add "pause" at the end of the batch file to avoid the console window closing after completion. There's a difference between interactive commands that start up a REPL that waits for input, vs script commands that close when they're finished. On Thursd

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Jutho
Depending on how much more complicated your actual use case is, could you not just write f(a,b,c) = a*b + a*c instead of a*(b+c)? I guess the former would be evaluated immediately at compile time if a is _zero ?

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Jan Drugowitsch
On Thursday, 2 July 2015 17:13:50 UTC+2, Yichao Yu wrote: > > On Thu, Jul 2, 2015 at 11:09 AM, Jan Drugowitsch > wrote: > > On Thursday, 2 July 2015 16:55:33 UTC+2, Yichao Yu wrote: > >> > >> On Thu, Jul 2, 2015 at 10:48 AM, Tom Breloff wrote: > >> > Just curious... is there a reason simply c

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Jan Drugowitsch
> > Is this a toy reduction of a concept that you want to apply in a much more > complex way? > Yes, it was just meant to illustrate the concept. It should be applied to a function that has roughly the complexity of https://github.com/jdrugo/DiffModels.jl/blob/master/src/fpt.jl#L153 (in fact,

[julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Steven Sagaert
You might want to check out https://plot.ly. On Thursday, July 2, 2015 at 4:34:20 PM UTC+2, Tom Breloff wrote: > > Yes the question was intentionally broad, because I wanted to get a > birds-eye view of the state of web-visualization in Julia, and whether it's > mature/performant enough to compe

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Yichao Yu
On Thu, Jul 2, 2015 at 11:09 AM, Jan Drugowitsch wrote: > On Thursday, 2 July 2015 16:55:33 UTC+2, Yichao Yu wrote: >> >> On Thu, Jul 2, 2015 at 10:48 AM, Tom Breloff wrote: >> > Just curious... is there a reason simply checking for non-zero isn't >> > enough? >> > Readability? Performance? >> >

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Stefan Karpinski
Is this a toy reduction of a concept that you want to apply in a much more complex way? On Thu, Jul 2, 2015 at 11:09 AM, Jan Drugowitsch wrote: > On Thursday, 2 July 2015 16:55:33 UTC+2, Yichao Yu wrote: >> >> On Thu, Jul 2, 2015 at 10:48 AM, Tom Breloff wrote: >> > Just curious... is there a r

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Jan Drugowitsch
On Thursday, 2 July 2015 16:55:33 UTC+2, Yichao Yu wrote: > > On Thu, Jul 2, 2015 at 10:48 AM, Tom Breloff > wrote: > > Just curious... is there a reason simply checking for non-zero isn't > enough? > > Readability? Performance? > > > > f(a,b,c) = (Bool(a) ? a * (b + c) : 0.0) > > I'm guessi

Re: [julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Paul Analyst
BIG Thx, but not works, My Julia on win 7/64: Version 0.3.8 (2015-04-30 23:40 UTC) Official http://julialang.org/ release i686-w64-mingw32 *it is strange that:* bin\julia.exe -p 2 working bin\julia.exe -q working bin\julia.exe -h NO!! just on the moment (+-0.1 sek , I can`t read ) consloe is

Re: [julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Yichao Yu
On Thu, Jul 2, 2015 at 10:48 AM, Tom Breloff wrote: > Just curious... is there a reason simply checking for non-zero isn't enough? > Readability? Performance? > > f(a,b,c) = (Bool(a) ? a * (b + c) : 0.0) I'm guessing he want all code that gets his type automatically gets this behavior? If yes, I

Re: [julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Tony Kelman
bin\julia.exe test.jl should work On Thursday, July 2, 2015 at 10:28:14 AM UTC-4, paul analyst wrote: > > I read the manual: > > -L, --load Load right after boot on all processors > > but > > bin\julia.exe -L, test.jl > bin\julia.exe -L, "test.jl" > bin\julia.exe -L, 'test.jl' > > not work

[julia-users] Re: Short-circuit evaluation for multiplication

2015-07-02 Thread Tom Breloff
Just curious... is there a reason simply checking for non-zero isn't enough? Readability? Performance? f(a,b,c) = (Bool(a) ? a * (b + c) : 0.0) On Thursday, July 2, 2015 at 9:47:59 AM UTC-4, Jan Drugowitsch wrote: > > Dear Julia users, > > I am implementing an algorithm to solve a specific ty

[julia-users] Re: Loop comprehensions unable to do type inferences (in local scope)

2015-07-02 Thread Tom Breloff
I can't comment on exactly why the return argument isn't inferred, but I'm pretty sure that's a feature that is still actively being worked on by the core devs. When you need to ensure the correct type from a comprehension, you should be explicit: ... mldBoot1 = Float64[ mean(sub(lD, 1:size(lD

Re: [julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Paul Analyst
I read the manual: -L, --load Load right after boot on all processors but bin\julia.exe -L, test.jl bin\julia.exe -L, "test.jl" bin\julia.exe -L, 'test.jl' not work Paul W dniu 2015-07-02 o 16:12, Scott Jones pisze: You'll need to pass that on the command line to julia, bin\julia -help w

[julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Tom Breloff
Yes the question was intentionally broad, because I wanted to get a birds-eye view of the state of web-visualization in Julia, and whether it's mature/performant enough to compete with a desktop application in OpenGL. I'm just trying to understand if the performance difference is 2x or 1000x.

Re: [julia-users] Trying to understand memory allocation differences in apparently identical code

2015-07-02 Thread Yichao Yu
On Thu, Jul 2, 2015 at 10:14 AM, Dan Schmidt wrote: > On Thursday, July 2, 2015 at 9:51:02 AM UTC-4, Yichao Yu wrote: >> >> Not sure if you could easily figure this one out but the issue here is >> that julia only specialize on the `Type{}` of a datatype if you >> specify so. >> >> i.e. `f(x) = ..

Re: [julia-users] Trying to understand memory allocation differences in apparently identical code

2015-07-02 Thread Dan Schmidt
On Thursday, July 2, 2015 at 9:51:02 AM UTC-4, Yichao Yu wrote: > Not sure if you could easily figure this one out but the issue here is > that julia only specialize on the `Type{}` of a datatype if you > specify so. > > i.e. `f(x) = ...` called with `f(Int)` will only specialize on > `f(::Dat

[julia-users] Re: Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread Scott Jones
You'll need to pass that on the command line to julia, bin\julia -help will give you a list of all the command line options you can use. On Thursday, July 2, 2015 at 9:14:50 AM UTC-4, paul analyst wrote: > > Win 7 > How by one click on .bat file run the Julia and perform some script > automatica

Re: [julia-users] Re: Juliacon 2015 videos?

2015-07-02 Thread Scott Jones
There are also Spanish speaking volunteers (David Sander's great Julia community in Mexico) waiting to get the videos (and permission) to subtitle some (or hopefully all) of the talks. Same thing here, all of the talks I went to were wonderful, but I had to miss a number of them that were also o

Re: [julia-users] Trying to understand memory allocation differences in apparently identical code

2015-07-02 Thread Yichao Yu
On Thu, Jul 2, 2015 at 9:33 AM, Dan Schmidt wrote: > I was writing some sample code to demonstrate to coworkers how dispatching > on types was faster than calling functions passed in as arguments, and ran > into a performance issue I can't explain. > > This is running on JuliaBox, but I observed t

[julia-users] Short-circuit evaluation for multiplication

2015-07-02 Thread Jan Drugowitsch
Dear Julia users, I am implementing an algorithm to solve a specific type of Volterra integral equation, and that simplifies significantly if some of its parameters are set to zero or one. The function implementing the algorithm takes quite a few arguments, such that writing specific versions f

[julia-users] Trying to understand memory allocation differences in apparently identical code

2015-07-02 Thread Dan Schmidt
I was writing some sample code to demonstrate to coworkers how dispatching on types was faster than calling functions passed in as arguments, and ran into a performance issue I can't explain. This is running on JuliaBox, but I observed the same behavior on a local machine, both with 0.3.9 and w

[julia-users] Win 7, How by one click on .bat file run the Julia and perform some script automatically ?

2015-07-02 Thread paul analyst
Win 7 How by one click on .bat file run the Julia and perform some script automatically ? for example. include("file.jl") My file.bat(below) run julia bat not started the script "test.jl" bin\julia.exe include("test.jl") Paul

[julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Andreas Lobinger
I forgot: Gadfly and Compose have some future looking plans for 3D. Recently there was here: https://groups.google.com/d/topic/julia-users/DLFWlN-lj_Y/discussion

[julia-users] Re: Escher/Compose/Gadfly for heavy visualization

2015-07-02 Thread Andreas Lobinger
Hello colleague, On Wednesday, July 1, 2015 at 7:56:06 PM UTC+2, Tom Breloff wrote: > > Has anyone used Escher/Compose/Gadfly for interactive > visualization/plotting with lots of data (million's of updates)? Is there > support for 3D visualization as part of this ecosystem? If not, is it > pl

Re: [julia-users] Re: Juliacon 2015 videos?

2015-07-02 Thread Stefan Karpinski
The AV crew was actually paid and they're actively working on the videos, so that should be done soonish. Will let everyone know once it's done, of course. I'm eager to see them too since the conference was 1.5 track and I couldn't see all of the talks! On Wed, Jul 1, 2015 at 8:52 AM, Randy Zwitch

[julia-users] Re: Requests.jl post() does not return the same as curl when getting a token from Reddit

2015-07-02 Thread Patrick Kofod Mogensen
I got it to work by adding "Content-Type" => "application/x-www-form-urlencoded" To the header. See https://github.com/JuliaWeb/Requests.jl/issues/52#issuecomment-117821209 On Wednesday, July 1, 2015 at 1:45:54 PM UTC+2, Patrick Kofod Mogensen wrote: > > > > I'm trying to get a token to acces