[julia-users] Re: Help for 'mean' (version 0.4)

2015-09-01 Thread Seth
Unreproducible here: _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.0-pre+7107

[julia-users] Re: Julia 0.4 warnings and how to fix

2015-09-01 Thread Michael Francis
Thanks Does anybody have a pointer to why operators are not imported in 0.4 by default? On Tuesday, September 1, 2015 at 12:36:14 PM UTC-4, Tim Wheeler wrote: > > Thanks! I was trying to figure out how to do Base.== for a long time. It > turns out the proper way to do it is as follows (found

[julia-users] Re: Type stability (or not) in core stats functions

2015-09-01 Thread Michael Francis
Thanks, that is a good pointer. In this specific case its unfortunate that there is a keyword arg in the API at all, having two functions one with a mean supplied and one without would avoid this issue and remove the branch logic replacing it with static dispatch. On Tuesday, September 1,

Re: [julia-users] How do I know if a type is concrete?

2015-09-01 Thread Mauro
Try isleaftype otherwise @code_warntype is a great tool which might be applicable to your case. On Tue, 2015-09-01 at 20:05, Cedric St-Jean wrote: > I have a type > > > typealias TColor RGBA{UfixedBase{Uint8,8}} > typealias TImage Image{TColor, 2, Array{TColor, 2}} > >

[julia-users] Re: Julia 0.4 warnings and how to fix

2015-09-01 Thread Tony Kelman
https://github.com/JuliaLang/julia/issues/8113 https://github.com/JuliaLang/julia/pull/12235 On Tuesday, September 1, 2015 at 10:22:05 AM UTC-7, Michael Francis wrote: > > Thanks > > Does anybody have a pointer to why operators are not imported in 0.4 by > default? > > On Tuesday, September

[julia-users] Re: Type stability (or not) in core stats functions

2015-09-01 Thread Jarrett Revels
Actually, just saw this: https://github.com/JuliaLang/julia/issues/9818 . Ignore the messed up @code_typed stuff in my previous reply to this thread. I believe the type-inference concerns are still there, however, even if @code_typed doesn't

Re: [julia-users] Help for 'mean' (version 0.4)

2015-09-01 Thread cormullion
You're right, Matt, my testing does odd things. (In version 0.3, `mean = 0` used to give a warning, it doesn't any more). I'm pleased that you can get help on 0. A little disappointed that you can't get help on all the integers... :)

[julia-users] Re: How to assign an arry from inside a cycle

2015-09-01 Thread Sisyphuss
delete the comma behind `1:3`, then you will get the right result. On Tuesday, September 1, 2015 at 8:17:18 PM UTC+2, Igor wrote: > > Hello everybody! > > How is it possible to write something in array from "for" loop? I have > following code: > > t = Array(Float64, 3, 4) > for i = 1:3, >

[julia-users] Performing conversion on a tuple of arguments

2015-09-01 Thread Scott Jones
What is the best Julian way of performing a conversion on all of the arguments to a method? Say I have a tuple, passed in as I::Real..., and I wish to convert all of the values to type Int? Thanks, Scott

[julia-users] How to assign an arry from inside a cycle

2015-09-01 Thread Igor
Hello everybody! How is it possible to write something in array from "for" loop? I have following code: t = Array(Float64, 3, 4) for i = 1:3, t[i, :] = [1., 2., 3., 4.] end But after this, all the elements inside "t" are equal to "4". How to make them "1 2 3 4" ? Best regards, Igor.

[julia-users] Re: Julia 0.4 warnings and how to fix

2015-09-01 Thread Michael Francis
Thanks - have to say this removal makes no sense to me. We will in the next revision 0.5 of Julia allow accidental shadowing of == (and associated) operators. Seems like a regressive step. On Tuesday, September 1, 2015 at 1:53:47 PM UTC-4, Tony Kelman wrote: > >

[julia-users] Tk (Cairo) Canvas not scrollable?

2015-09-01 Thread Dömötör Gulyás
I'm trying to build a scrollable Cario canvas in a Tk GUI, but I keep getting "TclError("unknown option -xscrollcommand")" trying to add the scrollbars, apparently the canvas is a frame ("winfo class" returns "Frame"), which is not scrollable. Is there a way to add scrollbars to a Cairo

