[julia-users] Calling Fortran code?

2016-06-05 Thread Charles Ll
Dear all, I am trying to call some Fortran code in Julia, but I have a hard time doing so... I have read the docs, looked at the wrapping of ARPACK and other libraries... But I did not find any way to make it work. I am trying to wrap a spline function library (gcvspl.f,

[julia-users] Re: readdlm throws error for empty line

2016-06-05 Thread Tanmay K. Mohapatra
I see the message: "file entry \"\" cannot be converted to Float64" This is because you are trying to read it as a Float64 matrix and there are missing values in the input that can not be represented with Float64. If I don't specify the type, I get: julia> readdlm("/tmp/x.csv", ',') 2×3

Re: [julia-users] readdlm throws error for empty line

2016-06-05 Thread Anonymous
it does appear to be related, unfortunately no resolution appears to be as of yet forth coming. On Sunday, June 5, 2016 at 6:53:56 PM UTC-7, Miguel Bazdresch wrote: > > This may be related: https://github.com/JuliaLang/julia/issues/16248 > > On Sun, Jun 5, 2016 at 6:16 PM, Anonymous

Re: [julia-users] readdlm throws error for empty line

2016-06-05 Thread Miguel Bazdresch
This may be related: https://github.com/JuliaLang/julia/issues/16248 On Sun, Jun 5, 2016 at 6:16 PM, Anonymous wrote: > So I have a BysteString vector A, containing a bunch of byte strings of > varying lengths of the form: > > "1,2,\n" > "\n" > "5,2,4\n" > > etc. > > What I

Re: [julia-users] errors using packages in parallel

2016-06-05 Thread Ethan Anderes
I just submitted an issue: github.com/JuliaLang/julia/issues/16778 > > Thanks for everyones input. Ethan

[julia-users] Re: A question about expressions

2016-06-05 Thread Cedric St-Jean
Technically, it's because k is not assigned to anything. Your for loop is quoted, which means that it's just an expression, not an actual for loop. The dollar-sign tells Julia to stop quoting and insert the result of the expression `vars[k]`, but k isn't defined, so you get an error. Compare:

[julia-users] A question about expressions

2016-06-05 Thread Richard Dennis
I'm fiddling around with expressions and I'm puzzled why the following tells me that k is not defined. Any thoughts would be appreciated. # a = is a 3D array # b = a vector of vectors vars = [[symbol("i1")]; [symbol("i2")]; [symbol("i3")]] glomp = :( inner_prod = a[$(vars...)];

[julia-users] Reconstruct a string from a Clang.jl generated looong type

2016-06-05 Thread J Luis
Hi, I have one of those types generated from a C struct with Clang.jl that turns a stack variable into a lng list of members (for example (but I have longer ones)) https://github.com/joa-quim/GMT.jl/blob/master/src/libgmt_h.jl#L1246 (an in interlude: isn't yet any better way of

[julia-users] readdlm throws error for empty line

2016-06-05 Thread Anonymous
So I have a BysteString vector A, containing a bunch of byte strings of varying lengths of the form: "1,2,\n" "\n" "5,2,4\n" etc. What I have set up is to do [vec(readdlm(IOBuffer(line), ',', Float64)) for line in A] However because as you see above the second line is empty except for the

[julia-users] Problem with Homebrew after Pkg.update()

2016-06-05 Thread Tony Kelman
Which version of Homebrew.jl did you update to? What does Pkg.status() say?

Re: [julia-users] How to build a range of -Inf to Inf

2016-06-05 Thread Páll Haraldsson
On Friday, June 3, 2016 at 2:54:57 AM UTC, Yichao Yu wrote: > > A Range is not a interval Right. > but rather a series of equally spaced numbers Actually, they do not have to be equally spaced (for the straightforward definition)? Not the abstract Range, while "equally spaced" seems to

[julia-users] Problem with Homebrew after Pkg.update()

2016-06-05 Thread Fabrice Collard
Hello, I ran a Pkg.update() this morning, and got Homebrew updated. However, it did not properly build, I got the following error message *INFO: Building Homebrew* HEAD is now at dde20cd Remove (almost) everything (#50678) Updating tap homebrew-juliadeps HEAD is now at c377b50 Merge pull

Re: [julia-users] Re: big on the mac with large matrices

2016-06-05 Thread Rodrigo Miranda
Happens on my install as well. versioninfo() -> ulia Version 0.4.5 Commit 2ac304d (2016-03-18 00:58 UTC) Platform Info: System: Darwin (x86_64-apple-darwin13.4.0) CPU: Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY

[julia-users] Re: Uniform syntax

2016-06-05 Thread Ford O.
Thanks for the replies. I have been comparing ansi c syntax and julia lately, so I had to naturally ask, why julia doesn't define functions in the same way ansi c does? foo(args...) begin # ansi c style definition #some code end If julia would define functions like this, a *keyword for one

RE: [julia-users] errors using packages in parallel

2016-06-05 Thread Boylan, Ross
I've been encountering errors with packages in parallel, even though everything is happening on one machine (julia -p 4 or -p 3 under ESS). This isn't necessarily the same issue, but it seems suggestive it's arising at the same time. Originally I think the packages/cache were a bit out of

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Yuri Vishnevsky
I might be wrong here, but you could imagine "unifying" macros and functions, allowing people to call any function as a macro by prepending a @, or calling any macro as a function by omitting it. I don't know whether this would be useful, but it's how I read Ford's question. On Sunday, June

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Stefan Karpinski
On Sun, Jun 5, 2016 at 11:41 AM, Scott Jones wrote: > On the other hand, that would prevent having a function with the same name > as a macro. This is the primary reason. When you define a macro named "@foo", the transformation function for it is bound to the

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Scott Jones
I think it may just boil down to being a historical artifact - until recently (and only in v0.5, AFAIK), macros were handled rather differently from functions. Now that macros actually act like functions, and have different methods (of course limited to types known at parse time, symbols,

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Steven G. Johnson
Macro calls are syntactically distinct from function calls in part because they are evaluated at parse time, before the compiler can know the bindings of variables (which would be necessary in order to determine whether f(x) is a function call or a macro call without the @).

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Ford O.
Exactly. On Sunday, June 5, 2016 at 4:48:51 PM UTC+2, Rafael Fourquet wrote: > > I think the OP's question is not about the difference between a macro > and a function, but rather about the syntactic way of defining a > macro: if a macro can be seen as a function taking an expression and >

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Rafael Fourquet
I think the OP's question is not about the difference between a macro and a function, but rather about the syntactic way of defining a macro: if a macro can be seen as a function taking an expression and returning another one, why can't we just define a macro with the standard function syntax

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Erik Schnetter
In the hope of bringing a derailed conversation back on track: Ford, maybe you are not asking a Julia but a general computer science question. In this case: A macro is strictly more powerful than a function, so in principle, every function can be replaced by a macro. There are various "technical"

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Ford O.
... I think I gave you all help I could, to understand the question. I am not going to explain it over and over and over. On Sunday, June 5, 2016 at 2:40:31 PM UTC+2, Tamas Papp wrote: > > I am sorry --- I did not realize you had anger management issues. In > any case, consider the example in

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Tamas Papp
I am sorry --- I did not realize you had anger management issues. In any case, consider the example in the section of the manual I linked, with macros and functions: macro time_mac(ex) return quote local t0 = time() local val = $ex local t1 = time() println("elapsed time: ",

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Ford O.
Don't make me angry. I have read that chapter more than 5 times. You could also read my question 5 times. I am asking why do we have to specify macro and function with different keyword, when compiler exactly knows whether we are calling macro or function. Example for ...: callable

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Tamas Papp
Sorry for linking a local version of the manual -- still, you could probably have found it with a bit of effort, but it appears that you are adamant in your refusal to read it. I would say that the most important reasons is that macros have special conventions because of hygiene, see

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Ford O.
You got it wrong. In different words. Why do we need to specify macro and function block with macro and function keyword? Isnt the '@' symbol enough? On Sunday, June 5, 2016 at 1:11:48 PM UTC+2, Tamas Papp wrote: > > A macro is a function that is used to transform (a representation) of >

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Tamas Papp
A macro is a function that is used to transform (a representation) of source code. Consequently, it is called when Julia evaluates your function defintions, not at runtime. Please read file:///usr/share/doc/julia-doc/html/manual/metaprogramming.html where you find examples. Regarding you example:

[julia-users] Re: Uniform syntax

2016-06-05 Thread Steven G. Johnson
On Sunday, June 5, 2016 at 6:35:48 AM UTC-4, Ford O. wrote: > > What makes macro different from function? > Macros are executed at parse time. Functions are executed at runtime.

[julia-users] Re: Help creating user-defined types and constructors

2016-06-05 Thread Christopher Fisher
Thanks again for the all of the advice. The Julia community is very helpful. I should be able to figure out a viable solution.

[julia-users] Re: Uniform syntax

2016-06-05 Thread Ford O.
What makes macro different from function? Why is it not possible to do: foo(e::Expr) = :() @foo x = x + 5 On Friday, June 3, 2016 at 10:05:46 AM UTC+2, Ford O. wrote: > > I think this deserves an own topic. > > *You* should post here syntax that looks like duplicate or you think it > could use

[julia-users] Julia Plugins

2016-06-05 Thread Leonardo
Hi all, I want realize a pluggable architecture in Julia, loading dinamically some precompiled code from any path (for sure functions, but also types, and maybe entire modules). Excluding load of source files with include(), can I load some .ji file containing chunks of code (also encapulated

[julia-users] Re: ANN: PkgSearch - a REPL utility for package discovery

2016-06-05 Thread Adrian Salceanu
Thanks for the feedback, happy to contribute. vineri, 3 iunie 2016, 22:40:50 UTC+2, Adrian Salceanu a scris: > > Hi, > > I have released PkgSearch, a small REPL utility for package discovery. > > Package discovery seemed to be a recurring issue, with many related > questions - and I can

[julia-users] Re: Help creating user-defined types and constructors

2016-06-05 Thread Ford O.
I want to discourage you from using symbols because although it perfectly works for you right now, but you might get into trouble later. Lets say you want to add an array into Population and you want to keep symbol indexing: Population persons newarray end #You can't do