[julia-users] Re: How do I maximize a function ?

2016-11-18 Thread John Myles White
Pkg.add("Optim") then using Optim and follow this section of the docs: http://www.juliaopt.org/Optim.jl/stable/user/minimization/#minimizing-a-univariate-function --John On Friday, November 18, 2016 at 7:29:28 PM UTC-8, Pranav Bhat wrote: > > How do I obtain the maximum value of a functio

Re: [julia-users] Recursive data structures with Julia

2016-10-30 Thread John Myles White
Working with non-concrete types is often a problem for performance, so this approach may not be very efficient compared with alternatives that are more careful about the use of concrete types. --John On Sunday, October 30, 2016 at 6:27:47 PM UTC-7, Ralph Smith wrote: > > Conversion is done by

[julia-users] Re: Julia and the Tower of Babel

2016-10-07 Thread John Myles White
I don't really see how you can solve this without a single dictator who controls the package ecosystem. I'm not enough of an expert in Python to say how well things work there, but the R ecosystem is vastly less organized than the Julia ecosystem. Insofar as it's getting better, it's because th

Re: [julia-users] Is there a way to use values in a DataFrame directly in computation?

2016-10-03 Thread John Myles White
I think the core problem is that the current API + Nullable's is very cumbersome, but the switch to Nullable's will hopefully occur nearly simultaneously with the introduction of new API's that can make Nullable's much easier to deal with. David Gold spent the summer working on one approach tha

[julia-users] Re: No operator overloading in DataFrames.jl?

2016-09-25 Thread John Myles White
Yes, this absence is intentional. This operation is far too magical. -- John On Sunday, September 25, 2016 at 7:49:27 PM UTC+2, nuffe wrote: > > The ability to add, subtract (etc) dataframes with automatic index > alignment is one of the great features with Pandas. Currently this is not > impl

[julia-users] Re: whole arrays pass by reference while matrix columns by value?

2016-09-07 Thread John Myles White
Everything is pass by sharing. But array indexing by slices creates copies. 0.5 has better support for creating views. --John On Wednesday, September 7, 2016 at 5:00:00 PM UTC-7, Alexandros Fakos wrote: > > Hi, > > a=rand(10,2) > b=rand(10) > sort!(b) modifies b > but sort!(a[:,1]) does not mod

Re: [julia-users] Is the master algorithm on the roadmap?

2016-09-02 Thread John Myles White
> > May I also point out to the My settings button on your top right corner > > My topic email subscriptions > Unsubscribe from this thread, which would've > spared you the message. I'm sorry, but this kind of attitude is totally unacceptable, Kevin. I've tolerated your misuse of the mailing

[julia-users] Re: Distributions.jl : generating samples from stable distributions

2016-08-19 Thread John Myles White
Unfortunately the R package is GPL, so we can't use it as a template for a Julia implementation. But RCall will let you call that package from Julia to get draws from those distributions, so you should be able to do what you suggested pretty easily. --John On Friday, August 19, 2016 at 1:44:06

[julia-users] Re: Distributions.jl : generating samples from stable distributions

2016-08-19 Thread John Myles White
This is extremely difficult to do right, which is why we don't support it yet. --John On Friday, August 19, 2016 at 9:26:19 AM UTC-7, Mirmu wrote: > > I am looking for generating samples from the stable Levy family with > Distributions.jl, but I cannot find it. > https://en.wikipedia.org/wiki/S

[julia-users] Re: object properties variable

2016-08-15 Thread John Myles White
getfield(foo, :bar) You can iterate over the fieldnames(foo) to print things. I would avoid a potentially wasteful conversion to a dictionary since it doesn't buy you anything in terms of expressive power. --John On Monday, August 15, 2016 at 8:38:04 PM UTC-7, Lewis Lehe wrote: > > Hi I was

[julia-users] Re: How to make a variable length tuple with inferred type

2016-08-02 Thread John Myles White
This example should clarify where you're confused: julia> typeof(ntuple(x -> 1, 1)) Tuple{Int64} julia> typeof(ntuple(x -> 1, 2)) Tuple{Int64,Int64} On Tuesday, August 2, 2016 at 2:34:27 PM UTC-5, mmh wrote: > > Care to explain in more depth? If the function is type stable i.e. it > retu

[julia-users] Re: A story on unchecked integer operations

2016-07-13 Thread John Myles White
This seems more like a use case for static analysis that checked operations to me. The problem IIUC isn't about the usage of high-performance code that is unsafe, but rather that the system was nominally tested, but tested in an imperfect way that didn't cover the failure cases. If you were rewr

Re: [julia-users] When Julia v1.0 will be released?