Re: [julia-users] Re: MongoDB and Julia

2015-09-01 Thread Ferenc Szalma
Kevin, I also managed to get Pzion's Mongo.jl to work in Julia v0.3. Now, I am trying to make it work in v0.4 but getting an error message while trying to insert: oid = insert(collection, {"name"=>"time series"}) WARNING: deprecated syntax "{a=>b, ...}" at In[36]:1. Use "Dict{Any,Any}(a=>b,

[julia-users] Julia's text mining capabilities

2015-09-01 Thread Venkat Ramakrishnan
Folks, How fast is Julia compared to other languages like R and Python in text processing? Any benchmarks? Any parallel processing facility specifically available for text processing in Julia? Thanks, Venkat.

Re: [julia-users] How do I know if a type is concrete?

2015-09-01 Thread Cedric St-Jean
Thank you. That doesn't seem to be the problem, I'll post an issue to Images.jl On Tuesday, September 1, 2015 at 2:18:43 PM UTC-4, Mauro wrote: > > Try isleaftype > > otherwise @code_warntype is a great tool which might be applicable to > your case. > > On Tue, 2015-09-01 at 20:05, Cedric

[julia-users] Re: Type stability (or not) in core stats functions

2015-09-01 Thread Sisyphuss
I can't read low level code or tweak with the compiler. Could you try giving `mean` the default value `NaN`? On Tuesday, September 1, 2015 at 7:29:59 PM UTC+2, Michael Francis wrote: > > Thanks, that is a good pointer. > > In this specific case its unfortunate that there is a keyword arg in

[julia-users] Re: Performing conversion on a tuple of arguments

2015-09-01 Thread Scott Jones
Thanks everybody! That helped! I ended up doing: getindex(c, map(Int, I)...). Performance isn't so much of an issue, I wanted it to be Julian and succint, to put in a deprecation warning. Scott On Tuesday, September 1, 2015 at 2:59:54 PM UTC-4, Jeffrey Sarnoff wrote: > > > Of the variations I

[julia-users] Re: ANN: JuMP 0.10 released

2015-09-01 Thread Jarrett Revels
Woohoo! That's a lot of new stuff. -- Jarrett On Tuesday, September 1, 2015 at 12:41:26 AM UTC-4, Miles Lubin wrote: > > The JuMP team is happy to announce the release of JuMP 0.10. > > This is a major release with the greatest amount of new functionality > since the addition of nonlinear

Re: [julia-users] Help for 'mean' (version 0.4)

2015-09-01 Thread Matt Bauman
You have shadowed Base.mean with a local `mean` that was bound to `0`. Try help for Base.mean and 0. On Tuesday, September 1, 2015 at 1:18:17 PM UTC-4, Miguel Bazdresch wrote: > > The Segmentation Fault strongly suggests a glitch, not an Easter egg, > unfortunately... :) > > On Tue, Sep 1,

[julia-users] How do I know if a type is concrete?

2015-09-01 Thread Cedric St-Jean
I have a type typealias TColor RGBA{UfixedBase{Uint8,8}} typealias TImage Image{TColor, 2, Array{TColor, 2}} How do I know if it's a concrete type or not? Is there an isconcrete function somewhere? Incidentally, I'm asking this because I just updated my packages and had to adjust to the

[julia-users] @parallel and HDF5 is posible to work together?

2015-09-01 Thread paul analyst
@parallel and HDF5 is posible to work together? julia> addprocs(6) 6-element Array{Any,1}: 2 3 4 5 6 7 julia> @parallel for i=1:l dset=fid["punkts"*string(i)] f=vec(h5read("F.h5","F",(:,i))); . end WARNING: Module HDF5 not defined on process 2

Re: [julia-users] Julia's text mining capabilities

2015-09-01 Thread Mauro
This may have answers: https://youtu.be/dgfIIZ5yA4E (though I haven't watched it yet) On Tue, 2015-09-01 at 14:42, Venkat Ramakrishnan wrote: > Folks, > > How fast is Julia compared to other languages like R and Python in text > processing? > Any benchmarks? > > Any

[julia-users] Re: Performing conversion on a tuple of arguments

