Re: [julia-users] UInt should be Uint in documentation
I think it would be useful to show the version in a more visible place, for example below the logo on the left. At the moment it's only in the title of the page. Regards Le mardi 25 novembre 2014 à 16:25 +0900, Pontus Stenetorp a écrit : On 25 November 2014 at 16:16, Ronald L. Rivest rivest@gmail.com wrote: You are correct; my apologies for this post. No worries, we are all happy to help. I was reading documentation for development version 0.4.0 but running 0.3.2. So, I guess UInt will be the new Uint as of 0.4.0... Yes, the `Uint` to `UInt` change is a bit of a consistency/clean-up move and was discussed less than a month ago [1]. Pontus [1]: https://github.com/JuliaLang/julia/issues/8905
[julia-users] Re: Stiff ODE solver available now?
I just merged a PR which adds ode23s to ODE.jl. It is based on a modified Rosenbrock triple which is also used by MATLAB's ODE23S and is suitable for stiff problems. To be clear: it will most certainly be slower than CVODE (haven't benchmarked it), but it should be Ok if one just wants to solve an ODE for visualization/testing/teaching ... If you happen to have some time/interest it would be great if you could give it a try ... (the package needs to be installed via Pkg.checkout(ODE) ) - Alex. On Tuesday, 27 May 2014 21:40:46 UTC+2, Frederick wrote: Hello. Learning Julia with fair to middling skills and working on Windows platform. Just finished a Coursera course on Dynamical Modeling in Systems Biology. The course used Matlab and I used Julia. Did OK until a stiff ODE solver was required. Couldn't find anything in the ODE package, and unable to get anything working from the Sundials package: error compiling ode: could not load module libsundials_cvode: The specified module could not be found. and not enough skills to figure out how to compile and make use of code in c or fortran. Will a stiff solver be available soon or was I looking in the wrong places? If that latter, could someone make more clear how to access the stiff ODE solver? If the latter, is there anything I could do to help make it happen?
Re: [julia-users] [Offtopic:] Why you did choose the name Julia?
results = search(Julia) for result in results if contains(result, program) println(result) end end On 2014年11月25日 15:40, Francesco Bonazzi wrote: The problem with the name Julia is that you find a lot of other stuff unrelated to programming when you look on Google.
Re: [julia-users] impressions and questions from a Matlab user
Your compile times seem beyond the normal experience; it seems likely that either your installation is messed up or perhaps your code is triggering some very specific (rare) problem. Please consider posting it somewhere so people can take a deeper look. Best, --Tim On Monday, November 24, 2014 02:37:11 PM Christian Peel wrote: What I was earlier calling a 'syntax error' was actually an undefined function; I apologize for not using the correct language. I believe that syntax errors are caught in the 'include' step, while the 'undefined' error I was actually getting was a compile-time error. Starting with an undefined variable on the first line of function f in file.jl, here is what i did on the REPL * include file.jl this takes a fraction of a second * run f; after 11ish seconds it notices the undefined variable and returns an error * run f again; it immediately complains about the undefined variable The number of seconds it takes to compile (the first run of f) are related to the length of the file. Tim,I guess the fact that I put the undefined function on the first line of the function I was trying to run resolves your question about performance (I am sure there are many things I can do to improve the performance of this toy function). Elliot, running the command as you requested results in the following on one computer julia filter( x - contains(x, sys.dylib), Sys.dllist()) 1-element Array{String,1}: /Applications/Julia-0.3.0.app/Contents/Resources/julia/lib/julia/sys.dylib I get similar results on a different computer which uses a homebrew package of Julia 0.3.2. Thanks for all your help! Chris On Monday, November 24, 2014 2:13:29 AM UTC-8, Tim Holy wrote: When you re-include your script, does it again take 11 seconds to get to the error? If so, something is wrong. How much computation is there in your script? You might have a type inference problem, in which case performance will be terrible, and it might simply be taking a long time (much longer than Matlab) to get to the point in your computation where the bug is triggered. If you haven't already, read at least up through including the Tools section of http://docs.julialang.org/en/release-0.3/manual/performance-tips/ You should definitely profile; that will tell you where the problem is. --Tim On Sunday, November 23, 2014 11:35:03 PM Christian Peel wrote: What's your versioninfo? I used Version 0.3.0 (x86_64-apple-darwin13.3.0) on a 2013 macbook which took about 9.6 seconds to include the function, try to run it, and find the syntax error. On a 2009 iMac with version 0.3.2 of Julia (x86_64-apple-darwin14.0.0) it took 11.3 seconds.Just to be clear, it takes something like 3 seconds to load Julia, 26 seconds to load the PyPlot package (?!?!?) and then an additional 11.3 seconds after that to get the syntax error. I do not restart Julia every time. The functions simulate a narrowband multi-antenna fading communications channel. To me it feels like a simple and straightforward script, but it may not be so simple for the optimizer. Chris On Sunday, November 23, 2014 7:21:36 PM UTC-8, Stefan Karpinski wrote: Ah, yes. That would explain this if you're timing how long it takes to start Julia from the command prompt. In that case, I can understand the complaint about the compile-debug-edit cycle, but you probably should consider doing more development at the interactive REPL prompt rather than restarting Julia every time. On Sun, Nov 23, 2014 at 9:56 PM, Patrick O'Leary patrick...@gmail.com javascript: wrote: On Sunday, November 23, 2014 7:55:33 PM UTC-6, Stefan Karpinski wrote: 11 seconds seems like an awfully long time. In the days of the slow REPL when Julia compiled itself upon starting up, that's about how long it took. What's your versioninfo? Windows doesn't ship with sys.dll, for what it's worth.
[julia-users] Installing IJulia
Hi all, I'm trying to install IJulia. (I failed when I first tried in the spring, and have been sticking with Julia Studio since that time.) I'm now trying to install it on a new Windows 8.1 machine. I followed the instructions here: https://github.com/JuliaLang/IJulia.jl Installed IPython through the anaconda package (checking the necessary boxes and also installing as admin), ran Pkg.add(IJulia). This outputs the following: INFO: Building IJulia ===[ ERROR: IJulia ] IPython is required for IJulia, got errors could not spawn `ipython --version`: no such file or directory (ENOENT) could not spawn `ipython2 --version`: no such file or directory (ENOENT) could not spawn `ipython3 --version`: no such file or directory (ENOENT) could not spawn `ipython.bat --version`: no such file or directory (ENOENT) while loading C:\Users\abram\.julia\v0.3\IJulia\deps\build.jl, in expression starting on line 9 [ BUILD ERRORS ] WARNING: IJulia had build errors. - packages with build errors remain installed in C:\Users\abram\.julia\v0.3 - build a package and all its dependencies with `Pkg.build(pkg)` - build a single package by running its `deps/build.jl` script Attempting to run IJulia just opens IPython, as would be expected. The troupleshooting guide for the IJulia install mentions this possibility, but does not suggest fixes for package installation problems. Any ideas? Thanks, Abram
[julia-users] ternary operator with return() gives (sometimes) errors
Dear list, I observed that this function foo(x) x = 10 ? nothing : return(0) y = 2*x return(y) end works as expected, while that function bar(x) x 10 ? return(0) : nothing y = 2*x return(y) end throws an error: ERROR: syntax: colon expected in ? expression. Is this an intended behavior? Cheers, Andreas PS: I'm using Julia v 0.3.3 on Windows 7
[julia-users] Re: ternary operator with return() gives (sometimes) errors
Most likely Julia tries to parse it as x 10 ? return ((0):nothing) Try x 10 ? (return 0) : nothing instead. Or the more popular construction x = 10 || return 0 Den tisdagen den 25:e november 2014 kl. 11:21:39 UTC+1 skrev andreas: Dear list, I observed that this function foo(x) x = 10 ? nothing : return(0) y = 2*x return(y) end works as expected, while that function bar(x) x 10 ? return(0) : nothing y = 2*x return(y) end throws an error: ERROR: syntax: colon expected in ? expression. Is this an intended behavior? Cheers, Andreas PS: I'm using Julia v 0.3.3 on Windows 7
[julia-users] Backslash or UMFPACK Bug, related to slicing
I had some unexplained \ behaviour that I'd like to clarify? Possibly a bug? Here is a short code snippet that does work ok. I get the correct solution from it. (primarily the last line is relevant) # construct a finite element grid X, T = square(10) # assemble the stiffness matrix and rhs (for - \Delta u = 1) A, F = simple_stiffmat(X, T) # find the interior nodes Ifree = find( (minimum(X,1) . 0) (maximum(X, 1) . 1) ) # solve the linear system and plot the solution U = zeros(size(X,2)) U[Ifree] = cholfact(A[Ifree,Ifree]) \ F[Ifree] Now, if I replace the last line with U[Ifree] = A[Ifree,Ifree] \ F[Ifree] then I get the following error message: `umferror` has no method matching umferror(::Int32) while loading In[112], in expression starting on line 3 in umfpack_symbolic! at linalg/umfpack.jl:155 in umfpack_numeric! at linalg/umfpack.jl:176 in lufact at linalg/umfpack.jl:118 in A_ldiv_B! at linalg/sparse.jl:210 in \ at linalg/generic.jl:233 Same happens with `lufact`. I also tried copying B = copy(A[Ifree,Ifree]) first. Same result. I have used UMFPack successfully in other cases. E.g., U = (A+speye(size(X,2)) \ F works fine. Any ideas? Christoph
[julia-users] Re: Backslash or UMFPACK Bug, related to slicing
This is at least one bug. In /base/linalg/umfpack.jl#L18 https://github.com/JuliaLang/julia/blob/master/base/linalg/umfpack.jl#L18, we have a convenience function to lookup the status code, seems to be restricted to Int64, even though it is called with Int32 on some occations. If you compile yourself, or know how to regenerate the system image, it is pretty easy to change *Int* to *Integer* on that line. A real fix for this would require someone to actually check the return types of the C functions called, and include some more tests to ensure that all code paths are followed in the test suite. Would you mind reporting this issue on Github? kl. 12:10:36 UTC+1 tirsdag 25. november 2014 skrev Christoph Ortner følgende: I had some unexplained \ behaviour that I'd like to clarify? Possibly a bug? Here is a short code snippet that does work ok. I get the correct solution from it. (primarily the last line is relevant) # construct a finite element grid X, T = square(10) # assemble the stiffness matrix and rhs (for - \Delta u = 1) A, F = simple_stiffmat(X, T) # find the interior nodes Ifree = find( (minimum(X,1) . 0) (maximum(X, 1) . 1) ) # solve the linear system and plot the solution U = zeros(size(X,2)) U[Ifree] = cholfact(A[Ifree,Ifree]) \ F[Ifree] Now, if I replace the last line with U[Ifree] = A[Ifree,Ifree] \ F[Ifree] then I get the following error message: `umferror` has no method matching umferror(::Int32) while loading In[112], in expression starting on line 3 in umfpack_symbolic! at linalg/umfpack.jl:155 in umfpack_numeric! at linalg/umfpack.jl:176 in lufact at linalg/umfpack.jl:118 in A_ldiv_B! at linalg/sparse.jl:210 in \ at linalg/generic.jl:233 Same happens with `lufact`. I also tried copying B = copy(A[Ifree,Ifree]) first. Same result. I have used UMFPack successfully in other cases. E.g., U = (A+speye(size(X,2)) \ F works fine. Any ideas? Christoph
[julia-users] Reports generation / Literate programming for Julia: JuliaReport
Hi, I've written a small Julia package for generating reports https://github.com/mpastell/JuliaReport.jl. It is based on my other project Pweave https://github.com/mpastell/Pweave for Python reports. Here a small example of output: https://github.com/mpastell/JuliaReport.jl/raw/master/examples/julia_sample.pdf. This is the very first version, and my first proper Julia module, but it works quite well. Document parsing and output formatting are done using Pweave so there is not that much Julia code in it. I'm posting this here to know if this is something people are interested in it and looking for some feedback. So if think it's something you need give it a try. You'll need PyCall and PyPlot to use it as well as Pweave from Github. Best, Matti http://mpastell.com
Re: [julia-users] A Test Matrix Collection for Julia
Hi, This is a great idea. Just a cosmetic suggestion: given that Julia has symbols, would it make sense to use them (eg :hilb, :cauchy) instead of strings for selection? Strings are popular in S/R/S-plus for this purpose, but the syntax of Julia is more lispy so symbols may feel more natural (but this is, of course, a matter of taste). Best, Tamas On Tue, Nov 25 2014, Weijian Zhang zweiji...@gmail.com wrote: Hello, We are designing a test matrix collection for Julia. The idea is to use a single function to call many different test matrices. It has some similarity to MATLAB's gallery function but is more powerful. The function name is matrixdepot. Every matrix in the collection is represented by a string, for example, the Cauchy matrix is represented by cauchy and the Hilbert matrix is represented by hilb. The properties of the matrices in the collection are also symbolized by strings. For example, the class of the symmetric matrices is symbolized by symmetric. - matrixdepot(matrix_name, p1, p2, ...) returns a matrix specified by the query string matrix_name. p1, p2, ... are input parameters depending on matrix_name. - matrixdepot(matrix_name) returns the parameter options and the properties of matrix_name. - matrixdepot(property_name) returns a list of matrices with the property property_name. The main features are listed in the file matrixdepot_doc.html. All the code is provided in the zip file. Please let us know if you have any suggestions or any features you think we should add. Thanks, Weijian
Re: [julia-users] [Offtopic:] Why you did choose the name Julia?
I've gotten used to searching for julialang. Cheers, Kevin On Tuesday, November 25, 2014, K Leo cnbiz...@gmail.com wrote: results = search(Julia) for result in results if contains(result, program) println(result) end end On 2014年11月25日 15:40, Francesco Bonazzi wrote: The problem with the name Julia is that you find a lot of other stuff unrelated to programming when you look on Google.
[julia-users] GC and 3D Graphics
Hi, I was wondering about how much of a burden Julia's garbage collector will be for state of the art 3D graphics. Apple always had the upper hand with smooth animations and very little ram consumption and from what I've read this is/was mainly due to Android using Java with a gc. What options do I have for Julia? Is it easy to create a data structure not relying on the gc? How much effort would it take, to create a drawing thread, which will not get stopped by the gc? (under the assumption, that the thread only uses gc free data structures) Cheers, Simon
[julia-users] Overloading +=
Is it possible that + can be overloaded, but += cannot (but is derived from +)? My context is this: I want to define some type, say `mytype` and allow the operation A = mytype() A[i] += B where i is some index, B is some value. But I do *not* want to allow something like A = A + B At the moment, I just overload setindex!, but then I need to use A[i] = B which reads all wrong. Is there a way to do what I want? Thank you, Christoph
[julia-users] Re: A Test Matrix Collection for Julia
I have just pushed it GitHub. Here is the link: https://github.com/weijianzhang/MatrixDepot.jl Best, Weijian
Re: [julia-users] Overloading +=
Is it possible that + can be overloaded, but += cannot (but is derived from +)? Yes, that is right. += is just sugar. There has been talk to make += stand on its own. My context is this: I want to define some type, say `mytype` and allow the operation A = mytype() A[i] += B where i is some index, B is some value. But I do *not* want to allow something like A = A + B At the moment, I just overload setindex!, but then I need to use A[i] = B which reads all wrong. I don't quite understand. A[i] += B gets translated to A[i] = A[i] + B So you need to define both getindex and setindex! for A, and + needs to be defined for the elements of A B. Then it should work.
Re: [julia-users] GC and 3D Graphics
If the thread is known to run quickly and won't use up all memory, you could try simply turning off garbage collection while drawing, and turning it back on after. That said, Oscar Blumberg has a PR ( https://github.com/JuliaLang/julia/pull/8699) for an incremental garbage collector which is targeted at such uses. It should be merged for v0.4. Cheers, Kevin On Tuesday, November 25, 2014, Simon Danisch sdani...@gmail.com wrote: Hi, I was wondering about how much of a burden Julia's garbage collector will be for state of the art 3D graphics. Apple always had the upper hand with smooth animations and very little ram consumption and from what I've read this is/was mainly due to Android using Java with a gc. What options do I have for Julia? Is it easy to create a data structure not relying on the gc? How much effort would it take, to create a drawing thread, which will not get stopped by the gc? (under the assumption, that the thread only uses gc free data structures) Cheers, Simon
[julia-users] Re: A Test Matrix Collection for Julia
I have just pushed it to GitHub: https://github.com/weijianzhang/MatrixDepot.jl Best, Weijian On Tuesday, 25 November 2014 10:01:42 UTC, Weijian Zhang wrote: Hello, We are designing a test matrix collection for Julia. The idea is to use a single function to call many different test matrices. It has some similarity to MATLAB's gallery function but is more powerful. The function name is matrixdepot. Every matrix in the collection is represented by a string, for example, the Cauchy matrix is represented by cauchy and the Hilbert matrix is represented by hilb. The properties of the matrices in the collection are also symbolized by strings. For example, the class of the symmetric matrices is symbolized by symmetric. - matrixdepot(matrix_name, p1, p2, ...) returns a matrix specified by the query string matrix_name. p1, p2, ... are input parameters depending on matrix_name. - matrixdepot(matrix_name) returns the parameter options and the properties of matrix_name. - matrixdepot(property_name) returns a list of matrices with the property property_name. The main features are listed in the file matrixdepot_doc.html. All the code is provided in the zip file. Please let us know if you have any suggestions or any features you think we should add. Thanks, Weijian
Re: [julia-users] Overloading +=
Thank you. I think making += standalone would be good. I assume this would also make it faster? Re your suggestion: yes, I do understand that I can do that (in fact I did do it that way), but this makes it possible to evaluate A[i] and work with it, which I want to expressly forbid in my code. This is not mission-critical, just academic really, I was just curious whether it could be done. Thanks for your help. Christoph
[julia-users] Re: Backslash or UMFPACK Bug, related to slicing
Now reported in as #9146 Thank you, Christoph On Tuesday, 25 November 2014 11:30:16 UTC, Ivar Nesje wrote: This is at least one bug. In /base/linalg/umfpack.jl#L18 https://github.com/JuliaLang/julia/blob/master/base/linalg/umfpack.jl#L18, we have a convenience function to lookup the status code, seems to be restricted to Int64, even though it is called with Int32 on some occations. If you compile yourself, or know how to regenerate the system image, it is pretty easy to change *Int* to *Integer* on that line. A real fix for this would require someone to actually check the return types of the C functions called, and include some more tests to ensure that all code paths are followed in the test suite. Would you mind reporting this issue on Github? kl. 12:10:36 UTC+1 tirsdag 25. november 2014 skrev Christoph Ortner følgende: I had some unexplained \ behaviour that I'd like to clarify? Possibly a bug? Here is a short code snippet that does work ok. I get the correct solution from it. (primarily the last line is relevant) # construct a finite element grid X, T = square(10) # assemble the stiffness matrix and rhs (for - \Delta u = 1) A, F = simple_stiffmat(X, T) # find the interior nodes Ifree = find( (minimum(X,1) . 0) (maximum(X, 1) . 1) ) # solve the linear system and plot the solution U = zeros(size(X,2)) U[Ifree] = cholfact(A[Ifree,Ifree]) \ F[Ifree] Now, if I replace the last line with U[Ifree] = A[Ifree,Ifree] \ F[Ifree] then I get the following error message: `umferror` has no method matching umferror(::Int32) while loading In[112], in expression starting on line 3 in umfpack_symbolic! at linalg/umfpack.jl:155 in umfpack_numeric! at linalg/umfpack.jl:176 in lufact at linalg/umfpack.jl:118 in A_ldiv_B! at linalg/sparse.jl:210 in \ at linalg/generic.jl:233 Same happens with `lufact`. I also tried copying B = copy(A[Ifree,Ifree]) first. Same result. I have used UMFPack successfully in other cases. E.g., U = (A+speye(size(X,2)) \ F works fine. Any ideas? Christoph
Re: [julia-users] Security problem with unitialized memory
It seems more reasonable to me to always zero uninitialized fields of composite values. This is basically free since objects larger than a memory page are not common. On Tue, Nov 25, 2014 at 1:13 AM, Ronald L. Rivest rivest@gmail.com wrote: Sorry; zeros() does not work here instead of new(). My mistake. Is there a safe alternative to new() that guarantees that all fields will have a definite fixed value? Cheers, Ron On Tuesday, November 25, 2014 1:05:40 AM UTC-5, Ronald L. Rivest wrote: The problem also exists for new() (e.g. when initializing a record/object). zeros() can apparently be used here instead. Cheers, Ron On Tuesday, November 25, 2014 12:29:07 AM UTC-5, Viral Shah wrote: Much has been already said on this topic. The Array(...) interface was kind of meant to be low-level for the user of scientific computing, only to be used when they know what they are doing. You get the raw uninitialized memory as fast as possible. The user-facing interface was always an array constructor - zeros(), ones(), rand(), etc. Some of this is because of our past experience coming from a matlab/R-like world. As Julia has become more popular, we have realized that those not coming from matlab/R end up using all the possible constructors. While this has raised a variety of issues, I'd like to say that this will not get sorted out satisfactorily before the 0.4 release. For a class that may be taught soon, the thing to do would be to use the zeros/ones/rand constructors to construct arrays, instead of Array(), which currently is more for a package developer. I understand that Array() is a much better name as Stefan points out, but zeros() is not too terrible - it at least clearly tells the user that they get zeroed out arrays. While we have other features that can lead to unsafe code (ccall, @inbounds), none of these are things one is likely to run into while learning the language. -viral On Tuesday, November 25, 2014 1:00:10 AM UTC+5:30, Ronald L. Rivest wrote: Regarding initialization: -- I'm toying with the idea of recommending Julia for an introductory programming class (rather than Python). -- For this purpose, the language should not have hazards that catch the unwary. -- Not initializing storage is definitely a hazard. With uninitialized storage, a program may run fine one day, and fail mysteriously the next, depending on the contents of memory. This is about predictability, reliability, dependability, and correctness. -- I would favor a solution like A = Array(Int64,n) -- fills with zeros A = Array(Int64,n,fill=1) -- to fill with ones A = Array(Int64,n,fill=None)-- for an uninitialized array so that the *default* is an initialized array, but the speed geeks can get what they want. Cheers, Ron On Monday, November 24, 2014 1:57:14 PM UTC-5, Stefan Karpinski wrote: If we can make allocating zeroed arrays faster that's great, but unless we can close the performance gap all the way and eliminate the need to allocated uninitialized arrays altogether, this proposal is just a rename – Unchecked.Array plays the exact same role as the current Array constructor. It's unclear that this would even address the original concern since it still *allows* uninitialized allocation of arrays. This rename would just force people who have used Array correctly in code that cares about being as efficient as possible even for very large arrays to change their code and use Unchecked.Array instead. On Nov 24, 2014, at 1:36 PM, Jameson Nash vtj...@gmail.com wrote: I think that Rivest’s question may be a good reason to rethink the initialization of structs and offer the explicit guarantee that all unassigned elements will be initialized to 0 (and not just the jl_value_t pointers). I would argue that the current behavior resulted more from a desire to avoid clearing the array twice (if the user is about to call fill, zeros, ones, +, etc.) than an intentional, casual exposure of uninitialized memory. A random array of integers is also a security concern if an attacker can extract some other information (with some probability) about the state of the program. Julia is not hardened by design, so you can’t safely run an unknown code fragment, but you still might have an unintended memory exposure in a client-facing app. While zero’ing memory doesn’t prevent the user from simply reusing a memory buffer in a security-unaware fashion (rather than consistently allocating a new one for each use), it’s not clear to me that the performance penalty would be all that noticeable for map Array(X) to zero(X), and only providing an internal constructor for grabbing uninitialized memory (perhaps Base.Unchecked.Array(X) from #8227) On Mon Nov 24 2014 at 12:57:22 PM Stefan Karpinski stefan.karpin...@gmail.com
Re: [julia-users] Installing IJulia
Is ipython in your PATH? On Tue, Nov 25, 2014 at 5:05 AM, Abram Demski abramdem...@gmail.com wrote: Hi all, I'm trying to install IJulia. (I failed when I first tried in the spring, and have been sticking with Julia Studio since that time.) I'm now trying to install it on a new Windows 8.1 machine. I followed the instructions here: https://github.com/JuliaLang/IJulia.jl Installed IPython through the anaconda package (checking the necessary boxes and also installing as admin), ran Pkg.add(IJulia). This outputs the following: INFO: Building IJulia ===[ ERROR: IJulia ] IPython is required for IJulia, got errors could not spawn `ipython --version`: no such file or directory (ENOENT) could not spawn `ipython2 --version`: no such file or directory (ENOENT) could not spawn `ipython3 --version`: no such file or directory (ENOENT) could not spawn `ipython.bat --version`: no such file or directory (ENOENT) while loading C:\Users\abram\.julia\v0.3\IJulia\deps\build.jl, in expression starting on line 9 [ BUILD ERRORS ] WARNING: IJulia had build errors. - packages with build errors remain installed in C:\Users\abram\.julia\v0.3 - build a package and all its dependencies with `Pkg.build(pkg)` - build a single package by running its `deps/build.jl` script Attempting to run IJulia just opens IPython, as would be expected. The troupleshooting guide for the IJulia install mentions this possibility, but does not suggest fixes for package installation problems. Any ideas? Thanks, Abram
Re: [julia-users] Re: Neuro-Dynamic Programming in Julia
Sounds like a cool project. Are the state space representations that RL-Glue uses easy to work with? — John On Nov 24, 2014, at 10:09 PM, wild...@gmail.com wrote: Reinforcement learning (RL) isn't covered much in Julia packages. There is a collection of RL algorithms over MDP in package: https://github.com/cpritcha/MDP. There is a collection of IJulia notebooks from a Stanford course that cover more RL algorithms: https://github.com/sisl/aa228-notebook/tree/master Unfortunately, more advanced function approximation techniques, beyond look-up table, that allow to tackle large action-state spaces, are nowhere to find. Couple a month ago, Shane Conway, the guy behind RL-Glue, talked about developing Julia RL-Glue client. If that happens, it would be quite simple to use various advanced RL algorithms, including value function approximators, in Julia. On Saturday, November 22, 2014 11:12:29 PM UTC-5, Pileas wrote: Some problems have the so-called curse of dimensionality and curse of modeling. For this reason Bersekas and Tsimtsiklis (at MIT) introduced the so-called Neuro-Dynamic Programing. Does Julia offer support for the aforementioned and if not, how about the future?
Re: [julia-users] Security problem with unitialized memory
Issue created: https://github.com/JuliaLang/julia/issues/9147. On Tue, Nov 25, 2014 at 10:16 AM, Stefan Karpinski ste...@karpinski.org wrote: It seems more reasonable to me to always zero uninitialized fields of composite values. This is basically free since objects larger than a memory page are not common. On Tue, Nov 25, 2014 at 1:13 AM, Ronald L. Rivest rivest@gmail.com wrote: Sorry; zeros() does not work here instead of new(). My mistake. Is there a safe alternative to new() that guarantees that all fields will have a definite fixed value? Cheers, Ron On Tuesday, November 25, 2014 1:05:40 AM UTC-5, Ronald L. Rivest wrote: The problem also exists for new() (e.g. when initializing a record/object). zeros() can apparently be used here instead. Cheers, Ron On Tuesday, November 25, 2014 12:29:07 AM UTC-5, Viral Shah wrote: Much has been already said on this topic. The Array(...) interface was kind of meant to be low-level for the user of scientific computing, only to be used when they know what they are doing. You get the raw uninitialized memory as fast as possible. The user-facing interface was always an array constructor - zeros(), ones(), rand(), etc. Some of this is because of our past experience coming from a matlab/R-like world. As Julia has become more popular, we have realized that those not coming from matlab/R end up using all the possible constructors. While this has raised a variety of issues, I'd like to say that this will not get sorted out satisfactorily before the 0.4 release. For a class that may be taught soon, the thing to do would be to use the zeros/ones/rand constructors to construct arrays, instead of Array(), which currently is more for a package developer. I understand that Array() is a much better name as Stefan points out, but zeros() is not too terrible - it at least clearly tells the user that they get zeroed out arrays. While we have other features that can lead to unsafe code (ccall, @inbounds), none of these are things one is likely to run into while learning the language. -viral On Tuesday, November 25, 2014 1:00:10 AM UTC+5:30, Ronald L. Rivest wrote: Regarding initialization: -- I'm toying with the idea of recommending Julia for an introductory programming class (rather than Python). -- For this purpose, the language should not have hazards that catch the unwary. -- Not initializing storage is definitely a hazard. With uninitialized storage, a program may run fine one day, and fail mysteriously the next, depending on the contents of memory. This is about predictability, reliability, dependability, and correctness. -- I would favor a solution like A = Array(Int64,n) -- fills with zeros A = Array(Int64,n,fill=1) -- to fill with ones A = Array(Int64,n,fill=None)-- for an uninitialized array so that the *default* is an initialized array, but the speed geeks can get what they want. Cheers, Ron On Monday, November 24, 2014 1:57:14 PM UTC-5, Stefan Karpinski wrote: If we can make allocating zeroed arrays faster that's great, but unless we can close the performance gap all the way and eliminate the need to allocated uninitialized arrays altogether, this proposal is just a rename – Unchecked.Array plays the exact same role as the current Array constructor. It's unclear that this would even address the original concern since it still *allows* uninitialized allocation of arrays. This rename would just force people who have used Array correctly in code that cares about being as efficient as possible even for very large arrays to change their code and use Unchecked.Array instead. On Nov 24, 2014, at 1:36 PM, Jameson Nash vtj...@gmail.com wrote: I think that Rivest’s question may be a good reason to rethink the initialization of structs and offer the explicit guarantee that all unassigned elements will be initialized to 0 (and not just the jl_value_t pointers). I would argue that the current behavior resulted more from a desire to avoid clearing the array twice (if the user is about to call fill, zeros, ones, +, etc.) than an intentional, casual exposure of uninitialized memory. A random array of integers is also a security concern if an attacker can extract some other information (with some probability) about the state of the program. Julia is not hardened by design, so you can’t safely run an unknown code fragment, but you still might have an unintended memory exposure in a client-facing app. While zero’ing memory doesn’t prevent the user from simply reusing a memory buffer in a security-unaware fashion (rather than consistently allocating a new one for each use), it’s not clear to me that the performance penalty would be all that noticeable for map Array(X) to zero(X), and only providing an internal constructor for grabbing
Re: [julia-users] Security problem with unitialized memory
On Monday, November 24, 2014 10:54:36 PM UTC-5, Simon Kornblith wrote: In general, arrays cannot be assumed to be 16-byte aligned because it's always possible to create one that isn't using pointer_to_array. However, from Intel's AVX introduction https://software.intel.com/en-us/articles/introduction-to-intel-advanced-vector-extensions : Intel® AVX has relaxed some memory alignment requirements, so now Intel AVX by default allows unaligned access; however, this access may come at a performance slowdown, so the old rule of designing your data to be memory aligned is still good practice (16-byte aligned for 128-bit access and 32-byte aligned for 256-bit access). And BTW 512 bit AVX registers are coming next year. http://en.wikipedia.org/wiki/AVX-512
[julia-users] Re: Fitting a weighted multiple linear regression with Julia
Just to follow-up: I realized that one may supply linreg a weights argument, and that the data I had passed the function were not in the correct format. The weighted multiple linear regression is working now. Ryan On Saturday, November 22, 2014 10:46:58 AM UTC-5, Ryan Kyle wrote: Greetings, I just started using Julia yesterday, and I'm currently trying to translate a bit of my existing R code. I hope the answer isn't too obvious, but I'm not sure how to fit a weighted linear regression in Julia -- in R, I would try something like weighted_lm - lm(Y ~ X1 + X2, weights = my_weights, data = my_data) Is this currently possible using linreg or GLM? The following thread suggests this feature may be still be unavailable: https://github.com/JuliaStats/GLM.jl/issues/37 Cheers, Ryan
[julia-users] [off topic] julia
Sitting somewhere with a beer and forced to listen to Chris Rea's Julia while doing some Mathematica. What a nice coincidence ;)
[julia-users] Re: [off topic] julia
and you continue and then there is Nightshift by the Commodores. If this is not a divine hint... On Tuesday, November 25, 2014 7:02:18 PM UTC+1, Stefan Schwarz wrote: Sitting somewhere with a beer and forced to listen to Chris Rea's Julia while doing some Mathematica. What a nice coincidence ;)
Re: [julia-users] Security problem with unitialized memory
On Tue, Nov 25, 2014 at 11:10 AM, Jeff Waller truth...@gmail.com wrote: On Monday, November 24, 2014 10:54:36 PM UTC-5, Simon Kornblith wrote: In general, arrays cannot be assumed to be 16-byte aligned because it's always possible to create one that isn't using pointer_to_array. However, from Intel's AVX introduction: Intel® AVX has relaxed some memory alignment requirements, so now Intel AVX by default allows unaligned access; however, this access may come at a performance slowdown, so the old rule of designing your data to be memory aligned is still good practice (16-byte aligned for 128-bit access and 32-byte aligned for 256-bit access). And BTW 512 bit AVX registers are coming next year. http://en.wikipedia.org/wiki/AVX-512 The are already here http://en.wikipedia.org/wiki/Xeon_Phi; see e.g. http://top500.org/system/177931. -erik -- Erik Schnetter schnet...@cct.lsu.edu http://www.perimeterinstitute.ca/personal/eschnetter/
Re: [julia-users] Overloading +=
See the discussions at: https://github.com/JuliaLang/julia/issues/249 https://github.com/JuliaLang/julia/issues/3217 https://github.com/JuliaLang/julia/issues/7052
[julia-users] Meshgrid in Julia: a working example and possible alternatives
Hi brothers, I am practicing a little bit in Julia now, and I want to see how meshgrid (if there is any) works. I found an example in Matlab (for I find it easier to cope with and make it Julia compatible), but I don't know how to do the meshgrid. Here is the example: -- col = 20; m = 400; cx = -.6; cy = 0; l = 1.5; x = linspace(cx-l,cx + l,m); y = linspace(cy-l,cy + l,m); (X,Y) = ndgrid(x,y); Z = zeros(m); C = X + i * Y; for k = 1:col; Z = Z.^2+C; W = exp(-abs(Z)); end colormap copper(256); pcolor(W); shading flat; axis(’square’,’equal’,’off’); - I would really appreciate if someone can give a working example in Julia of the aforementioned. Best ...
[julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
Also consider using for loops to eliminate the need for storage of intermediates. For loops are much faster in Julia than in Matlab. On Tuesday, November 25, 2014 2:26:39 PM UTC-6, Peter Simon wrote: You can find examples of both meshgrid and ndgrid implemented in https://github.com/JuliaLang/julia/blob/master/examples/ndgrid.jl . However, you will find that generally meshgrid is not needed, as similar functionality can be accomplished by broadcasting http://docs.julialang.org/en/release-0.3/manual/arrays/?highlight=broadcast#broadcasting or by use of comprehensions http://docs.julialang.org/en/release-0.3/manual/arrays/?highlight=broadcast#comprehensions . --Peter On Tuesday, November 25, 2014 11:39:57 AM UTC-8, Pileas wrote: Hi brothers, I am practicing a little bit in Julia now, and I want to see how meshgrid (if there is any) works. I found an example in Matlab (for I find it easier to cope with and make it Julia compatible), but I don't know how to do the meshgrid. Here is the example: -- col = 20; m = 400; cx = -.6; cy = 0; l = 1.5; x = linspace(cx-l,cx + l,m); y = linspace(cy-l,cy + l,m); (X,Y) = ndgrid(x,y); Z = zeros(m); C = X + i * Y; for k = 1:col; Z = Z.^2+C; W = exp(-abs(Z)); end colormap copper(256); pcolor(W); shading flat; axis(’square’,’equal’,’off’); - I would really appreciate if someone can give a working example in Julia of the aforementioned. Best ...
[julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
Here is my solution, there is one problem that i do not understand and hope another can explain. When col=20 W is filled with NaN + NaN*im but for col=10 it work like matlab, I think it is because of overflow. using PyPlot col = 10; m = 400; cx = -.6; cy = 0; l = 1.5; x = linspace(cx-l,cx + l,m); y = linspace(cy-l,cy + l,m); X = repmat(x,1,m) Y = repmat(y,1,m)' Z = zeros(m,m); C = X + im * Y; W = zeros(Z) for k = 1:col; Z = Z.*Z+C W = exp(-abs(Z)); println(Z[100,100]) end pcolor(W,cmap=ColorMap(copper)) By changing the calculation to happen with BigFloats it works. Z = zeros(BigFloat, m,m); pcolor(float64(W),cmap=ColorMap(copper))
[julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
Note that you don't need to use meshgrid, repmat, or similar, because you can use broadcasting operations (e.g .+) to combine row and column vectors: col = 20; m = 400; cx = -.6; cy = 0; l = 1.5; x = linspace(cx-l,cx + l,m); y = linspace(cy-l,cy + l,m); Z = zeros(m,m); C = x' .+ im * y; for k = 1:col; Z = Z.^2+C; end W = exp(-abs(Z)); pcolor(W, cmap=copper); colorbar() axis(equal) (Note also that there are more efficient ways to do this in Julia because you aren't forced to rely on vectorized operations, which allocate lots of temporary arrays, in order to get good performance.)
[julia-users] Constant attributes of Composite Type
Hi Julians: I'm still new to Julia and am having a little trouble correctly understanding composite types. I would like to create a composite type with a mixture of constant attributes, i.e. class attributes, and mutable attributes. In practice, the problem is that I need to instantiate many, e.g. 10e8, type instances and would like to avoid having to allocate memory for values which are constant over a large subset of these instances. Is there any way to do this correctly? Thanks for your help! Robert
Re: [julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
it does not understand pcolor, even when I load PyPlot. Why? Do we need to load a different package? 2014-11-25 15:59 GMT-05:00 Steven G. Johnson stevenj@gmail.com: Note that you don't need to use meshgrid, repmat, or similar, because you can use broadcasting operations (e.g .+) to combine row and column vectors: col = 20; m = 400; cx = -.6; cy = 0; l = 1.5; x = linspace(cx-l,cx + l,m); y = linspace(cy-l,cy + l,m); Z = zeros(m,m); C = x' .+ im * y; for k = 1:col; Z = Z.^2+C; end W = exp(-abs(Z)); pcolor(W, cmap=copper); colorbar() axis(equal) (Note also that there are more efficient ways to do this in Julia because you aren't forced to rely on vectorized operations, which allocate lots of temporary arrays, in order to get good performance.)
Re: [julia-users] Constant attributes of Composite Type
Hi Robert, I think the solution to your problem is to stop working with the fields of types and instead focus on functions. A class method then just becomes a constant function that takes in an object of type T. Hope that helps. - John On Nov 25, 2014, at 1:00 PM, Robert Gates robert.ga...@gmail.com wrote: Hi Julians: I'm still new to Julia and am having a little trouble correctly understanding composite types. I would like to create a composite type with a mixture of constant attributes, i.e. class attributes, and mutable attributes. In practice, the problem is that I need to instantiate many, e.g. 10e8, type instances and would like to avoid having to allocate memory for values which are constant over a large subset of these instances. Is there any way to do this correctly? Thanks for your help! Robert
[julia-users] Re: Constant attributes of Composite Type
Hi John, Thanks for your quick reply. Yes, I have though of this, however, it sounded a bit like a clumsy workaround. That would mean I would have: function (a, b, c) = constantAttributes{T:MyAbstractType}(::Type{T}) a = 3 b = 2 c = 5 end instance = MyType(someAttributes) (att1, att2, att3) = constantAttribute(typeof(instance)) Right? BTW, a little OT, I know, but is there an overhead if I pass the instance itself, instead of only its type, i.e. constantAttributes{T:MyAbstractType}(instance::T)? On Tuesday, November 25, 2014 10:00:59 PM UTC+1, Robert Gates wrote: Hi Julians: I'm still new to Julia and am having a little trouble correctly understanding composite types. I would like to create a composite type with a mixture of constant attributes, i.e. class attributes, and mutable attributes. In practice, the problem is that I need to instantiate many, e.g. 10e8, type instances and would like to avoid having to allocate memory for values which are constant over a large subset of these instances. Is there any way to do this correctly? Thanks for your help! Robert
Re: [julia-users] Installing IJulia
Anaconda is in my PATH, but the IPython sub-directory is not. Should it be added? Thanks, Abram On Tue, Nov 25, 2014 at 7:32 AM, Stefan Karpinski ste...@karpinski.org wrote: Is ipython in your PATH? On Tue, Nov 25, 2014 at 5:05 AM, Abram Demski abramdem...@gmail.com wrote: Hi all, I'm trying to install IJulia. (I failed when I first tried in the spring, and have been sticking with Julia Studio since that time.) I'm now trying to install it on a new Windows 8.1 machine. I followed the instructions here: https://github.com/JuliaLang/IJulia.jl Installed IPython through the anaconda package (checking the necessary boxes and also installing as admin), ran Pkg.add(IJulia). This outputs the following: INFO: Building IJulia ===[ ERROR: IJulia ] IPython is required for IJulia, got errors could not spawn `ipython --version`: no such file or directory (ENOENT) could not spawn `ipython2 --version`: no such file or directory (ENOENT) could not spawn `ipython3 --version`: no such file or directory (ENOENT) could not spawn `ipython.bat --version`: no such file or directory (ENOENT) while loading C:\Users\abram\.julia\v0.3\IJulia\deps\build.jl, in expression starting on line 9 [ BUILD ERRORS ] WARNING: IJulia had build errors. - packages with build errors remain installed in C:\Users\abram\.julia\v0.3 - build a package and all its dependencies with `Pkg.build(pkg)` - build a single package by running its `deps/build.jl` script Attempting to run IJulia just opens IPython, as would be expected. The troupleshooting guide for the IJulia install mentions this possibility, but does not suggest fixes for package installation problems. Any ideas? Thanks, Abram -- Abram Demski Blog: http://lo-tho.blogspot.com/
Re: [julia-users] Installing IJulia
It should. On Tue, Nov 25, 2014 at 4:34 PM, Abram Demski abramdem...@gmail.com wrote: Anaconda is in my PATH, but the IPython sub-directory is not. Should it be added? Thanks, Abram On Tue, Nov 25, 2014 at 7:32 AM, Stefan Karpinski ste...@karpinski.org wrote: Is ipython in your PATH? On Tue, Nov 25, 2014 at 5:05 AM, Abram Demski abramdem...@gmail.com wrote: Hi all, I'm trying to install IJulia. (I failed when I first tried in the spring, and have been sticking with Julia Studio since that time.) I'm now trying to install it on a new Windows 8.1 machine. I followed the instructions here: https://github.com/JuliaLang/IJulia.jl Installed IPython through the anaconda package (checking the necessary boxes and also installing as admin), ran Pkg.add(IJulia). This outputs the following: INFO: Building IJulia ===[ ERROR: IJulia ] IPython is required for IJulia, got errors could not spawn `ipython --version`: no such file or directory (ENOENT) could not spawn `ipython2 --version`: no such file or directory (ENOENT) could not spawn `ipython3 --version`: no such file or directory (ENOENT) could not spawn `ipython.bat --version`: no such file or directory (ENOENT) while loading C:\Users\abram\.julia\v0.3\IJulia\deps\build.jl, in expression starting on line 9 [ BUILD ERRORS ] WARNING: IJulia had build errors. - packages with build errors remain installed in C:\Users\abram\.julia\v0.3 - build a package and all its dependencies with `Pkg.build(pkg)` - build a single package by running its `deps/build.jl` script Attempting to run IJulia just opens IPython, as would be expected. The troupleshooting guide for the IJulia install mentions this possibility, but does not suggest fixes for package installation problems. Any ideas? Thanks, Abram -- Abram Demski Blog: http://lo-tho.blogspot.com/
Re: [julia-users] Installing IJulia
On Tuesday, November 25, 2014 4:34:25 PM UTC-5, Abram Demski wrote: Anaconda is in my PATH, but the IPython sub-directory is not. Should it be added? http://lo-tho.blogspot.com/ If Anaconda (the conda executable) is in your path, then normally ipython will be was well. You don't need the directory of the IPython module to be in your PATH, you need the directory of the ipython executable. (You can type ENV[PATH] in Julia to check whether the path is what you think it is.)
Re: [julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
On Tuesday, November 25, 2014 4:05:58 PM UTC-5, Pileas wrote: it does not understand pcolor, even when I load PyPlot. Why? Do we need to load a different package? No. Maybe you don't have Matplotlib installed. (I would generally recommend using the Anaconda Python distro, which will include everything you might need, including IPython for running IJulia.)
Re: [julia-users] Installing IJulia
Ah, I see, I was mistaken. The directory of ipython.exe is in fact in my path. So, that's not the problem. On Tue, Nov 25, 2014 at 1:58 PM, Steven G. Johnson stevenj@gmail.com wrote: On Tuesday, November 25, 2014 4:34:25 PM UTC-5, Abram Demski wrote: Anaconda is in my PATH, but the IPython sub-directory is not. Should it be added? http://lo-tho.blogspot.com/ If Anaconda (the conda executable) is in your path, then normally ipython will be was well. You don't need the directory of the IPython module to be in your PATH, you need the directory of the ipython executable. (You can type ENV[PATH] in Julia to check whether the path is what you think it is.) -- Abram Demski Blog: http://lo-tho.blogspot.com/
[julia-users] Re: [off topic] julia
welcome, fellow Julian ... On Tuesday, November 25, 2014 10:14:43 AM UTC-8, Stefan Schwarz wrote: and you continue and then there is Nightshift by the Commodores. If this is not a divine hint... On Tuesday, November 25, 2014 7:02:18 PM UTC+1, Stefan Schwarz wrote: Sitting somewhere with a beer and forced to listen to Chris Rea's Julia while doing some Mathematica. What a nice coincidence ;)
Re: [julia-users] Installing IJulia
This is my system PATH: C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Condusiv Technologies\ExpressCache\;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\ProgramData\Lenovo\ReadyApps;C:\Anaconda;C:\Anaconda\Scripts The executable ipython.exe lives in C:\Anaconda\Scripts. Julia shows a similar PATH when I run ENV[PATH], but with more julia-specific things. (It seems that command prompts in Windows 8.1 do not allow one to copy text out of them directly.. otherwise I'd copy.) On Tue, Nov 25, 2014 at 2:33 PM, Abram Demski abramdem...@gmail.com wrote: Ah, I see, I was mistaken. The directory of ipython.exe is in fact in my path. So, that's not the problem. On Tue, Nov 25, 2014 at 1:58 PM, Steven G. Johnson stevenj@gmail.com wrote: On Tuesday, November 25, 2014 4:34:25 PM UTC-5, Abram Demski wrote: Anaconda is in my PATH, but the IPython sub-directory is not. Should it be added? http://lo-tho.blogspot.com/ If Anaconda (the conda executable) is in your path, then normally ipython will be was well. You don't need the directory of the IPython module to be in your PATH, you need the directory of the ipython executable. (You can type ENV[PATH] in Julia to check whether the path is what you think it is.) -- Abram Demski Blog: http://lo-tho.blogspot.com/ -- Abram Demski Blog: http://lo-tho.blogspot.com/
Re: [julia-users] Installing IJulia
if you have access to the PowerShell in Windows 8 ( ... and similar, new-ish, MS OSs ...), then highlighting a block of text from the PowerShell and right clicking should rip it to the clipboard for pasting else-where ... best, cdm On Tuesday, November 25, 2014 2:42:51 PM UTC-8, Abram Demski wrote: Julia shows a similar PATH when I run ENV[PATH], but with more julia-specific things. (It seems that command prompts in Windows 8.1 do not allow one to copy text out of them directly.. otherwise I'd copy.)
Re: [julia-users] Installing IJulia
Thanks! I figured out how to do it in the default shell: julia print(ENV[PATH]) C:\Users\abram\AppData\Local\Julia-0.3.3\bin;C:\Users\abram\AppData\Local\Julia- 0.3.3\bin\..\Git\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\ Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\wi ndows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Managemen t Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Compon ents\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Progra m Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\P rogram Files\Condusiv Technologies\ExpressCache\;C:\Program Files (x86)\Common F iles\lenovo\easyplussdk\bin;C:\ProgramData\Lenovo\ReadyApps;C:\Anaconda;C:\Anaco nda\Scripts (I have not used windows much since Windows 98! ;p) On Tue, Nov 25, 2014 at 3:02 PM, cdm cdmclean@gmail.com wrote: if you have access to the PowerShell in Windows 8 ( ... and similar, new-ish, MS OSs ...), then highlighting a block of text from the PowerShell and right clicking should rip it to the clipboard for pasting else-where ... best, cdm On Tuesday, November 25, 2014 2:42:51 PM UTC-8, Abram Demski wrote: Julia shows a similar PATH when I run ENV[PATH], but with more julia-specific things. (It seems that command prompts in Windows 8.1 do not allow one to copy text out of them directly.. otherwise I'd copy.) -- Abram Demski Blog: http://lo-tho.blogspot.com/
Re: [julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
I get the following error: /usr/lib/pymodules/python2.7/matplotlib/colorbar.py:581: RuntimeWarning: invalid value encountered in greater inrange = (ticks -0.001) (ticks 1.001) And I have Anaconda installed. Τη Τρίτη, 25 Νοεμβρίου 2014 4:59:22 μ.μ. UTC-5, ο χρήστης Steven G. Johnson έγραψε: On Tuesday, November 25, 2014 4:05:58 PM UTC-5, Pileas wrote: it does not understand pcolor, even when I load PyPlot. Why? Do we need to load a different package? No. Maybe you don't have Matplotlib installed. (I would generally recommend using the Anaconda Python distro, which will include everything you might need, including IPython for running IJulia.)
Re: [julia-users] Installing IJulia
I have to suggest a very good editor that supports Julia and it is called Atom. It becomes better each day: Give it a try if you have time: https://atom.io/ Τη Τρίτη, 25 Νοεμβρίου 2014 6:12:52 μ.μ. UTC-5, ο χρήστης Abram Demski έγραψε: Thanks! I figured out how to do it in the default shell: julia print(ENV[PATH]) C:\Users\abram\AppData\Local\Julia-0.3.3\bin;C:\Users\abram\AppData\Local\Julia- 0.3.3\bin\..\Git\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\ Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\wi ndows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Managemen t Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Compon ents\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Progra m Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\P rogram Files\Condusiv Technologies\ExpressCache\;C:\Program Files (x86)\Common F iles\lenovo\easyplussdk\bin;C:\ProgramData\Lenovo\ReadyApps;C:\Anaconda;C:\Anaco nda\Scripts (I have not used windows much since Windows 98! ;p) On Tue, Nov 25, 2014 at 3:02 PM, cdm cdmcle...@gmail.com javascript: wrote: if you have access to the PowerShell in Windows 8 ( ... and similar, new-ish, MS OSs ...), then highlighting a block of text from the PowerShell and right clicking should rip it to the clipboard for pasting else-where ... best, cdm On Tuesday, November 25, 2014 2:42:51 PM UTC-8, Abram Demski wrote: Julia shows a similar PATH when I run ENV[PATH], but with more julia-specific things. (It seems that command prompts in Windows 8.1 do not allow one to copy text out of them directly.. otherwise I'd copy.) -- Abram Demski Blog: http://lo-tho.blogspot.com/
Re: [julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
On Tuesday, November 25, 2014 9:26:31 PM UTC-5, Pileas wrote: I get the following error: /usr/lib/pymodules/python2.7/matplotlib/colorbar.py:581: RuntimeWarning: invalid value encountered in greater inrange = (ticks -0.001) (ticks 1.001) And I have Anaconda installed. Maybe, like the error says, you have an invalid value -- something in your array that is not a number, for example. For example, try pcolor(rand(10,10)) which should work.
Re: [julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
(Note that the example code for the Mandelbrot set above produces an array containing NaN values. Maybe that doesn't work if you have an old version of Matplotlib. Maybe try doing a conda update etc. to be sure you have a recent version?)
Re: [julia-users] Re: Meshgrid in Julia: a working example and possible alternatives
My up-to-date version of Matplotlib won't plot NaNs either. On Tuesday, November 25, 2014 10:22:22 PM UTC-6, Steven G. Johnson wrote: (Note that the example code for the Mandelbrot set above produces an array containing NaN values. Maybe that doesn't work if you have an old version of Matplotlib. Maybe try doing a conda update etc. to be sure you have a recent version?)
Re: [julia-users] UInt should be Uint in documentation
Yes, it took me a long time before I realized that you could actually click on that and switch documentation versions. -viral On Tuesday, November 25, 2014 1:39:05 PM UTC+5:30, Milan Bouchet-Valat wrote: I think it would be useful to show the version in a more visible place, for example below the logo on the left. At the moment it's only in the title of the page. Regards Le mardi 25 novembre 2014 à 16:25 +0900, Pontus Stenetorp a écrit : On 25 November 2014 at 16:16, Ronald L. Rivest rivest@gmail.com wrote: You are correct; my apologies for this post. No worries, we are all happy to help. I was reading documentation for development version 0.4.0 but running 0.3.2. So, I guess UInt will be the new Uint as of 0.4.0... Yes, the `Uint` to `UInt` change is a bit of a consistency/clean-up move and was discussed less than a month ago [1]. Pontus [1]: https://github.com/JuliaLang/julia/issues/8905
Re: [julia-users] Security problem with unitialized memory
Much of this this discussion is now captured in the issue Stefan opened. -viral On Tuesday, November 25, 2014 9:05:38 PM UTC+5:30, Stefan Karpinski wrote: Issue created: https://github.com/JuliaLang/julia/issues/9147. On Tue, Nov 25, 2014 at 10:16 AM, Stefan Karpinski ste...@karpinski.org wrote: It seems more reasonable to me to always zero uninitialized fields of composite values. This is basically free since objects larger than a memory page are not common. On Tue, Nov 25, 2014 at 1:13 AM, Ronald L. Rivest rivest@gmail.com wrote: Sorry; zeros() does not work here instead of new(). My mistake. Is there a safe alternative to new() that guarantees that all fields will have a definite fixed value? Cheers, Ron On Tuesday, November 25, 2014 1:05:40 AM UTC-5, Ronald L. Rivest wrote: The problem also exists for new() (e.g. when initializing a record/object). zeros() can apparently be used here instead. Cheers, Ron On Tuesday, November 25, 2014 12:29:07 AM UTC-5, Viral Shah wrote: Much has been already said on this topic. The Array(...) interface was kind of meant to be low-level for the user of scientific computing, only to be used when they know what they are doing. You get the raw uninitialized memory as fast as possible. The user-facing interface was always an array constructor - zeros(), ones(), rand(), etc. Some of this is because of our past experience coming from a matlab/R-like world. As Julia has become more popular, we have realized that those not coming from matlab/R end up using all the possible constructors. While this has raised a variety of issues, I'd like to say that this will not get sorted out satisfactorily before the 0.4 release. For a class that may be taught soon, the thing to do would be to use the zeros/ones/rand constructors to construct arrays, instead of Array(), which currently is more for a package developer. I understand that Array() is a much better name as Stefan points out, but zeros() is not too terrible - it at least clearly tells the user that they get zeroed out arrays. While we have other features that can lead to unsafe code (ccall, @inbounds), none of these are things one is likely to run into while learning the language. -viral On Tuesday, November 25, 2014 1:00:10 AM UTC+5:30, Ronald L. Rivest wrote: Regarding initialization: -- I'm toying with the idea of recommending Julia for an introductory programming class (rather than Python). -- For this purpose, the language should not have hazards that catch the unwary. -- Not initializing storage is definitely a hazard. With uninitialized storage, a program may run fine one day, and fail mysteriously the next, depending on the contents of memory. This is about predictability, reliability, dependability, and correctness. -- I would favor a solution like A = Array(Int64,n) -- fills with zeros A = Array(Int64,n,fill=1) -- to fill with ones A = Array(Int64,n,fill=None)-- for an uninitialized array so that the *default* is an initialized array, but the speed geeks can get what they want. Cheers, Ron On Monday, November 24, 2014 1:57:14 PM UTC-5, Stefan Karpinski wrote: If we can make allocating zeroed arrays faster that's great, but unless we can close the performance gap all the way and eliminate the need to allocated uninitialized arrays altogether, this proposal is just a rename – Unchecked.Array plays the exact same role as the current Array constructor. It's unclear that this would even address the original concern since it still *allows* uninitialized allocation of arrays. This rename would just force people who have used Array correctly in code that cares about being as efficient as possible even for very large arrays to change their code and use Unchecked.Array instead. On Nov 24, 2014, at 1:36 PM, Jameson Nash vtj...@gmail.com wrote: I think that Rivest’s question may be a good reason to rethink the initialization of structs and offer the explicit guarantee that all unassigned elements will be initialized to 0 (and not just the jl_value_t pointers). I would argue that the current behavior resulted more from a desire to avoid clearing the array twice (if the user is about to call fill, zeros, ones, +, etc.) than an intentional, casual exposure of uninitialized memory. A random array of integers is also a security concern if an attacker can extract some other information (with some probability) about the state of the program. Julia is not hardened by design, so you can’t safely run an unknown code fragment, but you still might have an unintended memory exposure in a client-facing app. While zero’ing memory doesn’t prevent the user from simply reusing a memory buffer in a security-unaware fashion