Re: [julia-users] Fortran-formatted files

2014-04-19 Thread Dominique Orban
The poster is asking for something like this: https://bitbucket.org/brendanarnold/py-fortranformat (which I would also like to have access to). On Friday, March 7, 2014 1:22:34 PM UTC-8, Ivar Nesje wrote: > > Base.readdlm > ? > >

[julia-users] How to get memory address of variable?

2014-04-19 Thread Freddy Chua
I am trying to see if I could fix some file serialization problems. Suppose I have a composite type type Foo a::Int64 end foo = Foo(10) How do I get the memory address or location of foo?

Re: [julia-users] Conditional jump instructions in code_native printout

2014-04-19 Thread Isaiah Norton
We don't have this right now, but it would be nice to add some features like this to the code_native functionality. This should be easier when we move to MCJIT. I've entered an up-for-grabs feature request to keep track of this for now: https://github.com/JuliaLang/julia/issues/6589 On Sat, Apr

[julia-users] Re: Question about how to use uninitialized fields for Composite type

2014-04-19 Thread Tomas Lycken
To clarify that last part: if you try to call `process(m.Sol)` with a model object that has a `NoResults` value for `Sol`, that should throw a MethodError. If I got this right, that is... // Tomas On Sunday, April 20, 2014 3:13:55 AM UTC+2, Tomas Lycken wrote: > > I can think of one easy (or no

[julia-users] Re: Question about how to use uninitialized fields for Composite type

2014-04-19 Thread Tomas Lycken
I can think of one easy (or not, depending on the details of your problem) way to design around this: introduce an abstract results type, a "solution not ready" type and let both the "solution not ready" type and your current results type inherit from the abstract type. Then let your model's Sol

[julia-users] Question about how to use uninitialized fields for Composite type

2014-04-19 Thread Spencer Lyon
Say I have a type that defines a model. Something like this: abstract Model type Results # Details not shown here end type IFP{T <: FloatingPoint} <: Model # Model parameters rho::T beta::T r::T R::T gamma::T # Grid parameters for a n_a::Integer a_max::T

Re: [julia-users] Re: CUDA with Windows

2014-04-19 Thread Laszlo Hars
It looks like the very simple change I noted yesterday makes the CUDA package work under Windows. Before spamming the GIT depository, could somebody verify it the fix really works? Or if it can be written in a better way? Add the following two lines to CUDA.jl, just above the include(...) lines

Re: [julia-users] Cubic spline interpolation

2014-04-19 Thread Tomas Lycken
*@Tim Holy*, I've started thinking about how I should go about implementing cubic spline interpolation for Grid.jl over my Easter break - as a start, I'm trying to read through the code that does the quadratic interpolation and understand how all the parts of the library work together, and how I

[julia-users] ANN: OpenGL v2.0.0 changes loading syntax

