[julia-users] Re: How to Initialize a Composite Type

2015-06-15 Thread Simon Danisch
Yeah, I know it does. But it does not do what you think it does. That's what I was trying to point out. Please consider reading the docs, especially the chapter types: http://julia.readthedocs.org/en/release-0.3/manual/types/ Am Sonntag, 14. Juni 2015 13:26:28 UTC+2 schrieb Ranjan Anantharaman:

[julia-users] Re: How to Initialize a Composite Type

2015-06-15 Thread David Gold
Yes, though as Simon points out there is a good reason why it doesn't work. On Sunday, June 14, 2015 at 11:25:47 PM UTC-4, Ranjan Anantharaman wrote: > > @David, What doesn't work for you? Do you mean you're getting the same > error? > > On Monday, 15 June 2015 08:55:07 UTC+5:30, Ranjan Ananthara

[julia-users] Re: How to know the size of a large array stored in a csv file (greater than RAM

2015-06-15 Thread Fred
If you use GNU/Linux or Unix you can obtain the number of lines with : wc -l file.csv Le dimanche 14 juin 2015 09:51:29 UTC+2, paul analyst a écrit : > > How to know the size of a large array stored in a csv file (greater than > RAM, I can not use readcsv. After that I want to apply the open (fi

[julia-users] Re: JuliaCon registrations open

2015-06-15 Thread Ken B
Could I ask to also record the workshops? Especially the one by JuliaOpt. One of the largest industrial companies here wants to switch away from their IBM solver and I want to give them some ammunition to choose Julia. Thanks. On Thursday, 11 June 2015 08:40:45 UTC+2, Daniel Carrera wrote: > >

[julia-users] Re: FFT performance compared to MATLAB

2015-06-15 Thread Simon Byrne
Hi Juan, You would also need to change Complex64 to Complex128. -Simon On Sunday, 14 June 2015 22:25:21 UTC+1, Juan Carlos Cuevas Bautista wrote: > > Hi Everybody, > > I am new in Julia Programming. I have been following this post to optimize > my code of time series in which I have big heavy fi

[julia-users] Re: string(BigFloat): disable scientific notation

2015-06-15 Thread Daniel Brall
Hello, Thanks that works, but it seems to append a '\0' to the end of the string (like C style null-terminated strings) which has to be removed manually for further processing of the string in julia. Kind regards, Daniel Am Samstag, 13. Juni 2015 19:10:40 UTC+2 schrieb Kristoffer Carlsson: >

[julia-users] Re: string(BigFloat): disable scientific notation

2015-06-15 Thread Daniel Brall
Hello, Sorry that I have to answer again. I've found out, that it is limited to a specific amount of digits. Afterwards it appends a '\0' indicating that there should be more, but it was too lazy to append more. I can't get further than that which is a real problem for me. julia> set_bigfloat_

[julia-users] Regarding Data extraction with Taro

2015-06-15 Thread Pramod Srinivasan
After trying out a few demos in Taro , I am unable to extract data from a xls file. The error signatures are : *ERROR: Error calling Java: org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance* *.* *Caused by: java.lang.Ou

[julia-users] Re: How to know the size of a large array stored in a csv file (greater than RAM

2015-06-15 Thread Ian Hellström
Would it be possible/feasible to introduce external data frames (like in Revolution Analytics R), so that we can work with data that does not fit into memory? Just an idea...

[julia-users] Set precision when printing to file

2015-06-15 Thread Robert DJ
Hi, I would like to write floating point numbers to a file and limit the number of digits/decimals. With e.g. f = open("test.txt", "w") println(f, 1/3) close(f) test.txt contains 0. and I would like it to be only 0.33. Is there a way to do this? Thanks, Robert

[julia-users] Re: Set precision when printing to file

2015-06-15 Thread Huda Nassar
julia> f = open("test.txt","w") IOStream() julia> @printf(f,"%0.2f",1/3) julia> close(f) This should do the job On Monday, June 15, 2015 at 9:50:17 AM UTC-4, Robert DJ wrote: > > Hi, > > I would like to write floating point numbers to a file and limit the > number of digits/decimals. With

[julia-users] Re: Set precision when printing to file

2015-06-15 Thread Huda Nassar
julia> f = open("test2.txt","w") IOStream() julia> @printf(f,"%0.2f",1/3) julia> close(f) This should do the job On Monday, June 15, 2015 at 9:50:17 AM UTC-4, Robert DJ wrote: > > Hi, > > I would like to write floating point numbers to a file and limit the > number of digits/decimals. With e.g

[julia-users] Re: How to know the size of a large array stored in a csv file (greater than RAM

2015-06-15 Thread David Gold
related: https://groups.google.com/forum/?hl=en#!searchin/julia-users/readcsv/julia-users/FmgkpF6ldk0/nmFGu5o87JsJ On Monday, June 15, 2015 at 9:38:31 AM UTC-4, Ian Hellström wrote: > > Would it be possible/feasible to introduce external data frames (like in > Revolution Analytics R), so that we

Re: [julia-users] Re: FFT performance compared to MATLAB

2015-06-15 Thread Juan Carlos Cuevas Bautista
Hi Simon, Thanks for your help, it worked correctly. However the reduction in the time is not very significantly (1/6) of the total (~300 secs). I think my arrays are too big (600-element Array{Float64,1}) to use PATIENT or even MEASURE, since that MATLAB spends just 60 secs. 2015-06-15 8

[julia-users] Char Array to Integer Array Problem

2015-06-15 Thread James Byars
Hey all, I am working through some Project Euler problem (#008) about searching through a number to determine the greatest product of thirteen adjacent numbers. Here is a code snippet: n = 12 numb_strg = "82166370484403199890008895243450658541227588666881" string_post = length(numb_strg) - n st

[julia-users] Re: Char Array to Integer Array Problem

2015-06-15 Thread Huda Nassar
You can use the parseint function: *julia> **a = '3'* *'3'* *julia> **typeof(a)* *Char* *julia> **b = parseint(a)* *3* *julia> **typeof(b)* *Int64* On Monday, June 15, 2015 at 12:39:14 PM UTC-4, James Byars wrote: > > Hey all, > > I am working through some Project Euler problem (#008) ab

Re: [julia-users] Re: Errors while trying to use JuMP

2015-06-15 Thread Kostas Tavlaridis-Gyparakis
I downloaded and extracted the version that you put in the link, but for some reason now, when I run Julia on terminal the pck command doesn't seem to work. This is the msg I get when I try to use any command related with pkd: Pkg.status() ERROR: could not spawn `git version`: no such file or dir

[julia-users] Re: string(BigFloat): disable scientific notation

2015-06-15 Thread Daniel Brall
For everyone having the same problem, this solved it for me: function toString(value::BigFloat, fractionalDigits::Integer) # # Converts the BigFloat value into a bare string without scientific notation, displaying the # given amount of fractional digits and not more, but less if the

Re: [julia-users] Re: Errors while trying to use JuMP

2015-06-15 Thread Tony Kelman
Which Linux distribution are you using? That error most likely means you don't have git installed, you need to manually install it through your distribution's package manager (apt-get, yum, pacman, zypper, etc). I'm a little surprised Pkg commands were able to work from the 0.3-prerelease versi

Re: [julia-users] Re: Errors while trying to use JuMP

2015-06-15 Thread Kostas Tavlaridis-Gyparakis
The 0.3-prerelease version of Julia was installed in my machine when I tried to isntall julia from the terminal by typing "sudo apt-get install julia". I run linux mint 16 on my laptop. When I try to apt-get install git, I receive the following error: Traceback (most recent call last): File "/u

Re: [julia-users] Re: How to deploy Julia

2015-06-15 Thread Stefan Karpinski
On Mon, Jun 15, 2015 at 1:34 AM, Daniel Carrera wrote: > In the end, Julia seems to be competitive with Fortran. Always wonderful to hear this :-)

Re: [julia-users] Re: How to Initialize a Composite Type

2015-06-15 Thread Stefan Karpinski
The chapter on constructor may be even more relevant: http://julia.readthedocs.org/en/release-0.3/manual/constructors/ On Mon, Jun 15, 2015 at 5:06 AM, Simon Danisch wrote: > Yeah, I know it does. But it does not do what you think it does. That's > what I was trying to point out. > Please consi

Re: [julia-users] Regarding Data extraction with Taro

2015-06-15 Thread Stefan Karpinski
Looks like your JVM instance is running out of memory. Does opening this file in plain POI work? If not then this is a Java issue. You may be able to increase the heap size of the JVM. On Mon, Jun 15, 2015 at 5:13 AM, Pramod Srinivasan wrote: > > > After trying out a few demos in Taro

Re: [julia-users] Re: Errors while trying to use JuMP

2015-06-15 Thread Tony Kelman
I see. I'm a little surprised a distribution chose to package a prerelease (but then again there was only one bugfix release between 0.2 and 0.3, so maybe not). I have no idea why installing git would try to do execvp on python3, but that looks like you need to install python3? According to ht

[julia-users] Re: Char Array to Integer Array Problem

2015-06-15 Thread James Byars
Thank you for the suggestion. I tried to use parseint on the Char array and got the following error: `parseint` has no method matching parseint(::Array{Char,1}) On Monday, June 15, 2015 at 1:02:21 PM UTC-4, Huda Nassar wrote: > > You can use the parseint function: > > *julia> **a = '3'* > > *'3

Re: [julia-users] Re: Char Array to Integer Array Problem

2015-06-15 Thread Stefan Karpinski
This happens because the character '0' is encoded in ASCII (or UTF-8) as the byte value 48 – i.e. the Uint8 vale 0x30 – and the other digits are the following ASCII byte values, 48-57. If you know that your string is pure ASCII and th

Re: [julia-users] Re: Char Array to Integer Array Problem

2015-06-15 Thread Stefan Karpinski
The parseint function is not vectorized – you need to apply parseint to each character using map or a comprehension. In your case, you might as well just subtract '0' from each character. On Mon, Jun 15, 2015 at 2:22 PM, James Byars wrote: > Thank you for the suggestion. I tried to use parseint

[julia-users] Re: Julia Installation on Windows 7 and 8.1

2015-06-15 Thread bernhard
Hi Does Julia without juno work? You can start it from C:\Juno\resources\app\julia\bin\julia.exe (or wherever you installed Juno). You should be able to run Julia (you don't need to be online for that). In the REPL you can try some easy things, x=1; z=x+1; Does that work? To my knowledge you

Re: [julia-users] Re: How to know the size of a large array stored in a csv file (greater than RAM

2015-06-15 Thread Paul Analyst
W dniu 2015-06-15 o 15:13, Ian Hellström pisze: Would it be possible/feasible to introduce external data frames (like in Revolution Analytics R), so that we can work with data that does not fit into memory? Just an idea... this Idea is a stream (open ) but firs I mus know size of data . Do You

Re: [julia-users] Re: Errors while trying to use JuMP

2015-06-15 Thread Kostas Tavlaridis-Gyparakis
Ok, I'll proceed with the upgrades tomorrow and let you know. Thanks a lot for all the help so far hope tomorrow I will finally have JuMP working. On Monday, June 15, 2015 at 8:22:34 PM UTC+2, Tony Kelman wrote: > > I see. I'm a little surprised a distribution chose to package a prerelease > (but

[julia-users] Julia equivalent for real threads

2015-06-15 Thread yigiter . public
I have a program which needs to utilize 2 "real" threads. Thread-A contains a blocking function call to the kernel. Whenever the function returns from the kernel, thread-A updates a variable which Thread-A shares with Thread-B. Thread-B carries its own task/job using the current value of th

Re: [julia-users] Multiple lines statement?

2015-06-15 Thread Ben Arthur
in addition to adhering to mathematical typsetting conventions, permitting binary operators to be on the following line would make it easier to comment out sub-expressions. for example, if a>b || c>d || e>f end could become if a>b # || c>d || e>f end i'm not advocating for a mandator

[julia-users] Re: new problem in Juno with TkWidget

2015-06-15 Thread Alex Ames
I submitted an issue to Julia-LT; it seems we're running into the same bug. No responses to the issue yet on Github. On Wednesday, June 10, 2015 at 9:17:58 AM UTC-5, JKPie wrote: > > Hi, > From one the latest update of Julia I started to

[julia-users] Re: Char Array to Integer Array Problem

2015-06-15 Thread Scott Jones
You can also do something like this to get each character as an integer... you'll need to convert each integer to Int64 as Stefan noted when doing the multiplication. julia> z = reinterpret(Int32,collect(numb_strg[1:12])) .- 48 12-element Array{Int32,1}: 8 2 1 6 6 3 7 0 4 8

[julia-users] Re: Julia equivalent for real threads

2015-06-15 Thread Lyndon White
You can do it with the parallel stuff. Without using sharedmemory, and with using processes instead of threads. Its not particularly nice but here is how it goes: (Tested in 0.39) first add a second process (before the @everywhere calls): pidB = addprocs(1)[1] A mockup of your blocking kernal

[julia-users] Re: Index into an array with an IntSet

2015-06-15 Thread colintbowers
Ah, I understand. Thanks for responding and pointing me to the appropriate pull request. So currently if we want to index with an IntSet, the best thing to do is probably just convert the IntSet to a Vector{Int} using something like: [ i for i in myIntSet ] yes? Cheers, Colin On Monday, 15

Re: [julia-users] Multiple lines statement?

2015-06-15 Thread David Gold
@Ben: as has been noted elsewhere in this thread, you can use parens to this end: julia> function foo(a, b, c, d, e, f) if (a > b || c > d || e > f) println("Foo for you.") end end foo (generic function with 1 method)

[julia-users] Re: Index into an array with an IntSet

2015-06-15 Thread David Gold
`collect(myIntSet)` should also do it, I believe. On Monday, June 15, 2015 at 8:20:15 PM UTC-4, colint...@gmail.com wrote: > > Ah, I understand. Thanks for responding and pointing me to the appropriate > pull request. So currently if we want to index with an IntSet, the best > thing to do is pro

Re: [julia-users] Re: Index into an array with an IntSet

2015-06-15 Thread Colin Bowers
Cool, works for me. Many thanks. On 16 June 2015 at 10:27, David Gold wrote: > `collect(myIntSet)` should also do it, I believe. > > > On Monday, June 15, 2015 at 8:20:15 PM UTC-4, colint...@gmail.com wrote: >> >> Ah, I understand. Thanks for responding and pointing me to the >> appropriate pull

[julia-users] Dictionary vs sparse vector/matrix

2015-06-15 Thread Jerzy Głowacki
I have a big Dict{Int64, String}. Is it better to make it a sparse vector/matrix using sparsevec(Dict)? What is the difference between them? Which one will be iterated faster?

Re: [julia-users] Re: how to move Julia packages from Ubuntu to OSX?

2015-06-15 Thread Elliot Saba
Congratulations! You have helped me track down a bug in Pango that I inadvertently introduced four days ago! You win the "very helpful and patient community member" prize. The good news is, this is now fixed

Re: [julia-users] problem adding Winston on OSX 10.10.3

2015-06-15 Thread Elliot Saba
Yes, you are having an unusual amount of trouble. The incorrect permissions in `/usr/local` will definitely screw up your system-wide Homebrew, but it doesn't excuse the lack of `xz` in your `Homebrew.jl`. Please go ahead and open an issue if you continue to have problems. Note that `brew install

Re: [julia-users] Re: How to deploy Julia

2015-06-15 Thread Ariel Keselman
FYI just since NBody was mentioned -- I wrote a gravitational NBody tree code with parallel shared memory execution. I run it with many millions of particles and I'm very pleased with the results. They are comparable (or even faster) than some very popular C codes (e.g. Gadget2). I'm working on

[julia-users] Pkg support for custom external libraries location

2015-06-15 Thread Kuba Roth
I've run into this problem recently trying to build Cairo from source (on a machine with no internet access) I wasn't sure how to proceed in this case using Pkg module - so built Cairo externally in a custom location. It took me a while to figure out there is a hardcoded 'load dependencies' s