Re: [julia-users] Create formatted string

2014-04-11 Thread John Myles White
@sprintf is a macro, not a function. It doesn't evaluate its inputs: it just 
rewrites the inputs into something else (usually less readable) that carries 
out the actual computation. You can see what it does using the macroexpand 
function:

julia> macroexpand(quote @sprintf("%8.1e", 3.1415) end)
:(begin  # none, line 1:
Base.Printf.sprint(#63#io->begin  # printf.jl, line 783:
begin 
#59#out = #63#io
#60###x#3463 = 3.1415
local #61#neg, #57#pt, #58#len, #62#exp
if Base.Printf.isfinite(#60###x#3463)
Base.Printf.ini_dec(#60###x#3463,2)
#61#neg = Base.Printf.NEG[1]
#62#exp = Base.Printf.-(Base.Printf.POINT[1],1)

(Base.Printf.-(Base.Printf.-(1,Base.Printf.|((#62#exp Base.Printf.<= -100),(100 
Base.Printf.<= #62#exp))),#61#neg) Base.Printf.> 0) && 
Base.Printf.write(#59#out,' ')
#61#neg && Base.Printf.write(#59#out,'-')
Base.Printf.write(#59#out,Base.Printf.DIGITS[1])
Base.Printf.write(#59#out,'.')

Base.Printf.write(#59#out,Base.Printf.+(Base.Printf.pointer(Base.Printf.DIGITS),1),1)
Base.Printf.write(#59#out,'e')
Base.Printf.print_exp(#59#out,#62#exp)
else 
Base.Printf.write(#59#out,begin  # printf.jl, line 
141:
if Base.Printf.isnan(#60###x#3463)
" NaN"
else 
if (#60###x#3463 Base.Printf.< 0)
"-Inf"
else 
" Inf"
end
end
end)
end
Base.Printf.nothing
end
end)
end)

 -- John

On Apr 11, 2014, at 11:46 PM, Dominique Orban  wrote:

> As a follow-up question, why is the following not allowed?
> 
> julia> fmt = "%8.1e";
> 
> julia> @sprintf(fmt, 3.1415)
> ERROR: first or second argument must be a format string
> 
> I don't see how it's different from
> 
> julia> @sprintf("%8.1e", 3.1415)
> 
> What's the appropriate syntax?
> 
> Thanks.
> 
> 
> On Friday, April 11, 2014 11:24:50 PM UTC-7, Dominique Orban wrote:
> Thank you! Such a basic operation could feature a bit more prominently in the 
> documentation.
> 
> 
> On Friday, April 11, 2014 11:21:28 PM UTC-7, John Myles White wrote:
> @sprintf
> 
> On Apr 11, 2014, at 11:18 PM, Dominique Orban  wrote:
> 
>> Sorry if this is a RTFM, but I can't find the answer in the documentation or 
>> on the web. I may have missed it. I come from Python where I can build 
>> strings with formatted data using a syntax like
>> 
>> s = "pi=%7.1e" % acos(-1)
>> 
>> How do I accomplish that in Julia? @printf doesn't do the job because it 
>> doesn't return anything:
>> 
>> julia> s = @printf("%7.1e", 3.14)
>> 3.1e+00
>> julia> s
>> 
>> 
>> 
>> 
>> Thanks.
>> 
> 



Re: [julia-users] Create formatted string

2014-04-11 Thread Dominique Orban
As a follow-up question, why is the following not allowed?

julia> fmt = "%8.1e";

julia> @sprintf(fmt, 3.1415)
ERROR: first or second argument must be a format string

I don't see how it's different from

julia> @sprintf("%8.1e", 3.1415)

What's the appropriate syntax?

Thanks.


On Friday, April 11, 2014 11:24:50 PM UTC-7, Dominique Orban wrote:
>
> Thank you! Such a basic operation could feature a bit more prominently in 
> the documentation.
>
>
> On Friday, April 11, 2014 11:21:28 PM UTC-7, John Myles White wrote:
>>
>> @sprintf
>>
>> On Apr 11, 2014, at 11:18 PM, Dominique Orban  
>> wrote:
>>
>> Sorry if this is a RTFM, but I can't find the answer in the documentation 
>> or on the web. I may have missed it. I come from Python where I can build 
>> strings with formatted data using a syntax like
>>
>> s = "pi=%7.1e" % acos(-1)
>>
>> How do I accomplish that in Julia? @printf doesn't do the job because it 
>> doesn't return anything:
>>
>> julia> s = @printf("%7.1e", 3.14)
>> 3.1e+00
>> julia> s
>>
>>
>>
>>
>> Thanks.
>>
>>
>>

Re: [julia-users] Create formatted string

2014-04-11 Thread Dominique Orban
Thank you! Such a basic operation could feature a bit more prominently in 
the documentation.


On Friday, April 11, 2014 11:21:28 PM UTC-7, John Myles White wrote:
>
> @sprintf
>
> On Apr 11, 2014, at 11:18 PM, Dominique Orban 
> > 
> wrote:
>
> Sorry if this is a RTFM, but I can't find the answer in the documentation 
> or on the web. I may have missed it. I come from Python where I can build 
> strings with formatted data using a syntax like
>
> s = "pi=%7.1e" % acos(-1)
>
> How do I accomplish that in Julia? @printf doesn't do the job because it 
> doesn't return anything:
>
> julia> s = @printf("%7.1e", 3.14)
> 3.1e+00
> julia> s
>
>
>
>
> Thanks.
>
>
>

Re: [julia-users] Create formatted string

2014-04-11 Thread John Myles White
@sprintf

On Apr 11, 2014, at 11:18 PM, Dominique Orban  wrote:

> Sorry if this is a RTFM, but I can't find the answer in the documentation or 
> on the web. I may have missed it. I come from Python where I can build 
> strings with formatted data using a syntax like
> 
> s = "pi=%7.1e" % acos(-1)
> 
> How do I accomplish that in Julia? @printf doesn't do the job because it 
> doesn't return anything:
> 
> julia> s = @printf("%7.1e", 3.14)
> 3.1e+00
> julia> s
> 
> 
> 
> 
> Thanks.
> 



[julia-users] Create formatted string

2014-04-11 Thread Dominique Orban
Sorry if this is a RTFM, but I can't find the answer in the documentation 
or on the web. I may have missed it. I come from Python where I can build 
strings with formatted data using a syntax like

s = "pi=%7.1e" % acos(-1)

How do I accomplish that in Julia? @printf doesn't do the job because it 
doesn't return anything:

julia> s = @printf("%7.1e", 3.14)
3.1e+00
julia> s




Thanks.



Re: [julia-users] Function naming idioms in Julia

2014-04-11 Thread Jason Grout

On 4/11/14, 17:49, Ben Racine wrote:

But, when a function really does logically belong to its first argument,
I (sometimes) find myself missing the function namespacing inherent to
those systems. I find myself wanting to do what one can do in R and
inject a '.' into the function name just for the illusion of namespacing.


Thanks for asking this.  I've also been thinking about how things like 
tab completion and other discoverability interfaces work in Julia.  In 
python, for example, having that namespacing that you bring up above 
makes tab completion on an object a very natural way to explore a 
vocabulary of functions associated with the object.  How does Julia 
usually address discoverability and interactive exploration of functions 
(like with tab completion, etc.)?


Thanks,

Jason



[julia-users] Re: Function naming idioms in Julia

2014-04-11 Thread Jacques Rioux

>
> Yes, but unfortunately, the piping operator, |>, can only be applied to 
>> functions taking a single argument. I really wish it could be applied to 
>> functions of any number of elements.
>>
>

[julia-users] Re: 1st JuliaConference: June 26th-28th, Chicago

2014-04-11 Thread Hunter Owens
@Tracy

Tracy, right now, the 'main' section of the conference will be June
26th/27th at the Gleacher
Centernear
the loop (downtown). There will also be a Julia Hack Day open to the
community at the University of Chicago campus in Hyde Park on the 28th.

@Jason

The talks will be streamed/posted online. Not sure which service/etc, but
more to come as the conference gets closer.



On Sat, Apr 12, 2014 at 10:06 AM, Jason Knight  wrote:

> For those of us who can't make it, I hope the talks can be streamed online
> using something easy and free like Google Hangouts on Air. This has the
> added bonus that the recorded talk is immediately available on Youtube
> after the broadcast.
>
> Jason
>
> On Thursday, April 3, 2014 9:42:37 AM UTC-5, Hunter Owens wrote:
>
>> Hey Folks-
>>
>> Just a quick save-the-date announcement for the first ever Julia
>> Conference  that will be held in Chicago, IL this
>> June 26th, 27th and 28th. More details will be coming shortly, but the
>> whole organizing committee is looking forward to seeing you in Chicago.
>>
>> Thanks,
>> Hunter Owens
>>
>>


[julia-users] Re: 1st JuliaConference: June 26th-28th, Chicago

2014-04-11 Thread Jason Knight
For those of us who can't make it, I hope the talks can be streamed online 
using something easy and free like Google Hangouts on Air. This has the 
added bonus that the recorded talk is immediately available on Youtube 
after the broadcast.

Jason

On Thursday, April 3, 2014 9:42:37 AM UTC-5, Hunter Owens wrote:
>
> Hey Folks-
>
> Just a quick save-the-date announcement for the first ever Julia 
> Conference  that will be held in Chicago, IL this 
> June 26th, 27th and 28th. More details will be coming shortly, but the 
> whole organizing committee is looking forward to seeing you in Chicago. 
>
> Thanks,
> Hunter Owens 
>
>

[julia-users] Re: Implementing Gillespie's Stochastic Simulation Algorithm

2014-04-11 Thread David P. Sanders


El viernes, 11 de abril de 2014 16:19:24 UTC-5, Simon Frost escribió:
>
> I just added a draft implementation along the lines of ODE.jl:
>
> https://github.com/sdwfrost/Gillespie.jl
>

At a first glance it looks nice; I hope I get a chance to look at it in 
more detail soon.

 


[julia-users] Re: Function naming idioms in Julia

2014-04-11 Thread Simon Kornblith
It's rarely used, but |> may be what you're looking for:

julia> X = zeros(50, 50);

julia> X|>size
(50,50)

julia> X|>length
2500

On Friday, April 11, 2014 6:49:16 PM UTC-4, Ben Racine wrote:
>
> Hi all,
>
> I understand most of the mental maps between the common object-oriented 
> systems (Python, JavaScript) to Julia's multiple dispatch system.
>
> But, when a function really does logically belong to its first argument, I 
> (sometimes) find myself missing the function namespacing inherent to those 
> systems. I find myself wanting to do what one can do in R and inject a '.' 
> into the function name just for the illusion of namespacing. 
>
> I suspect there must be a Julia idiom right under my nose that I'm 
> forgetting.
>
> Any help greatly appreciated.
>
> Thanks!
> Ben Racine
>
>

Re: [julia-users] Re: Export/view movie of plots

2014-04-11 Thread Simon Kornblith
Assuming avconv or ffmpeg is available on your system, you can open a pipe 
to it:

pipe, process = writesto(`avconv -y -f rawvideo -pix_fmt gray -s 100x100
 -r 30 -i - -an -c:v libx264 -pix_fmt yuv420p movie.mp4`)

The options are detailed in the docs; -s is the movie size and -r is the 
frame rate.

(If you have ffmpeg, s/avconv/ffmpeg/ and I think this should still work.) 
Now every 100x100 block of Uint8s that you write to pipe creates a frame in 
the movie (you can obviously change the resolution). Note that the first 
dimension of the array is the x dimension and the second is the y 
dimension, so you may want to transpose the array before writing it. For 
example, to create a movie with 1000 frames of static on the top and black 
on the bottom:

for i = 1:1000
write(pipe, [rand(Uint8, 100, 50) zeros(Uint8, 100, 50)])
end
close(pipe)

If you have a 3D array of Uint8s where the dimensions are ordered as x, y, 
and time, then you can also write that directly. If you write something 
besides Uint8s, you will get garbage. You can tweak the avconv/ffmpeg 
encoding settings as necessary and also change the pixel format to add 
color if you want.

Hope this helps,
Simon

On Friday, April 11, 2014 8:45:43 AM UTC-4, Sheehan Olver wrote:
>
> Was hoping for something one line on Julia
>
> Sent from my iPhone
>
> On Apr 11, 2014, at 10:18 PM, Arnim Bleier > 
> wrote:
>
> Hi,
>
> create pictures for each frame [1:N] ... (lets say pic_n.png)
>
> then
>
> mencoder mf://*.png -mf w=200:h=150:fps=25:type=png -ovc copy -oac copy -o 
> out.avi
>
> now you should have a "out.avi" 
>
>
> Best
>
> Arnim
>
>
>
> On Friday, April 11, 2014 1:20:18 PM UTC+2, Sheehan Olver wrote:
>>
>> I'm trying to do movies of an evolving solution to a PDE.  Let's say that 
>> the solution at time steps is stored as columns of an array.Is this 
>> possible?   Preferably in IJulia, but if that's not possible export from 
>> Julia.
>>
>>

[julia-users] Function naming idioms in Julia

2014-04-11 Thread Ben Racine
Hi all,

I understand most of the mental maps between the common object-oriented 
systems (Python, JavaScript) to Julia's multiple dispatch system.

But, when a function really does logically belong to its first argument, I 
(sometimes) find myself missing the function namespacing inherent to those 
systems. I find myself wanting to do what one can do in R and inject a '.' 
into the function name just for the illusion of namespacing. 

I suspect there must be a Julia idiom right under my nose that I'm 
forgetting.

Any help greatly appreciated.

Thanks!
Ben Racine



[julia-users] Re: Implementing Gillespie's Stochastic Simulation Algorithm

2014-04-11 Thread Simon Frost
I just added a draft implementation along the lines of ODE.jl:

https://github.com/sdwfrost/Gillespie.jl



[julia-users] Re: bit-twiddling micro benchmark

2014-04-11 Thread Laszlo Hars
my mistake... Can an administrator edit my post, and remove the reference 
to the GNU Radio, and the C code snippet? It is just a straightforward 
(pretty stupid) implementation of the standard, and carries no useful 
information. I only used it to verify the Julia CRC code results, but there 
are plenty of other means to do that.


[julia-users] Re: GPU computing

2014-04-11 Thread Jake Bolewski
Hi Gexarcha,

I'm the author of the OpenCL package for Julia.  Although things have 
stalled lately do to other commitments, I think we are slowly building a 
pretty good story at least on the OpenCL side.  I know that the library has 
already been used  sucesfully in a handful of reasearch projects.  Right 
now I'm working on finishing up Image and OpenGL support, which are last 
missing features in the OpenCL bindings.  I've implemented wrappers for 
CLFFT and another contributor has preliminarily CLBLAS bindings.  As I 
wrote in the GSOC project proposal, I think what we are missing is an GPU 
Array datatype similar to what you get with PyCuda / PyOpenCL. I hope to 
work on that in the future but impementing rich mulit-dim array support is 
a lot of work.

I've experimented with compiling Julia's lowered AST down to OpenCL.  It 
works, but larger kernels quickly cause register pressure leading to a drop 
in performance over what you would get if you wrote the kernel by hand.  
I'm eagerly waiting to hear any results from the  ptx backend, as compiling 
down to llvm ir / ptx would seem more efficient.  However, the authors of 
Numba's (python) cuda jit compiler have stated that you ususally get a  
performance loss of 2x+ over hand written kernels with their library, so 
there seems to be a lot of room for improvment in this area.  

Jake

I am trying to figure out what kind of options do I have for utilizing the 
GPU for high performance computing in Julia. 
I have seen some old 
threadsdiscussing
 an nvptx backend and the CUDA.jl package. I would like to know 
if there is any other effort out there dealing with GPU computing. Also, 
does anybody know if there is a plan of integrating GPU support in the 
language?
Thanks!
On Friday, April 11, 2014 10:47:41 AM UTC-4, andrew cooke wrote:
>
>
> it's included at http://julialang.org/gsoc/2014/
>
> On Friday, 11 April 2014 05:09:11 UTC-3, gexarcha wrote:
>>
>> Hi,
>>
>> I am trying to figure out what kind of options do I have for utilizing 
>> the GPU for high performance computing in Julia. 
>> I have seen some old 
>> threadsdiscussing
>>  an nvptx backend and the CUDA.jl package. I would like to know 
>> if there is any other effort out there dealing with GPU computing. Also, 
>> does anybody know if there is a plan of integrating GPU support in the 
>> language?
>> Thanks!
>>
>>  - Georgios
>>
>

[julia-users] Re: GPU computing

2014-04-11 Thread andrew cooke

it's included at http://julialang.org/gsoc/2014/

On Friday, 11 April 2014 05:09:11 UTC-3, gexarcha wrote:
>
> Hi,
>
> I am trying to figure out what kind of options do I have for utilizing the 
> GPU for high performance computing in Julia. 
> I have seen some old 
> threadsdiscussing
>  an nvptx backend and the CUDA.jl package. I would like to know 
> if there is any other effort out there dealing with GPU computing. Also, 
> does anybody know if there is a plan of integrating GPU support in the 
> language?
> Thanks!
>
>  - Georgios
>


[julia-users] synchronous loading and asynchronous execution, elegantly?

2014-04-11 Thread David van Leeuwen
Hello, 

I need to compute aggregate statistics---say, the mean over columns, but 
later these will become more computationally intensive---for a large 
collection of matrices.   These matrices vary in the number of rows, but 
have the same number of columns.  

I am looking for a general scheme that can utilise cluster parallel 
execution and will deal with various sorts of granularity of number of size 
of matrices.  The combined size of the matrices may be larger than the 
combined memory of the computing cluster, and I have my matrices in 
separate files. 

In my first attempts I load the data in memory in the worker processes, 
compute the statistics, and reduce the results in the main process.  The 
coding is fairly straight forward with pmap(). 

function stats(x)
## compute the statistics
end

function load(file::String)
## load the data
end

result = pmap(s->stats(load(s)), listoffiles)
reducethestats(result)

However, for low-complexity stats computations--say, the sum over 
columns---it seems that the system is thrashing terribly because all 
processes start to load the data from (network) disc more/less at the same 
time, and data loading take longer than the computation.  The thrashing 
effect is quite large, I loose a factor of 100 or so over serial 
loading/execution time.  Of course one would not want to parallellize in 
this particular case, but as I said before, the statistics become more 
computationally intensive later in the algorithm, and then the parallel 
computing is very beneficial. 

The same data is used in multiple iterations of the algorithm, so it can be 
beneficial to map the same matrices to the same worker processes and have 
OS file caching reduce load times.  So pmap() is probably not a good 
choice, anyway.  

My question is: is there an efficient approach where the data is loaded 
synchronously in the worker processes---so that they don't swamp the 
network---an then later compute the stats asynchronously?

One way could be (a simplified example that needs lots of memory in the 
main process)


result = pmap(stats, map(load, listoffiles))


but this is not efficient as it needs to serialize the loaded data in the 
main process and transfer it to the workers.  And for larger problems 
nothing is cached locally.   There is some better control with remotecall() 
and fetch(), but I don't see a way to leave the loaded data in a 
remotecall() process and use it in a next remotecall() without fetch()ing 
it to the main process.  Maybe I am looking for something like

worker(i) = workers[1 .+ (i % nworkers())]


for i in 1:length(workers)
  remotecall_wait(worker(i), load, listoffiles[i]) ## but keep the data in 
the worker
end
for i in 1:length(workers)
  remotecall(worker(i), stats, ## the remote result)
end
## fetch, and do the rest of the files in a task-based way like pmap()


Any ideas how this can be accomplished?

Thanks, 

---david







Re: [julia-users] Finding the size of a file in mb

2014-04-11 Thread Stefan Karpinski
filesize(filename) just does that for you. Unless you're planning on asking
a lot of questions about the same file, there's not really any point in
doing the stat and then getting its properties.


On Thu, Apr 10, 2014 at 8:41 PM, Andrew Tulloch  wrote:

> Not sure if it's the canonical method, but Julia has a wrapper for the
> `stat` system call (http://en.wikipedia.org/wiki/Stat_(system_call)), so
> you can just do
>
> ```
> stat(filename).size
> ```
>
> to get the file size in bytes.
>
> See https://gist.github.com/ajtulloch/10434524 for an example.
>
>
> On Fri, Apr 11, 2014 at 1:06 AM, Jason Solack  wrote:
>
>> Hello all!
>>
>> I am wondering if there is a way to find the size a file in megabytes.
>>  I'm going to be outputting a lot of data and i'd like to monitor the size
>> of my output file and create a new file once it hits a certain size.
>>
>> Thanks in advance
>>
>> Jason
>>
>
>


Re: [julia-users] IJulia Error

2014-04-11 Thread Isaiah Norton
Could you check to see if this is corrected automatically by running
Pkg.build("IJulia")? If not, we should figure out why.


On Fri, Apr 11, 2014 at 9:57 AM, Thomas Moore  wrote:

> This looks to have solved the problem nicely! When I looked at the last
> line of ~/.ipython/profile_julia/ipython_config.py it was:
>
> c.KernelManager.kernel_cmd = ["/home/thomas/julia/usr/bin/julia", "-F",
> "/home/thomas/.julia/IJulia/src/kernel.jl", "{connection_file}"]
>
> However there was no julia executable in my ~/julia/usr/bin file (it's
> just in ~/julia), and the notebook works if I replace this line with:
>
> c.KernelManager.kernel_cmd = ["/home/thomas/julia/julia", "-F",
> "/home/thomas/.julia/IJulia/src/kernel.jl", "{connection_file}"]
>
> Thanks for you help!
>
>
>
> On Friday, 11 April 2014 23:13:52 UTC+10, Isaiah wrote:
>
>> This error usually means that python can't find the julia executable. Try
>> running Pkg.build("IJulia") and see if there are any errors. If there are
>> no errors, then look in ~/.config/ipython/profile_julia/ipython_config.py.
>> The last line should be "c.KernelManager.kernel_cmd = ...". Does the Julia
>> binary referenced there actually exist? Can you shell out to it directly
>> from IPython?
>>
>>
>> On Fri, Apr 11, 2014 at 5:35 AM, Thomas Moore wrote:
>>
>>> I've been trying to get IJulia to work on Ubuntu 12.04 with Julia
>>> Version 0.3.0-prerelease+2057. I installed ipython 2.0.0 using easy_install:
>>>
>>> easy_install ipython[all]
>>>
>>>
>>> and this allows me to run an ipython notebook from the terminal with:
>>>
>>> ipython notebook
>>>
>>>
>>> This all works fine. I then attempted to install IJulia with
>>>
>>> Pkg.add("IJulia")
>>>
>>>
>>>
>>> and this all seemed to work well. When I run
>>>
>>> ipython notebook --profile julia
>>>
>>>
>>> a notebook opens with the Julia logo at the top right. However, when I
>>> open a new notebook, the kernel appears permanently busy (I can write in
>>> markdown script and headers, but I can't execute any Julia code) and I get
>>> the following error message in the terminal:
>>>
>>>
>>> 2014-04-11 18:56:44.881 [NotebookApp] Creating new notebook in /
>>> 2014-04-11 18:56:44.884 [NotebookApp] Writing notebook-signing key to /
>>> home/thomas/.ipython/profile_julia/security/notebook_secret
>>> 2014-04-11 18:56:45.961 [NotebookApp] ERROR | Unhandled error in API
>>> request
>>> Traceback (most recent call last):
>>>   File "/usr/local/lib/python2.7/dist-packages/IPython/html/
>>> base/handlers.py", line 286, in wrapper
>>> result = method(self, *args, **kwargs)
>>>   File "/usr/local/lib/python2.7/dist-packages/IPython/html/
>>> services/sessions/handlers.py", line 65, in post
>>> kernel_id = km.start_kernel(path=path)
>>>   File "/usr/local/lib/python2.7/dist-packages/IPython/html/
>>> services/kernels/kernelmanager.py", line 90, in start_kernel
>>> kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs)
>>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/
>>> multikernelmanager.py", line 116, in start_kernel
>>> km.start_kernel(**kwargs)
>>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/
>>> manager.py", line 217, in start_kernel
>>> **kw)
>>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/
>>> manager.py", line 173, in _launch_kernel
>>> return launch_kernel(kernel_cmd, **kw)
>>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/
>>> launcher.py", line 254, in launch_kernel
>>> stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.
>>> environ)
>>>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
>>> errread, errwrite)
>>>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
>>> raise child_exception
>>> OSError: [Errno 2] No such file or directory
>>> ERROR:tornado.access:{
>>>   "Origin": "http://127.0.0.1:8998";,
>>>   "Content-Length": "50",
>>>   "Accept-Language": "en-GB,en-US;q=0.8,en;q=0.6",
>>>   "Accept-Encoding": "gzip,deflate,sdch",
>>>   "Connection": "keep-alive",
>>>   "Accept": "application/json, text/javascript, */*; q=0.01",
>>>   "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
>>> (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36",
>>>   "Host": "127.0.0.1:8998",
>>>   "X-Requested-With": "XMLHttpRequest",
>>>   "Referer": "http://127.0.0.1:8998/notebooks/Untitled16.ipynb";,
>>>   "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
>>> }
>>> ERROR:tornado.access:500 POST /api/sessions (127.0.0.1) 20.67ms referer=
>>> http://127.0.0.1:8998/notebooks/Untitled16.ipynb
>>> 2014-04-11 19:20:45.994 [NotebookApp] Saving notebook at /Untitled16.
>>> ipynb
>>>
>>>
>>>
>>>
>>> If instead I run
>>>
>>> ipython console --profile julia
>>>
>>>
>>> I don't even get so far as anything opening at all: I just get the same
>>> error message.
>>>
>>> This error and others similar to it have appeared in a number of places,
>>> for example:
>>>
>>> https:

Re: [julia-users] Hyper-Dual numbers

2014-04-11 Thread Robert J Goedman
HI John,

Done, should be available, thanks to Jiahao!

Rob J. Goedman
goed...@icloud.com




On Apr 8, 2014, at 8:03 AM, John Myles White  wrote:

> Hi Rob,
> 
> Please do submit your package to METADATA now that it has a well-defined 
> license. It seems like a really useful tool to have available.
> 
>  -- John
> 
> On Apr 6, 2014, at 4:21 PM, Robert J Goedman  wrote:
> 
>> Hi John,
>> 
>> Jeff has updated his source files with the MIT license and I've pasted those 
>> into the LICENSE file of the Julia package.
>> 
>> Jason Merrill has also given good feedback that I'm still looking into. My 
>> interpretation of his feedback (a single package covering different hyper 
>> number types and orders) is substantial more work and will definitely take 
>> longer. So maybe we should publish the current version?
>> 
>> Regards,
>> Rob J. Goedman
>> goed...@icloud.com
>> 
>> 
>> 
>> On Apr 6, 2014, at 12:14 PM, Jeffrey Fike  wrote:
>> 
>>> Rob,
>>> 
>>> Thanks for your interest.  I have been meaning to look into an actual open 
>>> source license.  I went with the MIT license.  I have updated the code on 
>>> the website to reflect this.  Please let me know if you need any additional 
>>> information.
>>> 
>>> Jeff Fike
>> 
>> On Mar 29, 2014, at 5:55 PM, John Myles White  
>> wrote:
>> 
>>> Thanks for looking into it, Rob. In the absence of a license, the code is 
>>> technically not free to use. But I imagine the authors would like to share 
>>> their code, so it should be easy to convince them to use something formal 
>>> like the MIT or BSD licenses.
>>> 
>>>  — John
>>> 
>>> On Mar 29, 2014, at 5:52 PM, Robert J Goedman  wrote:
>>> 
 John,
 
 No license is mentioned on the c++ code nor on the matlab versions as far 
 as I can see.
 
 I'll send the authors an email.
 
 Regards,
 Rob J. Goedman
 goed...@icloud.com
 
>> 
 On Mar 29, 2014, at 5:47 PM, John Myles White  
 wrote:
 
> This looks really cool. Any idea what the license was on the original 
> file?
> 
>  — John
> 
> On Mar 29, 2014, at 5:43 PM, Robert J Goedman  wrote:
> 
>> Hi,
>> 
>> As a first 'jump into the fray' exercise I've attempted to translate 
>> Jeffrey Fike's hyper-dual numbers code from c++ to Julia, more or less 
>> following the DualNumbers package.
>> 
>> The c++ code can be found at 
>> http://adl.stanford.edu/hyperdual/hyperdual.h . The paper itself at 
>> http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf .
>> 
>> The Julia package can be found at: 
>> https://github.com/goedman/HyperDualNumbers.jl.git .
>> 
>> Of course, I'm pretty new at this so I'm sure there will be errors and 
>> poor practices. So any feedback is appreciated.
>> 
>> Also, I'm wondering if the type should be called Hyper or a better name 
>> would be HyperDual.
>> 
>> This work was triggered by the interesting threads around openPP, 
>> TaylorSeries.jl, Calculus2, PowerSeries.jl (and at some time I hope 
>> MCMC.jl).
>> 
>> Rob J. Goedman
>> goed...@icloud.com
>> 
>> 
> 



Re: [julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-04-11 Thread Stefan Karpinski
We contemplated giving Julia macros function call syntax, but decided not
to. These were a few of the reasons:

   1. The @foo syntax serves as a warning to the reader that something
   unusual is about to happen. Macro invocation isn't at all like a function
   call and doesn't look like it – it looks like a user-defined keyword, which
   is basically what it is.
   2. If you write map(m,v) where m is a macro, what happens? If you write
   map(@m,v), there's no expectation that this should do anything but apply
   the @m macro to zero arguments and then map the result of that over v.
   3. We want to discourage excessive use of macros. Macros are the
   ultimate escape hatch, but using them too much is usually a sign of bad
   library design or a language deficiency. Having a jarring macro syntax
   keeps us honest.




On Fri, Apr 11, 2014 at 6:16 AM, Mike Innes  wrote:

> Lisp has certainly had a strong influence on Julia. First class functions,
> homoiconicity, running code at compile time and compiling code at runtime,
> the interactive REPL, dynamic typing and GC, everything you could really
> want from a Lisp is there.
>
> But, syntax does make a difference, I think. For example, deeply nesting
> expressions concisely is far less natural in Julia than Lisp. Macros, while
> just as powerful, are a little more awkward thanks to Julia's more complex
> syntax and the fact that you have to often write @foo begin rather than
> just (foo. Don't get me wrong, Julia's syntax is great, and it's entirely
> the right choice for the technical space, but for that reason I think I'd
> say that Julia isn't *a* Lisp as such. Yes, they're similar in terms of
> raw language power, but each for different problems.
>
> I've often thought that a Lisp which compiles to Julia would be a cool
> project, though.
>
> If you're interested, this Paul Graham 
> essay is
> an interesting read. It seems he was spot on about languages with
> algol-like syntax adopting more Lisp features.
>


Re: [julia-users] IJulia Error

2014-04-11 Thread Thomas Moore
This looks to have solved the problem nicely! When I looked at the last 
line of ~/.ipython/profile_julia/ipython_config.py it was:

c.KernelManager.kernel_cmd = ["/home/thomas/julia/usr/bin/julia", "-F", 
"/home/thomas/.julia/IJulia/src/kernel.jl", "{connection_file}"]

However there was no julia executable in my ~/julia/usr/bin file (it's just 
in ~/julia), and the notebook works if I replace this line with:

c.KernelManager.kernel_cmd = ["/home/thomas/julia/julia", "-F", 
"/home/thomas/.julia/IJulia/src/kernel.jl", "{connection_file}"]

Thanks for you help!



On Friday, 11 April 2014 23:13:52 UTC+10, Isaiah wrote:
>
> This error usually means that python can't find the julia executable. Try 
> running Pkg.build("IJulia") and see if there are any errors. If there are 
> no errors, then look in ~/.config/ipython/profile_julia/ipython_config.py. 
> The last line should be "c.KernelManager.kernel_cmd = ...". Does the Julia 
> binary referenced there actually exist? Can you shell out to it directly 
> from IPython?
>
>
> On Fri, Apr 11, 2014 at 5:35 AM, Thomas Moore 
> 
> > wrote:
>
>> I've been trying to get IJulia to work on Ubuntu 12.04 with Julia Version 
>> 0.3.0-prerelease+2057. I installed ipython 2.0.0 using easy_install:
>>
>> easy_install ipython[all]
>>
>>
>> and this allows me to run an ipython notebook from the terminal with:
>>
>> ipython notebook
>>
>>
>> This all works fine. I then attempted to install IJulia with 
>>
>> Pkg.add("IJulia")
>>
>>
>>
>> and this all seemed to work well. When I run
>>
>> ipython notebook --profile julia
>>
>>
>> a notebook opens with the Julia logo at the top right. However, when I 
>> open a new notebook, the kernel appears permanently busy (I can write in 
>> markdown script and headers, but I can't execute any Julia code) and I get 
>> the following error message in the terminal:
>>
>>
>> 2014-04-11 18:56:44.881 [NotebookApp] Creating new notebook in /
>> 2014-04-11 18:56:44.884 [NotebookApp] Writing notebook-signing key to /
>> home/thomas/.ipython/profile_julia/security/notebook_secret
>> 2014-04-11 18:56:45.961 [NotebookApp] ERROR | Unhandled error in API 
>> request
>> Traceback (most recent call last):
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/IPython/html/base/handlers.py",line 
>> 286, in wrapper
>> result = method(self, *args, **kwargs)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/IPython/html/services/sessions/handlers.py"
>> , line 65, in post
>> kernel_id = km.start_kernel(path=path)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/IPython/html/services/kernels/kernelmanager.py"
>> , line 90, in start_kernel
>> kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/IPython/kernel/multikernelmanager.py"
>> , line 116, in start_kernel
>> km.start_kernel(**kwargs)
>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py"
>> , line 217, in start_kernel
>> **kw)
>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py"
>> , line 173, in _launch_kernel
>> return launch_kernel(kernel_cmd, **kw)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py",line 
>> 254, in launch_kernel
>> stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ
>> )
>>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
>> errread, errwrite)
>>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
>> raise child_exception
>> OSError: [Errno 2] No such file or directory
>> ERROR:tornado.access:{
>>   "Origin": "http://127.0.0.1:8998";, 
>>   "Content-Length": "50", 
>>   "Accept-Language": "en-GB,en-US;q=0.8,en;q=0.6", 
>>   "Accept-Encoding": "gzip,deflate,sdch", 
>>   "Connection": "keep-alive", 
>>   "Accept": "application/json, text/javascript, */*; q=0.01", 
>>   "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 
>> (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36", 
>>   "Host": "127.0.0.1:8998", 
>>   "X-Requested-With": "XMLHttpRequest", 
>>   "Referer": "http://127.0.0.1:8998/notebooks/Untitled16.ipynb";, 
>>   "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
>> }
>> ERROR:tornado.access:500 POST /api/sessions (127.0.0.1) 20.67ms referer=
>> http://127.0.0.1:8998/notebooks/Untitled16.ipynb
>> 2014-04-11 19:20:45.994 [NotebookApp] Saving notebook at /Untitled16.
>> ipynb
>>
>>
>>
>>
>> If instead I run 
>>
>> ipython console --profile julia
>>
>>
>> I don't even get so far as anything opening at all: I just get the same 
>> error message. 
>>
>> This error and others similar to it have appeared in a number of places, 
>> for example:
>>
>> https://github.com/JuliaLang/IJulia.jl/issues/61
>> https://groups.google.com/forum/#!msg/julia-users/MJrSqN1CcDs/SrbQOL2yMTkJ
>> https://groups.google.com/forum/#!msg/julia-users/MhTP9T-j5FY/PP_Su47p8RoJ
>>
>> The reason for the error and suggested fixes vary co

Re: [julia-users] IJulia Error

2014-04-11 Thread Andreas Noack Jensen
Last week I had a similar error, but I cannot remember the exact phrasing.
The reason was the the REPL, but Pkg.checkout("IJulia") fixed it.


2014-04-11 15:13 GMT+02:00 Isaiah Norton :

> This error usually means that python can't find the julia executable. Try
> running Pkg.build("IJulia") and see if there are any errors. If there are
> no errors, then look in ~/.config/ipython/profile_julia/ipython_config.py.
> The last line should be "c.KernelManager.kernel_cmd = ...". Does the Julia
> binary referenced there actually exist? Can you shell out to it directly
> from IPython?
>
>
> On Fri, Apr 11, 2014 at 5:35 AM, Thomas Moore wrote:
>
>> I've been trying to get IJulia to work on Ubuntu 12.04 with Julia Version
>> 0.3.0-prerelease+2057. I installed ipython 2.0.0 using easy_install:
>>
>> easy_install ipython[all]
>>
>>
>> and this allows me to run an ipython notebook from the terminal with:
>>
>> ipython notebook
>>
>>
>> This all works fine. I then attempted to install IJulia with
>>
>> Pkg.add("IJulia")
>>
>>
>>
>> and this all seemed to work well. When I run
>>
>> ipython notebook --profile julia
>>
>>
>> a notebook opens with the Julia logo at the top right. However, when I
>> open a new notebook, the kernel appears permanently busy (I can write in
>> markdown script and headers, but I can't execute any Julia code) and I get
>> the following error message in the terminal:
>>
>>
>> 2014-04-11 18:56:44.881 [NotebookApp] Creating new notebook in /
>> 2014-04-11 18:56:44.884 [NotebookApp] Writing notebook-signing key to /
>> home/thomas/.ipython/profile_julia/security/notebook_secret
>> 2014-04-11 18:56:45.961 [NotebookApp] ERROR | Unhandled error in API
>> request
>> Traceback (most recent call last):
>>   File
>> "/usr/local/lib/python2.7/dist-packages/IPython/html/base/handlers.py",line
>> 286, in wrapper
>> result = method(self, *args, **kwargs)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/IPython/html/services/sessions/handlers.py"
>> , line 65, in post
>> kernel_id = km.start_kernel(path=path)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/IPython/html/services/kernels/kernelmanager.py"
>> , line 90, in start_kernel
>> kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/IPython/kernel/multikernelmanager.py"
>> , line 116, in start_kernel
>> km.start_kernel(**kwargs)
>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py"
>> , line 217, in start_kernel
>> **kw)
>>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py"
>> , line 173, in _launch_kernel
>> return launch_kernel(kernel_cmd, **kw)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py",line
>> 254, in launch_kernel
>> stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ
>> )
>>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
>> errread, errwrite)
>>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
>> raise child_exception
>> OSError: [Errno 2] No such file or directory
>> ERROR:tornado.access:{
>>   "Origin": "http://127.0.0.1:8998";,
>>   "Content-Length": "50",
>>   "Accept-Language": "en-GB,en-US;q=0.8,en;q=0.6",
>>   "Accept-Encoding": "gzip,deflate,sdch",
>>   "Connection": "keep-alive",
>>   "Accept": "application/json, text/javascript, */*; q=0.01",
>>   "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
>> (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36",
>>   "Host": "127.0.0.1:8998",
>>   "X-Requested-With": "XMLHttpRequest",
>>   "Referer": "http://127.0.0.1:8998/notebooks/Untitled16.ipynb";,
>>   "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
>> }
>> ERROR:tornado.access:500 POST /api/sessions (127.0.0.1) 20.67ms referer=
>> http://127.0.0.1:8998/notebooks/Untitled16.ipynb
>> 2014-04-11 19:20:45.994 [NotebookApp] Saving notebook at /Untitled16.
>> ipynb
>>
>>
>>
>>
>> If instead I run
>>
>> ipython console --profile julia
>>
>>
>> I don't even get so far as anything opening at all: I just get the same
>> error message.
>>
>> This error and others similar to it have appeared in a number of places,
>> for example:
>>
>> https://github.com/JuliaLang/IJulia.jl/issues/61
>> https://groups.google.com/forum/#!msg/julia-users/MJrSqN1CcDs/SrbQOL2yMTkJ
>> https://groups.google.com/forum/#!msg/julia-users/MhTP9T-j5FY/PP_Su47p8RoJ
>>
>> The reason for the error and suggested fixes vary considerably. I've
>> tried deleting ~/.ipython/profile_julia and running Pkg.fixup("IJulia").
>> I've tried removing IJulia and then running Pkg.add("WinRPM") and then
>> Pkg.add("IJulia"). So far the error message hasn't changed.
>>
>> Any help would be appreciated :)
>>
>>
>>
>


-- 
Med venlig hilsen

Andreas Noack Jensen


Re: [julia-users] IJulia Error

2014-04-11 Thread Isaiah Norton
This error usually means that python can't find the julia executable. Try
running Pkg.build("IJulia") and see if there are any errors. If there are
no errors, then look in ~/.config/ipython/profile_julia/ipython_config.py.
The last line should be "c.KernelManager.kernel_cmd = ...". Does the Julia
binary referenced there actually exist? Can you shell out to it directly
from IPython?


On Fri, Apr 11, 2014 at 5:35 AM, Thomas Moore  wrote:

> I've been trying to get IJulia to work on Ubuntu 12.04 with Julia Version
> 0.3.0-prerelease+2057. I installed ipython 2.0.0 using easy_install:
>
> easy_install ipython[all]
>
>
> and this allows me to run an ipython notebook from the terminal with:
>
> ipython notebook
>
>
> This all works fine. I then attempted to install IJulia with
>
> Pkg.add("IJulia")
>
>
>
> and this all seemed to work well. When I run
>
> ipython notebook --profile julia
>
>
> a notebook opens with the Julia logo at the top right. However, when I
> open a new notebook, the kernel appears permanently busy (I can write in
> markdown script and headers, but I can't execute any Julia code) and I get
> the following error message in the terminal:
>
>
> 2014-04-11 18:56:44.881 [NotebookApp] Creating new notebook in /
> 2014-04-11 18:56:44.884 [NotebookApp] Writing notebook-signing key to /
> home/thomas/.ipython/profile_julia/security/notebook_secret
> 2014-04-11 18:56:45.961 [NotebookApp] ERROR | Unhandled error in API
> request
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python2.7/dist-packages/IPython/html/base/handlers.py",line
> 286, in wrapper
> result = method(self, *args, **kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/IPython/html/services/sessions/handlers.py"
> , line 65, in post
> kernel_id = km.start_kernel(path=path)
>   File
> "/usr/local/lib/python2.7/dist-packages/IPython/html/services/kernels/kernelmanager.py"
> , line 90, in start_kernel
> kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/IPython/kernel/multikernelmanager.py"
> , line 116, in start_kernel
> km.start_kernel(**kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",line
> 217, in start_kernel
> **kw)
>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",line
> 173, in _launch_kernel
> return launch_kernel(kernel_cmd, **kw)
>   File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py"
> , line 254, in launch_kernel
> stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ)
>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
> errread, errwrite)
>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
> raise child_exception
> OSError: [Errno 2] No such file or directory
> ERROR:tornado.access:{
>   "Origin": "http://127.0.0.1:8998";,
>   "Content-Length": "50",
>   "Accept-Language": "en-GB,en-US;q=0.8,en;q=0.6",
>   "Accept-Encoding": "gzip,deflate,sdch",
>   "Connection": "keep-alive",
>   "Accept": "application/json, text/javascript, */*; q=0.01",
>   "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36",
>   "Host": "127.0.0.1:8998",
>   "X-Requested-With": "XMLHttpRequest",
>   "Referer": "http://127.0.0.1:8998/notebooks/Untitled16.ipynb";,
>   "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
> }
> ERROR:tornado.access:500 POST /api/sessions (127.0.0.1) 20.67ms referer=
> http://127.0.0.1:8998/notebooks/Untitled16.ipynb
> 2014-04-11 19:20:45.994 [NotebookApp] Saving notebook at /Untitled16.ipynb
>
>
>
>
> If instead I run
>
> ipython console --profile julia
>
>
> I don't even get so far as anything opening at all: I just get the same
> error message.
>
> This error and others similar to it have appeared in a number of places,
> for example:
>
> https://github.com/JuliaLang/IJulia.jl/issues/61
> https://groups.google.com/forum/#!msg/julia-users/MJrSqN1CcDs/SrbQOL2yMTkJ
> https://groups.google.com/forum/#!msg/julia-users/MhTP9T-j5FY/PP_Su47p8RoJ
>
> The reason for the error and suggested fixes vary considerably. I've tried
> deleting ~/.ipython/profile_julia and running Pkg.fixup("IJulia"). I've
> tried removing IJulia and then running Pkg.add("WinRPM") and then
> Pkg.add("IJulia"). So far the error message hasn't changed.
>
> Any help would be appreciated :)
>
>
>


[julia-users] Re: Implementing Gillespie's Stochastic Simulation Algorithm

2014-04-11 Thread Simon Frost

Dear David,

It probably would be easier to pass a function that, given the current 
states and the parameters, returned a Float64 vector of rates. The main 
issue that I have is that eval can't see all the variables defined in the 
function scope, so my code runs fine if run globally, but not as a 
function. If I go along that route, it would probably be best to define an 
appropriate model type, rather like Tim Vaughan's MASTER program:

https://github.com/CompEvol/MASTER/wiki/Trajectory-specification

I'll tweak my code to work with functions, and push to github when I get a 
chance.

Best
Simon


[julia-users] GPU computing

2014-04-11 Thread gexarcha
Hi,

I am trying to figure out what kind of options do I have for utilizing the 
GPU for high performance computing in Julia. 
I have seen some old 
threadsdiscussing
 an nvptx backend and the CUDA.jl package. I would like to know 
if there is any other effort out there dealing with GPU computing. Also, 
does anybody know if there is a plan of integrating GPU support in the 
language?
Thanks!

 - Georgios


Re: [julia-users] Re: Export/view movie of plots

2014-04-11 Thread Sheehan Olver
Was hoping for something one line on Julia

Sent from my iPhone

> On Apr 11, 2014, at 10:18 PM, Arnim Bleier  wrote:
> 
> Hi,
> 
> create pictures for each frame [1:N] ... (lets say pic_n.png)
> 
> then
> mencoder mf://*.png -mf w=200:h=150:fps=25:type=png -ovc copy -oac copy -o 
> out.avi
> 
> now you should have a "out.avi" 
> 
> 
> 
> Best
> 
> Arnim
> 
> 
> 
> 
>> On Friday, April 11, 2014 1:20:18 PM UTC+2, Sheehan Olver wrote:
>> I'm trying to do movies of an evolving solution to a PDE.  Let's say that 
>> the solution at time steps is stored as columns of an array.Is this 
>> possible?   Preferably in IJulia, but if that's not possible export from 
>> Julia.
>> 


[julia-users] Re: Export/view movie of plots

2014-04-11 Thread Arnim Bleier
Hi,

create pictures for each frame [1:N] ... (lets say pic_n.png)

then

mencoder mf://*.png -mf w=200:h=150:fps=25:type=png -ovc copy -oac copy -o 
out.avi

now you should have a "out.avi" 


Best

Arnim



On Friday, April 11, 2014 1:20:18 PM UTC+2, Sheehan Olver wrote:
>
> I'm trying to do movies of an evolving solution to a PDE.  Let's say that 
> the solution at time steps is stored as columns of an array.Is this 
> possible?   Preferably in IJulia, but if that's not possible export from 
> Julia.
>
>

[julia-users] Talk on numerical algorithms in Julia at UCL, 4/14

2014-04-11 Thread Jiahao Chen
I will be giving a talk in London to introduce how Julia facilitates
the writing of numerical algorithms.

University College London
Roberts Building, Room 106
Monday, 14 April at 14:50
http://www.maths.manchester.ac.uk/news-and-events/events/anahpc13/

I will be in London this weekend also, and would be available to meet
up with any interested Julia users. (If you ever wanted to complain
about Base.LinAlg in person, here's your chance...)

Thanks,

Jiahao Chen
Staff Research Scientist
MIT Computer Science and Artificial Intelligence Laboratory


[julia-users] Export/view movie of plots

2014-04-11 Thread Sheehan Olver
I'm trying to do movies of an evolving solution to a PDE.  Let's say that 
the solution at time steps is stored as columns of an array.Is this 
possible?   Preferably in IJulia, but if that's not possible export from 
Julia.



[julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-04-11 Thread Mike Innes
Lisp has certainly had a strong influence on Julia. First class functions, 
homoiconicity, running code at compile time and compiling code at runtime, 
the interactive REPL, dynamic typing and GC, everything you could really 
want from a Lisp is there.

But, syntax does make a difference, I think. For example, deeply nesting 
expressions concisely is far less natural in Julia than Lisp. Macros, while 
just as powerful, are a little more awkward thanks to Julia's more complex 
syntax and the fact that you have to often write @foo begin rather than 
just (foo. Don't get me wrong, Julia's syntax is great, and it's entirely 
the right choice for the technical space, but for that reason I think I'd 
say that Julia isn't *a* Lisp as such. Yes, they're similar in terms of raw 
language power, but each for different problems.

I've often thought that a Lisp which compiles to Julia would be a cool 
project, though.

If you're interested, this Paul Graham 
essay is 
an interesting read. It seems he was spot on about languages with 
algol-like syntax adopting more Lisp features.


Re: [julia-users] Re: "Getting around" a PosDefException

2014-04-11 Thread Andreas Noack Jensen
Actually much more expensive, but I think that it could easily get
confusing to use the permuted Cholesky factor. We should probably have a
look at sqrtm and see if it could be made more efficient.  It allocates a
lot of memory and I am not sure that it is necessary.


2014-04-11 11:28 GMT+02:00 Toivo Henningsson :

> Isn't sqrtm more computationally expensive?
>
>
> On Friday, 11 April 2014 09:03:38 UTC+2, Andreas Noack Jensen wrote:
>>
>> I think that sqrtm would often be the more reasonable advise. My guess is
>> that the Cholesky factor is very often used like a matrix square root.
>>
>


-- 
Med venlig hilsen

Andreas Noack Jensen


[julia-users] IJulia Error

2014-04-11 Thread Thomas Moore
I've been trying to get IJulia to work on Ubuntu 12.04 with Julia Version 
0.3.0-prerelease+2057. I installed ipython 2.0.0 using easy_install:

easy_install ipython[all]


and this allows me to run an ipython notebook from the terminal with:

ipython notebook


This all works fine. I then attempted to install IJulia with 

Pkg.add("IJulia")



and this all seemed to work well. When I run

ipython notebook --profile julia


a notebook opens with the Julia logo at the top right. However, when I open 
a new notebook, the kernel appears permanently busy (I can write in 
markdown script and headers, but I can't execute any Julia code) and I get 
the following error message in the terminal:


2014-04-11 18:56:44.881 [NotebookApp] Creating new notebook in /
2014-04-11 18:56:44.884 [NotebookApp] Writing notebook-signing key to /home/
thomas/.ipython/profile_julia/security/notebook_secret
2014-04-11 18:56:45.961 [NotebookApp] ERROR | Unhandled error in API request
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/dist-packages/IPython/html/base/handlers.py",line 
286, in wrapper
result = method(self, *args, **kwargs)
  File 
"/usr/local/lib/python2.7/dist-packages/IPython/html/services/sessions/handlers.py"
, line 65, in post
kernel_id = km.start_kernel(path=path)
  File 
"/usr/local/lib/python2.7/dist-packages/IPython/html/services/kernels/kernelmanager.py"
, line 90, in start_kernel
kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs)
  File 
"/usr/local/lib/python2.7/dist-packages/IPython/kernel/multikernelmanager.py"
, line 116, in start_kernel
km.start_kernel(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",line 
217, in start_kernel
**kw)
  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",line 
173, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py",line 
254, in launch_kernel
stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
ERROR:tornado.access:{
  "Origin": "http://127.0.0.1:8998";, 
  "Content-Length": "50", 
  "Accept-Language": "en-GB,en-US;q=0.8,en;q=0.6", 
  "Accept-Encoding": "gzip,deflate,sdch", 
  "Connection": "keep-alive", 
  "Accept": "application/json, text/javascript, */*; q=0.01", 
  "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/33.0.1750.152 Safari/537.36", 
  "Host": "127.0.0.1:8998", 
  "X-Requested-With": "XMLHttpRequest", 
  "Referer": "http://127.0.0.1:8998/notebooks/Untitled16.ipynb";, 
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
}
ERROR:tornado.access:500 POST /api/sessions (127.0.0.1) 20.67ms referer=http
://127.0.0.1:8998/notebooks/Untitled16.ipynb
2014-04-11 19:20:45.994 [NotebookApp] Saving notebook at /Untitled16.ipynb




If instead I run 

ipython console --profile julia


I don't even get so far as anything opening at all: I just get the same 
error message. 

This error and others similar to it have appeared in a number of places, 
for example:

https://github.com/JuliaLang/IJulia.jl/issues/61
https://groups.google.com/forum/#!msg/julia-users/MJrSqN1CcDs/SrbQOL2yMTkJ
https://groups.google.com/forum/#!msg/julia-users/MhTP9T-j5FY/PP_Su47p8RoJ

The reason for the error and suggested fixes vary considerably. I've tried 
deleting ~/.ipython/profile_julia and running Pkg.fixup("IJulia"). I've 
tried removing IJulia and then running Pkg.add("WinRPM") and then 
Pkg.add("IJulia"). So far the error message hasn't changed.

Any help would be appreciated :)




Re: [julia-users] Re: "Getting around" a PosDefException

2014-04-11 Thread Toivo Henningsson
Isn't sqrtm more computationally expensive?

On Friday, 11 April 2014 09:03:38 UTC+2, Andreas Noack Jensen wrote:
>
> I think that sqrtm would often be the more reasonable advise. My guess is 
> that the Cholesky factor is very often used like a matrix square root.
>


Re: [julia-users] Re: "Getting around" a PosDefException

2014-04-11 Thread Andreas Noack Jensen
I think that sqrtm would often be the more reasonable advise. My guess is
that the Cholesky factor is very often used like a matrix square root.


2014-04-08 18:22 GMT+02:00 Stefan Karpinski :

> Is it possible to default to unpivoted and if that fails detect that a
> pivoted Cholesky might have worked and include a recommendation to try the
> pivoted version in the error message?
>
>
> On Tue, Apr 8, 2014 at 10:58 AM, Andreas Noack Jensen <
> andreasnoackjen...@gmail.com> wrote:
>
>> It would be helpful if the LAPACK codes were written out in the Julia
>> exception, but it is not most exciting thing to write. The un-pivoted
>> Cholesky factor is not triangular, so I think returning that would also
>> cause some confusion.
>>
>>
>> 2014-04-08 16:50 GMT+02:00 Iain Dunning :
>>
>> Jiahao: interesting link! Do you think we should put the meaning of that
>>> error code somewhere? Maybe best would be as the actual message of the
>>> PosDefException.
>>> Andreas: if we un-pivot the result then the user would be unaware,
>>> correct? I feel like chol() is the "casual" way of doing it and should make
>>> a best effort to work, whereas cholfact is the more poweruser version.
>>> David: I was indeed playing around with max-cut, check out
>>> https://github.com/JuliaOpt/JuMP.jl/blob/sdp/examples/maxcut_sdp.jl
>>>
>>> Cheers,
>>> Iain
>>>
>>>
>>> On Tuesday, April 8, 2014 5:58:36 AM UTC-4, David de Laat wrote:

 You can also use a hack to make the matrix positive definite:
 mineig = minimum(eigvals(M))
 M -= mineig * eye(M)

 (And in case you're working on max-cut you can also use
 M = (M - mineig * eye(M)) / (1-mineig)
 so that the linear constraints in the semidefinite program are still
 satisfied by the new matrix M.)

 Best,
 David

>>>
>>
>>
>> --
>> Med venlig hilsen
>>
>> Andreas Noack Jensen
>>
>
>


-- 
Med venlig hilsen

Andreas Noack Jensen