Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
In defense of Python, I don't see why it requires OOP concepts. Python is happy to work in a very procedural way. I started to like Python when Python 3 became mature. They really made the language a lot more consistent and predictable. I agree with the rest of what you wrote. I don't criticize

[julia-users] SIMD multicore

2016-04-15 Thread Jason Eckstein
I noticed in Julia 4 now if you call A+B where A and B are matrices of equal size, the llvm code shows vectorization indicating it is equivalent to if I wrote my own function with an @simd tagged for loop. I still notice though that it uses a single core to maximum capacity but never spreads

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
On 16 April 2016 at 04:01, Peter Kovesi wrote: > > Working in Julia requires a practice of defensive incremental coding in > the extreme. Every few lines of code that are added need to be tested > before carrying on. That way you know that any errors are in the few

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
Is there a way to try out your instructions on a computer where I have previously installed IJulia and PyPlot? Or do I have to remove and re-add IJulia and PyPlot? If I follow these instructions, will Julia also keep Jupyter and Python updated? (i.e. every time I run Pkg.update()). Right now I

[julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Sheehan Olver
I don't think Julia's error message situation is particularly worse than C (where memory access bugs trigger crashes randomly) or Mathematica (where many bugs end in infinite loops of symbolic computations that eat up all available memory). I also think teaching in Python would be harder,

[julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Peter Kovesi
Sheehan, That's a very nice looking course but I think you are very brave to use Julia at this stage. I love the language but (at this stage of the language's development) the error reporting is highly problematic. For example this morning I made a classic mistake function foo(a::real) #

[julia-users] Re: Vectorised usage of Compose

2016-04-15 Thread Cedric St-Jean
That sucks. I've noticed that one of {Firefox, IJulia, Compose} is leaking memory when I do Compose.jl animations, that might be part of the issue as well. On Friday, April 15, 2016 at 5:37:47 PM UTC-4, Christoph Ortner wrote: > > > thanks for the suggestion. Unfortunately, the ... (splat?)

Re: [julia-users] Slow eval for arrays of Any

2016-04-15 Thread Yichao Yu
On Fri, Apr 15, 2016 at 6:22 PM, wrote: > This I understand - thank you. > However, as I have written in my first post eval is only an example showing > the problem. > The real use case is when we have some constant reference data, eg. list of > first names that has

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
On 15 April 2016 at 21:29, Steven G. Johnson wrote: > For installation, what I recommend (https://github.com/stevengj/julia-mit) > is: > ... That page is really good ... Bookmarked. Cheers, Daniel.

Re: [julia-users] Slow eval for arrays of Any

2016-04-15 Thread bogumil . kaminski
This I understand - thank you. However, as I have written in my first post eval is only an example showing the problem. The real use case is when we have some constant reference data, eg. list of first names that has 1 entries, and want to store it directly in Julia code as an array literal

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
Hello, On 15 April 2016 at 21:29, Steven G. Johnson wrote: > For installation, what I recommend (https://github.com/stevengj/julia-mit) > is: > > ENV["PYTHON"]="" > ENV["JUPYTER"]="" > Pkg.add("IJulia") > Pkg.add("PyPlot") > > > That way, it will automatically download

[julia-users] Re: Vectorised usage of Compose

2016-04-15 Thread Christoph Ortner
thanks for the suggestion. Unfortunately, the ... (splat?) operator makes this very slow for larger collections. Christoph On Friday, 15 April 2016 19:10:12 UTC+1, Cedric St-Jean wrote: > > > > On Friday, April 15, 2016 at 12:30:51 PM UTC-4, Christoph Ortner wrote: >> >> right I mean b) - I

Re: [julia-users] Slow eval for arrays of Any

2016-04-15 Thread Yichao Yu
On Fri, Apr 15, 2016 at 3:44 PM, wrote: > Could someone help me to understand why the following code works slowly and > how to make it run faster? > > function run() > # this is fast > s1 = string("x = [0", join([string(", ", i) for i in 1:256]), "]") > p1

[julia-users] Re: Slow eval for arrays of Any

2016-04-15 Thread bogumil . kaminski
I have just found that adding the following type annotation solves the problem: s3 = string("x = Any['0'", join([string(", ", i) for i in 1:256]), "]") but I do not understand exactly why (it seems that the core reason is how Julia handles map on tuples but I am not sure why adding Any

[julia-users] Slow eval for arrays of Any

2016-04-15 Thread bogumil . kaminski
Could someone help me to understand why the following code works slowly and how to make it run faster? function run() # this is fast s1 = string("x = [0", join([string(", ", i) for i in 1:256]), "]") p1 = parse(s1) @time eval(p1) @time eval(p1) # here starts the slow

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Steven G. Johnson
On Friday, April 15, 2016 at 3:27:57 PM UTC-4, Daniel Carrera wrote: > > Can you explain that? Is someone going to fund Julia if JuliaBox is used > for education? > Julia gets donations (via NumFocus) that are used to support JuliaBox and other activities (e.g. JuliaCon). It helps to get

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Steven G. Johnson
For installation, what I recommend (https://github.com/stevengj/julia-mit) is: ENV["PYTHON"]="" ENV["JUPYTER"]="" Pkg.add("IJulia") Pkg.add("PyPlot") That way, it will automatically download and use its own Miniconda installation of Python and Jupyter, regardless of what the user has on

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
Can you explain that? Is someone going to fund Julia if JuliaBox is used for education? On 15 April 2016 at 21:09, Zheng Wendell wrote: > By the way, if you use JuliaBox for your teaching. Don't forget to > announce it to the Julia team, so that they can get more funding

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Zheng Wendell
By the way, if you use JuliaBox for your teaching. Don't forget to announce it to the Julia team, so that they can get more funding to maintain it. Disclaimer: I have no relation with the Julia team. On Fri, Apr 15, 2016 at 8:50 PM, Daniel Carrera

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
I haven't tried with students, but I tried to get Jupyter setup on a Macbook for a researcher who was very keen on using it (he is a strong advocate of R) and after an hour or two we sort of gave up. We struggled with online documentation that was often inconsistent, incorrect, or incomplete. We

[julia-users] asynchronous reading from file

2016-04-15 Thread pevnak
Hi All, I would like to implement an asynchronous reading from file. I am doing stochastic gradient descend and while I am doing the optimisation, I would like to load the data on the background. Since reading of the data is followed by a quite complicated parsing, it is not just simple IO

[julia-users] Re: Vectorised usage of Compose

2016-04-15 Thread Cedric St-Jean
On Friday, April 15, 2016 at 12:30:51 PM UTC-4, Christoph Ortner wrote: > > right I mean b) - I have 1000, say, line segments or polygons, each with > the same number of points. All I can do is loop, yes? > Not a compose expert either, but I used a list comprehension to make a grid and it

[julia-users] Re: Compose Plotting from REPL

2016-04-15 Thread Andreas Lobinger
On Friday, April 15, 2016 at 6:35:15 PM UTC+2, Christoph Ortner wrote: > > many tanks for this - that looks perfect. > > unfortunately my Gtk installation seems broken, so it will be a while > until I can try this out. > _ _ _ _(_)_ | A fresh approach to

Re: [julia-users] Failed process

2016-04-15 Thread phiroc
It worked. Than you. Le vendredi 15 avril 2016 17:39:12 UTC+2, Michele Zaffalon a écrit : > > Changing the global git config used to work: > https://groups.google.com/d/msg/julia-users/nI7CgwGEd3A/AUZ-10J_04cJ > > > On Fri, Apr 15, 2016 at 9:49 AM, wrote: > >> >> Hello, >> >> I

[julia-users] Seeking Maintainer for Bokeh.jl

2016-04-15 Thread Bryan Van de ven
Hi all, My name is Bryan Van de Ven, I lead the technical effort on the Bokeh visualization project: http://bokeh.pydata.org/en/latest/index.html https://github.com/bokeh/bokeh One of the nice aspects of Bokeh is that the browser client library BokehJS is driven by a

[julia-users] Re: Vectorised usage of Compose

2016-04-15 Thread Andreas Lobinger
Hello colleague, On Friday, April 15, 2016 at 6:30:51 PM UTC+2, Christoph Ortner wrote: > > right I mean b) - I have 1000, say, line segments or polygons, each with > the same number of points. All I can do is loop, yes? > > Thanks, > Christoph > > > > you are saying this is currently not

[julia-users] Re: Compose Plotting from REPL

2016-04-15 Thread Christoph Ortner
many tanks for this - that looks perfect. unfortunately my Gtk installation seems broken, so it will be a while until I can try this out. Christoph On Friday, 15 April 2016 15:42:45 UTC+1, Andreas Lobinger wrote: > > Hello colleague, > > On Friday, April 15, 2016 at 4:00:34 PM UTC+2,

[julia-users] Re: Vectorised usage of Compose

2016-04-15 Thread Christoph Ortner
right I mean b) - I have 1000, say, line segments or polygons, each with the same number of points. All I can do is loop, yes? Thanks, Christoph you are saying this is currently not implemented, I just have to On Friday, 15 April 2016 17:12:46 UTC+1, Andreas Lobinger wrote: > > Hello

Re: [julia-users] Re: PyCall exception.jl's pycheckv - hidden exceptions or is it normal for that to take some time?

2016-04-15 Thread Isaiah Norton
> > Aha - it makes complete sense that the Python workload would show up > somewhere in the profiler. I suppose I wasn't expecting it in exception.jl, > but if that is where the work happens that is fine. It's an artifact of macro expansion not tracking where the expanded code came from

[julia-users] Re: Vectorised usage of Compose

2016-04-15 Thread Andreas Lobinger
Hello colleague, On Friday, April 15, 2016 at 5:17:29 PM UTC+2, Christoph Ortner wrote: > > I understand from the example > how to vectorise drawing of circles. > > The syntax for a two-point line segment seems to beline( [(x0, y0), > (x1, y1)] ) I don't see an analogy with `circle`? > >

Re: [julia-users] How to change REPL mode on startup?

2016-04-15 Thread Keno Fischer
You can call REPL.setup_inferface yourself and add your own REPL mode. You can also look at https://github.com/JuliaLang/julia/blob/master/base/client.jl to see how the active_repl gets created. On Fri, Apr 15, 2016 at 9:16 AM, wrote: > I have a REPL mode for an

[julia-users] Re: PyCall exception.jl's pycheckv - hidden exceptions or is it normal for that to take some time?

2016-04-15 Thread Tim Wheeler
Aha - it makes complete sense that the Python workload would show up somewhere in the profiler. I suppose I wasn't expecting it in exception.jl, but if that is where the work happens that is fine. I'm copying the results from TF into my memory - if TF doesn't create new ones every time I can

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Sheehan Olver
Pkg.add(“IJulia”) works on a mac, then using IJulia @async notebook() > On 16 Apr 2016, at 1:39 AM, Cedric St-Jean wrote: > > > > On Friday, April 15, 2016 at 9:12:21 AM UTC-4, Daniel Carrera wrote: > Cool stuff! > > From my point of view, the biggest obstacle is

[julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Cedric St-Jean
On Friday, April 15, 2016 at 9:12:21 AM UTC-4, Daniel Carrera wrote: > > Cool stuff! > > From my point of view, the biggest obstacle is that Jupyter is not easy > to install for most people, > I'm surprised to read that. Any issue in particular? Between Anaconda, jupyterhub and JuliaBox,

Re: [julia-users] Failed process

2016-04-15 Thread Michele Zaffalon
Changing the global git config used to work: https://groups.google.com/d/msg/julia-users/nI7CgwGEd3A/AUZ-10J_04cJ On Fri, Apr 15, 2016 at 9:49 AM, wrote: > > Hello, > > I have installed Julia 0.4.5 on Windows 7. > > When I run *Pkg.init(),* I get the following error message: >

[julia-users] Vectorised usage of Compose

2016-04-15 Thread Christoph Ortner
I understand from the example compose(context(), circle([0.25, 0.5, 0.75], [0.25, 0.5, 0.75], [0.1]), fill(LCHab(92, 10, 77))) how to vectorise drawing of circles. The syntax for a two-point line segment seems to beline( [(x0, y0), (x1, y1)] ) I don't see an analogy with

[julia-users] Re: Compose Plotting from REPL

2016-04-15 Thread Andreas Lobinger
Hello colleague, On Friday, April 15, 2016 at 4:00:34 PM UTC+2, Christoph Ortner wrote: > > > I am trying to use Compose.jl directly instead of going through a plotting > package. From iPython notebooks invoking compose will immediately create > the output. > > But when I am in the REPL, how

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Tim Holy
Your best bet is always to benchmark. Here's how I make such decisions: # The type-based system: julia> immutable Container1{T} val::T end julia> inc(::Int) = 1 inc (generic function with 1 method) julia> inc(::Float64) = 2 inc (generic function with 2 methods) julia>

[julia-users] Re: Help with MXNet AssertionError: get_batch_size(opts.eval_data) == batch_size

2016-04-15 Thread Iain Dunning
Try filing an issue on the MXNet.jl repository - the developers might not (probably don't) read this list. On Friday, April 15, 2016 at 9:47:46 AM UTC-4, kleinsplash wrote: > > still having this issue - any ideas? > > On Monday, 11 April 2016 15:58:03 UTC+2, kleinsplash wrote: >> >> $ julia

[julia-users] Re: Help with MXNet AssertionError: get_batch_size(opts.eval_data) == batch_size

2016-04-15 Thread Iain Dunning
Try filing an issue on the MXNet.jl repository - the developers might not (probably don't) read this list. On Friday, April 15, 2016 at 9:47:46 AM UTC-4, kleinsplash wrote: > > still having this issue - any ideas? > > On Monday, 11 April 2016 15:58:03 UTC+2, kleinsplash wrote: >> >> $ julia

[julia-users] Failed process

2016-04-15 Thread phiroc
Hello, I have installed Julia 0.4.5 on Windows 7. When I run *Pkg.init(),* I get the following error message: julia> Pkg.init() INFO: Initializing package repository D:\users\myname\.julia\v0.4 INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl fatal: unable to connect to

[julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread John Gibson
Sheehan: Thanks a million! I am due to teach undergraduate Numerical Methods next fall and have been planning to do it in Julia. I have a feeling I'm going to be deeply indebted to you for this course material. John Gibson Dept Mathematics & Statistics University of New Hampshire On Thursday,

[julia-users] Compose Plotting from REPL

2016-04-15 Thread Christoph Ortner
I am trying to use Compose.jl directly instead of going through a plotting package. From iPython notebooks invoking compose will immediately create the output. But when I am in the REPL, how do I plot to a window, similar as in PyPlot? Thanks, Christoph

[julia-users] Re: Help with MXNet AssertionError: get_batch_size(opts.eval_data) == batch_size

2016-04-15 Thread kleinsplash
still having this issue - any ideas? On Monday, 11 April 2016 15:58:03 UTC+2, kleinsplash wrote: > > $ julia G3DB_cnn.jl > (128,128,1,800) > (128,128,1,200) > INFO: Start training on [GPU0] > INFO: Initializing parameters... > INFO: Creating KVStore... > INFO: Start training... > INFO: == Epoch

Re: [julia-users] Re: PyCall exception.jl's pycheckv - hidden exceptions or is it normal for that to take some time?

2016-04-15 Thread Isaiah Norton
> > When passing arrays to Python, the PyCall default is already to use NumPy > wrappers that pass the data without copying. Yes, sorry for being unclear. My point was that this wrapper function (' tfJuliaInterface.pass_image_to_ff') might not be taking advantage of the existing NumPy-based

[julia-users] How to change REPL mode on startup?

2016-04-15 Thread lapeyre . math122a
I have a REPL mode for an application: https://github.com/jlapeyre/SJulia.jl/blob/master/src/sjulia_repl.jl I start julia in a terminal, load the package with 'using SJulia', and then press '=' to enter the alternative mode. This works fine. I would like to do this in one step. e.g. enter

[julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Daniel Carrera
Cool stuff! I am interested in ways to teach Julia. I currently teach a very short MATLAB course and I'd love to teach Julia instead. From my point of view, the biggest obstacle is that Jupyter is not easy to install for most people, and PyPlot doesn't have much documentation. I keep telling

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Eric Forgy
On Friday, April 15, 2016 at 6:40:37 PM UTC+8, Tim Holy wrote: > > If in contrast item[i+1] has a different type than item[i], and the amount > of > processing is quite modest, then it may not be worth it. Because julia > can't > predict the type at compile-time, it has to look up the type at

Re: [julia-users] Re: PyCall exception.jl's pycheckv - hidden exceptions or is it normal for that to take some time?

2016-04-15 Thread Steven G. Johnson
On Friday, April 15, 2016 at 12:14:53 AM UTC-4, Isaiah wrote: > > Your profiling result is not necessarily unreasonable. The listed line > number (exception.jl:78) is where the macro-wrapped code is actually > executed, and "pass_image_to_ff" sounds like it could be expensive. > > Is the

[julia-users] Re: [ANN] Spark.jl - Julia interface to Apache Spark

2016-04-15 Thread Sisyphuss
Starred it. On Friday, April 15, 2016 at 12:00:17 AM UTC+2, Andrei Zh wrote: > > Spark.jl provides Julia bindings for Apache Spark - by far the most > popular computational framework in Hadoop ecosystem. Find it at: > > > https://github.com/dfdx/Spark.jl > > > There's still *a lot* of work to

[julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Sisyphuss
The doc of Julia is far from helpful. Most time, you should try it to learn what it actually does. On Friday, April 15, 2016 at 4:21:41 AM UTC+2, Sheehan Olver wrote: > > > When the course is over I'll give a description of any issues encountered > using Julia for teaching. At the moment there

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Tamas Papp
On Fri, Apr 15 2016, Tim Holy wrote: > Julia emphasizes the "real" use for types---being able to make important > decisions at compile time---rather than the "window dressing" (glorified > switch > statements) uses that some OOP paradigms seem to encourage. When learning Common Lisp, many

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Tim Holy
Hi Anonymous, Whether all this is worth it depends on how you're going to use these objects. Particularly if you're likely to need to work with long lists of cars of different types, the path you're following is probably not worthwhile. The issue is this: if you have a container where julia

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Mauro
On Fri, 2016-04-15 at 09:56, Anonymous wrote: > I need the fields color and year to be Int and ASCIIString, respectively, > and I can't just make the types Color and Year type aliases of Int and > ASCIIString, since I need these abstract types to distinguish different > types

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Anonymous
edit of previous post: I have color and year reversed, color should be ASCIIString and year should be Int, same thing with Color and Year. On Friday, April 15, 2016 at 12:56:16 AM UTC-7, Anonymous wrote: > > I need the fields color and year to be Int and ASCIIString, respectively, > and I

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Anonymous
I need the fields color and year to be Int and ASCIIString, respectively, and I can't just make the types Color and Year type aliases of Int and ASCIIString, since I need these abstract types to distinguish different types of Car for the purposes of multiple dispatch. Basically let's say I

Re: [julia-users] Re: Parametric types which add or delete fields.

2016-04-15 Thread Mauro
On Fri, 2016-04-15 at 07:28, Anonymous wrote: > OP here, > > So it looks like the consensus is to use a single type with un-used > features set to nothing. I've actually been playing around with this > approach since I posted this question. Here's what I've got: > > abstract

[julia-users] Re: a excellent Julia IDE, JuliaDT

2016-04-15 Thread Liye zhang
New version of the JuliaDT, https://github.com/JuliaComputing/JuliaDT/releases/tag/v0.0.2 Many new features added, supporting figure plot to some extent. It's on the way to a mature Julia development tool. On Tuesday, March 8, 2016 at 9:56:39 PM UTC+8, Liye zhang wrote: > > If you are trying