Re: [julia-users] Binary Heaps question

2015-06-04 Thread Tim Holy
My default answer to such questions is to suggest profiling (I don't really know/remember the DataStructures code very well). You can also try the binary heap in Base.Collections. I've not compared them directly. Best, --Tim On Thursday, June 04, 2015 12:43:34 PM Seth wrote: I created an

Re: [julia-users] String literal without interpolation

2015-06-04 Thread Scott Jones
I would say that is a bug... that `\\` doesn't become `\`. On Wednesday, December 4, 2013 at 4:03:43 AM UTC+1, Stefan Karpinski wrote: Right, what I actually meant was removing backslashes when they occur in the input before your quote string (double quote, typically). But I actually think

Re: [julia-users] Binary Heaps question

2015-06-04 Thread Tim Holy
That's great to hear, and thanks for letting us know the outcome. --Tim On Thursday, June 04, 2015 04:59:44 PM Seth wrote: Tim, Thank you very much. I didn't realized there were heaps in Collections. I've tested them and they're much faster / memory efficient than either of the ones in

Re: [julia-users] Error installing GnuTLS

2015-06-04 Thread Samuel Colvin
Thanks for you help. Ok that works (actually it failed again, but this time it was due to missing m4 which is easy enough to notice and install). I'm happy to create an issue, but I'm a little unclear on whether this is julia's fault or GnuTLS's fault? Where should I be submitting the issue?

Re: [julia-users] Error installing GnuTLS

2015-06-04 Thread Milan Bouchet-Valat
Le mercredi 03 juin 2015 à 13:42 -0700, Samuel Colvin a écrit : Just tried to install Quandl and found GnuTLS won't install, I'm on Ubuntu 15.04, version info: Julia Version 0.3.8 Commit 79599ad (2015-04-30 23:40 UTC) Platform Info: System: Linux (x86_64-linux-gnu) CPU: Intel(R)

Re: [julia-users] Error installing GnuTLS

2015-06-04 Thread Samuel Colvin
config.log: https://gist.github.com/samuelcolvin/91ca748699ce6dc81660 I looked though it myself before posting this issue but couldn't see anything obvious. On Thursday, 4 June 2015 21:53:45 UTC+1, Milan Bouchet-Valat wrote: Le mercredi 03 juin 2015 à 13:42 -0700, Samuel Colvin a écrit :

[julia-users] Re: Julia and notepad++

2015-06-04 Thread Tony Kelman
Could you submit this as a pull request on github, instead of just a link on dropbox? On Thursday, June 4, 2015 at 10:26:56 AM UTC-7, Massimo Corinaldesi wrote: Starting from Notepad++_2_Julia.ahk and Julia_Notepad++.xml i have written a modified version of autohotkey script and a new theme

[julia-users] Re: Anonymous Objects?

2015-06-04 Thread David Gold
What is A*b? Is it just a formal multiplication? On Thursday, June 4, 2015 at 4:54:39 PM UTC-4, Gabriel Goh wrote: Do there exist anonymous objects, in the same way anonymous functions exist? For example, I'd like to return a object A, without going through the hoops of making an explicit

Re: [julia-users] Error installing GnuTLS

2015-06-04 Thread Milan Bouchet-Valat
Le jeudi 04 juin 2015 à 22:19 +0100, Samuel Colvin a écrit : Thanks for you help. Ok that works (actually it failed again, but this time it was due to missing m4 which is easy enough to notice and install). Cool! I'm happy to create an issue, but I'm a little unclear on whether this is

[julia-users] Anonymous Objects?

2015-06-04 Thread Gabriel Goh
Do there exist anonymous objects, in the same way anonymous functions exist? For example, I'd like to return a object A, without going through the hoops of making an explicit type, which you can do (using my made up syntax) function createMatrix() # create an anonymous object A A =

Re: [julia-users] Error installing GnuTLS

2015-06-04 Thread Milan Bouchet-Valat
Le jeudi 04 juin 2015 à 13:59 -0700, Samuel Colvin a écrit : config.log: https://gist.github.com/samuelcolvin/91ca748699ce6dc81660 I looked though it myself before posting this issue but couldn't see anything obvious. Ah, I think the explanation lies here: /usr/bin/ld: cannot find -lgmp

[julia-users] Re: Anonymous Objects?

2015-06-04 Thread John Myles White
https://groups.google.com/forum/#!topic/julia-users/HYhm0A8KQXw On Thursday, June 4, 2015 at 2:02:51 PM UTC-7, David Gold wrote: What is A*b? Is it just a formal multiplication? On Thursday, June 4, 2015 at 4:54:39 PM UTC-4, Gabriel Goh wrote: Do there exist anonymous objects, in the same

Re: [julia-users] Binary Heaps question

2015-06-04 Thread Seth
Tim, Thank you very much. I didn't realized there were heaps in Collections. I've tested them and they're much faster / memory efficient than either of the ones in DataStructures: julia g = readgraph(/Users/seth/Downloads/pgp2.jgz) {39796, 301498} directed graph julia @time z =

[julia-users] Anonymous Objects?

2015-06-04 Thread Gabriel Goh
Do there exist anonymous objects, in the same way anonymous functions exist? For example, I'd like to return a object A, without going through the hoops of making an explicit type, which you can do function createMatrix() # create an anonymous object A return A end A = createMatrix() A*x

Re: [julia-users] Re: Generate polynomial expression on the fly

2015-06-04 Thread Júlio Hoffimann
Yes Kristoffer, very similar effect. Do you think it is good idea to have that function in Base? -Júlio

[julia-users] Re: [Slightly OT] Creating JuliaCon presentation slides as a Jupyter notebook

2015-06-04 Thread John Myles White
A long time ago, I did this with IJulia: https://github.com/johnmyleswhite/UCDavis.jl Hopefully most of my approach isn't relevant anymore, since I hit a couple of bugs in the resulting slides that I had to fix with a Ruby script. -- John On Thursday, June 4, 2015 at 7:49:15 AM UTC-7,

[julia-users] Julia and notepad++

2015-06-04 Thread cameyo
Starting from Notepad++_2_Julia.ahk and Julia_Notepad++.xml i have written a modified version of autohotkey script and a new theme for notepad++ (solarized colors). The script allows to: - run julia REPL line command and block command from notepad++ (no flick) - paste text on REPL with Control-V -

[julia-users] Binary Heaps question

2015-06-04 Thread Seth
I created an issue https://github.com/JuliaLang/DataStructures.jl/issues/95 in DataStructures.jl but was unsure whether or not that was the right approach. In any case, I'll restate the question here with apologies for any inappropriate duplication. I've been using mutable_binary_minheap for

[julia-users] [Slightly OT] Creating JuliaCon presentation slides as a Jupyter notebook

2015-06-04 Thread Douglas Bates
The JuliaCon2015 organizers have suggested preparing conference proceedings in the form of Jupyter notebooks, which I think is a great idea. I have considered going further and preparing presentation slides using Jupyter. I know this can be done but many of the search engine hits on the topic

[julia-users] Re: List of reserved words

2015-06-04 Thread cameyo
Thanks. I have look into other syntax highlighter files...but they have different reserved words :-). I have take the work of Viral B. Shah on contrib folder of julia github: 1) I have rewrite a better version of npp2julia autohotkey script 2) I am writing a new syntax highlighter for notepad++

