Re: [julia-users] Re: how long until vectorized code runs fast?

2016-05-11 Thread Keno Fischer
There seems to be a myth going around that vectorized code in Julia is slow. That's not really the case. Often times it's just that devectorized code is faster because one can manually perform operations such as loop fusion, which the compiler cannot currently reason about (and most C compilers

[julia-users] Re: how long until vectorized code runs fast?

2016-05-11 Thread Kristoffer Carlsson
It is always easier to discuss if there is a piece of code to look at. Could you perhaps post a few code examples that does not run as fast as you want? Also, make sure to look at : https://github.com/IntelLabs/ParallelAccelerator.jl. They have a quite sophisticated compiler that does loop

[julia-users] how long until vectorized code runs fast?

2016-05-11 Thread Anonymous
This remains one of the main drawbacks of Julia, and the devectorize package is basically useless as it doesn't support some really crucial vectorized operations. I'd really prefer not to rewrite all my vectorized code into nested loops if at all possible, but I really need more speed, can

[julia-users] Re: [ANN] Book: Julia High Performance

2016-05-11 Thread Eric Forgy
The discount price was only available a couple days. I missed it too, but still bought it. Oops :)

[julia-users] ANN: julia-spectral group created for discussions/questions related to spectral methods and ApproxFun in Julia

2016-05-11 Thread Sheehan Olver
I've created a Google group julia-spectral for any discussions/questions related to spectral methods. In particular, this can serve as a place to ask questions related to ApproxFun (to avoid spamming the julia-users group). Sheehan

Re: [julia-users] Julia text editor on iPad?

2016-05-11 Thread Sheehan Olver
The arrows sometimes work for me…and sometimes not.It’s too bad the native IPython app didn’t survive: http://computableapp.com The biggest problem I have is that JuliaBox still doesn’t seem very reliable. This may be since Australia is the middle of the night in the US,

[julia-users] Re: using subscripts \_1, \_2, ... as field names

2016-05-11 Thread ggggg
I'm no macro expert, but I think one could parse the variable names in a macro to enable Tim Wheeler's as @subind Σ₁₁ to get Σ[1,1]

[julia-users] Re: using subscripts \_1, \_2, ... as field names

2016-05-11 Thread Davide Lasagna
I see that most of the latex symbols representing digits cannot be used as variable/field name, (e.g., \msansone, \mbfone). I guess this is a deliberate choice, made to prevent disasters from happening when this kind of notation is over abused. I have to say though that there are probably a

[julia-users] select/poll on TCPSocket in Julia?

2016-05-11 Thread Andrei Zh
Given several TCPSocket-s, how can I sequentially poll them and read the first that becomes readable? I believe *nix's poll/select functions provide something similar for files (and Julia has `poll_fd`), but what is the best way to approach this task for sockets?

[julia-users] Re: [ANN] Book: Julia High Performance

2016-05-11 Thread Sisyphuss
I notice the book cost 31.18 euros. Has the discounted period been past? BTW, when Julia upgrades to v0.5, v0.6,..., v1.0, is this book still valid? On Tuesday, May 3, 2016 at 1:17:57 AM UTC+2, Avik Sengupta wrote: > > Just wanted to let you know about the new book discussing the design and >

[julia-users] ERROR WITH BUILD MBEDTLS

2016-05-11 Thread Tony Kelman
Try navigating to that path and opening that zip file. May have just been an incomplete download. If Windows can't open the zip file, try deleting it then run Pkg.build("MbedTLS") again from inside Julia.

Re: [julia-users] using subscripts \_1, \_2, ... as field names

2016-05-11 Thread Davide Lasagna
Yes, that could be a good option, although it might just be overkill to overload indexing to access the four fields this type happens to have. On Tuesday, May 10, 2016 at 3:20:39 PM UTC+1, Eric Forgy wrote: > > Maybe you could override getindex so that A[1,1] is the interior nxn > matrix,

[julia-users] following down the chain of dispatch

2016-05-11 Thread Kristoffer Carlsson
If you get Gallium https://github.com/Keno/Gallium.jl working you can simply step through the functions.

[julia-users] following down the chain of dispatch

2016-05-11 Thread David van Leeuwen
Hello, I'd like to study how the implementation is for a particular function in Base. Is there an easy way of following the sequence of functions that are dispatched when I call the function with a particular type? For instance, I want to see how `display(::Array{T,N})` is implemented for