2015-09-01 Thread Jeffrey Sarnoff
Of the variations I timed, all with the signature test(a::Tuple), this ran fastest: using FastAnonymous fa = @anon x->floor(Integer,x) function test(a::Tuple) [x->fa(x) for x in a] end I do not know how to access the tuple that is the args as passed directly. Good question, it raises

[julia-users] Re: Performing conversion on a tuple of arguments

2015-09-01 Thread Seth
Assuming you have such a conversion function available (let's use floor() for our example), you could do a = (1.1, 2.2, 3.3, 4.4) map(x->floor(Integer,x), a) which yields a tuple of ints. I don't claim "best" or even "Julian"; there may be a more clever approach. :) On Tuesday, September 1,

[julia-users] OSX support for package testing on Travis is now available by default!

2015-09-01 Thread Tony Kelman
Package authors may find this useful, you formerly had to send an email requesting the feature be enabled per repository but now it's available for all. Ref https://github.com/travis-ci/docs-travis-ci-com/commit/8a4efe6e6bfb0dcce760eedabd2ffe640d6545d5 Assuming you're using language: julia in

[julia-users] Help for 'mean' (version 0.4)

2015-09-01 Thread cormullion
Using 0.4: help?> mean search: mean mean! median median! SegmentationFault macroexpand module_parent Meta enumerate Enumerate timedwait primes mask remotecall remotecall_wait remotecall_fetch MethodTable 0 (zero; BrE: /ˈzɪərəʊ/ or AmE: /ˈziːroʊ/) is both a number and the

Re: [julia-users] Help for 'mean' (version 0.4)

2015-09-01 Thread Miguel Bazdresch
The Segmentation Fault strongly suggests a glitch, not an Easter egg, unfortunately... :) On Tue, Sep 1, 2015 at 1:12 PM, wrote: > Using 0.4: > > help?> mean > search: mean mean! median median! SegmentationFault macroexpand > module_parent Meta enumerate Enumerate

[julia-users] Re: ANN: JuMP 0.10 released

2015-09-01 Thread Fabrizio Lacalandra
V great job! Shall i suggest to start thinking at: 1) @removeconstraint 2) @defvar with indication on priority branching for integer vars, accepted by Cplex/Gurobi at least 3) Some kind of special Constraint Programming-like construct, such as classic allDiff and more advanced things? 4) Start

[julia-users] Re: Performing conversion on a tuple of arguments

2015-09-01 Thread Seth
More precisely, foo(a::Real...) = map(x->floor(Integer,x),a) On Tuesday, September 1, 2015 at 11:32:15 AM UTC-7, Seth wrote: > > Assuming you have such a conversion function available (let's use floor() > for our example), you could do > a = (1.1, 2.2, 3.3, 4.4) > map(x->floor(Integer,x), a)

Re: [julia-users] Re: MongoDB and Julia

2015-09-01 Thread Tim Lebel
Did you try running Pkg.checkout("Mongo")? I believe that I fixed this, but the maintainer may not have pushed a new tag. On Tue, Sep 1, 2015 at 9:14 AM, Ferenc Szalma wrote: > Kevin, > > I also managed to get Pzion's Mongo.jl to work in Julia v0.3. Now, I am > trying to make

[julia-users] How parallel count and save the results ?

2015-09-01 Thread paul analyst
How parallel count and save the results ? I have a large matrix A saved in the file hdf5 10 ^ 7 x 10 ^ 3. Each column was converted to the write down in the matrix B of the same size. Each column independently. The calculations are tedious but not borne by the processor. How does this process do

[julia-users] Re: IDE for Julia

2015-09-01 Thread Jeffrey Sarnoff
What is your environment? On Tuesday, September 1, 2015 at 10:17:58 PM UTC-4, Jeffrey Sarnoff wrote: > > That happened to me when forgot to start atom from the command line and > used the menu entry or shortcut instead. > > On Tuesday, September 1, 2015 at 9:42:58 PM UTC-4, Oleg Mikulchenko

[julia-users] Re: IDE for Julia

2015-09-01 Thread Jeffrey Sarnoff
That happened to me when forgot to start atom from the command line and used the menu entry or shortcut instead. On Tuesday, September 1, 2015 at 9:42:58 PM UTC-4, Oleg Mikulchenko wrote: > > I agree. BTW, does someone consider Eclipse plugin for Julia? Similar to > pydev. For scientific work I

[julia-users] Re: ANN: JuMP 0.10 released

2015-09-01 Thread Joey Huchette
On Tuesday, September 1, 2015 at 1:27:25 PM UTC-4, Fabrizio Lacalandra wrote: > > V great job! Shall i suggest to start thinking at: > > 1) @removeconstraint > Should be pretty easy to add a function that does this in just a few lines of code. > 2) @defvar with indication on priority

