Arithmetic on type parameters has been discussed but is not yet
implemented. See https://github.com/JuliaLang/julia/issues/8322
On Fri, Feb 27, 2015 at 5:50 AM, Devendra Ghate devendra.gh...@gmail.com
wrote:
I only imported MyModule.x and was able to overload MyModule.y
(exported function) as well as MyModule.p (not exported) functions.
As far as I understand, there is no difference between an exported
function and
I would generally strongly recommend doing the runtime check over foisting
this onto function dispatch, if for no other reason than your users will
get a much better error message that specifies what went wrong with their
call, rather than a generic no-method error.
Plus, it will generally be
Anyone know something about this ?
I did not build the latest Julia (master branch) since about 30 days.
Now, when I do 'git pull' and 'make' I am getting various error messages:
could not allocate pools
Aborted
Makefile:165: recipe for target
Thanks for reporting
The error seems to be coming from /src/gc.c#L482
https://github.com/JuliaLang/julia/blob/32aee08d0b833233cd22b7b1de01ae769395b3b8/src/gc.c#L482,
which was added in #8699 https://github.com/JuliaLang/julia/pull/8699 which
was merged 24 Ja
The Tk dialogs can be redefined easily. For example, instead of this line
(https://github.com/JuliaLang/Tk.jl/blob/master/src/dialogs.jl#L4)
GetOpenFile() = tcl(tk_getOpenFile)
You had
GetOpenFile(;kwargs...) = tcl(tk_getOpenFile; kwargs...)
Then you can pass in the named arguments such as
Hello,
is there an option, a pragma (or whatever it can be called), that
enforces variable declaration in a Julia program? I am looking for
something like use strict; in Perl. There could be two options, one for
just declaring variable names (more or less as in Perl), one to force type
There's not currently a way to do latex labels, but you can do superscript
and subscript with html-style tags. In your example, use csup2/sup.
On Friday, February 27, 2015 at 5:49:10 AM UTC-8, Andrei Berceanu wrote:
I am trying to get rendering of LaTeX expressions in Gadfly axes labels,
Guide?
Guide.manual_color_key(Key Title, [Thing One, Thing Two],
[color(red), color(green)]),
Hi Julia-users,
I am trying to run a few simple regressions on simulated data. I had no
problem with a logit and was able to run it using glm and subsequently
match the results with a separate maximum likelihood. I'm having a lot
more trouble with the probit which doesn't seem to want to
I know you can force type declarations using '::'
so
my_int_var::Int64
my_float_var::Float64
now my_int_var requires an Int64 type, and my_float_var requires a Float64
and both will float an error if you attempt to set them equal to a
different type. Although, in all honestly, I'm not sure
How can I implement AtomicUnits promotion? After parameterizing AtomicUnits
abstract type. This is what I have tried:
julia [C(1), H(1.0), H(1//2), C(big(1))]
4-element Array{AtomicUnit{T},1}:
Carbon{Int64}(value = 1 + 0im, valence = 4, degree = 0, free = 4)
Hydrogen{Float64}(value = 1.0 +
I have a 2D plot of 2 layers with different colors:
*using Gadflyplot(layer(x=1:10, y=rand(10), Geom.line, Geom.point,
Theme(default_color=color(red))), layer(x=1:10, y=rand(10),
Geom.line, Geom.point, Theme(default_color=color(green*How can I
generate a legend which specifies
Hello,
I have a question about the best way to implement a grid similar to a mesh
grid:
My first intuition was to do the following:
nx = 256
nb = 195
kx = [-nx/2:-1+nx/2]
tic()
k1 = repmat(kx,1,nx)
k1v = vec(k1)'#/nx
k1m = repmat(k1v,nb,1)
toc()
# 0.0256 sec
Then I tried in one
Hi --
Not a criticism, but rather a question. You put your Julia functions
into IndexedArrays.jl, but put one macro into delegate.jl. Why?
Is this a stylistic thing (i.e. logically separate macro definitions
from functions)? Do other julia developers do this too? I haven't
seen it
Hello
I'm testing the best way to do a grid like, I tried the 2 following
methods:
tic()
k1 = repmat(kx,1,nx)
k1v = vec(k1)'
k1m = repmat(k1v,nb,1)
toc()
# 0.0256
tic()
ka = repeat(kx,outer=[nx,nb])'
toc()
# 0.477
I dont understand why the second way with the one line repeat is 20 times
Tim,
I did edit the documentation README as suggested. I've discovered (I
think), that while one can call the various file dialogs, none of the
options are supported such as specifying file extensions, etc. I'm
gathering those just aren't coded yet. Is there a obvious way to make this
For something somewhat related, there is AxisArrays, a relatively new
package that isn't registered in METADATA, yet:
https://github.com/mbauman/AxisArrays.jl
It's different in that axes of an array can be indexed into with strings or
symbols. There is a plan to add something like
I am trying to get rendering of LaTeX expressions in Gadfly axes labels,
with
*using Gadflyplot(x=1:10, y=rand(10), Geom.line, Geom.point,
Guide.xlabel($c^2$), Guide.ylabel(E))*
however this does not seem to work. Does anyone know how to do it?
//A
As I understand it, you are asking whether there is a Julia option (e.g. a
runtime flag) that will cause Julia to throw an error if you try to parse
code where local variables are not explicitly declared, analogous to use
strict in Perl or implicit none in Fortran.There is no such thing in
I did see that code and tried a bit to make it work, but didn't get
anywhere. I was clueless how to add the keywords. Strings? I could see it
should be doable but not how to do it. I might be able to figure something
out if I had some examples. I should note that I'm competent in MATLAB and
On Fri, 27 Feb 2015, Michael Bullman wrote:
I know you can force type declarations using '::'
so
my_int_var::Int64
my_float_var::Float64
now my_int_var requires an Int64 type, and my_float_var requires a Float64 and
both will float an error if you attempt to set them equal to
a different type.
I see from the definition of the Messagebox function much of what I might
do. I'm having a real problem figuring out how to define the filetypes
however. I looked to Python's tk interface for file dialogs for a clue, but
still got stuck.
Eric
On Friday, February 27, 2015 at 12:06:50 PM UTC-6,
Ok. I'll get to it ASAP. I also tried a completely fresh clone, and I get
the same error.
On Friday, February 27, 2015 at 3:59:52 PM UTC+1, Ivar Nesje wrote:
Thanks for reporting
The error seems to be coming from /src/gc.c#L482
Le vendredi 27 février 2015 à 10:31 -0800, Eric S a écrit :
I see from the definition of the Messagebox function much of what I
might do. I'm having a real problem figuring out how to define the
filetypes however. I looked to Python's tk interface for file dialogs
for a clue, but still got
Well, there isn't one, at least not yet.
KernelDensity.jl (https://github.com/JuliaStats/KernelDensity.jl) can
handle univariate and bivariate data, but only continuous variables.
From what I can tell, the python one handles discrete data by just
separating the data, so you could to that
On Friday, February 27, 2015 at 9:11:10 AM UTC-5, antony schutz wrote:
I have a question about the best way to implement a grid similar to a mesh
grid:
Note that you normally don't need mesh-grid like things, because you can
use broadcasting operations instead. e.g. in order to compute
Thanks for the documentation improvements!
I think such things are implemented for Gtk.jl, but perhaps not Tk.jl. You can
always file an issue with the package; however, it seems that Tk.jl has
received less attention now that Gtk.jl is mature, so who knows when it might
be implemented. You
Yep, that was it! Thanks.
- Jim
On Friday, February 27, 2015 at 4:57:44 AM UTC-6, Tim Holy wrote:
Do you mean something different from
cobj = Array(Uint8, len)
ccall(:foo, void, (Ptr{Void},), cobj)
?
--Tim
On Thursday, February 26, 2015 10:50:51 PM James Crist wrote:
Hi,
I'm new to Julia, so forgive me if I've missed the documentation for this
somewhere. I'm curious how to express the following type relationship
properly in Julia:
function foo{T, n} (
x::Array{T, n},
y::Array{T, n+1} )
### stuff
end
Basically, I want to specify that foo() takes
I actually lifted delegate.jl directly from the DataStructures.jl package.
There it is its own file, I'm guessing because it is the common code used
by many different data structures, each of which is in its own file.
On Friday, February 27, 2015 at 4:37:00 AM UTC-8, Stuart Brorson wrote:
Hi
Thats right and I realized that right after I posted. I'd be fine with
using min and max for types but probably some would oppose that.
2015-02-27 15:42 GMT-05:00 Jutho Haegeman juthohaege...@gmail.com:
I am not opposed to that but the same could be said for typemin and
typemax.
Verstuurd
Or in this particular case, maybe their should be some functionality like
that in Base, or at least in Base.LinAlg, where is often necessary to mix
complex variables and real variables of the same type used to build to
complex variables.
Op donderdag 26 februari 2015 08:10:35 UTC+1 schreef
But I wouldn't overload real; real is for the real value of a value, not
for the real type. Maybe something like realtype , or typereal if we want
to go with the other type... functions.
Op vrijdag 27 februari 2015 21:18:34 UTC+1 schreef Andreas Noack:
I'd like to have something like this.
On Fri, 27 Feb 2015, Steven G. Johnson wrote:
As I understand it, you are asking whether there is a Julia option (e.g.
a runtime flag) that will cause Julia to throw an error if you try to
parse code where local variables are not explicitly declared, analogous
to use strict in Perl or
I'd like to have something like this.
2015-02-27 15:02 GMT-05:00 Jutho juthohaege...@gmail.com:
Or in this particular case, maybe their should be some functionality like
that in Base, or at least in Base.LinAlg, where is often necessary to mix
complex variables and real variables of the same
I think it is fine that the type of the argument determines the behavior
here. Having type in the name would be a bit like having
`fabs(x::Float64)`.
2015-02-27 15:21 GMT-05:00 Jutho juthohaege...@gmail.com:
But I wouldn't overload real; real is for the real value of a value, not
for the real
I am not opposed to that but the same could be said for typemin and typemax.
Verstuurd vanaf mijn iPhone
Op 27-feb.-2015 om 21:27 heeft Andreas Noack andreasnoackjen...@gmail.com
het volgende geschreven:
I think it is fine that the type of the argument determines the behavior
here.
I guess the subtle difference is that, strictly speaking, min and max of
Floating Point types would be ±Inf.
On 27 Feb 2015, at 21:46, Andreas Noack andreasnoackjen...@gmail.com wrote:
Thats right and I realized that right after I posted. I'd be fine with using
min and max for types but
Hello,
Consider the following example from the julia manual page on `modules`.
~~~
module MyModule
export x, y
x() = x
y() = y
p() = p
end
~~~
Load the module by any method makes function `MyModule.p()` available
in the main workspace.
1. `using MyModule`
2. `using MyModule.x`
3.
Le vendredi 27 février 2015 à 12:16 -0800, Eric S a écrit :
Milan,
Thanks for the hint. When I try the following call on my computer (OS
X 10.10.2) it invokes the open file dialog (native too), but all the
files are grayed out and not selectable.
julia z=tcl(tk_getOpenFile,
Hans,
I'm definitely tempted but I want to gauge the interest here first. So far
we have only two of us reporting as being in Berlin and two who will be in
town occasionally. There are git commits coming from Berlin on the map of
Julia commits one of the MIT guys posted a few days ago, but
No, pointer doesn't keep a reference to the original array. See
http://docs.julialang.org/en/latest/stdlib/c/?highlight=pointer#Base.pointer
The second call can be written safely as
ccall((:fun, :lib), Void, (Ptr{Int64},), [1,2])
Of interest:
https://github.com/tonyhffong/Lint.jl
(though I'm not sure if this specific feature is implemented)
On Fri, Feb 27, 2015 at 3:14 PM, Stéphane Goujet stephane.gou...@wanadoo.fr
wrote:
On Fri, 27 Feb 2015, Steven G. Johnson wrote:
As I understand it, you are asking whether there
Ok. Then the manual page on modules should be rewritten. For example,
this line from the manual needs to be changed.
Import also differs from `using` in that functions must be imported
using `import` to be extended with new methods.
I only imported MyModule.x and was able to overload MyModule.y
Do you mean something different from
cobj = Array(Uint8, len)
ccall(:foo, void, (Ptr{Void},), cobj)
?
--Tim
On Thursday, February 26, 2015 10:50:51 PM James Crist wrote:
This is more of a curiousity question than an actual use case. Is there any
way to have Julia manage heap allocated
Well, I'm trying but not getting too far. I tried the code as suggested by
Milan but got errors. I then tried to mimic what I say in the Messagebox
code in the Tk package. This is what I have so far:
function GetOpenFile2(; filetypes::Array=[], initialdir::String=,
I'm a little uneasy about having too many functions that apply in both the
value and type domain. I don't have anything definitively bad that I can
think of but it just makes me a little nervous that there's some big
problem that's not immediately obvious.
On Fri, Feb 27, 2015 at 3:47 PM, Jutho
Yes, I only have self-reported locations.
My data set contains:
@meggart, Jena, Germany
@axsk, Berlin
@purzelrakete, Berlin
@fschueler, Berlin
@dirkschumacher, Berlin
@kashif, Berlin, Germany
@joidegn, Berlin
Thanks,
Jiahao Chen
Staff Research Scientist
MIT Computer Science and Artificial
The situation in Perl and Lua is rather different than in Julia. In Perl,
the default scopes for unqualified variables is global, which is really
bad. You have to declare a variable using `my` in order to get lexical
scoping; with `use strict`, you have to declare a global variable with
`our` to
Hi Andrew,
I saw your issue (cross
link: https://github.com/JuliaLang/julia/issues/10354), and remembered that
I hadn't replied again here. Sorry about that. At this point, you might
have figured out most of this, but just for completeness:
thanks for replying, but i didn't understand much
It's not a bug it's a fature ;)
I found this odd also when I was new to julia and complained about it. I
wanted strict private visibillity like in C++/Java/C#, but the julia
team does not want this. The only thing export does is that you can call
the function without the module prefix.
On
How interesting. This was the exact same example I discovered to help
develop my first parallel simulation.
The key take away for me was splitting into two files:
Tip: For parallel processing in Julia, separate your code into two files,
one file containing the functions and parameters that need
Thanks for the info Ondrej and John.
On Friday, February 27, 2015 at 4:31:46 AM UTC+1, j verzani wrote:
I think PyCall already has what you need for conversion:
PyObject(big(pi)) will create a an mpf instance of a big float, like
big(pi)
convert(BigFloat, PyObject(big(pi))) will return a
What do you think about making a doodle or some web thingy to arrange a
time ?
On Monday, February 23, 2015 at 8:39:23 PM UTC+1, Jim Garrison wrote:
The annual March Meeting of the American Physical Society is next week in
San Antonio, and I am wondering if any Julia users would be
I made a Doodle poll available here:
http://doodle.com/sesc55rsd8hd59ag
On Friday, 27 February 2015 02:38:33 UTC-8, lapeyre@gmail.com wrote:
What do you think about making a doodle or some web thingy to arrange a
time ?
On Monday, February 23, 2015 at 8:39:23 PM UTC+1, Jim Garrison
A correction, the newest suggestion for filetypes does indeed work on my
Mac, I just needed to find a folder with a proper file ending in ,txt!
Eric
On Friday, February 27, 2015 at 4:40:53 PM UTC-6, Eric S wrote:
Milan,
I'm just learning Julia so some of what you wrote isn't familiar to me
On Fri, 27 Feb 2015, Isaiah Norton wrote:
Of interest:https://github.com/tonyhffong/Lint.jl
(though I'm not sure if this specific feature is implemented)
I will have a look at it, thanks.
Stéphane.
I learned something new. Thanks Steven :)
59 matches
Mail list logo