[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

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: 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] 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: 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

[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

[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] 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: 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

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

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

[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] 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: 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] 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

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

[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

[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] 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

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] 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

[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: 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: 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: 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: 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-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

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

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

[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

[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: 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: 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: 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: 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

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

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] 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

[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

[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

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: 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

[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: 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: 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

Re: [julia-users] When does inlining occur?

2014-06-18 Thread John Myles White
I think the code that controls inlining is mostly here: https://github.com/JuliaLang/julia/blob/master/base/inference.jl But you'll want to get a response from someone who really understands it. -- John On Jun 18, 2014, at 1:30 PM, Sam L wrote: > Apologies if this is in the manual. I must ha

Re: [julia-users] problem with Multinomial Distribution

2014-06-19 Thread John Myles White
Multinomial() doesn't work because there's no reasonable default we could assume. Did you want 3 dimensions? 100 dimensions? Arguably none of the defaults should exist, but we haven't pushed on that yet. Maybe we should start removing all the default distributions. The other errors you noticed

Re: [julia-users] Optim/DualNumbers question (maybe a math question?)

2014-06-22 Thread John Myles White
Maybe. Did someone create a pull request? — John On Jun 22, 2014, at 5:22 PM, Thomas Covert wrote: > did this code ever find its way into DualNumbers.jl? I do anticipate its > going to be quite helpful. > > -Thom > > > > > On Fri, Jun 6, 2014 at 10:32 AM, Thomas Covert wrote: > Haven't

Re: [julia-users] writable root directory?

2014-06-23 Thread John Myles White
This seems hard to know without also seeing the output of `ls -l /` — John On Jun 23, 2014, at 7:06 AM, Davide Lasagna wrote: > Hi, > > Is this a bug? > > julia> iswritable("/") > true > > (running from repl as normal user) > > Davide

Re: [julia-users] writable root directory?

2014-06-23 Thread John Myles White
Even with -l? — John On Jun 23, 2014, at 7:14 AM, Davide Lasagna wrote: > The output is my linux root folder: /bin, /boot, > > On Monday, June 23, 2014 3:07:12 PM UTC+1, John Myles White wrote: > This seems hard to know without also seeing the output of `ls -l /` > &g

Re: [julia-users] writable root directory?

2014-06-23 Thread John Myles White
142 > drwxr-xr-x 24 root root 4096 jun 11 09:16 . > > shell> whoami > tlycken > `tlycken` is a sudoer, but if I start the REPL as `sudo julia`, `;whoami` > returns `root`, so I don't think that's the problem. > > // T > > On Monday, June 23, 2014 4:07

Re: [julia-users] Assign one array to another, and they stick to each other forever ?

2014-06-23 Thread John Myles White
The fast answer is that you want a copy of A, produced using copy(A). Somebody else will probably fill in more details of the why. -- John On Jun 23, 2014, at 9:42 AM, JuliaLover wrote: > Hi, > I have a problem that when I assign value of one array to another they stick > to each other whene

Re: [julia-users] How do I create a function signature for a 2x2 matrix?

2014-06-24 Thread John Myles White
(1) The size of arrays isn’t part of their type signature, so you can’t use multiple dispatch to do this. You’ll end up overwriting the existing Array multiplication function. (2) You’d want to do something like *{S <: Number, T <: Number}(a::Array{S, 2},b::Array{T,1}) to indicate that you’re a

Re: [julia-users] Julia simple

2014-06-24 Thread John Myles White
(1) Are you including compilation time in your timings? (2) Your MyCounter type isn't very similar to your other examples, since the i::Integer field has type-uncertainty, whereas the other examples don't. -- John On Jun 24, 2014, at 2:26 PM, JuliaFan wrote: > Why do these three loops perfor

Re: [julia-users] Re: orthogonalize

2014-06-30 Thread John Myles White
Please don’t post code whose copyright status is not 100% certain. If you are even vaguely unsure, you are putting the community in needless danger. As a minimal example, it may be illegal for you to have written the e-mail you just wrote. — John On Jun 30, 2014, at 7:07 AM, 'Stéphane Laurent

Re: [julia-users] Type instability?

2014-06-30 Thread John Myles White
Hey Spencer, A function is defined to be "type stable" if the return types depend only on the input types. -- John On Jun 30, 2014, at 9:51 AM, Tim Holy wrote: > In your definition I think you meant "type stability," not "type > instability." > To be completely explicit, a function is type

Re: [julia-users] metaprogramming nested functions

2014-07-01 Thread John Myles White
eval always happens in the global scope — John On Jul 1, 2014, at 10:15 PM, Cameron Smith wrote: > Can anyone explain what I am misunderstanding about scope such that > > julia> function foo() >foo2(x) = println(x) >foo2(1); eval(parse("foo2(2)")); >end > foo (

Re: [julia-users] metaprogramming nested functions

2014-07-01 Thread John Myles White
of a > string or symbol to result in a call to a nested function? > > On Wednesday, July 2, 2014 1:17:07 AM UTC-4, John Myles White wrote: > eval always happens in the global scope > > — John > > On Jul 1, 2014, at 10:15 PM, Cameron Smith wrote: > >> Can anyon

Re: [julia-users] metaprogramming nested functions

2014-07-02 Thread John Myles White
What would that macro do? Right now, I’d guess that it would just take its input out of quotes. — John On Jul 2, 2014, at 7:41 AM, Bryan A. Knowles wrote: > What of we had a macro version of parse? Eg, > ```julia > function foo() > foo2(x) = println(x) > foo2(1) >

Re: [julia-users] Re: Why is string concatenation done with * not +

2014-07-02 Thread John Myles White
String concatenation is not commutative. Addition is generally used for commutative operations. So if you're a mathematician, using addition for string concatentation seems very wrong. -- John On Jul 2, 2014, at 12:45 PM, Ivar Nesje wrote: > Not everybody is convinced there is a good reason.

Re: [julia-users] Re: Why is string concatenation done with * not +

2014-07-02 Thread John Myles White
performance you should use IOBuffer for > repeated string concatenation, example..." > > Also a more instructive error on "hello"+"world" would make since. > > On Wednesday, 2 July 2014 20:48:26 UTC+1, John Myles White wrote: > String concatenation is not comm

Re: [julia-users] Re: Decreasing range, should it work?

2014-07-03 Thread John Myles White
Sadly, R does not. 1:0 expands to c(1, 0). This is something that has burned a lot of people in my experience. I imagine this is inherited from S. — John On Jul 3, 2014, at 2:05 AM, Tobias Knopp wrote: > Just as a side note (I entirely agree with Stefan), Matlab behaves the same > as Julia:

Re: [julia-users] Re: Why is string concatenation done with * not +

2014-07-03 Thread John Myles White
This is just the standard convention in mathematics. See just about any textbook on abstract algebra for a discussion of the reasons. I think it's safe to say that `+` will never be string concatenation, so it's better to focus energy on other proposals. -- John On Jul 3, 2014, at 7:57 AM, yi

Re: [julia-users] Re: Why is string concatenation done with * not +

2014-07-03 Thread John Myles White
, a monoid is > enough. It is true that in a ring, "+" is a commutative operator, and "*" no > commutative required, however, a ring is far beyond what needed to do a > string concatenation job. > > > On Thu, Jul 3, 2014 at 10:59 PM, John Myles White > wrot

Re: [julia-users] Re: Why is string concatenation done with * not +

2014-07-03 Thread John Myles White
not operations on a ring. > > > On Thu, Jul 3, 2014 at 11:13 PM, John Myles White > wrote: > That is true, but the convention exists nonetheless. Consider, for example, > this branch of the combinatorics literature: > http://en.wikipedia.org/wiki/Square-free_word > --

Re: [julia-users] Help: K-Means Clustering Algorithm

2014-07-03 Thread John Myles White
Hi Paulo, Rather than implement k-means from scratch, I'd encourage you to use the implementation in the Clustering.jl package. -- John On Jul 3, 2014, at 2:51 PM, Paulo Castro wrote: > Hi guys, > > I'm trying to implement the K-Means Clustering Algorithm, but I'm having some > problems. T

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

2014-07-04 Thread John Myles White
This is really cool. I’ve wanted to do this for a while, but never had time. — John On Jul 4, 2014, at 11:39 AM, Iain Dunning wrote: > Oh and I forgot, link to the repository: > https://github.com/IainNZ/GraphLayout.jl > > On Friday, July 4, 2014 2:39:32 PM UTC-4, Iain Dunning wrote: > I wan

Re: [julia-users] e == 2.718

2014-07-04 Thread John Myles White
This seems like a temporary bug. My most recent build doesn’t behave like this. Hopefully that means it’s been fixed already. — John On Jul 4, 2014, at 1:29 PM, james.dillon.dela...@gmail.com wrote: > Hi All, > > Is there a reason why the irrational constant e seems to be rounded to three >

Re: [julia-users] GA implementation slow in Julia compared to other languages

2014-07-05 Thread John Myles White
One big problem is the use of “Real”. You almost certainly should be using Float64 instead. — John On Jul 5, 2014, at 11:46 AM, Michael Louwrens wrote: > https://github.com/Mike43110/GA-Spherical-Jl/tree/master > > Here is my basic implementation of a GA in Julia. > > Using similar code in

Re: [julia-users] GA implementation slow in Julia compared to other languages

2014-07-05 Thread John Myles White
Real is the abstract type that all real numbers derive from. Int is a subtype of Real, for example. Int is a platform-specific alias for either Int32 or Int64, whichever is native to your machine/OS combination. So a type like immutable Foo x::Int end is quite efficient, whereas a typ

Re: [julia-users] GLM DataFrameRegressionModel gives InexactError()

2014-07-05 Thread John Myles White
Not really sure. Can you try printing out each of the columns to see where the error is? Maybe the problem is with our new code for printing shorthand rather than eps() when p is very small. (That’s just total speculation, though.) — John On Jul 4, 2014, at 1:04 PM, Florian Oswald wrote: > H

Re: [julia-users] Re: 100 Julia exercises

2014-07-06 Thread John Myles White
I think anonymous function usage and list comprehensions are separate issues. Anonymous functions are not type-specialized, so they’re basically always slow. I avoid them in any code that’s not one-off. List comprehensions are type-specialized, but the inference for them isn’t super robust, esp

Re: [julia-users] PEG Parser

2014-07-06 Thread John Myles White
Thanks for looking into this, Abe. That’s too bad that the CSV parser is much slower than the hand-crafted one. PEG seems like a great tool for tasks where maximum performance isn’t as important. — John On Jul 4, 2014, at 11:09 AM, Abe Schneider wrote: > I got sidetracked by a couple of othe

Re: [julia-users] Re: Interest in a Julia <-> Stan interface?

2014-07-07 Thread John Myles White
This is really nice to have. I'll definitely be using it for some of my work. Now that Keno's been working on a C++ FFI, we might even be able to avoid using CmdStan. -- John On Jul 7, 2014, at 4:40 PM, Viral Shah wrote: > It is great to have a Stan interface. I personally do not do MCMC stu

Re: [julia-users] Julia meetup in Japan: JuliaTokyo

2014-07-07 Thread John Myles White
This is a pretty impressive range of different talks for a single event. Very cool. — John On Jul 6, 2014, at 5:35 PM, Sorami Hisamoto wrote: > Last week's JuliaTokyo meetup in Japan ended in great success! > > Around 40 people attended, 6 main talks and 4 lightning talks. > > Here's the li

Re: [julia-users] Passing parameters to 'optimize'

2014-07-08 Thread John Myles White
This should work, except that you're not providing any initial values for x. Is your problem one-dimensional or multi-dimensional? -- John On Jul 8, 2014, at 11:44 AM, Mathieu Taschereau-Dumouchel wrote: > I am trying to optimize a simple function that takes a parameter as an > argument. So

Re: [julia-users] Passing parameters to 'optimize'

2014-07-08 Thread John Myles White
no method optimize(Function, Int64) > > I am running Version 0.3.0-prerelease+3884 (2014-06-25 10:41 UTC) and have > updated all packages. > > Thanks for your help > Mathieu > > On Tuesday, July 8, 2014 2:48:24 PM UTC-4, John Myles White wrote: > This should work, exce

Re: [julia-users] Ideomatic way to write a function that works with a collection of any Number (any subtype of type)

2014-07-08 Thread John Myles White
What you're doing isn't a workaround: it's the correct way to do this in the current version of Julia. There may be shorthand in the future, but this is the right approach today. -- John On Jul 8, 2014, at 2:01 PM, Andrei Zh wrote: > Here's another question about code style. Let's say I want

Re: [julia-users] Interest in a Julia <-> Stan interface?

2014-07-09 Thread John Myles White
gt; Julia's v0.3-prerelease (as it uses the new DataFrames). > > Finally, a significant part of the value of CmdStan/Stan is the Stan team & > community. Even with a mature C++ FFI, I would like to remain as > 'interchangeable' with both Stan and CmdStan as possib

Re: [julia-users] Interest in a Julia <-> Stan interface?

2014-07-09 Thread John Myles White
to Mamba.jl - > http://mambajl.readthedocs.org/en/latest/intro.html#the-mamba-package ). > > Regards, > Rob J. Goedman > goed...@icloud.com > > > > > On Jul 9, 2014, at 8:45 AM, John Myles White wrote: > >> I’m not sure I understand how a C++ FFI af

Re: [julia-users] weird behaviour dynamic function declarations

2014-07-10 Thread John Myles White
I think you're hitting this issue: https://github.com/JuliaLang/julia/issues/265 -- John On Jul 10, 2014, at 1:31 AM, Johannes Degn wrote: > > > Im not sure if this is a bug or if I am a bug. Maybe someone can explain this > to me: > > I am running julia Version 0.3.0-prerelease+3649 on li

Re: [julia-users] New Julia tutorial from SciPy now online

2014-07-10 Thread John Myles White
This is a really great tutorial. -- John On Jul 10, 2014, at 5:54 AM, David P. Sanders wrote: > Many thanks to all those who suffered my inane questions and helped this to > take shape, in particular: > > - Jeff, who persuaded me to try out Julia > - Alonso & Luis, who convinced me that it w

Re: [julia-users] Re: Contributing an external package

2014-07-10 Thread John Myles White
I'd use a package like Distributions.jl as your example rather than SGD.jl, which is really, really rough around the edges. -- John On Jul 10, 2014, at 8:32 AM, Eric Chiang wrote: > Yeah I have. > > Beyond just the actual technical requirements, I was wondering more generally > about best p

Re: [julia-users] Re: New Julia tutorial from SciPy now online

2014-07-12 Thread John Myles White
Maybe we should have Learning and Teaching separately? Or maybe Teaching should be under a section about people using Julia? — John On Jul 12, 2014, at 9:35 AM, Stefan Karpinski wrote: > Well, originally, it was actually teaching in the sense of places where > people have used Julia in teach

Re: [julia-users] how use find ?

2014-07-12 Thread John Myles White
I’m really confused. Do you want the indices to be 32-bit integers instead of 64-bit integers? Isn’t that equivalent to asking for your code to be broken anytime your vector has more than typemax(Int32) elements? — John On Jul 12, 2014, at 12:43 PM, J Luis wrote: > > julia> find(x->x>5,a) >

Re: [julia-users] how use find ?

2014-07-12 Thread John Myles White
On Jul 12, 2014, at 1:04 PM, J Luis wrote: > That is also true but a much more rare case, typemax(Int32) is still a quite > high number for an array size and before an Int64 is needed changes are non > negligible that a memory requested failed because a big contigous chunk of > memory was not

Re: [julia-users] essay on the history of programming languages

2014-07-12 Thread John Myles White
I loved this two-part essay. Highly recommend it to anyone who hasn’t read it. — John On Jul 12, 2014, at 7:55 PM, Stefan Karpinski wrote: > Graydon Hoare (original author of Rust) wrote a truly lovely essay in two > parts about the history of programming languages, the predominance of > two

Re: [julia-users] Sort error, How to find reserved word in big text ?

2014-07-13 Thread John Myles White
parse isn’t a cure for anything. parse interprets inputs under the assumption that they are valid Julia code. Your data isn’t valid Julia code, so you should not use parse. — John On Jul 13, 2014, at 12:01 AM, Paul Analyst wrote: > At first I did and it was a problem with the "Inf". I realiz

Re: [julia-users] expr indexing in dataframes?

2014-07-14 Thread John Myles White
Why not just use straight indexing like below? df[Bool[ismatch(r"a", x) for x in df[:Column]], :] -- John On Jul 14, 2014, at 9:32 AM, Andrew G wrote: > vec = map(x -> ismatch(r"regex_expression", x), df[:column]) > vec = convert(DataArray{Bool}, vec) > subset(df, results) >

Re: [julia-users] Efficient linear transformation (A*x and A*X)

2014-07-14 Thread John Myles White
Basic linear algebra is done by BLAS and LAPACK, so I don't think these issues cause performance problems. -- John On Jul 14, 2014, at 6:55 PM, Andrei Zh wrote: > Linear transformation is super-frequent operation in scientific computations, > so I'd like to know how to perform it in a most e

Re: [julia-users] [newb] Trouble with compound Boolean expressions

2014-07-15 Thread John Myles White
I think you want something more like a >= 0 && b >= 0 && c >= 0 Also, you probably don't want to use global variables for code where performance matters. You should pass a, b and c to gen() as parameters gen(a, b, c). -- John On Jul 15, 2014, at 6:31 PM, yaoismyh...@gmail.com wrote: > Hi, >

Re: [julia-users] Re: my first julia function

2014-07-16 Thread John Myles White
To follow up on Dahua's comment: If you're interested in using the fastest code, the code that Dahua posted is the fastest since it uses several clever tricks to get the absolute best speed. If you're interested in writing a faster implementation than the one you wrote, you need to avoid alloca

Re: [julia-users] Background Knowledge needed to Start working with/learning Julia?

2014-07-18 Thread John Myles White
This might seem like just a reframing of the situation, rather than an answer, but I personally don't think there's any background knowledge you need to get started using Julia. What you need is a willingness to figure out what's going on by doing some digging through the manual, the general web

Re: [julia-users] [ANN] MultivariateStats

2014-07-18 Thread John Myles White
This is really great, Dahua. We should probably deprecate MultivariateStats, which was always pretty unreliable. -- John On Jul 18, 2014, at 9:13 PM, Dahua Lin wrote: > Recently, I developed a new package for Julia (under JuliaStats): > MultivariateStats, for multivariate statistical analysi

Re: [julia-users] [ANN] MultivariateStats

2014-07-18 Thread John Myles White
; On Friday, July 18, 2014 9:11:08 PM UTC-5, John Myles White wrote: > This is really great, Dahua. We should probably deprecate MultivariateStats, > which was always pretty unreliable. > > -- John > > On Jul 18, 2014, at 9:13 PM, Dahua Lin wrote: > >>

Re: [julia-users] essay on the history of programming languages

2014-07-19 Thread John Myles White
FWIW, shared memory parallelism is going to improve in Julia in the future. -- John On Jul 19, 2014, at 9:40 AM, Tracy Wadleigh wrote: > A more robust path to shared memory parallelism. SharedArray is still not a > first-class Julia citizen. And, even if it were, memory safety would still be

Re: [julia-users] Re: [ANN] MultivariateStats

2014-07-19 Thread John Myles White
I suppose one very effective solution to creating a coherent ML organization is to do all the work yourself. :) -- John On Jul 19, 2014, at 1:40 PM, Dahua Lin wrote: > Linear Least Square and Ridge Regression are also included now. (see > http://multivariatestatsjl.readthedocs.org/en/latest/

Re: [julia-users] Re: [ANN] MultivariateStats

2014-07-19 Thread John Myles White
t;> >> These have been working quite successfully for some packages, such as >> Distributions, DataStructures, and Graphs, etc. >> >> Dahua >> >> >> >> On Saturday, July 19, 2014 5:26:36 PM UTC-5, John Myles White wrote: >> I su

Re: [julia-users] Re: build-in function to find inverse of a matrix

2014-07-21 Thread John Myles White
There's one complication here, which is that a single ? already changes the mode of the REPL into help mode. So this would have to be a mode only triggerable from inside of help mode. -- John On Jul 21, 2014, at 6:47 PM, Ethan Anderes wrote: > +1. For some reason my fingers always get tied u

Re: [julia-users] Re: How to overcome versioning issues?

2014-07-22 Thread John Myles White
FWIW, the mean of the min and max is called the midrange. — John On Jul 22, 2014, at 8:17 AM, Spencer Russell wrote: > Hi Elliot, > > The median isn't the mean of the min and max (though that was fun to say). > > Wikipedia says it well: > > "the median is the numerical value separating the

  1   2   3   4   5   6   7   8   9   10   >