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,
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
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
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
I just submitted an issue: github.com/JuliaLang/julia/issues/16778
>
>
Thanks for everyones input.
Ethan
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:
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...)];
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
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
Which version of Homebrew.jl did you update to? What does Pkg.status() say?
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
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
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
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
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
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
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
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,
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 @).
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
>
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
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"
...
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
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: ",
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
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
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
>
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:
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.
Thanks again for the all of the advice. The Julia community is very
helpful. I should be able to figure out a viable solution.
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
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
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
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
34 matches
Mail list logo