[julia-users] How are numbers converted to strings?

2015-07-31 Thread holocronweaver
How are numbers converted to strings in Julia? Specifically, where in the Julia source is this conversion performed? I ask because my x86 assembly implementation of 64-bit integer to string conversion is on average about 1.5x slower than Julia. Either Julia is doing something very smart, or

[julia-users] DOWNLOADING JUNO THROUGH LIGHT TABLE. PLEASE HELP!!!

2015-07-31 Thread Vuyo Majila
Hi i followed all the steps required for downloading juno through light table. However, Juno doesn't appear under plug ins. Can anyone assist me on how I can remedy this or perhaps download Juno in another way

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Waldir Pimenta
The Wikipedia article was redirected quite recently in fact, and after reviewing the edit history and reading the comments on the talk page https://en.wikipedia.org/wiki/Talk:Unum_(number_format), I can say (as an experienced Wikipedia editor) that the case for restoring the article can be made

[julia-users] Re: How can I change the R code to Julia code. Thank you.

2015-07-31 Thread Nils Gudat
As your code is not a reproducible example, there's no way to say what's going wrong exactly. The error message is telling you that you are trying to access an array out of bounds, so it would be necessary to know the sizes of the arrays in your code to find the error. Two other things: -

Re: [julia-users] efficient use of shared arrays and @parallel for

2015-07-31 Thread thr
Yes, sure. On Friday, July 31, 2015 at 2:02:25 PM UTC+2, Tim Holy wrote: I have a demo to answer your question, but I'd like to simply add it to the documentation on SharedArrays. May I use some of your code in writing up the demo? (MIT license, see

[julia-users] Equivalent of Matlab zpk()?

2015-07-31 Thread Joe Tusek
I've been translating some Matlab code for calculating a spectral optimisation function that uses Matlab's zpk() function and I can't find an equivalent in Julia packages. The DSP.jl looks like its a start on a well appointed package but is a bit thin at this stage. Is there anything out there

[julia-users] FloatRange limited usability

2015-07-31 Thread Petr Hlavenka
Hi, I'm processing the data from an oscilloscope. The natural way to encapsulate them is to have a structure in a form of type Wfm xorigin xinc len ydata properties::Dict{ASCIIString,Any} end , where X represents time and Y data are equidistantly spaced in time. To access a

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Tom Breloff
I added some info to the readme at https://github.com/tbreloff/Unums.jl. I talk a little bit about how I'm intending to build the package, the available types, etc. There is also a stub issue for continuing the discussion of how unums fit into the world of numerical analysis:

[julia-users] Iterate over the possible values of an enum?

2015-07-31 Thread Douglas Bates
In a FLAC (as in Free Lossless Audio Codec) package for version 0.4 I used @enum to create a type to pass to calls to the C library libflac. Metadata for a flac stream object. Used in both encoding and decoding of a stream. Each type of metadata object contains an indicator of its `typ`, an

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Job van der Zwan
Hey Tom, Well, I could change the setting to anyone with the link can edit - we risk vandalism in that case, but as long as we keep the document link to here the risk is minimal. On Friday, 31 July 2015 15:43:06 UTC+2, Tom Breloff wrote: I added some info to the readme at

Re: [julia-users] efficient use of shared arrays and @parallel for

2015-07-31 Thread Eduardo Lenz
Hi. Regarding your questions, I am also having the same problems and no luck with those {Any} and SharedArrays. Also, I am having the same problems with those crashes, so I have to restart Julia after finishing any parallel code. I am looking forward to see Tim's comments about those type

Re: [julia-users] Deprecation of require

2015-07-31 Thread Eduardo Lenz
Thanks for your help Tim ! On Friday, July 31, 2015 at 8:30:44 AM UTC-3, Tim Holy wrote: If MyModule.jl is on your LOAD_PATH, @everywhere import MyModule should work. You can add push!(LOAD_PATH,/my/code/repository) to your .juliarc.jl file. This has been deprecated

[julia-users] Re: Equivalent of Matlab zpk()?