[julia-users] julia stays in idle, not responding, during function execution - any hints to avoid this ?

2015-06-04 Thread jojo lalpin
Hi all, I execute a function thousands of times and it happens that julia keeps not responding, using 0% of CPU. The only way to get out is to kill the process. Julia main script calls Pygmo using Pycall (optim/evolution python wrapper for Pagmo C library). Pygmo then calls a julia function

[julia-users] hex2num() query

2015-06-04 Thread cormullion
What's the logic behind the results from `hex2num()`: julia hex2num(1) 1.0f-45 julia hex2num(2) 3.0f-45 julia hex2num(3) 4.0f-45 julia hex2num(A) 1.4f-44

Re: [julia-users] hex2num() query

2015-06-04 Thread Jiahao Chen
julia bits(1.4f-44) 1010 As you can see, the last four bits have A as their hex representation. Thanks, Jiahao Chen Research Scientist MIT CSAIL On Thu, Jun 4, 2015 at 5:06 PM, cormull...@mac.com wrote: What's the logic behind the results from `hex2num()`:

Re: [julia-users] hex2num() query

2015-06-04 Thread cormullion
Ah, OK. Thanks. I now realise I'm looking for `parseint(..., 16)` ;)

Re: [julia-users] Re: Error installing GnuTLS

