[julia-users] Re: Gadfly: adding plots to an existing plot
So, if I created a plot in a block of code, and then want to add another array of data to it in another block of code, is that possible? (I.e., I find it inconvenient that I have only one chance to plot all the layers... or did I misunderstand how it works?)
[julia-users] [ANN x-post julia-stats] Mocha.jl v0.0.6 unsupervised pre-training with stacked auto-encoders
Mocha.jl https://github.com/pluskid/Mocha.jl v0.0.6: Mocha is a deep learning framework for Julia. Check out our new tutorial on unsupervised pre-training with stacked denoising auto-encoders http://mochajl.readthedocs.org/en/latest/tutorial/mnist-sDA.html. v0.0.6 2014.12.31 - Infrastructure - Numerical gradient checking in unit-tests (@pcmoritz https://github.com/pcmoritz) - Simple ref-counting for shared parameters - Network - RandomMaskLayer, TiedInnerProductLayer, IdentityLayer - Freezing / unfreezing some layers of a network to allow layer-wise pre-training - Documentation - A new tutorial on MNIST that compares unsupervised pre-training via stacked denoising auto-encoders and random initialization Happy New Year! - pluskid
[julia-users] Re: Macro scoping (or hygiene?) problems
Actually, I do know `d` at compile time - I just hadn't grok-ed quoting and interpolation well enough to understand how to convey that in code. As it turns out, what I needed was to create a *symbol* for `d`, so that the interpolation would get back its *value*: `$(matching(:d))` does the trick. Thanks for kicking me in the right direction =) // T On Tuesday, December 30, 2014 10:09:01 PM UTC+1, Valentin Churavy wrote: So I do not totally understand the goal of what you are trying to achieve, but could you try to do this with a macro? macro value(d) @show d quote println(d at runtime , $d) end end @ngenerate N T function example{T,N}(A::Array{T,N}, xs::NTuple{N,Real}...) @nexprs N dim-begin @nexprs N d-begin @value(d) end end end example(rand(2,2), 1.5, 0.7) So at least the value of d is know at the time when the macro value is run and you could then call expression generating code based on that value. dispatching on types of some additional arguments That sounds like you should/could use staged functions for that. On Tuesday, 30 December 2014 17:59:37 UTC+1, Tomas Lycken wrote: I’m doing some metaprogramming for Interpolations.jl, and I’m getting stuck at an error that I think is due to scoping issues in my nested quotes, and I’ve stared at this for so long now I’m not getting anywhere. I can do the following matching(d) = quote println(Matching: , $d) end nonmatching(d) = quote println(Not matching: , $d) end @ngenerate N T function example{T,N}(A::Array{T,N}, xs::NTuple{N,Real}...) @nexprs N dim-begin @nexprs N d-begin if d==dim eval(matching(d)) else eval(nonmatching(d)) end end end end example(rand(2,2), 1.5, 0.7) and get the expected output: Matching: 1 Not matching: 2 Not matching: 1 Matching: 2 Examining with macroexpand, I see that the eval calls are still there, but for performance reasons I want to avoid them, so I try to rewrite it to use eval(ngenerate(...)) instead of @ngenerate ...: #matching and nonmatching defined as before ex = ngenerate( :N, :T, :(example{T,N}(A::Array{T,N}, xs::NTuple{N,Real}...)), N-quote @nexprs $N dim-begin @nexprs $N d-begin if d==dim $(matching(d)) else $(notmatching(d)) end end end end ) eval(ex) example(rand(2,2), 1.5, 0.7) But this doesn’t work: I get ERROR: d not defined on $(matching(d)) (and, if I comment that one out, $(nonmatching(d))). I’ve tried $(matching($d)) (ERROR: error compiling anonymous: syntax: prefix $ in non-quoted expression) as well as $(matching(esc(d))) and $(esc(matching(d))) (both ERROR: d not defined), and I’m at a loss for what to try (these errors are all thrown at the stage of *defining* the quoted expression, so macroexpand hasn’t helped me here either, as I don’t get any expression to call it on…). Eventually, this will be used to do different things for different array dimensions like here, but with both matching and nonmatching also dispatching on types of some additional arguments that I left out for simplicity, and choosing expressions by means of multiple dispatch this way is really at the core of Interpolations.jl, so I can’t move the contents of matching and nonmatching out of their respective functions. Thanks in advance for any ideas that get me forward, // Tomas
[julia-users] macro aliases? Can macro have the same assignment like temp = f::Function?
I know there are type aliases and function assignment. I find that a macro call is like Expr(:macrocall, symbol(@time),.) And we can embed a macro inside a macro, but it looks really uncomfortable to me. Thanks.
[julia-users] Re: Macro scoping (or hygiene?) problems
Glad to be of help :) On Wednesday, 31 December 2014 10:15:14 UTC+1, Tomas Lycken wrote: Actually, I do know `d` at compile time - I just hadn't grok-ed quoting and interpolation well enough to understand how to convey that in code. As it turns out, what I needed was to create a *symbol* for `d`, so that the interpolation would get back its *value*: `$(matching(:d))` does the trick. Thanks for kicking me in the right direction =) // T On Tuesday, December 30, 2014 10:09:01 PM UTC+1, Valentin Churavy wrote: So I do not totally understand the goal of what you are trying to achieve, but could you try to do this with a macro? macro value(d) @show d quote println(d at runtime , $d) end end @ngenerate N T function example{T,N}(A::Array{T,N}, xs::NTuple{N,Real}...) @nexprs N dim-begin @nexprs N d-begin @value(d) end end end example(rand(2,2), 1.5, 0.7) So at least the value of d is know at the time when the macro value is run and you could then call expression generating code based on that value. dispatching on types of some additional arguments That sounds like you should/could use staged functions for that. On Tuesday, 30 December 2014 17:59:37 UTC+1, Tomas Lycken wrote: I’m doing some metaprogramming for Interpolations.jl, and I’m getting stuck at an error that I think is due to scoping issues in my nested quotes, and I’ve stared at this for so long now I’m not getting anywhere. I can do the following matching(d) = quote println(Matching: , $d) end nonmatching(d) = quote println(Not matching: , $d) end @ngenerate N T function example{T,N}(A::Array{T,N}, xs::NTuple{N,Real}...) @nexprs N dim-begin @nexprs N d-begin if d==dim eval(matching(d)) else eval(nonmatching(d)) end end end end example(rand(2,2), 1.5, 0.7) and get the expected output: Matching: 1 Not matching: 2 Not matching: 1 Matching: 2 Examining with macroexpand, I see that the eval calls are still there, but for performance reasons I want to avoid them, so I try to rewrite it to use eval(ngenerate(...)) instead of @ngenerate ...: #matching and nonmatching defined as before ex = ngenerate( :N, :T, :(example{T,N}(A::Array{T,N}, xs::NTuple{N,Real}...)), N-quote @nexprs $N dim-begin @nexprs $N d-begin if d==dim $(matching(d)) else $(notmatching(d)) end end end end ) eval(ex) example(rand(2,2), 1.5, 0.7) But this doesn’t work: I get ERROR: d not defined on $(matching(d)) (and, if I comment that one out, $(nonmatching(d))). I’ve tried $(matching($d)) (ERROR: error compiling anonymous: syntax: prefix $ in non-quoted expression) as well as $(matching(esc(d))) and $(esc(matching(d))) (both ERROR: d not defined), and I’m at a loss for what to try (these errors are all thrown at the stage of *defining* the quoted expression, so macroexpand hasn’t helped me here either, as I don’t get any expression to call it on…). Eventually, this will be used to do different things for different array dimensions like here, but with both matching and nonmatching also dispatching on types of some additional arguments that I left out for simplicity, and choosing expressions by means of multiple dispatch this way is really at the core of Interpolations.jl, so I can’t move the contents of matching and nonmatching out of their respective functions. Thanks in advance for any ideas that get me forward, // Tomas
[julia-users] Re: using Gtk.jl?
Why wait? On Tuesday, December 30, 2014 5:47:04 PM UTC+1, j verzani wrote: That's the plan, eventually. --J
Re: [julia-users] using Gtk.jl?
btw: also Winston.jl uses gtk.jl after enabling it in the Winston.ini On Tuesday, December 30, 2014 3:00:39 PM UTC+1, Tim Holy wrote: Do a `git checkout gtk` to check out the gtk branch. --Tim
[julia-users] checking a version number?
Hello colleagues, i remember reading something about the impossibility to create a consistent julia version number, but i cannot find it ... anymore Still: What is the recommended way to get a julia major/minor version number (i need to check v.0.4)? Just parse Base.VERSION? Wishing a happy day, Andreas
Re: [julia-users] Dan Luu's critique of Julia: needs commented code, better testing, error handling, and bugs fixed.
This has actually been a particularly nasty bug, it broke many packages on 0.3.x, from Gadfly to GLM to HDF5, starting sometime in mid October. Tim had a workaround in Color.jl that solved some of the issues, but there are still reports of more failures. Thanks to Tim and Jameson for tracking this ... Regards - Avik On Wednesday, 31 December 2014 02:29:58 UTC, Stefan Karpinski wrote: Ah, that's good to know. Even better that Jameson may have fixed it! On Dec 30, 2014, at 8:10 PM, Tim Holy tim@gmail.com javascript: wrote: On Tuesday, December 30, 2014 06:40:30 PM Stefan Karpinski wrote: That change only exists on master, not in the 0.3.x stable releases. So it seems likely that you were actually using the unstable development version of Julia when you encountered all of these problems. Otherwise you could not have encountered that bug. Actually, while that particular construction is only available in julia 0.4, it turned out upon deeper investigation that you can trigger the same bug on 0.3: see, for example, https://github.com/JuliaLang/Color.jl/issues/68 This is the issue (one of two, actually), that I branded convertalypse, and in my view it's one of the nastier bugs that has ever lurked this long in julia base: this definitely qualifies as a wart to be embarrassed about. It wasn't discovered until long after julia 0.3's release, unfortunately, and it has been extremely hard to track down. I tried 3 times myself (devoting big chunks of a day to it), and failed to make any real progress. Fortunately, within the last 24 hours, our superhero Jameson Nash seems to have just diagnosed the problem and proposed a fix. https://github.com/JuliaLang/julia/issues/8631#issuecomment-68336062. Hopefully the same fix will apply on julia 0.3, too. Best, --Tim
[julia-users] Declaring variables in julia
hi Please let me know how to declare float, double, long int, unsigned long and unsigned char to some variable in julia( Please mention syntax) Thanks
[julia-users] Re: Declaring variables in julia
I recommend reading the manual http://docs.julialang.org/en/release-0.3/manual/variables/. // Tomas On Wednesday, December 31, 2014 1:57:25 PM UTC+1, sadhanapriya…@vit.ac.in wrote: hi Please let me know how to declare float, double, long int, unsigned long and unsigned char to some variable in julia( Please mention syntax) Thanks
Re: [julia-users] Re: checking a version number?
Yes, dealing with version numbers is really sweet in julia. I believe Stefan deserves credit for this. Incidentally, if you parse C library version numbers into a VersionNumber type, you can use all the same machinery. --Tim On Wednesday, December 31, 2014 04:19:44 AM Andreas Lobinger wrote: I see. The a = Base.VERSION and then looking at a.major a.minor is already enough in my case. I wasn't aware you could do even comparisions with the v string.
Re: [julia-users] Re: checking a version number?
Apparently it's important to get it right from the beginning: version numbers should be boring http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/ On Wednesday, December 31, 2014 2:25:54 PM UTC+1, Tim Holy wrote: Yes, dealing with version numbers is really sweet in julia. I believe Stefan deserves credit for this. Incidentally, if you parse C library version numbers into a VersionNumber type, you can use all the same machinery. --Tim On Wednesday, December 31, 2014 04:19:44 AM Andreas Lobinger wrote: I see. The a = Base.VERSION and then looking at a.major a.minor is already enough in my case. I wasn't aware you could do even comparisions with the v string.
[julia-users] Re: Syntax Highlighting in Vim
Well, just as you said, the manual method does not work since there is no .vim file in my home directory? Could you share your successful installation experience? On Friday, January 31, 2014 1:25:37 PM UTC+8, Thomas Moore wrote: I got it working now :) This is probably quite obvious to most users, but I didn't know a new VIM user needs to make a .vim file in ~/.vim, and if this doesn't exist the manual install won't work. I hope this helps someone. On Sunday, 15 December 2013 17:18:21 UTC+10, Thomas Moore wrote: I recently installed Ubuntu 12.04, and from there installed Julia through githib. Now, when I open a .jl file in Vim, it seems there's some sort of syntax highlighting which works, but it's inconsistent (words like function, print and if are coloured, but others like for and while are not.) Does anyone have any idea what's wrong here? Alternatively, I'm not really attached to any editor yet in Ubuntu, and so if there's an easier way to set up another editor with syntax highlighting, feel free to recommend it. Thanks
[julia-users] Re: Declaring variables in julia
Yes, the short answer is that the Julia manual is full of talk about types. Whether to specify type information, and if so, how depends on what you are trying to do. So an example of what you are trying to write would be helpful. Exact type correspondences http://julia.readthedocs.org/en/latest/manual/calling-c-and-fortran-code/#type-correspondences are listed in the Julia manual, but these are normally only useful for interfacing with Fortran or C libraries. --John On Wednesday, December 31, 2014 1:57:25 PM UTC+1, sadhanapriya...@vit.ac.in wrote: hi Please let me know how to declare float, double, long int, unsigned long and unsigned char to some variable in julia( Please mention syntax) Thanks
[julia-users] Canned out of core linalg chunking algorithms?
Hello Julians, Are fallback out of core chunking algorithms for common Darrays/shared mmap array linalg functions planned? This would allow trivial reuse of generic code. Thanks
[julia-users] Re: Declaring variables in julia
http://docs.julialang.org/en/release-0.3/manual/integers-and-floating-point-numbers/ This might be really useful, and I find that Julia's manual is really easy to understand. 在 2014年12月31日星期三UTC+8下午8时57分25秒,sadhanapriya...@vit.ac.in写道: hi Please let me know how to declare float, double, long int, unsigned long and unsigned char to some variable in julia( Please mention syntax) Thanks
[julia-users] Re: checking a version number?
On Wednesday, December 31, 2014 7:03:34 AM UTC-5, Andreas Lobinger wrote: What is the recommended way to get a julia major/minor version number (i need to check v.0.4)? Just parse Base.VERSION? Within Julia: *julia * *VERSION**v0.4.0-dev+2340* *julia * *VERSION.minor**4* Also, currently, in dev these are nice for embedding but have not been back-ported yet. DLLEXPORT extern int jl_ver_major(void); DLLEXPORT extern int jl_ver_minor(void); DLLEXPORT extern int jl_ver_patch(void); DLLEXPORT extern int jl_ver_is_release(void); DLLEXPORT extern const char* jl_ver_string(void);
[julia-users] Re: Declaring variables in julia
On Wednesday, December 31, 2014 7:57:25 AM UTC-5, sadhanapriya...@vit.ac.in wrote: hi Please let me know how to declare float, double, long int, unsigned long and unsigned char to some variable in julia( Please mention syntax) I've found the following works for me As others have mentioned, that reference page looks good, but for the C equivalent, you need to be a little careful in 2 cases. float will always be Float32 and double will always be Float64, but long is not necessarily 64 bits http://stackoverflow.com/questions/7279504/long-and-long-long-bit-length, so may be either UInt64 or UInt32 depending. Also, in 0.3.x it's Uint and in 0.4.x it UInt (little i, big I). Finally the char type in Julia is a wide char (32 bits), so the equivalent type as far as bits go to C unsigned char is UInt8 on 0.4.x or Uint8 for 0.3.x.
[julia-users] Re: Gadfly: adding plots to an existing plot
It's not really supported. Adding a push! function to add layers to plots was proposed (https://github.com/dcjones/Gadfly.jl/issues/332), but I haven't done so yet. In fact, adding layers to a plot p will usually work with push!(p.layers, layer(...)), but that's kind of an unofficial solution. On Wednesday, December 31, 2014 12:26:49 AM UTC-8, AVF wrote: So, if I created a plot in a block of code, and then want to add another array of data to it in another block of code, is that possible? (I.e., I find it inconvenient that I have only one chance to plot all the layers... or did I misunderstand how it works?)
[julia-users] Re: LaTeX type font for axes ticks?
Your suggestion works fine, thank you. Am Sonntag, 21. Dezember 2014 16:22:13 UTC+1 schrieb Christoph Ortner: This is not exactly what you want but it may be close enough: The line plt.rc(font, family=serif) changes the figure to a serif font, which looks very similar to latex. Christoph
[julia-users] Re: checking a version number?
On Wednesday, December 31, 2014 7:03:34 AM UTC-5, Andreas Lobinger wrote: What is the recommended way to get a julia major/minor version number (i need to check v.0.4)? Just parse Base.VERSION? You normally don't need to get the major/minor explicitly, because comparison operations are defined for the VersionNumber type. Just do VERSION v0.4- to check for versions before 0.4 or any prerelease thereof (the trailing -). Although for specific prerelease features you should check for a more specific version stamp (see e.g. the examples in Compat.jl)
[julia-users] Calculate 95% confidential intervals of p in binomial distribution
I want to calculate the 95% confidential intervals of the parameter p of a binomial distribution, for a given x and n. I known that in MATLAT, it could be got in the 2nd output of binofit(x,n,0.95) Is there any way to do it in Julia, using Distributions.jl or any python package?
Re: [julia-users] ANN: ApproxFun v0.05 with support for piecewise and singular functions
Do we have a video somewhere of one of your talks about ApproxFun? This is a really impressive package. On Tue, Dec 30, 2014 at 10:54 PM, Sheehan Olver dlfivefi...@gmail.com wrote: ApproxFun is a package for approximating functions and solving differential equations. ApproxFun v0.05 adds support for piecewise and singular functions. For example, we can sample a function with semicircle or other Jacobi singularities: x=Fun(identity,[-1,1]) sample(exp(x)*sqrt(1-x^2),100) sample((1-x)^0.123/(1+x)^0.567,100) Or integrate the absolute value of sin: x=Fun(identity,[-5,5]) sum(abs(sin(x))) Or even solve PDEs with discontinuous coefficients. Other improvements include 2-5x faster ODE solving, so that now an ODE requiring a million unknowns can be solved in one second, and preliminary support for high precision functions. Thanks go to Gustavo Goretkin (MIT) and Mikael Slevinsky (Oxford) for many contributions! Note: Julia v0.4 is not supported due to issue #9378
[julia-users] Re: Declaring variables in julia
On Wednesday, December 31, 2014 11:30:50 AM UTC-5, Jeff Waller wrote: As others have mentioned, that reference page looks good, but for the C equivalent, you need to be a little careful in 2 cases. float will always be Float32 and double will always be Float64, but long is not necessarily 64 bits http://stackoverflow.com/questions/7279504/long-and-long-long-bit-length, so may be either UInt64 or UInt32 depending. Also, in 0.3.x it's Uint and in 0.4.x it UInt (little i, big I). Finally the char type in Julia is a wide char (32 bits), so the equivalent type as far as bits go to C unsigned char is UInt8 on 0.4.x or Uint8 for 0.3.x. See: http://docs.julialang.org/en/latest/manual/calling-c-and-fortran-code/#type-correspondences Julia defines aliases like Clong etcetera if you need the exact equivalences of C types on your platform.
[julia-users] Spawning (or running) an external program with given environment variables.
In Bash I can do something like this $ echo $RANDOM_VAR $ RANDOM_VAR='heya' env RANDOM_VAR='heya' OTHER_ENV_VAR=whatever_it_was_before ... $ echo $RANDOM_VAR $ In Julia, however, julia run(`env`) OTHER_ENV_VAR=whatever_it_was_before ... julia run(`RANDOM_VAR='heya' env`) ERROR: could not spawn `RANDOM_VAR=heya env`: no such file or directory (ENOENT) in _jl_spawn at process.jl:217 in spawn at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib (repeats 2 times) in run at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib julia Is there a way to emulate this behaviour in Julia?
[julia-users] clearing variable/const and location of a syntax error
how would one clear values of variable, or change the type: for instance if I declare a = 5 and after evaluation, if I fix the statement reevaluate const a = 5, I get error that a is already defined. How would I get a out of the memory without restarting the entire kernel? Second question is if there is a syntax error, Julia says the line number where the syntanx error is. But for a long mathematical expression it is helpful if it says the character number as well. Sometime I find this frustrating because I have mistyped one less bracket or missed a plus sign.
Re: [julia-users] Spawning (or running) an external program with given environment variables.
julia c = setenv(`env`, [FOO=bar]) setenv(`env`,Union(ASCIIString,UTF8String)[FOO=bar]) julia run(c) FOO=bar On Wed, Dec 31, 2014 at 2:16 PM, Sean Marshallsay srm.1...@gmail.com wrote: In Bash I can do something like this $ echo $RANDOM_VAR $ RANDOM_VAR='heya' env RANDOM_VAR='heya' OTHER_ENV_VAR=whatever_it_was_before ... $ echo $RANDOM_VAR $ In Julia, however, julia run(`env`) OTHER_ENV_VAR=whatever_it_was_before ... julia run(`RANDOM_VAR='heya' env`) ERROR: could not spawn `RANDOM_VAR=heya env`: no such file or directory (ENOENT) in _jl_spawn at process.jl:217 in spawn at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib (repeats 2 times) in run at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib julia Is there a way to emulate this behaviour in Julia?
Re: [julia-users] clearing variable/const and location of a syntax error
1) workspace() 2) maybe Lint.jl could help here? Not sure (haven't used it myself yet, although I probably should). There are various open issues about better error messages although I don't remember one about this specifically. It will probably be a bit more tractable as an up-for-grabs project if/when we move to the pure-Julia parser. On Wed, Dec 31, 2014 at 2:16 PM, Zahirul ALAM zahirul.a...@gmail.com wrote: how would one clear values of variable, or change the type: for instance if I declare a = 5 and after evaluation, if I fix the statement reevaluate const a = 5, I get error that a is already defined. How would I get a out of the memory without restarting the entire kernel? Second question is if there is a syntax error, Julia says the line number where the syntanx error is. But for a long mathematical expression it is helpful if it says the character number as well. Sometime I find this frustrating because I have mistyped one less bracket or missed a plus sign.
Re: [julia-users] Canned out of core linalg chunking algorithms?
We would very much like to have out of core functionality, but we don't have any active project to work on it. If you could spare the time, this would be a very valuable feature to work toward having in Julia. On Wed Dec 31 2014 at 10:38:44 AM Lampkld lampk...@gmail.com wrote: Hello Julians, Are fallback out of core chunking algorithms for common Darrays/shared mmap array linalg functions planned? This would allow trivial reuse of generic code. Thanks
[julia-users] Re: ANN: ApproxFun v0.05 with support for piecewise and singular functions
Pkg.add(ApproxFun) did not give me v0.0.5 for some reason $ git tag v0.0.1 v0.0.2 v0.0.3 v0.0.4 So your first examples failed. But, this is very impressive! --John On Wednesday, December 31, 2014 4:54:06 AM UTC+1, Sheehan Olver wrote: ApproxFun is a package for approximating functions and solving differential equations. ApproxFun v0.05 adds support for piecewise and singular functions. For example, we can sample a function with semicircle or other Jacobi singularities: x=Fun(identity,[-1,1]) sample(exp(x)*sqrt(1-x^2),100) sample((1-x)^0.123/(1+x)^0.567,100) Or integrate the absolute value of sin: x=Fun(identity,[-5,5]) sum(abs(sin(x))) Or even solve PDEs with discontinuous coefficients. Other improvements include 2-5x faster ODE solving, so that now an ODE requiring a million unknowns can be solved in one second, and preliminary support for high precision functions. Thanks go to Gustavo Goretkin (MIT) and Mikael Slevinsky (Oxford) for many contributions! Note: Julia v0.4 is not supported due to issue #9378
Re: [julia-users] Re: ANN: ApproxFun v0.05 with support for piecewise and singular functions
On Wed, Dec 31, 2014 at 2:53 PM, lapeyre.math1...@gmail.com wrote: Pkg.add(ApproxFun) did not give me v0.0.5 for some reason 0.0.5 was posted less than two days ago. Did you run Pkg.update() before doing Pkg.add?
Re: [julia-users] Re: ANN: ApproxFun v0.05 with support for piecewise and singular functions
Duh! Sorry for adding noise to the list. On Wednesday, December 31, 2014 9:06:22 PM UTC+1, Jiahao Chen wrote: On Wed, Dec 31, 2014 at 2:53 PM, lapeyre@gmail.com javascript: wrote: Pkg.add(ApproxFun) did not give me v0.0.5 for some reason 0.0.5 was posted less than two days ago. Did you run Pkg.update() before doing Pkg.add?
Re: [julia-users] Spawning (or running) an external program with given environment variables.
Awesome, thank you! On Wednesday, 31 December 2014 19:27:26 UTC, Isaiah wrote: julia c = setenv(`env`, [FOO=bar]) setenv(`env`,Union(ASCIIString,UTF8String)[FOO=bar]) julia run(c) FOO=bar On Wed, Dec 31, 2014 at 2:16 PM, Sean Marshallsay srm@gmail.com javascript: wrote: In Bash I can do something like this $ echo $RANDOM_VAR $ RANDOM_VAR='heya' env RANDOM_VAR='heya' OTHER_ENV_VAR=whatever_it_was_before ... $ echo $RANDOM_VAR $ In Julia, however, julia run(`env`) OTHER_ENV_VAR=whatever_it_was_before ... julia run(`RANDOM_VAR='heya' env`) ERROR: could not spawn `RANDOM_VAR=heya env`: no such file or directory (ENOENT) in _jl_spawn at process.jl:217 in spawn at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib (repeats 2 times) in run at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib julia Is there a way to emulate this behaviour in Julia?
Re: [julia-users] Spawning (or running) an external program with given environment variables.
Also: julia ENV[FOO] = BAR BAR julia run(`env` | `grep FOO`) FOO=BAR On Wed, Dec 31, 2014 at 3:35 PM, Sean Marshallsay srm.1...@gmail.com wrote: Awesome, thank you! On Wednesday, 31 December 2014 19:27:26 UTC, Isaiah wrote: julia c = setenv(`env`, [FOO=bar]) setenv(`env`,Union(ASCIIString,UTF8String)[FOO=bar]) julia run(c) FOO=bar On Wed, Dec 31, 2014 at 2:16 PM, Sean Marshallsay srm@gmail.com wrote: In Bash I can do something like this $ echo $RANDOM_VAR $ RANDOM_VAR='heya' env RANDOM_VAR='heya' OTHER_ENV_VAR=whatever_it_was_before ... $ echo $RANDOM_VAR $ In Julia, however, julia run(`env`) OTHER_ENV_VAR=whatever_it_was_before ... julia run(`RANDOM_VAR='heya' env`) ERROR: could not spawn `RANDOM_VAR=heya env`: no such file or directory (ENOENT) in _jl_spawn at process.jl:217 in spawn at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib (repeats 2 times) in run at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib julia Is there a way to emulate this behaviour in Julia?
Re: [julia-users] Spawning (or running) an external program with given environment variables.
Thanks Stefan but I ideally wanted something that would leave ENV intact (which setenv does). On an unrelated note, how on earth do you find the time to answer all these questions so quickly? However you do it, thanks for being so dedicated. On Wednesday, 31 December 2014 20:55:51 UTC, Stefan Karpinski wrote: Also: julia ENV[FOO] = BAR BAR julia run(`env` | `grep FOO`) FOO=BAR On Wed, Dec 31, 2014 at 3:35 PM, Sean Marshallsay srm@gmail.com javascript: wrote: Awesome, thank you! On Wednesday, 31 December 2014 19:27:26 UTC, Isaiah wrote: julia c = setenv(`env`, [FOO=bar]) setenv(`env`,Union(ASCIIString,UTF8String)[FOO=bar]) julia run(c) FOO=bar On Wed, Dec 31, 2014 at 2:16 PM, Sean Marshallsay srm@gmail.com wrote: In Bash I can do something like this $ echo $RANDOM_VAR $ RANDOM_VAR='heya' env RANDOM_VAR='heya' OTHER_ENV_VAR=whatever_it_was_before ... $ echo $RANDOM_VAR $ In Julia, however, julia run(`env`) OTHER_ENV_VAR=whatever_it_was_before ... julia run(`RANDOM_VAR='heya' env`) ERROR: could not spawn `RANDOM_VAR=heya env`: no such file or directory (ENOENT) in _jl_spawn at process.jl:217 in spawn at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib (repeats 2 times) in run at /usr/local/Cellar/julia/0.3.3/lib/julia/sys.dylib julia Is there a way to emulate this behaviour in Julia?
[julia-users] Re: Dan Luu's critique of Julia: needs commented code, better testing, error handling, and bugs fixed.
+1 to addering to the git flow, I had also allways expected for the master branch to be as stable and possible, while development happening in another branch, not the other way around and sometimes I've had to search for a past working commit in order to build julia, which strikes me as odd, as you guys really follow good development techniques. Would it be difficult to change this, maybe for a post 0.4 era? El lunes, 29 de diciembre de 2014 10:36:19 UTC-6, Christian Peel escribió: Dan Luu has a critique of Julia up at http://danluu.com/julialang/ (reddit thread at http://bit.ly/1wwgnks) Is the language feature-complete enough that there could be an entire point release that targeted some of the less-flashy things he mentioned? I.e. commented code, better testing, error handling, and just fixing bugs? If it's not there, is there any thoughts on when it would be?
[julia-users] Static type fields
I currently am trying to solve a problem where I have many composite types and I would like to associate some data with each type, such that every instance has access to it. Obviously, in C++ I would just create a static member variable. Is there a good way to go about this in Julia? Currently, I have it working by using a global Dict mapping DataType objects to their associated data but I really don't like this. Something more naive like just adding that field to every object instance also strikes me as unnecessary and wasteful. I haven't seen any significant discussion about static fields on the lists or on github so is this something that could be considered for addition to the language? Thanks, Josh
[julia-users] Re: Dan Luu's critique of Julia: needs commented code, better testing, error handling, and bugs fixed.
On Thursday, January 1, 2015 9:55:11 AM UTC+10, Ismael VC wrote: +1 to addering to the git flow, I had also allways expected for the master branch to be as stable and possible, while development happening in another branch, not the other way around and sometimes I've had to search for a past working commit in order to build julia, which strikes me as odd, as you guys really follow good development techniques. Well, using master as the development branch is the Linux Kernal workflow, so I doubt you can call it unusual. It is also the approach mostly used in the git book chapter http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows. Really experimental things are in feature branches which will eventually be merged into master. Stable is the release 0.3 branch. When the first 0.4 RCs are made, a branch will be made for 0.4. Cheers Lex PS thats as I understand the workflow as an outside observer, so consider this the test to see how understandable Julia's workflow is. Would it be difficult to change this, maybe for a post 0.4 era? El lunes, 29 de diciembre de 2014 10:36:19 UTC-6, Christian Peel escribió: Dan Luu has a critique of Julia up at http://danluu.com/julialang/ (reddit thread at http://bit.ly/1wwgnks) Is the language feature-complete enough that there could be an entire point release that targeted some of the less-flashy things he mentioned? I.e. commented code, better testing, error handling, and just fixing bugs? If it's not there, is there any thoughts on when it would be?
Re: [julia-users] Re: Dan Luu's critique of Julia: needs commented code, better testing, error handling, and bugs fixed.
I didn't know that fact about the Linux kernel, or how usual it is, I've just red the git book and it explains it like this: http://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows On Wed, Dec 31, 2014 at 7:30 PM, ele...@gmail.com wrote: On Thursday, January 1, 2015 9:55:11 AM UTC+10, Ismael VC wrote: +1 to addering to the git flow, I had also allways expected for the master branch to be as stable and possible, while development happening in another branch, not the other way around and sometimes I've had to search for a past working commit in order to build julia, which strikes me as odd, as you guys really follow good development techniques. Well, using master as the development branch is the Linux Kernal workflow, so I doubt you can call it unusual. It is also the approach mostly used in the git book chapter http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows. Really experimental things are in feature branches which will eventually be merged into master. Stable is the release 0.3 branch. When the first 0.4 RCs are made, a branch will be made for 0.4. Cheers Lex PS thats as I understand the workflow as an outside observer, so consider this the test to see how understandable Julia's workflow is. Would it be difficult to change this, maybe for a post 0.4 era? El lunes, 29 de diciembre de 2014 10:36:19 UTC-6, Christian Peel escribió: Dan Luu has a critique of Julia up at http://danluu.com/julialang/ (reddit thread at http://bit.ly/1wwgnks) Is the language feature-complete enough that there could be an entire point release that targeted some of the less-flashy things he mentioned? I.e. commented code, better testing, error handling, and just fixing bugs? If it's not there, is there any thoughts on when it would be?
Re: [julia-users] Static type fields
method dispatch on the object type does a remarkably good job at providing this functionality without needing a specialized feature: static_data(::Type{MyObj}) = 1 static_data(::Type{MyOtherObj}) = 2 On Wed Dec 31 2014 at 8:23:40 PM Josh Langsfeld jdla...@gmail.com wrote: I currently am trying to solve a problem where I have many composite types and I would like to associate some data with each type, such that every instance has access to it. Obviously, in C++ I would just create a static member variable. Is there a good way to go about this in Julia? Currently, I have it working by using a global Dict mapping DataType objects to their associated data but I really don't like this. Something more naive like just adding that field to every object instance also strikes me as unnecessary and wasteful. I haven't seen any significant discussion about static fields on the lists or on github so is this something that could be considered for addition to the language? Thanks, Josh
[julia-users] Re: Gadfly: adding plots to an existing plot
Sorry, doesn't seem to work: a = rand(10) b = rand(10) c = rand(10) d = rand(10) p = plot(x=a, y=b) push!(p.layers, layer(x=c, y=d)) `convert` has no method matching convert(::Type{Layer}, ::Array{Layer,1}) while loading In[185], in expression starting on line 9 in push! at array.jl:457 As an aside, is there a way to do something like: [a b c d] = rand(10,4) On Wednesday, December 31, 2014 11:01:36 AM UTC-6, Daniel Jones wrote: It's not really supported. Adding a push! function to add layers to plots was proposed (https://github.com/dcjones/Gadfly.jl/issues/332), but I haven't done so yet. In fact, adding layers to a plot p will usually work with push!(p.layers, layer(...)), but that's kind of an unofficial solution.
[julia-users] Re: Gadfly: adding plots to an existing plot
My mistake, it should work with append! instead of push!. For your second question, here's one option: a, b, c, d = [rand(10) for _ in 1:4] On Wednesday, December 31, 2014 5:58:15 PM UTC-8, AVF wrote: Sorry, doesn't seem to work: a = rand(10) b = rand(10) c = rand(10) d = rand(10) p = plot(x=a, y=b) push!(p.layers, layer(x=c, y=d)) `convert` has no method matching convert(::Type{Layer}, ::Array{Layer,1}) while loading In[185], in expression starting on line 9 in push! at array.jl:457 As an aside, is there a way to do something like: [a b c d] = rand(10,4) On Wednesday, December 31, 2014 11:01:36 AM UTC-6, Daniel Jones wrote: It's not really supported. Adding a push! function to add layers to plots was proposed (https://github.com/dcjones/Gadfly.jl/issues/332), but I haven't done so yet. In fact, adding layers to a plot p will usually work with push!(p.layers, layer(...)), but that's kind of an unofficial solution.
Re: [julia-users] clearing variable/const and location of a syntax error
Lint.jl relies on julia's built-in parser which only generates line number, not column number, in the abstract syntax tree, so it won't help on the 2nd question, either. On Thursday, January 1, 2015 2:30:42 AM UTC+7, Isaiah wrote: 1) workspace() 2) maybe Lint.jl could help here? Not sure (haven't used it myself yet, although I probably should). There are various open issues about better error messages although I don't remember one about this specifically. It will probably be a bit more tractable as an up-for-grabs project if/when we move to the pure-Julia parser. On Wed, Dec 31, 2014 at 2:16 PM, Zahirul ALAM zahiru...@gmail.com javascript: wrote: how would one clear values of variable, or change the type: for instance if I declare a = 5 and after evaluation, if I fix the statement reevaluate const a = 5, I get error that a is already defined. How would I get a out of the memory without restarting the entire kernel? Second question is if there is a syntax error, Julia says the line number where the syntanx error is. But for a long mathematical expression it is helpful if it says the character number as well. Sometime I find this frustrating because I have mistyped one less bracket or missed a plus sign.
[julia-users] Re: DataFrame vcat stack overflow
If you Pkg.update() and try again, you should be fine. DataFrames was overdue for a tagged release -- you'll get v0.6.0 which includes some updates to vcat. As a gut check, this works just fine: using DataFrames dfs = [DataFrame(Float64, 15, 15) for _=1:200_000] vcat(dfs) (If it doesn't for you, definitely file an issue.) Happy New Year, Sean On Thursday, December 25, 2014 5:06:23 PM UTC-7, Guillaume Guy wrote: Hi David: That is where the stack overflow error is thrown. I attached the code + the data in my first post for your reference. On Thursday, December 25, 2014 6:59:57 PM UTC-5, David van Leeuwen wrote: Hello Guillome, On Monday, December 22, 2014 9:09:16 PM UTC+1, Guillaume Guy wrote: Dear Julia users: Coming from a R background, I like to work with list of dataframes which i can reduce by doing do.call('rbind',list_of_df) After ~10 years of using R, I only recently leaned of the do.call(). In Julia, you would say: vcat(dfs...) ---david In Julia, I attempted to use vcat for this purpose but I ran into trouble: stack overflow while loading In[29], in expression starting on line 1 This operation is basically the vcat of a large vector v consisting of 68K small (11X7) dataframes. The code is attached. Thanks for your help!
[julia-users] Package NEWS
Is there a standard method for declaring a package's changes in a package NEWS file? Couldn't find anything in Julia docs. I think some packages use a NEWS.md file at the top level (e.g. DataFrames, Gadfly, Distributions), but others do not (e.g. Dates, Optim).
Re: [julia-users] Reviewing a Julia programming book for Packt
FWIW, since I agreed to help review the book, I've yet to hear from Packt again. Perhaps they saw this thread and decided to postpone? :) -Jacob On Thu, Dec 11, 2014 at 2:20 PM, cdm cdmclean@gmail.com wrote: i will vote with my green paper and let the market decide ... here is some competition in the book space: LJTHW (aka: 'the g–ddamn book') http://chrisvoncsefalvay.com/2014/12/11/A-change-of-seasons.html awesome. cdm On Friday, December 5, 2014 9:23:29 AM UTC-8, Iain Dunning wrote: SNIP I don't think such a book should exist (yet). SNIP
[julia-users] Re: Package NEWS
There really isn't. We use NEWS.md in julia, and presumably that could be come standard. I really wish we could have a mechanism, where Pkg.publish() prompts you for a NEWS update, appends it to NEWS.md, and then also submits it as part of the PR - so that when merging in METADATA.jl, one can see what new features or fixes come as part of that particular package update. -viral On Wednesday, December 31, 2014 7:43:36 PM UTC-8, i.cos...@me.com wrote: Is there a standard method for declaring a package's changes in a package NEWS file? Couldn't find anything in Julia docs. I think some packages use a NEWS.md file at the top level (e.g. DataFrames, Gadfly, Distributions), but others do not (e.g. Dates, Optim).
Re: [julia-users] Re: Julia website is ready for translation/internationalization on Transifex!
I'm really glad you like it, thanks for your support! :D On Wed, Dec 31, 2014 at 10:17 PM, Viral Shah vi...@mayin.org wrote: Thanks. I see the discussion on the PR. This is really cool! -viral On Monday, December 29, 2014 12:22:16 AM UTC-8, Ismael VC wrote: Sorry I forgot to mention, the language I´m translating it is Spanish I thin I can finish to translate the following subpages also to Spanish by tomorrow night: - blog - community - downloads - learning - publications - teaching :) El domingo, 28 de diciembre de 2014 23:06:11 UTC-6, Ismael VC escribió: Hello every one! I've just added the julia-web proyect at the julia-lang organization at transifex: https://www.transifex.com/organization/julia-lang/dashboard/julia-web
[julia-users] Re: Package NEWS
Also, would be nice for Pkg.update() to return change logs for updated packages. This might be tricky given the usual markdown format, but shouldn't be impossible On Thursday, 1 January 2015 15:10:26 UTC+11, Viral Shah wrote: There really isn't. We use NEWS.md in julia, and presumably that could be come standard. I really wish we could have a mechanism, where Pkg.publish() prompts you for a NEWS update, appends it to NEWS.md, and then also submits it as part of the PR - so that when merging in METADATA.jl, one can see what new features or fixes come as part of that particular package update. -viral On Wednesday, December 31, 2014 7:43:36 PM UTC-8, i.cos...@me.com wrote: Is there a standard method for declaring a package's changes in a package NEWS file? Couldn't find anything in Julia docs. I think some packages use a NEWS.md file at the top level (e.g. DataFrames, Gadfly, Distributions), but others do not (e.g. Dates, Optim).
[julia-users] weird 2D fft error: returns NaN error
Happy new year!! I am encountering a very odd fft error. I am trying fft NxN data. The data is produced using a mathematical equation. After debugging I have found that the following expression is gives NaN error: fft(besselj(1, sqrt(X.^2+Y.^2))./sqrt(X.^2+Y.^2)) where X and Y are Array{Float64,2}. if I write fft(besselj(1, sqrt(X.^2+Y.^2)) I get write answer. Seems like the division with the array is the issue. is issue. any idea why? is it a bug?
Re: [julia-users] Canned out of core linalg chunking algorithms?
I would be more than happy to help, but that doesn't sound like a project within the domain of Julia and CS knowledge at the moment. If someone would set up a project framework, I could probably be better placed to contribute. On Wednesday, December 31, 2014 2:47:21 PM UTC-5, Jiahao Chen wrote: We would very much like to have out of core functionality, but we don't have any active project to work on it. If you could spare the time, this would be a very valuable feature to work toward having in Julia. On Wed Dec 31 2014 at 10:38:44 AM Lampkld lamp...@gmail.com javascript: wrote: Hello Julians, Are fallback out of core chunking algorithms for common Darrays/shared mmap array linalg functions planned? This would allow trivial reuse of generic code. Thanks
[julia-users] Re: weird 2D fft error: returns NaN error
I found the reason because both arrays contains (0, 0). Is there way around it? On Thursday, 1 January 2015 00:50:56 UTC-5, Zahirul ALAM wrote: Happy new year!! I am encountering a very odd fft error. I am trying fft NxN data. The data is produced using a mathematical equation. After debugging I have found that the following expression is gives NaN error: fft(besselj(1, sqrt(X.^2+Y.^2))./sqrt(X.^2+Y.^2)) where X and Y are Array{Float64,2}. if I write fft(besselj(1, sqrt(X.^2+Y.^2)) I get write answer. Seems like the division with the array is the issue. is issue. any idea why? is it a bug?
[julia-users] Re: weird 2D fft error: returns NaN error
may be not On Thursday, 1 January 2015 01:05:02 UTC-5, Zahirul ALAM wrote: I found the reason because both arrays contains (0, 0). Is there way around it? On Thursday, 1 January 2015 00:50:56 UTC-5, Zahirul ALAM wrote: Happy new year!! I am encountering a very odd fft error. I am trying fft NxN data. The data is produced using a mathematical equation. After debugging I have found that the following expression is gives NaN error: fft(besselj(1, sqrt(X.^2+Y.^2))./sqrt(X.^2+Y.^2)) where X and Y are Array{Float64,2}. if I write fft(besselj(1, sqrt(X.^2+Y.^2)) I get write answer. Seems like the division with the array is the issue. is issue. any idea why? is it a bug?
[julia-users] Julia for Enterprise?
Hi everyone, Happy New Year! I briefly introduced myself and what I'm trying to do here https://groups.google.com/forum/#!searchin/julia-users/Forgy/julia-users/umHiBwVLQ4g/P6DoT7qGrB8J . I saw that Stefan gave a nice answer to the question Is Julia ready for production use? https://www.quora.com/Is-Julia-ready-for-production-use over on Quora. However, being ready for production is one thing and being ready for use in an enterprise application for large conservative financial institutions that undergo audits by regulators, etc., might be another. A comment in this group was made yesterday,Julia is from and for researchers. https://groups.google.com/d/msg/julia-users/GyH8nhExY9I/_mLCNVFOcKMJ I notice there are quite a number of researchers developing Julia, but naturally there is a much smaller team of core developers that seem to work very well together. If this small team disintegrated for some reason, e.g. find jobs, etc., I'm not sure Julia would have the escape velocity to develop into a mature enough language for the kind of applications I have in mind. I am bootstrapping a startup so I need to be careful how I allocate my time and resources. I don't mind being a little cutting edge, but I would have to consider the likelihood that Julia reaches at least a first version 1.0. So can I ask for some honest advice? With the obvious caveats understood, how far away is a 1.0? How long can the core team continue its dedication to the development of Julia? Will Julia remain from and for researchers indefinitely? Can you envision Julia being used in large enterprise financial applications? Thank you for any words of wisdom. Best regards, Eric
Re: [julia-users] Re: Dan Luu's critique of Julia: needs commented code, better testing, error handling, and bugs fixed.
On Thursday, January 1, 2015 11:44:53 AM UTC+10, Ismael VC wrote: I didn't know that fact about the Linux kernel, or how usual it is, I've just red the git book and it explains it like this: http://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows And just under that diagram it says: We will go into more detail about the various possible workflows for your Git project in Chapter 5 http://git-scm.com/book/en/v2/ch05/_distributed_git, so before you decide which branching scheme your next project will use, be sure to read that chapter. Chapter 5 is more on distributed projects such as Julia (and Linux :). Cheers Lex On Wed, Dec 31, 2014 at 7:30 PM, ele...@gmail.com javascript: wrote: On Thursday, January 1, 2015 9:55:11 AM UTC+10, Ismael VC wrote: +1 to addering to the git flow, I had also allways expected for the master branch to be as stable and possible, while development happening in another branch, not the other way around and sometimes I've had to search for a past working commit in order to build julia, which strikes me as odd, as you guys really follow good development techniques. Well, using master as the development branch is the Linux Kernal workflow, so I doubt you can call it unusual. It is also the approach mostly used in the git book chapter http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows. Really experimental things are in feature branches which will eventually be merged into master. Stable is the release 0.3 branch. When the first 0.4 RCs are made, a branch will be made for 0.4. Cheers Lex PS thats as I understand the workflow as an outside observer, so consider this the test to see how understandable Julia's workflow is. Would it be difficult to change this, maybe for a post 0.4 era? El lunes, 29 de diciembre de 2014 10:36:19 UTC-6, Christian Peel escribió: Dan Luu has a critique of Julia up at http://danluu.com/julialang/ (reddit thread at http://bit.ly/1wwgnks) Is the language feature-complete enough that there could be an entire point release that targeted some of the less-flashy things he mentioned? I.e. commented code, better testing, error handling, and just fixing bugs? If it's not there, is there any thoughts on when it would be?
[julia-users] Re: weird 2D fft error: returns NaN error
any help please On Thursday, 1 January 2015 01:07:33 UTC-5, Zahirul ALAM wrote: may be not On Thursday, 1 January 2015 01:05:02 UTC-5, Zahirul ALAM wrote: I found the reason because both arrays contains (0, 0). Is there way around it? On Thursday, 1 January 2015 00:50:56 UTC-5, Zahirul ALAM wrote: Happy new year!! I am encountering a very odd fft error. I am trying fft NxN data. The data is produced using a mathematical equation. After debugging I have found that the following expression is gives NaN error: fft(besselj(1, sqrt(X.^2+Y.^2))./sqrt(X.^2+Y.^2)) where X and Y are Array{Float64,2}. if I write fft(besselj(1, sqrt(X.^2+Y.^2)) I get write answer. Seems like the division with the array is the issue. is issue. any idea why? is it a bug?
Re: [julia-users] Dan Luu's critique of Julia: needs commented code, better testing, error handling, and bugs fixed.
While the basic assert based tests are good enough for me, I do wish that the test framework could be more flexible. Some of this is historic - we started out not wanting a separate set of unit vs. comprehensive test suites. The goal with the unit tests was to have something that could be easily tested rapidly during development and catch regressions in the basic system. This evolved into something more than what it was intended to do. We even added some very basic perf tests to this framework. I find myself wanting a few more things from it as I have worked on the ARM port on and off. Some thoughts follow. I'd love to be able to run the entire test suite, knowing how many tests there are in all, how many pass and how many fail. Over time, it is nice to know how the total number of tests has increased along with the code in base. Currently, on ARM, tons of stuff fails and I run all the tests by looping over all the test files, and they all give up after the first failure. If I had, say, the serial number of the failing cases, I can keep repeatedly testing just those as I try to fix a particular issue. Currently, the level of granularity is a whole test file. Documentation of the test framework in the manual has been on my mind. We have it in the standard library documentation, but not in the manual. This has been on my mind for a while. Code coverage is essential - but that has already been discussed in detail in this thread, and some good work has already started. Beyond basic correctness testing, numerical codes need to also have tests for ill-conditioned inputs. For the most part, we depend on our libraries to be well-tested (LAPACK, FFTW, etc.), but increasingly, we are writing our own libraries. Certainly package authors are pushing boundaries here. A better perf test framework would also be great to have. Ideally, the perf test coverage would cover everything, and also have the ability to compare against performance in the past. Elliot's Codespeed was meant to do this, but somehow it hasn't worked out yet. I am quite hopeful that we will figure it out. Stuff like QuickCheck that generate random test cases are useful, but I am not convinced that should be in Base. -viral On Tuesday, December 30, 2014 3:35:27 AM UTC+5:30, Jameson wrote: I imagine there are advantages to frameworks in that you can expected failures and continue through the test suite after one fails, to give a better % success/failure metric than Julia's simplistic go/no-go approach. I used JUnit many years ago for a high school class, and found that, relative to `@assert` statements, it had more options for asserting various approximate and conditional statements that would otherwise have been very verbose to write in Java. Browsing back through it's website now ( http://junit.org/ under Usage and Idioms), it apparently now has some more features for testing such as rules, theories, timeouts, and concurrency). Those features would likely help improve testing coverage by making tests easier to describe. On Mon Dec 29 2014 at 4:45:53 PM Steven G. Johnson stevenj@gmail.com wrote: On Monday, December 29, 2014 4:12:36 PM UTC-5, Stefan Karpinski wrote: I didn't read through the broken builds post in detail – thanks for the clarification. Julia basically uses master as a branch for merging and simmering experimental work. It seems like many (most?) projects don't do this, and instead use master for stable work. Yeah, a lot of projects use the Gitflow model, in which a develop branch is used for experimental work and master is used for (nearly) release candidates. I can understand where Dan is coming from in terms of finding issues continually when using Julia, but in my case it's more commonly this behavior is annoying / could be improved than this behavior is wrong. It's rare for me to code for a few hours in Julia without filing issues in the former category, but out of the 300 issues I've filed since 2012, it looks like less than two dozen are in the latter definite bug category. I'm don't understand his perspective on modern test frameworks in which FactCheck is light-years better than a big file full of asserts. Maybe my age is showing, but from my perspective FactCheck (and its Midje antecedent) just gives you a slightly more verbose assert syntax and a way of grouping asserts into blocks (which doesn't seem much better than just adding a comment at the top of a group of asserts). Tastes vary, of course, but Dan seems to be referring to some dramatic advantage that isn't a matter of mere spelling. What am I missing?
[julia-users] Re: weird 2D fft error: returns NaN error
There is a NaN item at the very centre. How to deal with it? On Thursday, 1 January 2015 02:25:34 UTC-5, Zahirul ALAM wrote: any help please On Thursday, 1 January 2015 01:07:33 UTC-5, Zahirul ALAM wrote: may be not On Thursday, 1 January 2015 01:05:02 UTC-5, Zahirul ALAM wrote: I found the reason because both arrays contains (0, 0). Is there way around it? On Thursday, 1 January 2015 00:50:56 UTC-5, Zahirul ALAM wrote: Happy new year!! I am encountering a very odd fft error. I am trying fft NxN data. The data is produced using a mathematical equation. After debugging I have found that the following expression is gives NaN error: fft(besselj(1, sqrt(X.^2+Y.^2))./sqrt(X.^2+Y.^2)) where X and Y are Array{Float64,2}. if I write fft(besselj(1, sqrt(X.^2+Y.^2)) I get write answer. Seems like the division with the array is the issue. is issue. any idea why? is it a bug?
Re: [julia-users] Static type fields
On Thursday, January 1, 2015 11:45:00 AM UTC+10, Jameson wrote: method dispatch on the object type does a remarkably good job at providing this functionality without needing a specialized feature: static_data(::Type{MyObj}) = 1 static_data(::Type{MyOtherObj}) = 2 Would like to document this, but not sure where it should go? On Wed Dec 31 2014 at 8:23:40 PM Josh Langsfeld jdl...@gmail.com javascript: wrote: I currently am trying to solve a problem where I have many composite types and I would like to associate some data with each type, such that every instance has access to it. Obviously, in C++ I would just create a static member variable. Is there a good way to go about this in Julia? Currently, I have it working by using a global Dict mapping DataType objects to their associated data but I really don't like this. Something more naive like just adding that field to every object instance also strikes me as unnecessary and wasteful. I haven't seen any significant discussion about static fields on the lists or on github so is this something that could be considered for addition to the language? Thanks, Josh