Re: [julia-users] Re: Functions in degrees

2014-02-05 Thread Hans W Borchers
You could easily add these two lines of function definitions to your code. sind(x) = sin(degrees2radians(x)) cosd(x) = cos(degrees2radians(x)) and your haversine function stands as is, not littered with conversions. On Tuesday, February 4, 2014 6:55:13 PM UTC+1, Jacob Quinn wrote: As

Re: [julia-users] Re: Functions in degrees

2014-02-05 Thread Ivar Nesje
Hans W Borchers: Your definition is not equivalent. julia sin(pi) 1.2246467991473532e-16 julia sind(180) 0.0 julia sinpi(1) 0 julia sin(big(pi)) 1.096917440979352076742130626395698021050758236508687951179005716992142688513354e-77 with 256 bits of precision The answer for sin(pi) is

[julia-users] Re: Move Clustering.jl to JuliaStats

2014-02-05 Thread Ivar Nesje
I think Github will set up redirects if you use the move functionality. On Wednesday, February 5, 2014 2:54:36 AM UTC+1, John Myles White wrote: Hi all, Over the coming weekend, I am going to move Clustering.jl to JuliaStats. I hope the move will go smoothly, but am always wary about

Re: [julia-users] Vector division mystery

2014-02-05 Thread Ivar Nesje
If you want elementwise division you have to use the ./ operator. Then each element gets divided by the corresponding element in the other vector. On Wednesday, February 5, 2014 8:16:42 AM UTC+1, Andreas Noack Jensen wrote: I different framing of Kevin's answer could be that it solves your

Re: [julia-users] Re: Functions in degrees

2014-02-05 Thread Simon Byrne
As I understand it, the original reason for the degree functions was for matlab compatibility, but they were later modified (and pi-multiple functions sinpi/cospi introduced) so as to be more accurate outside the the interval [-pi/2,pi/2], as Ivar points out. Note that we haven't improved on

[julia-users] Re: Sending text back and forth between Julia and R

2014-02-05 Thread Simon Byrne
It would be great to recreate knitr-style functionality purely with ipython: i.e. feed in a markdown file, and the result is converted to a notebook with the flagged code blocks automatically run. On Tuesday, 4 February 2014 22:44:14 UTC, Douglas Bates wrote: On Tuesday, February 4, 2014

Re: [julia-users] Re: Sending text back and forth between Julia and R

2014-02-05 Thread Ista Zahn
On a related note, emacs users can enjoy a very nice literate programming system that supports Julia using org-mode and ess. See https://github.com/gjkerns/ob-julia/blob/master/ob-julia-doc.org Best, Ista On Wed, Feb 5, 2014 at 5:57 AM, Simon Byrne simonby...@gmail.com wrote: It would be great

Re: [julia-users] Re: Functions in degrees

2014-02-05 Thread Johan Sigfrids
Oh, you beat me to it. I was just about to say that using a Degree type and dispatching on it would be a lot more Julian. In fact, I had this great idea on how to use the degree sign to construct degrees: module DegreeModule export Degree, DegreeSign, ° immutable Degree{T:Number} :Number

[julia-users] Re: Sending text back and forth between Julia and R

