I'm using Julia 0.3.4 command line.
Entering
p = 1; 2p+1
gives an error:
*julia p = 1; 2p+1*
*ERROR: syntax: malformed expression*
whereas using a different variable name doesn't give an error
*julia x = 1; 2x+1*
*3*
There must be some aspect of Julia syntax I have
Also in 0.4.x this
*julia *
*2p+*
*(type-error double number #f)*
*unexpected error: #0 (read-number #io stream #f #f)**ERROR: syntax:
malformed expression*
On Monday, January 5, 2015 4:46:15 PM UTC+10, ivo welch wrote:
dear tim, lex, todd (others): thanks for responding. I really want
to learn how to preprocess input from somewhere else into the
readcsv() function. it's a good starting exercise for me to learn how
to accomplish tasks in
I'm not sure, but if i change to gtk_version = 2 in ext.jl and run my code
it imports and displays correctly. However,
julia using Winston
julia plot(rand(8,8))
(julia:4874): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.40.2/./
gobject/gsignal.c:2462: signal 'expose-event' is invalid for
I think you need a macro, something like:
macro printvar(var)
return :(print($(string(var))); print(=); println($var))
end
julia a=2
2
julia @printvar a
a=2
Cheers
Lex
On Sunday, January 4, 2015 8:48:27 PM UTC+10, Arch Call wrote:
I frequently find myself writing Julia snippet
Not sure, but maybe this is what you are looking for,
https://gist.github.com/toivoh/4121122
On Sunday, January 4, 2015 6:49:39 AM UTC+1, Darwin Darakananda wrote:
Hi everyone,
Is there currently a function that converts s-expressions into Expr
structures (basically the reverse of
Thanks so much Lex .. That works ... Arch
On Sunday, January 4, 2015 5:48:27 AM UTC-5, Arch Call wrote:
I frequently find myself writing Julia snippet scripts like this:
vara = 33
varb = vara * 14
varc = varb * 77
println(“varb = “, varb) #--debug print
println(“varc = “, varc)
Have you met @show?
On 4 January 2015 at 11:10, ele...@gmail.com wrote:
I think you need a macro, something like:
macro printvar(var)
return :(print($(string(var))); print(=); println($var))
end
julia a=2
2
julia @printvar a
a=2
Cheers
Lex
On Sunday, January 4, 2015
Hi All,
I have added some new functionality to SolveDSGE that allows the solution
of various linear-quadratic optimal policy problems to be computed.
Specifically, for various model forms, SolveDSGE can compute policies
under:1) discretion; 2) commitment; 3) quasi-commitment; and 4)
I'm not that familiar with HTTPClient.jl specifically, but usually if you
have a stream of data you can do
JSON.parse(io)
in a loop, and it will only block until the next JSON object is finished.
Julia doesn't do much that's Clojure-like by default but you may be
interested in Lazy.jl
How to overwrite to an existing file, only range of data?
In HDF5 can do this?
I have an array of zeros 10 x 10
I need an existing file owerwrite range rand (5x5), for example.
Existingfile [2: 7.3: 8]
Paul
If I understand correctly, then yes, that's possible. See the HDF5 docs.
--Tim
On Sunday, January 04, 2015 04:25:13 AM paul analyst wrote:
How to overwrite to an existing file, only range of data?
In HDF5 can do this?
I have an array of zeros 10 x 10
I need an existing file owerwrite range
Hi,
First, for the intended users of Julia (and lots more), it seems to me
exception handling is the way to go. You would much rather have your
program stop with unhandled exception than the alternative, unchecked
return code (as in C), and get wrong answers.
I've been thinking about how you
Steven,
How difficult would it be to work a way to suppress this warning message? I
general I would argue that it's best to avoid printing warnings to the
screen unless there is something going on to be genuinely warned about, so
as not to confuse the end-user. Since my package
On Sun, Jan 04 2015, Páll Haraldsson pall.haralds...@gmail.com wrote:
Another issue I saw, uninitialized variables. Rust and others disallow, I
think Julia does too (or easily could) except when constructing arrays
(because of speed I guess). Wouldn't that be easily fixed? If similar()
would
Of course, first I read :)
Is there about reading range array. I need to save a range of In analogy to.
A = reshape (1: 120, 15, 8)
h5write (/ tmp / test2.h5, mygroup2 / A, A)
data = h5read (/ tmp / test2.h5, mygroup2 / A (2: 3: 15: 3: 5))
Paul
W dniu niedziela, 4 stycznia 2015 14:14:03 UTC+1
Tim,
in your implementation you are assuming all possible types for x implement
some operation performed inside the 'no do something with x' comment. Just
making this assumption explicit allows solving the problem in a type-stable
manner. Consider the following:
alias NumberArray
That's not documented:
help? dump
Base.dump(x)
Show all user-visible structure of a value.
Are there any more options to dump?
On Sun, Jan 4, 2015 at 5:10 AM, lapeyre.math1...@gmail.com wrote:
Not sure, but maybe this is what you are looking for,
https://gist.github.com/toivoh/4121122
julia begin
@show vara = 33
@show varb = vara * 14
@show varc = varb * 77
end
vara = 33 = 33
varb = vara * 14 = 462
varc = varb * 77 = 35574
35574
On Sun, Jan 4, 2015 at 5:47 AM, Mike Innes mike.j.in...@gmail.com wrote:
Have you met @show?
On 4 January
Reading the code, there is also a `indent` option, i thought it accepted a
boolean, but not, I find it very unintuitive:
dump(io::IO, x, n::Int, indent) = xdump(dump, io, x, n, indent)
julia dump(:(1 + 1 * 3 - 4^7), 10, false)
Expr
false head: Symbol call
false args: Array(Any,(3,))
false
To reiterate, static typing and type stability (in the Julia sense) are *not
the same concept*. To take an example from that ML Markdown parser:
type paragraph =
Normal of par_text
| Pre of string * string option
| Heading of int * par_text
| Quote of paragraph list
| Ulist of
julia begin
@show vara = 33
@show varb = vara * 14
@show varc = varb * 77
end
vara = 33 = 33
varb = vara * 14 = 462
varc = varb * 77 = 35574
35574
On Sun, Jan 4, 2015 at 5:47 AM, Mike Innes mike.j.in...@gmail.com wrote:
Have you met @show?
- mostrar
Reading the code, there is also a `indent` option, i thought it accepted a
boolean, but not, I find it very unintuitive:
dump(io::IO, x, n::Int, indent) = xdump(dump, io, x, n, indent)
julia dump(:(1 + 1 * 3 - 4^7), 10, false)
Expr
false head: Symbol call
false args: Array(Any,(3,))
false
That's not documented:
help? dump
Base.dump(x)
Show all user-visible structure of a value.
Reading the code, there is also a `indent` option, i thought it accepted a
boolean, but not, I find it very unintuitive:
dump(io::IO, x, n::Int, indent) = xdump(dump, io, x, n, indent)
julia
You can also work directly with the HDF5 file as an array object...
using HDF5
hfi=h5open(myfile.h5,w); # create the file
close(hfi)
A = reshape(1: 120, 15, 8);
hfi = h5open(myfile.h5,r+) # read/write access
hfi[mygroup/A] = A
15x8 Array{Int64,2}:
1 16 31 46 61 76 91 106
...
14
From the standpoint of performance and memory allocation (i.e., boxing), what
matters is whether types are concrete, because (currently) the compiler only
generates optimized code for concrete types. Anything declared to be a Union
type will have the same problems as something that's
Thanks for suggestion. I will check out Lazy.jl. Very nice feature to have
built into a language. Regarding HTTPClient.jl, appears the current package
doesn't support this feature. I was told to make a feature request, which I
will do. Thanks for timely response.
On Sunday, January 4, 2015
Looks like expose-event in Gtk/cairo.jl is incorrectly declared to return
Void (should be Cint), but otherwise, that is the correct signal for Gtk2.
However, note that the BinDeps deps.jl file ignores this configuration
option and must be deleted for it to work.
On Sun Jan 04 2015 at 6:06:01 AM
Gtk3 hasn't changed that much in this area -- it is still incorrect to
call gdk_window_get_device_position friends from event handlers.
It seems that if you want or expect an integer, then you should just
truncate/round the event.x / event.y values.
On Sun Jan 04 2015 at 4:43:30 AM Andreas
FYI, I won 2nd place in the recent Al Zimmerman programming contest Delacorte
Numbers http://trdb.org/Contest/DelacorteNumbers/Standings, using only
Julia and a quad-core MonkeyStation Pro
http://www.blonzonics.us/odd/monkeystation-pro. Julia worked out well
because it had:
-
See the part about ...incrementally save to very large ...
--Tim
On Sunday, January 04, 2015 06:59:53 AM paul analyst wrote:
Of course, first I read :)
Is there about reading range array. I need to save a range of In analogy to.
A = reshape (1: 120, 15, 8)
h5write (/ tmp / test2.h5,
Do note there are two additional pages of documentation in the doc/ folder.
--Tim
On Sunday, January 04, 2015 06:59:53 AM paul analyst wrote:
Of course, first I read :)
Is there about reading range array. I need to save a range of In analogy to.
A = reshape (1: 120, 15, 8)
h5write (/ tmp /
Very cool. Congratulations, and thanks for sharing the good news!
--Tim
On Sunday, January 04, 2015 09:35:46 AM Arch Robison wrote:
FYI, I won 2nd place in the recent Al Zimmerman programming contest
Delacorte Numbers http://trdb.org/Contest/DelacorteNumbers/Standings,
using only Julia and a
Thanks! That's exactly what I was looking for. The show_sexpr code
actually looks basically identical to what's in Base, I wonder why
sexpr_to_expr
didn't make it.
On Sunday, January 4, 2015 3:10:15 AM UTC-8, lapeyre@gmail.com wrote:
Not sure, but maybe this is what you are looking for,
Congratulations! Awesome. Don't know if this is Arch D or Arch S. The
scores look even closer than
track and field
http://www.blonzonics.us/home/robison-family/2014_4x800_relay_team times.
On Sunday, January 4, 2015 6:35:46 PM UTC+1, Arch Robison wrote:
FYI, I won 2nd place in the recent Al
Not directly related to your question, but dump takes a optional parameter to
change the output limitation.
Eg:
dump(ex, 100)
prints a deeper version of the AST than
dump(ex)
Thank you Viral, Keno, Tobias, and Imanuel. This has been helpful.
Here are my thoughts:
- It is too early to introduce Julia into my conservative client's
corporate environments at the moment. We'll continue with Matlab with an
eye toward transitioning to Julia in the coming years.
Does the service definition have a query parameter where you can specify
the number of objects required?
As long as the server end of the connection is open, and the server is
pushing data, the client will continue to receive it, and currently there
is no way to control the same.
Controlling the
The code in Gtk/events.jl, signals.jl and cairo.jl is clearly gtk2 style
and working correctly. However in Gtk3 the event reporting slightly
changed, so using event-x and event-y returns (somehow) subpixel
resolution (which makes sense for some pointer devices, maybe not for a
mouse pointer),
Suppose the array is located in memory. There are a lot of columns to
count eg. Average. As a parallel process count because now 7 of 8
processors doing nothing.
Paul
W dniu 2015-01-03 o 23:27, ele...@gmail.com pisze:
On Sunday, January 4, 2015 4:28:06 AM UTC+10, paul analyst wrote:
Works for me, on both 0.3 and 0.4.
Re broadcasting, see the help for `broadcast`; also, operators with a dot in
front of them, e.g. `.+`, broadcast.
--Tim
On Saturday, January 03, 2015 06:04:44 PM AVF wrote:
On Friday afternoon, this code was working:
using Distances
a = rand(10,2)
b =
I frequently find myself writing Julia snippet scripts like this:
vara = 33
varb = vara * 14
varc = varb * 77
println(“varb = “, varb) #--debug print
println(“varc = “, varc) #--debug print
I would like to eliminate having to enter the variable name twice
in the debug print lines by
Is Gtk2 still working for you (with Gtk.jl)? I tried this last week and
faced several issues until I gave up.
Am Sonntag, 4. Januar 2015 10:43:29 UTC+1 schrieb Andreas Lobinger:
The code in Gtk/events.jl, signals.jl and cairo.jl is clearly gtk2 style
and working correctly. However in Gtk3
I have a package A that has file-based integration with package B, i.e. A
writes files that B can read, but neither A depends on B, nor vise versa. I
want to write a test for this integration, but don't want to include B in
REQUIRE, since A may be used completely without it.
I'm wondering if
You can put a REQUIRE file in the test directory that should do what you
want.
— Mike
On Sunday, 4 January 2015 21:33:37 UTC+2, Andrei Zh wrote:
I have a package A that has file-based integration with package B, i.e. A
writes files that B can read, but neither A depends on B, nor vise
Thx, form me this moment
*hfi[mygroup/A] = A*
was not too clear
Paul
W dniu niedziela, 4 stycznia 2015 18:37:30 UTC+1 użytkownik Tim Holy
napisał:
See the part about ...incrementally save to very large ...
--Tim
On Sunday, January 04, 2015 06:59:53 AM paul analyst wrote:
Of
Big Thx for big lesson, is no too dark now
Paul
W dniu niedziela, 4 stycznia 2015 17:58:28 UTC+1 użytkownik Adrian
Cuthbertson napisał:
You can also work directly with the HDF5 file as an array object...
using HDF5
hfi=h5open(myfile.h5,w); # create the file
close(hfi)
A = reshape(1:
yeah, you're right about scala having a repl. and I also forgot that
Haskell has one! but I still prefer Julia over those languages :)
Oh yeah, of course – I think OCaml has one as well. Although Haskell's at
least is interpreted rather than JIT-compiled, so it's nowhere near as nice
to use as Julia's ;)
You should also check out Leah Hanson's work on TypeCheck.jl
https://github.com/astrieanna/TypeCheck.jl, if you haven't seen
No, the server API doesn't provide this feature. I've asked their
developer's directly. I will post on request on gitbub repository for
HTTPClient.jl Thanks for your feedback.
On Sunday, January 4, 2015 2:50:25 AM UTC-6, Amit Murthy wrote:
Does the service definition have a query parameter
Thanks Mike, I have used show before, but not @show...Arch
On Sunday, January 4, 2015 5:48:27 AM UTC-5, Arch Call wrote:
I frequently find myself writing Julia snippet scripts like this:
vara = 33
varb = vara * 14
varc = varb * 77
println(“varb = “, varb) #--debug print
Hi Bryan, just FYI: Amit is one of the primary developers. :-)
Cheers,
Kevin
On Sunday, January 4, 2015, C. Bryan Daniels cdani...@nandor.net wrote:
No, the server API doesn't provide this feature. I've asked their
developer's directly. I will post on request on gitbub repository for
Omg sorry for all that noise, I don't know what happened! :(
On Sun, Jan 4, 2015 at 11:54 AM, Darwin Darakananda darwinda...@gmail.com
wrote:
Thanks! That's exactly what I was looking for. The show_sexpr code
actually looks basically identical to what's in Base, I wonder why
sexpr_to_expr
Display of types seems to have changed recently:
module Foo
export Bar
type Bar end
end
using Foo
println(Bar)
prints Foo.Bar although I'm quite sure that until recently it only
printed Bar. I'm sure there are lots of scenarios where this is very
useful (error reporting, for example), but I
https://github.com/stevengj/PyCall.jl/pull/110
On Sunday, January 4, 2015 9:34:14 AM UTC-5, John Zuhone wrote:
Steven,
How difficult would it be to work a way to suppress this warning message?
I general I would argue that it's best to avoid printing warnings to the
screen unless there is
dear julia users: beginner's question (apologies, more will be coming).
it's probably obvious.
I am storing files in compressed csv form. I want to use the built-in
julia readcsv() function. but I also need to pipe through a decompressor
first. so, I tried a variety of forms, like
d=
On Monday, January 5, 2015 9:51:18 AM UTC+10, ivo welch wrote:
dear julia users: beginner's question (apologies, more will be coming).
it's probably obvious.
I am storing files in compressed csv form. I want to use the built-in
julia readcsv() function. but I also need to pipe
Kevin - Thank for FYI. I am really impressed with Julia, so it's great to
get feedback from one of it's founding members. Is the github repository
for HTTPClient the correct place to post the feature request?
Bryan
On Sunday, January 4, 2015 4:23:30 PM UTC-6, Kevin Squire wrote:
Hi Bryan,
still not obviois. readcsv does have a dispatch for a stream (good),
but I really need a popen function.
x=readcsv(open(`gzcat myfile.csv.gz`, r))
is wrong. x=run(`gzcat myfiles.csv.gz`) doesn't send the output to x
for further piping as far as I can see, so readcsv(x) doesn't do it.
/iaw
Thank you. This is very helpful.
Howard
On Saturday, January 3, 2015 11:53:12 PM UTC-5, Jiahao Chen wrote:
On Sat, Jan 3, 2015 at 10:07 AM, Howard how...@zail.org javascript:
wrote:
a = test
You may find John Myles White's blog post on this topic helpful:
On Saturday, January 3, 2015 11:48:48 AM UTC-5, Tony Fong wrote:
I'm planning a trip in late Jan. It'd be nice to be able to connect.
The [Julia Community page](http://julialang.org/community/) has a meetups
section, which leads to http://www.meetup.com/julia-nyc/.
I wonder if the GZip.jl package would help?
--Tim
On Sunday, January 04, 2015 05:11:50 PM ivo welch wrote:
still not obviois. readcsv does have a dispatch for a stream (good),
but I really need a popen function.
x=readcsv(open(`gzcat myfile.csv.gz`, r))
is wrong. x=run(`gzcat
On Monday, January 5, 2015 11:12:13 AM UTC+10, ivo welch wrote:
still not obviois. readcsv does have a dispatch for a stream (good),
but I really need a popen function.
x=readcsv(open(`gzcat myfile.csv.gz`, r))
is wrong. x=run(`gzcat myfiles.csv.gz`) doesn't send the output to x
Bryan, to be a little clearer: Amit has contributed a great deal to the
HTTPClient.jl package (and might have been its original author--I'm not
sure). He's not a founder of Julia itself, although he does have a number
of significant contributions there as well.
Either way, he was probably the
Kevin,
Thanks for clarification. Great language, whomever is responsible.
In any case, I’m having fun with Julia. Others are changing the world, but I’ve
been playing around with LittleBits (http://littlebits.cc), which is basically
electrical circuits brought to Lego®. I’ve been ‘wrapping’
I agree, it is a great language, and I'm glad you're having fun! You're
littlebits project looks interesting--keep us updated!
Cheers,
Kevin
On Sunday, January 4, 2015, cdani...@nandor.net cdani...@nandor.net wrote:
Kevin,
Thanks for clarification. Great language, whomever is
Hi Amit: yes, the idea is to have just two DArrays, one each for the
previous and current iterations. I had some trouble assigning values
directly to a DArray (a setindex! error) and so had to write it like this.
Do you know any means around this?
Btw, the parallel code runs slower than the
As written, this is creating a 1000 DArrays. I think you intended to have
only 2 of them and swap values in each iteration?
On Sunday, 4 January 2015 11:07:47 UTC+5:30, Amuthan A. Ramabathiran wrote:
Hello: I recently started exploring the parallel capabilities of Julia and
I need some help
An intuitive thought is, uncompress your csv file via bash utility *zcat*,
pipe it to STDIN and use* readline(STDIN) *in julia.
On Monday, January 5, 2015 7:51:18 AM UTC+8, ivo welch wrote:
dear julia users: beginner's question (apologies, more will be coming).
it's probably obvious.
I
I'm not sure how general this behaviour is with respect to other types, but
I have observed the following with a simple composite type:
When summing a 1-element array of a simple composite type, the return is a
reference to the single element, rather than a copy of the single element.
This
This is how I used GZip.jl in the tests for the MatrixMarket package
https://github.com/JuliaSparse/MatrixMarket.jl/blob/ba60e447f24938952509bb42c6d6bf9223562ef8/test/dl-matrixmarket.jl#L7
Perhaps it might be useful for you.
Thanks,
Jiahao Chen
Staff Research Scientist
MIT Computer Science and
dear tim, lex, todd (others): thanks for responding. I really want
to learn how to preprocess input from somewhere else into the
readcsv() function. it's a good starting exercise for me to learn how
to accomplish tasks in general. there is so much to learn. [I did
not experiment with GZip.jl
I am reading again about the type system, esp in
http://julia.readthedocs.org/en/latest/manual/types/ . I am a good guinea
pig for a manual, because I don't know too much.
a tuple is like function arguments without the functions. so,
mytuple=(1,ab,(3,4),5)
is a tuple. good.
what can
73 matches
Mail list logo