2014-04-19 Thread Robert Ennis
Hey everyone, Thusly (https://github.com/thusly) has provided a very nice improvement to the way the OpenGL package is loaded. Now, one loads the package, specifies a version, and then loads up the relevant functions. An example: [code] > using OpenGL> @OpenGL.version "3.2" # (OpenGL namespace

[julia-users] Re: resultant vector, angle between the vectors

2014-04-19 Thread Steven G. Johnson
On Saturday, April 19, 2014 5:32:10 PM UTC-4, Steven G. Johnson wrote: > norm(a + b) > acos(dot(a, b) / (norm(a) * norm(b))) > (Though if it were critical for performance you could write optimized implementations of these that fuse all the operations into a single loop.)

[julia-users] Re: resultant vector, angle between the vectors

2014-04-19 Thread Steven G. Johnson
Probably you want: norm(a + b) acos(dot(a, b) / (norm(a) * norm(b))) On Saturday, April 19, 2014 4:14:31 PM UTC-4, paul analyst wrote: > > Is Julia command to do: > 1 length of the resultant vector of vectors a, b > 2 angle between the vectors a, b​​? > Paul >

Re: [julia-users] array with different column types

2014-04-19 Thread Stéphane Laurent
Please forget my questions. I will explain more specifically what are the objects i want to deal with and what operations I need to do on these objects. Otherwise there is no sense to ask what is the best format for these objects.

Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-04-19 Thread Helios De Rosario
Great. Thanks! El sábado, 19 de abril de 2014 23:09:39 UTC+2, Elliot Saba escribió: > > Hello Helios. I am currently working on updating the PPA for trusty. I > will post here when the packages are available for download. > > The main repository you linked has a Julia 0.2.1 package which will be

Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-04-19 Thread Elliot Saba
Hello Helios. I am currently working on updating the PPA for trusty. I will post here when the packages are available for download. The main repository you linked has a Julia 0.2.1 package which will be the same as what you get from the juliareleases repo, so go ahead and install that if you wish.

[julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-04-19 Thread Helios De Rosario
Hi, I have just changed the OS of my computer to Ubuntu 14.04 (actually Lubuntu... too old a computer for other options). I am looking forward to installing Julia, but the official documentation has not still any pointer that seems appropriate for this version. https://launchpad.net/~staticfloa

Re: [julia-users] Conditional works like on the selected columns of the matrix

2014-04-19 Thread Stefan Karpinski
Broadcasting subtraction of 2 times t from 1. On Sat, Apr 19, 2014 at 3:42 PM, paul analyst wrote: > Big thx, > what is "-2" before t ? > Paul > > W dniu sobota, 19 kwietnia 2014 14:47:40 UTC+2 użytkownik Stefan Karpinski > napisał: >> >> scale!(v, 1 .- 2t) >> >> >> On Sat, Apr 19, 2014 at 5:11

[julia-users] resultant vector, angle between the vectors

2014-04-19 Thread paul analyst
Is Julia command to do: 1 length of the resultant vector of vectors a, b 2 angle between the vectors a, b​​? Paul

Re: [julia-users] Conditional works like on the selected columns of the matrix

2014-04-19 Thread paul analyst
Big thx, what is "-2" before t ? Paul W dniu sobota, 19 kwietnia 2014 14:47:40 UTC+2 użytkownik Stefan Karpinski napisał: > > scale!(v, 1 .- 2t) > > > On Sat, Apr 19, 2014 at 5:11 AM, paul analyst > > wrote: > >> I have a logical vector t >> julia> t >> 1x4 BitArray{2}: >> true false false

Re: [julia-users] Re: problem with build

2014-04-19 Thread Comer Duncan
Thanks for the help. Given the commit pointed out by Tony Kelman, julia now builds and runs on my macbookpro running mavericks given the recent Xcode update by Apple to use Xcode 5.1.1. Comer On Sat, Apr 19, 2014 at 4:19 AM, Tony Kelman wrote: > That last one should be fixed by > https://gith

[julia-users] Re: OpenGL <-> OpenCV <-> Julia

2014-04-19 Thread Tobias Knopp
Just responding on the "small fixed size vector" thing. I believe this is something so important that it should go directly to base. See https://github.com/JuliaLang/julia/issues/5857 for recent discussion. I am currently porting some code from C++ to Julia that involves calculating coordinate t

[julia-users] Conditional jump instructions in code_native printout

2014-04-19 Thread MikeEI
Possibility for code_native assembly printout is impressive and instructive. I assume conditional jump instructions show local jump distance in bytes, don't they. Is there any chance to see from printout which label/assembly statement that relates too? BTW: How do You use code_native effective

[julia-users] Re: OpenGL <-> OpenCV <-> Julia

2014-04-19 Thread Simon Danisch
Sounds great, I hope we can soon work together on this! My biggest problem right now, is a very limited time budget though. But I hope to have more time in a couple of weeks! Ideally, Khronos would just merge OpenGL and OpenCL at some point ;) But I guess that's something far in the future. Anywa

[julia-users] Re: JuliaGPU organization

2014-04-19 Thread Simon Danisch
Sounds great! Good GPGPU support should be a focus of every scientific programming language!! Shouldn't OpenGL be part of this, though? Modern OpenGL goes more and more into the direction of GPGPU and it should work hand in hand with any GPGPU package. If so, I'd have a few packages. But my situ

Re: [julia-users] Re: CUDA with Windows

2014-04-19 Thread Laszlo Hars
Tony, If the evaluator fails under Windows, the package could automatically flagged as Linux/Mac only. I have no problem with trying to port some of these to Windows, but having no access to any other OS, some hints from the authors would be very useful: What shared libraries are used, and wher

Re: [julia-users] Re: CUDA with Windows

2014-04-19 Thread Tony Kelman
Laszlo, Getting CUDA working on Windows would be great. Experimenting with GPU's (on Windows or elsewhere) has been on my to-do list for a while. Unfortunately with the current state of Julia's package ecosystem, it's safer to assume any packages with non-Julia dependencies don't work on Windo

Re: [julia-users] Re: CUDA with Windows

2014-04-19 Thread Stefan Karpinski
It probably makes sense to have a way of indicating in the requirements for a package that it only works on certain operating systems. Something like putting `@windows NotSupported` in there. On Sat, Apr 19, 2014 at 12:29 PM, Laszlo Hars wrote: > Tobias, > > It is not a bug: the CUDA package

Re: [julia-users] Re: CUDA with Windows

2014-04-19 Thread Laszlo Hars
Tobias, It is not a bug: the CUDA package was developed for Linux-like systems, only. The Julia documentation links to a list of registered packages, so it was natural to assume that those packages had been endorsed by the language developers, and work in Julia installations under Windows. Only

Re: [julia-users] Re: CUDA with Windows

2014-04-19 Thread Laszlo Hars
Tobias, It is not a bug: the CUDA package was developed for Linux-like systems, only. The Julia documentation links to a list of registered packages, so it was natural to assume that those packages had been endorsed by the language developers, and work in Julia installations under Windows. Only

Re: [julia-users] interp1-like functionality from Grid.jl

2014-04-19 Thread Simon Byrne
I actually wanted this functionality myself. See https://github.com/timholy/Grid.jl/pull/14 On Thursday, 17 April 2014 13:26:57 UTC+1, Tim Holy wrote: > > That's fine. That's how it always works; things happen in Julia when > someone > finds the time to do them. > > --Tim > > On Wednesday, Apr

[julia-users] Re: help with using multiple cores

2014-04-19 Thread cnbiz850
I also tried the following code with pmap. It ran and seemed to run with 4 processes as shown with 'top'. But using pmap with my own function, I don't see it run with 4 processes. What can be wrong? == M = {rand(1000,1000) for i=1:10} pmap(svd, M) == On 04/19/2014 10:38 PM,

[julia-users] Re: help with using multiple cores

2014-04-19 Thread cnbiz850
Sorry, the error messages must have to do with the undefined f. It works with the folowing. So I guess simply adding @parallel (+) on a for loop can then realize using multiple cores? === nheads = @parallel (+) for i=1:2 int(randbool()) end === On 04/19/2014 10:32 PM, cnbiz

[julia-users] help with using multiple cores

2014-04-19 Thread cnbiz850
Copied the following test code from the online documentation. When tried to run it, I got the errors. Any guidance please? == a = randn(1000) @parallel (+) for i=1:10 f(a[randi(end)]) end == $ julia -p 4 _ _ _(_)_ | A fresh approach to technical computing

Re: [julia-users] Re: CUDA with Windows

2014-04-19 Thread Patrick O'Leary
You might want to drop that in a @windows_only block (see the Julia source code for usage examples; it's probably also documented somewhere in the manual). On Friday, April 18, 2014 9:32:56 PM UTC-5, Laszlo Hars wrote: > > Some progress... For Windows, in the base.jl file "libcuda" has to be >

Re: [julia-users] JuliaGPU organization

2014-04-19 Thread Dahua Lin
The JuliaGPU url: https://github.com/JuliaGPU Dahua On Saturday, April 19, 2014 7:00:02 AM UTC-5, Dahua Lin wrote: > > Hi, Tim and Jake, > > I have created the JuliaGPU organization and added you as owners (you > should have received emails about that). I have also moved CUDA.jl over > there.

Re: [julia-users] Conditional works like on the selected columns of the matrix

2014-04-19 Thread Stefan Karpinski
scale!(v, 1 .- 2t) On Sat, Apr 19, 2014 at 5:11 AM, paul analyst wrote: > I have a logical vector t > julia> t > 1x4 BitArray{2}: > true false false false > > and matrix v > julia> v > 4x4 Array {Float64, 2}: > -0.0018187 -0.18174 0.982684 0.0360478 > -0.018408 0.98314 0.1819 -0.0029726

Re: [julia-users] JuliaGPU organization

2014-04-19 Thread Dahua Lin
Hi, Tim and Jake, I have created the JuliaGPU organization and added you as owners (you should have received emails about that). I have also moved CUDA.jl over there. I would really appreciate if you may move other relevant packages over there. I think future efforts based on CUDA/OpenCL can

Re: [julia-users] JuliaGPU organization

2014-04-19 Thread Jake Bolewski
I think this is a good idea. right now we have 3 opencl related libraries we could move over. -Jake

Re: [julia-users] JuliaGPU organization

2014-04-19 Thread Tim Holy
+1 --Tim On Friday, April 18, 2014 07:08:24 PM Dahua Lin wrote: > Currently, there have been some independent efforts to develop Julia > packages for GPU computing, which particularly include: > >- CUDA.jl >- CUDArt.jl

[julia-users] Re: how transform data to matrix x,y

2014-04-19 Thread paul analyst
W dniu sobota, 19 kwietnia 2014 11:24:02 UTC+2 użytkownik paul analyst napisał: > > > > W dniu piątek, 18 kwietnia 2014 21:35:10 UTC+2 użytkownik Douglas Bates > napisał: >> >> On Friday, April 18, 2014 11:43:37 AM UTC-5, paul analyst wrote: >>> >>> How quickly convert data from 3 columns to an

[julia-users] Re: how transform data to matrix x,y

2014-04-19 Thread paul analyst
W dniu piątek, 18 kwietnia 2014 21:35:10 UTC+2 użytkownik Douglas Bates napisał: > > On Friday, April 18, 2014 11:43:37 AM UTC-5, paul analyst wrote: >> >> How quickly convert data from 3 columns to an array of x, y >> Data are the two columns of text, and the third value: >> >> x y z a r 0,3

[julia-users] Conditional works like on the selected columns of the matrix

2014-04-19 Thread paul analyst
I have a logical vector t julia> t 1x4 BitArray{2}: true false false false and matrix v julia> v 4x4 Array {Float64, 2}: -0.0018187 -0.18174 0.982684 0.0360478 -0.018408 0.98314 0.1819 -0.00297265 -0.995394 -0.0167994 -0.00839779 0.0940118 0.0940681 0.0111097 -0.0342677 0.99491

Re: [julia-users] Re: problem with build

2014-04-19 Thread Tony Kelman
That last one should be fixed by https://github.com/JuliaLang/julia/commit/5ab3020077f8947d806fddaab8de45381908a9c5, there's been some churn in random-number generation recently and how those dependencies are handled. On Friday, April 18, 2014 1:43:10 PM UTC-7, Comer Duncan wrote: > > Ok, I