Re: [julia-users] Re: Pyplot graphic error

2015-09-01 Thread Juan Carlos Cuevas Bautista
Hi Steve, After some test in my plots and googling. I changed my version of Gnuplot from 4.6. patchlevel 4 to gnuplot 4.6 patchlevel 6 and julia is working perfectly now. I don't know how julia and Gnuplot are related but it works. On Thursday, August 27, 2015 at 8:24:43 AM UTC-4, Juan Carlos

[julia-users] Tk (Cairo) Canvas not scrollable?

2015-09-01 Thread j verzani
Maybe add a sized Canvas into a TkCanvas and add scroll bars to the latter?

[julia-users] Re: IDE for Julia

2015-09-01 Thread Oleg Mikulchenko
I agree. BTW, does someone consider Eclipse plugin for Julia? Similar to pydev. For scientific work I prefer Spyder, but for debugging Pydev is more powerful. Not that I like Eclipse, just no choice to avoid it :) For some reasons, Python run on Atom with Hydrogen, but Julia doesn't, it is

Re: [julia-users] Re: MongoDB and Julia

2015-09-01 Thread Ferenc Szalma
Alright. So I had to checkout LibBSON and build it separately form Mongo, then restarting the kernel insert works in v0.4, too. On Tuesday, September 1, 2015 at 7:14:40 PM UTC-4, Ferenc Szalma wrote: > > I just tried `delete` and `find` and these two operations work. `insert` > however does not

[julia-users] threads and processes, @async vs. @spawn/@parallel?

2015-09-01 Thread John Brock
I've read through the parallel computing documentation and experimented with some toy examples, but I still have some questions about the fundamentals of parallel programming in Julia: 1. It seems that @async performs work in a separate green thread, while @spawn performs work in a

Re: [julia-users] Re: MongoDB and Julia

2015-09-01 Thread Ferenc Szalma
I just tried `delete` and `find` and these two operations work. `insert` however does not work. On Tuesday, September 1, 2015 at 3:41:27 PM UTC-4, Tim Lebel wrote: > > Did you try running Pkg.checkout("Mongo")? I believe that I fixed this, > but the maintainer may not have pushed a new tag. > >

Re: [julia-users] C interop: pointer to elementary julia type

2015-09-01 Thread Jameson Nash
use `Ref{Clong}` for the calling convention to pass an auto-allocated boxed c-long. it's usually best to avoid `pointer` and `pointer_from_objref`. memory is not "guaranteed by julia": it will be cleaned up as soon as the gc detects that you are no longer referencing the julia object. using

Re: [julia-users] OSX support for package testing on Travis is now available by default!

2015-09-01 Thread Tony Kelman
I know, click blame, I put it there. Not every package is using that template though. If you see packages still using the old language: cpp travis template, now there's a really good reason to file PR's to update them. Though keep an eye out for whether existing packages need any extra apt-get

[julia-users] C interop: pointer to elementary julia type

2015-09-01 Thread Joosep Pata
I want to modify the data stored in an elementary julia object (e.g. Int64) using external C code. I can do this if the type is wrapped in an array, but is it possible to do something like `pointer(x::Float64) -> address of data in x` with the memory being guaranteed by julia? Here’s a short

Re: [julia-users] C interop: pointer to elementary julia type

2015-09-01 Thread Joosep Pata
Thanks Jameson, I want to later use `x` in auto-generated expressions, and if it's a Ref I will have to use `x.x` to get the actual data which makes generating the expressions more tricky, I thought I could perhaps avoid it. Here's a more complete snippet: ~~~ type Foo x::Int64