2014-02-05 Thread j verzani
I doesn't run the flagged code blocks but this (https://github.com/jverzani/WeavePynb.jl/blob/master/src/WeavePynb.jl) steals parts of Judo's (nee Gadfly's) weave function to create ipynb files from markdown. Running of code blocks could be done, but it seems easiest for my use to just tell

[julia-users] operators and basic mathematical functions for DataFrames

2014-02-05 Thread Christian Groll
Since updating DataFrames and DataArrays recently, operators and basic functions are not working on DataFrames anymore. Is this a new design decision, or only temporary due to restructuring the code base? julia Pkg.status() - DataFrames0.5.1 - DataArrays

[julia-users] Re: operators and basic mathematical functions for DataFrames

2014-02-05 Thread Johan Sigfrids
Issue #484 https://github.com/JuliaStats/DataFrames.jl/pull/484 seems to indicate it is on purpose. On Wednesday, February 5, 2014 3:00:39 PM UTC+2, Christian Groll wrote: Since updating DataFrames and DataArrays recently, operators and basic functions are not working on DataFrames anymore.

[julia-users] Re: Sending text back and forth between Julia and R

2014-02-05 Thread Simon Byrne
Ah, very nice, that looks really useful. As far as running the notebook, the ipython wiki has some useful scripts, including one for running a notebook from the command line: https://github.com/ipython/ipython/wiki/Cookbook%3a-Notebook-utilities I also noticed that they have an issue open for

Re: [julia-users] Re: operators and basic mathematical functions for DataFrames

2014-02-05 Thread John Myles White
This is definitely on purpose. Quick summary: * DataMatrix is a mathematical object * DataFrame is a database We're going to encourage use of colwise for some of these use cases. But for many of them we're going to encourage the use of DataMatrix instead. -- John On Feb 5, 2014, at 5:07 AM,

Re: [julia-users] Julia Parallel Computing Optimization

2014-02-05 Thread Alex C
1. Done 2. I am not sure what you mean by running the paralel computation over D and E directly, then scaling it down afterwards but I do the scaling element-wise now instead of at the end 3. I will consider it in the future 4. Done although it won't allow me to name the output (A,B,C). It gives

Re: [julia-users] Re: Functions in degrees

2014-02-05 Thread Stefan Karpinski
I rather like the Degree type idea. Radians are unitless so they don't need a type – i.e. PiMultiple is just the default for all trig functions. You could, however, also have things angular units like Turns. On Wed, Feb 5, 2014 at 7:48 AM, Johan Sigfrids johan.sigfr...@gmail.comwrote: Oh, you

Re: [julia-users] Re: Functions in degrees

2014-02-05 Thread Ivar Nesje
I think the Degree types will be too hard to discover, so it will not be used enough that it is worth the extra work with all functions you might want to call on that number. This belongs more in a unit package like https://github.com/loladiro/SIUnits.jl , where some missing functions might be

[julia-users] Re: Does Julia support plotting?

2014-02-05 Thread Steven G. Johnson
On Tuesday, February 4, 2014 8:21:48 PM UTC-5, Steven Siew wrote: I think that it should be made absolutely clear to newbies (to Julia) that plotting is NOT working by default. Right on the download page (http://julialang.org/downloads/), there is a section Graphics in Julia that says

[julia-users] Re: Does Julia support plotting?

2014-02-05 Thread Tobias Knopp
May be an implicit conclusion: Has similarities with Matlab then it has to work all out of the box ;-) Am Mittwoch, 5. Februar 2014 17:26:39 UTC+1 schrieb Steven G. Johnson: On Tuesday, February 4, 2014 8:21:48 PM UTC-5, Steven Siew wrote: I think that it should be made absolutely clear to

[julia-users] Parallel sparse matrix vector multiplication

2014-02-05 Thread Madeleine Udell
I'm developing an iterative optimization algorithm in Julia along the lines of other contributions to the Iterative Solvers projecthttps://github.com/JuliaLang/IterativeSolvers.jlor Krylov Subspace https://github.com/JuliaLang/IterativeSolvers.jl/blob/master/src/krylov.jlmodule whose only

[julia-users] Embedding Julia in C (In a long running process)

2014-02-05 Thread Stephen Chisholm
I'm working on integrating Julia into our platform which is a long running service, there are a few concerns around keeping the Julia environment running for an extended period. Or if it might be possible to destroy the environment after it is initialized. We are investigating whether we

[julia-users] Re: Embedding Julia in C (In a long running process)

2014-02-05 Thread Tobias Knopp
No there don't seem to be a cleanup method. And multiple julia environments are currently not possible. But from my perspective it would be great to work towards putting all the globals into a struct so that multiple Julia threads per process become feasible. Am Mittwoch, 5. Februar 2014

Re: [julia-users] Debugging Julia programs that have 'C' function calls with gdb

2014-02-05 Thread Isaiah Norton
You can run julia under gdb and set a breakpoint as needed in the C code (so, immediately prior to the error condition). eg: bash$ gdb julia ... (gdb) break xyz.c:123 (gdb) run ... julia include(myfile) ... breakpoint at ... (gdb) (Continuing will return to the Julia prompt) On Wed,

[julia-users] Re: Parallel sparse matrix vector multiplication

2014-02-05 Thread Miles Lubin
Memory access is typically a significant bottleneck in sparse mat-vec, so unfortunately I'm skeptical that one could achieve good performance using Julia's current distributed memory approach on a multicore machine. This really calls for something like OpenMP. On Wednesday, February 5, 2014

[julia-users] high performance garbage collector(s)

2014-02-05 Thread Robbert van Dalen
Hi, I really like the looks of Julia, but don't want to use it *yet*. IMO, what Julia is really lacking is a (runtime choice of) industry grade garbage collector implementation(s). The reason I care is that I want to implement various immutable data structures in Julia. But such structures

[julia-users] UDP Support

2014-02-05 Thread Bob Cowdery
Does the network i/o package support UDP as it only seems to have TCP functions. Thanks Bob

Re: [julia-users] high performance garbage collector(s)

2014-02-05 Thread Kevin Squire
Hi Robbert, I'm not sure if this goes in the direction you need, but check out: https://github.com/JuliaLang/julia/pull/5227 Have you also seen https://github.com/zachallaun/FunctionalCollections.jl? Cheers, Kevin On Wed, Feb 5, 2014 at 11:44 AM, Robbert van Dalen

Re: [julia-users] UDP Support

2014-02-05 Thread Keno Fischer
We have the capabilities, but it's not hooked up yet, mostly because I don't know enough about UDP to write a meaningful test case and I hate having broken functionality in Base. On Wed, Feb 5, 2014 at 2:57 PM, Bob Cowdery bobcowd...@gmail.com wrote: Does the network i/o package support UDP as

Re: [julia-users] Help with Requests.jl/adding data to POST request

2014-02-05 Thread Bassem Youssef
Hi Randy, The following works for me: where $enc is the encoded creds as you had above. post(URI(https://api.twitter.com/oauth2/token;),grant_type=client_credentials,{Authorization = Basic $enc,Content-Type = application/x-www-form-urlencoded;charset=UTF-8}) Note the URI() before the url. We

[julia-users] Bay Area Julia Users meetup #4: 6:30pm, 19 February 2014

2014-02-05 Thread Stu Thompson
Hi folks, We are pleased to announce the fourth Bay Area Julia Users meetuphttp://www.meetup.com/Bay-Area-Julia-Users/events/157317652/! The gathering will take place at 6:30 PM on 19 February in SoMa. We will have two presenters: Iain Dunning will join us via teleconference to talk about

Re: [julia-users] Help with Requests.jl/adding data to POST request

2014-02-05 Thread Westley Hennigh
#2 should work, the problem right now is that we only have support for json encoded data, and so the post method is overriding Content-Type (https://github.com/loladiro/Requests.jl/blob/master/src/Requests.jl#L269). I've just filed https://github.com/loladiro/Requests.jl/issues/15 to track On

Re: [julia-users] Re: Parallel sparse matrix vector multiplication

2014-02-05 Thread Madeleine Udell
Miles, you're right that writing sparse matrix vector products in native Julia probably won't be the best idea given Julia's model of parallelism. That's why I'm interested in calling an outside library like PETSc. I see it's possible to link Julia with MKL. I haven't tried this yet, but if I do,

Re: [julia-users] Re: Parallel sparse matrix vector multiplication

2014-02-05 Thread Madeleine Udell
But speaking of writing parallel matrix vector products in native Julia, this might be a great use case for shared arrays (although right now I think only dense shared arrays exist). Amit, can you comment on this? On Wed, Feb 5, 2014 at 1:41 PM, Madeleine Udell madeleine.ud...@gmail.com wrote:

Re: [julia-users] Help with Requests.jl/adding data to POST request

2014-02-05 Thread Randy Zwitch
Thanks for confirming Bassem, your code worked on my machine. It does seem awkward that it requires the URI() before the url, especially given that some of the examples on the Github page work without using that. On Wednesday, February 5, 2014 4:11:11 PM UTC-5, Bassem Youssef wrote: Hi Randy,

Re: [julia-users] Re: Parallel sparse matrix vector multiplication

2014-02-05 Thread Andreas Noack Jensen
A*b will not call MKL when A is sparse. There has been some writing about making a MKL package that overwrites A_mul_B(Matrix,Vector) with the MKL versions and I actually wrote wrappers for the sparse MKL subroutines in the fall for the same reason. 2014-02-05 Madeleine Udell

Re: [julia-users] Re: Parallel sparse matrix vector multiplication

2014-02-05 Thread Miles Lubin
But speaking of writing parallel matrix vector products in native Julia, this might be a great use case for shared arrays (although right now I think only dense shared arrays exist). Amit, can you comment on this? Actually you could use a shared array for both the sparse matrix and output

[julia-users] Computing Standard Error for MLE using Optim package

2014-02-05 Thread Bradley Fay
I'm trying to figure out how to compute/recover the standard error of the estimates for a simple linear regression using MLE and simulated. Here is the code I'm using to generate data, compute the likelihood function, and optimize the function. using Optim using Distributions xmat =

Re: [julia-users] Re: UDP Support

2014-02-05 Thread Stefan Karpinski
Just to be clear, this could be implemented in about an hour, probably. We should just do it. Keno, what stuff do I need to hook up to make UDP work? On Wed, Feb 5, 2014 at 5:04 PM, Bob Cowdery bobcowd...@gmail.com wrote: OK, thanks. I do need UDP for my application so will check back in a

Re: [julia-users] Computing Standard Error for MLE using Optim package

2014-02-05 Thread Andreas Noack Jensen
In the Calculus.jl package, there is a hessian function where you can stick in you likelihood and the estimate. 2014-02-05 Bradley Fay bradley@gmail.com: I'm trying to figure out how to compute/recover the standard error of the estimates for a simple linear regression using MLE and

Re: [julia-users] Re: UDP Support

2014-02-05 Thread Keno Fischer
Basically just the uv_udp_t stuff. Have a look at the way TcpSocket is implemented. It would be very similar. I'd be happy to review a pull request. I'm just in a little bit of a crunch right now, so I probably don't have the time to write it up and test it myself. There's examples of the C udp

[julia-users] ARPACKException(-3)

2014-02-05 Thread Micah McClimans
Julia is returning an ARPACKException(-3) with the following line: (pVals,pVecs)=eigs(covariance;nev=sigComponents,sigma=1,which=LM,tol=0.0 ,ritzvec=true,maxiter=1000) running on a 64-bit windows machine, covariance is positive definite. I'm not getting any useful debugging information, so I

Re: [julia-users] Move Clustering.jl to JuliaStats

2014-02-05 Thread John Myles White
That's true. I find the mechanism a little opaque, so it makes it uncomfortable. But hopefully it will all work out. -- John On Feb 5, 2014, at 2:04 AM, Ivar Nesje iva...@gmail.com wrote: I think Github will set up redirects if you use the move functionality. On Wednesday, February 5,

[julia-users] Re: Sending text back and forth between Julia and R

2014-02-05 Thread Stephen Eglen
Does this seem to be a reasonable approach? Are there other mechanisms I should consider instead? have you thought about JSON as a bridge for passing data between processes? Stefan mentioned this to me, and there is clearly precedent wih ipython. Stephen

Re: [julia-users] ARPACKException(-3)

2014-02-05 Thread Elliot Saba
What version of julia are you on? Please send the output of `versioninfo()`. On Wed, Feb 5, 2014 at 2:39 PM, Micah McClimans also.also@gmail.comwrote: Julia is returning an ARPACKException(-3) with the following line:

Re: [julia-users] Julia Parallel Computing Optimization

2014-02-05 Thread David Salamon
Hey Alex, Great catch on #5 -- that was dumb on my part :) Re #4: turns out it's a known bug involving parallel code specifically. I've upadated https://github.com/JuliaLang/julia/issues/2669 to let them know it's no longer a theoretic discussion. Re: breaking the matrix in to pieces --

[julia-users] Re: nfilled(SparseMatrix)

2014-02-05 Thread Patrick O'Leary
This is a superrecent change merged yesterday, so you'll need an even fresher build. Ref: https://github.com/JuliaLang/julia/pull/5538 On Wednesday, February 5, 2014 6:45:02 PM UTC-6, Madeleine Udell wrote: I see documentation for the nfilled function, but I don't seem to be able to access

[julia-users] Re: nfilled(SparseMatrix)

2014-02-05 Thread Ivar Nesje
If you for some reason can't upgrade now, you can see the 0.2 docs to find out how it was until yesterday. Hopefully you will then get depreciation warnings when you actually upgrade.

[julia-users] Re: nfilled(SparseMatrix)

2014-02-05 Thread Ivar Nesje
If you for some reason can't upgrade now, you can see the 0.2 docs to find out how it was until yesterday. Hopefully you will then get depreciation warnings when you actually upgrade.

[julia-users] Segfault in Pkg.update() in a fresh Julia installation

2014-02-05 Thread Cristóvão Duarte Sousa
Hi, I'm using Julia compiled from git in Arch linux, and in the last weeks I've been getting almost random segmentation faults, mainly, but not only, when running Pkg.update(). I've followed the procedures from https://gist.github.com/staticfloat/6188418 (except for the Github issue opening)

Re: [julia-users] Segfault in Pkg.update() in a fresh Julia installation

2014-02-05 Thread Isaiah Norton
Yes, you should have better luck with that. MCJIT is enabled when using LLVM 3.4, and there are some bugs. Please file an issue and link the gists, so this doesn't get lost. (if you have any other reproducible test cases, those might be helpful too) On Wed, Feb 5, 2014 at 10:01 PM, Cristóvão

[julia-users] Announcement: JuliaBio SIG

2014-02-05 Thread Cory Giles
Julia shows great promise for biology and bioinformatics-related programming. It really blows the competition (Python, R) out of the water in terms of language design, but a lot of work is needed to catch up to the huge library advantage that's available in these languages. I've set up a

[julia-users] Ignoring NaNs

2014-02-05 Thread Roger Herikstad
Hi, Are there equivalent functions to Matlab's nanmean and nanstd, i.e. functions for computing mean and standard deviation while ignoring NaN's? It's simple to put something together, of course, e.g. function nanmean(x) mean(~isnan(x)) end but it would nice to have as part of Base, or

Re: [julia-users] Re: UDP Support

2014-02-05 Thread Keno Fischer
I had about an hour on a plane: https://github.com/JuliaLang/julia/pull/5697 On Wed, Feb 5, 2014 at 5:37 PM, Keno Fischer kfisc...@college.harvard.eduwrote: Basically just the uv_udp_t stuff. Have a look at the way TcpSocket is implemented. It would be very similar. I'd be happy to review a

[julia-users] evaluating an expression using @spawnat

2014-02-05 Thread Amit Murthy
The below code generates an expression consisting of multiple using statements pid = addprocs(1)[1] e1 = Expr(:toplevel) for (k,v) in Base.package_list p = basename(k) if endswith(p, .jl) p = p[1:end-3] end push!(e1.args, Expr(:using,

Re: [julia-users] Type inference

2014-02-05 Thread Andreas Noack Jensen
Please have a look at the manual. It is explained herehttp://docs.julialang.org/en/latest/manual/types/#parametric-composite-types 2014-02-06 Fil Mackay f...@vertigotechnology.com: Hi all, I expected this to be true: *Dict{ASCIIString,Int64}:Dict{String,Int64}# false* Should not there be

[julia-users] Re: ARPACKException(-3)

2014-02-05 Thread Alex
The ARPACK error means -3: NCV-NEV = 2 and less than or equal to N where NCV is the number of Arnoldi vectors. The default value is NCV=20, however, this is adjusted according to (n = 6) (nev = max(n-1, nev)) ncv = blas_int(min(max(2*nev+2, ncv), n)) Which values do you use for N (size