2015-07-31 Thread Andreas Lobinger
Depending how your filter is represented, zpkdata from Control.jl might be a good choice - i'm not using it, but the code looks promising.

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Jason Merrill
On Thursday, July 30, 2015 at 3:54:39 PM UTC-4, Jason Merrill wrote: * Wrath of Kahan, 2 In the unum computation, squaring operations are fused with squareu, but float Interval calculations are not fused. I also believe the check for the ubounds containing zero in e[z] is erroneous in a

[julia-users] Re: Iterate over the possible values of an enum?

2015-07-31 Thread Douglas Bates
To answer my own question for typ in instances(MetadataType) ... end On Friday, July 31, 2015 at 9:41:13 AM UTC-5, Douglas Bates wrote: In a FLAC (as in Free Lossless Audio Codec) package for version 0.4 I used @enum to create a type to pass to calls to the C library libflac. Metadata

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Waldir Pimenta
A github wiki in the Unums.jl package would seem ideal. You get the anyone can edit feature, with accountability of who made each edit (github wikis are git repos, and to make edits people need to have a github account) and easy reversal of eventual bad changes. On Friday, July 31, 2015 at

[julia-users] Re: John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
I just now learned about this discussion and I see quite a few messages I need to reply to. I am very excited about a Julia version of unum arithmetic, and it does seem like the ideal language for it. Alan Edelman, Deepak Vinchhi, and Viral Shah proposed to create it with funding from A*STAR

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
There is no question that getting rigorous, tight bounds is going to cost something compared to the guesswork of conventional floating point. Interval arithmetic has failed for the last fifty years because it requires a LOT of work and expertise to keep the bounds from exploding; the ubox

[julia-users] Expression parsed differently in Julia 0.3 vs Julia 0.4

