Hello,
I have a strange behaviour.
This code works fine:
for file = (newLine, intersect, findRange, getLine, orderPart,
plotPart)
include(*(pwd(), \\function_, file, .jl))
end
But when there's only one string to loop over I get this error:
julia for file = newLine
I couldn't find one, I don't think Sundials or DASSL do BVP's. Would be a
useful thing to write though!
Porting some BVP solvers and pseudospectral optimal control codes (like
PSOPT http://www.psopt.org/ or GPOPS-II
http://vdol.mae.ufl.edu/JournalPublications/TOMS-GPOPS-II-August-2013.pdf)
On Sunday, 11 May 2014 08:30:22 UTC+1, Stéphane Laurent wrote:
for file = (newLine, intersect, findRange, getLine, orderPart,
plotPart)
include(*(pwd(), \\function_, file, .jl))
end
In the first case, you're iterating over a vector of strings, so file is
a string
julia for file
Le samedi 10 mai 2014 à 22:30 -0700, Ivar Nesje a écrit :
Not yet, but it will happen when someone implements a nice solution.
More specifically, you can have a look at this issue and the ones it
references:
https://github.com/JuliaLang/julia/issues/3988
Regards
Ok, I've updated the example to current Julia syntax and Debug.jl behavior,
and changed the 'No context available!' message to the hopefully less
confusing 'Couldn't display source lines from file none '
On Sun, May 4, 2014 at 10:27 PM, Michele Zaffalon
michele.zaffa...@gmail.com wrote:
Thank
I just hooked this up for ODE.jl - it was really easy! =) The single thing
I had to struggle with (and it only took a couple of minutes to figure
out) was how to get the repo to show up at Coveralls.io, since I'm not the
owner (the JuliaLang organization is) and I wasn't on the public listing
Excellent. I also find that the current example is more useful.
On Sun, May 11, 2014 at 11:13 AM, Toivo Henningsson toivo@gmail.comwrote:
Ok, I've updated the example to current Julia syntax and Debug.jl
behavior, and changed the 'No context available!' message to the hopefully
less
Hi all,
I'd appreciate help building julia HEAD. We're prepping a VM for vagrant
deployment and the build process fails at the very end as it's
bootstrapping:
```
deprecated.jl
pkg.jl
graphics.jl
profile.jl
precompile.jl
Killed
make[3]: *** [/home/vagrant/julia/usr/lib/julia/sys0.o] Error 137
I find this kind of amusing:
You may have heard before that R is a vectorized language, but what do we
mean by that? One way to read that is to say that many functions in R can
operate efficiently on vectors (in addition to singletons).
That's certainly one way to spin it. Following it up
Hi Julia users,
As a newcomer, let me first introduce myself. I have some experience in
numeric code, written mostly in Fortran 2008, C++, C#, Delphi and
Mathematica. As a consultant, I have to write some numerical codes but
those need to be written in languages that are different from clients
Hey all,
Markdown.jl https://github.com/one-more-minute/Markdown.jl is available
to try with Pkg.clone(Markdown). It's very much in beta but it's still
pretty useful if (for example) you want to quickly look at a package's
readme.
Parsed markdown should display nicely (ish) in the terminal as
This is certainly possible, but I imagine it's not going to happen except
as an outside project.
Making a compiler like this isn't exactly easy, either – you'd probably
have to do a lot of reaching into Julia's C internals to get to the
type-inferred code.
You're welcome to try this, and I'm
Does it make sense to have readcsv return an Array{T, 1} when the file contains
a single column? Currently it returns Array{T, 2}.
I guess it makes sense in terms of consistency but I find myself constantly
appending [:] when reading in a vector. Is this what others do?
Great to hear! I've added ODE.jl to a list of known packages using it, and
re-wrote the README. I should add a link to that troubleshooting page.
https://github.com/IainNZ/Coverage.jl/blob/master/README.md
On Sunday, May 11, 2014 8:42:59 AM UTC-4, Tomas Lycken wrote:
I just hooked this up for
I'm playing with defining Linked Lists in Julia. The version I'm struggling
with involves having a type parameter on the node and list, that indicates
the type of the data in the list.
These are the types:
~~~
type List{T}
head::Union(Node{T},Nothing)
end
type Node{T}
data::T
I noticed a similar issue recently, (but didn't report it directly:
https://github.com/JuliaLang/julia/issues/6717)
a{T}(::Array{T,1}, ::T) = T
does cannot match a function for T=Any
julia a({}, 1)
ERROR: no method a(Array{Any,1},Int64)
I see the same behavior in 0.2.1, so it isn't a recent
It would be a bad idea to return Array{T, 1} in the special case of a file
with a single column. The return type would be dependent upon the csv file
which is a really bad design.
On Sunday, May 11, 2014 8:29:57 PM UTC+2, Ethan Anderes wrote:
Does it make sense to have readcsv return an
I've only come to suspect this recently, but I believe that type parameters
have always been a special case such that if T is a type parameter of a method,
then x::T in the argument list requires that T===typeof(x), not just isa(x, T)
as otherwise. I guess that this is deliberate, though I find
Here is some code https://gist.github.com/goretkin/967ca1bef0b07ee99ff8
(pasted at end of email too)
It declares a recursive data type TreeNode that has a field children which
is a Set of TreeNodes. The function nodes counts the number of nodes in the
tree recursively.
The code as shown
Since Julia uses LLVM and LLVM had an (unmaintained) C backend, it would be
possible to generate C code form Julia that way. You could do something similar
for some other languages as well but you'd have to build the backend yourself.
Not an easy undertaking. It would also produce largely
That's great. This will be awesome for inline documentation. I suspect that's
what you developed it for :-)
On May 11, 2014, at 2:04 PM, Mike Innes mike.j.in...@gmail.com wrote:
Hey all,
Markdown.jl is available to try with Pkg.clone(Markdown). It's very much in
beta but it's still
On the whole I think that just sucking it up and using the different
languages clients require is on the whole the least trouble
Unfortunately, that's less time spending with Julia :-(. Still, it will be
an amazing tool for prototyping, and it might be worth it to translate the
code manually
Hi there,
I've run into some problems with package manager in the recent(yesterday)
build. It looks like the dependencies are no longer downloaded and build
automatically as it used to be. I double checked that with the build from April
1st. and it indeed behaves differently. Running
I appreciate the sentiment :-). Somewhat unfortunately for your use case, I've
found that while it's easy to translate, e.g. Matlab to Julia, but translating
idiomatic Julia to Matlab is kind of impossible. It's the rampant use of custom
types and multiple dispatch with lots of small methods
I wrote a couple of packages and I would like to publish them in METADATA.
Should I make a pull request as is recommended in the docs?
Paulo Jabardo
Le dimanche 11 mai 2014 à 14:34 -0700, Paulo Jabardo a écrit :
I wrote a couple of packages and I would like to publish them in
METADATA. Should I make a pull request as is recommended in the docs?
If it's recommended in the docs, why wouldn't you do it? ;-)
Thank you Francois.
I will point out that translation among languages can require subtle
decisions. For example, we emit clever instruction sequences for things
like comparison and rounding. It's debatable whether these should be
reproduced exactly in c++, or mapped to idiomatic constructs that
Thanks for the response. Still not sure I understand what you mean. readcsv
returns Array{T, 2} where T is determined form the file ... so the type of the
output does change based on the file. Since column vectors are thought of as
1-d arrays in Julia I would have assumed the Julian way to load
Yes, please make PRs.
On Sunday, May 11, 2014 5:34:55 PM UTC-4, Paulo Jabardo wrote:
I wrote a couple of packages and I would like to publish them in METADATA.
Should I make a pull request as is recommended in the docs?
Paulo Jabardo
Binary dependencies are handled on a package-by-package basis, not by the
Pkg.* functions themselves.
What happens if you run Pkg.build(ZMQ)?
On Sunday, May 11, 2014 4:20:23 PM UTC-4, Kuba Roth wrote:
Hi there,
I've run into some problems with package manager in the recent(yesterday)
Suppose we have a C library that takes a callback with inputs (Cint,
Cfloat). The conventional way of creating a callback would be:
function foo(x::Cint, y::Cfloat)
# do something with x and y
return nothing
end
cfunction(foo, Void, (Cint, Cfloat))
The following alternative way also appears to
With 0.3, the tuple gets turned into an anonymous struct because it only
contains bitstypes.
I recommend matching the C API exactly in your Julia declaration to avoid
surprises, not just whichever is working
On Sunday, May 11, 2014, Jay Weisskopf jaysc...@gmail.com wrote:
Suppose we have a C
I'm working on a Julia implementation of a Treap, a data structure that
maintains a sorted collection of elements and allows insertion, deletion,
and random access in O(log n) time (http://en.wikipedia.org/wiki/Treap).
So far I've implemented the basic functions, but performance is far slower
Try changing FloatingPoint to Float64 and you may seem a substantial
performance boost.
— John
On May 11, 2014, at 4:32 PM, Yuri Vishnevsky yuriv...@gmail.com wrote:
I'm working on a Julia implementation of a Treap, a data structure that
maintains a sorted collection of elements and allows
I have an iterative algorithm in which two matrices with a fixed number of
rows grow in number of columns. The algorithm requires only the last *N*columns
(where N is a predefined fixed integer). If the number of columns
grow to *N + d*, then the first *d* columns are no longer required and can
Oddly, that makes it *slower*...
julia benchmark(100)
Timing 100 insert operations.
elapsed time: 11.637004929 seconds (1324768744 bytes allocated)
Timing 100 random access operations.
elapsed time: 15.640938079 seconds (1047763544 bytes allocated)
Timing 100 remove operations.
The generated llvm code is very complicated, which is a sign of something
not very good going on.
This could be good to add as a performance test, and to DataStructures.jl
On Sunday, May 11, 2014 8:27:46 PM UTC-4, Iain Dunning wrote:
So the FloatingPoint - Float64 is probably a good idea, but
I don't know if I'm interpreting the output correctly, but if you look at
at the output from the following it seems that both t and index are
interpreted to be of type Any.
t = MinTreap{Int}(); add!(t, 50)
@code_typed t.root[1]
On Sunday, May 11, 2014 8:27:46 PM UTC-4, Iain Dunning wrote:
Wow, yeah! It sure looks like that. Can you file an issue with this
information?
On Sunday, May 11, 2014 8:38:37 PM UTC-4, Yuri Vishnevsky wrote:
I don't know if I'm interpreting the output correctly, but if you look at
at the output from the following it seems that both t and index are
Is there a way to write this with a single node type? One method that has
been previously suggested is to indicate an empty node type by
self-reference. This could improve type stability.
On Sun, May 11, 2014 at 8:52 PM, Iain Dunning iaindunn...@gmail.com wrote:
Wow, yeah! It sure looks like
Done: https://github.com/JuliaLang/julia/issues/6813
On Sunday, May 11, 2014 8:52:09 PM UTC-4, Iain Dunning wrote:
Wow, yeah! It sure looks like that. Can you file an issue with this
information?
On Sunday, May 11, 2014 8:38:37 PM UTC-4, Yuri Vishnevsky wrote:
I don't know if I'm
vec should have minimal overhead. (Unlike [:], it doesn't make a copy of
the underlying data.)
On Sunday, May 11, 2014 6:00:10 PM UTC-4, Ethan Anderes wrote:
Thanks for the response. Still not sure I understand what you mean.
readcsv returns Array{T, 2} where T is determined form the file
Do you actually care about the order of columns? Or can you just use a cyclic
representation?
V[:, mod1(col, N)] = v
--Tim
On Sunday, May 11, 2014 04:48:08 PM Carlos Baptista wrote:
I have an iterative algorithm in which two matrices with a fixed number of
rows grow in number of columns. The
a file contains a single column
Isn't a CSV file without commas just a file? In which case, wouldn't
it make more sense to do line-oriented IO?
readlines(csvfile)
On Sun, May 11, 2014 at 10:27 PM, Tim Holy tim.h...@gmail.com wrote:
Yes, when reading data from files, where information about
@Simon and @Jameson: Yep, vec seems preferred to [:]. I just took a look at
readlines and it was a bit clunky (I had to open the file, then readlines gives
me a Array{Union(UTF8String,ASCIIString),1}, then I convert to
Array{Float64,1}, then I guess I should close the file). In the end I was
I hope this is related.
Why isn't part of a row of Array{T, 2} of Array{T, 1}? Consider vec1 in
the following example.
df = readcsv(fname)
vec1 = df[3, 1:4]
@Kleo: The very sort answer is that df[3,1:4] is considered a 1-by-4 matrix
(hence Array{T,2}). For df[1:4,3], Julia drops the trailing dimension and
returns an Array{T, 1}. If you really want Array{T, 2} you can use df[1:4,3:3].
If you google it (I'm too lazy at the moment to find it) you can
Ok, I think I found what actually was happening.
If I have a library already on the system path Pkg skips the building step.
This is fine but the message it gives is kind of confusing. It outputs the
following info which made me believe it was building something from the
source but in fact it
48 matches
Mail list logo