[julia-users] ERROR WITH BUILD MBEDTLS

2016-05-11 Thread SHORE SHEN
So it looks like this: Processing archive: C:\Users\shoren\.julia\v0.4\MbedTLS\deps\downloads\mbedtls-2.1.1-r1.zip Error: Can not open file as archive ===[ ERROR: MbedTLS ]=== LoadError: failed process: Process(`7z x

[julia-users] Why does ntuple with Val allocate when accessing an argument?

2016-05-11 Thread Kristoffer Carlsson
This is on 0.5. Let's first look at a simple example function f{N}(::Type{Val{N}}, v::Vector{Int}) # yes v is unused here q = ntuple(i -> 1 + i, Val{N}) end The generated code for this looks simple and nice: julia> @code_llvm f(Val{4}, [1,2,3,4]) define void @julia_f_50045([4 x i64]*

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Kristoffer Carlsson
There is a ReadTheDocs theme for mkdocs http://www.mkdocs.org/user-guide/styling-your-docs/#readthedocs

[julia-users] Re: Junitex-Builder: Unicode tab completions in Gnome-Builder

2016-05-11 Thread Nathan Smith
Update: subscript and superscript characters work now On Saturday, 7 May 2016 11:06:51 UTC-4, Nathan Smith wrote: > > HI Everyone! > > I've built a plugin to provide latex to unicode tab completions in the Gnome > Builder IDE. Works with *very* > recent

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Tommy Hofmann
Yeah, at least that is how I understand it and how I use it. I played with it to write documentation for Hecke.jl. It is very rudimentary but maybe you can get an idea of what documentation can look like (at the moment I am using Lexicon.jl since I did not have time to convert everything to

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Chris Rackauckas
Oh okay. So you just make docstrings (which can have LaTeX and support REPL help) and then Documenter.jl can convert them into Markdown files which mkdocs can convert into HTML documentation (with which I can choose a different theme)? I think I got this now. On Wednesday, May 11, 2016 at

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Tommy Hofmann
Do you also want to support the repl help system? By this I mean, do you want to do the following also for your custom functions/types? help?> BigInt search: BigInt disable_sigint reenable_sigint set_bigfloat_precision BigInt(x) Create an arbitrary precision integer. x may be an Int (or

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Chris Rackauckas
Thanks for the link. I'll look into using Documenter.jl + mkdocs. Is there anyway that the format can match something like Sphinx/MakeTheDocs (I don't really know what that is)? I like that look much better; the font from the Documenter.jl examples is wonky and hard to read. On Wednesday, May

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Tommy Hofmann
What about this post? https://groups.google.com/forum/#!searchin/julia-users/documentation/julia-users/q7rwopVQHV4/o-mDXpqhAwAJ Note that instead of Lexicon.jl one should use Documenter.jl but the workflow is similar. Documenter.jl provides an easy way to combine docstrings and manually written

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Chris Rackauckas
Forgot to mentioned that LaTeX is a requirement. I don't see any LaTeX in Documenter.jl On Wednesday, May 11, 2016 at 7:42:34 AM UTC-7, Kristoffer Carlsson wrote: > > https://github.com/MichaelHatherly/Documenter.jl with its documentation > http://michaelhatherly.github.io/Documenter.jl/latest/

Re: [julia-users] Julia text editor on iPad?

2016-05-11 Thread Rob J. Goedman
Yes, that definitely works. I actually bought the iPad Pro + keyboard + pen to make JuliaBox better usable on an iPad. And that certainly is the case for me, I can now try Julia constructs while on the road. Just having easy access to Shift-Return was key to me. The combination of Juliabox +

[julia-users] Re: Does rationalize ever round to zero?

2016-05-11 Thread James Fairbanks
Jeffrey Sarnoff writes: > You can post it as an issue. For further discussion: https://github.com/JuliaLang/julia/issues/16311

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Kristoffer Carlsson
https://github.com/MichaelHatherly/Documenter.jl with its documentation http://michaelhatherly.github.io/Documenter.jl/latest/ is good imo. You can look at packages that are using Documenter here: http://michaelhatherly.github.io/Documenter.jl/latest/man/examples/ On Wednesday, May 11, 2016

Re: [julia-users] cannot make codespeed

2016-05-11 Thread Isaiah Norton
I believe it's just a metadata field for the web display, probably `julia` or sometimes `julia-debug`. On Sun, May 8, 2016 at 3:41 AM, Didier Verna wrote: > > Hello, > > I cloned Julia yesterday and could make it, except that I cannot 'make > codespeed' in test/perf.

[julia-users] Package Documentation Tools

2016-05-11 Thread Chris Rackauckas
Hi, I was wondering if there's any documentation/tutorials for generating documentation for Julia packages. I would like to make one of those Read the Docs things but I don't know where to start (or if that's still the preferred method) and a quick Google / Julia-users search didn't hit a

Re: [julia-users] loop-else

2016-05-11 Thread Isaiah Norton
That issue is marked as a 1.0 milestone, which should be interpreted as "decision before 1.0" in this case. But clearly a low priority. On Wed, May 11, 2016 at 5:26 AM, Ford Ox wrote: > Will loop-else python like syntax be implemented in future? I have read > this

Re: [julia-users] Re: newbie questions (was undefined reference error)

2016-05-11 Thread Cedric St-Jean
I can't read assembly very well, but if I'm not mistaken it seems to be moving the .g and .b to xmm0 and xmm1, then back again. Timing it with @benchmark shows that it's a negligible ~2% difference though. Cool! function full_red!(vec::Vector{RGB{Float64}}) for i in 1:length(vec)

Re: [julia-users] Optimization

2016-05-11 Thread Tim Holy
You don't really need to read LLVM to get the gist; just count the "mul"s and note that there are no calls to a general "pow" function. ("ret" means return, "i64" means Int64, %n refers to variable n) Optimization is a hard problem in general (google "sufficiently smart compiler"). But more

[julia-users] Re: Getting into macros nightmare!

2016-05-11 Thread Ford Ox
Thank you guys. I have kinda skipped the hygiene chapter in docs :)

Re: [julia-users] Optimization

2016-05-11 Thread Ford Ox
Sadly I don't understand llvm language. Is that problem of optimization in general or is it just specific for llvm? It would be not so hard to write special code optimizer in julia itself I guess (I have made one (quite simple - tho it was capable of optimizing both examples and much more) in

Re: [julia-users] Error while loading packages

2016-05-11 Thread Yichao Yu
On Wed, May 11, 2016 at 4:52 AM, wrote: > Hello, > > I had instaled Julia and it was working perfectly last week. However, since > 10 days it is working perfectly each 2 days. The days it is not perfect I > can not use any package. When I try to load anyone I have the

[julia-users] Error while loading packages

2016-05-11 Thread hililielala16
Hello, I had instaled Julia and it was working perfectly last week. However, since 10 days it is working perfectly each 2 days. The days it is not perfect I can not use any package. When I try to load anyone I have the following message: using DataFrames INFO: Precompiling module

[julia-users] Getting into macros nightmare!

2016-05-11 Thread Kristoffer Carlsson
Good reading: http://docs.julialang.org/en/release-0.4/manual/metaprogramming/#hygiene

[julia-users] Compute Hashes

2016-05-11 Thread Kristoffer Carlsson
For SHA hashes there is this package: https://github.com/staticfloat/SHA.jl

Re: [julia-users] Re: newbie questions (was undefined reference error)

2016-05-11 Thread Yichao Yu
On Wed, May 11, 2016 at 8:01 AM, Cedric St-Jean wrote: > Tim, > > Isn't there an inefficiency here though? If my immutable had thirty fields > and I wanted to change the second field for each instance in an array of 1M > elements, I would have to read/write the whole

Re: [julia-users] Re: newbie questions (was undefined reference error)

2016-05-11 Thread Cedric St-Jean
Tim, Isn't there an inefficiency here though? If my immutable had thirty fields and I wanted to change the second field for each instance in an array of 1M elements, I would have to read/write the whole array instead of just writing one out of every thirty elements. Cédric On Tue, May 10, 2016

Re: [julia-users] Anonymous Function Behavior

2016-05-11 Thread Yichao Yu
On Wed, May 11, 2016 at 5:13 AM, Andras Niedermayer wrote: > BTW, it does work if you put it into a function rather than running it in > global scope: > julia> test(y) = map(x->10^x, y) > test (generic function with 1 method) > > julia> @time test(a); > 0.003387 seconds

Re: [julia-users] Optimization

2016-05-11 Thread Tim Holy
You might find this to be a fun example of how simple-seeming optimizations can be much more trouble than you might expect. For _years_, in Matlab (and perhaps other languages), x^2 was much, much slower than x*x. You might think it's surprising that a company with Mathworks' resources

Re: [julia-users] Re: Julia text editor on iPad?

2016-05-11 Thread Sheehan Olver
It works! I'm using the textmate mode https://github.com/JuliaLang/Julia.tmbundle Sent from my iPad > On 11 May 2016, at 9:02 PM, cormull...@mac.com wrote: > > Textastic can use TextMate definitions: >

Re: [julia-users] Optimization

2016-05-11 Thread Tim Holy
First, it's possible that the docs are out of date; you should benchmark this yourself before getting worried about it. Second, hoisting optimizations are mostly performed by LLVM (see createLICMPass), not julia. So you might as well ask this question over at LLVM. Best, --Tim On Wednesday,

[julia-users] Re: Julia text editor on iPad?

2016-05-11 Thread cormullion
Textastic can use TextMate definitions: http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html Koder, another main contender, doesn't let you add syntax highlighting yet.

[julia-users] Re: Getting into macros nightmare!

2016-05-11 Thread Lutfullah Tomak
What you want to have is julia> x = 33 33 julia> macro inc(a) esc(:($a = $a + 1)) end julia> @show macroexpand(:(@inc x)) macroexpand($(Expr(:quote, :(@inc x = :(x = x + 1) :(x = x + 1) julia> @show @inc x @inc(x) = 34 34 1. You need esc I think otherwise julia> macro

[julia-users] Re: [ANN] Book: Julia High Performance

2016-05-11 Thread Adrian Salceanu
I quite enjoy it - nicely written, to the subject, makes for a very pleasant read. Also, nice to see that Packt has recently had a Julia offer of the day, including the 4 books on Julia they're published. They're all very good. I'm considering writing a book on web development with Julia -

[julia-users] Getting into macros nightmare!

2016-05-11 Thread Ford Ox
*My struggle with macros* Lets code macro for increment, that should be fairly easy right? x = 33 macro inc(x) :(x = x + 1) end @show @inc x > LoadError: UndefVarError: x not defined Hmm, it's not so easy as I thought, I must be missing some very basic knowledge, lets see whats

[julia-users] Re: How to use Debug.jl in Atom?

2016-05-11 Thread chobbes158
I'm a newbie as well. But as far as I know Debug.jl is already a yesterday's tool. You need to switch to Gallium and ASTInterpreter one day anyway. See the discussion in the following thread: https://groups.google.com/forum/#!topic/julia-users/NEQmWBKZPbE On Wednesday, May 11, 2016 at 9:27:31

[julia-users] Optimization

2016-05-11 Thread Ford Ox
>From docs: macro r_str(p) > Regex(p) > end > > > That’s all. This macro says that the literal contents of the string > literal r"^\s*(?:#|$)" should be passed to the > @r_str macro and the result of that expansion should be placed in the > syntax tree where the string literal occurs. In >

[julia-users] loop-else

2016-05-11 Thread Ford Ox
Will loop-else python like syntax be implemented in future? I have read this topic, but no statement has been made.

Re: [julia-users] Anonymous Function Behavior

2016-05-11 Thread Andras Niedermayer
BTW, it does work if you put it into a function rather than running it in global scope: julia> test(y) = map(x->10^x, y) test (generic function with 1 method) julia> @time test(a); 0.003387 seconds (4.34 k allocations: 97.662 KB) julia> @time test(a); 0.000440 seconds (4.01 k allocations:

[julia-users] Compute Hashes

2016-05-11 Thread jw3126
I have a string and I want to compute its sha-1 and maybe also other hashes. What is a good way to do this in julia? (There is a function `hash` in Base, though I am not sure what hash it computes or whether it will be changed over time.)

Re: [julia-users] Julia text editor on iPad?

2016-05-11 Thread Sheehan Olver
Coda looks promising https://panic.com/coda-ios/ I'll look into whether it's possible to make a Julia syntax mode. (Hopefully the format is similar to SubEthaEdit.) Sent from my iPad > On 11 May 2016, at 3:03 PM, Jon Norberg wrote: > > I've found that the best

[julia-users] How to use Debug.jl in Atom?

2016-05-11 Thread Yao Lu
However, I cannot input anything in the console.