and is not an operator in Julia, try .
On Jul 21, 2015, at 11:25 AM, Elsha Robin elisha@gmail.com wrote:
well i thought i should give julia a whirl since it got so much chatter
around it , so i thought i could start of slow and simple and i run into a
tree sort of ... so the problem
The and operator is spelled .
On Tuesday, July 21, 2015 at 10:53:50 AM UTC-5, Elsha Robin wrote:
well i thought i should give julia a whirl since it got so much chatter
around it , so i thought i could start of slow and simple and i run into a
tree sort of ... so the problem is that i
f(floor(x); args...) should work.
On Tue, Jul 21, 2015 at 10:14 AM, Linus Härenstam-Nielsen
linush...@gmail.com wrote:
I am looking for a way to automatically pass on all keyword arguments
through a function. Naively I would like to be able to do something like
this:
f(x::Int; y::Int=5,
This worked! Didn't realize you could use ; when calling functions.
On Tuesday, July 21, 2015 at 4:49:36 PM UTC+2, Stefan Karpinski wrote:
f(floor(x); args...) should work.
On Tue, Jul 21, 2015 at 10:14 AM, Linus Härenstam-Nielsen
linu...@gmail.com javascript: wrote:
I am looking for a
a(20)==b(50) and c(j)==a(k)
This is not a valid expression: you need to use instead of and. see
http://docs.julialang.org/en/release-0.3/manual/control-flow/?highlight=boolean#man-short-circuit-evaluation
(do also read the Performance Tips before you get too far along:
On Tuesday, July 21, 2015 at 1:44:27 AM UTC-4, Jeff Waller wrote:
Whenever PyPlot renders something, I'm getting a brief flashed window; I
think it's a result of the backend
trying to render in a window directly, but can't find a way to disable it.
What OS are you on, and what Python
Guys, I need to know if we can create mouse events using pyplot in Julia?
And how?
Thanks
That is,
julia f(x::Int, y::Int=5, z::Int=3) = x+y+z
f (generic function with 3 methods)
julia f(x::Float64, args...) = f(floor(Int,x), args...)
f (generic function with 4 methods)
julia f(5.0,1,2)
8
julia f(5.0)
13
On Tuesday, July 21, 2015 at 7:53:01 AM UTC-7, Seth wrote:
On Tuesday,
well i thought i should give julia a whirl since it got so much chatter
around it , so i thought i could start of slow and simple and i run into a
tree sort of ... so the problem is that i compared the results of two
functions in an if statement with an and operator but it spiting some very
The Google Groups view of this thread is very slow to update. All together
now!
On Tuesday, July 21, 2015 at 11:02:30 AM UTC-5, Patrick O'Leary wrote:
The and operator is spelled .
On Tuesday, July 21, 2015 at 10:53:50 AM UTC-5, Elsha Robin wrote:
well i thought i should give julia a
There's tons of WIP-code that implements arithmetic on Distributions. No
one has the time to finish that code or volunteer to maintain it, so it's
just sitting in limbo.
OP: What you're asking for sounds like it's largely equivalent to
probabilistic programming. There are a ton of ways you
On Tue, Jul 21, 2015 at 10:48 AM, Stefan Karpinski ste...@karpinski.org wrote:
f(floor(x); args...) should work.
Relevant documentation is here[1] in case you have other confusions
about keyword arguments.
[1] http://julia.readthedocs.org/en/latest/manual/functions/#keyword-arguments
On Tue,
maybe it should check to see if the end matches?
@glen - i think that will construct an ascii string, which isn't what you
want if the underlying data are unicode. i've always assumed string() does
something smart and returns the right thing, but haven't checked...
andrew
On Tuesday, 21
On Tuesday, July 21, 2015 at 7:14:02 AM UTC-7, Linus Härenstam-Nielsen
wrote:
I am looking for a way to automatically pass on all keyword arguments
through a function. Naively I would like to be able to do something like
this:
f(x::Int; y::Int=5, z::Int=3) = x+y+z
f(x::Float64;
http://matplotlib.org/users/event_handling.html
On Tue, Jul 21, 2015 at 12:34 PM, Emerson Vitor Castelani
emersonvi...@gmail.com wrote:
Guys, I need to know if we can create mouse events using pyplot in Julia?
And how?
Thanks
I have data in txt file, some milons like this:
0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,1
0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1
Coding win1250.
size of dane.txt is 1.3 GB
D=readcsv(dane.txt)
k,l=size(D)
using HDF5, JLD
hfi=h5open(D.h5,w)
close(hfi)
fid = h5open(D.h5,r+)
Hi
I got the following example related with this thread
https://gist.github.com/elsuizo/5338605a6a5c7ab54730
but fail in
https://gist.github.com/elsuizo/5338605a6a5c7ab54730#file-phase_portrait_mouse_event-jl-L114
and I do not know why
This is the python code which comes:
Well, I already tried this , but I don't get to do work!Does canvas and
mpl_connect work in Julia?
Em terça-feira, 21 de julho de 2015 13:38:06 UTC-3, Isaiah escreveu:
http://matplotlib.org/users/event_handling.html
On Tue, Jul 21, 2015 at 12:34 PM, Emerson Vitor Castelani
for every time that you wanted to stick some weird value in a type
parameter and couldn't.
https://github.com/andrewcooke/AutoTypeParameters.jl
andrew
ah
https://julia.readthedocs.org/en/latest/manual/profile/#man-track-allocation
thanks. although i am not seeing any mem files for some reason. i will
try updating julia to latest.
oh. i do now! doesn't seem to work with Pkg.test(), but does if you just
execute commands at the prompt.
What OS are you on, and what Python distro? I haven't noticed this...
OS/X Mavericks, Python 2.7.5 (Apple default)
matplotlib 1.1.1
Julia Version 0.4.0-dev+6075
Commit 4b757af* (2015-07-19 00:53 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM)
HDF5 file support compression. This is enabled via a flag when writing the
file; when reading, it is automatically decompressed. I assume that
compression would greatly reduce the file size.
-erik
On Tue, Jul 21, 2015 at 1:21 PM, Stefan Karpinski ste...@karpinski.org
wrote:
In your example
In your example data, each value is represented with two bytes: one for the
value, one for a comma or newline. Each Int64 value is 8 bytes. If all your
values are between 0 and 255, you could use UInt8 to represent them and cut
the size in half.
On Tue, Jul 21, 2015 at 1:16 PM, paul analyst
unfortunately, the semantics for the match don't seem to be the same.
if you use a substring then ^ binds to the start of the substring.
if you use match(...) with an offset then ^ binds to the start of the
underlying string.
at least, that's how i understand the following:
julia match(r^\s,
immutable my_t
a::Cint
b::Cint
c::Cint
bufs::Ptr{Ptr{Void}}
flags::Cint
procFunc::Ptr{Void}
resetFunc::Ptr{Void}
end
On Tue, Jul 21, 2015 at 7:21 PM, Dave C dave.cr...@gmail.com wrote:
I'm trying to wrap some C code that has a struct in a
(SortedDict is already in DataStructures.jl. To be added are
SortedMultiDict and SortedSets.)
Cheers!
On Tue, Jul 21, 2015 at 4:43 PM, Yichao Yu yyc1...@gmail.com wrote:
On Tue, Jul 21, 2015 at 7:37 PM, Benjamin Deonovic bdeono...@gmail.com
wrote:
A few clarifying questions. I believe that
Thanks for the responses! I wasn't not sure how I could use typealiases to
deal with this, so I went with the macro route and ended up with
https://gist.github.com/darwindarak/0eb5e53c21c896392938. It converts the
functions/type declarations into the parametric form suggested by Mauro.
On
More to do:
Expressions would also have to be escaped from quoting.
If we can't scope types within dicts, it might be necessary to have special
markers for types so they can avoid being scoped.
I don't think that macros will be necessary anymore
On Wednesday, July 22, 2015 at 11:14:38 AM
yeah, i guess in this case that's what the lib wants, so you need to force
conversion if you don't have utf8.
On Tuesday, 21 July 2015 21:25:09 UTC-3, Yichao Yu wrote:
And from the code I pasted, `utf` should probably do the copy you want.
Ok so I've got a good start. I bet John Myles White didn't think I could
get this far. Anyway, I'm getting caught up in defining my own escape
function. I'm getting lost in multiple layers of meta.
using DataFrames
import Base.convert
# allow inheritance from modules
function
Yes, that could be even more effective.
On Tue, Jul 21, 2015 at 2:09 PM, Erik Schnetter schnet...@gmail.com wrote:
HDF5 file support compression. This is enabled via a flag when writing the
file; when reading, it is automatically decompressed. I assume that
compression would greatly reduce
Is there any way to merge partitions together? For instance, could I do
something like merge(partitions(1:n, 2), partitions(1:n, 3))? I essentially
want to create one iterable object out of both of them.
Thank you so much for your help. I fixed the problem of writemime calling
display and am using the latest IJulia master. I can get (some) markdown to
display correctly when the button is clicked (though line breaks don't work
as expected). However, I have two problems:
1. I can't get LaTeX
I had a similar problem...I don't know why...
Em terça-feira, 21 de julho de 2015 14:46:41 UTC-3, El suisse escreveu:
Hi
I got the following example related with this thread
https://gist.github.com/elsuizo/5338605a6a5c7ab54730
but fail in
Please describe what you tried and what was the error. You may need to
either 1) yield the event loop 2) make sure the program stays open long
enough to actually display your plot (ref:
https://github.com/stevengj/PyPlot.jl/issues/41)
On Tue, Jul 21, 2015 at 2:53 PM, Emerson Vitor Castelani
Not related, but how do you edit the thread name in order to mark it as
SOLVED? I haven't found a way to do this, thanks!
El lunes, 20 de julio de 2015, 14:09:00 (UTC-5), Kaj Wiik escribió:
I started to get a strange error while debugging my code, here's a
simplified example:
julia
Or use typealiases?
On Tuesday, July 21, 2015 at 4:48:31 PM UTC-4, David Gold wrote:
My instinct is to write a macro.
On Tuesday, July 21, 2015 at 4:37:03 PM UTC-4, Darwin Darakananda wrote:
Hi all,
I'm in the process of replacing my Union{Nothing, T} annotations to
Nullable{T}, but I'm
would a MongoDB JDBC driver paired with JDBC.jl
be feasible for your purposes ... ?
https://groups.google.com/forum/#!topic/julia-users/qqOTu4XL1HI
good luck,
cdm
Thank you both! I get it now:
julia let
x::Float64 = 5
x
end::Float64
5.0
El lunes, 20 de julio de 2015, 23:03:03 (UTC-5), Ismael VC escribió:
This was surprising:
julia versioninfo()
Julia Version 0.4.0-dev+5491
Commit cb77503 (2015-06-21 09:45 UTC)
Hi all,
I'm in the process of replacing my Union{Nothing, T} annotations to
Nullable{T}, but I'm getting stuck when T is a parametric type. For
example, replacing the function
function myfunc(v::Union{Nothing, Vector})
...
end
with
function myfunc(v::Nullable{Vector})
...
end
makes
If I understand correctly, this should do:
function myfunc{T:Vector}(v::Nullable{T})
...
end
On Tue, 2015-07-21 at 22:37, Darwin Darakananda darwinda...@gmail.com wrote:
Hi all,
I'm in the process of replacing my Union{Nothing, T} annotations to
Nullable{T}, but I'm getting stuck when
My instinct is to write a macro.
On Tuesday, July 21, 2015 at 4:37:03 PM UTC-4, Darwin Darakananda wrote:
Hi all,
I'm in the process of replacing my Union{Nothing, T} annotations to
Nullable{T}, but I'm getting stuck when T is a parametric type. For
example, replacing the function
On Tue, Jul 21, 2015 at 8:19 PM, andrew cooke and...@acooke.org wrote:
maybe it should check to see if the end matches?
My guess, is that this is an optimization that won't have too much
benefit because in most cases you can just call `match` with a start
idx.
@glen - i think that will
Hehe, I think you can't.
I marked it as solved from the start because, well, the problem itself was
solved already :-).
About error messages, I think Simons suggestion $T is not iterable...
would have lead me to the correct conclusion bit faster...
Anyway, thanks for a good discussion and
string(bytestring(...)) seems to do it. would appreciate any more
efficient solutions (and confirmation the analysis is correct - is this
worth filing as an issue?)
On Tuesday, 21 July 2015 19:33:05 UTC-3, andrew cooke wrote:
well, this was fun... the following code rapidly triggers the
does `copy` work? although `bytestring` also seems like a good method for
this also. it seems wrong to me also that `match` is making a copy of the
original string (if that is indeed what it is doing)
On Tue, Jul 21, 2015 at 6:57 PM andrew cooke and...@acooke.org wrote:
string(bytestring(...))
(i was quite impressed that reverse(reverse(...)) didn't help either).
On Tuesday, 21 July 2015 20:11:35 UTC-3, andrew cooke wrote:
deepcopy didn't. i haven't actually tried copy. hang on... [computer
hangs; oom killer steps in]. nope!
On Tuesday, 21 July 2015 20:08:33 UTC-3, Jameson
deepcopy didn't. i haven't actually tried copy. hang on... [computer
hangs; oom killer steps in]. nope!
On Tuesday, 21 July 2015 20:08:33 UTC-3, Jameson wrote:
does `copy` work? although `bytestring` also seems like a good method for
this also. it seems wrong to me also that `match` is
On Tue, Jul 21, 2015 at 7:08 PM, Jameson Nash vtjn...@gmail.com wrote:
does `copy` work? although `bytestring` also seems like a good method for
this also. it seems wrong to me also that `match` is making a copy of the
original string (if that is indeed what it is doing)
Isn't it `s[i:end]`
well, this was fun... the following code rapidly triggers the OOM killer
on my machine (julia 0.4 trunk):
s = repeat(a, 100)
l = Any[]
r = r^\w
for i in 1:length(s)
m = match(r, s[i:end])
push!(l, m.match)
end
note that: (1) the regexp is only matching one character, so the array
Probably not since it's oriented towards RDBMS. Thanks
On Tue, Jul 21, 2015 at 7:11 PM, cdm cdmclean@gmail.com wrote:
would a MongoDB JDBC driver paired with JDBC.jl
be feasible for your purposes ... ?
https://groups.google.com/forum/#!topic/julia-users/qqOTu4XL1HI
good luck,
Running 0.4.0-dev+5933. I expected the print outs from this code to be the
same and to equal zero. What am I doing wrong? Thanks in advance.
addprocs(4);
@everywhere function test(state)
return state.^2.0
end
const n = 1;
const m = 1;
states = randn(n);
store = zeros(n,m);
for i =
i think that returns a substring (ir a view onto the backing string). but
i am not sure. i did read a discussion somewhere saying that because of
this you should use bytestring(...) before passing a string to c. which is
all the evidence i have for my guess.
incidentally, match(...) has a
hmm. ignore that last statement (same problem). still checking /
confused. sorry.
On Tuesday, 21 July 2015 20:20:46 UTC-3, andrew cooke wrote:
i think that returns a substring (ir a view onto the backing string). but
i am not sure. i did read a discussion somewhere saying that because
ok, so match(regex, string, index) solves the problem. presumably it
exists exactly for this reason?
andrew
On Tuesday, 21 July 2015 20:23:57 UTC-3, andrew cooke wrote:
hmm. ignore that last statement (same problem). still checking /
confused. sorry.
On Tuesday, 21 July 2015
On Tue, Jul 21, 2015 at 7:26 PM, andrew cooke and...@acooke.org wrote:
ok, so match(regex, string, index) solves the problem. presumably it exists
exactly for this reason?
At least I think this is a valid usecase.
andrew
On Tuesday, 21 July 2015 20:23:57 UTC-3, andrew cooke wrote:
ah. for some reason i was thinking they were invisible (somewhere below
julia).
ok, thanks. so that explains things more clearly
...except that(!) using SubString(s, i, endof(s)) and passing *that* to
match still gives the memory issue.
so there's still something odd that i don't
A few clarifying questions. I believe that when you iterate over julia
Dicts, the iteration is not necessarily in any particular order (i.e. if
keys are alpha-numeric it is not necessarily in sorted order, or it is not
necessarily in order the keys were inserted). Is that correct?
If I set
Hi there,
I'd like to try some event driven programming, where a segment of code is
set to run, but only when an event occurs - think like EventListeners in
Node.js.
I think this should be pretty easy with Julia's Scheduler, and I'm
currently going over the standard library reference
I've been using ascii().
On Tuesday, July 21, 2015 at 7:38:28 PM UTC-4, andrew cooke wrote:
ah. for some reason i was thinking they were invisible (somewhere below
julia).
ok, thanks. so that explains things more clearly
...except that(!) using SubString(s, i, endof(s)) and passing
On Tue, Jul 21, 2015 at 7:37 PM, Benjamin Deonovic bdeono...@gmail.com wrote:
A few clarifying questions. I believe that when you iterate over julia
Dicts, the iteration is not necessarily in any particular order (i.e. if
keys are alpha-numeric it is not necessarily in sorted order, or it is
On Tue, Jul 21, 2015 at 7:38 PM, andrew cooke and...@acooke.org wrote:
ah. for some reason i was thinking they were invisible (somewhere below
julia).
ok, thanks. so that explains things more clearly
...except that(!) using SubString(s, i, endof(s)) and passing *that* to
match still
I'm trying to wrap some C code that has a struct in a header. I'm trying
to create a Julia type that emulates the following struct:
typedef struct
{
int a;
int b;
int c;
void* *bufs;
int flags;
void* procFunc;
void* resetFunc;
} my_t;
I'm fine with everything except
Surprising it may be, but also sensible. An assignment always returns the
assigned value, not the variable it is assigned to:
let
x::Float64 = 5
x
end::Float64
I think there's something in the docs that describes that behaviour, but I
can't seem to find it right now...
Am Dienstag,
@anon builds a type for you, creates a field called w, and defines call() for
that type. IF you're running julia 0.4, that is.
My point was simply, as a busy person I haven't read this long email chain
through and might forget about it. If there's something you want fixed, best to
file an
On Monday, July 20, 2015 08:19:43 PM John Brock wrote:
Isn't that what DArrays are for, though?
With a DArray, each chunk is local to only one process. That makes it really
expensive to read data from other chunks. With SharedArrays, you have fast
read access to the whole thing. But you have
Strange. That commit is present in the repository: see
https://github.com/timholy/HDF5.jl/commits/master
Anyone else having the same problem?
I just did this and it went off without a hitch (julia-old is my installation
of the 0.3 release):
$ mkdir /tmp/packages
$ JULIA_PKGDIR=/tmp/packages
Hm, just tried Pkg.update() on 0.4.0-dev+5955 and I got the new version of
HDF5 without any problems, so there's probably something wonky going on
with Pkg on my 0.3.10.
Is there anything I can do to try and reset Pkg, short of nuking my whole
~/.julia/v0.3 directory and starting over?
On Tue,
You could try Pkg.rm(HDF5) and then delete the HDF5 directory in
~/.julia/.cache.
--Tim
On Tuesday, July 21, 2015 06:45:55 PM Roger Herikstad wrote:
Hm, just tried Pkg.update() on 0.4.0-dev+5955 and I got the new version of
HDF5 without any problems, so there's probably something wonky going
It’s because assignment returns the right-hand operand. In other words,
x::Float64
= 5 returns 5, not convert(Float64, 5).
Thus, the type assertions on the last statements of your let blocks
actually *don’t* make sure that the *return value* is of a certain type.
Try
julia let
x =
But I think Julia started off as very intuitive and educational and I hope
it will continue on this road =)
+ 1e1e1e...
Ah, of course. Thanks! It works now. Sorry for the noise.
On Tue, Jul 21, 2015 at 6:51 PM, Tim Holy tim.h...@gmail.com wrote:
You could try Pkg.rm(HDF5) and then delete the HDF5 directory in
~/.julia/.cache.
--Tim
On Tuesday, July 21, 2015 06:45:55 PM Roger Herikstad wrote:
Hm, just
Ok, I think with the latest master branch this should work now, could you
please try to run
Pkg.checkout(NetCDF)
and then try to read your file again?
Dear all,
I don't know if that's the best place to ask such a question but I'll give
it a try: I need to code stochastic models:
xnplus1 = f(xn, theta)
where xn is the state of my system at time n and theta is a set of
parameters for this model, constant through time, and possibly containing
You should probably raise an issue on the NetCDF.jl
repository: https://github.com/meggart/NetCDF.jl/issues
On Tuesday, 21 July 2015 04:56:10 UTC+1, RBhupi wrote:
I havent done much with Julia yet so cant provide more info at this time.
ncinfo and ncread fails when the time axis is of type
I am currently working on a fix, so far reading and writing NC_LONG data
was not supported, I will push the changes later today.
Fabian
Hi, I just spoke to Jesse Davis, the author and maintainer of the C Mongo
driver, and he gave me some precious advice. The C driver passes the YAML
tests. Using this driver's public API will also get me the implementation
of two specs right away and for free: the Server Selection Spec and the
Hello again,
Unfortunately and let me apologize in advance I still find myself confused
on how to make things
work properly.
Here are the symbolic links. I believe with some simple changes to Cxx,
the need for these
will disappear, but for now there's where it searches.
i can't see how to get a dump of objects on the heap, or tools to analyse
that dump.
In 0.4 there is a new --track-allocation command-line option that might
help. If you don't mind reading LLVM IR, you can also look for calls to
jl_gc_allocobj (or just allocobj in 0.3).
On Tue, Jul 21, 2015
If you don't do this, you get all kinds of spam on the list, mostly from
recruiters.
On Mon, Jul 20, 2015 at 9:53 PM, Kevin Squire kevin.squ...@gmail.com
wrote:
On Mon, Jul 20, 2015 at 4:39 PM, Yichao Yu yyc1...@gmail.com wrote:
On Mon, Jul 20, 2015 at 7:31 PM, Kevin Squire
In general, f(x,theta) does not necessarily belong to any
frequently used distribution family, even if theta does -- it is
easy to come up with examples.
Some distribution families are closed under certain operations (eg
addition, and multiplication by scalars for the normal), and some
hi,
i feel i must be missing something obvious, sorry, but i can work out what
tools are available for understanding memory leaks inside my own julia
code. this isn't an issue with julia itself - it's my own dumb fault. but
i can't see how to get a dump of objects on the heap, or tools to
I am looking for a way to automatically pass on all keyword arguments
through a function. Naively I would like to be able to do something like
this:
f(x::Int; y::Int=5, z::Int=3) = x+y+z
f(x::Float64; args...) = f(floor(x), args...)
But that doesn't work currently (actually, it causes
83 matches
Mail list logo