2016-07-07 Thread John Myles White
> > For industry, it probably means something similar. I really hope people in industry won't act on this date, as it is not nearly firm enough to bet a business on. We already have people writing blog posts about how using Julia for their startup turned out to be a mistake; we really don't n

[julia-users] Re: A naive benchmark

2016-07-01 Thread John Myles White
See the top of http://docs.julialang.org/en/release-0.4/manual/performance-tips/ On Friday, July 1, 2016 at 7:16:10 AM UTC-7, baillot maxime wrote: > > Hello everyone, > > I am working on a Julia code which is a brutal copy of a Matlab code and > found out that the Julia code is slower. > >

[julia-users] Re: Is passing a function as an argument discouraged?

2016-06-17 Thread John Myles White
Specialization of higher-order functions should be much improved in Julia 0.5. On Friday, June 17, 2016 at 1:10:24 PM UTC-7, Douglas Bates wrote: > > I am writing a simulation function that loops over simulating a data set > and fitting multiple statistical models to the data. The exact form of

[julia-users] Re: parse.(Int64, x)

2016-06-15 Thread John Myles White
I would be careful combining element-wise function application with partial function application. Why not use map instead? On Wednesday, June 15, 2016 at 3:47:05 PM UTC-7, David Anthoff wrote: > > I just tried to use the new dot syntax for vectorising function calls in > order to convert an arra

[julia-users] Re: Dirichlet distribution estimation ported/written in Julia?

2016-04-30 Thread John Myles White
The Lightspeed license is a little weird if I remember correctly, but it would good to get fitting procedures if we're missing them. Not sure we even have a Polya distribution right now. On Saturday, April 30, 2016 at 7:32:16 AM UTC-7, Artem OBOTUROV wrote: > > Hi > > I would like to ask if some

[julia-users] Re: enforcing homogeneity of vector elements in function signature