2015-06-04 Thread Kevin Squire
No help for the error, but Ubuntu 15.04 has gcc 4.9, so that's not the issue. On Wed, Jun 3, 2015 at 7:47 PM, Glen H glen.he...@gmail.com wrote: I believe the issue is you are using too old of a gcc compiler. I think you need at least gcc 4.4. On Wednesday, June 3, 2015 at 4:42:34 PM

Re: [julia-users] Re: Error installing GnuTLS

2015-06-04 Thread Samuel Colvin
yup: gcc --version gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2 -- Samuel Colvin s...@muelcolvin.com, 07801160713 On 4 June 2015 at 13:15, Kevin Squire kevin.squ...@gmail.com wrote: No help for the error, but Ubuntu 15.04 has gcc 4.9, so that's not the issue. On Wed, Jun 3, 2015 at 7:47 PM,

[julia-users] List of reserved words

2015-06-04 Thread cameyo
I'm creating a syntax highlighter for julia (notepad++). Where i can find a list of reserved words? Thanks. cameyo -- View this message in context: http://julia-programming-language.2336112.n4.nabble.com/List-of-reserved-words-tp21074.html Sent from the Julia Users mailing list archive at

[julia-users] Re: Organizing code around Jump models

2015-06-04 Thread Francois Gilbert
Hi Miles, It would be easier for me to give some excerpts of the Julia sources I am working with. I think it would suffice to illustrate the mechanic we are trying to implement. Say we have two abstract types: abstract BasicUC abstract CCModel:BasicUC These are declared in separate

Re: [julia-users] Pause and continue iterators

2015-06-04 Thread Yichao Yu
On Wed, Jun 3, 2015 at 3:16 PM, Stefan Karpinski stefan.karpin...@gmail.com wrote: You could use a task, but the performance would be much less good than explicitly manipulating the iteration state for many things. Manually iterating is not that bad so I think I would prefer a solution that

Re: [julia-users] Colon as an argument

2015-06-04 Thread Yichao Yu
On Thu, Jun 4, 2015 at 8:50 AM, Christoph Ortner christophortn...@gmail.com wrote: When implementing a function (overloading getindex to be precise) to allow : as an argument I expected that I would need to do the following: funA(_::Colon) = println(funA) but the following works as well

Re: [julia-users] Colon as an argument

2015-06-04 Thread Christoph Ortner
ah - extremely embarrassing mistake. Thank you. So was funA the correct way to implement this? Christoph

Re: [julia-users] Colon as an argument

2015-06-04 Thread Yichao Yu
On Thu, Jun 4, 2015 at 9:10 AM, Christoph Ortner christophortn...@gmail.com wrote: ah - extremely embarrassing mistake. Thank you. So was funA the correct way to implement this? IIRC, currently `a[:]` gets lowered to `a[1:endof(a)]` (see `expand(:(a[:]))`) so this won't work for get/set index.

Re: [julia-users] Colon as an argument