2015-07-31 Thread Mathew
The expression e = :(xc = b) returns in Julia 0.3 :(x c = b) with e.args[2] equal to :b but in Julia 0.4 :(x c = begin # none, line 1: b end) with e.args[2] equal to quote b end. I relied on such expressions to denote instrumental variables in formulas for a

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Unum format specifically eliminates NaN payloads as one of the worst decisions made in the IEEE 754 standard. They break just about every rule there is about good engineering. There are two kinds of NaN in unum math: quiet and signaling. The other bit patterns are used to represent actual

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Job van der Zwan
Ah, that sounds good. So I should just fork Tom's package, copy the document we have so far into the wiki, then make a pull request? On Friday, 31 July 2015 17:01:57 UTC+2, Waldir Pimenta wrote: A github wiki in the Unums.jl package would seem ideal. You get the anyone can edit feature, with

[julia-users] Re: FloatRange limited usability

2015-07-31 Thread Matt Bauman
I'd recommend not using FloatRange for this task. Instead, I'd create a new Interval type that doesn't have discrete steps and instead represents all real numbers between (and including) its endpoints. You can even use an unused operator (..) to allow easy construction of intervals. Naively,

[julia-users] Re: John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
What IEEE 754 did with negative zero is a half-baked attempt to represent inexactness. Consider, for example, that the square root of negative zero is defined to be negative zero. Unums have the same representation of zero as floats in that the sign bit can be 0 or 1, but the sign bit is

[julia-users] Re: John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Zenna, If unums are used without the ubox method and some of the other techniques described in the book (like tightest-possible evaluation in the *g*-layer for a well-defined set of functions), they will indeed fall prey to two of the main problems of interval arithmetic: the dependency

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Be careful. I, too, hoped that it would be sufficient to change the last fraction bit to a ubit. But the relative error changes with every calculation, so you *have* to let the fraction length float and be another annotation field. And for more subtle reasons, you need to be able to vary the

Re: [julia-users] Re: John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
The chapter Permission to Guess explains how to round unums. The guess function replaces an inexact unum with an exact one, either the one closest to the midpoint if there is at least one more bit of fraction precision available, or one of the endpoints if the ULP size is already as small as

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Jason Merrill
On Friday, July 31, 2015 at 12:51:57 PM UTC-4, Jason Merrill wrote: On Thursday, July 30, 2015 at 3:54:39 PM UTC-4, Jason Merrill wrote: * Wrath of Kahan, 2 In the unum computation, squaring operations are fused with squareu, but float Interval calculations are not fused. I also believe

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Many people are judging the merits of unum arithmetic based on an hour-long PowerPoint presentation. I really wish they wouldn't do that. There's no way that can get all the key concepts across in anything less than a 400-page book that anticipates the questions and criticisms and answers

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
It would be wonderful if someone else would create a super-concise explanation of unums! Thank you, thank you! I can't seem to do it. I must be getting long-winded in my old age. I looked a https://github.com/tbreloff/Unums.jl and saw that it erroneously says the sign bit field can have

Re: [julia-users] What is the correct way for function parameter list generation with @eval?

2015-07-31 Thread Yichao Yu
On Fri, Jul 31, 2015 at 2:46 PM, Diego Javier Zea diego...@gmail.com wrote: Hi! I don't know how to generate parameter list of functions in order to avoid a lot repetitive code: julia for (param, special) in [ (:(),:()), (:(, y),:(+ y)) ] @eval begin function f(x

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Jason Merrill
In the Wrath of Kahan, 2 example, the input to e[z] might be intended to be a unum, but in the actual examples used in the book, q[x] returns a ubound, not a unum, so I stand by my analysis that the presentation is incorrect in an important way. As a plug for Julia, it should be a lot easier

[julia-users] What is the correct way for function parameter list generation with @eval?

2015-07-31 Thread Diego Javier Zea
Hi! I don't know how to generate parameter list of functions in order to avoid a lot repetitive code: julia for (param, special) in [ (:(),:()), (:(, y),:(+ y)) ] @eval begin function f(x $(param), z) x $(special) + z end end end

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Waldir Pimenta
The wiki in github projects is a separate git repository from the code one, so I'm not sure you can add it to the upstream repo with a PR like that. The easiest way is for Tom to activate the wiki in the repo settings, then anyone with a github account can add and edit pages directly in the web

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Tom Breloff
Thanks for the catch about the signbit... already changed. On Fri, Jul 31, 2015 at 2:30 PM, John Gustafson johngustaf...@earthlink.net wrote: It would be wonderful if someone else would create a super-concise explanation of unums! Thank you, thank you! I can't seem to do it. I must be

Re: [julia-users] Re: John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Actually, Jason, the book went through intense peer review repeatedly for over a year before it hit the shelves. Horst Simon, the series editor, vetted the manuscript and made sure William Kahan saw it as well. Kahan, the guy behind the IEEE 754 Standard for floats and a Turing Award

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Here is how you can represent the square root of 2 with a finite number of symbols: 1.414… The … means There are more decimals after the last one shown, not all zeros and not all nines. If the trailing digits were all zeros, we would instead write 1.414 and it would be exact. If the trailing

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Thanks for the detailed reading, Jason. If the input is a unum, then the only way for it to contain zero is to be exactly zero. And that was the way the example was used. If the input to the function is a ubound, then you are correct that the test would need to be rewritten. On Friday, July

Re: Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Tom Breloff
To me, there are 3 main criteria that I'm comparing floats vs unums: 1) Speed 2) Elegance 3) Correctness Right now Floats win #1 and Unums win #2 and #3 (IMO). If unums are optimized in hardware someday, I believe they will also win #1, especially with the addition of some summary bits that can

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
It is indeed possible to do a shortcut to something very similar to a unum representation, and Ulrich Kulisch has suggested this: Every number is a pair of 32-bit floats where the last bit of the fraction is the ubit. The two floats represent the endpoints of an interval. So there is no

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Guys, this reminds me: There used to be a Wikipedia page on Unum (arithmetic), but it was taken down for some reason and now searches just direct to my Wikipedia page. Maybe it's time to revive it. Then we could start building a concise explanation there. On Friday, July 31, 2015 at 8:01:57 AM

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Zenna Tavares
The quick explanation for why unums/ubounds don't diverge like intervals do is that when the result gets wider, it divides like an amoeba into a collection of unums that alternate between exact and inexact values that tile the interval It seems like this will incur another problem:

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Jeffrey Sarnoff
Zenna, I had been wondering if there might be something in the tiling nature that makes unums particularly well suited to solving problems posed on higher dimensional surfaces? On Friday, July 31, 2015 at 3:54:29 PM UTC-4, Zenna Tavares wrote: The quick explanation for why unums/ubounds

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Jeffrey Sarnoff
What would be the first problem you address with this made hardware? On Friday, July 31, 2015 at 3:39:01 PM UTC-4, John Gustafson wrote: I discuss this in the book; there have to be strict bounds on how long a computation remains in the *g*-layer (fused) or people would dump their entire

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
I discuss this in the book; there have to be strict bounds on how long a computation remains in the *g*-layer (fused) or people would dump their entire calculation in there. I think i got most of the fused operations that make sense, and I pointed out some that do not make sense. It is key

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
I'll try to answer this concisely. Unum addition and multiplication are associative; they give bitwise identical results if performed in the *g*-layer (fused operations) and if not fused, will produce the same answer but possibly with different accuracy. When (*a* + *b*) + *c* is not identical

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Tom, I very much hope to soon be spending full time on unums. I have been offered an appointment at A*STAR to come to Singapore for a year and develop unum arithmetic. So absolutely I hope to help with the Julia implementation once I've made that move! It was supposed to start next month; just

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
Existing methods for evaluation of polynomials do not produce tight bounds. There is indeed a mountain of papers written about doing it, all with the flavor of our method sucks less because it usually gets somewhat tighter bound, though still not as tight as possible. I was surprised to learn

[julia-users] Juno couldn't connect Julia on Windows 10

2015-07-31 Thread Serge Santos
Hello, I am fairly new to Julia, but it has already been a fantastic help for my work so far. I just upgraded to Windows 10 and installed Julia and Juno. Unfortunately Juno couldn't connect with Julia. I got the error message: Couldn't connect to Julia INFO: Couldn't find Jewel package,

[julia-users] Escher.jl How to embed arbitrary javascript code?

2015-07-31 Thread Ismael VC
I have been trying to include a gist in an Escher web app: function main(window) vbox( plaintext(Gist test), Elem(:script, src = ~/.julia/v0.3/Patchwork/runtime/build.js), Elem(:script, display = inline, src =

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread Tom Breloff
The wiki should be active now. John: welcome to the thread! I hope you'll find the time to review the implementation I'm designing as well as contribute to the wiki. On Fri, Jul 31, 2015 at 1:49 PM, John Gustafson johngustaf...@earthlink.net wrote: Here is how you can represent the square

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
I would probably attempt an n-body calculation first. That would allow us to check the hypothesis that uboxes form ellipsoidal clouds as the computation progresses, which is why Kahan came up with a form of arithmetic based on hyperellipsoids. On Friday, July 31, 2015 at 12:51:21 PM UTC-7,

Re: [julia-users] efficient use of shared arrays and @parallel for

2015-07-31 Thread Tim Holy
I have a demo to answer your question, but I'd like to simply add it to the documentation on SharedArrays. May I use some of your code in writing up the demo? (MIT license, see https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation) --Tim On Thursday, July 30,

[julia-users] Re: Errors while trying to use cxx and embed Julia together

2015-07-31 Thread Kostas Tavlaridis-Gyparakis
Ok, this did solve my problem. Now I will proceed with trying to connect a big c++ project with julia and see what happens there, in the very optimistic case where I proceed without any problems I will let you know just for reference, otherwise I will return with the new errors and mistakes I

Re: [julia-users] Juno couldn't connect Julia on Windows 10

2015-07-31 Thread Serge Santos
The output is C:\\Users\\Serge\\.Julia\\v0.3 ENV[HOME] gave me an error message (ERROR: key not found: HOME in getindex at env.jl:57) On Friday, 31 July 2015 23:18:17 UTC+1, Isaiah wrote: What is the output of (in the REPL only, not Juno): Pkg.dir() ENV[HOME] On Fri, Jul 31, 2015 at 3:52

Re: [julia-users] question about altering the shape of a 3-d array

2015-07-31 Thread Jim Nason
Dear Tim: Yes, I am. Thank you. There is a lot to learn about Julia, but it is all worth it. Best wishes, Jim On 07/31/2015 07:09 PM, Tim Holy wrote: Are you looking for permutedims? --Tim On Friday, July 31, 2015 04:05:09 PM jamesmna...@gmail.com wrote: Hi All: I have a 3-d array

[julia-users] question about altering the shape of a 3-d array

2015-07-31 Thread jamesmnason
Hi All: I have a 3-d array (Float64), call it q, with dimensions (d1, d2, d3) that needs to be to changed to an array, call it Q, with dimensions (d2, d3, d1) to perform several computations. I have tried using the reshape command but that does not respect the first dimension (row) of the q

Re: [julia-users] question about altering the shape of a 3-d array

2015-07-31 Thread Tim Holy
Are you looking for permutedims? --Tim On Friday, July 31, 2015 04:05:09 PM jamesmna...@gmail.com wrote: Hi All: I have a 3-d array (Float64), call it q, with dimensions (d1, d2, d3) that needs to be to changed to an array, call it Q, with dimensions (d2, d3, d1) to perform several

Re: [julia-users] Juno couldn't connect Julia on Windows 10

2015-07-31 Thread Arch Call
I had the same error after upgrading to Windows 10. Uninstall Julia and afterwards go into file explorer and physically delete the .Julia folder and all its contents. I also deleted the .julia_history file. Next reinstall Julia and you should be good to go...Arch On Friday, July 31, 2015 at

Re: [julia-users] Juno couldn't connect Julia on Windows 10

2015-07-31 Thread Serge Santos
Great. I did it and it is working now. Thank you so much! On Saturday, 1 August 2015 00:17:21 UTC+1, Arch Call wrote: I had the same error after upgrading to Windows 10. Uninstall Julia and afterwards go into file explorer and physically delete the .Julia folder and all its contents. I

Re: [julia-users] Re: John L. Gustafson's UNUMs

2015-07-31 Thread Job van der Zwan
Speaking of going out on a limb: are you aware of Mark Kikgard's work on GPU accelerated path rendering? http://www.slideshare.net/mobile/Mark_Kilgard/gtc-2014-nvidia-path-rendering There is obvious *thematic* overlap, with the promise of faster, more accurate 2D graphics using LESS power.

Re: [julia-users] John L. Gustafson's UNUMs

2015-07-31 Thread John Gustafson
I know it looks scary, but these days, supercomputers can do tens of petaflops of calculation and have hundreds of millions of processors. And other than LINPACK and some trivial stuff (like collecting Monte Carlo data), very few applications have been scaled to run on hundreds of millions of

Re: [julia-users] Juno couldn't connect Julia on Windows 10

2015-07-31 Thread Isaiah Norton
What is the output of (in the REPL only, not Juno): Pkg.dir() ENV[HOME] On Fri, Jul 31, 2015 at 3:52 PM, Serge Santos serge.san...@gmail.com wrote: Hello, I am fairly new to Julia, but it has already been a fantastic help for my work so far. I just upgraded to Windows 10 and installed Julia

Re: [julia-users] Enumerating permutations

2015-07-31 Thread Tamas Papp
On Fri, Jul 31 2015, Christopher Fisher fishe...@miamioh.edu wrote: I was wondering if there is a function for enumerating all of the permutations of size m from n elements, with repetitions allowed. For example, 3 permutations of [1 0] would be [ 1 1 1;1 1 0;1 0 1;0 1 1;1 0 0; 0 1 0;0 0

Re: [julia-users] Enumerating permutations

2015-07-31 Thread Tamas Papp
On Fri, Jul 31 2015, Christopher Fisher fishe...@miamioh.edu wrote: Thank you Tamas. I added return a and restructured the code (I think some formatting was lost when pasting). Based on the examples I tested, it appears to work. Can you recommend an efficient method of inputing an array

Re: [julia-users] Deprecation of require

2015-07-31 Thread Tim Holy
If MyModule.jl is on your LOAD_PATH, @everywhere import MyModule should work. You can add push!(LOAD_PATH,/my/code/repository) to your .juliarc.jl file. This has been deprecated because of precompilation; it was felt that the string version left it too ambiguous about whether you

Re: [julia-users] Enumerating permutations

2015-07-31 Thread Christopher Fisher
Thank you Tamas. I added return a and restructured the code (I think some formatting was lost when pasting). Based on the examples I tested, it appears to work. Can you recommend an efficient method of inputing an array of numbers. For example: a = [10,12] p = perm_matrix(a,2) p = [10 10; 10