Hi Abe,
There has been various discussions about this in the following threads:
https://github.com/JuliaLang/julia/issues/4935
https://github.com/JuliaLang/julia/issues/1974
You might see that there is not yet a consus if one of these features will
be implemented or not.
I have been myself
Thank you.
Do loops is the fastest way? I have a lot of such vectors ... Is it
ready, optimized command from combinatorics?
Paul
W dniu 2014-06-19 21:55, Ethan Anderes pisze:
… I probably should not have been sloppy about the typing the
comprehensions in my previous answer. I think this is
libgit2: Done. https://github.com/jakebolewski/LibGit2.jl/pull/10 (failing
lots of tests, but it's a start)
And found a decent BinDeps solution at least for the binaries we package
ourselves. How about using usr/lib32 and usr/lib64? There's already some
code in BinDeps for the Linux
Is there a way how to dynamically reference a file within given package? My
problem is that I want to include some sample data and then reference them
by some simple command. I was thinking that there might be something like
packageData(nameOfPackage,filename)
which would return the path to
So if I have an array of Bool, isprime (obtained by sieving, e.g.) of
length n, [1:n][isprime] will give the same result as primes(n)? That's
nice to know, though I'd call the syntax... interesting. :D
Concerning the original problem:
When we use do notation, an additional line x,y=p won't cost
Despite many attempts, I can't to deploy a simple parallelization and ask
for help on a specific the example.
Array WS can be broken down into clones, and at the finish may then add
them, but WS is great and it would be better without cloning it.
D=readcsv(D.txt);
k,l=size(D)
10,1
julia Pkg.dir(JSON)
/home/kevin/.julia/v0.3/JSON
julia joinpath(Pkg.dir(JSON),src,JSON.jl)
/home/kevin/.julia/v0.3/JSON/src/JSON.jl
Not the prettiest, but not too bad, I think?
Cheers,
Kevin
On Fri, Jun 20, 2014 at 12:47 AM, Tomas Krehlik tomas.kreh...@gmail.com
wrote:
Is there a way how
Pkg.dir(PACKAGE_NAME) will give you the full path to a package. It
doesn't check whether that package exists though, so you'll need to do that
manually.
On Friday, 20 June 2014 09:47:22 UTC+2, Tomas Krehlik wrote:
Is there a way how to dynamically reference a file within given package?
My
Thanks a lot! Something I was looking for. Though it might be useful to
have some dedicated command don't you think?
On Friday, 20 June 2014 10:48:37 UTC+2, Kevin Squire wrote:
julia Pkg.dir(JSON)
/home/kevin/.julia/v0.3/JSON
julia joinpath(Pkg.dir(JSON),src,JSON.jl)
RDataSets and TestImages are two packages that wrap datasets. Perhaps those
might be useful examples.
--Tim
On Friday, June 20, 2014 12:47:22 AM Tomas Krehlik wrote:
Is there a way how to dynamically reference a file within given package? My
problem is that I want to include some sample data
I think the answer to this question is not tight to Julia. Both models have
advantagous and they are actually not comparable 1 to 1.
One simple reason why Julia currently has no threads is that libjulia is
not thread safe. I am experimenting in changing this (see
Thanks for the links!
My main complaint with declaring the variables rather than defining the
interface. I was never a fan of Java interfaces, which I think is
essentially what the current Julia design already mimics (if not in a
slightly less formal design). Having to redeclare variables for
Not every distribution comes with a default constructor (those requiring no
arguments).
Here is the document about how you may construct a Multinomial distribution:
http://distributionsjl.readthedocs.org/en/latest/multivariate.html#multinomial-distribution
The no method error means that there
I would like to write a test case verifying that a function call results in
a warning. I have seen that there are tests for exceptions, but I was
unable to find a test for warining in the docs.
One terminology side note: The members of a type are usually called
fields in the Julia context.
The concern that fields have to be repeated has been brought up some times
on the mailing list. But usually only on academic examples. Personally I
would not have so many concerns that Julia scales
A little example
using Base.Test
function f(x)
if x 0
warn(x should be non-negative)
end
return x
end
@test_warning f(-1) #this is the test I am looking for
W dniu piątek, 20 czerwca 2014 14:27:55 UTC+2 użytkownik Paweł Biernat
napisał:
I would like to write a test
Hi, I'm starting to replace some of my Python with Julia for actual work
(post-processing actually). My files are on a remote cluster with an HTTP
proxy between us. With Python, I have to Popen ssh/sftp because Paramiko
has a bug with proxies in Python 3.
AFAIK, Julia is leveraging SSH for
What about using a macro to define the common types? That would avoid the
problem of having to visit each subtype declaration when more common fields
are added. Is that good or bad style?
julia macro STfields()
quote
a::Int
b::String
end
end
julia abstract ST
Julia shells out for all ssh functionality. supporting libgit in base would
bring in libssh so maybe this should be reconsidered in the future.
make -j 2 on OpenSuSE 13.1 produces the following:
Makefile:15: i586/Make.files: No such file or directory
make[3]: *** No rule to make target 'i586/Make.files'. Stop.
make[2]: *** [openlibm/libopenlibm.so] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2
Simply make
Hey all,
Thought I needed to jump on the Julia blogging train now
that http://www.juliabloggers.com/ is live, so feel free to check out my
first post!
Blog
post:
http://quinnj.github.io/2014/06/19/data-structures-as-code-the-joys-of-meta-programming/index.html
Hacker News:
Thank you, it works !!
NB: I'm Stéphane and not Stéphanie :-)
Le vendredi 20 juin 2014 00:13:08 UTC+2, Sheehan Olver a écrit :
Hi Stephanie,
Are you on the latest GitHub version? You can get on it with
Pkg.checkout(ApproxFun)
Sent from my iPad
On 20 Jun 2014, at 3:19 am, 'Stéphane
Julia shells out for all ssh functionality.
Oh, interesting. That would explain why I couldn't find any SSH.jl with
libssh bindings nor libssh references in Julia's sources.
supporting libgit in base would bring in libssh so maybe this should be
reconsidered in the future.
Good to
windows shared libraries are supposed to be in bin, not lib, which is why
usr32 and usr64 are more helpful than lib32 and lib64. although this is
only an issue if you plan on using executables in the download also.
just a thought: you can have both the 32-bit and 64-bit dll's on the path,
since
bad style. this code would invalidate all of your constructors if you
change the number of fields in STfields. and changing the API for an entire
class of objects is generally frowned upon by your users
if you expect to be sharing several common fields, the suggestion has been
to create a type
Hi everyone,
I'm new to Julia and trying it out for some data analysis projects with
twitter data.
In particular, I'd like to plot tweets to a map, using a different
color/icon for various categories of tweet. It'd also be useful to color
various regions.
Something similar to or wrapping
hi,
I'm trying travis for the first time and I'm stuck. I tried several
different .travis.yml files I found online, none seems to work. here's the
current one, which I believe is very close to the one on DataFrames.jl:
language: cpp
compiler:
- clang
notifications:
email: false
# env:
#
The most practical choice would be to do all the data processing in Julia
and then spit out your data in a text file, which could be read by any
number of languages or tools. I used R to do map plotting in the past this
way.
On Friday, June 20, 2014 9:43:26 AM UTC-4, Mikayla Thompson wrote:
bad style. this code would invalidate all of your constructors if you
change the number of fields in STfields. and changing the API for an entire
class of objects is generally frowned upon by your users
That is true, but before reaching version 1.0 things like that will
happen. None of my
There is currently no way to do this.
On Fri, Jun 20, 2014 at 8:49 AM, Paweł Biernat pawel.bier...@gmail.com
wrote:
A little example
using Base.Test
function f(x)
if x 0
warn(x should be non-negative)
end
return x
end
@test_warning f(-1) #this is the test I am
Could you update to master and try again? I have added an i586 build target
to openlibm.
-viral
On Friday, June 20, 2014 6:33:38 PM UTC+5:30, robtsi...@gmail.com wrote:
make -j 2 on OpenSuSE 13.1 produces the following:
Makefile:15: i586/Make.files: No such file or directory
make[3]: ***
Comprehensions should be quite fast, although the only way to be sure is to
time it.
On Fri, Jun 20, 2014 at 3:02 AM, Paul Analyst paul.anal...@mail.com wrote:
Thank you.
Do loops is the fastest way? I have a lot of such vectors ... Is it ready,
optimized command from combinatorics?
Gadfly has a d3 backend. But others will have to comment about whether it can
handle the mapping part.
--Tim
On Friday, June 20, 2014 06:43:25 AM Mikayla Thompson wrote:
Hi everyone,
I'm new to Julia and trying it out for some data analysis projects with
twitter data.
In particular, I'd
You could redirect_stderr and test for content written
On Friday, June 20, 2014, Stefan Karpinski ste...@karpinski.org wrote:
There is currently no way to do this.
On Fri, Jun 20, 2014 at 8:49 AM, Paweł Biernat pawel.bier...@gmail.com
javascript:_e(%7B%7D,'cvml','pawel.bier...@gmail.com');
For concurrent I/O, green threads are far more scalable than using kernel
threads. For concurrent computation, green threads don't buy you anything,
but exposing kernel threads directly as in C++ or Java forces all library
authors to become experts on concurrency since they have to make sure all
Keno fixed a bug in JuliaParser.jl dealing utf8 character sizes. That fix,
along with line number support I have in another branch would make the port
of the parser pretty much complete. I want to make sure that there are no
other outstanding unicode issues. If you have julia source code
Dear Julia users,
First of all, Congratulations for this amazing community and for this
impressive language! I used to program in C++ and in R, I started to
program with Julia 3 months ago and it has changed my life for better!!
Thank you!!
By checking the profile of a program we are developing
Nothing that crazy, but Distributions.jl utilizes some unicode:
https://github.com/JuliaStats/Distributions.jl/blob/master/src/univariate/normal.jl
On Fri, Jun 20, 2014 at 11:13 AM, Jake Bolewski jakebolew...@gmail.com
wrote:
Keno fixed a bug in JuliaParser.jl dealing utf8 character sizes.
Thanks Jacob. I should note that I'm already testing all packages in
METADATA.
On Friday, June 20, 2014 11:17:06 AM UTC-4, Jacob Quinn wrote:
Nothing that crazy, but Distributions.jl utilizes some unicode:
https://github.com/JuliaStats/Distributions.jl/blob/master/src/univariate/normal.jl
The cumsum / cummax / cummin / cumprod, etc have suboptimal performance
currently, which are about 20x slower than the sum/prod etc (which we spent
a lot of efforts to optimize and tune).
Please open an issue in Github, and we will try to address this problem
later.
Dahua
On Friday, June
For someone who has hardly ever used meta-programming outside of the
creation of containers, that was really enlightening! Maybe this is old hat
to people who work with macros all the time, or compiler writers and other
people close to the metal, but this is the first time I've seen the concept
In-place cumsum! etc. would also often make sense.
On Jun 20, 2014, at 11:54 AM, Dahua Lin linda...@gmail.com wrote:
The cumsum / cummax / cummin / cumprod, etc have suboptimal performance
currently, which are about 20x slower than the sum/prod etc (which we spent a
lot of efforts to
Hi,
I took a look on your code at night. It is very nice because its simplicity,
almost magical!.
There are few points which are not yet clear to me. I guess that by default
you calculate
at least 4 terms of the expansion; this is imposed by your redefinition of
show. Am I right?
Is there an
I just tried to install julia on a linux debian laptop by cloning the git
repository and running make
but the install ended with
--
[...]
make[4]: warning: -jN forced in submake: disabling jobserver mode.
OK.
OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)
OS ...
Can you run `make` again? Sometimes, due to parallel makefile rules, the
cause of an error can be hard to see. Please post the output of `make`
again, which should fail immediately and give us an idea as to why it
didn't work.
-E
On Fri, Jun 20, 2014 at 12:16 PM, harven har...@free.fr wrote:
It's good to see other people want multiple inheritance too :).
One thing I haven't seen discussion yet is using Scala's method of constructors
to make deal with the fields and MI.
It seems like abstract types could be equivalent to Scala traits (if abstract
types allowed fields), and regular
Yeah, I can probably improve that
On Friday, June 20, 2014, Kevin Squire kevin.squ...@gmail.com wrote:
I tried this again recently and had problems (again). For me, at least,
it's almost always been caused by a conflict when compiling the single and
double precision FFTW libraries
Julia in its present implementation uses a global-interpreter lock much
like most other dynamic programming languages, correct?
On Friday, June 20, 2014 10:51:17 AM UTC-4, Stefan Karpinski wrote:
For concurrent I/O, green threads are far more scalable than using kernel
threads. For
I was thinking something along those lines, but as was pointed out, you would
have to also create the constructors.
Unfortunately, I'm on my phone right now, so I can't effectively post code. I
was thinking of a 'mixin' macro which would create a new type (with
constructor):
@mixin Foo : Bar
I was thinking something along those lines, but as was pointed out, you would
have to also create the constructors.
Unfortunately, I'm on my phone right now, so I can't effectively post code. I
was thinking of a 'mixin' macro which would create a new type (with
constructor):
@mixin Foo : Bar
No, julia has to GIL. It has segfault if you try to call functions from
different threads ;-)
Am Freitag, 20. Juni 2014 21:55:08 UTC+2 schrieb Aerlinger:
Julia in its present implementation uses a global-interpreter lock much
like most other dynamic programming languages, correct?
On
Sorry I meant has *no *GIL.
Am Freitag, 20. Juni 2014 22:01:57 UTC+2 schrieb Tobias Knopp:
No, julia has to GIL. It has segfault if you try to call functions from
different threads ;-)
Am Freitag, 20. Juni 2014 21:55:08 UTC+2 schrieb Aerlinger:
Julia in its present implementation uses a
I don't believe there are currently any Julia packages that do this, but
you could utilize or extend Gadfly's D3 engine with polymaps.js
(http://polymaps.org/). Assuming you have a set of lat/lon pairs in
GeoJSON, you could essentially create a function that transforms your
lat/lon coordinates
Thank you, Dahua!
I will open an issue in Github as suggested by you. In meanwhile I will see
if by using sum I can get a better performance.
Best,
Charles
On Fri, Jun 20, 2014 at 5:54 PM, Dahua Lin linda...@gmail.com wrote:
The cumsum / cummax / cummin / cumprod, etc have suboptimal
Could someone help with redirecting stderr? For example, the following code
does not get the error message shown in the Julia console in Windows 7,
Julia Version 0.3.0-prerelease+3789:
~~~
stderr_orig = STDERR
rd, wr = redirect_stderr()
1^-1
close(wr)
eof(rd)
close(rd)
out = readall(rd)
function with_out_str(f::Function)
orig_stdout = STDOUT
rd, wr = redirect_stdout()
f()
redirect_stdout(orig_stdout)
return readavailable(rd)
end
macro with_out_str(expr)
:(with_out_str(()-$expr)) | esc
end
You can use this as
@with_out_str begin
... code ...
end
But I think
It's a bit silly, but it does have a unicode-named macro:
https://github.com/danluu/funarg
-- Leah
On Fri, Jun 20, 2014 at 10:24 AM, Jake Bolewski jakebolew...@gmail.com
wrote:
Thanks Jacob. I should note that I'm already testing all packages in
METADATA.
On Friday, June 20, 2014
Le vendredi 20 juin 2014 21:30:56 UTC+2, Elliot Saba a écrit :
Can you run `make` again? Sometimes, due to parallel makefile rules, the
cause of an error can be hard to see. Please post the output of `make`
again, which should fail immediately and give us an idea as to why it
didn't
I have contacted the author
(https://github.com/janverschelde/PHCpack/issues/3) and it seems
redistribution under a different license is not really an option.
However, if what Milan says is correct, then we should be able to include
it 'as-is'.
Now for the interface, I was thinking that, since
If run the following two lines:
format = %d
@sprintf format 33
I get the message:
ERROR: @sprintf: first argument must be a format string
If I run what I would have thought of as equivalent
@sprintf %d 33
it works just fine.
So is this a bug or am I confused?
Also this is 0.3
On Friday, June 20, 2014 3:15:22 PM UTC-6, Dustin Lee wrote:
If run the following two lines:
format = %d
@sprintf format 33
I get the message:
ERROR: @sprintf: first argument must be a format string
If I run what I would have thought of as equivalent
@sprintf %d 33
That sounds like the best plan for the PHCpack code. Have you looked at or
are you familiar with whether HOMPACK as Hans mentioned would be able to
provide similar functionality? I say that just because more of us are used
to building Fortran code than Ada. Ada should be reasonable to work with
~~~
errormsg = @with_out_str begin
... code ...
end
~~~
should put the error message into errormsg.
-- Leah
On Fri, Jun 20, 2014 at 4:29 PM, Laszlo Hars laszloh...@gmail.com wrote:
I am confused: I can change all the outs to errs, but what variable
will contain the error message to be
The macro expression itself will return the output string. So if you type
it into a repl you'll get something like
julia @with_err_str warn(foo)
\e[1m\e[31mWARNING: foo\n\e[0m
If you want to capture that string you'd just assign it to a variable:
julia err = @with_err_str warn(foo);
One thing
Your code looks generally fine, except that you close the read end before
actually reading the data. Also, you don't catch the error, so it aborts
execution early. Try wrapping you user code in a try/catch block.
(Ps can we please get rid of readavailable before 0.3. Also, this is why
the
Cool! Let me know if you want any functionality added to make it useful.
Sent from my iPhone
On Jun 20, 2014, at 11:11 PM, 'Stéphane Laurent' via julia-users
julia-users@googlegroups.com wrote:
Thank you, it works !!
NB: I'm Stéphane and not Stéphanie :-)
Le vendredi 20 juin 2014
I must be doing something stupid. This is what I typed into the console:
~~~
function er(f::Function)
orig_stderr = STDERR
rd, wr = redirect_stderr()
f()
redirect_stderr(orig_stderr)
return readavailable(rd)
end
macro er(expr)
:(er(()-$expr)) | esc
end
err = @er begin 1^-1 end
err
Hi there!
I would like to draw some attention to the upcoming SIAM Conference on
Computer Science and Engineering next year and wanted to ask around if
there are plans or interest to have a mini symposium on advances in Julia.
I remember that there were talks about Julia last time in Boston
There's not support for maps yet. But if someone wanted to develop a
package for handling geographical data, I'd be keen to make it
plot-able. I've not worked with this sort of data before, but I'm
guessing the main things we'd need are map projections and a database of
borders of countries,
Yeah, it will get complicated with polygon data for Country - State -
Region - Zipcode. I think the best place to start would be parsing a set
Lat/Lon data (perhaps from GeoJSON, there are tons of examples onine),
converting those lat/lon coordinates to 2D Cartesian coordinates within the
I've just merged branches in Gadfly and Compose that I've been working on
for a while, and I'm going to tag a new version relatively soon.
For the most part things should work as before. But if you are explicitly
using the D3 backend or Compose, then I'm about to break your code. Sorry.
Here's
In the process of playing with Julia I ran into an interesting situation I
demonstrated in this bug: https://github.com/JuliaLang/julia/issues/7320.
As I asked in the issue but which I should probably ask here, why does
declaring `foo` to be `const` solve this issue?
...
Okay, nevermind. It
The formula language for statistical models in the DataFrames package is
patterned on a similar language in R. Several operators including :+, :*,
: and :/ has a special interpretation in that language. In particular A
B C denotes a 3-way interaction. I have noticed that it does not
Hi again,
Just to let you know about the issue I just opened in Github:
https://github.com/JuliaLang/julia/issues/7342
Thank you for everything!
Best,
Charles
On Fri, Jun 20, 2014 at 10:07 PM, Charles Novaes de Santana
charles.sant...@gmail.com wrote:
Thank you, Dahua!
I will open an
I have looked the codes of cumsum and friends. They are still using
old-style slice-based implementation, instead of the new cache friendly
ways (the way we are implementing reduction).
Not sure how quickly these will be resolved. If this is not addressed in 2
- 3 weeks, I may take a shot to
Thank you again, Dahua! I hope it can be changed easy.
Best,
Charles
On Sat, Jun 21, 2014 at 1:06 AM, Dahua Lin linda...@gmail.com wrote:
I have looked the codes of cumsum and friends. They are still using
old-style slice-based implementation, instead of the new cache friendly
ways (the
Metaprogramming is immensely powerful. I think this use case is brilliant.
From the short time that I have been experimenting with it for a bit, I'm a
bit torn. I think we should be careful about tradeoff that this technique
forces upon us.
Starting from a moderately complexity, macros can get
Julia installed successfully.
Thank you.
Bob
On Friday, June 20, 2014 7:25:39 AM UTC-7, Viral Shah wrote:
Could you update to master and try again? I have added an i586 build
target to openlibm.
-viral
On Friday, June 20, 2014 6:33:38 PM UTC+5:30, robtsi...@gmail.com wrote:
make -j 2
This is one of the reasons we opted for very visibly distinct syntax for
macros. Otherwise it's hard for any entity looking at the code to know what
might be happening – be that entity a person or a program like a parser or a
linter.
On Jun 20, 2014, at 8:07 PM, Tony Fong
Could you open an issue about it?
On Fri, Jun 20, 2014 at 9:21 PM, Stefan Karpinski ste...@karpinski.org
wrote:
Yes, this is intentional, but it could certainly be changed.
On Fri, Jun 20, 2014 at 6:28 PM, Douglas Bates dmba...@gmail.com wrote:
The formula language for statistical models
Yes, this is intentional, but it could certainly be changed.
On Fri, Jun 20, 2014 at 6:28 PM, Douglas Bates dmba...@gmail.com wrote:
The formula language for statistical models in the DataFrames package is
patterned on a similar language in R. Several operators including :+, :*,
: and :/ has
I agree, I think it's the best solution given the tools (and what I'm going
to use for my code). However, it still feels more like a hack around the
design than good programming practice.
On Friday, June 20, 2014 5:41:02 PM UTC-4, Spencer Russell wrote:
I'd just like to second Jameson's
My code calls `display` on a bunch of values (of a type I define). Most of
these values chose not to display anything; only a few of them are meant to
print anything at all. However, running the code currently generates a lot
of extra new lines for the non-printing values.
This is the main
Hah. That's a good test case.
On Fri, Jun 20, 2014 at 4:49 PM, Leah Hanson astriea...@gmail.com wrote:
It's a bit silly, but it does have a unicode-named macro:
https://github.com/danluu/funarg
-- Leah
On Fri, Jun 20, 2014 at 10:24 AM, Jake Bolewski jakebolew...@gmail.com
wrote:
Weird. Looks like you're getting a test failure in PCRE...(!)
On Fri, Jun 20, 2014 at 5:03 PM, harven har...@free.fr wrote:
Le vendredi 20 juin 2014 21:30:56 UTC+2, Elliot Saba a écrit :
Can you run `make` again? Sometimes, due to parallel makefile rules, the
cause of an error can be
Thanks for the explanations. I really really like the trick of the dictionary
and the way you define
the functions, so everything works without fixing constants before hand. This
could make
life much simpler for our many-variable implementation...
Best, Luis
On Jun 20, 2014, at 4:28 PM,
This is specific to the REPL display. If you try:
import Base.Multimedia.displays
then use display(displays[1], fm) instead, you will not get the new lines.
(This might vary depending on setup; on my setup displays[1] is the text
display and displays[2] is the REPL). It's obviously not a good
87 matches
Mail list logo