2015-06-04 Thread Yichao Yu
On Thu, Jun 4, 2015 at 9:13 AM, Yichao Yu yyc1...@gmail.com wrote: On Thu, Jun 4, 2015 at 9:10 AM, Christoph Ortner christophortn...@gmail.com wrote: ah - extremely embarrassing mistake. Thank you. So was funA the correct way to implement this? IIRC, currently `a[:]` gets lowered to

Re: [julia-users] List of reserved words

2015-06-04 Thread Yichao Yu
On Thu, Jun 4, 2015 at 8:14 AM, cameyo massimo.corinald...@regione.marche.it wrote: I'm creating a syntax highlighter for julia (notepad++). Where i can find a list of reserved words? You can probably extract that from the parser or the REPL but here[1]'s where I usually find it. Other editor

[julia-users] Colon as an argument

2015-06-04 Thread Christoph Ortner
When implementing a function (overloading getindex to be precise) to allow : as an argument I expected that I would need to do the following: funA(_::Colon) = println(funA) but the following works as well funB(:) = println(funB) Why? When I type ?: in the REPL I find that : is an instance

Re: [julia-users] Pause and continue iterators

2015-06-04 Thread Stefan Karpinski
Are you asking about the task approach or the manual iteration approach? Manual iteration, yes (otherwise all iteration would be slow); tasks, I'm not sure how inlining would be possible. On Thu, Jun 4, 2015 at 8:52 AM, Yichao Yu yyc1...@gmail.com wrote: On Wed, Jun 3, 2015 at 3:16 PM, Stefan

Re: [julia-users] Pause and continue iterators

2015-06-04 Thread Yichao Yu
On Thu, Jun 4, 2015 at 8:57 AM, Stefan Karpinski ste...@karpinski.org wrote: Are you asking about the task approach or the manual iteration approach? Manual iteration, yes (otherwise all iteration would be slow); tasks, I'm not sure how inlining would be possible. Sorry I was trying to come up

Re: [julia-users] Colon as an argument

2015-06-04 Thread Christoph Ortner
great - thank you! On Thursday, 4 June 2015 14:16:42 UTC+1, Yichao Yu wrote: On Thu, Jun 4, 2015 at 9:13 AM, Yichao Yu yyc...@gmail.com javascript: wrote: On Thu, Jun 4, 2015 at 9:10 AM, Christoph Ortner christop...@gmail.com javascript: wrote: ah - extremely embarrassing mistake.

Re: [julia-users] Re: ldltfactor for sparse matrices

2015-06-04 Thread Andreas Noack
Unfortunately not. See https://github.com/JuliaLang/julia/pull/10402 2015-06-04 9:18 GMT-04:00 Dominique Orban dominique.or...@gmail.com: Is it possible to recover L and D from an LDL' factorization? I'm using 0.3.8. On Wednesday, May 27, 2015 at 11:24:03 PM UTC+2, Eduardo Lenz wrote:

Re: [julia-users] Re: Generate polynomial expression on the fly

2015-06-04 Thread Kristoffer Carlsson
It seems https://github.com/daviddelaat/MultiPoly.jl/ could do something like that. For example: using MultiPoly x, y, z = generators(MPoly{Float64}, :x, :y, :z); p = (x+y+z)^2 # MultiPoly.MPoly{Float64}(x^2 + 2.0x*y + 2.0x*z + y^2 + 2.0y*z + z^2) p.terms #

[julia-users] Re: Simple Conjugate Gradients coded in Julia is much faster than cholfact

2015-06-04 Thread Dominique Orban
FWIW, on your example, here's the time taken by the CG implemented in Krylov.jl (https://github.com/optimizers/Krylov.jl) julia A = sprand(1,1,0.01); A = A'+A; A=A+100*rand()*speye(1,1); julia b = A * ones(1); julia cg(A, b, rtol=1.0e-10, atol=1.0e-10); julia @time cg(A, b,