Re: [julia-users] Parsing complex numbers

2016-11-02 Thread Jeffrey Sarnoff
+1 (imo) It would be a real contribution to Julia's way of just working well with this as with that for one with the requisite skill to make quick work of implementing parse(Complex, complex) and parse(Rational, rational) into v0.6 On Friday, October 28, 2016 a

Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Júlio Hoffimann
Thank you Isaiah, I'll follow your tip and use Hwloc.jl -Júlio

Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Isaiah Norton
Ref: https://github.com/JuliaLang/julia/issues/13901 On Wed, Nov 2, 2016 at 10:33 PM, Isaiah Norton wrote: > it returns the same concept in all OS? > > > As far as I can tell, yes. > > >> Is it physical number of cores? > > > Number of logical processors. > > On Wed, Nov 2, 2016 at 9:42 PM, Júli

Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Isaiah Norton
> > it returns the same concept in all OS? As far as I can tell, yes. > Is it physical number of cores? Number of logical processors. On Wed, Nov 2, 2016 at 9:42 PM, Júlio Hoffimann wrote: > My question is, it returns the same concept in all OS? Is it physical > number of cores? > > -Júlio

[julia-users] Re: How do I use Guide.yticks() with a log scale?

2016-11-02 Thread Jeffrey Sarnoff
Try posting your question/concern here: discussing Plots.jl On Monday, October 24, 2016 at 4:14:45 PM UTC-4, Dean Schulze wrote: > > > When I plot the DataFrame below using Scale.y_log10 the y-axis has ticks > for half powers of 10 (e.g. 10^5.5). The plot

[julia-users] Re: how to report errors with context

2016-11-02 Thread Jeffrey Sarnoff
Tamas, running this typealias AkoString Union{String, SubString{String}} function parsefield{T <: Real, S <: AkoString}(::Type{T}, str::S) result = T(0) try result = parse(T, str) catch ArgumentError errormsg = string("Failed to parse \"",str,"\" as type ", T)

[julia-users] Re: Calling Julia code from Python

2016-11-02 Thread Harish Kumar
Use pyjulia package. Convert your data set to list of list and pass to Julia On Wednesday, November 2, 2016 at 1:43:27 PM UTC-5, Alexei Serdiuk wrote: > > Hi, > > I'm new to Julia and, unfortunately, I'm almost zero to Python. > I need to call Julia code from Python. This code must do some operat

[julia-users] Call Julia from Pyspark

2016-11-02 Thread Harish Kumar
I have a RDD with 10K columns and 70 million rows, 70 MM rows will be grouped into 2000-3000 groups based on a key attribute. I followed below steps 1. Julia and Pyspark linked using pyjulia package 2. 70 MM rd is groupByKey def juliaCall(x): <> j = julia.Julia() jcode

Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Júlio Hoffimann
My question is, it returns the same concept in all OS? Is it physical number of cores? -Júlio

[julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Jeffrey Sarnoff
It works for me on Linux and Windows. On Wednesday, November 2, 2016 at 9:29:28 PM UTC-4, Júlio Hoffimann wrote: > > Hi, > > Sys.CPU_CORES returns the number of physical cores or processing units? Is > it portable across different OS? > > -Júlio >

Re: [julia-users] building julia 0.5.0 on FreeBSD 11

2016-11-02 Thread Jeffrey Sarnoff
Kostas, Please post the location of those patches for others' reference. Thanks On Wednesday, November 2, 2016 at 6:29:40 PM UTC-4, Kostas Oikonomou wrote: > > Thanks, I found an entire set of patches. > > On Sunday, October 30, 2016 at 10:28:40 PM UTC-4, Isaiah wrote: >> >> Just guessing here f

[julia-users] Re: Calling Julia code from Python

2016-11-02 Thread Jeffrey Sarnoff
Alexi, While you may want it to be otherwise, Steven is right. There have been a few programming languages that were designed to be useful with very little instruction. Julia, Python, Java, and most other modern languages are not that way. And while it would be great if there really were a f

[julia-users] Sys.CPU_CORES

2016-11-02 Thread Júlio Hoffimann
Hi, Sys.CPU_CORES returns the number of physical cores or processing units? Is it portable across different OS? -Júlio

Re: [julia-users] Where can I put code that will be run every time "using Module" is executed, and not just the first time?

2016-11-02 Thread Yichao Yu
On Nov 2, 2016 8:12 PM, "Scott Lundberg" wrote: > > In Jupyter it is convenient to dump JS library code to the notebook when "using Module" is run. This is simple to do in the Module's __init__(), and saves a ton of memory since later visualizations can share this common JS library code. > > Howev

[julia-users] Where can I put code that will be run every time "using Module" is executed, and not just the first time?

2016-11-02 Thread Scott Lundberg
In Jupyter it is convenient to dump JS library code to the notebook when "using Module" is run. This is simple to do in the Module's __init__(), and saves a ton of memory since later visualizations can share this common JS library code. However, if a user re-executes the cell, the library code

Re: [julia-users] building julia 0.5.0 on FreeBSD 11

2016-11-02 Thread Kostas Oikonomou
Thanks, I found an entire set of patches. On Sunday, October 30, 2016 at 10:28:40 PM UTC-4, Isaiah wrote: > > Just guessing here from some quick poking around: try adding `#include > ` to that file (`OPENBLAS_SRC/driver/others/blas_server.c`). > > On Sat, Oct 29, 2016 at 4:50 PM, Kostas Oikonomou

[julia-users] Re: Calling Julia code from Python

2016-11-02 Thread Steven G. Johnson
On Wednesday, November 2, 2016 at 2:43:27 PM UTC-4, Alexei Serdiuk wrote: > > I'm new to Julia and, unfortunately, I'm almost zero to Python. > An unfortunate combination — better to learn one programming language before you deal with inter-language calling. > I need to call Julia code from

Re: [julia-users] [ANN] julia-repl, an Emacs minor mode for running a Julia REPL

2016-11-02 Thread Angel de Vicente
Hi, Tamas Papp writes: >> What I miss from the ansi-term is that I cannot keep the whole >> interaction in the buffer, which I grew accustomed to rely on when >> running a regular shell inside Emacs. To illustrate, when running >> something that generates a lot of output inside ansi-term, this ge

Re: [julia-users] Re: Nemo AcbField error

2016-11-02 Thread digxx
Diger@Diger-PC MINGW64 /d/julia/v0.5/nemo (master) $ git config --global user.name "Diger" Diger@Diger-PC MINGW64 /d/julia/v0.5/nemo (master) $ git stash *** Please tell me who you are. Run git config --global user.email "y...@example.com" git config --global user.name "Your Name" to set y

Re: [julia-users] Question: Forcing readtable to create string type on import

2016-11-02 Thread LeAnthony Mathews
Spoke too soon. Again I simple want the CSV column that is read in to not be an int32, but a string. Still having issues casting the CSV file back into a Dataframe. Its hard to understand why the Julia system is attempting to determine the type of the columns when I use readtable and I have no

[julia-users] ANN: Highlights.jl

2016-11-02 Thread Michael Hatherly
I’m pleased to announce the initial 0.1 release of Highlights.jl — a Julia package for highlighting source code similar to the well-known Python package called Pygments . The documentation for the package can be found here

[julia-users] PSA: Documenter.jl deprecations

2016-11-02 Thread Michael Hatherly
Version 0.7 of Documenter has been tagged. Please note that this release *deprecates* the current authentication methods used to deploy generated documentation from Travis CI to GitHub Pages, namely GitHub personal access tokens and SSH keys generat

Re: [julia-users] [ANN] julia-repl, an Emacs minor mode for running a Julia REPL

2016-11-02 Thread Tamas Papp
On Wed, Nov 02 2016, Angel de Vicente wrote: > Hi, > > Tamas Papp writes: >> Hi Julia & Emacs users, > > I'm one of those :-) > >> I wrote a minor mode for starting and interacting with a Julia REPL from >> Emacs. It basically uses term, and defers to the Julia REPL for almost >> everything. The

[julia-users] Re: Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Alejandro Castellanos
As of now, I'm leaning towards maybe my feeding the matrix some Inf values due to the grid spacing I'm using but I'm not sure. Would it help if I uploaded the whole of my code, in here? Mind you, the comments are in Spanish... Cheers. El miércoles, 2 de noviembre de 2016, 3:43:48 (UTC-7), Alej

Re: [julia-users] [ANN] julia-repl, an Emacs minor mode for running a Julia REPL

2016-11-02 Thread Angel de Vicente
Hi, Tamas Papp writes: > Hi Julia & Emacs users, I'm one of those :-) > I wrote a minor mode for starting and interacting with a Julia REPL from > Emacs. It basically uses term, and defers to the Julia REPL for almost > everything. The main reason for using this instead of ESS is that some > p

[julia-users] Calling Julia code from Python

2016-11-02 Thread Alexei Serdiuk
Hi, I'm new to Julia and, unfortunately, I'm almost zero to Python. I need to call Julia code from Python. This code must do some operations and then return it back to Python. I have an example for calling Java: def solve_it(input_data): # Writes the inputData to a temporay file tmp

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Steven G. Johnson
On Wednesday, November 2, 2016 at 11:35:20 AM UTC-4, Daniel Carrera wrote: > > Here is an idea for the future: Is it possible to get PyCall to print the > rest of Python's error message so that dummies like me aren't led astray... > It's weird that most of the error was printed but the path to th

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Steven G. Johnson
On Wednesday, November 2, 2016 at 10:39:58 AM UTC-4, Daniel Carrera wrote: > > On Wednesday, 2 November 2016 15:20:07 UTC+1, Isaiah wrote: > Thanks! I've realized that Conda.jl doesn't actually install Python. But I > could use Anaconda to install Python in /opt and point Julia to that > versio

[julia-users] Re: Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Steven G. Johnson
On Wednesday, November 2, 2016 at 1:40:17 PM UTC-4, Ralph Smith wrote: > > Eigs uses shift-and-invert for the :sm variant, so it tries to solve M x = > b. Try adding a small sigma parameter. > Yes, but it really should be able to handle matrices with a nontrivial nullspace ... the nullspace is

[julia-users] Re: Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Ralph Smith
Eigs uses shift-and-invert for the :sm variant, so it tries to solve M x = b. Try adding a small sigma parameter.

Re: [julia-users] Re: [ANN] julia-repl, an Emacs minor mode for running a Julia REPL

2016-11-02 Thread Tamas Papp
On Wed, Nov 02 2016, David van Leeuwen wrote: > I'd be interested to know what the supposed workflow for > $interpretor-in-$editor is. (This may be more general than emacs > julia-repl) > > I've tried Julia, R in Atom, Emacs, and I don't seem to be able to work > with it. In the Julia / R / bash

[julia-users] how to report errors with context

2016-11-02 Thread Tamas Papp
This is a conceptual question. Consider the following (extremely stylized, but self-contained) code parsefield{T <: Real}(::Type{T}, string) = parse(T, string) function parserow(schema, strings) # keep i for reporting column, currently not used [parsefield(T, string) for (i, (T, string))

[julia-users] Re: [ANN] julia-repl, an Emacs minor mode for running a Julia REPL

2016-11-02 Thread David van Leeuwen
Hi, On Wednesday, November 2, 2016 at 2:51:54 PM UTC+1, Tamas Papp wrote: > > Hi Julia & Emacs users, > > I wrote a minor mode for starting and interacting with a Julia REPL from > Emacs. It basically uses term, and defers to the Julia REPL for almost > everything. The main reason for using th

Re: [julia-users] JuliaDB?

2016-11-02 Thread Seth
On Wednesday, November 2, 2016 at 9:43:16 AM UTC-7, Jeff Bezanson wrote: > > This is an internal name we've been using; it hasn't been finalized > yet so I removed it from the site (the name collision with the > existing github org is one of the issues of course). If you're > interested in thi

Re: [julia-users] JuliaDB?

2016-11-02 Thread Jeff Bezanson
This is an internal name we've been using; it hasn't been finalized yet so I removed it from the site (the name collision with the existing github org is one of the issues of course). If you're interested in this kind of functionality please contact me directly. On Wed, Nov 2, 2016 at 10:37 AM, S

[julia-users] Re: Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Alejandro Castellanos
Hi, Steven. This is how I'm building the matrix: #==# # OPERATING THE MATRIX # #==# # --Creating HAMILTONIAN container. M = spzeros(n*n, n*n)#--Creating the SPARSE matrix (n is the number of points per row). # --Working kinetic energy int

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Daniel Carrera
Hi guys, I am really sorry for the spam. I just want to say that I am cautiously optimistic that the problem has been solved. I started Python to see the error from within Python, and this is what I saw: >>> import matplotlib.pyplot as p ... blah blah blah... IOError: [Errno 13] Permission deni

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Daniel Carrera
This is depressing... Installing a new matplotlib did not fix the problem at all. After I exited and restarted Julia the old error came right back, even with the new Python install: -- Orion ~ % julia _ _ _ _(_)_ | A fresh approach to technica

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Daniel Carrera
Thanks! Ok... getting close, but not quite there: Deleting ~/.cache/matplotlib and even ~/.cache/fontconfig didn't work for me, but I figured out how to use Conda.jl to install matplotlib separately. So I did this: $ sudo apt-get remove python-matplotlib $ julia julia> Pkg.add("Conda") julia>

Re: [julia-users] Barnes-Hut N-body simulations (was recursive data structures with Julia)

2016-11-02 Thread Angel de Vicente
Hi, Angel de Vicente writes: > OK, so this was just a test example to go for something bigger, and by > using the cleaner version with Nullable fields I implemented a basic > code to perform a Barnes-Hut N-body simulation > (https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation) > > The goo

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Daniel Carrera
On Wednesday, 2 November 2016 15:20:07 UTC+1, Isaiah wrote: > > Ok. So first of all, PyPlot is grabbing the system-wide installation of >> Python. I don't know how to tell PyPlot to look at the one that was >> installed with the Conda package. > > > https://github.com/JuliaPy/PyCall.jl#specif

[julia-users] JuliaDB?

2016-11-02 Thread Seth
>From http://juliacomputing.com/products/juliafin.html *JuliaDB* is a high-performance, columnar data store for working with > large-scale time series data. What sets it apart from the existing products > in this area is the tight-knit integration of data and algorithms with the > full power of

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Steven G. Johnson
For the font-cache, see https://github.com/matplotlib/matplotlib/issues/5836 ...there is some ~/.cache/matplotlib directory that you can delete to get rid of this. To tell PyPlot to use the Conda Python, you need to set the PYTHON environment variable and re-build PyCall: ENV["PYTHON"]=

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Isaiah Norton
> > Ok. So first of all, PyPlot is grabbing the system-wide installation of > Python. I don't know how to tell PyPlot to look at the one that was > installed with the Conda package. https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version To force Julia to use its own Python distributi

[julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Daniel Carrera
Hi everyone, I am getting some cryptic errors when I try to load PyPlot. It seems to be a problem on the Python end, but I'm not sure. I tried to use the "Conda" package so that Julia would have its own (hopefully not-broken) copy of Python, but that didn't help as PyPlot is still looking at t

[julia-users] [ANN] julia-repl, an Emacs minor mode for running a Julia REPL

2016-11-02 Thread Tamas Papp
Hi Julia & Emacs users, I wrote a minor mode for starting and interacting with a Julia REPL from Emacs. It basically uses term, and defers to the Julia REPL for almost everything. The main reason for using this instead of ESS is that some packages, in particular Gallium and ASTinterpreter, require

[julia-users] Re: Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Steven G. Johnson
On Wednesday, November 2, 2016 at 9:48:38 AM UTC-4, Steven G. Johnson wrote: > > > > On Wednesday, November 2, 2016 at 6:43:48 AM UTC-4, Alejandro Castellanos > wrote: >> >> I use this command: *l, v = eigs(M,nev=15,which = :SM ,ritzvec=true)* >> > > How are you constructing the matrix M? > > A

[julia-users] Re: Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Steven G. Johnson
On Wednesday, November 2, 2016 at 6:43:48 AM UTC-4, Alejandro Castellanos wrote: > > I use this command: *l, v = eigs(M,nev=15,which = :SM ,ritzvec=true)* > How are you constructing the matrix M? Apparently eigs thinks that your matrix is symmetric positive-definite (SPD), because it is tryi

Re: [julia-users] Re: avoid dollar $ interpolation in shell commands

2016-11-02 Thread Stefan Karpinski
You can make a command with quoted `$` like this: `echo \$x` or `echo '$x'`. On Wed, Nov 2, 2016 at 8:00 AM, Christian Theil Have < christiantheilh...@gmail.com> wrote: > Thank you for the responses and my apologies for not being entirely clear: > Actually, the $PATH variable was just to provide

[julia-users] Re: async read from device?

2016-11-02 Thread Simon Byrne
I found that this seemed to work: const STICK_INPUT_DEV="/dev/input/event0" @async begin stream, pipe = open(`cat $STICK_INPUT_DEV`) while true s = read(stream, Stick) if s.ev_type == EV_KEY println(s) end end end but it would be nice if there was

Re: [julia-users] Re: avoid dollar $ interpolation in shell commands

2016-11-02 Thread Christian Theil Have
Thank you for the responses and my apologies for not being entirely clear: Actually, the $PATH variable was just to provide an example. I really did want to construct a Cmd with an unquoted dollar in it. The reason why I want do such a silly thing is that I have a toying with a package (https://

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

2016-11-02 Thread Jeffrey Sarnoff
John, Currently (v0.5) : Which uses of non-concrete types are performance friendly? What ways of using abstract types are a drag on performance? Regards, Jeffrey On Sunday, October 30, 2016 at 9:38:15 PM UTC-4, John Myles White wrote: > > Working with non-concrete types is often a problem for p

[julia-users] Re: Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Jeffrey Sarnoff
I have one suggestion: see if Andreas' LinearAlgebra.jl does any better. Pkg.clone(""https://github.com/andreasnoack/LinearAlgebra.jl";) using LinearAlgebra # ... If there is still difficulty, you may look at eigenGeneral.jl

Re: [julia-users] Re: avoid dollar $ interpolation in shell commands

2016-11-02 Thread Stefan Karpinski
I think that needs some additional parens: `echo $(ENV["PATH"])`. This is in fact, exactly what you need – Julia commands in backticks are not run by a shell so there is no shell to expand any environment variables, only Julia can expand them. On Wed, Nov 2, 2016 at 7:02 AM, Simon Byrne wrote: >

[julia-users] Re: avoid dollar $ interpolation in shell commands

2016-11-02 Thread Simon Byrne
Perhaps not quite what you had in mind, but `echo $ENV["PATH"]` should work On Wednesday, 2 November 2016 10:43:47 UTC, Christian Theil Have wrote: > > Hi, > > I've been trying to create a shell command that refers to an environment > variable, e.g., > > echo $PATH > > Julia will interpolate $

Re: [julia-users] avoid dollar $ interpolation in shell commands

2016-11-02 Thread Stefan Karpinski
Are you trying to get the shell to expand $PATH but not Julia? On Wed, Nov 2, 2016 at 5:40 AM, Christian Theil Have < christiantheilh...@gmail.com> wrote: > Hi, > > I've been trying to create a shell command that refers to an environment > variable, e.g., > > echo $PATH > > Julia will interpolate

[julia-users] Error calculating eigs of pentadiagonal matrix.

2016-11-02 Thread Alejandro Castellanos
Hello. I am working with a pentadiagonal sparse matrix that represents a 2D Schrodinger's time-independent equation. I first work the laplacian expressed in Finite Differences form and then I apply the potential on the same matrix. So far I've been able to validate my results for both an elect

[julia-users] avoid dollar $ interpolation in shell commands

2016-11-02 Thread Christian Theil Have
Hi, I've been trying to create a shell command that refers to an environment variable, e.g., echo $PATH Julia will interpolate $ in shell commands in backticks to Julia variables, i.e., `echo $PATH`, will look for a Julia variable PATH. What can I do if I really want to insist having a shell

Re: [julia-users] Re: Fast vector element-wise multiplication

2016-11-02 Thread Patrick Kofod Mogensen
Does that work for you? I have to write A .= (*).(A,B) On Wednesday, November 2, 2016 at 3:51:54 AM UTC+1, Chris Rackauckas wrote: > > It's the other way around. .* won't fuse because it's still an operator. > .= will. It you want .* to fuse, you can instead do: > > A .= *.(A,B) > > since this i

Re: [julia-users] Re: Fast vector element-wise multiplication

2016-11-02 Thread Tim Holy
Hmm, that's surprising. Looks like we're using generic broadcasting machinery for that operation (check out what @which P.*P returns). Might be good to add .* to this line: https://github.com/JuliaLang/julia/blob/b7f1aa7554c71d3759702b9c2e14904ebdc94199/base/arraymath.jl#L69. Want to make a pull re

Re: [julia-users] Re: Fast vector element-wise multiplication

2016-11-02 Thread Sheehan Olver
OK, good to know. I think putting the function in a package is overkill. > On 2 Nov. 2016, at 6:35 pm, Chris Rackauckas wrote: > > Yes, this most likely won't help for GPU arrays because you likely don't want > to be looping through elements serially: you want to call a vectorized

Re: [julia-users] Re: Fast vector element-wise multiplication

2016-11-02 Thread Chris Rackauckas
Yes, this most likely won't help for GPU arrays because you likely don't want to be looping through elements serially: you want to call a vectorized GPU function which will do the computation in parallel on the GPU. ArrayFire's mathematical operations are already overloaded to do this, but I do

Re: [julia-users] Reducing complexity of OffsetArrays

2016-11-02 Thread Tamas Papp
Is there a general recommendation for dealing with the case when a function encounters two arrays with different index sets? Eg OffsetArray(1:5,1:5) + OffsetArray(1:5, -2:2) currently gives a DimensionMismatch exception via promote_shape, so perhaps one should simply rely on what the latter does.