2016-04-04 Thread John Myles White
Vector{Foo{T}}? On Monday, April 4, 2016 at 1:25:46 PM UTC-7, Davide Lasagna wrote: > > Hi all, > > Consider the following example code > > type Foo{T, N} > a::NTuple{N, T} > end > > function make_Foos(M) > fs = Foo{Float64}[] > for i = 1:M > N = rand(1:2) > f = Foo{Fl

[julia-users] Re: What to read to understand finishing v0.5?

2016-03-09 Thread John Myles White
I think it's fair to say that the reason your questions aren't already answered by GitHub is because there's no one who's made an executive decision about the answers to those questions. -- John On Wednesday, March 9, 2016 at 4:44:28 AM UTC-8, Andreas Lobinger wrote: > > Hello colleagues, > >

[julia-users] Re: Array slices and functions that modify inputs.

2016-03-07 Thread John Myles White
Array indexing produces a brand new array that has literally no relationship with the source array. -- John On Monday, March 7, 2016 at 5:21:34 PM UTC-8, Daniel Carrera wrote: > > Hello, > > Some Julia functions act on their inputs. For example: > > julia> vals = [6,5,4,3] > 4-element Array{Int

[julia-users] Re: Incomplete parametric types

2016-03-04 Thread John Myles White
Is this what you want? julia> abstract ABC julia> type A <: ABC end julia> type B <: ABC end julia> julia> type TestType{T <:ABC} a::Float64 b::T TestType(a::Float64) = new(a) end julia> myT = TestType{A}(4.0)

[julia-users] Re: Precision problem in matrix inversion (for ridge regression)?

2016-03-01 Thread John Myles White
Compare and contrast the following: inv(map(Float32, Z'*Z))*(Z'*ys_dataset) inv(map(Float64, Z'*Z))*(Z'*ys_dataset) -- John On Tuesday, March 1, 2016 at 4:19:19 PM UTC-8, Francisco C Pereira wrote: > > Hi, > > I deeply apologize in advance if this is a repeated question... the > questio

[julia-users] Re: Loading a module without loading its submodules

2016-02-24 Thread John Myles White
I don't think Julia is really amenable to this kind of organization because Julia's modules have no logical relationship to filesystem layouts, whereas Python's system is all about filesystem layout and has nothing to do with textual inclusion. On Wednesday, February 24, 2016 at 1:28:08 PM UTC-

[julia-users] Re: Spped, assigning arrays

2015-08-24 Thread John Myles White
You'll want to study http://julialang.org/blog/2013/09/fast-numeric/ to figure out how to make your code faster. On Monday, August 24, 2015 at 10:31:56 AM UTC-7, Mohamed Moussa wrote: > > Hey. I'm new to Julia. I'm playing around with 0.4 on Windows. I'm > interested in writing finite element co

[julia-users] Re: Splitting a multidimensional function

2015-08-19 Thread John Myles White
Since f1(x) requires a call to f(x), there's no way for your approach to work in Julia. You probably should define f1(x) as sqrt(x[1]) and f2(x) as 2 * x[2]. -- John On Wednesday, August 19, 2015 at 2:32:38 PM UTC-7, Nikolay Kryukov wrote: > > I have a problem when I try to separate the compon

[julia-users] Re: Package description on pkg.julialang.org

2015-08-13 Thread John Myles White
Keyan, Don't worry about pkg.julialang.org. It's only updated once-a-week because it's not the definitive package listing. The listing that has day-to-day importance to user experience is the listing on METADATA.jl and the content of your package's README. Worry about those and just ignore any

[julia-users] Re: New variables overwrite old variables in certain cases.

2015-07-25 Thread John Myles White
http://www.johnmyleswhite.com/notebook/2014/09/06/values-vs-bindings-the-map-is-not-the-territory/ On Saturday, July 25, 2015 at 8:13:33 AM UTC-7, Christopher Fisher wrote: > > I am writing a program (in .3.1) that takes a one dimensional array of > indices (x) and creates a new one dimensional a

Re: [julia-users] Deducing probability density functions from model equations

2015-07-21 Thread John Myles White
There's tons of WIP-code that implements arithmetic on Distributions. No one has the time to finish that code or volunteer to maintain it, so it's just sitting in limbo. OP: What you're asking for sounds like it's largely equivalent to probabilistic programming. There are a ton of ways you coul

[julia-users] Re: eig()/eigfact() performance: Julia vs. MATLAB

2015-07-12 Thread John Myles White
http://julia.readthedocs.org/en/release-0.3/manual/performance-tips/ On Sunday, July 12, 2015 at 8:33:56 PM UTC+2, Evgeni Bezus wrote: > > Hi all, > > I am a Julia novice and I am considering it as a potential alternative to > MATLAB. > My field is computational nanophotonics and the main numeric

[julia-users] Re: Too many packages?

2015-07-11 Thread John Myles White
I think most of have the opposite desire: we're trying to move more functionality out of the core language and into packages. -- John On Sunday, July 12, 2015 at 3:03:31 AM UTC+2, Burak Budanur wrote: > > I heard a lot about Julia language over the last year and last week > had a conversation

Re: [julia-users] Re: Environment reification and lazy evaluation

2015-07-09 Thread John Myles White
ch it >>>>> >>> to. Unless I'm missing something? >>>>> >>> >>>>> >>> On Wednesday, July 8, 2015 at 7:26:27 PM UTC-4, Jameson wrote: >>>>> >>>> >>>>> >>>> There

Re: [julia-users] Re: Environment reification and lazy evaluation

2015-07-08 Thread John Myles White
Reified scope makes static analysis much too hard. Take any criticism of mutable state: they all apply to globally mutable symbol tables. On Wednesday, July 8, 2015 at 10:26:23 PM UTC+2, Milan Bouchet-Valat wrote: > > Le mercredi 08 juillet 2015 à 13:20 -0700, Brandon Taylor a écrit : > > All fu

Re: [julia-users] Converting a string to a custom type results in a function that is not type stable

2015-06-24 Thread John Myles White
Excited you're working on dependent data bootstraps. I implemented one just the other day since it could be useful for analyzing benchmark data. Would be great to have other methods to do out. -- John On Wednesday, June 24, 2015 at 5:31:52 AM UTC-4, Milan Bouchet-Valat wrote: > > Le mercredi 2

[julia-users] Re: Using composite types with many fields

2015-06-20 Thread John Myles White
It sounds like you might be better off working with Dict's instead of types. -- John On Saturday, June 20, 2015 at 12:43:03 PM UTC-7, Stef Kynaston wrote: > > I feel I am missing a simpler approach to replicating the behaviour of a > Matlab structure. I am doing FEM, and require structure like

[julia-users] Re: Distributions.jl: why use Float64 over Real when defining the functions

2015-06-19 Thread John Myles White
For many of the numerical methods in that package, people weren't sure if the code in question would generate reasonable results for other types. Some of it probably does, but it's not trivially true that evaluating those distribution on high-precision floats would produce correct results. On F

[julia-users] Re: Plans for "Linear Algebra"

2015-06-19 Thread John Myles White
Could you elaborate? What exactly is lacking? On Friday, June 19, 2015 at 6:32:36 AM UTC-7, cuneyts...@gmail.com wrote: > > Dear all, > > Considering that Julia is designed to be a scientific programming > language, its built-in Linear Algebra capabilities seems to be limited > (based on the use

[julia-users] Re: Multivariate optimization with bounds

2015-06-18 Thread John Myles White
Try NLopt. -- John On Thursday, June 18, 2015 at 8:35:20 AM UTC-7, Nils Gudat wrote: > > I'm trying to minimize a function of multiple variables using the Optim > package. In my original Matlab code, I'm supplying two arrays to fmincon to > set upper and lower bounds on each of the variables,

[julia-users] Re: good time to start to learn julia?

2015-06-18 Thread John Myles White
ulia has a specific package that R provides. But then it's > good to know whether the fundamentals like basic visualization and > optimization functions are mature or not. > > On Thursday, June 18, 2015 at 10:57:08 AM UTC-4, John Myles White wrote: >> >> My answer to thes

[julia-users] Re: good time to start to learn julia?

2015-06-18 Thread John Myles White
My answer to these questions is always the same these days: if you're not sure that you have enough expertise to determine Julia's value for yourself, then you should be cautious and stick to playing around with Julia rather than trying to jump onboard wholesale. Julia is a wonderful language a

Re: [julia-users] Re: Atom package

2015-06-12 Thread John Myles White
Should be set now. There's only an empty repo there right now at https://github.com/JuliaLang/atom-language-julia On Friday, June 12, 2015 at 2:39:29 PM UTC-7, John Myles White wrote: > > I can create a repo. > > On Friday, June 12, 2015 at 12:04:09 PM UTC-7, Spencer Lyon

Re: [julia-users] Re: Atom package

2015-06-12 Thread John Myles White
I can create a repo. On Friday, June 12, 2015 at 12:04:09 PM UTC-7, Spencer Lyon wrote: > > John, > > Do you have create permissions within the JuliaLang github org? > > If not, who should we contact to create the repo/set up permissions? > > I guess I could just request that my repo be transf

[julia-users] Re: Atom package

2015-06-11 Thread John Myles White
Looking into this more, it looks like the repo can have any name you want. The important thing is that the package is named language-julia, not the repo. On Thursday, June 11, 2015 at 8:05:20 PM UTC-7, Spencer Lyon wrote: > > Good to see something for atom-language-julia. That is what the packag

[julia-users] Re: Atom package

2015-06-10 Thread John Myles White
It is a very strong convention, though. -- John On Wednesday, June 10, 2015 at 1:52:01 PM UTC-7, Spencer Lyon wrote: > > Definitely not a requirement, just convention. > > If there are other proposals out there I'm happy to entertain them. > > On Wednesday, June 10, 2015 at 1:51:07 PM UTC-7, Ton

[julia-users] Re: Atom package

2015-06-10 Thread John Myles White
I would love it if you followed up on those proposed changes. -- John On Wednesday, June 10, 2015 at 10:33:45 AM UTC-7, Spencer Lyon wrote: > > Right now the atom package for adding syntax highlighting for Julia is > https://github.com/tpoisot/language-julia > > Based on issues like this one (

[julia-users] Re: a simple function which changes the order of a vector (by modifying the argument)

2015-06-08 Thread John Myles White
http://julia.readthedocs.org/en/release-0.3/manual/faq/#i-passed-an-argument-x-to-a-function-modified-it-inside-that-function-but-on-the-outside-the-variable-x-is-still-unchanged-why http://www.johnmyleswhite.com/notebook/2014/09/06/values-vs-bindings-the-map-is-not-the-territory/ On Monday, June

[julia-users] Re: Writing a mutable function (exclamation mark function)

2015-06-08 Thread John Myles White
http://julia.readthedocs.org/en/release-0.3/manual/faq/#i-passed-an-argument-x-to-a-function-modified-it-inside-that-function-but-on-the-outside-the-variable-x-is-still-unchanged-why http://www.johnmyleswhite.com/notebook/2014/09/06/values-vs-bindings-the-map-is-not-the-territory/ On Monday, June

[julia-users] Re: Anonymous Objects?

2015-06-04 Thread John Myles White
https://groups.google.com/forum/#!topic/julia-users/HYhm0A8KQXw On Thursday, June 4, 2015 at 2:02:51 PM UTC-7, David Gold wrote: > > What is A*b? Is it just a formal "multiplication"? > > On Thursday, June 4, 2015 at 4:54:39 PM UTC-4, Gabriel Goh wrote: >> >> Do there exist anonymous objects, in t

[julia-users] Re: [Slightly OT] Creating JuliaCon presentation slides as a Jupyter notebook

2015-06-04 Thread John Myles White
A long time ago, I did this with IJulia: https://github.com/johnmyleswhite/UCDavis.jl Hopefully most of my approach isn't relevant anymore, since I hit a couple of bugs in the resulting slides that I had to fix with a Ruby script. -- John On Thursday, June 4, 2015 at 7:49:15 AM UTC-7, Douglas

Re: [julia-users] Interop with C on an array of mutable structs

2015-06-02 Thread John Myles White
ay referred to is of type `MYSQL_BIND[]`, in > which case John is correct that declaring this as `Vector{MYSQL_BIND}` > (where `MYSQL_BIND` is an appropriated defined isbits type) should work > exactly as desired. > > On Tue, Jun 2, 2015 at 11:09 AM John Myles White > wrote:

[julia-users] Interop with C on an array of mutable structs

2015-06-02 Thread John Myles White
I've been fixing up the MySQL.jl package recently. To receive data on the client-side from prepared statements, I need to pass around an array of mutable structs, defined in MySQL C's API, so that C can populate those structs with data from the server. If helpful, an example of how this works i

[julia-users] Re: Does union() imply worse performance?

2015-05-30 Thread John Myles White
0, 2015 at 12:23:09 PM UTC-4, John Myles White wrote: >> >> David, >> >> To clarify your understanding of what's wrong with DataArrays, check out >> the DataArray code for something like getindex(): >> https://github.com/JuliaStats/DataArrays.jl/blob/mast

[julia-users] Re: Does union() imply worse performance?

2015-05-30 Thread John Myles White
David, To clarify your understanding of what's wrong with DataArrays, check out the DataArray code for something like getindex(): https://github.com/JuliaStats/DataArrays.jl/blob/master/src/indexing.jl#L109 I don't have a full understanding of Julia's type inference system, but here's my best

Re: [julia-users] Re: Maybe, Nullable, etc

2015-05-29 Thread John Myles White
Nullable is Julia's closest equivalent to Haskell's Maybe. But there are important differences: * Presently run-time dispatch through even a very restricted subset of types is quite costly. So you want to make sure that all code allows type inference to assign a concrete type to every value. Nu

Re: [julia-users] Re: Maybe, Nullable, etc

2015-05-29 Thread John Myles White
To reinforce Yichao's point, using Nullables in the way you propose comes with substantial performance risks. The problem is that your strategy globally poisons type inference: type-uncertain functions don't just force run-time dispatch near the location of their function calls, they also force

[julia-users] Re: IDE Julia

2015-05-20 Thread John Myles White
En general, escribimos en ingles en esta lista. Has probado Juno? -- John On Wednesday, May 20, 2015 at 3:33:08 PM UTC-7, perico garcia wrote: > > IDE Julia como cuando Anaconda o Spyder ?? Sería el factor determinante > para la expansión del lenguaje de programación. >

Re: [julia-users] Packing and Unpacking several Matrixes into flat vectors

2015-05-14 Thread John Myles White
In the long-term, the best way to do this will be to use SubArray and ReshapeArray. You'll allocate enough space for all parameters, then unpack them into separate objects when that helps. -- John On Thursday, May 14, 2015 at 2:03:27 AM UTC-7, Tim Holy wrote: > > Some Optim algorithms, like cg

[julia-users] Re: Comparisons Two Same Code in Julia But some difference results

2015-05-01 Thread John Myles White
Re. perf changes: there was a regression since 2013. There's an issue here: https://github.com/JuliaLang/julia/issues/9942 -- John On Friday, May 1, 2015 at 12:10:37 PM UTC-7, Kenan KARAGÜL wrote: > > Hi everybody, > > I read an article "Writing Type-Stable Code in

Re: [julia-users] Yet Another String Concatenation Thread (was: Re: Naming convention)

2015-04-29 Thread John Myles White
s we need haven't been written yet. So, please, let's officially stop all discussion on this thread. -- John On Wednesday, April 29, 2015 at 7:52:17 AM UTC-7, François Fayard wrote: > > On Wednesday, April 29, 2015 at 1:58:07 AM UTC+2, John Myles White wrote: >> >> Le

Re: [julia-users] Yet Another String Concatenation Thread (was: Re: Naming convention)

2015-04-28 Thread John Myles White
I think it's time for this thread to stop. People are already upset and things could easily get much worse. Let's all go back to our core work: writing packages, building infrastructure and improving Base Julia's functionality. We can discuss naming conventions when we've got the functionality

[julia-users] Re: Confused about parametrization type

2015-03-05 Thread John Myles White
Here's my perspective: * You should almost never define any type that has fields that aren't concrete types. You can achieve this in two ways: by hard-coding concrete types or by using parametric types. * You should generally avoid allocating new arrays. This means that, if your type ultimatel

[julia-users] Re: Issues with optimize in Julia

2015-02-15 Thread John Myles White
Here's my two, not very thorough, cents: (1) The odds of a bug in Optim.jl are very high (>90%). (2) The odds of a bug in your code are very high (>90%). It's pretty easy to make a decision about (2). Deciding on (1) is a lot harder, since you need a specific optimization that Optim should solve

[julia-users] Re: ANN: StreamStats.jl

2015-02-09 Thread John Myles White
I have seen t-digest. I"ll try to implement it after getting q-digest working and then try comparing them. -- John On Monday, February 9, 2015 at 4:48:42 AM UTC-8, Stephen Lien wrote: > > Have you seen t-digest ? Per the > link: it handles doubles, uses l

[julia-users] ANN: StreamStats.jl

2015-02-07 Thread John Myles White
I've been doing a lot of streaming data analysis in Julia lately, so I finally put together a package with some core functionality for working with data streams: https://github.com/johnmyleswhite/StreamStats.jl My hope is that the community can help refine the design over time. After it's sett

Re: [julia-users] Julia modifies variable outside of function when operating on different variable inside of function

2014-12-26 Thread John Myles White
This is aliasing. Almost all languages allow this. -- John Sent from my iPhone > On Dec 26, 2014, at 2:49 PM, Bradley Setzler > wrote: > > Hi, > > I cannot explain this behavior. I apply a function to a variable in the > workspace, the function initializes its local variable at the workspa

Re: [julia-users] compilation problem on OS X for v0.4

2014-12-26 Thread John Myles White
No worries. Adding a cmake dependency is a big change for Julia. -- John On Dec 26, 2014, at 2:13 PM, Ethan Anderes wrote: > Thanks John. I guess that was obvious from the error message. Sorry for the > noise. > > --Ethan > > On Friday, December 26, 2014 11:09:04 AM UTC-8

Re: [julia-users] compilation problem on OS X for v0.4

2014-12-26 Thread John Myles White
You need to install cmake and make it available on your path: http://www.cmake.org/download/ -- John On Dec 26, 2014, at 2:07 PM, Ethan Anderes wrote: > Hi Everyone: > > I just decided to upgrade to Julia v0.4 and ran into the following error when > trying to compile from source (I’m runnin

Re: [julia-users] Re: list of unregistered (experimental) packages

2014-12-22 Thread John Myles White
It would be really easy to run a GitHub page that is literally a list of URL’s for unofficial packages and which receives edits via GitHub pull requests. — John > On Dec 22, 2014, at 12:03 PM, Stefan Karpinski wrote: > > To me the main benefit of having a list of non-packages would be that we

Re: [julia-users] Julia compatibility between versions

2014-12-20 Thread John Myles White
Julia is a _lot_ less mature than Fortran or Python. Between Julia 0.3 and Julia 1.0 I am pretty sure there will changes as substantial as the Python 2 and Python 3 changes. We've tried to provide deprecation periods for changes, but there's going to be more changes than in Fortran. -- John O

Re: [julia-users] any clarification of bytes allocated in @time?

2014-12-19 Thread John Myles White
The problem is that your let block is not a proper function body. You need to time things inside of a function body: julia> function foo() @time a1 = zeros(Int64,1000) @time resize!(a1, 1000) @time resize!(a1, 1000) @time resize!(a1,

Re: [julia-users] any clarification of bytes allocated in @time?

2014-12-19 Thread John Myles White
Are you timing things in the global scope? -- John On Dec 19, 2014, at 1:00 PM, John Drummond wrote: > For the following code (julia 0.3.3 in windows 7 ) I don't understand what > the bytes allocated in @time means > > All I'm doing each time is adding 10 8 byte integers > > Thanks for any

Re: [julia-users] Re: Global variables

2014-12-18 Thread John Myles White
This should get you started: http://c2.com/cgi/wiki?GlobalVariablesAreBad -- John On Dec 18, 2014, at 7:36 PM, Greg Plowman wrote: > I realise my original question should have been more specific and not digress > about implementing fast globals. > > Please bear with me as I'm relatively new

Re: [julia-users] Package development - best practices

2014-12-17 Thread John Myles White
I also develop in .julia, but it's possible to use any directory as your package directory. The manual should have some sections that describe how to configure an alternative to .julia. -- John On Dec 17, 2014, at 8:15 PM, Keno Fischer wrote: > Personally, I do develop my packages inside .ju

Re: [julia-users] Re: overview questions about new doc changes (coming with v 0.4)

2014-12-17 Thread John Myles White
This debate seems a little premature to me since the definition of @doc is not totally finished yet and we need to finalize that before anyone should be adding documentation to 0.3 packages. -- John On Dec 17, 2014, at 3:15 PM, Seth wrote: > +1. Please reconsider making a @doc (at least a NO

Re: [julia-users] How do I turn a string into a variable

2014-12-17 Thread John Myles White
It's easy to write a macro that takes a static literal string and makes a variable out of it. It's much harder (maybe impossible) to write a macro that takes in a variable that happens to be bound to a string value and to make a variable out of the value you happen to have stored in that variab

Re: [julia-users] Value types

2014-12-16 Thread John Myles White
") > > foo(Sentinel{:Case1}) > foo(Sentinel{:Case2}) > > works as expected. > > Thanks again > > Luca > > On Tuesday, December 16, 2014 6:57:58 PM UTC+1, John Myles White wrote: > I should probably point out that the type parameters being immutable

Re: [julia-users] Value types

2014-12-16 Thread John Myles White
I should probably point out that the type parameters being immutable is not quite right: the restriction is "any bits types", which you can assess using the isbits() function on a type's name. You can find more information here: https://github.com/JuliaLang/julia/issues/6081 -- John On Dec 16

Re: [julia-users] Value types

2014-12-16 Thread John Myles White
The trouble is that values aren't usually know at compile time, which is why dispatching on them doesn't work well. When values of immutables can be known at compile time, something like your proposal does work. For example, you can do this: immutable Sentinel{S} end foo(::Type{Sentinel{:Case1

Re: [julia-users] Re: How can I sort Dict efficiently?

2014-12-16 Thread John Myles White
If you want to retain N words, perhaps a priority queue would be useful? http://julia.readthedocs.org/en/latest/stdlib/collections/#priorityqueue I'd be cautious about drawing many coding lessons from the TextAnalysis package, which has been never been optimized for performance. -- John On De

Re: [julia-users] Suspending Garbage Collection for Performance...good idea or bad idea?

2014-12-15 Thread John Myles White
This is taking the thread off-topic, but conceptually such things are possible. But Rust has a very different set of semantics for memory ownership than Julia has and is doing a lot more analysis at compile-time than Julia is doing. So Julia would need to change a lot to be more like Rust. I've

Re: [julia-users] how to test NaN in an array?

2014-12-15 Thread John Myles White
You need to check isnan() per element. NaN == NaN is false, so in() fails on NaN right now. -- John On Dec 15, 2014, at 3:33 PM, Evan Pu wrote: > 1 in [1,2,3] # returns true > > NaN in [NaN, 1.0, 2.0] # returns false > > how do I test if a float64 NaN is present in an array? I'm doing some

Re: [julia-users] What is the use of J[:,:] = K*M please?

2014-12-14 Thread John Myles White
Assigning in-place and creating temporaries are actually totally orthogonal. One is concerned with mutating J. This is contrasted with writing, J = K * M The other is concerned with the way that K * M gets computed before any assignment operation or mutation can occur. This is contrasted with s

[julia-users] Re: [WIP] CSVReaders.jl

2014-12-14 Thread John Myles White
emory) and the tests have been elaborated enough that I'm comfortable saying that most non-pathological files will be read correctly. -- John On Dec 8, 2014, at 12:35 AM, John Myles White wrote: > Over the last month or so, I've been slowly working on a new library that > def

Re: [julia-users] [WIP] CSVReaders.jl

2014-12-14 Thread John Myles White
2014 1:29:46 PM UTC-5, Tim Holy wrote: > Right, indeed I meant to suggest making the conversion to matrix form the > very > last step of the process. But obviously you didn't need that suggestion :-). > > --Tim > > On Monday, December 08, 2014 10:20:00 AM John Myles Whit

Re: [julia-users] ISLR (Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani) Examples in Julia

2014-12-14 Thread John Myles White
This would be a great first project for someone interested in learning Julia. FWIW, the RDatasets.jl repo doesn't have anything to do with ISRL -- except insofar as ISRL decided to use common R datasets. -- John On Dec 14, 2014, at 10:36 AM, webuser1...@gmail.com wrote: > I'm going through IS

Re: [julia-users] Test approximate equality of Float16 arrays

2014-12-14 Thread John Myles White
That seems like a bug. Running something like, x = rand(Float16, 10, 10) y = rand(Float16, 10, 10) all(abs(x - y) .> eps(max(maximum(x), maximum(y Gives me a true more than 80% of the time. -- John On Dec 14, 2014, at 3:26 AM, Steve Cordwell wrote: > Hi, > > I have been playing around w

Re: [julia-users] Announcing RobotOS.jl

2014-12-12 Thread John Myles White
Very cool. Glad you've been enjoying Julia so much, Josh. -- John On Dec 12, 2014, at 2:06 PM, Josh Langsfeld wrote: > After about 6 weeks of initial part-time development, I'm announcing the > first release of the RobotOS.jl package, which enables essentially seamless > integration of Julia

Re: [julia-users] Re: Aren't loops supposed to be faster?

2014-12-11 Thread John Myles White
value provided by another function (that the user of the type > supplied). > > So, the type of the return value is stable, but I haven't found a way of > informing the compiler that it is so. > > Petr > > > > > On Thursday, December 11, 2014 8:20:2

Re: [julia-users] Weird timing issue

2014-12-11 Thread John Myles White
This is just how the GC works. Someone who's done more work on the GC can give you more context about why the GC runs for the length of time it runs for at each specific moment that it starts going. As a favor to me, can you please make sure that you quote the entire e-mail thread you're respon

Re: [julia-users] Weird timing issue

2014-12-11 Thread John Myles White
Well, you're clearly allocating memory and discarding it since the list comprehension and sort both allocate memory. So that's garbage that the GC has to deal with. The GC means that your function's timing will be erratic and, generally, longer on a second pass than during the first. -- John

Re: [julia-users] Weird timing issue

2014-12-11 Thread John Myles White
Are you creating a bunch of garbage? My understanding is that any garbage that gets created will be cleaned up at seemingly haphazard (but fully deterministic) points in times. -- John On Dec 11, 2014, at 11:43 PM, Sean McBane wrote: > Hi all, > > So, I'm starting to define a couple of rout

Re: [julia-users] Re: Aren't loops supposed to be faster?

2014-12-11 Thread John Myles White
> The moral of this story is: If you can't or won't declare every single > variable, don't do loops. They are likely to be a losing proposition. I don't think this lesson will serve most people well. It doesn't reflect my experiences using Julia at all. My experience is that code that require

Re: [julia-users] Define composite types in a different file - constructor not defined error

2014-12-11 Thread John Myles White
. > > On Thursday, December 11, 2014 7:39:23 PM UTC-5, John Myles White wrote: > You want include, not require. > > -- John > > On Dec 11, 2014, at 7:25 PM, Test This wrote: > >> >> I have two files: dataTypes.jl and paramcombos.jl >> >> In da

Re: [julia-users] Define composite types in a different file - constructor not defined error

2014-12-11 Thread John Myles White
You want include, not require. -- John On Dec 11, 2014, at 7:25 PM, Test This wrote: > > I have two files: dataTypes.jl and paramcombos.jl > > In dataTypes.jl I have > > type Params > . > . // field names and types > . > end > > > In paramcombos.jl I have > > module para

Re: [julia-users] LLVM3.2 and JULIA BUILD PROBLEM

2014-12-11 Thread John Myles White
My understanding is that different versions of LLVM are enormously different and that there's no safe way to make Julia work with any version of LLVM other than the intended one. -- John On Dec 11, 2014, at 4:56 PM, Vehbi Eşref Bayraktar wrote: > Hi; > > I am using llvm 3.2 with libnvvm .

Re: [julia-users] Is there a function that performs (1:length(v))[v] for v a Vector{Bool} or a BitArray?

2014-12-11 Thread John Myles White
Does find() work? -- John On Dec 11, 2014, at 4:19 PM, Douglas Bates wrote: > I realize it would be a one-liner to write one but, in the interests of not > reinventing the wheel, I wanted to ask if I had missed a function that does > this. In R there is such a function called "which" but th

Re: [julia-users] Changes to array are not visible from caller

2014-12-11 Thread John Myles White
Nope. You'll find Julia much easier to program in if you always replace x += y with x = x + y before attempting to reason about performance. In this case, you'll get x[:, :] = x[:, :] + 1.0f - 5 * dxdt In other words, you literally make a copy of the entire matrix x before doing any useful wor

Re: [julia-users] Roadmap

2014-12-11 Thread John Myles White
This is a very good point. I'd label this as something like "core unsolved challenges". Julia #265 (https://github.com/JuliaLang/julia/issues/265) comes to mind. In general, a list of the "big" issues would be much easier to maintain than a list of goals for the future. We could just use a tag

Re: [julia-users] Unexpected append! behavior

2014-12-10 Thread John Myles White
Hi Sean, I'm really confused by the output you're showing. > > X = [1,2]; Y = [1,2]; > > append!(X,Y) > 4-element Array(Int64,1): > 1 > 2 > 3 > 4 Do you really get this output? That seems like a huge bug if so. But I don't see that at all, which is what I'd expect. -- John

Re: [julia-users] Roadmap

2014-12-10 Thread John Myles White
time estimates, if people are > impatient and want a release sooner it's not going to be possible without > punting on a number of targeted features and pushing them back to 0.5 or > later. > > > On Wednesday, December 10, 2014 1:58:52 PM UTC-8, Randy Zwitch wrote: &g

Re: [julia-users] Re: home page content

2014-12-10 Thread John Myles White
Stefan, I shared your moment of terror about the idea of posting plans (essentially all of which will be invalidated) to the home page. Although it's huge volume of e-mail, I do feel like people who want to keep up with new developments in Julia should try to subscribe to the issue tracker and

  1   2   3   4   5   6   7   8   9   10   >