Re: [julia-users] C interop: pointer to elementary julia type

2015-09-01 Thread Jameson Nash
I still have no idea what you are trying to do, but punning on types like your example shows is going to get you in deep trouble with both Julia and C. (using Expr and quoted ASTs will also cause you issues, but for completely different reasons). ``` type Foo x::Clong y::Vector{Clong} end

[julia-users] Re: @parallel and HDF5 is posible to work together?

2015-09-01 Thread Nils Gudat
As the warning says, the module is not defined on the workers. Do addprocs() import HDF5 @everywhere using HDF5

Re: [julia-users] OSX support for package testing on Travis is now available by default!

2015-09-01 Thread Mauro
It's now actually in the autogenerated travis.yml file: https://github.com/JuliaLang/julia/blob/aa8cd2e80d244a203e3774f8472619afb3ea1fe5/base/pkg/generate.jl#L171 On Tue, 2015-09-01 at 22:02, Elliot Saba wrote: > That's awesome! Many thanks to everyone who continually

Re: [julia-users] Re: MongoDB and Julia

2015-09-01 Thread Ferenc Szalma
Yes, I also tried running Pkg.checkout("Mongo"). I also checked that the original MongoCollection.jl had find(...), while the checked-out version has Base.find(...) methods. I also restarted the kernel to make sure it picked up the changes. Could you test that Mongo with the Julia v0.4 works

[julia-users] Re: iFastSum (correctly rounded sums) available

2015-09-01 Thread Kristoffer Carlsson
On line 20, changing xs[:] = x[:] to copy!(xs, x) makes it 25% faster. On Tuesday, September 1, 2015 at 11:14:59 AM UTC+2, Jeffrey Sarnoff wrote: > > > https://github.com/J-Sarnoff/IFastSum.jl > > On Tuesday, September 1, 2015 at 5:14:20 AM UTC-4, Jeffrey Sarnoff wrote: >> >> This implements an

[julia-users] Re: iFastSum (correctly rounded sums) available

2015-09-01 Thread Jeffrey Sarnoff
https://github.com/J-Sarnoff/IFastSum.jl On Tuesday, September 1, 2015 at 5:14:20 AM UTC-4, Jeffrey Sarnoff wrote: > > This implements an algorithm that gives the correctly rounded sum of a > Vector{AbstractFloat}. I wanted to know if it really worked. It appears > so. AFAIK, this works

[julia-users] Re: iFastSum (correctly rounded sums) available

2015-09-01 Thread Jeffrey Sarnoff
great -- thanks. On Tuesday, September 1, 2015 at 5:28:49 AM UTC-4, Kristoffer Carlsson wrote: > > On line 20, changing xs[:] = x[:] to copy!(xs, x) makes it 25% faster. > > > On Tuesday, September 1, 2015 at 11:14:59 AM UTC+2, Jeffrey Sarnoff wrote: >> >> >>

[julia-users] iFastSum (correctly rounded sums) available

2015-09-01 Thread Jeffrey Sarnoff
This implements an algorithm that gives the correctly rounded sum of a Vector{AbstractFloat}. I wanted to know if it really worked. It appears so. AFAIK, this works properly with any size vector; I tested it with 5_000, 100_000, and 10_000_000 items. I think of it as an an order of

[julia-users] Re: Type stability (or not) in core stats functions

2015-09-01 Thread Michael Francis
2) The underlying functions are only stable if the mean passed to them is of the correct type, e.g. a number. Essentially this is a type inference issue, if the compiler was able to optimize the branches then it would be likely be ok, it looks from the LLVM code that this is not the case

[julia-users] [ANN] Conda.jl: using conda package manager for Julia

2015-09-01 Thread Luthaf
Hi Julians! I am happy to present you the Conda.jl package, a binary dependencies manager for Julia based on the open-source conda package manager. Some interesting features of the Conda package manager: - You can easily add

[julia-users] Re: [ANN] Conda.jl: using conda package manager for Julia

2015-09-01 Thread Jeffrey Sarnoff
It would help to have explicit examples for adding a package from Julia package central (I assume this the default) and adding one from some other github location. On Tuesday, September 1, 2015 at 8:42:31 AM UTC-4, Luthaf wrote: > > Hi Julians! > > I am happy to present you the Conda.jl >

Re: [julia-users] Re: Pyplot graphic error

2015-09-01 Thread Steven G. Johnson
On Tuesday, September 1, 2015 at 4:55:10 PM UTC-4, Juan Carlos Cuevas Bautista wrote: > > After some test in my plots and googling. I changed my version of Gnuplot > from 4.6. patchlevel 4 to gnuplot 4.6 patchlevel 6 and julia is working > perfectly now. > I don't know how julia and Gnuplot

[julia-users] RasterIO.jl

2015-09-01 Thread Marcio Sales
Hello all As a statistician and GIS practitioner, of course I'm interested in that package. I've made a fork and started to play with the GDal functions, and now I'm in condition to start contributing. As a start, I've made a function to reproject a raster, with a choice to save a new file to

[julia-users] Re: threads and processes, @async vs. @spawn/@parallel?

2015-09-01 Thread Steven G. Johnson
On Tuesday, September 1, 2015 at 10:02:30 PM UTC-4, John Brock wrote: > > I've read through the parallel computing documentation and experimented > with some toy examples, but I still have some questions about the > fundamentals of parallel programming in Julia: > >1. It seems that @async

[julia-users] Re: Type stability (or not) in core stats functions

2015-09-01 Thread Jarrett Revels
Related: https://github.com/JuliaLang/julia/issues/9551 Unfortunately, as you've seen, type-variadic keyword arguments can really mess up type-inferencing. It appears that keyword argument types are pulled from the default arguments rather than those actually passed in at runtime: *julia> f(x;

[julia-users] Re: Julia 0.4 warnings and how to fix

2015-09-01 Thread Tim Wheeler
Thanks! I was trying to figure out how to do Base.== for a long time. It turns out the proper way to do it is as follows (found this in DataArrays.jl): Base.(:(==))( ... )

[julia-users] Re: IDE for Julia

2015-09-01 Thread STAR0SS
It's pretty good but it's like lighttable, there's no console and the plots management is a bit wonky (plots on top of your code?).

Re: [julia-users] IDE for Julia

2015-09-01 Thread Jeffrey Sarnoff
Installing Atom+Hydrogen on Linux *Carefully* following the directions on https://github.com/willwhitney/hydrogen does work. First, install the most recent version of Atom. If you have python installed and python3 is the default, or you dont have python installed you need a minimal python2.7

Re: [julia-users] Re: [ANN] Conda.jl: using conda package manager for Julia

2015-09-01 Thread Jeffrey Sarnoff
That is clearer to me; maybe include "Conda is not ... external C library" in the README. On Tuesday, September 1, 2015 at 9:35:40 AM UTC-4, Luthaf wrote: > > I don't get what you mean. By package, you mean binary package ? In this > case, there is no Julia central channel (a channel is a

[julia-users] Re: IDE for Julia

2015-09-01 Thread Seth
Have you tried Hydrogen with Atom? It has all of those things (subjectively). On Tuesday, September 1, 2015 at 7:05:59 AM UTC-7, STAR0SS wrote: > > I think a good IDE should have: > > - A proper console and a good way to send single line and block of codes > to it (e.g. matlab's code section) >

[julia-users] Julia in Atom - automaticindentation within brackets

2015-09-01 Thread Tom Lee
Has anyone been able to get atom to automatically indent items within (...) to line up with the opening ( ? eg function foo(bar, baz) # <-- Atom (with language-julia) only auto-indents this line by one tab :( stuff end I have just discovered the awesomeness of Atom, and right

Re: [julia-users] Converting vectors to dictionaries back and forth

2015-09-01 Thread Yichao Yu
On Tue, Sep 1, 2015 at 9:39 AM, wrote: > Hi, > > I want to be able to convert vectors to dictionaries and the other way > round. I have coded these two functions: > > function vec_to_dict(v, ll) > d = Dict() > assert(length(v) == length(ll)) > for i = 1:length(v) >

[julia-users] Re: Julia in Atom - automaticindentation within brackets

2015-09-01 Thread Jeffrey Sarnoff
I tried some of the available indent-related packages without success. On Tuesday, September 1, 2015 at 9:18:16 AM UTC-4, Tom Lee wrote: > > Has anyone been able to get atom to automatically indent items within > (...) to line up with the opening ( ? > eg > > function foo(bar, >

[julia-users] Are (+), (*) the only ops that can use n-ary definitions?

2015-09-01 Thread Jeffrey Sarnoff
import Base:(+),(*),(-) julia> 2+3+4 9 julia> (+){T<:Integer}(a::T,b::T,c::T) = ((a+b)+c)+1 julia> 2+3+4 10 julia> 2-3-4 -5 julia> (+){T<:Integer}(a::T,b::T,c::T) = ((a-b)-c)-1 julia> 2-3-4 -5 Are (+),(*) the only ops that can be n-ary specialized? What gives them that ability? Why only those?

Re: [julia-users] Re: [ANN] Conda.jl: using conda package manager for Julia

2015-09-01 Thread Luthaf
I don't get what you mean. By package, you mean binary package ? In this case, there is no Julia central channel (a channel is a package source in conda), and you can use your very own by pushing the URL to `Conda.CHANNELS` before anything else. Or if you mean Julia package, Conda is not a

[julia-users] Converting vectors to dictionaries back and forth

2015-09-01 Thread amiksvi
Hi, I want to be able to convert vectors to dictionaries and the other way round. I have coded these two functions: function vec_to_dict(v, ll) d = Dict() assert(length(v) == length(ll)) for i = 1:length(v) d[ll[i]] = v[i] end return d end function dict_to_vec(d)

Re: [julia-users] IDE for Julia

2015-09-01 Thread Andrei Zh
@Cedric Unless you are interested specifically in notebooks, I'd suggest trying ESS mode for Emacs which has support for Julia including REPL. It looks something like this (though this video also uncovers sometimes annoying

Re: [julia-users] Converting vectors to dictionaries back and forth

2015-09-01 Thread amiksvi
Exactly what I needed, thanks a lot.

[julia-users] Re: IDE for Julia

2015-09-01 Thread STAR0SS
I think a good IDE should have: - A proper console and a good way to send single line and block of codes to it (e.g. matlab's code section) - A decent text editor - Integrated plots - Proper window management (docking, etc) so you don't have windows everywhere All this meet two others broad

Re: [julia-users] Converting vectors to dictionaries back and forth

2015-09-01 Thread Cedric St-Jean
BTW, if I'm not mistaken, your dict_to_vec function can be written as just collect(values(d)). On Tuesday, September 1, 2015 at 9:47:47 AM UTC-4, ami...@gmail.com wrote: > > Exactly what I needed, thanks a lot. >

[julia-users] Re: Julia on OpenBSD

2015-09-01 Thread Maurizio Tomasi
*@Viral*, yes, indeed I was the submitter of those patches. Unfortunately, I realized that part of the C code has a number of #ifdefs that do not cover OpenBSD properly. Maybe I should create a bugreport in openlibm to keep track of this? *@Yychao*, thank you very much for this tip! It has

Re: [julia-users] Julia 0.4 warnings and how to fix

2015-09-01 Thread Yichao Yu
On Sep 1, 2015 11:48 AM, "Michael Francis" wrote: > > I get the following - WARNING: module should explicitly import == from Base > > Unfortunately you can't simply do > > Base.==( ... ) Operators are not imported by default in 0.4 anymore. Import them directly or use

Re: [julia-users] Julia 0.4 warnings and how to fix

2015-09-01 Thread Seth
Thanks, Yichao! As a related aside, it appears that using import violates Style Guide #33 (per https://github.com/johnmyleswhite/Style.jl), so is the idiomatic / preferred way of doing this limited to using Base.(:==) ? On Tuesday, September 1, 2015 at 9:06:42 AM UTC-7, Yichao Yu wrote: > > >

[julia-users] Julia 0.4 warnings and how to fix

2015-09-01 Thread Michael Francis
I get the following - WARNING: module should explicitly import == from Base Unfortunately you can't simply do Base.==( ... ) I can fix with import Base: == what is the idiomatic way of doing this in 0.4 Also is there a guide for upgrading packages to 0.4 ?