Re: [julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Jarrett Revels
> > Though how would one correctly access the 'nth' elements type ? > It brings up a question regarding parameterized types, how should (or > should) one access/refer to the parameters of the type rather than an > instance. It seems like a bad (queezy) practice to dig into the parameters >

Re: [julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Tim Holy
base/dict.jl defines keytype and valtype, but they are not exported. You could file a pull request that exports them (it would be a 2-line patch, though you might want to add a test to make sure they stay exported). --Tim On Thursday, September 03, 2015 06:37:02 AM Michael Francis wrote: > In

Re: [julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Michael Francis
Although in this case - I'm digging into the 'standard' interface provided by DataType, but I agree this does not seem correct. I'm going to submit a pull request so that the methods for assoitaive for keytype and valtype are exported which resolves this specific issue. The type stable

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Kevin Squire
Relevant Julia issues: * Reintroduce concise syntax for Dict construction? #12930 * Dict syntax is getting me down #6739 On Thu, Sep 3, 2015 at 7:38 AM, Jeff Bezanson

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Steven G. Johnson
On Thursday, September 3, 2015 at 10:38:15 AM UTC-4, Jeff Bezanson wrote: > > There is no need to write the type over and over again. You can say > > const D = Dict{Symbol, Any} > > D(:a => "", :b => 0, ...) > There is also often no need to write the type at all: julia> Dict(:a => "", :b

[julia-users] Collection of YAsnippets for Julia

2015-09-03 Thread andreas
I've started a collection of YAsnippets for Julia that may be useful for Emacs user: https://github.com/scheidan/julia-jasnippets Docstring support for function is ok (based on the snippets for python), but for type and immutable elisp hacking is needed. Best, Andreas

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Jeff Bezanson
There is no need to write the type over and over again. You can say const D = Dict{Symbol, Any} D(:a => "", :b => 0, ...) The old syntax for this was (Symbol=>Any)[:a => "", :b => 0, ...] but there was no way to abstract over the type part, `(Symbol=>Any)`, so you really did have to write the

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Tim Holy
The motivation for this change is so people can more easily construct arrays- of-arrays. In the future, [1:10] will construct a Vector{UnitRange{Int}}, not a Vector{Int}. [1:10;] is concatenating and makes a Vector{Int}. (The first does too, but we need a release cycle with deprecation warnings

Re: [julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Michael Francis
I will likely do so, it's quite a common action to take. Fortunately with typeof( ( 1,2 ) ) == Tuple{Int64,Int64} there is a significantly greater consistency in 0.4 vs 0.3 Though how would one correctly access the 'nth' elements type ? It brings up a question regarding parameterized

Re: [julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Michael Francis
For docs - are we performing in place updates to collections.rst ? On Thursday, September 3, 2015 at 10:04:22 AM UTC-4, Michael Francis wrote: > > I will likely do so, it's quite a common action to take. > > Fortunately with typeof( ( 1,2 ) ) == Tuple{Int64,Int64} there is a > significantly

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Mike Nolta
I also think ditching {} for dicts wasn't a great idea. -Mike On Thu, Sep 3, 2015 at 9:36 AM, Jonathan Malmaud wrote: > I agree that syntactic sugar for Dict literal construction would be > appreciated. There were good reasons for removing the previous syntax, but I > think

Re: [julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Matt Bauman
On Thursday, September 3, 2015 at 10:04:22 AM UTC-4, Michael Francis wrote: > > It brings up a question regarding parameterized types, how should (or > should) one access/refer to the parameters of the type rather than an > instance. It seems like a bad (queezy) practice to dig into the

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Jeff Bezanson
For `[1:10]`, I recommend `collect(1:10)` or `[1:10;]`. Splatting should be avoided where possible. On Thu, Sep 3, 2015 at 11:22 AM, wrote: > Early adopters shouldn't throw stones... :) But in fact I quite like the new > Dict syntax, which seems to be more explicit and

[julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread cormullion
Early adopters shouldn't throw stones... :) But in fact I quite like the new Dict syntax, which seems to be more explicit and readable. Curly braces seem to be gainfully employed elsewhere doing type stuff. And experts can make short cuts, either in Julia or in their editors... I confess I'm a

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

2015-09-03 Thread Iain Dunning
Julia v0.4.0 is still about a month a way (I think). JuMP (and JuliaOpt in general) support both v0.3 and v0.4 for now, so you can try out v0.4 now if you want. JuMP v0.10.x will probably be the last series of releases for JuMP on v0.3, depending on when v0.4 comes out. On Thu, Sep 3, 2015 at

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
There are a number of inconsistency problems currently though. [1,2.3,4] gives Array{Float64,1}, but Dict(1=>1,2=>2.3,3=>3) gives Dict{Int64,Any}. Another weird one with arrays that is inconsistent (hopefully will be fixed in 0.5): [1,2,[3,4]] gives a deprecation warning about concatenation,

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Jeff Bezanson
> Another weird one with arrays that is inconsistent (hopefully will be fixed > in 0.5) Yes that's the whole point of the deprecation warning. On Thu, Sep 3, 2015 at 11:01 AM, Scott Jones wrote: > There are a number of inconsistency problems currently though. > >

[julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
On Thursday, September 3, 2015 at 12:20:51 PM UTC-4, cormu...@mac.com wrote: > > "Why is [1:10...] a puzzle?" > > Just that a new user might expect to see or use the ellipsis in its > conventional position: > > [1...10] > [1...10] may be conventional outside of julia (is that done in other

[julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread cormullion
"Why is [1:10...] a puzzle?" Just that a new user might expect to see or use the ellipsis in its conventional position: [1...10] rather than at the end: [1:10...]

[julia-users] 0.4 final push!

2015-09-03 Thread Jake Bolewski
v0.4 is being held up by one blocking issue https://github.com/JuliaLang/julia/pull/12835. We need eyeballs helping us to spot problems with manual prior to branching 0.4 and making a release candidate. Fortunately helping out is easy: See Yichao's comment for help contributing

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

2015-09-03 Thread Tero Frondelius
I think you answered yourself. As an Anaconda user I will type: conda install X and after this the X starts working even with the open Jupyter notebook by just importing the X. Now when you just look the https://github.com/JuliaLang/pyjulia/blob/master/README.md

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
On Thursday, September 3, 2015 at 1:47:07 PM UTC-4, Sean Marshallsay wrote: > > [1:10;] is simply a consequence of matrix literal syntax (like [1:10; > 11:20]) and gets translated into vcat(1:10). It might be a bit confusing > but there's no point in making it a special case > Yes, I

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

2015-09-03 Thread Tero Frondelius
Sorry you got me wrong. I found Julia thus I don't want to use Python anymore for the new stuff. I think this is the case for most of the Julia users, like you said. I was just trying to answer your question why pyjulia is not used intensively. Anyway I will promise to ask my colleague, if he

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

2015-09-03 Thread Jake Bolewski
pyjulia was mostly created to show off interop and for demos. I don't think anyone uses it seriously. It might make more sense now with precompilation as it used to take 10+ seconds to load PyCall and initialize Julia. On Thursday, September 3, 2015 at 3:17:38 PM UTC-4, Tero Frondelius

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

2015-09-03 Thread Tony Kelman
That's fair. Not being a Python library writer, I don't know what issues are preventing the likes of https://github.com/JuliaLang/pyjulia from being more widely used. I suspect that ease of installation is probably not the biggest factor keeping this from being a more common use case right now,

[julia-users] Advice on randomly partitioning a large dense array

2015-09-03 Thread Christof Stocker
I could use some advice on how to randomly partition large arrays into train and holdout set I am working on a machine learning related problem where I want to provide convenience methods to deal with large in-memory data sets (i.e. a large dense matrix |X| and a target vector |t|) In

[julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
On Thursday, September 3, 2015 at 11:22:09 AM UTC-4, cormu...@mac.com wrote: > > Early adopters shouldn't throw stones... :) But in fact I quite like the > new Dict syntax, which seems to be more explicit and readable. Curly braces > seem to be gainfully employed elsewhere doing type stuff.

[julia-users] Re: IDE for Julia

2015-09-03 Thread Oleg Mikulchenko
May be something wrong with messing up different versions of Julia and Python, agree. I have installed clean versions on Fedora 22 VM (Julia 0.4 only and Python 2.7 only) and it works fine, even at opening files from a menu. On the generic IDE side, I think, some mix of features of new

[julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
On Thursday, September 3, 2015 at 11:22:09 AM UTC-4, cormu...@mac.com wrote: > > Early adopters shouldn't throw stones... :) But in fact I quite like the > new Dict syntax, which seems to be more explicit and readable. Curly braces > seem to be gainfully employed elsewhere doing type stuff.

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
To me, the use of ; within [ ] seems pretty confusing. Elsewhere in Julia, it seems to mean, throw away the result, so I would have expected [1:10; ] to be equivalent to []. Why is [1:10;] (confusing, ; is not consistent with any other uses in Julia), preferred over [1:10...] (easy to

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Sean Marshallsay
[1:10;] is simply a consequence of matrix literal syntax (like [1:10; 11:20]) and gets translated into vcat(1:10). It might be a bit confusing but there's no point in making it a special case. On Thursday, 3 September 2015 17:28:27 UTC+1, Scott Jones wrote: > > To me, the use of ; within [ ]

RE: [julia-users] [ANN] ForwardDiff.jl v0.1.0 Released

2015-09-03 Thread David Anthoff
Congrats, this is truly great work! From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Jarrett Revels Sent: Thursday, September 3, 2015 1:25 PM To: julia-users Subject: [julia-users] [ANN] ForwardDiff.jl v0.1.0 Released I'm

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
Another use is marking off the keyword arguments or parameters. On Thursday, September 3, 2015 at 3:11:34 PM UTC-4, Jonathan Malmaud wrote: > > What are the other uses of ; in Julia? I can only think of suppressing > output on the REPL and separating expressions on a single line - neither >

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Michael Francis
That's really quite nice and for the purpose of interfacing with JSON is certainly clearer. On Thursday, September 3, 2015 at 4:40:54 PM UTC-4, Mike Innes wrote: > > FWIW I mocked up a json syntax macro: > > using MacroTools, Lazy > > import MacroTools: prewalk > > function prockey(key) >

[julia-users] julian style for assignments in a try block?

2015-09-03 Thread Spencer Russell
I often find myself wanting to do an assignment inside a try...catch block, as in the following real-world code I'm working on to read from a Channel until it's closed global outbox = Channel() @async while true    try        t, data = take!(outbox)    catch e        # InvalidStateException is

[julia-users] [ANN] ForwardDiff.jl v0.1.0 Released

2015-09-03 Thread Jarrett Revels
I'm proud to announce that we've tagged and released a new version ForwardDiff.jl (https://github.com/JuliaDiff/ForwardDiff.jl). ForwardDiff.jl is a package for performing automatic differentiation on native Julia functions/callable

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Mike Innes
FWIW I mocked up a json syntax macro: using MacroTools, Lazy import MacroTools: prewalk function prockey(key) @capture(key, (a_:b_) | (a_=>b_)) || error("Invalid json key $key") isa(a, Symbol) && (a = Expr(:quote, a)) :($a=>$b) end function procmap(d) @capture(d, {xs__}) || return d

Re: [julia-users] julian style for assignments in a try block?

2015-09-03 Thread Mike Innes
Would `t, data = try take!(outbox) catch ...` work? On Thu, 3 Sep 2015 at 22:08 Spencer Russell wrote: > I often find myself wanting to do an assignment inside a try...catch > block, as in the following real-world code I'm working on to read from a > Channel until it's

Re: [julia-users] julian style for assignments in a try block?

2015-09-03 Thread Spencer Russell
Ah yes. That works. Good idea, thanks for the tip. -s On Thu, Sep 3, 2015, at 05:12 PM, Mike Innes wrote: > Would `t, data = try take!(outbox) catch ...` work? > > On Thu, 3 Sep 2015 at 22:08 Spencer Russell wrote: >> __ >> I often find myself wanting to do an assignment

RE: [julia-users] 0.4 final push!

2015-09-03 Thread David Anthoff
Is that really the only thing keeping up a 0.4 RC, or are bugs that are being reported just not being tagged for a 0.4.0 release? If I look at the issue tracker, there are 86 open bugs. Not a single one of these is tagged for 0.4.0, and 74 of those are not assigned to any milestone. Have

Re: [julia-users] The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Adrian Cuthbertson
Yeah, like a toll-gate has been introduced and we're not sure what the tax is being spent on :) On Thu, Sep 3, 2015 at 2:39 AM, Marcio Sales wrote: > Made me remember the Mayor's decisions for new infrastructure in my city. > "Just why?" :) >

Re: [julia-users] Define functions in loop

2015-09-03 Thread Joshua Ballanco
Out of curiosity, why use `@eval` directly instead of defining a macro? (I’m just trying to get a better feel for what’s more Julian.) On September 2, 2015 at 12:44:39, Patrick Kofod Mogensen (patrick.mogen...@gmail.com) wrote: I'm in a train right now, but yes. Look up metaprogramming in the

Re: [julia-users] Define functions in loop

2015-09-03 Thread Patrick Kofod Mogensen
To be honest, I also thought the macro-style was preferred, if what you're doing is actually metaprogramming (like the @endpoint in the blog post). Here, I think a makefun-function as opposed to @makefun doesn't quite communicate the nature of makefun. Although, all of this can just be

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

2015-09-03 Thread Venkat Ramakrishnan
Thanks Steven. I guess since Julia projects itself as a better-performance language, it would be worthwhile to post the various performance benchmarks (text, math ops, i/o, etc) on its web-page on every major release as compared to its peer's current versions, if not done already which I am not

Re: [julia-users] Define functions in loop

2015-09-03 Thread Mauro
> Out of curiosity, why use `@eval` directly instead of defining a > macro? (I’m just trying to get a better feel for what’s more Julian.) Generally: Use eval when you want to generate code at a particular location. Conversely, macros are used if you want to provide a way for your users to

[julia-users] Re: Strange behaviour when adding floating numbers

2015-09-03 Thread Patrick Kofod Mogensen
There's a website which is there just to answer exactly that question : http://floating-point-gui.de/ On Thursday, September 3, 2015 at 9:45:18 AM UTC+2, Michael Borregaard wrote: > > Hi, > in the Julia documentation, I fell over this strange behaviour: > > julia> 1.1 + 0.1 > 1.2002

Re: [julia-users] Strange behaviour when adding floating numbers

2015-09-03 Thread Mauro
This has been discussed a few times before, have a search on the mailing list. Basically, this is how floats are implemented in the processor and and Julia uses them like that (as almost all other programming languages do). If that is a problem, then there are other number types. On Thu,

Re: [julia-users] Define functions in loop

2015-09-03 Thread Patrick Kofod Mogensen
Makes sense. So if you want to generate a lot of code in your package (similar functions or types for example), then you might loop over @eval's, but if you want your user to also add the same kind of functions, then you might prefer to make a macro and export that. On Thursday, September 3,

Re: [julia-users] Define functions in loop

2015-09-03 Thread Joshua Ballanco
Ok, makes sense. For what it’s worth (I’m very new at Julia, but have been using Lisp/Scheme/Clojure for a while now)… In Lisp/Clojure I think there’s a preference even for internal function definitions to use macros vs eval for the reason that macros modify the source at parse time, but eval

Re: [julia-users] Define functions in loop

2015-09-03 Thread Mauro
> Ok, makes sense. For what it’s worth (I’m very new at Julia, but have > been using Lisp/Scheme/Clojure for a while now)… In Lisp/Clojure I > think there’s a preference even for internal function definitions to > use macros vs eval for the reason that macros modify the source at > parse time, but

Re: [julia-users] The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Mauro
Easy now! If you want to know what is going on with the design of Julia and why certain decisions are made then you need to follow the development on github. As a first stop, the NEWS.md file is your friend: https://github.com/JuliaLang/julia/blob/master/NEWS.md which has some details on this.

[julia-users] Strange behaviour when adding floating numbers

2015-09-03 Thread Michael Borregaard
Hi, in the Julia documentation, I fell over this strange behaviour: julia> 1.1 + 0.1 1.2002 I understand that this may make sense in the context of how floating numbers are implemented inside Julia - but I cannot think of a single situation in which the user would want this

[julia-users] Re: Strange behaviour when adding floating numbers

2015-09-03 Thread Michael Borregaard
OK, thanks - the website is really useful. I come from R, where the result is presented as 1.2 – I guess Julia is more low-level in its interface. (BTW I did of course search the forums before posting, but most have missed the question). Den torsdag den 3. september 2015 kl. 09.45.18 UTC+2

[julia-users] Is it possible to constraint the type of a bits type parameter?

2015-09-03 Thread Cristóvão Duarte Sousa
(This was already asked in Julia Gitter, but I'm switching to the mailing list as this may better fit here than in a chat.) """ Is it possible to constraint the type of a bits type parameter? Something like f{N::Int}(x::SomeParamType{N}) where for N::Int I want to mean that N is an instance of

Re: [julia-users] Is it possible to constraint the type of a bits type parameter?

2015-09-03 Thread Mauro
The short answer is: no. There is an issue on github, I think. Or at least an issue in which this was discussed. If I remember correctly it is a desired feature but with no time plan for an implementation. On Thu, 2015-09-03 at 11:38, Cristóvão Duarte Sousa wrote: > (This

Re: [julia-users] Re: Strange behaviour when adding floating numbers

2015-09-03 Thread Tamas Papp
R is not "more low-level", it just has a different default setting for how many digits to display. Try (in R): > options(digits=22) > 1.1+0.1 [1] 1.200177636 Cf in Julia (note we ask for 21 digits after the decimal dot, because of the leading 1.): julia> @sprintf("%.21f",1.1+0.1)

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

2015-09-03 Thread Tim Holy
Most stuff gets done by people who need it. If this is important to you but doesn't exist, your best bet is to do it yourself and contribute it to the project. I bet there would be interest in adding your benchmarks somewhere accessible from the web page. Best, --Tim On Thursday, September

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

2015-09-03 Thread Leonardo Taccari
Great job! By the way, what's the deal with the *official* switch to Julia 0.4? Is it going to happen soon? I'm not really following the development of the language, and I don't even know what's going to change. I hope it won't break too many things. :-) Il giorno martedì 1 settembre 2015

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

2015-09-03 Thread Venkat Ramakrishnan
No offense, but, the informal model of 'most stuff gets done by people who need it' leads to outdated information in external websites, as Steven had pointed out. I don't see why it would be any different if I do it (or) someone else does it in an external site and puts the link in the julia

Re: [julia-users] 0.4 final push!

2015-09-03 Thread Steven G. Johnson
Bugs that aren't regressions shouldn't hold up the release. It would be useful to go through the list of issues marked "bug" and mark those which work fine in 0.3 with the "regression" tag. I've gone through a couple dozen of the recent bug reports, and so far I haven't found any clear-cut

Re: [julia-users] 0.4 final push!

2015-09-03 Thread Scott Jones
Yes, but bugs in new features (such as the new documentation system) can (esp. when it is something that replaces older functionality in a different fashion). On Thursday, September 3, 2015 at 7:33:48 PM UTC-4, Steven G. Johnson wrote: > > Bugs that aren't regressions shouldn't hold up the

RE: [julia-users] 0.4 final push!

2015-09-03 Thread David Anthoff
Great, and thanks! From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Steven G. Johnson Sent: Thursday, September 3, 2015 4:34 PM To: julia-users Subject: Re: [julia-users] 0.4 final push! Bugs that aren't regressions

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
I must say, that's beautiful! I hope I can figure out just how it is doing it's magic, as I didn't think macros could change the way things like { } and : were handled.  On Thursday, September 3, 2015 at 4:40:54 PM UTC-4, Mike Innes wrote: > > FWIW I mocked up a json syntax macro: > > using

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Jeffrey Sarnoff
tip o' hat to that this minor edit, omitting {Any,Any} (following Jeff B's note) gives back some autotyping function procmap(d) @capture(d, {xs__}) || return d :(Dict($(map(prockey, xs)...))) end On Thursday, September 3, 2015 at 4:40:54 PM UTC-4, Mike Innes wrote:

Re: [julia-users] julian style for assignments in a try block?

2015-09-03 Thread Spencer Lyon
Another one would be to call local t, data just before the try block, though I like Matt’s better. On Thursday, September 3, 2015 at 5:21:31 PM UTC-4, Spencer Russell wrote: Ah yes. That works. Good idea, thanks for the tip. > > -s > > > On Thu, Sep 3, 2015, at 05:12 PM, Mike Innes

[julia-users] Re: julian style for assignments in a try block?

2015-09-03 Thread Matt Bauman
Here's one option: use the value of the whole try-block. This is particularly nice in cases where you have some substitute for `(t, data)` (or whatever) that you'd like to use when an exception is thrown. This way you can simply have the last statement of the catch block give the substitute.

[julia-users] How to use Apache Spark from Julia

2015-09-03 Thread Deb Midya
Hi, Thanks in advance. I am using Julia 0.3.7 on Windows 8. I am exploring the possibility of using Spark in Julia. If yes, how can I install Spark on Windows and how to use it from Julia? Once again, thank you very much for the time you have given. Regards, Deb

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

2015-09-03 Thread Miles Lubin
Hi Geoff, Very interesting work. I think it's fair to say that the current approach for modular models in JuMP is pretty ad hoc. The goal was develop a modeling system that's similar enough to what people are used to as opposed to putting forward a new philosophy for writing down and composing

Re: [julia-users] The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Scott Jones
Yes, I’d say Dicts (AKA associative arrays) need to absolutely be a first class data structure in Julia, with appropriate easy to understand and use syntax. This seems like a huge step backwards, already the ‘=>’ syntax makes it a lot clumsier than in most other popular modern languages.

[julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Matt Bauman
Oh man that's tricky. The trouble is that you're effectively saying `Pair{Symbol,Int}[1]`, which is the syntax for a typed array: Pair{Symbol,Int}[:x=>1, :y=>2]. One way around this is to define: keytype{A,B}(::Type{Pair{A,B}}) = A valuetype{A,B}(::Type{Pair{A,B}}) = B

[julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Michael Francis
In the short term I have defined the following in the offending package for v0.4 only function keytype( dict ) return eltype( dict ).parameters[1] end I agree that a standard protocol of accessing the key and value types of a pair / associative is the way to go. On Thursday, September 3,

[julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-03 Thread Jonathan Malmaud
I agree that syntactic sugar for Dict literal construction would be appreciated. There were good reasons for removing the previous syntax, but I think it should be possible to find something more terse than the status quo. On Wednesday, September 2, 2015 at 12:45:08 PM UTC-4, Michael Francis

[julia-users] v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Michael Francis
julia> eltype( Dict( :x => 1, :y => 2 ) )[1] ERROR: MethodError: `convert` has no method matching convert(::Type{Pair{ Symbol,Int64}}, ::Int64) This may have arisen from a call to the constructor Pair{Symbol,Int64}(...), since type constructors fall back to convert methods. Closest candidates are:

[julia-users] Re: v0.4 - Pair does not behave like a Tuple

2015-09-03 Thread Michael Francis
Incidentally eltype( Pair{String,Float64} ) gives Any, that seems slightly strange as well . On Thursday, September 3, 2015 at 9:02:33 AM UTC-4, Michael Francis wrote: > > julia> eltype( Dict( :x => 1, :y => 2 ) )[1] > ERROR: MethodError: `convert` has no method matching convert(::Type{Pair{ >

[julia-users] Re: Differences between @async and @schedule?

2015-09-03 Thread Steven G. Johnson
On Thursday, September 3, 2015 at 1:48:33 AM UTC-4, Spencer Russell wrote: > > From the docs I gather that `@schedule operation()` is equivalent to > `schedule(@task operation())`, In that `operation()` will be wrapped in a > task and added as a runnable item in the scheduler queue. > >

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

2015-09-03 Thread Steven G. Johnson
There is a plan going forward to have more automated performance benchmarking linked to git, especially so that performance improvements (or regressions) can be quantified as they happen. The hardware has been ordered, but it will take a while to get this kind of automation up and running.