On Wednesday, 4 February 2015 16:59:14 UTC, Avik Sengupta wrote:
I don't understand your domain of course, but the way I'd do this would be
a slight variant of OPTION 1
get_forces(a::AbstractAtom) = error(All AbstractAtom subtypes should
implement get_forces)
get_forces(a::Atom) =
I don't understand your domain of course, but the way I'd do this would be
a slight variant of OPTION 1
get_forces(a::AbstractAtom) = error(All AbstractAtom subtypes should
implement get_forces)
get_forces(a::Atom) = get_forces(a.calc)
I think the point to ponder is, what amount of commonality
For me, option 1 looks the most Julian. Maybe the clunkiness is arising
because the calc object shouldn't be a field of Atoms? Fields are just
suppose to store data, not logic or methods. If a certain subtype of
AbstractAtoms always uses the same calc object, then dispatching just on
the atoms
I'm happy to announce the availability of LightGraphs, available at
https://github.com/sbromberger/LightGraphs.jl
https://github.com/sbromberger/LightGraphs.jl.
LightGraphs is an optimized simple graphs package designed for fast
analysis using standard functions. It seeks to mimic the
Many thanks for the discussion.
On Wednesday, 4 February 2015 16:46:09 UTC, Josh Langsfeld wrote:
For me, option 1 looks the most Julian. Maybe the clunkiness is arising
because the calc object shouldn't be a field of Atoms? Fields are just
suppose to store data, not logic or methods.
I don't know why the word functor was originally used in Julia for
function-like type, but it doesn't seem to have anything to do with the
functional programming / haskell / category theory functor (or any
particular relevance to monads). Might be a good idea to use a different
term since it
I don't understand your domain of course, but the way I'd do this would be
a slight variant of OPTION 1
get_forces(a::AbstractAtom) = error(All AbstractAtom subtypes should
implement get_forces)
get_forces(a::Atom) = get_forces(a.calc)
this is indeed what I've done at the moment. Good to
Sorry, disregard that last sentence which was supposed to have been edited
out.
On Wednesday, February 4, 2015 at 11:46:09 AM UTC-5, Josh Langsfeld wrote:
For me, option 1 looks the most Julian. Maybe the clunkiness is arising
because the calc object shouldn't be a field of Atoms? Fields are
I'm thinking, given that the phase map was produced by applying
Base.angle() on another (complex) matrix (say we call it M), it is this
function which caused the phase wrapping in the first place, right? So
can't I somehow get around the problem and produce the unwrapped map
directly from M?
On Wednesday, 4 February 2015 16:59:14 UTC, Avik Sengupta wrote:
I don't understand your domain of course, but the way I'd do this would be
a slight variant of OPTION 1
get_forces(a::AbstractAtom) = error(All AbstractAtom subtypes should
implement get_forces)
get_forces(a::Atom) =
Given this simple graph:
plot(x=1:12,y=rand(5), Guide.xticks(ticks=[1:12]))
where the 12 values correspond to the months January through December.
Instead of seeing 1 ..12 along the x-axis, I'd like to see the month names.
Is this possible?
Hi Petr,
I would be curious to learn details of what you did.
How did you define the reference solution? I presume it is the value of
the solution at some point in time?
Did you use extrapolation to the limit?
thanks for the interest. I just followed the established path:
thought one problem with not having proper inheritance is that this
doesn't really help?
I meant more about commonality of behaviour.
I think this goes exactly in the direction that I discuss in the last post?
I just assume for the Abstract versions of the different types how they
will
On Feb 4, 2015, at 11:04 , Mike Innes mike.j.in...@gmail.com wrote:
I don't know why the word functor was originally used in Julia for
function-like type, but it doesn't seem to have anything to do with the
functional programming / haskell / category theory functor (or any particular
call:
t = dlopen(libglobvar)
dlsym(t,:__global_variables_MOD_emdata_read_input)
get:
Ptr{Void} @0x7f464e98e9d5
non-zero, i guess.
For users of Sublime Text, I have made an interface to Lint.jl that is
available on my github
( https://github.com/tomaskrehlik/SublimeLinter-contrib-julialint ). I do
not have an opportunity to test it on Windows or Linux and make workable
default for the bash scripts so if anybody would be
This is quite compact:
julia a=IntSet([1:10])
IntSet([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
julia [a...]
10-element Array{Int64,1}:
1
2
3
4
5
6
7
8
9
10
Note that you can add a convert method for it yourself, which would work
just as well as having one in Base. But of course maybe
On Wed, Feb 4, 2015 at 2:29 PM, Christoph Ortner christophortn...@gmail.com
wrote:
If I read this correctly, then what you are saying is that I am allowed to
assume that my concrete abstract subtypes will contain certain fields, and
if they don't then too bad for them, they need to go and
Pair is defined as
immutable Pair{A,B}
first::A
second::B
end
, so it is type specialized with two parameters A and B.
Pair has its own syntax key = value and is used extensively with dicts.
Ivar
onsdag 4. februar 2015 19.58.42 UTC+1 skrev Seth følgende:
I stumbled across Pair by
It appears to be possible to convert an array of integers to an IntSet,
using for example a function of the form IntSet(IntegerArrayName), but it
does not appear possible to back-convert, using a function of the form
int(IntSetName) or convert(Array{Int64,1},IntSetName)
The back-conversion
Since IntSets are iterable containers of Ints, you can simply `collect` its
contents: `collect(IntSet([1:100]))`
On Wednesday, February 4, 2015 at 2:19:48 PM UTC-5, Michael Wojnowicz wrote:
It appears to be possible to convert an array of integers to an IntSet,
using for example a function
Thanks to both Jacob and Ivar. I don't know how I missed the type
specialization.
Still, I'm not quite sure what the use case is. I guess it makes sense as a
reference to a single k,v pair in a dict, which is what Ivar was alluding
to, I guess. I still am not sure that it would an appropriate
Actually, Pairs *are* type specialized, as can be seen by their definition.
# Pair
immutable Pair{A,B}
first::A
second::B
end
const = = Pair
Notice the {A,B} type parameters. The second `const = = Pair` in
combination with `=` being infix, allows for convenient Dict construction
by
When you pass a string to a Fortran routine you should also pass the length
of the string (tipically as an integer passed by value as the last
element).
The latest C interoperability features of Fortran will give you a more safe
and portable way to do it consistently.
:-)
Il giorno lunedì
I'm very much enjoying thinking about this and considering what might be
the most Julian approach
I thought one problem with not having proper inheritance is that this
doesn't really help? Even small variations across AbstractAtoms types
require a full implementation?
Actually, I don't think
On Wednesday, 4 February 2015 17:46:58 UTC, Christoph Ortner wrote:
On Wednesday, 4 February 2015 16:59:14 UTC, Avik Sengupta wrote:
I don't understand your domain of course, but the way I'd do this would
be a slight variant of OPTION 1
get_forces(a::AbstractAtom) = error(All
I stumbled across Pair by accident and didn't find anything in the way of
docs, so I started playing with it and looking at the source.
I can't figure out what the use case might be. It doesn't appear to be
type-optimized; that is, it doesn't use type parameterization to provide
On Wednesday, 4 February 2015 18:30:06 UTC, Josh Langsfeld wrote:
I'm very much enjoying thinking about this and considering what might be
the most Julian approach
I thought one problem with not having proper inheritance is that this
doesn't really help? Even small variations across
Nevermind. Found the collect() function.
On Wednesday, February 4, 2015 at 11:19:48 AM UTC-8, Michael Wojnowicz
wrote:
It appears to be possible to convert an array of integers to an IntSet,
using for example a function of the form IntSet(IntegerArrayName), but it
does not appear possible
Hi,
I am new at Julia 0.3.5 win32, installed the the ZMQ 2.2.0 package. The
runtests.jl ran without problem with ZMQ 3, however it fails when using ZMQ
2.2.0.
The output was:
Testing with ZMQ version 2.2.0
ERROR: StateError(Resource temporarily unavailable)
in recv at
On Wednesday, 4 February 2015 20:02:43 UTC, Josh Langsfeld wrote:
On Wed, Feb 4, 2015 at 2:29 PM, Christoph Ortner christop...@gmail.com
javascript: wrote:
If I read this correctly, then what you are saying is that I am allowed to
assume that my concrete abstract subtypes will contain
Yeah, this has come up a few times, so we should probably provide a better
interface in the conversion functions (
http://julia.readthedocs.org/en/latest/stdlib/dates/#conversion-functions)
Currently, you can do
DateTime(Dates.UTM(6352421760))
to get what you want.
-Jacob
On Wed, Feb 4,
are multiline comments documented? nothing comes up when searching in the
manual.
What I ended up implementing is a dict that can be dynamical created.
Here's the code for it but the dict member are blank initialised.
# names of parameters to be based to make_dictionary
ttype_names_final = {
LAMBDA
EW
SIGMA1_RESULT
SIGMA3_RESULT}
@eval function
I have a lot of time-stamped data (from a sensor). The physical unit of the
time-stamps is milliseconds from some known instant of time. The natural
type for these in Julia would be DateTime. But instead of simply
constructing DateTime directly from my millisecond time-stamps, e.g.
julia
Thanks! Scale.x_discrete was the clue I needed. And I didn't realise you
could use dates directly...
On Tuesday, February 3, 2015 at 7:46:33 PM UTC-8, Amit Murthy wrote:
Are p3eccentricity and eccentricity defined on all workers? If they are
in a module, the module must be loaded on all workers. If the module has
been loaded try calling it as @spawn Module.eccentricity .
Thanks,
I don't know why the word functor was originally used in Julia for
function-like type, but it doesn't seem to have anything to do with the
functional programming / haskell / category theory functor (or any
particular relevance to monads). Might be a good idea to use a different
term since it
I'm trying to find a memory bug where all of a sudden my program freezes
and eats up all the memory.
I tried to do some printing, and tried to understand which line of code is
responsible for causing the memory leak to happen.
The print statement looks like this:
println(computing cost for...,
Thanks for filing the issue. For future reference, could you post the issue
link here too? This is exactly why we have peakflops(), to detect all these
various idiosyncracies. There should ideally be no difference, since, IIRC
we are using the same OpenBLAS version in 0.3 and 0.4.
-viral
On
I am using Julia Version 0.3.4 (2014-12-26 10:42 UTC)( Official release,
x86_64-w64-mingw32) coming with Juno bundle on Win7 64 bits
I have both Anaconda-python27(which is 32 bits) and
python-3.4.2.amd64(which is 64 bits)
But I can't let PyCall run, so I traced it and found that dlopen could
But why a 32bit application can run 64bit OS no problem?
Microsoft puts an incredible emphasis on (and resources towards) backward
compatibility:
http://en.wikipedia.org/wiki/WoW64
Can dlopen supports both 32 and 64 bits module?
No, WoW64 doesn't go quite that far. DLL architecture must
You can run 32 bit applications in 64 bit OS, but you have to use only 64
bit DLL/libraries in 64 bit applications.
It is not available because they use different size of memory address.
2015년 2월 5일 목요일 오후 2시 46분 22초 UTC+9, 进陆 님의 말:
I am using Julia Version 0.3.4 (2014-12-26 10:42 UTC)(
I think the issue has already come up
[here](https://github.com/JuliaLang/julia/issues/3427) and the discussion
[here](https://github.com/JuliaLang/julia/issues/1470) is also related. As
others have mentioned, this should be possible in v0.4 but isn't possible
in v0.3.x. Personally, on v0.3 at
I have a 5.9-million line logfile that starts with dates of the format Jan
23 14:15:16. I am converting these to DateTime via
mkdt(dts::AbstractString) = DateTime(dts, uuu dd HH:MM:SS) + Dates.Year(
2014)
and calling mkdt via
words = split(l)
dt = mkdt(join(words[1:3], ))
On Wednesday, February 4, 2015 at 8:54:27 AM UTC-8, Andrei Berceanu wrote:
I'm thinking, given that the phase map was produced by applying
Base.angle() on another (complex) matrix (say we call it M), it is this
function which caused the phase wrapping in the first place, right? So
can't I
On Thursday, February 5, 2015 at 8:05:46 AM UTC+11, Ben Arthur wrote:
are multiline comments documented? nothing comes up when searching in the
manual.
See http://docs.julialang.org/en/latest/stdlib/punctuation/#punctuation
Cheers
Lex
Thanks for testing that out Keith. Glad to hear the WinRPM binaries work
well. Sounds like we just need to tag the latest master of ZMQ so everyone
can get this version via Pkg.update. I've had it on ZMQ master for a while
but was looking to hear from someone that it worked better than the
Convex.jl https://github.com/JuliaOpt/Convex.jl is a Julia library for
mathematical programming that makes it easy to formulate and fast to solve
nonlinear convex optimization problems. Convex.jl
https://github.com/JuliaOpt/Convex.jl is a member of the JuliaOpt
https://github.com/JuliaOpt
Hi Tony,
Thank you very much for your detail instructions - it now works!
Many thanks also for the maintainer of the ZMQ package.
I have now linked up Metatrader 4 to Julia 0.3.5 using ZMQ 2.2.0 and my
simple code is collecting real time tick data.
Now my next task is to learn the reactive
Hey Seth,
I should probably add a little documentation on this, but you're basically
going to want to take the same approach as the vectorized DateTime parsing
function (see here: http://goo.gl/0z6jI8).
Basically, you can create a `DateFormat` object once, and pass that to the
`DateTime`
This is so so cool, Madeleine. Thank you for sharing. I'm a huge fan of
DCP, ever since I took a convex optimization course here at the UW (which
of course featured cvx and Boyd's book) and seeing this in Julia makes me
smile.
-E
On Wed, Feb 4, 2015 at 5:53 PM, Madeleine Udell
I have successfully defined a custom array Ngram.
type Ngram : AbstractArray{ASCIIString,1}
seq::ASCIIString
n::Int
end
function getindex(s::Ngram, i::Int)
s.seq[i:i+s.n-1]
end
function Base.size(s::Ngram)
length(s.seq) - s.n + 1
end
It works as I expected. For example
In
This doesn't directly address your issue (which seems valid and simple to
me) but you can use fill(0, 5) or fill( int64(0), 5) to create a vector
with initialized values.
On Wednesday, February 4, 2015 at 4:00:51 AM UTC-6, Kristoffer Carlsson
wrote:
If you want to allocate an Array you
Le mercredi 04 février 2015 à 02:00 -0800, Kristoffer Carlsson a écrit :
If you want to allocate an Array you can simply write:
julia Array(Int, 5, 1)
10x1 Array{Int64,2}:
2187293504
2151034912
2195818528
2147516504
Now, Vector is a short form for Array{T, 1}. I would then
Sorry, perhaps I did not explain myself :)
One can see the phase oscillates between -\pi and \pi.
I would like to compute how many times the phase changes by 2\pi as one
goes around the origin.
On Wednesday, February 4, 2015 at 1:31:53 AM UTC+1, Steven G. Johnson wrote:
On Tuesday, February
If someone wants to make all and any short circuiting I think that would be
better behavior.
On Feb 4, 2015, at 2:37 AM, Wai Yip Tung w...@tungwaiyip.info wrote:
Thank you. The gist works well.
In situations when I have to use a for loop, is there a way to tell if the
for loop has
Or at least open an issue requesting this feature (and similar for Matrix,
which is another Array alias). But I think you'll find this is a pretty
simple contribution once you figure out the syntax and where to put the
method definitions :-)
On Wednesday, February 4, 2015, Mauro
Hi Mykel,
since some days I try to get PGFPlots running on my Mac. I am using Julia
v.0.3.5 and the Juno Editor. My minimal example is:
x = linspace(1,1.1,1000);
xx = 1./x;
using PGFPlots
plot(xx,real(fft(x)))
This example works within my IJulia Notebook, but not on Juno. I tested the
I was able to successfully build julia from source and run the repl from a
(login) node on the machine. The build procedure was almost identical to
previous attempts (following the instructions provided to use the intel
compilers and MKL, without using any local versions of dependencies), but
I guess what I'm trying to say is that your answer makes sense for
continuous functions, while mine has jumps of 2\pi, and so the phase change
is equal to the total number of these jumps (times 2\pi). Does this make
sense?
On Wednesday, February 4, 2015 at 11:36:51 AM UTC+1, Andrei Berceanu
Wouldn't the answer depend on the path you choose?
On Wed, Feb 4, 2015 at 3:04 PM, Andrei Berceanu andreiberce...@gmail.com
wrote:
I guess what I'm trying to say is that your answer makes sense for
continuous functions, while mine has jumps of 2\pi, and so the phase change
is equal to the
I'm hoping it wouldn't, but it is actually one of the things I would like
to test.
On Wednesday, February 4, 2015 at 3:17:39 PM UTC+1, Michele Zaffalon wrote:
Wouldn't the answer depend on the path you choose?
On Wed, Feb 4, 2015 at 3:04 PM, Andrei Berceanu andreib...@gmail.com
javascript:
There are algorithms that have errors along the lines of
n (log(n) eps)^i
where I assumed that |x_i| ~ 1, and \sum x_i ~ 1, which is what I was
looking into. With this I can go to n \eps^{-1}.
But maybe something like BigFloat would be more practical. I'll look into
that as well -
If you want to allocate an Array you can simply write:
julia Array(Int, 5, 1)
10x1 Array{Int64,2}:
2187293504
2151034912
2195818528
2147516504
Now, Vector is a short form for Array{T, 1}. I would then expect to be able
to allocate a vector using something like this:
julia Vector(Int, 5)
Ah, yes you are right about the Array{Int, 2} stuff.
The reason I want to do this at all is because I have functions taking
Vectors as arguments but then I have to create the vectors that I want to
pass into the function using the Array command. It would somehow feel more
unified if I could
In 0.4, with call overloading, it would now be possible to have a
constructor Vector(Int,5) (this is not possible in 0.3). You could
submit a pull request to add that feature.
On Wed, 2015-02-04 at 11:16, Kristoffer Carlsson kcarlsso...@gmail.com wrote:
Ah, yes you are right about the
I am trying to re-structure a molecular simulation code I've been working
on, to make it more readily extendable. I am puzzling over how to do this
most effectively in Julia, and would appreciate any thoughts from more
experienced Julia programmers. I am roughly trying to mimic the structure
The idiom that seems to be used most commonly in Base is a closure around a
variable hidden in a let scope. Note that your function must be declared
global. See base/combinatorics.jl:L361-L380
You can do something like
plot(x=1:12,y=rand(5), Guide.xticks(ticks=[1:12]), Scale.x_discrete(labels=
Dates.monthname))
The label argument takes in a function that outputs a label.
Alternatively, you can provide the set x to be the dates (either strings
or DateTime type) directly:
x =
It seems you want to unwrap the phase (plus pi) along your path:
https://gist.github.com/ssfrr/7995008
But as you data are quite discrete, I'm not sure it will work. Maybe if you
interpolate.
In [1]:
sutf8=îÎâÂșȘțȚĂ€#¢
Out[1]:
\uee\uce\ue2\uc2\u219\u218\u21b\u21a\u102\u20ac#\ua2
In [2]:
using HttpCommon
In [3]:
si = HttpCommon.encodeURI(sutf8)
Out[3]:
%EE%CE%E2%C2%219%218%21B%21A%102%20AC%23%A2
In [4]:
so = HttpCommon.decodeURI(si)
Out[4]:
\uee\uce\ue2\uc2!9!8!B!A\x102
One thing you can try is removing the installed dll from the tagged version
of the package, do Pkg.checkout(ZMQ); Pkg.build(ZMQ) and try again.
That should use a newer binary from WinRPM which might work better? Not
sure but worth a try.
On Wednesday, February 4, 2015 at 1:10:22 PM UTC-8,
I'm personally very pleased to see this. The JuMP team has worked closely
with the Convex.jl team to make sure that we share a common infrastructure
(through MathProgBase) to talk to solvers, and I don't think it's an
exaggeration to say that this has resulted in an unprecedented level of
I have dealt with the pain of annoying solver interfaces in the past and
just seeing all this come together so cleanly and effortlessly for the user
is a huge differentiator for Julia.
Amazing work Madeleine, and the whole JuliaOpt team. I continue to cheer
from the sidelines.
Perhaps some
Jacob,
Thanks. This is just what I was looking for.
`make -j n` used to work correctly at one point, but bugs in the makefile
dependencies keep creeping in. Usually, I just run one final `make` to make
sure that everything got built correctly.
-viral
On Wednesday, February 4, 2015 at 7:12:14 PM UTC+5:30, Patrick Sanan wrote:
I was able to
Perhaps some blog posts on the whole solver interoperability would be
great to have.
Miles did a notebook for a class
http://nbviewer.ipython.org/github/joehuchette/OR-software-tools-2015/blob/master/6-nonlinear-opt/Nonlinear-DCP.ipynb
some weeks back. If anyone else has written
I was pleasantly surprised to find this:
http://faculty.bscb.cornell.edu/~bien/convexjulia.html
-viral
On Thursday, February 5, 2015 at 9:36:44 AM UTC+5:30, Viral Shah wrote:
I have dealt with the pain of annoying solver interfaces in the past and
just seeing all this come together so
79 matches
Mail list logo